_post_format_request
函数
_post_format_request ( $qvs )
- Access
- Private
- 参数
-
-
(array)
$qvs- Required: 是
-
(array)
- 返回值
-
- (array)
- 定义位置
-
-
wp-includes/post-formats.php
, line 166
-
wp-includes/post-formats.php
- 引入
- 3.1.0
- 弃用
- –
Filters the request to allow for the format prefix.
function _post_format_request( $qvs ) {
if ( ! isset( $qvs['post_format'] ) ) {
return $qvs;
}
$slugs = get_post_format_slugs();
if ( isset( $slugs[ $qvs['post_format'] ] ) ) {
$qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
}
$tax = get_taxonomy( 'post_format' );
if ( ! is_admin() ) {
$qvs['post_type'] = $tax->object_type;
}
return $qvs;
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。


