当前位置: 首页>>代码示例>>PHP>>正文


PHP allowed_tags函数代码示例

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


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

示例1: beforeSave

 function beforeSave($options = array())
 {
     $this->data['Answer']['answer'] = strip_tags($this->data['Answer']['answer'], allowed_tags('strip_tags'));
     $this->data['Answer']['response_heading'] = strip_tags($this->data['Answer']['response_heading'], allowed_tags('strip_tags'));
     $this->data['Answer']['response'] = strip_tags($this->data['Answer']['response'], allowed_tags('strip_tags'));
     return true;
 }
开发者ID:asadaqain,项目名称:Guide-on-the-Side,代码行数:7,代码来源:Answer.php

示例2: progo_bootstrap3_comment_form

function progo_bootstrap3_comment_form($args)
{
    $args['comment_field'] = '<div class="form-group comment-form-comment"><label for="comment">' . __('Comment', 'pgb') . '</label> <textarea class="form-control" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></div>';
    $args['comment_notes_after'] = '<p class="form-allowed-tags">' . __('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:') . '</p><div class="alert alert-info">' . allowed_tags() . '</div>';
    $args['id_form'] = 'commentform';
    $args['id_submit'] = 'commentsubmit';
    $args['title_reply'] = __('Leave a Reply', 'pgb');
    $args['title_reply_to'] = __('Leave a Reply to %s', 'pgb');
    $args['cancel_reply_link'] = __('Cancel Reply', 'pgb');
    $args['label_submit'] = __('Post Comment', 'pgb');
    return $args;
}
开发者ID:nlk-sites,项目名称:pgb,代码行数:12,代码来源:pgb-filters.php

示例3: j_comment_default_form

function j_comment_default_form($defaults)
{
    global $id;
    $post_id = $id;
    $commenter = wp_get_current_commenter();
    $user = wp_get_current_user();
    $user_identity = $user->exists() ? $user->display_name : '';
    $req = get_option('require_name_email');
    $required_text = sprintf(' ' . __('Required fields are marked %s', 'jeg_textdomain'), '<span class="required">*</span>');
    $newdefaults = array('fields' => $defaults['fields'], 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Comment', 'jeg_textdomain') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'jeg_textdomain'), 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>', 'jeg_textdomain'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '<p class="comment-notes">' . __('Your email address will not be published', 'jeg_textdomain') . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'jeg_textdomain'), ' <code>' . allowed_tags() . '</code>') . '</p>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply', 'jeg_textdomain'), 'title_reply_to' => __('Leave a Reply to %s', 'jeg_textdomain'), 'cancel_reply_link' => __('Cancel reply', 'jeg_textdomain'), 'label_submit' => __('Post Comment', 'jeg_textdomain'));
    return $newdefaults;
}
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:12,代码来源:comments-blog-clean.php

示例4: extend_kses_plus_comment_settings

function extend_kses_plus_comment_settings()
{
    $allow_kses = get_option('allow_kses', extend_kses_plus_default());
    $allow_kses_div_selected = isset($allow_kses['div']) ? 'checked' : '';
    $allow_kses_img_selected = isset($allow_kses['img']) ? 'checked' : '';
    $allow_kses_map_selected = isset($allow_kses['map']) ? 'checked' : '';
    $allow_kses_pre_selected = isset($allow_kses['pre']) ? 'checked' : '';
    $title = translate('Comments');
    $allow_kses_div_label = __('Allow <code>div</code> tag', 'extend-kses');
    $allow_kses_img_label = __('Allow <code>img</code> tag', 'extend-kses');
    $allow_kses_pre_label = __('Allow <code>pre</code> tag', 'extend-kses');
    $allow_kses_map_label = __('Allow <code>map</code> and <code>area</code> tags', 'extend-kses');
    print "\n                <fieldset>\n                    <legend class='screen-reader-text'><span>{$title}</span></legend>\n\t\t\t<label><input type='checkbox' name='allow_kses[div]' value='yes' {$allow_kses_div_selected} /> {$allow_kses_div_label}</label><br>\n\t\t\t<label><input type='checkbox' name='allow_kses[img]' value='yes' {$allow_kses_img_selected} /> {$allow_kses_img_label}</label><br>\n\t\t\t<label><input type='checkbox' name='allow_kses[pre]' value='yes' {$allow_kses_pre_selected} /> {$allow_kses_pre_label}</label><br>\n\t\t\t<label><input type='checkbox' name='allow_kses[map]' value='yes' {$allow_kses_map_selected} /> {$allow_kses_map_label}</label>\n\t\t</fieldset>\n\t";
    if (defined('WP_DEBUG') && true == WP_DEBUG) {
        $allowed_tags = wp_kses_allowed_html('post');
        echo "<div style='height:200px;overflow:scroll'><pre>";
        var_dump($allowed_tags);
        echo "</pre></div><code>";
        echo allowed_tags();
        echo "</code>";
    }
}
开发者ID:RavanH,项目名称:Extend-KSES-Plus,代码行数:22,代码来源:extend-kses.php

示例5: ultra_comment_form_defaults

/**
 * Filter the comment form.
 * Remove comment form allowed tags if theme option is de-activated. 
 *
 * @param $defaults
 * @return mixed
 */
function ultra_comment_form_defaults($defaults)
{
    if (siteorigin_setting('comments_allowed_tags')) {
        $defaults['comment_notes_after'] = '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'ultra'), ' <code>' . allowed_tags() . '</code>') . '</p>';
    }
    return $defaults;
}
开发者ID:selectSIFISO,项目名称:.comsite,代码行数:14,代码来源:functions.php

示例6: array

        // if comments pages > 1 and comments pagination enabled
        $args = array('prev_text' => '«', 'next_text' => '»');
        paginate_comments_links($args);
        // show comments pagination
    }
    // if comments pages > 1 and comments pagination enabled - end
}
// if comments exists - end
if (comments_open()) {
    // if comments open
    /* COMMENT FORM STAFF */
    $fields = array('author' => '<label for="author">
Your name  <input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" required></label>', 'email' => '<label for="email">	
Your email	<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" required></label>', 'url' => '<label for="url">
Your site <input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30"></label>');
    $args = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<label for="comment">Say something <textarea id="comment" name="comment" cols="45" rows="8"></textarea></label>', 'must_log_in' => '<p class="must-log-in">You must be login! ' . wp_login_url(apply_filters('the_permalink', get_permalink())) . '</p>', 'logged_in_as' => '<p class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s">Выйти?</a>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'comment_notes_before' => '<p class="comment-notes">Your email address will not be published.</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr>HTML</abbr> tags and attributes: %s'), '<code>' . allowed_tags() . '</code>') . '</p>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => 'Leave a Reply', 'title_reply_to' => 'Leave a Reply to %s', 'cancel_reply_link' => 'Cancel reply', 'label_submit' => 'Post Comment');
    /* NEXT CODE WILL BE REPLACE NATIVE COMMENT FORM MARKUP, THAT WE CANNOT CHANGE WITH STANDART FUNCTIONS */
    /* FOR EXAMPLE IT MAY BE HELPFUL IF WE NEED TO CHANGE MARKUP FOR TWITTER BOOTSTRAP */
    ob_start();
    // enable output buferisation
    comment_form($args);
    // show comment form with ours arguments
    $what_changes = array('<small>' => '', '</small>' => '', '<h3 id="reply-title" class="comment-reply-title">' => '<span id="reply-title">', '</h3>' => '</span>', '<input name="submit" type="submit" id="submit" value="' . $args['label_submit'] . '" />' => '<button type="submit">' . $args['label_submit'] . '</	button>');
    $new_form = str_replace(array_keys($what_changes), array_values($what_changes), ob_get_contents());
    // меняем элементы в форме
    ob_end_clean();
    // clear buferiation
    echo $new_form;
    // show new form
}
?>
开发者ID:Xgraf,项目名称:wordpressor-jade-less-postcss,代码行数:31,代码来源:comments.php

示例7: origines_comment_form

/**
 * Function Name: origines_comment_form
 * Description: Custom comment form for bootstrap.
 */
function origines_comment_form($args = array(), $post_id = null)
{
    global $id;
    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' => '<label for="author">' . __('Name') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' />', 'email' => '<label for="email">' . __('Email') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' />', 'url' => '<label for="url">' . __('Website') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />');
    $required_text = sprintf(' ' . __('Required fields are marked %s'), '<span class="required">*</span>');
    $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<label for="comment">' . _x('Comment', 'noun') . '</label><textarea id="comment" name="comment" cols="45" rows="4" aria-required="true" class="span9"></textarea>', 'must_log_in' => '<span class="help-block must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</span>', 'logged_in_as' => '<span class="help-block 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>'), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</span>', 'comment_notes_before' => '<span class="help-block comment-notes">' . __('Your email address will not be published.') . ($req ? $required_text : '') . '</span>', 'comment_notes_after' => '<span class="help-block form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), ' <code>' . allowed_tags() . '</code>') . '</span>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply'), 'title_reply_to' => __('Leave a Reply to %s'), 'cancel_reply_link' => __('Cancel reply'), 'label_submit' => __('Post Comment'));
    $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
    ?>
		<?php 
    if (comments_open($post_id)) {
        ?>
			
			<?php 
        do_action('comment_form_before');
        ?>

			<div id="respond" class="row">
			<form action="<?php 
        echo site_url('/wp-comments-post.php');
        ?>
" method="post" id="<?php 
        echo esc_attr($args['id_form']);
        ?>
">
  			<fieldset class="span9">
  			<legend><?php 
        comment_form_title($args['title_reply'], $args['title_reply_to']);
        ?>
 <small><?php 
        cancel_comment_reply_link($args['cancel_reply_link']);
        ?>
</small></legend>
  			<?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 {
            ?>
					<?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="form-actions">
							<button type="submit" class="btn btn-primary" id="<?php 
            echo esc_attr($args['id_submit']);
            ?>
"><?php 
            echo esc_attr($args['label_submit']);
            ?>
</button>
//.........这里部分代码省略.........
开发者ID:shahidbasheer,项目名称:origines,代码行数:101,代码来源:origines-walker.php

示例8: 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.
//.........这里部分代码省略.........
开发者ID:estrategasdigitales,项目名称:kanet,代码行数:101,代码来源:functions.php

示例9: zee_comment_form

    /**
     * Comment form
     */
    function zee_comment_form($args = array(), $post_id = null)
    {
        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 : '';
        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="form-group">
        <div class="col-sm-6 comment-form-author">
        <input   class="form-control"  id="author" 
        placeholder="' . __('Name', ZEETEXTDOMAIN) . '" name="author" type="text" 
        value="' . esc_attr($commenter['comment_author']) . '" ' . $aria_req . ' />
        </div>', 'email' => '<div class="col-sm-6 comment-form-email">
        <input id="email" class="form-control" name="email" 
        placeholder="' . __('Email', ZEETEXTDOMAIN) . '" ' . ($html5 ? 'type="email"' : 'type="text"') . ' 
        value="' . esc_attr($commenter['comment_author_email']) . '" ' . $aria_req . ' />
        </div>
        </div>', 'url' => '<div class="form-group">
        <div class=" col-sm-12 comment-form-url">' . '<input  class="form-control" placeholder="' . __('Website', ZEETEXTDOMAIN) . '"  id="url" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '"  />
        </div></div>');
        $required_text = sprintf(' ' . __('Required fields are marked %s', ZEETEXTDOMAIN), '<span class="required">*</span>');
        $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '
    <div class="form-group comment-form-comment">
    <div class="col-sm-12">
    <textarea class="form-control" id="comment" name="comment" placeholder="' . _x('Comment', 'noun', ZEETEXTDOMAIN) . '" rows="8" aria-required="true"></textarea>
    </div>
    </div>
    ', 'must_log_in' => '


    <div class="alert alert-danger must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</div>', 'logged_in_as' => '<div class="alert alert-info 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>', ZEETEXTDOMAIN), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</div>', 'comment_notes_before' => '<div class="alert alert-info comment-notes">' . __('Your email address will not be published.', ZEETEXTDOMAIN) . ($req ? $required_text : '') . '</div>', 'comment_notes_after' => '<div class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', ZEETEXTDOMAIN), ' <code>' . allowed_tags() . '</code>') . '</div>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply', ZEETEXTDOMAIN), 'title_reply_to' => __('Leave a Reply to %s', ZEETEXTDOMAIN), 'cancel_reply_link' => __('Cancel reply', ZEETEXTDOMAIN), 'label_submit' => __('Post Comment', ZEETEXTDOMAIN), 'format' => 'xhtml');
        $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
        if (comments_open($post_id)) {
            ?>

<?php 
            do_action('comment_form_before');
            ?>

<div id="respond" class="comment-respond">

    <h3 id="reply-title" class="comment-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']);
                ?>
" 
        class="form-horizontal comment-form"<?php 
                echo $html5 ? ' novalidate' : '';
                ?>
 role="form">
        <?php 
                do_action('comment_form_top');
                ?>

        <?php 
                if (is_user_logged_in()) {
                    ?>

//.........这里部分代码省略.........
开发者ID:jqn,项目名称:uzu,代码行数:101,代码来源:functions.php

示例10: _e

		</nav><!-- #comment-nav-below -->
		<?php 
    }
    // check for comment navigation
    ?>

	<?php 
}
// have_comments()
?>

	<?php 
