. */ private function getSettings() { $settings = aioseo()->options->all(); array_walk_recursive( $settings, function( &$v ) { if ( is_string( $v ) && strpos( $v, '"' ) !== false ) { $v = str_replace( '"', '\"', $v ); } }); $settings = $this->filterPrivateSettings( $settings ); $internal = aioseo()->internalOptions->all(); array_walk_recursive( $internal, function( &$v ) { if ( is_string( $v ) && strpos( $v, '"' ) !== false ) { $v = str_replace( '"', '\"', $v ); } }); return [ 'options' => $settings, 'internal' => $internal ]; } /** * Return a list of active plugins. * * @since 4.0.0 * * @return array An array of active plugin data. */ private function getActivePlugins() { if ( ! function_exists( 'get_plugins' ) ) { include ABSPATH . '/wp-admin/includes/plugin.php'; } $active = get_option( 'active_plugins', [] ); $plugins = array_intersect_key( get_plugins(), array_flip( $active ) ); return array_map( static function ( $plugin ) { if ( isset( $plugin['Version'] ) ) { return $plugin['Version']; } return 'Not Set'; }, $plugins ); } /** * Generate a random start date for usage tracking. * * @since 4.0.0 * * @return integer The randomized start date. */ private function generateStartDate() { $tracking = [ 'days' => wp_rand( 0, 6 ) * DAY_IN_SECONDS, 'hours' => wp_rand( 0, 23 ) * HOUR_IN_SECONDS, 'minutes' => wp_rand( 0, 23 ) * HOUR_IN_SECONDS, 'seconds' => wp_rand( 0, 59 ) ]; return strtotime( 'next sunday' ) + array_sum( $tracking ); } /** * Anonimizes or obfuscates the value of certain settings. * * @since 4.3.2 * * @param array $settings The settings. * @return array The altered settings. */ private function filterPrivateSettings( $settings ) { if ( ! empty( $settings['advanced']['openAiKey'] ) ) { $settings['advanced']['openAiKey'] = true; } if ( ! empty( $settings['localBusiness']['maps']['apiKey'] ) ) { $settings['localBusiness']['maps']['apiKey'] = true; } return $settings; } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Admin\Usage" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Lite/Admin/Usage.php:16 Stack trace: #0 /htdocs/wp-content/plugins/all-in-one-seo-pack/vendor/composer/ClassLoader.php(576): include() #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/htdocs/wp-cont...') #2 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(292): Composer\Autoload\ClassLoader->loadClass('AIOSEO\\Plugin\\L...') #3 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #4 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #5 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #6 /htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(96): aioseo() #7 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #8 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #9 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #10 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #11 /htdocs/index.php(17): require('/htdocs/wp-blog...') #12 {main} thrown in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Lite/Admin/Usage.php on line 16