do_action( 'plugin_loaded', string $plugin )

Fires once a single activated plugin has loaded.


Parameters Parameters

$plugin

(string) Full path to the plugin's main file.


Top ↑

Source Source

File: wp-settings.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Mahdi Ebrahimi

    this plugin is loaded .

    add_action( 'plugin_loaded', array( 'wpdocs_class_name', 'instance' ) );
    
    class wpdocs_class_name {
         
        private function __construct() {
            self::init();
        }
         
        public static function instance() {
            static $instance = null;
    
            if ( is_null( $instance ) ) {
                    $instance = new wpdocs_class_name;
            }
    
            return $instance
        }
         
        public function init() {
            wp_die( __( 'Hello World!', 'text-domain' ) );
        }
         
    }

You must log in before being able to contribute a note or feedback.