@@ 3736-3752 (lines=17) @@ | ||
3733 | * } |
|
3734 | * @return array|IXR_Error |
|
3735 | */ |
|
3736 | public function wp_getCommentStatusList( $args ) { |
|
3737 | $this->escape( $args ); |
|
3738 | ||
3739 | $username = $args[1]; |
|
3740 | $password = $args[2]; |
|
3741 | ||
3742 | if ( ! $user = $this->login( $username, $password ) ) { |
|
3743 | return $this->error; |
|
3744 | } |
|
3745 | ||
3746 | if ( ! current_user_can( 'publish_posts' ) ) { |
|
3747 | return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) ); |
|
3748 | } |
|
3749 | ||
3750 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
|
3751 | do_action( 'xmlrpc_call', 'wp.getCommentStatusList' ); |
|
3752 | ||
3753 | return get_comment_statuses(); |
|
3754 | } |
|
3755 | ||
@@ 3818-3834 (lines=17) @@ | ||
3815 | * } |
|
3816 | * @return array|IXR_Error |
|
3817 | */ |
|
3818 | public function wp_getPostStatusList( $args ) { |
|
3819 | $this->escape( $args ); |
|
3820 | ||
3821 | $username = $args[1]; |
|
3822 | $password = $args[2]; |
|
3823 | ||
3824 | if ( !$user = $this->login($username, $password) ) |
|
3825 | return $this->error; |
|
3826 | ||
3827 | if ( !current_user_can( 'edit_posts' ) ) |
|
3828 | return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) ); |
|
3829 | ||
3830 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
|
3831 | do_action( 'xmlrpc_call', 'wp.getPostStatusList' ); |
|
3832 | ||
3833 | return get_post_statuses(); |
|
3834 | } |
|
3835 | ||
3836 | /** |
|
3837 | * Retrieve page statuses. |
|
@@ 3850-3866 (lines=17) @@ | ||
3847 | * } |
|
3848 | * @return array|IXR_Error |
|
3849 | */ |
|
3850 | public function wp_getPageStatusList( $args ) { |
|
3851 | $this->escape( $args ); |
|
3852 | ||
3853 | $username = $args[1]; |
|
3854 | $password = $args[2]; |
|
3855 | ||
3856 | if ( !$user = $this->login($username, $password) ) |
|
3857 | return $this->error; |
|
3858 | ||
3859 | if ( !current_user_can( 'edit_pages' ) ) |
|
3860 | return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) ); |
|
3861 | ||
3862 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
|
3863 | do_action( 'xmlrpc_call', 'wp.getPageStatusList' ); |
|
3864 | ||
3865 | return get_page_statuses(); |
|
3866 | } |
|
3867 | ||
3868 | /** |
|
3869 | * Retrieve page templates. |