mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Press This: in wp_ajax_press_this_save_post()
and wp_ajax_press_this_add_category()
, don't check for a global instance. WP_Press_This
is a Controller, but not really a Singleton. This also keeps it from being a pluggable class, which it is right now.
See #37699. Built from https://develop.svn.wordpress.org/trunk@38465 git-svn-id: http://core.svn.wordpress.org/trunk@38406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9546303342
commit
0419d1e318
@ -3113,30 +3113,20 @@ function wp_ajax_destroy_sessions() {
|
||||
* Ajax handler for saving a post from Press This.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @global WP_Press_This $wp_press_this
|
||||
*/
|
||||
function wp_ajax_press_this_save_post() {
|
||||
if ( empty( $GLOBALS['wp_press_this'] ) ) {
|
||||
$GLOBALS['wp_press_this'] = new WP_Press_This();
|
||||
}
|
||||
|
||||
$GLOBALS['wp_press_this']->save_post();
|
||||
$wp_press_this = new WP_Press_This();
|
||||
$wp_press_this->save_post();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax handler for creating new category from Press This.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @global WP_Press_This $wp_press_this
|
||||
*/
|
||||
function wp_ajax_press_this_add_category() {
|
||||
if ( empty( $GLOBALS['wp_press_this'] ) ) {
|
||||
$GLOBALS['wp_press_this'] = new WP_Press_This();
|
||||
}
|
||||
|
||||
$GLOBALS['wp_press_this']->add_category();
|
||||
$wp_press_this = new WP_Press_This();
|
||||
$wp_press_this->add_category();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38464';
|
||||
$wp_version = '4.7-alpha-38465';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user