• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_get_current_commenter函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_get_current_commenter函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_get_current_commenter函数的具体用法?PHP wp_get_current_commenter怎么用?PHP wp_get_current_commenter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_get_current_commenter函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: adventure_tours_comment_form_renderer

 /**
  * Comment form renderer function.
  *
  * @return void
  */
 function adventure_tours_comment_form_renderer()
 {
     $commenter = wp_get_current_commenter();
     $fields = array('author' => '<div class="row"><div class="col-sm-4">' . '<label for="author">' . esc_html__('Name', 'adventure-tours') . '*</label>' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" />' . '</div>', 'email' => '<div class="col-sm-4">' . '<label for="email">' . esc_html__('Email', 'adventure-tours') . '*</label>' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" />' . '</div>', 'url' => '<div class="col-sm-4">' . '<label for="url">' . esc_html__('Website', 'adventure-tours') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />' . '</div></div>');
     $args = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_notes_before' => '', 'comment_notes_after' => '', 'comment_field' => '<label for="comment">' . esc_html__('Comment', 'adventure-tours') . '</label><textarea id="comment" name="comment"></textarea>', 'label_submit' => '', 'cancel_reply_link' => '<i class="fa fa-times"></i>');
     ob_start();
     comment_form($args);
     $formHtml = '<div class="comments__form">' . ob_get_clean() . '</div>';
     wp_enqueue_script('comment-reply');
     echo str_replace('<input name="submit" type="submit" id="submit" class="submit" value="" />', '<button type="submit" class="atbtn"><i class="atbtn__icon fa fa-comment"></i>' . esc_html__('Post Comment', 'adventure-tours') . '</button>', $formHtml);
 }
开发者ID:j-kenneth,项目名称:Expeero,代码行数:16,代码来源:comments.php


示例2: bootstrap3_comment_form_fields

function bootstrap3_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $html5 = current_theme_supports('html5', 'comment-form') ? 1 : 0;
    $fields = array('author' => '<div class="form-group comment-form-author">' . '<label for="author">' . __('Name') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input class="form-control" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div>', 'email' => '<div class="form-group comment-form-email"><label for="email">' . __('Email') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input class="form-control" id="email" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div>', 'url' => '<div class="form-group comment-form-url"><label for="url">' . __('Website') . '</label> ' . '<input class="form-control" id="url" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></div>');
    return $fields;
}
开发者ID:biirdy,项目名称:www,代码行数:9,代码来源:bootstrap-comments.php


示例3: ultra_filter_comment_fields

 /**
  * Filter the comment fields to get more custom HTML.
  * @param $fields
  */
 function ultra_filter_comment_fields($fields)
 {
     $commenter = wp_get_current_commenter();
     $req = get_option('require_name_email');
     $aria_req = $req ? " aria-required='true'" : '';
     $html_req = $req ? " required='required'" : '';
     $html5 = true;
     $fields['author'] = '<div class="comment-form-author"><input id="author" name="author" placeholder="' . esc_attr__('Name *', 'ultra') . '" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . $html_req . ' /></div>';
     $fields['email'] = '<div class="comment-form-email"><input id="email" name="email" placeholder="' . esc_attr__('Email *', 'ultra') . '" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-describedby="email-notes"' . $aria_req . $html_req . ' /></div>';
     $fields['url'] = '<div class="comment-form-url"><input id="url" name="url" placeholder="' . esc_attr__('Website', 'ultra') . '" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></div>';
     return $fields;
 }
开发者ID:conao,项目名称:huso-theme,代码行数:16,代码来源:comments.php


