set_screen_option_{$option}

FILTER wp-admin\includes\misc.php (ligne 792) github
Filters a screen option value before it is set. The dynamic portion of the hook name, `$option`, refers to the option name. Returning false from the filter will skip saving the current option.

Paramètres

Entrée :
$screen_option, $option, $value
Sortie :
@param mixed   $screen_option The value to save instead of the option value.
@param string  $option        The option name.
@param int     $value         The option value.

Utilisation

// Modifier la valeur avec le filtre 'set_screen_option_{$option}'
add_filter('set_screen_option_{$option}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($screen_option) {
    // Modifier la valeur
    return $screen_option;
}

Actualités

Chargement des actualités...