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

PHP get_comment_id_fields函数代码示例

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

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



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

示例1: awesome_comment_form_submit_button

function awesome_comment_form_submit_button($button)
{
    $button = '<button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" name="submit" type="submit">
      <i class="material-icons" role="presentation">check</i><span class="visuallyhidden">add comment</span>
     </button>' . get_comment_id_fields();
    return $button;
}
开发者ID:radovanx,项目名称:artwp,代码行数:7,代码来源:functions.php


示例2: array

 /**
  * @ticket 32312
  */
 public function test_submit_button_and_submit_field_should_fall_back_on_defaults_when_filtered_defaults_do_not_contain_the_keys()
 {
     $p = self::factory()->post->create();
     $args = array('name_submit' => 'foo-name', 'id_submit' => 'foo-id', 'class_submit' => 'foo-class', 'label_submit' => 'foo-label');
     add_filter('comment_form_defaults', array($this, 'filter_comment_form_defaults'));
     $form = get_echo('comment_form', array($args, $p));
     remove_filter('comment_form_defaults', array($this, 'filter_comment_form_defaults'));
     $button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
     $hidden = get_comment_id_fields($p);
     $this->assertRegExp('|<p class="form\\-submit">\\s*' . $button . '\\s*' . $hidden . '\\s*|', $form);
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:14,代码来源:commentForm.php


示例3: test_custom_submit_field

	public function test_custom_submit_field() {
		$p = $this->factory->post->create();

		$args = array(
			'name_submit' => 'foo-name',
			'id_submit' => 'foo-id',
			'class_submit' => 'foo-class',
			'label_submit' => 'foo-label',
			'submit_field' => '<p class="my-custom-submit-field">%1$s %2$s</p>'
		);
		$form = get_echo( 'comment_form', array( $args, $p ) );

		$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
		$hidden = get_comment_id_fields( $p );
		$this->assertRegExp( '|<p class="my\-custom\-submit\-field">\s*' . $button . '\s*' . $hidden . '\s*|', $form );
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:16,代码来源:commentForm.php


示例4: comment_form


//.........这里部分代码省略.........
                echo $args['comment_notes_before'];
                ?>
                        <?php 
                /**
                 * Fires before the comment fields in the comment form.
                 *
                 * @since 3.0.0
                 */
                do_action('comment_form_before_fields');
                foreach ((array) $args['fields'] as $name => $field) {
                    /**
                     * Filter a comment form field for display.
                     *
                     * The dynamic portion of the filter hook, `$name`, refers to the name
                     * of the comment form field. Such as 'author', 'email', or 'url'.
                     *
                     * @since 3.0.0
                     *
                     * @param string $field The HTML-formatted output of the comment form field.
                     */
                    echo apply_filters("comment_form_field_{$name}", $field) . "\n";
                }
                /**
                 * Fires after the comment fields in the comment form.
                 *
                 * @since 3.0.0
                 */
                do_action('comment_form_after_fields');
                ?>
                    <?php 
            }
            ?>
                    <?php 
            /**
             * Filter the content of the comment textarea field for display.
             *
             * @since 3.0.0
             *
             * @param string $args_comment_field The content of the comment textarea field.
             */
            echo apply_filters('comment_form_field_comment', $args['comment_field']);
            ?>
                    <?php 
            echo $args['comment_notes_after'];
            ?>

                    <?php 
            $submit_button = sprintf($args['submit_button'], esc_attr($args['name_submit']), esc_attr($args['id_submit']), esc_attr($args['class_submit']), esc_attr($args['label_submit']));
            /**
             * Filter the submit button for the comment form to display.
             *
             * @since 4.2.0
             *
             * @param string $submit_button HTML markup for the submit button.
             * @param array $args Arguments passed to `comment_form()`.
             */
            $submit_button = apply_filters('comment_form_submit_button', $submit_button, $args);
            $submit_field = sprintf($args['submit_field'], $submit_button, get_comment_id_fields($post_id));
            /**
             * Filter the submit field for the comment form to display.
             *
             * The submit field includes the submit button, hidden fields for the
             * comment form, and any wrapper markup.
             *
             * @since 4.2.0
             *
             * @param string $submit_field HTML markup for the submit field.
             * @param array $args Arguments passed to comment_form().
             */
            echo apply_filters('comment_form_submit_field', $submit_field, $args);
            /**
             * Fires at the bottom of the comment form, inside the closing </form> tag.
             *
             * @since 1.5.0
             *
             * @param int $post_id The post ID.
             */
            do_action('comment_form', $post_id);
            ?>
                </form>
            <?php 
        }
        ?>
        </div><!-- #respond -->
        <?php 
        /**
         * Fires after the comment form.
         *
         * @since 3.0.0
         */
        do_action('comment_form_after');
    } else {
        /**
         * Fires after the comment form if comments are closed.
         *
         * @since 3.0.0
         */
        do_action('comment_form_comments_closed');
    }
}
开发者ID:richardbota,项目名称:WordPress-Theme-Development-with-Bootstrap,代码行数:101,代码来源:comment-template.php


示例5: comment_id_fields

/**
 * Output hidden input HTML for replying to comments.
 *
 * @since 2.7.0
 *
 * @param int $id Optional. Post ID. Default current post ID.
 */
function comment_id_fields($id = 0)
{
    echo get_comment_id_fields($id);
}
开发者ID:hell2310,项目名称:stylelk,代码行数:11,代码来源:comment-template.php


示例6: comment_id_fields

/**
 * Output hidden input HTML for replying to comments.
 *
 * @since 2.7.0
 * @see get_comment_id_fields() Echoes result
 */
function comment_id_fields()
{
    echo get_comment_id_fields();
}
开发者ID:beaucollins,项目名称:wp,代码行数:10,代码来源:comment-template.php


示例7: awesome_comment_form_submit_button

function awesome_comment_form_submit_button($button)
{
    $button = '<input name="submit" type="submit" class="form-submit" tabindex="5" id="[args:id_submit]" value="[args:label_submit]" />' . get_comment_id_fields();
    return $button;
}
开发者ID:Trd-vandolph,项目名称:olivecode-chapter-24,代码行数:5,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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