PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.76
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.76
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 +48 -31 1.2.63 → 1.2.76 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.31' );
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 *
@@ -239,8 +239,18 @@
239 239
240 240 // Group
241 241 if ( isset( $val['group'] ) ) {
242 242 $param['group'] = $val['group'];
243 +
244 + if ( ! empty( $param['group'] ) ) {
245 + // Fusion Builder converts the group name into a tab ID without sanitization and assigns it to the href.
246 + // Replace some punctuation symbols.
247 + $param['group'] = preg_replace( '/[\&,\(\)\:\/\\\\]/u', ' ', $param['group'] );
248 + // Remove ' ".
249 + $param['group'] = preg_replace( '/[\'\"]/u', '', $param['group'] );
250 + // Replace consecutive spaces with single space.
251 + $param['group'] = preg_replace( '/\s+/', ' ', $param['group'] );
252 + }
243 253 }
244 254
245 255 // value
246 256 if ( $val['type'] == 'checkbox' ) {
@@ -280,34 +290,36 @@
280 290 *
281 291 * @return string
282 292 */
283 293 public static function get_picker( $editor_id = '' ) {
294 + global $sd_widgets;
284 295
285 - ob_start();
296 + if ( wp_doing_ajax() ) {
297 + check_ajax_referer( 'super_duper_picker', '_ajax_nonce' );
298 + }
299 +
286 300 if ( isset( $_POST['editor_id'] ) ) {
287 - $editor_id = esc_attr( $_POST['editor_id'] );
301 + $editor_id = sanitize_text_field( wp_unslash( $_POST['editor_id'] ) );
288 302 } elseif ( isset( $_REQUEST['et_fb'] ) ) {
289 303 $editor_id = 'main_content_content_vb_tiny_mce';
290 304 }
291 305
292 - global $sd_widgets;
306 + ksort( $sd_widgets );
293 307
294 -// print_r($sd_widgets);exit;
308 + ob_start();
295 309 ?>
296 -
297 310 <div class="sd-shortcode-left-wrap">
298 311 <?php
299 - ksort( $sd_widgets );
300 - // print_r($sd_widgets);exit;
301 312 if ( ! empty( $sd_widgets ) ) {
302 313 echo '<select class="widefat" onchange="sd_get_shortcode_options(this);">';
303 314 echo "<option>" . __( 'Select shortcode', 'ayecode-connect' ) . "</option>";
304 315 foreach ( $sd_widgets as $shortcode => $class ) {
305 - if(!empty($class['output_types']) && !in_array('shortcode', $class['output_types'])){ continue; }
306 - 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>";
307 320 }
308 321 echo "</select>";
309 -
310 322 }
311 323 ?>
312 324 <div class="sd-shortcode-settings"></div>
313 325 </div>
@@ -314,11 +326,11 @@
314 326 <div class="sd-shortcode-right-wrap">
315 327 <textarea id='sd-shortcode-output' disabled></textarea>
316 328 <div id='sd-shortcode-output-actions'>
317 329 <?php if ( $editor_id != '' ) { ?>
318 - <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>
319 331 <?php } ?>
320 - <button class="button" onclick="sd_copy_to_clipboard()"><?php esc_html_e( 'Copy shortcode' ); ?></button>
332 + <button class="button" onclick="sd_copy_to_clipboard()"><?php esc_html_e( 'Copy Shortcode', 'ayecode-connect' ); ?></button>
321 333 </div>
322 334 </div>
323 335 <?php
324 336 $html = ob_get_clean();
@@ -378,9 +390,9 @@
378 390 */
379 391 public static function get_widget_settings() {
380 392 global $sd_widgets;
381 393
382 - $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'] ) ) : '';
383 395 if ( ! $shortcode ) {
384 396 wp_die();
385 397 }
386 398 $widget_args = isset( $sd_widgets[ $shortcode ] ) ? $sd_widgets[ $shortcode ] : '';
@@ -397,9 +409,9 @@
397 409
398 410 ob_start();
399 411 $widget->form( array() );
400 412 $form = ob_get_clean();
401 - 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>";
402 414 echo "<style>" . $widget->widget_css() . "</style>";
403 415 echo "<script>" . $widget->widget_js() . "</script>";
404 416 ?>
405 417 <?php
@@ -585,9 +597,10 @@
585 597 ?>
586 598 <style>
587 599 .sd-shortcode-left-wrap {
588 600 float: left;
589 - width: 60%;
601 + width: calc(60% - .75rem);
602 + padding-top: .75rem;
590 603 }
591 604
592 605 .sd-shortcode-left-wrap .gd-help-tip {
593 606 float: none;
@@ -680,9 +693,10 @@
680 693 }
681 694
682 695 .sd-shortcode-right-wrap {
683 696 float: right;
684 - width: 35%;
697 + width: 40%;
698 + padding-top: .75rem;
685 699 }
686 700
687 701 #sd-shortcode-output {
688 702 background: rgba(255, 255, 255, .5);
@@ -692,13 +706,11 @@
692 706 overflow: auto;
693 707 padding: 2px 6px;
694 708 line-height: 1.4;
695 709 resize: vertical;
696 - }
697 -
698 - #sd-shortcode-output {
699 710 height: 250px;
700 711 width: 100%;
712 + margin-bottom: .75rem;
701 713 }
702 714
703 715 <?php if ( function_exists( 'generate_sections_sections_metabox' ) ) { ?>
704 716 .generate-sections-modal #custom-media-buttons > .sd-lable-shortcode-inserter {
@@ -1195,9 +1207,9 @@
1195 1207 } else {
1196 1208 jQuery($this).data('sd-widget-enabled', true);
1197 1209 }
1198 1210
1199 - var $button = '<button title="<?php _e( 'Advanced Settings', 'ayecode-connect' );?>" style="line-height: 28px;" class="button button-primary right sd-advanced-button" onclick="sd_toggle_advanced(this);return false;"><span class="dashicons dashicons-admin-settings" style="width: 28px;font-size: 28px;"></span></button>';
1211 + var $button = '<button title="<?php esc_attr_e( 'Advanced Settings', 'ayecode-connect' );?>" style="line-height:1.5rem;margin:.5rem 0 0 0!important;" class="button button-primary right sd-advanced-button" onclick="sd_toggle_advanced(this);return false;"><span class="dashicons dashicons-admin-settings" style="width:1.5rem;font-size:1.5rem;height:1.5rem;line-height:1.5rem;margin:0;padding:0"></span></button>';
1200 1212 var form = $form ? $form : jQuery($this).parents('' + $selector + '');
1201 1213
1202 1214 if (jQuery($this).val() == '1' && jQuery(form).find('.sd-advanced-button').length == 0) {
1203 1215 console.log('add advanced button');
@@ -1789,12 +1801,17 @@
1789 1801 * @since 1.1.0 Font Awesome classes can be used for icons.
1790 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.
1791 1803 */
1792 1804 public function block() {
1793 - global $sd_is_js_functions_loaded, $aui_bs5;
1805 + global $wp_version, $sd_is_js_functions_loaded, $aui_bs5;
1794 1806
1795 - $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
1796 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 +
1797 1814 ob_start();
1798 1815 ?>
1799 1816 <script>
1800 1817 <?php
@@ -2554,9 +2571,9 @@
2554 2571 * @return {?WPBlock} The block, if it has been successfully
2555 2572 * registered; otherwise `undefined`.
2556 2573 */
2557 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.
2558 - apiVersion: <?php echo isset($this->options['block-api-version']) ? absint($this->options['block-api-version']) : 2 ; ?>,
2575 + apiVersion: <?php echo absint( $block_api_version ); ?>,
2559 2576 title: '<?php echo addslashes( $this->options['name'] ); ?>', // Block title.
2560 2577 description: '<?php echo addslashes( $this->options['widget_ops']['description'] )?>', // Block title.
2561 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/.
2562 2579 supports: {
@@ -3128,9 +3145,9 @@
3128 3145
3129 3146 if ( $show_advanced ) {
3130 3147 ?>
3131 3148 el('div', {
3132 - style: {'padding-left': '16px','padding-right': '16px'}
3149 + style: {'paddingLeft': '16px','paddingRight': '16px'}
3133 3150 },
3134 3151 el(
3135 3152 wp.components.ToggleControl,
3136 3153 {
@@ -5042,13 +5059,13 @@
5042 5059
5043 5060 /**
5044 5061 * Encode shortcodes tags.
5045 5062 *
5063 + * @since 1.0.28
5064 + *
5046 5065 * @param string $content Content to search for shortcode tags.
5047 5066 *
5048 -*@return string Content with shortcode tags removed.
5049 - *@since 1.0.28
5050 - *
5067 + * @return string Content with shortcode tags removed.
5051 5068 */
5052 5069 public function encode_shortcodes( $content ) {
5053 5070 // Avoids existing encoded tags.
5054 5071 $trans = array(
@@ -5080,13 +5097,13 @@
5080 5097
5081 5098 /**
5082 5099 * Remove encoded shortcod tags.
5083 5100 *
5101 + * @since 1.0.28
5102 + *
5084 5103 * @param string $content Content to search for shortcode tags.
5085 5104 *
5086 -*@return string Content with decoded shortcode tags.
5087 - *@since 1.0.28
5088 - *
5105 + * @return string Content with decoded shortcode tags.
5089 5106 */
5090 5107 public function decode_shortcodes( $content ) {
5091 5108 $trans = array(
5092 5109 '&#91;' => '[',