Press This: support passing `i` parameter to add an image src.
Props stephdau, azaozz. Fixes #32173. Built from https://develop.svn.wordpress.org/trunk@32936 git-svn-id: http://core.svn.wordpress.org/trunk@32907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eaadfde950
commit
d3ee649cb9
|
@ -738,6 +738,15 @@ class WP_Press_This {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Support passing a single image src as `i`
|
||||
if ( ! empty( $_REQUEST['i'] ) && ( $img_src = $this->_limit_img( wp_unslash( $_REQUEST['i'] ) ) ) ) {
|
||||
if ( empty( $data['_images'] ) ) {
|
||||
$data['_images'] = array( $img_src );
|
||||
} elseif ( ! in_array( $img_src, $data['_images'], true ) ) {
|
||||
array_unshift( $data['_images'], $img_src );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32935';
|
||||
$wp_version = '4.3-alpha-32936';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue