PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 3.1.4
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v3.1.4
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | inc/layout/save-templates.php +2 -2 trunk3.1.4 View file →
@@ -5,9 +5,9 @@
5 5 'methods'=>\WP_REST_Server::EDITABLE,
6 6 'callback' => 'blockspare_save_templates_callback',
7 7 'permission_callback' => function ($request) {
8 8 $nonce = $request->get_header( 'X-WP-Nonce' );
9 - if ( ! wp_verify_nonce( $nonce, 'wp_rest' ) && !current_user_can( 'edit_posts' )) {
9 + if ( ! wp_verify_nonce( $nonce, 'wp_rest' ) ) {
10 10 return new WP_Error( 'rest_forbidden', 'Validation Failed', array( 'status' => 200 ) );
11 11 }
12 12
13 13 return true;
@@ -18,9 +18,9 @@
18 18 if(!function_exists('blockspare_custom_post_type')){
19 19 function blockspare_save_templates_callback(\WP_REST_Request $request) {
20 20 $params = $request->get_params();
21 21 $post_content = $params['data'];
22 - $post_title = sanitize_text_field($params['title']);
22 + $post_title = $params['title'];
23 23 $category = $params['category'];
24 24
25 25 $new_post = array(
26 26 'post_content' => $post_content,