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

altered a few access modifiers and removed unused imports #148

Merged
merged 12 commits into from
Jan 25, 2023
6 changes: 3 additions & 3 deletions includes/Data/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected static function get_theme_step_patterns() {
);
}

public static function cleanup_wp_grammar( $content ) {
private static function cleanup_wp_grammar( $content ) {

// Remove template-part if that exists
$content = preg_replace( '/^<!-- wp:template-part .* \/-->$/m', '', $content );
Expand All @@ -115,7 +115,7 @@ public static function cleanup_wp_grammar( $content ) {
return $content;
}

public static function get_pattern_from_slug( $pattern_slug ) {
protected static function get_pattern_from_slug( $pattern_slug ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

$block_patterns_registry = \WP_Block_Patterns_Registry::get_instance();
if ( $block_patterns_registry->is_registered( $pattern_slug ) ) {
Expand All @@ -130,7 +130,7 @@ public static function get_pattern_from_slug( $pattern_slug ) {
return false;
}

public static function get_theme_step_patterns_from_step( $step, $squash = false ) {
protected static function get_theme_step_patterns_from_step( $step, $squash = false ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
$active_theme = ( \wp_get_theme() )->get( 'TextDomain' );

if ( ! isset( self::get_theme_step_patterns()[ $active_theme ][ $step ] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Data/SiteFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function get_site_features()
);
}

public static function mark_initial_plugins() {
private static function mark_initial_plugins() {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
$flow = Data::current_flow();
$installed_plugins = Plugins::get_init();

Expand Down
2 changes: 1 addition & 1 deletion includes/Data/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static function get_init() {
}

// This is temporary, as we implement theme selections we can remove this.
public static function get_flow_default_theme_slug( $flow ) {
protected static function get_flow_default_theme_slug( $flow ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
return isset( self::$flow_default_theme_slugs[ $flow ] ) ? self::$flow_default_theme_slugs[ $flow ] : false;
}
}
8 changes: 4 additions & 4 deletions includes/RestApi/FlowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function save_onboarding_flow_data( \WP_REST_Request $request ) {
*
* @return array
*/
public function update_default_data_for_ecommerce( $data ) {
protected function update_default_data_for_ecommerce( $data ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
// get current flow type
$flow_type = Data::current_flow();
if ( $flow_type == 'ecommerce' ) {
Expand All @@ -187,21 +187,21 @@ public function read_details_from_wp_options() {
/*
* add onboarding flow options
*/
public function save_details_to_wp_options( $data ) {
private function save_details_to_wp_options( $data ) {
return \add_option( Options::get_option_name( 'flow' ), $data );
}

/*
* update onboarding flow options
*/
public function update_wp_options_data_in_database( $data ) {
private function update_wp_options_data_in_database( $data ) {
return \update_option( Options::get_option_name( 'flow' ), $data );
}

/*
* function to search for key in array recursively with case sensitive exact match
*/
public function array_search_key( $needle_key, $array ) {
private function array_search_key( $needle_key, $array ) {
foreach ( $array as $key => $value ) {
if ( strcmp( $key, $needle_key ) === 0 ) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions includes/RestApi/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use NewfoldLabs\WP\Module\Onboarding\Data\Options;
use NewfoldLabs\WP\Module\Onboarding\Data\Config;
use NewfoldLabs\WP\Module\Onboarding\WP_Config;
use NewfoldLabs\WP\Module\Onboarding\Data\Data;
use NewfoldLabs\WP\Module\Onboarding\Services\Webfonts;
// use NewfoldLabs\WP\Module\Onboarding\Data\Data;
// use NewfoldLabs\WP\Module\Onboarding\Services\Webfonts;
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

/**
* Class SettingsController
Expand Down
2 changes: 1 addition & 1 deletion includes/RestApi/SitePagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function set_site_pages( $site_pages_pattern_slugs ) {
return true;
}

public function publish_page( $title, $content, $is_template_no_title = false ) {
protected function publish_page( $title, $content, $is_template_no_title = false ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

$post = array(
'post_title' => $title,
Expand Down
2 changes: 1 addition & 1 deletion includes/RestApi/Themes/ThemeGeneratorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ protected function generate_child_theme_json( $flow_data, $parent_theme_dir ) {
return $theme_json_data;
}

public function generate_child_theme_stylesheet_comment( $parent_theme_slug, $child_theme_slug ) {
protected function generate_child_theme_stylesheet_comment( $parent_theme_slug, $child_theme_slug ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
$current_brand = Data::current_brand();
$customer = \wp_get_current_user();

Expand Down
2 changes: 1 addition & 1 deletion includes/TaskManagers/PluginInstallTaskManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static function add_to_queue( PluginInstallTask $plugin_install_task ) {
return \update_option( Options::get_option_name( self::$queue_name ), $queue->to_array() );
}

public static function remove_from_queue( $plugin ) {
protected static function remove_from_queue( $plugin ) {
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
/*
Get the plugins queued up to be installed, the PluginInstall task gets
converted to an associative array before storing it in the option. */
Expand Down