wpsc_ajax_activate_boost()WPSCache 1.0

Admin ajax action: activate Jetpack Boost.

No Hooks.

Return

null. Nothing.

Usage

wpsc_ajax_activate_boost();

wpsc_ajax_activate_boost() code WPSCache 1.9.2

function wpsc_ajax_activate_boost() {
	check_ajax_referer( 'activate-boost' );

	$result = activate_plugin( 'jetpack-boost/jetpack-boost.php' );
	if ( is_wp_error( $result ) ) {
		wp_send_json_error( $result->get_error_message() );
	}

	wp_send_json_success();
}