Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




comment_form_title [ WordPress Function ]

comment_form_title ( $noreplytext = false, $replytext = false, $linktoparent = true )
Parameters:
  • (string) $noreplytext Optional. Text to display when not replying to a comment.
  • (string) $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to.
  • (string) $linktoparent Optional. Boolean to control making the author's name a link to their comment.
Defined at:



Display text based on comment reply status. Only affects users with Javascript disabled.

Source


<?php
function comment_form_title$noreplytext false$replytext false$linktoparent true ) {
    global 
$comment;

    if ( 
false === $noreplytext $noreplytext __'Leave a Reply' );
    if ( 
false === $replytext $replytext __'Leave a Reply to %s' );

    
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;

    if ( 
== $replytoid )
        echo 
$noreplytext;
    else {
        
$comment get_comment($replytoid);
        
$author = ( $linktoparent ) ? '<a href="#comment-' get_comment_ID() . '">' get_comment_author() . '</a>' get_comment_author();
        
printf$replytext$author );
    }
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics