get_search_comments_feed_link( string $search_query = '', string $feed = '' )
Retrieves the permalink for the search results comments feed.
描述
参数
- $search_query
-
(string)
(Optional)
Search query.Default value: ''
- $feed
-
(string)
(Optional)
Feed type.Default value: ''
返回值
(string) The comments feed search results permalink.
源代码
File: wp-includes/link-template.php
function get_search_comments_feed_link($search_query = '', $feed = '') {
global $wp_rewrite;
if ( empty($feed) )
$feed = get_default_feed();
$link = get_search_feed_link($search_query, $feed);
$permastruct = $wp_rewrite->get_search_permastruct();
if ( empty($permastruct) )
$link = add_query_arg('feed', 'comments-' . $feed, $link);
else
$link = add_query_arg('withcomments', 1, $link);
/** This filter is documented in wp-includes/link-template.php */
return apply_filters( 'search_feed_link', $link, $feed, 'comments' );
}
更新日志
Version | 描述 |
---|---|
2.5.0 | Introduced. |
相关函数
Uses
-
wp-includes/functions.php:
add_query_arg() -
wp-includes/link-template.php:
get_search_feed_link() -
wp-includes/link-template.php:
search_feed_link -
wp-includes/plugin.php:
apply_filters() -
wp-includes/feed.php:
get_default_feed() -
wp-includes/class-wp-rewrite.php:
WP_Rewrite::get_search_permastruct()
Show 1 more use
你可能对这些文章感兴趣:
- wordpress函数get_the_posts_navigation()用法示例
- wordpress函数get_the_title()用法示例
- wordpress函数get_the_terms()用法示例
- wordpress函数get_the_tags()用法示例
- wordpress函数get_the_taxonomies()用法示例
- wordpress函数get_the_permalink()用法示例
- wordpress函数get_the_password_form()用法示例
- wordpress函数get_the_posts_pagination()用法示例
- wordpress函数get_the_modified_time()用法示例
- wordpress函数get_the_modified_date()用法示例
- wordpress函数get_the_modified_author()用法示例
- wordpress函数get_the_guid()用法示例
- wordpress函数get_the_ID()用法示例
- wordpress函数get_the_excerpt()用法示例
如有疑问,请前往问答中心反馈!
反馈