echo ''; exit; } /** * Activates an addon. * * @param string $addon_slug The addon to activate. * * @return array The output of the activation. */ public function activate_addon( $addon_slug ) { $output = []; try { $this->addon_activate_action->activate_addon( $addon_slug ); /* Translators: %s expands to the name of the addon. */ $output[] = \__( 'Addon activated.', 'wordpress-seo' ); } catch ( User_Cannot_Activate_Plugins_Exception $exception ) { $output[] = \__( 'You are not allowed to activate plugins.', 'wordpress-seo' ); } catch ( Addon_Activation_Error_Exception $exception ) { $output[] = \sprintf( /* Translators:%s expands to the error message. */ \__( 'Addon activation failed because of an error: %s.', 'wordpress-seo' ), $exception->getMessage() ); } return $output; } /** * Installs an addon. * * @param string $addon_slug The slug of the addon to install. * @param string $addon_download The download URL of the addon. * * @return array The installation success state and the output of the installation. */ public function install_addon( $addon_slug, $addon_download ) { $installed = false; $output = []; try { $installed = $this->addon_install_action->install_addon( $addon_slug, $addon_download ); } catch ( Addon_Already_Installed_Exception $exception ) { /* Translators: %s expands to the name of the addon. */ $output[] = \__( 'Addon installed.', 'wordpress-seo' ); $installed = true; } catch ( User_Cannot_Install_Plugins_Exception $exception ) { $output[] = \__( 'You are not allowed to install plugins.', 'wordpress-seo' ); } catch ( Addon_Installation_Error_Exception $exception ) { $output[] = \sprintf( /* Translators: %s expands to the error message. */ \__( 'Addon installation failed because of an error: %s.', 'wordpress-seo' ), $exception->getMessage() ); } return [ $installed, $output ]; } }
Fatal error: Uncaught Error: Class "WPSEO_Admin_Asset_SEO_Location" not found in /htdocs/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php:238 Stack trace: #0 /htdocs/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php(45): WPSEO_Admin_Asset_Manager::create_default_location() #1 /htdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(129): WPSEO_Admin_Asset_Manager->__construct() #2 /htdocs/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php(20): WPSEO_Admin_Bar_Menu->__construct() #3 /htdocs/wp-includes/class-wp-hook.php(324): wpseo_initialize_admin_bar('') #4 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /htdocs/wp-settings.php(726): do_action('wp_loaded') #7 /htdocs/wp-config.php(80): require_once('/htdocs/wp-sett...') #8 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #9 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #10 /htdocs/index.php(17): require('/htdocs/wp-blog...') #11 {main} thrown in /htdocs/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php on line 238