$this->add_localized_data(); } /** * Add classes to of WordPress admin. * * @codeCoverageIgnore * * @param string $classes Space-separated list of CSS classes. * * @return string */ public function body_class( $classes = '' ) { return $classes . ' ' . join( ' ', $this->classes ); } /** * Save anything you want using onsave function. * * @codeCoverageIgnore */ public function save() { call_user_func( $this->onsave, $this ); } /** * Contextual Help. * * @codeCoverageIgnore */ public function contextual_help() { $screen = get_current_screen(); foreach ( $this->help as $tab_id => $tab ) { $tab['id'] = $tab_id; $tab['content'] = $this->get_help_content( $tab ); $screen->add_help_tab( $tab ); } } /** * Render admin page content using render function you passed in config. * * @codeCoverageIgnore */ public function display() { if ( is_null( $this->render ) ) { return; } if ( 'settings' === $this->render ) { return $this->display_settings(); } if ( is_callable( $this->render ) ) { call_user_func( $this->render, $this ); return; } if ( is_string( $this->render ) ) { include_once $this->render; } } /** * Is the page is currrent page. * * @return bool */ public function is_current_page() { return Param::get( 'page' ) === $this->id; } /** * Enqueue styles * * @codeCoverageIgnore */ private function enqueue_styles() { if ( ! isset( $this->assets['styles'] ) || empty( $this->assets['styles'] ) ) { return; } foreach ( $this->assets['styles'] as $handle => $src ) { wp_enqueue_style( $handle, $src, null, rank_math()->version ); } } /** * Enqueue scripts. * * @codeCoverageIgnore */ private function enqueue_scripts() { if ( ! isset( $this->assets['scripts'] ) || empty( $this->assets['scripts'] ) ) { return; } foreach ( $this->assets['scripts'] as $handle => $src ) { wp_enqueue_script( $handle, $src, null, rank_math()->version, true ); } } /** * Get tab content * * @codeCoverageIgnore * * @param array $tab Tab to get content for. * * @return string */ private function get_help_content( $tab ) { ob_start(); // If it is a function. if ( isset( $tab['content'] ) && is_callable( $tab['content'] ) ) { call_user_func( $tab['content'] ); } // If it is a file. if ( isset( $tab['view'] ) && $tab['view'] ) { require $tab['view']; } return ob_get_clean(); } /** * Localized data. */ private function add_localized_data() { if ( empty( $this->assets['json'] ) ) { return; } foreach ( $this->assets['json'] as $key => $value ) { Helper::add_json( $key, $value ); } Helper::add_json( 'settings', [ 'general' => Helper::get_settings( 'general' ), 'titles' => Helper::get_settings( 'titles' ), 'sitemap' => Helper::get_settings( 'sitemap' ), ] ); } /** * Display settings. */ private function display_settings() { rank_math()->admin->display_admin_header(); echo '
'; } }
Fatal error: Uncaught Error: Class "RankMath\Admin\Page" not found in /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/modules/status/class-status.php:76 Stack trace: #0 /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/module/class-base.php(86): RankMath\Status\Status->register_admin_page() #1 /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/modules/status/class-status.php(67): RankMath\Module\Base->__construct() #2 /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/module/class-manager.php(487): RankMath\Status\Status->__construct() #3 /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/module/class-manager.php(467): RankMath\Module\Manager->load_module('status', Object(RankMath\Module\Module)) #4 /htdocs/parierfacile.com/wp-includes/class-wp-hook.php(324): RankMath\Module\Manager->load_modules('') #5 /htdocs/parierfacile.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /htdocs/parierfacile.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /htdocs/parierfacile.com/wp-settings.php(559): do_action('plugins_loaded') #8 /htdocs/parierfacile.com/wp-config.php(83): require_once('/htdocs/parierf...') #9 /htdocs/parierfacile.com/wp-load.php(50): require_once('/htdocs/parierf...') #10 /htdocs/parierfacile.com/wp-blog-header.php(13): require_once('/htdocs/parierf...') #11 /htdocs/parierfacile.com/index.php(17): require('/htdocs/parierf...') #12 {main} thrown in /htdocs/parierfacile.com/wp-content/plugins/seo-by-rank-math/includes/modules/status/class-status.php on line 76