WordPress.org

Make WordPress Core

Ticket #19981: wp.newPage.patch

File wp.newPage.patch, 814 bytes (added by nprasath002, 2 years ago)

cap check removed

  • class-wp-xmlrpc-server.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    621621 
    622622                do_action('xmlrpc_call', 'wp.newPage'); 
    623623 
    624                 // Make sure the user is allowed to add new pages. 
    625                 if ( !current_user_can('publish_pages') ) 
    626                         return(new IXR_Error(401, __('Sorry, you cannot add new pages.'))); 
    627  
    628624                // Mark this as content for a page. 
    629625                $args[3]["post_type"] = 'page'; 
    630626