Require the edit_posts capability for wp_getPostFormats.
Props maxcutler. Fixes #20154 git-svn-id: http://svn.automattic.com/wordpress/trunk@20566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43979f17ac
commit
9cbd3def67
|
@ -2922,6 +2922,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
if ( !$user = $this->login( $username, $password ) )
|
if ( !$user = $this->login( $username, $password ) )
|
||||||
return $this->error;
|
return $this->error;
|
||||||
|
|
||||||
|
if ( !current_user_can( 'edit_posts' ) )
|
||||||
|
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
|
||||||
|
|
||||||
do_action( 'xmlrpc_call', 'wp.getPostFormats' );
|
do_action( 'xmlrpc_call', 'wp.getPostFormats' );
|
||||||
|
|
||||||
$formats = get_post_format_strings();
|
$formats = get_post_format_strings();
|
||||||
|
|
Loading…
Reference in New Issue