Action hook 'mu_plugin_loaded'

in WP Core File wp-settings.php at line 466

View Source

mu_plugin_loaded

Action Hook
Description
Fires once a single must-use plugin has loaded.

Hook Information

File Location wp-settings.php View on GitHub
Hook Type Action
Line Number 466

Hook Parameters

Type Name Description
string $mu_plugin Full path to the plugin's main file.

Usage Examples

Basic Usage
<?php
// Hook into mu_plugin_loaded
add_action('mu_plugin_loaded', 'my_custom_function', 10, 1);

function my_custom_function($mu_plugin) {
    // Your custom code here
}

Source Code Context

wp-settings.php:466 - How this hook is used in WordPress core
<?php
 461  	 *
 462  	 * @since 5.1.0
 463  	 *
 464  	 * @param string $mu_plugin Full path to the plugin's main file.
 465  	 */
 466  	do_action( 'mu_plugin_loaded', $mu_plugin );
 467  }
 468  unset( $mu_plugin, $_wp_plugin_file );
 469  
 470  // Load network activated plugins.
 471  if ( is_multisite() ) {

PHP Documentation

<?php
/**
	 * Fires once a single must-use plugin has loaded.
	 *
	 * @since 5.1.0
	 *
	 * @param string $mu_plugin Full path to the plugin's main file.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-settings.php
Related Hooks

Related hooks will be displayed here in future updates.