set-screen-option

FILTER wp-admin\includes\misc.php (ligne 773) github
Filters a screen option value before it is set. The filter can also be used to modify non-standard `[items]_per_page` settings. See the parent function for a full list of standard options. 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'
add_filter('set-screen-option', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...