示例4: zacklive_comment_form

 function zacklive_comment_form($args)
 {
     $commenter = wp_get_current_commenter();
     $req = get_option('require_name_email');
     $args['fields'] = array('author' => '
         <div class="comment-form-author form-group">
             <input id="author" name="author" class="form-control" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . ($req ? " aria-required='true'" : '') . ' placeholder="' . __('Your Name', 'zacklive') . ($req ? '*' : '') . '" />
         </div>
     ', 'email' => '
         <div class="comment-form-email form-group">
             <input id="email" name="email" class="form-control" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . ($req ? " aria-required='true'" : '') . ' placeholder="' . __('Your Email', 'zacklive') . ($req ? '*' : '') . '" />
         </div>
     ', 'url' => '
         <div class="comment-form-url last form-group">
             <input id="url" name="url" class="form-control" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" placeholder="' . __('Your Website', 'zacklive') . '" />
         </div>
     ');
     $args['comment_notes_before'] = "";
     $args['comment_notes_after'] = '';
     $args['label_submit'] = "Submit";
     $args['comment_field'] = '
     <div class="comment-form-comment form-group">
         <textarea id="comment" name="comment" class="form-control" cols="45" rows="8" aria-required="true" placeholder="' . __('Your Comment Here ...', 'zacklive') . '"></textarea>
     </div>
 ';
     return $args;
 }
开发者ID:Red4x,项目名称:zacklive,代码行数:27,代码来源:zacklive.php


示例5: bootswatch_comment_form_fields

/**
 * Alter comment form fields `Author`, `Email` and `Website`
 *
 * @param  Array $fields Fields.
 * @return Array         Fields altered.
 */
function bootswatch_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $required = $req ? 'required' : '';
    $aria_required = $req ? 'true' : '';
    $div_tpl = '<div class="form-group comment-form-{{field}}">{{label}} {{input}}</div>';
    $label_tpl = '<label for="{{field}}" class="col-sm-2 control-label">{{label}}{{required}}</label>';
    $input_tpl = '<div class="col-sm-10"><input{{param}}></div>';
    $fields_parameters = array('author' => array('label' => __('Name'), 'type' => 'text', 'value' => esc_attr($commenter['comment_author']), 'required' => $required, 'aria-required' => $aria_required, 'size' => 30, 'maxlength' => 245), 'email' => array('label' => __('Email'), 'type' => 'email', 'value' => esc_attr($commenter['comment_author_email']), 'required' => $required, 'aria-required' => $aria_required, 'size' => 30, 'maxlength' => 100, 'describedby' => 'email-notes'), 'url' => array('label' => __('Website'), 'type' => 'url', 'value' => esc_attr($commenter['comment_author_url']), 'size' => 30, 'maxlength' => 200));
    foreach ($fields_parameters as $field => $parameter) {
        // Add some defaults to field.
        $parameter += array('id' => $field, 'name' => $field, 'class' => 'form-control');
        // Build <input>.
        $input = $input_tpl;
        foreach (array('name', 'id', 'type', 'value', 'required', 'aria-required', 'size', 'maxlength', 'describedby', 'class') as $p) {
            if (!empty($parameter[$p])) {
                $input = str_replace('{{param}}', sprintf(' %s="%s"{{param}}', $p, $parameter[$p]), $input);
            }
        }
        $input = str_replace('{{param}}', '', $input);
        // Build <label>.
        $label = $label_tpl;
        $label = str_replace('{{label}}', $parameter['label'], $label);
        $label = str_replace('{{required}}', !empty($parameter['required']) ? ' <span class="required">*</span>' : '', $label);
        // Build field <div>.
        $div = $div_tpl;
        $div = str_replace(array('{{input}}', '{{label}}', '{{field}}'), array($input, $label, $field), $div);
        // Add field to $fields array.
        $fields[$field] = $div;
    }
    return $fields;
}
开发者ID:kadimi,项目名称:bootswatch,代码行数:39,代码来源:comment-form.php


示例6: comments_template

