WordPress.org

Make WordPress Core

Ticket #18429: stickpostfix.patch

File stickpostfix.patch, 909 bytes (added by nprasath002, 2 years ago)
  • 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.
     
    690690                } 
    691691                $post_ID = $post_data['ID']; 
    692692 
    693                 $sticky = $post_data['sticky'] ? true : false; 
    694  
    695                 if( $post_data['post_type'] == 'post' && $sticky == true ) { 
     693                if( $post_data['post_type'] == 'post' && $post_data['sticky']  == true ) { 
    696694                        if( ! current_user_can( $post_type->cap->edit_others_posts ) ) 
    697695                                return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) ); 
    698696