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

Ran PHP code beautifier and fixer #151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
48 changes: 24 additions & 24 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@
* @return void
*/
function nfd_wp_module_onboarding_register() {
// wp-module-onboarding
// wp-module-onboarding
register(
array(
'name' => 'onboarding',
'label' => __('Onboarding', 'wp-module-onboarding' ),
'callback' => function ( Container $container ) {
'name' => 'onboarding',
'label' => __( 'Onboarding', 'wp-module-onboarding' ),
'callback' => function ( Container $container ) {

// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.0.1' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_DIR' ) && defined('NFD_ONBOARDING_VERSION') ) {
define( 'NFD_ONBOARDING_BUILD_DIR', __DIR__ . '/build/' . NFD_ONBOARDING_VERSION );
}
if ( ! defined( 'NFD_MODULE_DATA_EVENTS_API' ) ) {
define( 'NFD_MODULE_DATA_EVENTS_API', '/newfold-data/v1/events' );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_URL' && defined('NFD_ONBOARDING_VERSION') ) ) {
define( 'NFD_ONBOARDING_BUILD_URL', BLUEHOST_PLUGIN_URL . '/vendor/newfold-labs/wp-module-onboarding/build/' . NFD_ONBOARDING_VERSION );
}
// Instantiate Onboarding Module Application
// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.0.1' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_DIR' ) && defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_BUILD_DIR', __DIR__ . '/build/' . NFD_ONBOARDING_VERSION );
}
if ( ! defined( 'NFD_MODULE_DATA_EVENTS_API' ) ) {
define( 'NFD_MODULE_DATA_EVENTS_API', '/newfold-data/v1/events' );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_URL' && defined( 'NFD_ONBOARDING_VERSION' ) ) ) {
define( 'NFD_ONBOARDING_BUILD_URL', BLUEHOST_PLUGIN_URL . '/vendor/newfold-labs/wp-module-onboarding/build/' . NFD_ONBOARDING_VERSION );
}
// Instantiate Onboarding Module Application
new Application( $container );
},
'isActive' => true,
'isHidden' => true,

'isActive' => true,
'isHidden' => true,
)
);
}
Expand Down
146 changes: 73 additions & 73 deletions includes/Data/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,96 +10,96 @@ public static function get_brands() {

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'
'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' => 'brand-plugin',
'expertsInfo' => array(
'defaultLink' => 'https://my.bluehost.com/cgi/app/#/marketplace/product/i/bluesky',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
'fullServiceCreativeTeamInfo' => array(
'defaultLink' => 'https://www.bluehost.com/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'defaultLink' => 'https://www.bluehost.com/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.com/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.com/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
),
'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'
)
'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',
),
),
'expertsInfo' => array(
'defaultLink' => 'https://my.bluehost.in/cgi/app/#/marketplace/product/i/bluesky',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'expertsInfo' => array(
'defaultLink' => 'https://my.bluehost.in/cgi/app/#/marketplace/product/i/bluesky',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
'fullServiceCreativeTeamInfo' => array(
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'fragment' => '#full-service',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.in/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'techSupportInfo' => array(
'defaultLink' => 'https://helpchat.bluehost.in/',
'queryParams' => array(
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
),
),
),
Expand Down
19 changes: 9 additions & 10 deletions includes/Data/Events.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<?php
namespace NewfoldLabs\WP\Module\Onboarding\Data;


/**
* List of Onboarding events.
*/
final class Events {

// Contains a list of events with the key being the event slug.
protected static $events = array(
'nfd-module-onboarding-event-pageview' => array(
'category' => 'Admin',
'action' => 'pageview',
// Contains a list of events with the key being the event slug.
protected static $events = array(
'nfd-module-onboarding-event-pageview' => array(
'category' => 'Admin',
'action' => 'pageview',
),
);
);

public static function get_event( $event_slug ) {
return self::$events[ $event_slug ] ? self::$events[ $event_slug ] : false;
}
public static function get_event( $event_slug ) {
return self::$events[ $event_slug ] ? self::$events[ $event_slug ] : false;
}
}
2 changes: 1 addition & 1 deletion includes/Data/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected static function get_theme_step_patterns() {
'shown' => true,
),
),
'site-features' => SiteFeatures::get_site_features()[Data::current_flow()]
'site-features' => SiteFeatures::get_site_features()[ Data::current_flow() ],
),
);
}
Expand Down
20 changes: 10 additions & 10 deletions includes/Data/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@ final class Plugins {
*/

protected static $wp_slugs = array(
'jetpack' => array(
'jetpack' => array(
'approved' => true,
'path' => 'jetpack/jetpack.php',
),
'woocommerce' => array(
'woocommerce' => array(
'approved' => true,
'path' => 'woocommerce/woocommerce.php',
),
'wordpress-seo' => array(
'wordpress-seo' => array(
'approved' => true,
'path' => 'wordpress-seo/wp-seo.php',
),
'wpforms-lite' => array(
'wpforms-lite' => array(
'approved' => true,
'path' => 'wpforms-lite/wpforms.php',
),
'google-analytics-for-wordpress' => array(
'google-analytics-for-wordpress' => array(
'approved' => true,
'path' => 'google-analytics-for-wordpress/googleanalytics.php',
),
'optinmonster' => array(
'optinmonster' => array(
'approved' => true,
'path' => 'optinmonster/optin-monster-wp-api.php',
),
'yith-woocommerce-ajax-search' => array(
'yith-woocommerce-ajax-search' => array(
'approved' => true,
'path' => 'yith-woocommerce-ajax-search/init.php',
),
'creative-mail-by-constant-contact' => array(
'creative-mail-by-constant-contact' => array(
'approved' => true,
'path' => 'creative-mail-by-constant-contact/creative-mail-plugin.php',
),
Expand Down Expand Up @@ -240,8 +240,8 @@ public static function get() {
*/
public static function get_squashed() {
return array_merge(
array_filter( self::$wp_slugs, array( __CLASS__, 'check_approved' ) ) ,
array_filter( self::$nfd_slugs, array( __CLASS__, 'check_approved' ) ) ,
array_filter( self::$wp_slugs, array( __CLASS__, 'check_approved' ) ),
array_filter( self::$nfd_slugs, array( __CLASS__, 'check_approved' ) ),
);
}

Expand Down
8 changes: 4 additions & 4 deletions includes/Data/SiteFeatures.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace NewfoldLabs\WP\Module\Onboarding\Data;

use \__;
use NewfoldLabs\WP\Module\Onboarding\Data\Options;

final class SiteFeatures {

public static function get_site_features()
{

public static function get_site_features() {
return array(
'wp-setup' => array(),
'wp-setup' => array(),
'ecommerce' => array(
'jetpack' => array(
'slug' => 'jetpack',
Expand Down
4 changes: 2 additions & 2 deletions includes/Data/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ final class Themes {

// This is temporary, as we implement theme selections we can remove this.
protected static $flow_default_theme_slugs = array(
'wp-setup' => 'twentytwentythree',
'ecommerce' => 'yith-wonder',
'wp-setup' => 'twentytwentythree',
'ecommerce' => 'yith-wonder',
);

/**
Expand Down
Loading