get_usernumposts

函式
get_usernumposts ( $userid )
引數
  • (int) $userid User to count posts for.
    Required:
返回值
  • (int) Number of posts the given user has written.
相關
  • count_user_posts()
定義位置
相關方法
get_postsget_usersget_usermetaget_users_draftsget_user_meta
引入
0.71
棄用
3.0.0

get_usernumposts: 這個函式用來檢索WordPress中一個特定使用者的發表文章的數量: 該函式以一個使用者ID為引數,並返回一個代表已發表文章數量的整數值。

檢索一個使用者所寫的文章的數量。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_usernumposts( $userid ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
return count_user_posts( $userid );
}
function get_usernumposts( $userid ) { _deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' ); return count_user_posts( $userid ); }
function get_usernumposts( $userid ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
	return count_user_posts( $userid );
}

常見問題

FAQs
檢視更多 >