WordPress: Function Reference/get usernumposts:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
== Description ==
== 描述 ==
== 描述 ==
Returns the post count for the user whose ID is passed to it. Properties map directly to the wp_posts table in the database (see [[WordPress:Database Description#Table:_wp_posts|Database Description]]).


为ID已经传递的用户返回文章数目。Properties map直接到数据库中的wp_posts表格(请看看[[WordPress:Database Description#Table:_wp_posts|数据库描述]])。
为ID已经传递的用户返回文章数目。Properties map直接到数据库中的wp_posts表格(请看看[[WordPress:Database Description#Table:_wp_posts|数据库描述]])。
== Usage ==


== 用法==
== 用法==


%%% <?php get_usernumposts(userid); ?> %%%
%%% <?php get_usernumposts(userid); ?> %%%
%%% <?php get_usernumposts(userid); ?> %%%
== Example ==
=== Default Usage ===


== 例子 ==
== 例子 ==
第23行: 第11行:
===默认用法===
===默认用法===


The call to <tt>get_usernumposts</tt> returns the number of posts made by the user.
调用<tt>get_usernumposts</tt>返回用户输出的文章数目。
调用<tt>get_usernumposts</tt>返回用户输出的文章数目。
<?php echo('Posts made: ' . get_usernumposts(1)); ?>
 
   <?php echo('Posts made: ' . get_usernumposts(1)); ?>
   <?php echo('Posts made: ' . get_usernumposts(1)); ?>
   
   
<div style="border:1px solid blue; width:50%; padding:10px">Posts made: 143</div>
<div style="border:1px solid blue; width:50%; padding:10px">Posts made: 143</div>


<div style="border:1px solid blue; width:50%; padding:10px">Posts made: 143</div>
== Parameters ==
== 参数==
== 参数==
{{Parameter|$userid|integer|The ID of the user whose post count should be retrieved.}}
{{Parameter|$userid|integer|需要返回文章字数的用户的ID。}}
{{Parameter|$userid|integer|需要返回文章字数的用户的ID。}}

2008年7月25日 (五) 15:56的最新版本

描述[ ]

为ID已经传递的用户返回文章数目。Properties map直接到数据库中的wp_posts表格(请看看数据库描述)。

用法[ ]

%%% <?php get_usernumposts(userid); ?> %%%

例子[ ]

默认用法[ ]

调用get_usernumposts返回用户输出的文章数目。

 <?php echo('Posts made: ' . get_usernumposts(1)); ?>

Posts made: 143

参数[ ]