本文整理汇总了PHP中comment_form_title函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_form_title函数的具体用法?PHP comment_form_title怎么用?PHP comment_form_title使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了comment_form_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: next_comments_link
?>
</div>
<div class="comments-next"><?php
next_comments_link(__('Newer comments →', 'boc'));
?>
</div>
</nav>
</footer>
</section>
<?php
}
if (comments_open()) {
?>
<section id="respond">
<h3><?php
comment_form_title(__('Leave a Reply', 'boc'), __('Leave a Reply to %s', 'boc'));
?>
</h3>
<p class="cancel-comment-reply"><?php
cancel_comment_reply_link();
?>
</p>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p><?php
printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'boc'), wp_login_url(get_permalink()));
?>
</p>
<?php
} else {
示例2: comment_form_title
}
?>
<?php
}
?>
<?php
if (comments_open()) {
?>
<section id="respond">
<h3 id="comment-form-title" class="h2"><?php
comment_form_title('Discuss', 'Discuss %s');
?>
</h3>
<div id="cancel-comment-reply">
<p class="small"><?php
cancel_comment_reply_link();
?>
</p>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<div class="help">
<p>You must be <a href="<?php
示例3: comment_form_title
// Commment form
if (comments_open()) {
?>
<div id="respond-wrap" class="clearfix">
<div id="respond" class="<?php
if (is_user_logged_in()) {
echo "logged-in";
}
?>
clearfix">
<h3><?php
comment_form_title('Leave a comment (Gatorlink Required)', 'Leave a comment to %s (Gatorlink Required)');
?>
</h3>
<div class="cancel-comment-reply">
<?php
cancel_comment_reply_link();
?>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p>You must be <a href="<?php
echo wp_login_url(get_permalink());
?>
示例4: sh_comment_form
/**
* returns the formatted form of the comments
*
* @param array $args an array of arguments to be filtered
* @param int $post_id if form is called within the loop then post_id is optional
*
* @return string Return the comment form
*/
function sh_comment_form($args = array(), $post_id = null, $review = false)
{
if (null === $post_id) {
$post_id = get_the_ID();
} else {
$id = $post_id;
}
$commenter = wp_get_current_commenter();
$user = wp_get_current_user();
$user_identity = $user->exists() ? $user->display_name : '';
$args = wp_parse_args($args);
if (!isset($args['format'])) {
$args['format'] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml';
}
$req = get_option('require_name_email');
$aria_req = $req ? " aria-required='true'" : '';
$html5 = 'html5' === $args['format'];
$fields = array('author' => '<div class="col-md-6"><div class="form-group"><input id="author" placeholder="' . esc_html__('Name', SH_NAME) . '" class="form-control" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div></div>', 'email' => '<div class="col-md-6"><div class="form-group"><input id="email" placeholder="' . esc_html__('Email', SH_NAME) . '" class="form-control" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div></div>');
$required_text = sprintf(' ' . esc_html__('Required fields are marked %s', SH_NAME), '<span class="required">*</span>');
/**
* Filter the default comment form fields.
*
* @since 3.0.0
*
* @param array $fields The default comment fields.
*/
$fields = apply_filters('comment_form_default_fields', $fields);
$defaults = array('fields' => $fields, 'comment_field' => '<div class="col-md-12"><div class="form-group"><textarea id="comment" placeholder="' . esc_html__('Comment', SH_NAME) . '" class="form-control" name="comment" cols="45" rows="8" aria-required="true"></textarea></div></div>', 'must_log_in' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('You must be <a href="%s">logged in</a> to post a comment.', SH_NAME), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'logged_in_as' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', SH_NAME), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '<p class="col-md-12 col-sm-12">' . esc_html__('Your email address will not be published.', SH_NAME) . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', SH_NAME), ' <code>' . allowed_tags() . '</code>') . '</p>', 'id_form' => 'comments_form', 'id_submit' => 'submit', 'title_reply' => esc_html__('Leave a Reply', SH_NAME), 'title_reply_to' => esc_html__('Leave a Reply to %s', SH_NAME), 'cancel_reply_link' => esc_html__('Cancel reply', SH_NAME), 'label_submit' => esc_html__('Send', SH_NAME), 'format' => 'xhtml');
/**
* Filter the comment form default arguments.
*
* Use 'comment_form_default_fields' to filter the comment fields.
*
* @since 3.0.0
*
* @param array $defaults The default comment form arguments.
*/
$args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
?>
<?php
if (comments_open($post_id)) {
?>
<?php
/**
* Fires before the comment form.
*
* @since 3.0.0
*/
do_action('comment_form_before');
?>
<div id="respond" class="comment-respond">
<div class="post-header">
<div class="uppercase no-margin h2"><?php
comment_form_title($args['title_reply'], $args['title_reply_to']);
?>
<small><?php
cancel_comment_reply_link($args['cancel_reply_link']);
?>
</small></div>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<?php
echo blanaceTags($args['must_log_in']);
?>
<?php
/**
* Fires after the HTML-formatted 'must log in after' message in the comment form.
*
* @since 3.0.0
*/
do_action('comment_form_must_log_in_after');
?>
<?php
} else {
?>
<form action="<?php
echo site_url('/wp-comments-post.php');
?>
" method="post" id="<?php
echo esc_attr($args['id_form']);
?>
" class="row"<?php
echo esc_attr($html5) ? ' novalidate' : '';
?>
>
<?php
/**
* Fires at the top of the comment form, inside the <form> tag.
//.........这里部分代码省略.........
示例5: wp_list_comments
<ol>
<?php
wp_list_comments(array('callback' => 'sandbox_10_ping', 'type' => 'pings'));
?>
</ol>
</div><!-- #trackbacks-list .comments -->
<?php
}
}
if (comments_open()) {
?>
<div id="respond">
<h3><?php
comment_form_title(__('Post a Comment', 'sandbox'), __('Post a Comment to %s', 'sandbox'));
?>
</h3>
<div id="cancel-comment-reply"><small><?php
cancel_comment_reply_link();
?>
</small></div>
<?php
if (get_option('comment_registration') && !$user_ID) {
?>
<p id="login-req"><?php
printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'sandbox'), get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink());
?>
</p>
示例6: render
function render($params = array())
{
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
global $gantry;
$fparams = $this->_getParams($params);
$comment_layout_name = 'comment_' . $fparams->commentLayout;
$layout = $gantry->_getLayout($comment_layout_name);
$className = 'GantryLayout' . ucfirst($comment_layout_name);
// Do not delete these lines
ob_start();
if (post_password_required()) {
?>
<span class="alert"><?php
_ge('This post is password protected. Enter the password to view comments.');
?>
</span>
<?php
return ob_get_clean();
}
?>
<!-- You can start editing here. -->
<?php
if (have_comments()) {
?>
<br/>
<div class="comment-section">
<div class="contentheading"><?php
comments_number(_g('No Comments'), _g('1 Comment'), _g('% Comments'));
?>
</div>
</div>
<ol class="commentlist">
<?php
wp_list_comments(array('style' => 'ol', 'callback' => array($className, 'render_comment'), 'reply_text' => _g('Reply')));
?>
</ol>
<div class="rt-pagination nav">
<div class="alignleft"><?php
next_comments_link('« ' . _g('Older Comments'));
?>
</div>
<div class="alignright"><?php
previous_comments_link(_g('Newer Comments') . ' »');
?>
</div>
<div class="clear"></div>
</div>
<?php
} else {
// this is displayed if there are no comments so far
?>
<?php
if (comments_open()) {
?>
<!-- If comments are open, but there are no comments. -->
<?php
} else {
// comments are closed
?>
<!-- If comments are closed. -->
<div class="attention">
<div class="icon"><?php
_ge('Comments are closed.');
?>
</div>
</div>
<?php
}
?>
<?php
}
?>
<!-- RESPOND -->
<?php
if (comments_open()) {
?>
<div id="respond">
<div class="comment-section">
<div class="contentheading"><?php
comment_form_title(_g('Leave a Reply'), _g('Leave a Reply to %s'));
?>
</div>
</div>
<div class="cancel-comment-reply">
<small><?php
cancel_comment_reply_link();
?>
</small>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<div class="attention">
<div class="icon"><?php
_ge('You must be');
?>
<a
href="<?php
echo wp_login_url(get_permalink());
?>
//.........这里部分代码省略.........
示例7: do_action
<?php
do_action('comment_form_before');
?>
<div id="respond">
<h3 id="reply-title"><?php
comment_form_title($args['title_reply'], $args['title_reply_to']);
?>
<small><?php
cancel_comment_reply_link($args['cancel_reply_link']);
?>
</small></h3>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<?php
echo $args['must_log_in'];
?>
<?php
do_action('comment_form_must_log_in_after');
?>
<?php
} else {
?>
<form action="<?php
echo site_url('/wp-comments-post.php');
?>
" method="post" id="<?php
echo esc_attr($args['id_form']);
?>
">
示例8: comment_form_title
}
?>
<?php
}
// if no comments
?>
<?php
if (comments_open()) {
?>
<div id="respond">
<h3><?php
comment_form_title(__('Leave a Comment', 'framework'), __('Leave a Comment to %s', 'framework'));
?>
</h3>
<div class="cancel-comment-reply">
<?php
cancel_comment_reply_link();
?>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p><?php
printf(__('You must be %1$slogged in%2$s to post a comment.', 'framework'), '<a href="' . get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink()) . '">', '</a>');
?>
示例9: comment_form_title
if (!comments_open()) {
?>
<p class="nocomments">Comments are closed.</p>
<?php
}
}
?>
<?php
if (comments_open()) {
?>
<div id="respond">
<h3><?php
comment_form_title('Leave a Comment', 'Leave a Comment to %s');
?>
</h3>
<div id="cancel-comment-reply"><small><?php
cancel_comment_reply_link();
?>
</small></div>
<?php
if (get_option('comment_registration') && !$user_ID) {
?>
<p>You must be <a href="<?php
echo get_option('siteurl');
?>
/wp-login.php?redirect_to=<?php
the_permalink();
示例10: comment_form_title
?>
</p>
<?php
}
?>
<?php
}
}
?>
<?php
if ('open' == $post->comment_status) {
?>
<div id="respond">
<h3><?php
comment_form_title(__('Leave a Reply', 'xpress'), __('Leave a Reply for %s', 'xpress'));
?>
</h3>
<?php
if (function_exists('cancel_comment_reply_link')) {
?>
<div id="cancel-comment-reply">
<small><?php
cancel_comment_reply_link();
?>
</small>
</div>
<?php
}
?>
示例11: _e
<div class="alert alert-warning">
<?php
_e('Comments are closed.', 'conversion-insights-shared');
?>
</div>
</section><!-- /#comments -->
<?php
}
?>
<?php
if (comments_open()) {
?>
<section id="respond">
<h3><?php
comment_form_title(__('Leave a Reply', 'conversion-insights-shared'), __('Leave a Reply to %s', 'conversion-insights-shared'));
?>
</h3>
<p class="cancel-comment-reply"><?php
cancel_comment_reply_link();
?>
</p>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p><?php
printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'conversion-insights-shared'), wp_login_url(get_permalink()));
?>
</p>
<?php
} else {
示例12: oxy_comment_form
/**
* Customize comments form
*
*@return void
*@since 1.0
**/
function oxy_comment_form($args = array(), $post_id = null)
{
global $user_identity, $id;
if (null === $post_id) {
$post_id = $id;
} else {
$id = $post_id;
}
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = $req ? " aria-required='true'" : '';
$fields = array('author' => '<div class="control-group"><div class="controls"><input id="author" name="author" placeholder="' . __('your name', THEME_FRONT_TD) . '" type="text" class="input-xlarge" value="' . esc_attr($commenter['comment_author']) . '"/></div></div>', 'email' => '<div class="control-group"><div class="controls"><input id="email" name="email" placeholder="' . __('your email address', THEME_FRONT_TD) . '" type="text" class="input-xlarge" value="' . esc_attr($commenter['comment_author_email']) . '" /></div></div>', 'url' => '');
$required_text = sprintf(' ' . __('Required fields are marked %s', THEME_FRONT_TD), '<span class="required"><a>*</a></span>');
$defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<div class="control-group message"><div class="controls"><textarea id="comment" name="comment" placeholder="' . __('add your comment here ', THEME_FRONT_TD) . '" class="input-xxlarge" rows="3"></textarea></div></div>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', THEME_FRONT_TD), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'logged_in_as' => '<p class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', THEME_FRONT_TD), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '', 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Add your comment', THEME_FRONT_TD), 'title_reply_to' => __('Leave a Reply', THEME_FRONT_TD), 'cancel_reply_link' => __('Cancel reply', THEME_FRONT_TD), 'label_submit' => __('Add comment', THEME_FRONT_TD));
$args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
?>
<?php
if (comments_open()) {
?>
<?php
do_action('comment_form_before');
?>
<div class="comments-form" id="respond">
<h3 id="reply-title" class="comment-form small-screen-center"><?php
comment_form_title($args['title_reply'], $args['title_reply_to']);
?>
<small id="cancel-comment-reply"><?php
cancel_comment_reply_link('Cancel');
?>
</small></h3>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<?php
echo $args['must_log_in'];
?>
<?php
do_action('comment_form_must_log_in_after');
?>
<?php
} else {
?>
<form action="<?php
echo site_url('/wp-comments-post.php');
?>
" method="post" id="<?php
echo esc_attr($args['id_form']);
?>
">
<fieldset>
<?php
do_action('comment_form_top');
?>
<?php
if (is_user_logged_in()) {
?>
<?php
echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity);
?>
<?php
do_action('comment_form_logged_in_after', $commenter, $user_identity);
?>
<?php
} else {
?>
<?php
echo $args['comment_notes_before'];
?>
<?php
do_action('comment_form_before_fields');
foreach ((array) $args['fields'] as $name => $field) {
echo apply_filters('comment_form_field_' . $name, $field) . "\n";
}
do_action('comment_form_after_fields');
?>
<?php
}
?>
<?php
echo apply_filters('comment_form_field_comment', $args['comment_field']);
?>
<?php
echo $args['comment_notes_after'];
?>
<div class="control-group">
<div class="controls small-screen-center">
<button name="submit" type="submit" class="btn btn-primary" id="<?php
echo esc_attr($args['id_submit']);
?>
" value="<?php
echo esc_attr($args['label_submit']);
?>
"><?php
echo esc_attr($args['label_submit']);
//.........这里部分代码省略.........
示例13: comment_form_title
<?php
if (comments_open()) {
?>
<div id="gbook">
<div id="respond" class="panel panel-default">
<h3><?php
comment_form_title(__('LEAVE A COMMENT', 'properweb'));
?>
</h3>
<div id="cancel-comment-reply">
<small><?php
cancel_comment_reply_link();
?>
</small>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p><?php
printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(get_permalink()));
?>
</p>
<?php
} else {
?>
<?php
示例14: comment_form_title
}
?>
<?php
}
?>
<?php
if (comments_open()) {
?>
<div id="respond">
<h3><?php
comment_form_title(theme_locals("leave_a_reply"));
?>
</h3>
<div class="cancel-comment-reply">
<small><?php
cancel_comment_reply_link();
?>
</small>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<p><?php
echo theme_locals("you_must_be");
示例15: comment_form_title
}
?>
<?php
}
?>
<?php
if (comments_open()) {
?>
<section id="respond" class="respond-form">
<h3 id="comment-form-title" class="h2"><?php
comment_form_title(__('Leave a Reply', 'bonestheme'), __('Leave a Reply to %s', 'bonestheme'));
?>
</h3>
<div id="cancel-comment-reply">
<p class="small"><?php
cancel_comment_reply_link();
?>
</p>
</div>
<?php
if (get_option('comment_registration') && !is_user_logged_in()) {
?>
<div class="alert alert-help">
<p><?php