Eliminate use of `extract()` in `Custom_Image_Header::step_2()`.
See #22400. Built from https://develop.svn.wordpress.org/trunk@28384 git-svn-id: http://core.svn.wordpress.org/trunk@28212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
92d2c60a65
commit
4c60b2e207
|
@ -689,10 +689,14 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||||
if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
|
if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
|
||||||
$attachment_id = absint( $_GET['file'] );
|
$attachment_id = absint( $_GET['file'] );
|
||||||
$file = get_attached_file( $attachment_id, true );
|
$file = get_attached_file( $attachment_id, true );
|
||||||
$url = wp_get_attachment_image_src( $attachment_id, 'full');
|
$url = wp_get_attachment_image_src( $attachment_id, 'full' );
|
||||||
$url = $url[0];
|
$url = $url[0];
|
||||||
} elseif ( isset( $_POST ) ) {
|
} elseif ( isset( $_POST ) ) {
|
||||||
extract($this->step_2_manage_upload());
|
$data = $this->step_2_manage_upload();
|
||||||
|
$attachment_id = $data['attachment_id'];
|
||||||
|
$file = $data['file'];
|
||||||
|
$url = $data['url'];
|
||||||
|
$type = $data['type'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( file_exists( $file ) ) {
|
if ( file_exists( $file ) ) {
|
||||||
|
|
Loading…
Reference in New Issue