sitemap']['video_sitemap_post_type'] = ! empty( $values['video_sitemap_post_type'] ) ? $values['video_sitemap_post_type'] : []; Helper::update_all_settings( null, null, $settings['sitemap'] ); } } /** * Add Localized data to be used in the Sitemap step. * * @param array $data Localized data. * * @return array */ public function add_analytics_localized_data( $data ) { $registered = Admin_Helper::get_registration_data(); return array_merge( $data, [ 'countriesChoices3' => ProAdminHelper::choices_countries_3(), 'countriesChoices' => ProAdminHelper::choices_countries(), 'console_email_send_to' => Helper::get_settings( 'general.console_email_send_to', $registered['email'] ?? '' ), 'isBusinessPlan' => ProAdminHelper::is_business_plan(), ] ); } /** * Save Sitemap data. * * @param array $values Values to update. */ public function save_analytics_data( $values ) { $settings = rank_math()->settings->all_raw(); $settings['general']['console_email_send_to'] = sanitize_text_field( $values['console_email_send_to'] ); Helper::update_all_settings( $settings['general'], null, null ); } /** * Import has valid file. * * @return mixed */ private function has_valid_import_file() { if ( empty( $_FILES['import-me'] ) ) { // phpcs:ignore WordPress.Security -- Verficiation is handled in the Rest function. $this->error( __( 'No file selected.', 'rank-math-pro' ) ); return false; } $file = Helper::handle_file_upload(); if ( is_wp_error( $file ) ) { $this->error( __( 'Settings file could not be imported:', 'rank-math-pro' ) . ' ' . $file->get_error_message() ); return false; } if ( isset( $file['error'] ) ) { $this->error( __( 'Settings could not be imported:', 'rank-math-pro' ) . ' ' . $file['error'] ); return false; } if ( ! isset( $file['file'] ) ) { $this->error( __( 'Settings could not be imported: Upload failed.', 'rank-math-pro' ) ); return false; } return $file; } /** * Does import data. * * @param array $data Import data. * @param bool $suppress_hooks Suppress hooks or not. * @return bool */ private function do_import_data( array $data, $suppress_hooks = false ) { $this->run_import_hooks( 'pre_import', $data, $suppress_hooks ); // Import options. $down = $this->import_set_options( $data ); // Import capabilities. if ( ! empty( $data['role-manager'] ) ) { $down = true; Helper::set_capabilities( $data['role-manager'] ); } // Import redirections. if ( ! empty( $data['redirections'] ) ) { $down = true; $this->import_set_redirections( $data['redirections'] ); } $this->run_import_hooks( 'after_import', $data, $suppress_hooks ); return $down; } /** * Set options from data. * * @param array $data An array of data. */ private function import_set_options( $data ) { $set = false; $hash = [ 'modules' => 'rank_math_modules', 'general' => 'rank-math-options-general', 'titles' => 'rank-math-options-titles', 'sitemap' => 'rank-math-options-sitemap', ]; foreach ( $hash as $key => $option_key ) { if ( ! empty( $data[ $key ] ) ) { $set = true; update_option( $option_key, $data[ $key ] ); } } return $set; } /** * Set redirections. * * @param array $redirections An array of redirections to import. */ private function import_set_redirections( $redirections ) { foreach ( $redirections as $key => $redirection ) { $matched = \RankMath\Redirections\DB::match_redirections_source( $redirection['sources'] ); if ( ! empty( $matched ) ) { continue; } $sources = maybe_unserialize( $redirection['sources'] ); if ( ! is_array( $sources ) ) { continue; } \RankMath\Redirections\DB::add( [ 'url_to' => $redirection['url_to'], 'sources' => $sources, 'header_code' => $redirection['header_code'], 'hits' => $redirection['hits'], 'created' => $redirection['created'], 'updated' => $redirection['updated'], ] ); } } /** * Run import hooks * * @param string $hook Hook to fire. * @param array $data Import data. * @param bool $suppress Suppress hooks or not. */ private function run_import_hooks( $hook, $data, $suppress ) { if ( ! $suppress ) { /** * Fires while importing settings. * * @since 0.9.0 * * @param array $data Import data. */ $this->do_action( 'import/settings/' . $hook, $data ); } } }
Fatal error: Uncaught Error: Class "RankMathPro\Setup_Wizard" not found in /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math-pro/rank-math-pro.php:361 Stack trace: #0 /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math-pro/rank-math-pro.php(198): RankMathPro->init_actions() #1 /htdocs/emploitogo.info/wp-includes/class-wp-hook.php(353): RankMathPro->setup('') #2 /htdocs/emploitogo.info/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters('', Array) #3 /htdocs/emploitogo.info/wp-includes/plugin.php(523): WP_Hook->do_action(Array) #4 /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math/rank-math.php(188): do_action('rank_math/loade...') #5 /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math/rank-math.php(164): RankMath->setup() #6 /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math/rank-math.php(554): RankMath::get() #7 /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math/rank-math.php(558): rank_math() #8 /htdocs/emploitogo.info/wp-settings.php(597): include_once('/htdocs/emploit...') #9 /htdocs/emploitogo.info/wp-config.php(112): require_once('/htdocs/emploit...') #10 /htdocs/emploitogo.info/wp-load.php(50): require_once('/htdocs/emploit...') #11 /htdocs/emploitogo.info/wp-blog-header.php(13): require_once('/htdocs/emploit...') #12 /htdocs/emploitogo.info/index.php(17): require('/htdocs/emploit...') #13 {main} thrown in /htdocs/emploitogo.info/wp-content/plugins/seo-by-rank-math-pro/rank-math-pro.php on line 361