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. git-svn-id: https://develop.svn.wordpress.org/trunk@28448 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
102806bd81
commit
cf3574516a
@ -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'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user