wp_ajax_press_this_save_post()WP 4.2.0

Deprecated since 4.9.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Ajax handler for saving a post from Press This.

No Hooks.

Returns

null. Nothing (null).

Usage

wp_ajax_press_this_save_post();

Changelog

Since 4.2.0 Introduced.
Deprecated since 4.9.0

wp_ajax_press_this_save_post() code WP 6.9.1

function wp_ajax_press_this_save_post() {
	_deprecated_function( __FUNCTION__, '4.9.0' );
	if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
		include WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php';
		$wp_press_this = new WP_Press_This_Plugin();
		$wp_press_this->save_post();
	} else {
		wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
	}
}