WordPress.org

Make WordPress Core

Ticket #41346: 41346-2.patch

File 41346-2.patch, 1.5 KB (added by Rarst, 10 months ago)

Inline documentation and hooks for mu and network plugins as well.

  • src/wp-settings.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    276276// Load must-use plugins.
    277277foreach ( wp_get_mu_plugins() as $mu_plugin ) {
    278278        include_once( $mu_plugin );
     279
     280        /**
     281         * Fires once a single must-use plugin have loaded.
     282         *
     283         * @since 5.1.0
     284         *
     285         * @param string $mu_plugin Loaded plugin's basename.
     286         */
     287        do_action( 'mu_plugin_loaded', $mu_plugin );
    279288}
    280289unset( $mu_plugin );
    281290
     
    284293        foreach ( wp_get_active_network_plugins() as $network_plugin ) {
    285294                wp_register_plugin_realpath( $network_plugin );
    286295                include_once( $network_plugin );
     296
     297                /**
     298                 * Fires once a single network-activated plugin have loaded.
     299                 *
     300                 * @since 5.1.0
     301                 *
     302                 * @param string $network_plugin Loaded plugin's basename.
     303                 */
     304                do_action( 'network_plugin_loaded', $network_plugin );
    287305        }
    288306        unset( $network_plugin );
    289307}
     
    322340foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    323341        wp_register_plugin_realpath( $plugin );
    324342        include_once( $plugin );
     343
     344        /**
     345         * Fires once a single activated plugin have loaded.
     346         *
     347         * @since 5.1.0
     348         *
     349         * @param string $plugin Loaded plugin's basename.
     350         */
     351        do_action( 'plugin_loaded', $plugin );
    325352}
    326353unset( $plugin );
    327354