// If comments are closed and there are comments, let's leave a little note, shall we?
if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) {
    ?>
		<p class="no-comments"><?php 
    _e('Comments are closed.', 'upbootwp');
    ?>
</p>
	<?php 
}
?>
	
	<?php 
// Arguments to edit the comment form
$args = array('id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply'), 'title_reply_to' => __('Leave a Reply to %s'), 'cancel_reply_link' => __('Cancel Reply'), 'label_submit' => __('Post Comment'), 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x('Comment', 'noun') . '</label><textarea id="comment" class="form-control" name="comment" cols="45" rows="8" aria-required="true">' . '</textarea></p>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink()))) . '</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>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'comment_notes_before' => '<p class="comment-notes">' . __('Your email address will not be published.') . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), ' <code style="white-space: normal !important;">' . allowed_tags() . '</code>') . '</p>', 'fields' => apply_filters('comment_form_default_fields', array('author' => '<p class="comment-form-author">' . '<label for="author">' . __('Name', 'domainreference') . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '<input id="author" class="form-control" 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', 'domainreference') . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '<input id="email" class="form-control" 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', 'domainreference') . '</label>' . '<input id="url" class="form-control" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>')));
comment_form($args);
?>

</div><!-- #comments -->
开发者ID:vkelly421,项目名称:marshall-robert,代码行数:30,代码来源:comments.php

