wp_get_active_and_valid_plugins example

wp_start_scraping_edited_file_errors();

// Register the default theme directory root. register_theme_directory( get_theme_root() );

if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) {
    // Handle users requesting a recovery mode link and initiating recovery mode.     wp_recovery_mode()->initialize();
}

// Load active plugins. foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    wp_register_plugin_realpath( $plugin );

    $_wp_plugin_file = $plugin;
    include_once $plugin;
    $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
    /** * Fires once a single activated plugin has loaded. * * @since 5.1.0 * * @param string $plugin Full path to the plugin's main file. */
Home | Imprint | This part of the site doesn't use cookies.