{$field}_pre

FILTER wp-includes\post.php (ligne 3196) github
Filters the value of a specific post field before saving. Only applied to post fields with a name which is *not* prefixed with `post_`. The dynamic portion of the hook name, `$field`, refers to the post field name. Possible filter names include:  - `ID_pre`  - `comment_status_pre`  - `ping_status_pre`  - `to_ping_pre`  - `pinged_pre`  - `guid_pre`  - `menu_order_pre`  - `comment_count_pre`

Paramètres

Entrée :
$value
Sortie :
@param mixed $value Value of the post field.

Utilisation

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

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

Actualités

Chargement des actualités...