示例11: _e

 />
    </p>
    <p><label for="url"><?php 
        _e('Website', 'arras');
        ?>
</label><br />
     <input type="text" name="url" id="s3" value="<?php 
        echo $comment_author_url;
        ?>
" size="40" tabindex="3" class="url" />
    </p>
   <?php 
    }
    ?>
	<p><?php 
    printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'arras'), allowed_tags());
    ?>
</p>
    <p>
     <textarea name="comment" id="s4" cols="50" rows="10" tabindex="4" class="required"></textarea>
    </p>
	<?php 
    if (function_exists('show_subscription_checkbox')) {
        ?>
	<p><?php 
        show_subscription_checkbox();
        ?>
</p>
	<?php 
    }
    ?>
开发者ID:alx,项目名称:Tetalab,代码行数:31,代码来源:comments.php

示例12: _e

                  size="22" tabindex="3"/>
            <label for="url">
                <small><?php 
    _e('Website', 'nvLangScope');
    ?>
</small>
            </label></p>

    <?php 
}
?>

    <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>

    <p><small><?php 
printf(__('You can use these tags: <code>%s</code>', 'nvLangScope'), allowed_tags());
?>
</small></p>

    <p><input name="submit" type="submit" id="submit" tabindex="5" class="button" value="<?php 
esc_attr_e('Submit Comment', 'nvLangScope');
?>
"/>
        <?php 
comment_id_fields();
?>
    </p>

    <?php 
do_action('comment_form', $post->ID);
?>
开发者ID:mistergjh,项目名称:nouveau,代码行数:31,代码来源:response-form.php

示例13: _e

        ?>