function comments_template( $file = '/comments.php' ) {
	global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity;

	if ( ! (is_single() || is_page() || $withcomments) )
		return;

	$req = get_settings('require_name_email');
	$commenter = wp_get_current_commenter();
	extract($commenter);

	// TODO: Use API instead of SELECTs.
	if ( empty($comment_author) ) {
		$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
	} else {
		$author_db = $wpdb->escape($comment_author);
		$email_db  = $wpdb->escape($comment_author_email);
		$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND ( comment_approved = '1' OR ( comment_author = '$author_db' AND comment_author_email = '$email_db' AND comment_approved = '0' ) ) ORDER BY comment_date");
	}

	define('COMMENTS_TEMPLATE', true);
	$include = apply_filters('comments_template', TEMPLATEPATH . $file );
	if ( file_exists( $include ) )
		require( $include );
	else
		require( ABSPATH . 'wp-content/themes/default/comments.php');
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:26,代码来源:comment-functions.php


示例7: lrl_custom_form_filters

function lrl_custom_form_filters($args = array(), $post_id = null)
{
    global $id;
    $options = get_option('bootstrap_theme');
    $custom_comment_message = isset($options['comment_form_text']) ? $options['comment_form_text'] : null;
    if (null === $post_id) {
        $post_id = $id;
    } else {
        $id = $post_id;
    }
    $commenter = wp_get_current_commenter();
    $user = wp_get_current_user();
    $user_identity = $user->exists() ? $user->display_name : '';
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $fields = array('author' => '
			<div class="comment-form-author clearfix">' . ' ' . '<input id="author" name="author" placeholder="Enter your Name..." type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' />
			</div>', 'email' => '
			<div class="comment-form-email clearfix">
			' . '<input id="email" name="email" placeholder="Enter your Email Address..." type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' />
			</div>', 'url' => '
			<div class="comment-form-url clearfix">
			' . '<input id="url" name="url" placeholder="Enter your Website..." type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />
			</div>');
    $required_text = sprintf(' ' . __('Required fields are marked %s', 'bootstrap'), '<span class="required">*</span>');
    $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>', '', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'bootstrap'), 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>', 'bootstrap'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => null, 'comment_notes_after' => null, 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => sprintf(__('Have a Comment?', 'bootstrap'), apply_filters('lrl_comment_form_message', $custom_comment_message)), 'title_reply_to' => __('Leave a Reply to %s', 'bootstrap'), 'cancel_reply_link' => __('Cancel', 'bootstrap'), 'label_submit' => __('Submit Comment', 'bootstrap'));
    return $defaults;
}
开发者ID:scotlanddig,项目名称:bootstrap_basic,代码行数:28,代码来源:comments.php


示例8: momtaz_comment_form_args

/**
 * Filters the WordPress comment_form() function that was added in WordPress 3.0.  This allows
 * the theme to preserve some backwards compatibility with its old comment form.  It also allows
 * users to build custom comment forms by filtering 'comment_form_defaults' in their child theme.
 *
 * @since 1.0
 * @param array $defaults The default comment form arguments.
 * @return array $args The filtered comment form arguments.
 */
function momtaz_comment_form_args($defaults)
{
    $args = array();
    // Remove the notes after the form.
    $args['comment_notes_after'] = '';
    // Get current commenter's name, email, and URL.
    $commenter = wp_get_current_commenter();
    // Is the "Name" and "Email" fields are required?
    $required = (bool) get_option('require_name_email');
    /*** Comment Form Fields **************************************************/
    $args['fields'] = Nmwdhj\create_elements(array('author' => array('atts' => array('required' => (bool) $required), 'value' => $commenter['comment_author'], 'label' => __('Name', 'momtaz'), 'type' => 'input_text', 'nid' => 'author'), 'email' => array('atts' => array('required' => (bool) $required), 'value' => $commenter['comment_author_email'], 'label' => __('Email', 'momtaz'), 'type' => 'input_email', 'nid' => 'email'), 'url' => array('value' => $commenter['comment_author_url'], 'label' => __('Website', 'momtaz'), 'type' => 'input_url', 'nid' => 'url')));
    // Shared
    foreach ($args['fields'] as $k => $e) {
        if ($e->get_attr('required')) {
            $label = $e->get_option('label');
            if (!empty($label)) {
                $label .= '<span class="required">*</span>';
                $e->set_option('label', $label);
            }
        }
        $e->set_options(array('wrapper_atts' => array('class' => 'form-section layout-columned'), 'label_atts' => array('class' => 'form-label'), 'wrapper' => 'div'), true);
        $e->set_atts(array('class' => 'form-field regular-textbox', 'size' => 40));
        $args['fields'][$k] = $e->get_output();
    }
    // Comment Text
    $args['comment_field'] = Nmwdhj\create_element(array('type' => 'textarea', 'nid' => 'comment', 'atts' => array('class' => 'form-field large-textbox', 'required' => true, 'rows' => 10, 'cols' => 60), 'wrapper' => 'div', 'wrapper_atts' => array('class' => 'form-section layout-full')))->get_output();
    $args = wp_parse_args($args, $defaults);
    return $args;
}
开发者ID:mastinoz,项目名称:Momtaz-Framework,代码行数:38,代码来源:comments.php


示例9: progo_bootstrap3_comment_form_fields

function progo_bootstrap3_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $required = $req ? ' aria-required="true" required ' : '';
    $fields = array('author' => '<div class="form-group comment-form-author">' . '<label for="author">' . __('Name', 'pgb') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<div class="input-group"><span class="input-group-addon glyphicon glyphicon-user"></span><input class="form-control" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $required . ' /></div></div>', 'email' => '<div class="form-group comment-form-email"><label for="email">' . __('Email', 'pgb') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<div class="input-group"><span class="input-group-addon glyphicon glyphicon-envelope"></span><input class="form-control" id="email" name="email" type="email" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $required . ' /></div></div>', 'url' => '<div class="form-group comment-form-url"><label for="url">' . __('Website', 'pgb') . '</label> ' . '<div class="input-group"><span class="input-group-addon glyphicon glyphicon-globe"></span><input class="form-control" id="url" name="url" type="url" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></div></div>');
    return $fields;
}
开发者ID:nlk-sites,项目名称:nectar7,代码行数:8,代码来源:pgb-filters.php


