Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/press2 355 support links learn more sidebar #119

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 97 additions & 48 deletions includes/Data/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,110 @@
*/
final class Brands {

protected static $brands = array(
'bluehost' => array(
'brand' => 'bluehost',
'name' => 'Bluehost',
'url' => 'https://bluehost.com',
'knowledgeBaseUrl' => 'https://www.bluehost.com/help/results/wordpress',
'helpUrl' => 'https://www.bluehost.com/help',
'blogUrl' => 'https://www.bluehost.com/blog/',
'facebookUrl' => 'https://www.facebook.com/bluehost',
'twitterName' => '@bluehost',
'twitterUrl' => 'https://twitter.com/bluehost',
'youtubeUrl' => 'https://www.youtube.com/user/bluehost',
'linkedinUrl' => 'https://www.linkedin.com/company/bluehost-com',
'accountUrl' => 'https://my.bluehost.com',
'domainsUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/email-office',
'hireExpertsInfo' => array(
'defaultLink' => 'admin.php?',
'fragment' => '#/marketplace/services/blue-sky',
'queryParameters' => array(
'page' => 'bluehost',
'utm_source' => 'onboarding',
'utm_medium' => 'wp_admin',
'utm_campaign' => 'wp-setup')),
),
'bluehost-india' => array(
'brand' => 'bluehost-india',
'name' => 'Bluehost',
'url' => 'https://bluehost.in',
'knowledgeBaseUrl' => 'https://www.bluehost.in/hosting/help/results/wordpress',
'helpUrl' => 'https://www.bluehost.in/hosting/help',
'blogUrl' => 'https://www.bluehost.in/tutorials',
'facebookUrl' => 'https://www.facebook.com/BlueHostIndia',
'twitterName' => '@BluehostIndia',
'twitterUrl' => 'https://twitter.com/bluehostindia',
'youtubeUrl' => null,
'linkedinUrl' => null,
'accountUrl' => 'https://my.bluehost.in',
'domainsUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/email-office',
'hireExpertsInfo' => array(
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'utmParameters' => array(
protected static function brands_info() {
abhijitb marked this conversation as resolved.
Show resolved Hide resolved
return array(
'bluehost' => array(
'brand' => 'bluehost',
'name' => 'Bluehost',
'url' => 'https://bluehost.com',
'knowledgeBaseUrl' => 'https://www.bluehost.com/help/results/wordpress',
'helpUrl' => 'https://www.bluehost.com/help',
'blogUrl' => 'https://www.bluehost.com/blog/',
'facebookUrl' => 'https://www.facebook.com/bluehost',
'twitterName' => '@bluehost',
'twitterUrl' => 'https://twitter.com/bluehost',
'youtubeUrl' => 'https://www.youtube.com/user/bluehost',
'linkedinUrl' => 'https://www.linkedin.com/company/bluehost-com',
'accountUrl' => 'https://my.bluehost.com',
'domainsUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/email-office',
'hireExpertsInfo' => array(
'defaultLink' => 'admin.php?',
'fragment' => '#/marketplace/services/blue-sky',
'queryParameters' => array(
'page' => 'bluehost',
'utm_source' => 'onboarding',
'utm_medium' => 'wp_admin',
'utm_campaign' => 'wp-setup'
),
),
'expertsInfo' => array(
'defaultLink' => 'https://my.bluehost.com/cgi/app/#/marketplace/product/i/bluesky',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
abhijitb marked this conversation as resolved.
Show resolved Hide resolved
),
),
'fullServiceCreativeTeamInfo' => array(
'defaultLink' => 'https://www.bluehost.com/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
abhijitb marked this conversation as resolved.
Show resolved Hide resolved
),
),
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.com/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
abhijitb marked this conversation as resolved.
Show resolved Hide resolved
),
),
),
'bluehost-india' => array(
'brand' => 'bluehost-india',
'name' => 'Bluehost',
'url' => 'https://bluehost.in',
'knowledgeBaseUrl' => 'https://www.bluehost.in/hosting/help/results/wordpress',
'helpUrl' => 'https://www.bluehost.in/hosting/help',
'blogUrl' => 'https://www.bluehost.in/tutorials',
'facebookUrl' => 'https://www.facebook.com/BlueHostIndia',
'twitterName' => '@BluehostIndia',
'twitterUrl' => 'https://twitter.com/bluehostindia',
'youtubeUrl' => null,
'linkedinUrl' => null,
'accountUrl' => 'https://my.bluehost.in',
'domainsUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/email-office',
'hireExpertsInfo' => array(
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'utmParameters' => array(
'utm_source' => 'blog',
'utm_medium' => 'socialmedia',
'utm_campaign' => 'blogpost')),
),
);

'utm_campaign' => 'blogpost'
)
),
'expertsInfo' => array(
'defaultLink' => 'https://my.bluehost.in/cgi/app/#/marketplace/product/i/bluesky',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
),
),
'fullServiceCreativeTeamInfo' => array(
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
),
),
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.in/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => reset(explode('/', str_replace(WP_PLUGIN_DIR . '/', '', __DIR__))),
),
),
),
);
}
/**
* Get Brand information.
*
* @return array
*/
public static function get_brands() {
return self::$brands;
return self::brands_info();
}
abhijitb marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const SupportLink = ( {
text,
} ) => {
return (
<a href={ link } className={ baseClassName }>
<a href={ link } className={ baseClassName } target={ '_blank' }>
{ text }
</a>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../utils/locales/translations';
import { info } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../store';
import { select } from '@wordpress/data';

const getContents = ( brandName ) => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();
abhijitb marked this conversation as resolved.
Show resolved Hide resolved

return {
introduction: {
heading: __( 'Basic Info', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -55,11 +62,11 @@ const getContents = ( brandName ) => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank') )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../utils/locales/translations';
import { color } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../store';
import { select } from '@wordpress/data';

const getContents = () => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();

return {
introduction: {
heading: __( 'Colors', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -40,11 +47,11 @@ const getContents = () => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank' ) )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../utils/locales/translations';
import { header } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../store';
import { select } from '@wordpress/data';

const getContents = () => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();

return {
introduction: {
heading: __( 'Header & Menu', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -55,11 +62,11 @@ const getContents = () => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank' ) )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../utils/locales/translations';
import { home } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../store';
import { select } from '@wordpress/data';

const getContents = () => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();

return {
introduction: {
heading: __( 'Home Page', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -46,11 +53,11 @@ const getContents = () => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank' ) )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../../utils/locales/translations';
import { brush } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../../store';
import { select } from '@wordpress/data';

const getContents = ( brandName ) => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();

return {
introduction: {
heading: __( 'Theme Styles', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -51,11 +58,11 @@ const getContents = ( brandName ) => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank' ) )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../../utils/locales/translations';
import { brush } from '@wordpress/icons';

import { store as nfdOnboardingStore } from '../../../../../../store';
import { select } from '@wordpress/data';

const getContents = ( brandName ) => {

const techSupportLink = select( nfdOnboardingStore ).getTechSupportUrl();
const fullServiceCreativeTeamLink = select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl();

return {
introduction: {
heading: __( 'Theme Styles', 'wp-module-onboarding' ),
Expand Down Expand Up @@ -51,11 +58,11 @@ const getContents = ( brandName ) => {
'Hire Our Full-Service Creative Studio',
'wp-module-onboarding'
),
link: '#',
link: fullServiceCreativeTeamLink,
},
support: {
text: __( 'Technical Support', 'wp-module-onboarding' ),
link: '#',
link: techSupportLink,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.location.href = content.help.fullService.link )
( window.open( content.help.fullService.link, '_blank' ) )
}
/>
<SupportLink
Expand Down
Loading