plugin_loaded
Action HookDescription
Fires once a single activated plugin has loaded.Hook Information
File Location |
wp-settings.php
View on GitHub
|
Hook Type | Action |
Line Number | 555 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$plugin
|
Full path to the plugin's main file. |
Usage Examples
Basic Usage
<?php
// Hook into plugin_loaded
add_action('plugin_loaded', 'my_custom_function', 10, 1);
function my_custom_function($plugin) {
// Your custom code here
}
Source Code Context
wp-settings.php:555
- How this hook is used in WordPress core
<?php
550 *
551 * @since 5.1.0
552 *
553 * @param string $plugin Full path to the plugin's main file.
554 */
555 do_action( 'plugin_loaded', $plugin );
556 }
557 unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain );
558
559 // Load pluggable functions.
560 require ABSPATH . WPINC . '/pluggable.php';
PHP Documentation
<?php
/**
* Fires once a single activated plugin has loaded.
*
* @since 5.1.0
*
* @param string $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.