Filters the post parent -- used to check for and prevent hierarchy loops.
$post_parent, $post_id, $new_postarr, $postarr
Sortie :
@param int $post_parent Post parent ID. @param int $post_id Post ID. @param array $new_postarr Array of parsed post data. @param array $postarr Array of sanitized, but otherwise unmodified post data.
// Modifier la valeur avec le filtre 'wp_insert_post_parent'
add_filter('wp_insert_post_parent', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($post_parent) {
// Modifier la valeur
return $post_parent;
}
Chargement des actualités...