← All changes
|
Libs/adminify-framework/classes/shortcode-options.class.php
+8
-9
4.2.21
→
4.0
View file →
| @@ -97,9 +97,9 @@ | ||
| 97 | 97 | <div class="adminify-modal-table-cell"> |
| 98 | 98 | <div class="adminify-modal-overlay"></div> |
| 99 | 99 | <div class="adminify-modal-inner"> |
| 100 | 100 | <div class="adminify-modal-title"> |
| 101 | - <?php echo esc_html( $this->args['button_title'] ); ?> | |
| 101 | + <?php echo $this->args['button_title']; ?> | |
| 102 | 102 | <div class="adminify-modal-close"></div> |
| 103 | 103 | </div> |
| 104 | 104 | <?php |
| 105 | 105 | |
| @@ -120,9 +120,9 @@ | ||
| 120 | 120 | $view = ( ! empty( $sub['view'] ) ) ? ' data-view="'. esc_attr( $sub['view'] ) .'"' : ''; |
| 121 | 121 | $shortcode = ( ! empty( $sub['shortcode'] ) ) ? ' data-shortcode="'. esc_attr( $sub['shortcode'] ) .'"' : ''; |
| 122 | 122 | $group = ( ! empty( $sub['group_shortcode'] ) ) ? ' data-group="'. esc_attr( $sub['group_shortcode'] ) .'"' : ''; |
| 123 | 123 | |
| 124 | - echo '<option value="'. esc_attr( $tab_key ) .'"'. $view . $shortcode . $group .'>'. esc_html( $sub['title'] ) .'</option>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- value pre-escaped where built. | |
| 124 | + echo '<option value="'. esc_attr( $tab_key ) .'"'. $view . $shortcode . $group .'>'. esc_attr( $sub['title'] ) .'</option>'; | |
| 125 | 125 | |
| 126 | 126 | $tab_key++; |
| 127 | 127 | |
| 128 | 128 | } |
| @@ -134,9 +134,9 @@ | ||
| 134 | 134 | $view = ( ! empty( $tab['view'] ) ) ? ' data-view="'. esc_attr( $tab['view'] ) .'"' : ''; |
| 135 | 135 | $shortcode = ( ! empty( $tab['shortcode'] ) ) ? ' data-shortcode="'. esc_attr( $tab['shortcode'] ) .'"' : ''; |
| 136 | 136 | $group = ( ! empty( $tab['group_shortcode'] ) ) ? ' data-group="'. esc_attr( $tab['group_shortcode'] ) .'"' : ''; |
| 137 | 137 | |
| 138 | - echo '<option value="'. esc_attr( $tab_key ) .'"'. $view . $shortcode . $group .'>'. esc_html( $tab['title'] ) .'</option>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- value pre-escaped where built. | |
| 138 | + echo '<option value="'. esc_attr( $tab_key ) .'"'. $view . $shortcode . $group .'>'. esc_attr( $tab['title'] ) .'</option>'; | |
| 139 | 139 | |
| 140 | 140 | $tab_key++; |
| 141 | 141 | |
| 142 | 142 | } |
| @@ -150,9 +150,9 @@ | ||
| 150 | 150 | <div class="adminify-modal-content"> |
| 151 | 151 | <div class="adminify-modal-loading"><div class="adminify-loading"></div></div> |
| 152 | 152 | <div class="adminify-modal-load"></div> |
| 153 | 153 | </div> |
| 154 | - <div class="adminify-modal-insert-wrapper hidden"><a href="#" class="button button-primary adminify-modal-insert"><?php echo esc_html( $this->args['insert_title'] ); ?></a></div> | |
| 154 | + <div class="adminify-modal-insert-wrapper hidden"><a href="#" class="button button-primary adminify-modal-insert"><?php echo $this->args['insert_title']; ?></a></div> | |
| 155 | 155 | </div> |
| 156 | 156 | </div> |
| 157 | 157 | </div> |
| 158 | 158 | </div> |
| @@ -165,10 +165,9 @@ | ||
| 165 | 165 | |
| 166 | 166 | $nonce = ( ! empty( $_POST[ 'nonce' ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ 'nonce' ] ) ) : ''; |
| 167 | 167 | $shortcode_key = ( ! empty( $_POST[ 'shortcode_key' ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ 'shortcode_key' ] ) ) : ''; |
| 168 | 168 | |
| 169 | - // A valid nonce proves intent; current_user_can() enforces permission (editor-facing builder). | |
| 170 | - if ( ! empty( $shortcode_key ) && wp_verify_nonce( $nonce, 'adminify_shortcode_nonce' ) && current_user_can( 'edit_posts' ) ) { | |
| 169 | + if ( ! empty( $shortcode_key ) && wp_verify_nonce( $nonce, 'adminify_shortcode_nonce' ) ) { | |
| 171 | 170 | |
| 172 | 171 | $unallows = array( 'group', 'repeater', 'sorter' ); |
| 173 | 172 | $section = $this->pre_sections[$shortcode_key-1]; |
| 174 | 173 | $shortcode = ( ! empty( $section['shortcode'] ) ) ? $section['shortcode'] : ''; |
| @@ -181,9 +180,9 @@ | ||
| 181 | 180 | if ( ! empty( $section['fields'] ) && $view !== 'repeater' ) { |
| 182 | 181 | |
| 183 | 182 | echo '<div class="adminify-fields">'; |
| 184 | 183 | |
| 185 | - echo ( ! empty( $section['description'] ) ) ? '<div class="adminify-field adminify-section-description">'. wp_kses_post( $section['description'] ) .'</div>' : ''; | |
| 184 | + echo ( ! empty( $section['description'] ) ) ? '<div class="adminify-field adminify-section-description">'. $section['description'] .'</div>' : ''; | |
| 186 | 185 | |
| 187 | 186 | foreach ( $section['fields'] as $field ) { |
| 188 | 187 | |
| 189 | 188 | if ( in_array( $field['type'], $unallows ) ) { $field['_notice'] = true; } |
| @@ -237,9 +236,9 @@ | ||
| 237 | 236 | echo '</div>'; |
| 238 | 237 | |
| 239 | 238 | echo '</div>'; |
| 240 | 239 | |
| 241 | - echo '<div class="adminify--repeat-button-block"><a class="button adminify--repeat-button" href="#"><i class="fas fa-plus-circle"></i> '. esc_html( $button_title ) .'</a></div>'; | |
| 240 | + echo '<div class="adminify--repeat-button-block"><a class="button adminify--repeat-button" href="#"><i class="fas fa-plus-circle"></i> '. $button_title .'</a></div>'; | |
| 242 | 241 | |
| 243 | 242 | } |
| 244 | 243 | |
| 245 | 244 | } |
| @@ -275,9 +274,9 @@ | ||
| 275 | 274 | } else { |
| 276 | 275 | $depends[] = 'wp-edit-post'; |
| 277 | 276 | } |
| 278 | 277 | |
| 279 | - wp_enqueue_script( 'adminify-gutenberg-block', ADMINIFY::include_plugin_url( 'assets/js/gutenberg.js' ), $depends, PXLBSADMINIFY_VER, true ); | |
| 278 | + wp_enqueue_script( 'adminify-gutenberg-block', ADMINIFY::include_plugin_url( 'assets/js/gutenberg.js' ), $depends ); | |
| 280 | 279 | |
| 281 | 280 | wp_localize_script( 'adminify-gutenberg-block', 'adminify_gutenberg_blocks', ADMINIFY::$shortcode_instances ); |
| 282 | 281 | |
| 283 | 282 | foreach ( ADMINIFY::$shortcode_instances as $block ) { |