get_edit_post_link

FUNCTION wp-includes\link-template.php (ligne 1426) github
Filters the URL used for a post preview.

Paramètres

Entrée :
$post = 0, $context = 'display'
Sortie :
@param string  $preview_link URL used for the post preview.
@param WP_Post $post         Post object.
@param int|WP_Post $post    Optional. Post ID or post object. Default is the global `$post`.
@param string      $context Optional. How to output the '&' character. Default '&'.
@return string|null The edit post link for the given post. Null if the post type does not exist

Utilisation

// Utilisation de la fonction get_edit_post_link
$result = get_edit_post_link($post = 0, $context = 'display');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...