PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.77
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.77
1.2.77 1.2.76 1.2.75 1.2.74 1.2.73 1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 All 177 releases
← All changes | vendor/ayecode/wp-super-duper/wp-super-duper.php +31 -24 1.2.70 → 1.2.77 View file →
@@ -4,9 +4,9 @@
4 4 }
5 5
6 6 if ( ! class_exists( 'WP_Super_Duper' ) ) {
7 7
8 - define( 'SUPER_DUPER_VER', '1.2.34' );
8 + define( 'SUPER_DUPER_VER', '1.2.37' );
9 9
10 10 /**
11 11 * A Class to be able to create a Widget, Shortcode or Block to be able to output content for WordPress.
12 12 *
@@ -290,34 +290,36 @@
290 290 *
291 291 * @return string
292 292 */
293 293 public static function get_picker( $editor_id = '' ) {
294 + global $sd_widgets;
294 295
295 - ob_start();
296 + if ( wp_doing_ajax() ) {
297 + check_ajax_referer( 'super_duper_picker', '_ajax_nonce' );
298 + }
299 +
296 300 if ( isset( $_POST['editor_id'] ) ) {
297 - $editor_id = esc_attr( $_POST['editor_id'] );
301 + $editor_id = sanitize_text_field( wp_unslash( $_POST['editor_id'] ) );
298 302 } elseif ( isset( $_REQUEST['et_fb'] ) ) {
299 303 $editor_id = 'main_content_content_vb_tiny_mce';
300 304 }
301 305
302 - global $sd_widgets;
306 + ksort( $sd_widgets );
303 307
304 -// print_r($sd_widgets);exit;
308 + ob_start();
305 309 ?>
306 -
307 310 <div class="sd-shortcode-left-wrap">
308 311 <?php
309 - ksort( $sd_widgets );
310 - // print_r($sd_widgets);exit;
311 312 if ( ! empty( $sd_widgets ) ) {
312 313 echo '<select class="widefat" onchange="sd_get_shortcode_options(this);">';
313 314 echo "<option>" . __( 'Select shortcode', 'ayecode-connect' ) . "</option>";
314 315 foreach ( $sd_widgets as $shortcode => $class ) {
315 - if(!empty($class['output_types']) && !in_array('shortcode', $class['output_types'])){ continue; }
316 - echo "<option value='" . esc_attr( $shortcode ) . "'>" . esc_attr( $shortcode ) . " (" . esc_attr( $class['name'] ) . ")</option>";
316 + if ( ! empty( $class['output_types'] ) && ! in_array( 'shortcode', $class['output_types'] ) ) {
317 + continue;
318 + }
319 + echo "<option value='" . esc_attr( $shortcode ) . "'>" . esc_html( $shortcode ) . " (" . esc_html( $class['name'] ) . ")</option>";
317 320 }
318 321 echo "</select>";
319 -
320 322 }
321 323 ?>
322 324 <div class="sd-shortcode-settings"></div>
323 325 </div>
@@ -324,9 +326,9 @@
324 326 <div class="sd-shortcode-right-wrap">
325 327 <textarea id='sd-shortcode-output' disabled></textarea>
326 328 <div id='sd-shortcode-output-actions'>
327 329 <?php if ( $editor_id != '' ) { ?>
328 - <button class="button sd-insert-shortcode-button" onclick="sd_insert_shortcode(<?php if ( ! empty( $editor_id ) ) { echo "'" . $editor_id . "'"; } ?>)"><?php esc_html_e( 'Insert Shortcode', 'ayecode-connect' ); ?></button>
330 + <button class="button sd-insert-shortcode-button" onclick="sd_insert_shortcode(<?php if ( ! empty( $editor_id ) ) { echo "'" . esc_js( $editor_id ) . "'"; } ?>)"><?php esc_html_e( 'Insert Shortcode', 'ayecode-connect' ); ?></button>
329 331 <?php } ?>
330 332 <button class="button" onclick="sd_copy_to_clipboard()"><?php esc_html_e( 'Copy Shortcode', 'ayecode-connect' ); ?></button>
331 333 </div>
332 334 </div>
@@ -388,9 +390,9 @@
388 390 */
389 391 public static function get_widget_settings() {
390 392 global $sd_widgets;
391 393
392 - $shortcode = isset( $_REQUEST['shortcode'] ) && $_REQUEST['shortcode'] ? sanitize_title_with_dashes( $_REQUEST['shortcode'] ) : '';
394 + $shortcode = isset( $_REQUEST['shortcode'] ) && $_REQUEST['shortcode'] ? sanitize_title_with_dashes( wp_unslash( $_REQUEST['shortcode'] ) ) : '';
393 395 if ( ! $shortcode ) {
394 396 wp_die();
395 397 }
396 398 $widget_args = isset( $sd_widgets[ $shortcode ] ) ? $sd_widgets[ $shortcode ] : '';
@@ -407,9 +409,9 @@
407 409
408 410 ob_start();
409 411 $widget->form( array() );
410 412 $form = ob_get_clean();
411 - echo "<form id='$shortcode'>" . $form . "<div class=\"widget-control-save\"></div></form>";
413 + echo "<form id='" . esc_attr( $shortcode ) . "'>" . $form . "<div class=\"widget-control-save\"></div></form>";
412 414 echo "<style>" . $widget->widget_css() . "</style>";
413 415 echo "<script>" . $widget->widget_js() . "</script>";
414 416 ?>
415 417 <?php
@@ -1799,12 +1801,17 @@
1799 1801 * @since 1.1.0 Font Awesome classes can be used for icons.
1800 1802 * @since 1.0.4 Added block_wrap property which will set the block wrapping output element ie: div, span, p or empty for no wrap.
1801 1803 */
1802 1804 public function block() {
1803 - global $sd_is_js_functions_loaded, $aui_bs5;
1805 + global $wp_version, $sd_is_js_functions_loaded, $aui_bs5;
1804 1806
1805 - $show_advanced = $this->block_show_advanced();
1807 + $show_advanced = $this->block_show_advanced();
1808 + $block_api_version = version_compare( $wp_version, '6.9', '>=' ) ? 3 : 2; // Block apiVersion
1806 1809
1810 + if ( isset( $this->options['block-api-version'] ) && absint( $this->options['block-api-version'] ) > 0 ) {
1811 + $block_api_version = absint( $this->options['block-api-version'] );
1812 + }
1813 +
1807 1814 ob_start();
1808 1815 ?>
1809 1816 <script>
1810 1817 <?php
@@ -2564,9 +2571,9 @@
2564 2571 * @return {?WPBlock} The block, if it has been successfully
2565 2572 * registered; otherwise `undefined`.
2566 2573 */
2567 2574 registerBlockType('<?php echo str_replace( "_", "-", sanitize_title_with_dashes( $this->options['textdomain'] ) . '/' . sanitize_title_with_dashes( $this->options['class_name'] ) ); ?>', { // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
2568 - apiVersion: <?php echo isset($this->options['block-api-version']) ? absint($this->options['block-api-version']) : 2 ; ?>,
2575 + apiVersion: <?php echo absint( $block_api_version ); ?>,
2569 2576 title: '<?php echo addslashes( $this->options['name'] ); ?>', // Block title.
2570 2577 description: '<?php echo addslashes( $this->options['widget_ops']['description'] )?>', // Block title.
2571 2578 icon: <?php echo $this->get_block_icon( $this->options['block-icon'] );?>,//'<?php echo isset( $this->options['block-icon'] ) ? esc_attr( $this->options['block-icon'] ) : 'shield-alt';?>', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
2572 2579 supports: {
@@ -3138,9 +3145,9 @@
3138 3145
3139 3146 if ( $show_advanced ) {
3140 3147 ?>
3141 3148 el('div', {
3142 - style: {'padding-left': '16px','padding-right': '16px'}
3149 + style: {'paddingLeft': '16px','paddingRight': '16px'}
3143 3150 },
3144 3151 el(
3145 3152 wp.components.ToggleControl,
3146 3153 {
@@ -5052,13 +5059,13 @@
5052 5059
5053 5060 /**
5054 5061 * Encode shortcodes tags.
5055 5062 *
5063 + * @since 1.0.28
5064 + *
5056 5065 * @param string $content Content to search for shortcode tags.
5057 5066 *
5058 -*@return string Content with shortcode tags removed.
5059 - *@since 1.0.28
5060 - *
5067 + * @return string Content with shortcode tags removed.
5061 5068 */
5062 5069 public function encode_shortcodes( $content ) {
5063 5070 // Avoids existing encoded tags.
5064 5071 $trans = array(
@@ -5090,13 +5097,13 @@
5090 5097
5091 5098 /**
5092 5099 * Remove encoded shortcod tags.
5093 5100 *
5101 + * @since 1.0.28
5102 + *
5094 5103 * @param string $content Content to search for shortcode tags.
5095 5104 *
5096 -*@return string Content with decoded shortcode tags.
5097 - *@since 1.0.28
5098 - *
5105 + * @return string Content with decoded shortcode tags.
5099 5106 */
5100 5107 public function decode_shortcodes( $content ) {
5101 5108 $trans = array(
5102 5109 '&#91;' => '[',