WordPress.org

Make WordPress Core

Ticket #20154: wp_getPostFormats_cap_check.patch

File wp_getPostFormats_cap_check.patch, 580 bytes (added by maxcutler, 6 years ago)
  • wp-includes/class-wp-xmlrpc-server.php

     
    23422342                if ( !$user = $this->login( $username, $password ) )
    23432343                        return $this->error;
    23442344
     2345                if ( !current_user_can( 'edit_posts' ) )
     2346                        return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
     2347
    23452348                do_action( 'xmlrpc_call', 'wp.getPostFormats' );
    23462349
    23472350                $formats = get_post_format_strings();