deprecated_constructor_run

ACTION wp-includes\functions.php (ligne 5632) github
Fires when a deprecated constructor is called.

Paramètres

Entrée :
$class_name, $version, $parent_class
Sortie :
@param string $class_name   The class containing the deprecated constructor.
@param string $version      The version of WordPress that deprecated the function.
@param string $parent_class The parent class calling the deprecated constructor.

Utilisation

// Ajouter une fonction au hook action 'deprecated_constructor_run'
add_action('deprecated_constructor_run', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($class_name, $version, $parent_class) {
    // Votre code ici
    error_log('Hook deprecated_constructor_run déclenché');
}

Actualités

Chargement des actualités...