本文整理汇总了PHP中get_page_statuses函数的典型用法代码示例。如果您正苦于以下问题:PHP get_page_statuses函数的具体用法?PHP get_page_statuses怎么用?PHP get_page_statuses使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_page_statuses函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wp_getPageStatusList
/**
* Retrieve page statuses.
*
* @since 2.5.0
*
* @param array $args Method parameters.
* @return array
*/
function wp_getPageStatusList($args)
{
$this->escape($args);
$blog_id = (int) $args[0];
$username = $args[1];
$password = $args[2];
if (!($user = $this->login($username, $password))) {
return $this->error;
}
if (!current_user_can('edit_pages')) {
return new IXR_Error(403, __('You are not allowed access to details about this site.'));
}
do_action('xmlrpc_call', 'wp.getPageStatusList');
return get_page_statuses();
}
示例2: wp_getPageStatusList
/**
* Retrieve page statuses.
*
* @since 2.5.0
*
* @param array $args Method parameters.
* @return array|IXR_Error
*/
public function wp_getPageStatusList($args)
{
$this->escape($args);
$username = $args[1];
$password = $args[2];
if (!($user = $this->login($username, $password))) {
return $this->error;
}
if (!current_user_can('edit_pages')) {
return new IXR_Error(403, __('You are not allowed access to details about this site.'));
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action('xmlrpc_call', 'wp.getPageStatusList');
return get_page_statuses();
}
示例3: wp_getPageStatusList
function wp_getPageStatusList($args)
{
$this->escape($args);
$blog_id = (int) $args[0];
$username = $args[1];
$password = $args[2];
if (!$this->login_pass_ok($username, $password)) {
return new IXR_Error(403, __('Bad login/pass combination.'));
}
set_current_user(0, $username);
if (!current_user_can('edit_posts')) {
return new IXR_Error(403, __('You are not allowed access to details about this blog.'));
}
do_action('xmlrpc_call', 'wp.getPageStatusList');
return get_page_statuses();
}