mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Require the edit_posts capability for wp_getPostFormats.
Props maxcutler. Fixes #20154 git-svn-id: https://develop.svn.wordpress.org/trunk@20566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
de4b2724fd
commit
7e45462cbd
@ -2922,6 +2922,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if ( !$user = $this->login( $username, $password ) )
|
||||
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' );
|
||||
|
||||
$formats = get_post_format_strings();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user