WordPress.org

Make WordPress Core

Changeset 28448


Ignore:
Timestamp:
05/16/2014 03:18:17 PM (7 years ago)
Author:
wonderboymusic
Message:

Eliminate use of extract() in wp_xmlrpc_server::mw_editPost() (MetaWeblog API, y'all).

A lot of the extracted variables are overwritten by being explicitly set later.
Only set variables that would otherwise not be present with compact() is called.

See #22400.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r28412 r28448  
    47284728
    47294729        $this->escape($postdata);
    4730         extract($postdata, EXTR_SKIP);
     4730
     4731        $ID = $postdata['ID'];
     4732        $post_content = $postdata['post_content'];
     4733        $post_title = $postdata['post_title'];
     4734        $post_excerpt = $postdata['post_excerpt'];
     4735        $post_password = $postdata['post_password'];
     4736        $post_parent = $postdata['post_parent'];
     4737        $menu_order = $postdata['menu_order'];
    47314738
    47324739        // Let WordPress manage slug if none was provided.
     
    47484755            $menu_order = $content_struct['wp_page_order'];
    47494756
     4757        $page_template = null;
    47504758        if ( ! empty( $content_struct['wp_page_template'] ) && 'page' == $post_type )
    47514759            $page_template = $content_struct['wp_page_template'];
Note: See TracChangeset for help on using the changeset viewer.