</div>
		</nav><!-- #comment-nav-below -->
		<?php 
    }
    // check for comment navigation
    ?>

	<?php 
}
// have_comments()
?>

	<?php 
// If comments are closed and there are comments, let's leave a little note, shall we?
if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) {
    ?>
		<p class="no-comments"><?php 
    _e('Comments are closed.', '_sx');
    ?>
</p>
	<?php 
}
?>

	<?php 
comment_form($args = array('id_form' => 'commentform', 'id_submit' => 'commentsubmit', 'title_reply' => __('Leave a Reply', '_sx'), 'title_reply_to' => __('Leave a Reply to %s', '_sx'), 'cancel_reply_link' => __('Cancel Reply', '_sx'), 'label_submit' => __('Post Comment', '_sx'), 'comment_field' => '<p><textarea placeholder="Start typing..." id="comment" class="form-control" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . __('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', '_sx') . '</p><div class="alert alert-info">' . allowed_tags() . '</div>'));
?>

</div><!-- #comments -->
开发者ID:sameer-shelavale,项目名称:_sx,代码行数:30,代码来源:comments.php

示例14: cfct_banner

<?php

// This file is part of the Carrington Theme for WordPress
// http://carringtontheme.com
//
// Copyright (c) 2008 Crowd Favorite, Ltd. All rights reserved.
// http://crowdfavorite.com
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// **********************************************************************
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
    die;
}
if (CFCT_DEBUG) {
    cfct_banner(__FILE__);
}
global $post, $user_ID, $user_identity, $comment_author, $comment_author_email, $comment_author_url, $tpl;
$req = get_option('require_name_email');
do_action('comment_form', $post->ID);
$tpl[] = array("wpurl" => get_bloginfo('wpurl'));
$tpl["comment_form"] = array("tpl_file" => "comment.html", "open" => $post->comment_status ? 1 : 0, "logged_in" => $user_ID ? 1 : 0, "must_login" => get_option('comment_registration') && !$user_ID ? 1 : 0, "logged_in_message" => sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'carrington'), get_bloginfo('wpurl') . '/wp-login.php?redirect_to=' . get_permalink()), "comment_label" => __('Post a comment', 'carrington'), "allowed_html_attribute" => sprintf(__('You can use: %s', 'carrington'), allowed_tags()), "allowed_html_message" => __('Some HTML is OK', 'carrington'), "logged_in_as" => sprintf(__('Logged in as <a href="%s">%s</a>.', 'carrington'), get_bloginfo('wpurl') . '/wp-admin/profile.php', $user_identity), "log_out_attribute" => __('Log out of this account', 'carrington'), "log_out_message" => __('Logout &rarr;', 'carrington'), "author_label" => __('Name', 'carrington'), "author_value" => $comment_author, "required" => $req ? 1 : 0, "required_message" => __('(required)', 'carrington'), "email_label" => __('Email', 'carrington'), "email_value" => $comment_author_email, "required_email_message" => __('(required, but never shared)', 'carrington'), "email_message" => __('(never shared)', 'carrington'), "url_attribute" => __('Your website address', 'carrington'), "url_label" => __('Web', 'carrington'), "url_value" => $comment_author_url, "submit_text" => __('Post comment', 'carrington'), "trackback_message" => sprintf(__('or, reply to this post via <a rel="trackback" href="%s">trackback</a>.', 'carrington'), get_trackback_url()), "post_id" => $post->ID);
开发者ID:alicam,项目名称:vanilla-theme,代码行数:27,代码来源:comment.php

示例15: _e

<p><input type="text" name="url" id="url" value="<?php 
            echo $comment_author_url;
            ?>
" size="22" tabindex="3" />
<label for="url"><small><?php 
            _e('Website', 'lightword');
            ?>
</small></label></p>

<?php 
        }
        ?>

<!--<p><small><strong>XHTML:</strong> <?php 
        printf(__('You can use these tags: %s', 'lightword'), allowed_tags());
        ?>
</small></p>-->

<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php 
        echo attribute_escape(__('Submit', 'lightword'));
        ?>
" />

<input type="hidden" name="comment_post_ID" value="<?php 
        echo $id;
        ?>
" />
</p>
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:30,代码来源:legacy.comments.php


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