示例10: ep_comment_fields

function ep_comment_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $fields['author'] = "<div class=\"input-text\"><input name=\"author\" value=\"" . esc_attr($commenter['comment_author']) . "\" type=\"text\" tabindex=\"1\"><span class=\"label\">" . __('Your Name', 'epicomedia') . "</span><span class=\"graylabel\">" . __('Your Name', 'epicomedia') . "</span></div>";
    $fields['email'] = "<div class=\"input-text\"><input name=\"email\" value=\"" . esc_attr($commenter['comment_author_email']) . "\" type=\"text\" tabindex=\"2\"><span class=\"label\">" . __('Email', 'epicomedia') . "</span><span class=\"graylabel\">" . __('Email', 'epicomedia') . "</span></div>";
    $fields['url'] = "<div  class=\"input-text\"><input name=\"url\" value=\"" . esc_attr($commenter['comment_author_url']) . "\" type=\"text\" tabindex=\"3\"><span class=\"label\">" . __('WEBSITE', 'epicomedia') . "</span><span class=\"graylabel\">" . __('WEBSITE', 'epicomedia') . "</span></div>";
    return $fields;
}
开发者ID:rmilano24,项目名称:moto,代码行数:8,代码来源:comments.php


示例11: mixed_custom_comment_fields

function mixed_custom_comment_fields()
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $fields = array('author' => '<p>' . '<input id="author" name="author" type="text" class="form-control" placeholder="Name ( required )" value="' . esc_attr($commenter['comment_author']) . '" ' . $aria_req . ' />' . '</p>', 'email' => '<p>' . '<input id="email" name="email" type="text" class="form-control" placeholder="Email ( required )" value="' . esc_attr($commenter['comment_author_email']) . '" ' . $aria_req . ' />' . '</p>', 'url' => '<p>' . '<input id="url" name="url" type="text" class="form-control" placeholder="Website" value="' . esc_attr($commenter['comment_author_url']) . '" />' . '</p>');
    return $fields;
}
开发者ID:un1coin,项目名称:ovn-space,代码行数:8,代码来源:functions.php


示例12: aventurine_comment_fields

/**
 * Unset the website field, Remove the required *
 */
function aventurine_comment_fields($fields)
{
    $commenter = wp_get_current_commenter();
    unset($fields['url']);
    $fields['author'] = sprintf('<p class="comment-form-author"><label for="author">%1$s</label> <input id="author" name="author" type="text" value="%2$s" size="30" aria-required="true" placeholder="%1$s" /></p>', __('Name', 'aventurine'), esc_attr($commenter['comment_author']));
    $fields['email'] = sprintf('<p class="comment-form-email"><label for="email">%1$s</label><input id="email" name="email" type="email" value="%2$s" size="30" aria-required="true" placeholder="%1$s" /></p>', __('Email', 'aventurine'), esc_attr($commenter['comment_author_email']));
    return $fields;
}
开发者ID:Pellmellism,项目名称:aventurine,代码行数:11,代码来源:extras.php


