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.

Built from https://develop.svn.wordpress.org/trunk@28448


git-svn-id: http://core.svn.wordpress.org/trunk@28275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-05-16 15:19:14 +00:00
parent 82d6b94cfe
commit 463b7c4620
1 changed files with 9 additions and 1 deletions

View File

@ -4727,7 +4727,14 @@ class wp_xmlrpc_server extends IXR_Server {
}
$this->escape($postdata);
extract($postdata, EXTR_SKIP);
$ID = $postdata['ID'];
$post_content = $postdata['post_content'];
$post_title = $postdata['post_title'];
$post_excerpt = $postdata['post_excerpt'];
$post_password = $postdata['post_password'];
$post_parent = $postdata['post_parent'];
$menu_order = $postdata['menu_order'];
// Let WordPress manage slug if none was provided.
$post_name = "";
@ -4747,6 +4754,7 @@ class wp_xmlrpc_server extends IXR_Server {
if ( isset($content_struct['wp_page_order']) )
$menu_order = $content_struct['wp_page_order'];
$page_template = null;
if ( ! empty( $content_struct['wp_page_template'] ) && 'page' == $post_type )
$page_template = $content_struct['wp_page_template'];