wp_ajax_press_this_add_category

函数
wp_ajax_press_this_add_category ( No parameters )

wp_ajax_press_this_add_category: 这个函数用来给正在创建或编辑的文章添加一个类别,在Press This bookmarklet中: 当用户从书签中的类别下拉菜单中选择一个类别时,它会被触发。

用于从Press This创建新类别的Ajax处理程序。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_ajax_press_this_add_category() {
_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->add_category();
} else {
wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
}
}
function wp_ajax_press_this_add_category() { _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->add_category(); } else { wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) ); } }
function wp_ajax_press_this_add_category() {
	_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->add_category();
	} else {
		wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
	}
}

常见问题

FAQs
查看更多 >