示例13: wolf_change_comment_form_defaults

    /**
     * Hook to set the email input of the comment form as email type
     * (usefull for tablet and mobile)
     *
     * @param array $default
     * @return array $default
     */
    function wolf_change_comment_form_defaults($default)
    {
        $commenter = wp_get_current_commenter();
        $req = get_option('require_name_email');
        $aria_req = $req ? " aria-required='true'" : '';
        $default['fields']['email'] = '<p class="comment-form-email">
		<label for="email">' . __('Email', 'wolf') . ' ' . ($req ? '<span class="required">*</span>' : '') . '</label><input id="email" name="email" type="email" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>';
        return $default;
    }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:16,代码来源:filters.php


示例14: modify_comment_form_fields

 function modify_comment_form_fields($fields)
 {
     $commenter = wp_get_current_commenter();
     $req = get_option('require_name_email');
     $fields['author'] = '<p class="inputrow"><input type="text" name="author" id="author" value="' . esc_attr($commenter['comment_author']) . '" placeholder="' . __("Name", "Vela") . ' (' . __('Required', 'Vela') . ')" size="22" tabindex="1"' . ($req ? ' required' : '') . ' /></p>';
     $fields['email'] = '<p class="inputrow"><input type="text" name="email" id="email" value="' . sanitize_email($commenter['comment_author_email']) . '" placeholder="' . __("Email", "Vela") . ' (' . __('Required', 'Vela') . ')" size="22" tabindex="2"' . ($req ? ' required' : '') . '  /></p>';
     $fields['url'] = '<p class="inputrow"><input type="text" name="url" id="url" value="' . esc_url($commenter['comment_author_url']) . '" placeholder="' . __("Website", "Vela") . '" size="22" tabindex="3" /></p>';
     return $fields;
 }
开发者ID:de190909,项目名称:WPTest,代码行数:9,代码来源:comments.php


示例15: flatter_comment_form_fields

function flatter_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $html5 = current_theme_supports('html5', 'comment-form') ? 1 : 0;
    $fields = array('author' => '<div class="col-sm-12 form-group comment-form-author">' . '<input class="form-control" id="author" name="author" type="text" placeholder="* Full Name" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div>', 'email' => '<div class="col-sm-12 form-group comment-form-email">' . '<input class="form-control" id="email" placeholder="* Email Address" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div>', 'url' => '<div class=" col-sm-12 form-group comment-form-url">' . '<input class="form-control" id="url" placeholder="Website" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></div>');
    return $fields;
}
开发者ID:drukaman,项目名称:pioneerweb,代码行数:9,代码来源:extras.php


示例16: comment_form_fields

 /**
  * Modify comment form default fields
  */
 public function comment_form_fields($fields)
 {
     $req = get_option('require_name_email');
     $html5 = 'html5';
     $commenter = wp_get_current_commenter();
     $aria_req = $req ? " aria-required='true'" : '';
     $fields = array('author' => View::make('blocks/comment_form_fields/author', array('placeholder' => __('Name', 'photolab') . ($req ? '*' : ''), 'value' => esc_attr($commenter['comment_author']), 'aria_req' => $aria_req)), 'email' => View::make('blocks/comment_form_fields/email', array('type' => $html5 ? 'type="email"' : 'type="text"', 'placeholder' => __('Email', 'photolab') . ($req ? '*' : ''), 'value' => esc_attr($commenter['comment_author_email']), 'aria_req' => $aria_req)), 'url' => View::make('blocks/comment_form_fields/author', array('type' => $html5 ? 'type="url"' : 'type="text"', 'placeholder' => __('Website', 'photolab'), 'value' => esc_attr($commenter['comment_author_url']), 'aria_req' => $aria_req)));
     return $fields;
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:12,代码来源:extras.php


示例17: bootstrap3_comment_form_fields

function bootstrap3_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $html5 = current_theme_supports('html5', 'comment-form') ? 1 : 0;
    $fields = array('author' => '<div class="form-group comment-form-author required"><input required class="form-control" id="author" name="author" type="text" placeholder="Dit navn" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div>', 'email' => '<div class="form-group comment-form-email required"><input required class="form-control" id="email" placeholder="Din e-mail (bliver ikke vist)" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div>', 'url' => '<div class="form-group comment-form-url"><input class="form-control" id="url" placeholder="Evt. Website" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></div>');
    return $fields;
}
开发者ID:TorrentoKage,项目名称:sportscamp.dk,代码行数:9,代码来源:functions.php


