post_comments_feed_link()

 

File: wp-includes/link-template.php

function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
	$url = get_post_comments_feed_link( $post_id, $feed );
	if ( empty( $link_text ) ) {
		$link_text = __( 'Comments Feed' );
	}

	$link = '<a href="' . esc_url( $url ) . '">' . $link_text . '</a>';
	/**
	 * Filters the post comment feed link anchor tag.
	 *
	 * @since 2.8.0
	 *
	 * @param string $link    The complete anchor tag for the comment feed link.
	 * @param int    $post_id Post ID.
	 * @param string $feed    The feed type, or an empty string for the default feed type.
	 */
	echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );
}

参数:post_comments_feed_link( string $link_text = '', int $post_id = '', string $feed = '' )

打印出帖子的评论订阅链接。链接文本将放置在定位点中。如果未指定链接文本,则使用默认文本。如果未指定日志ID,则使用当前日志。

Descriptive link text. Default 'Comments Feed'. Post ID. Default is the ID of the global 邮费. Feed format.

$link_text

(string)
(Optional)
Descriptive link text. Default 'Comments Feed'.

Default value: ''

$post_id

(int)
(Optional)
Post ID. Default is the ID of the global $post.

Default value: ''

$feed

(string)
(Optional)
Feed format.

Default value: ''

{acontent3}

  1. Basic Usage

    <?php
       post_comments_feed_link( $link_text = 'link_text', $post_id = 'post_id',
             $feed = 'feed_type' );
    ?> 
    

You must log in before being able to contribute a note or feedback.

50.00% (3) 次Baidu访问
16.67% (1) 次Google访问
33.33% (2) 次Sogou访问
  • 蜘蛛:Baidu,3次,更新时间:2019-04-22 17:32:23
  • 蜘蛛:Google,1次,更新时间:2019-04-23 23:26:38
  • 蜘蛛:Sogou,2次,更新时间:2019-05-15 05:43:09

参与评论