PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.6.0
ShopBuilder – WooCommerce Builder For Elementor v2.6.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/Admin/Ajax/CreateTemplate.php +4 -5 2.2.02.6.0 View file →
@@ -74,11 +74,10 @@
74 74 $page_name = isset( $_POST['page_name'] ) ? sanitize_text_field( wp_unslash( $_POST['page_name'] ) ) : null;
75 75 $hasPro = isset( $_POST['hasPro'] ) ? sanitize_text_field( wp_unslash( $_POST['hasPro'] ) ) : null;
76 76 $edit_with = isset( $_POST['template_edit_with'] ) ? sanitize_text_field( wp_unslash( $_POST['template_edit_with'] ) ) : null;
77 77 $default_template = isset( $_POST['default_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_template'] ) ) : null;
78 - $import_layout = isset( $_POST['import_default_layout'] ) ? sanitize_text_field( $_POST['import_default_layout'] ) : null;
78 + $import_layout = isset( $_POST['import_default_layout'] ) ? sanitize_text_field( $_POST['import_default_layout'] ) : null; //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
79 79 $product_id = isset( $_POST['preview_product_id'] ) ? absint( $_POST['preview_product_id'] ) : null;
80 -
81 80 $url = '#';
82 81
83 82 if ( ! wp_verify_nonce( Fns::get_nonce(), rtsb()->nonceText ) || ! $page_type ) {
84 83 $return = [
@@ -154,9 +153,9 @@
154 153 $edit_by = '';
155 154 if ( $page_id ) {
156 155 $edit_by = Fns::page_edit_with( $page_id );
157 156 $template_for = sanitize_text_field( wp_unslash( $_POST['product_page_for'] ?? '' ) );
158 - $selected_category = array_unique( isset( $_POST['selected_category'] ) && is_array( $_POST['selected_category'] ) ? array_map( 'sanitize_text_field', $_POST['selected_category'] ) : [] );
157 + $selected_category = array_unique( isset( $_POST['selected_category'] ) && is_array( $_POST['selected_category'] ) ? array_map( 'sanitize_text_field', $_POST['selected_category'] ) : [] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
159 158 if ( 'product' == $page_type ) {
160 159 update_post_meta( $page_id, BuilderFns::$product_template_meta, $product_id );
161 160 update_post_meta( $page_id, '_is_product_page_template_for', $template_for );
162 161 }
@@ -169,11 +168,11 @@
169 168 } else {
170 169 if ( 'default_template' === $default_template ) {
171 170 TemplateSettings::instance()->set_option( $option_name, $page_id );
172 171 } else {
173 - if ( ! $has_default ) {
172 + //if ( ! $has_default ) {
174 173 TemplateSettings::instance()->set_option( $option_name, '' );
175 - }
174 + // }
176 175 }
177 176 }
178 177
179 178 $action = 'edit';