示例18: bp_dtheme_comment_form

 /**
  * Applies BuddyPress customisations to the post comment form.
  *
  * @param array $default_labels The default options for strings, fields etc in the form
  * @see comment_form()
  * @since BuddyPress (1.5)
  */
 function bp_dtheme_comment_form($default_labels)
 {
     $commenter = wp_get_current_commenter();
     $req = get_option('require_name_email');
     $aria_req = $req ? " aria-required='true'" : '';
     $fields = array('author' => '<p class="comment-form-author">' . '<label for="author">' . __('Name', 'logicalboneshug') . ($req ? '<span class="required"> *</span>' : '') . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email', 'logicalboneshug') . ($req ? '<span class="required"> *</span>' : '') . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __('Website', 'logicalboneshug') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>');
     $new_labels = array('comment_field' => '<p class="form-textarea"><textarea name="comment" id="comment" cols="60" rows="10" aria-required="true"></textarea></p>', 'fields' => apply_filters('comment_form_default_fields', $fields), 'logged_in_as' => '', 'must_log_in' => '<p class="alert">' . sprintf(__('You must be <a href="%1$s">logged in</a> to post a comment.', 'logicalboneshug'), wp_login_url(get_permalink())) . '</p>', 'title_reply' => __('Leave a reply', 'logicalboneshug'));
     return apply_filters('bp_dtheme_comment_form', array_merge($default_labels, $new_labels));
 }
开发者ID:raminjan,项目名称:logicalbones_hug,代码行数:16,代码来源:buddypress-functions.php


示例19: bootstrap3_comment_form_fields

function bootstrap3_comment_form_fields($fields)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true'" : '';
    $html5 = current_theme_supports('html5', 'comment-form') ? 1 : 0;
    $fields = array('author' => '<div class="row"><div class="col-md-6 col-xs-12 col-sm-6"><div class="form-group comment-form-author">' . '<input class="form-control" placeholder="' . __('Your Name', STM_DOMAIN) . ($req ? ' *' : '') . '" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div></div>', 'email' => '<div class="col-md-6 col-xs-12 col-sm-6"><div class="form-group comment-form-email">' . '<input class="form-control" placeholder="' . __('Your Email', STM_DOMAIN) . ($req ? ' *' : '') . '" id="email" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div></div></div>');
    return $fields;
}
开发者ID:baochung26,项目名称:happy-c,代码行数:9,代码来源:comment_form.php


示例20: comment_form_fields

 public function comment_form_fields($fields)
 {
     $commenter = wp_get_current_commenter();
     $fields['author'] = "\n<fieldset id=\"lh_comments-fieldset\" class=\"comment-form-author lh-comment-navigation-input\"><legend>Fill in your details below or <a href=\"" . wp_login_url() . "\" title=\"login to comment\">login</a></legend><!--[if lt IE 10]><br/><label for=\"author\">" . __('Your Name', 'theme_text_domain') . ($req ? '<span class="required">*</span>' : '') . '</label><![endif]--> ' . '<input id="author" name="author" placeholder="Your Name (required)" type="text" value="' . esc_attr($commenter['comment_author']) . '" class="required" required="required" />' . "</p>\n\n";
     $fields['email'] = "\n<p class=\"comment-form-email lh-comment-navigation-input\"><!--[if lt IE 10]><label for=\"email\">" . __('Your Email', 'theme_text_domain') . ($req ? '<span class="required">*</span>' : '') . '</label><![endif]--> ' . '<input id="email" name="email" placeholder="Your Email (required - never published)" type="email" value="' . esc_attr($commenter['comment_author_email']) . '" size="40"' . ' class="required email" required="required" />' . "</fieldset>\n\n";
     $fields['url'] = '';
     //$fields['lh_comments_check']  = '<input type="hidden" name="lh_comments_check" value="" id="lh_comments_check" />';
     return $fields;
 }
开发者ID:shawfactor,项目名称:lh-native-comments,代码行数:9,代码来源:lh-native-comments.php



注:本文中的wp_get_current_commenter函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_get_current_user函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_get_comment_status函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap