函数
is_multi_author ( No parameters )
- 返回值
-
- (bool) Whether or not we have more than one author
- 定义位置
-
-
wp-includes/author-template.php
, line 599
-
wp-includes/author-template.php
- 引入
- 3.2.0
- 弃用
- –
Determines whether this site has more than one author.
Checks to see if more than one author has published posts.
For more information on this and similar theme functions, check out
the {@link Conditional Tags} article in the Theme Developer Handbook.
function is_multi_author() { global $wpdb; $is_multi_author = get_transient( 'is_multi_author' ); if ( false === $is_multi_author ) { $rows = (array) $wpdb->get_col( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2" ); $is_multi_author = 1
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。