Completed
Push — master ( 44aca2...0191c7 )
by
unknown
36s
created
redux-core/inc/extensions/datetime/class-redux-extension-datetime.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -17,34 +17,34 @@
 block discarded – undo
17 17
 // Don't duplicate me!
18 18
 if ( ! class_exists( 'Redux_Extension_Datetime', false ) ) {
19 19
 
20
-	/**
21
-	 * Class Redux_Extension_Datetime
22
-	 */
23
-	class Redux_Extension_Datetime extends Redux_Extension_Abstract {
20
+    /**
21
+     * Class Redux_Extension_Datetime
22
+     */
23
+    class Redux_Extension_Datetime extends Redux_Extension_Abstract {
24 24
 
25
-		/**
26
-		 * Extension version.
27
-		 *
28
-		 * @var string
29
-		 */
30
-		public static $version = '4.3.15';
25
+        /**
26
+         * Extension version.
27
+         *
28
+         * @var string
29
+         */
30
+        public static $version = '4.3.15';
31 31
 
32
-		/**
33
-		 * Extension friendly name.
34
-		 *
35
-		 * @var string
36
-		 */
37
-		public string $extension_name = 'Date/Time';
32
+        /**
33
+         * Extension friendly name.
34
+         *
35
+         * @var string
36
+         */
37
+        public string $extension_name = 'Date/Time';
38 38
 
39
-		/**
40
-		 * Redux_Extension_Datetime constructor.
41
-		 *
42
-		 * @param ReduxFramework $redux ReduxFramework pointer.
43
-		 */
44
-		public function __construct( $redux ) {
45
-			parent::__construct( $redux, __FILE__ );
39
+        /**
40
+         * Redux_Extension_Datetime constructor.
41
+         *
42
+         * @param ReduxFramework $redux ReduxFramework pointer.
43
+         */
44
+        public function __construct( $redux ) {
45
+            parent::__construct( $redux, __FILE__ );
46 46
 
47
-			$this->add_field( 'datetime' );
48
-		}
49
-	}
47
+            $this->add_field( 'datetime' );
48
+        }
49
+    }
50 50
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/accordion/class-redux-extension-accordion.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,43 +16,43 @@
 block discarded – undo
16 16
 // Don't duplicate me!
17 17
 if ( ! class_exists( 'Redux_Extension_Accordion' ) ) {
18 18
 
19
-	/**
20
-	 * Main ReduxFramework_Extension_Accordion extension class
21
-	 *
22
-	 * @since       1.0.0
23
-	 */
24
-	class Redux_Extension_Accordion extends Redux_Extension_Abstract {
25
-
26
-		/**
27
-		 * Extension version.
28
-		 *
29
-		 * @var string
30
-		 */
31
-		public static $version = '4.3.16';
32
-
33
-		/**
34
-		 * Extension friendly name.
35
-		 *
36
-		 * @var string
37
-		 */
38
-		public string $extension_name = 'Accordion';
39
-
40
-		/**
41
-		 * Class Constructor. Defines the args for the extension class
42
-		 *
43
-		 * @since       1.0.0
44
-		 * @access      public
45
-		 *
46
-		 * @param       ReduxFramework $redux Parent settings.
47
-		 *
48
-		 * @return      void
49
-		 */
50
-		public function __construct( $redux ) {
51
-			parent::__construct( $redux, __FILE__ );
52
-
53
-			$this->add_field( 'accordion' );
54
-		}
55
-	}
56
-
57
-	class_alias( Redux_Extension_Accordion::class, 'ReduxFramework_Extension_Accordion' );
19
+    /**
20
+     * Main ReduxFramework_Extension_Accordion extension class
21
+     *
22
+     * @since       1.0.0
23
+     */
24
+    class Redux_Extension_Accordion extends Redux_Extension_Abstract {
25
+
26
+        /**
27
+         * Extension version.
28
+         *
29
+         * @var string
30
+         */
31
+        public static $version = '4.3.16';
32
+
33
+        /**
34
+         * Extension friendly name.
35
+         *
36
+         * @var string
37
+         */
38
+        public string $extension_name = 'Accordion';
39
+
40
+        /**
41
+         * Class Constructor. Defines the args for the extension class
42
+         *
43
+         * @since       1.0.0
44
+         * @access      public
45
+         *
46
+         * @param       ReduxFramework $redux Parent settings.
47
+         *
48
+         * @return      void
49
+         */
50
+        public function __construct( $redux ) {
51
+            parent::__construct( $redux, __FILE__ );
52
+
53
+            $this->add_field( 'accordion' );
54
+        }
55
+    }
56
+
57
+    class_alias( Redux_Extension_Accordion::class, 'ReduxFramework_Extension_Accordion' );
58 58
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/shortcodes/class-redux-extension-shortcodes.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -13,43 +13,43 @@
 block discarded – undo
13 13
 // Don't duplicate me!
14 14
 if ( ! class_exists( 'Redux_Extension_Shortcodes' ) ) {
15 15
 
16
-	/**
17
-	 * Class Redux_Extension_Shortcodes
18
-	 */
19
-	class Redux_Extension_Shortcodes extends Redux_Extension_Abstract {
20
-
21
-		/**
22
-		 * Extension Version.
23
-		 *
24
-		 * @var string
25
-		 */
26
-		public static $version = '4.3.6';
27
-
28
-		/**
29
-		 * Extension Friendly Name.
30
-		 *
31
-		 * @var string
32
-		 */
33
-		public string $extension_name = 'Shortcodes';
34
-
35
-		/**
36
-		 * Redux_Extension_Shortcodes constructor.
37
-		 *
38
-		 * @param object $redux ReduxFramework Object pointer.
39
-		 */
40
-		public function __construct( $redux ) {
41
-			parent::__construct( $redux, __FILE__ );
42
-
43
-			$this->add_field( 'shortcodes' );
44
-
45
-			if ( ! class_exists( 'Redux_Shortcodes' ) ) {
46
-				require_once __DIR__ . '/class-redux-shortcodes.php';
47
-				new Redux_Shortcodes();
48
-			}
49
-
50
-			// Allow users to extend if they want.
51
-			// phpcs:ignore WordPress.NamingConventions.ValidHookName
52
-			do_action( 'redux/shortcodes/' . $redux->args['opt_name'] . '/construct' );
53
-		}
54
-	}
16
+    /**
17
+     * Class Redux_Extension_Shortcodes
18
+     */
19
+    class Redux_Extension_Shortcodes extends Redux_Extension_Abstract {
20
+
21
+        /**
22
+         * Extension Version.
23
+         *
24
+         * @var string
25
+         */
26
+        public static $version = '4.3.6';
27
+
28
+        /**
29
+         * Extension Friendly Name.
30
+         *
31
+         * @var string
32
+         */
33
+        public string $extension_name = 'Shortcodes';
34
+
35
+        /**
36
+         * Redux_Extension_Shortcodes constructor.
37
+         *
38
+         * @param object $redux ReduxFramework Object pointer.
39
+         */
40
+        public function __construct( $redux ) {
41
+            parent::__construct( $redux, __FILE__ );
42
+
43
+            $this->add_field( 'shortcodes' );
44
+
45
+            if ( ! class_exists( 'Redux_Shortcodes' ) ) {
46
+                require_once __DIR__ . '/class-redux-shortcodes.php';
47
+                new Redux_Shortcodes();
48
+            }
49
+
50
+            // Allow users to extend if they want.
51
+            // phpcs:ignore WordPress.NamingConventions.ValidHookName
52
+            do_action( 'redux/shortcodes/' . $redux->args['opt_name'] . '/construct' );
53
+        }
54
+    }
55 55
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/js_button/class-redux-extension-js-button.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -12,41 +12,41 @@
 block discarded – undo
12 12
 
13 13
 if ( ! class_exists( 'Redux_Extension_Js_Button' ) ) {
14 14
 
15
-	/**
16
-	 * Main Redux_Extension_Js_Button extension class
17
-	 *
18
-	 * @since       1.0.0
19
-	 */
20
-	class Redux_Extension_Js_Button extends Redux_Extension_Abstract {
15
+    /**
16
+     * Main Redux_Extension_Js_Button extension class
17
+     *
18
+     * @since       1.0.0
19
+     */
20
+    class Redux_Extension_Js_Button extends Redux_Extension_Abstract {
21 21
 
22
-		/**
23
-		 * Extension version.
24
-		 *
25
-		 * @var string
26
-		 */
27
-		public static $version = '4.3.16';
22
+        /**
23
+         * Extension version.
24
+         *
25
+         * @var string
26
+         */
27
+        public static $version = '4.3.16';
28 28
 
29
-		/**
30
-		 * Extension friendly name.
31
-		 *
32
-		 * @var string
33
-		 */
34
-		public string $extension_name = 'JS Button';
29
+        /**
30
+         * Extension friendly name.
31
+         *
32
+         * @var string
33
+         */
34
+        public string $extension_name = 'JS Button';
35 35
 
36
-		/**
37
-		 * Class Constructor. Defines the args for the extensions class
38
-		 *
39
-		 * @since       1.0.0
40
-		 * @access      public
41
-		 *
42
-		 * @param       ReduxFramework $redux Parent settings.
43
-		 *
44
-		 * @return      void
45
-		 */
46
-		public function __construct( $redux ) {
47
-			parent::__construct( $redux, __FILE__ );
36
+        /**
37
+         * Class Constructor. Defines the args for the extensions class
38
+         *
39
+         * @since       1.0.0
40
+         * @access      public
41
+         *
42
+         * @param       ReduxFramework $redux Parent settings.
43
+         *
44
+         * @return      void
45
+         */
46
+        public function __construct( $redux ) {
47
+            parent::__construct( $redux, __FILE__ );
48 48
 
49
-			$this->add_field( 'js_button' );
50
-		}
51
-	}
49
+            $this->add_field( 'js_button' );
50
+        }
51
+    }
52 52
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/google_maps/class-redux-extension-google-maps.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -12,34 +12,34 @@
 block discarded – undo
12 12
 
13 13
 if ( ! class_exists( 'Redux_Extension_Google_Maps' ) ) {
14 14
 
15
-	/**
16
-	 * Class ReduxFramework_extension_google_maps
17
-	 */
18
-	class Redux_Extension_Google_Maps extends Redux_Extension_Abstract {
15
+    /**
16
+     * Class ReduxFramework_extension_google_maps
17
+     */
18
+    class Redux_Extension_Google_Maps extends Redux_Extension_Abstract {
19 19
 
20
-		/**
21
-		 * Extension version.
22
-		 *
23
-		 * @var string
24
-		 */
25
-		public static $version = '4.4.19';
20
+        /**
21
+         * Extension version.
22
+         *
23
+         * @var string
24
+         */
25
+        public static $version = '4.4.19';
26 26
 
27
-		/**
28
-		 * Extension friendly name.
29
-		 *
30
-		 * @var string
31
-		 */
32
-		public string $extension_name = 'Google Maps';
27
+        /**
28
+         * Extension friendly name.
29
+         *
30
+         * @var string
31
+         */
32
+        public string $extension_name = 'Google Maps';
33 33
 
34
-		/**
35
-		 * ReduxFramework_extension_google_maps constructor.
36
-		 *
37
-		 * @param ReduxFramework $redux ReduxFramework object.
38
-		 */
39
-		public function __construct( $redux ) {
40
-			parent::__construct( $redux, __FILE__ );
34
+        /**
35
+         * ReduxFramework_extension_google_maps constructor.
36
+         *
37
+         * @param ReduxFramework $redux ReduxFramework object.
38
+         */
39
+        public function __construct( $redux ) {
40
+            parent::__construct( $redux, __FILE__ );
41 41
 
42
-			$this->add_field( 'google_maps' );
43
-		}
44
-	}
42
+            $this->add_field( 'google_maps' );
43
+        }
44
+    }
45 45
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/multi_media/class-redux-extension-multi-media.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -14,70 +14,70 @@
 block discarded – undo
14 14
 // Don't duplicate me!
15 15
 if ( ! class_exists( 'Redux_Extension_Multi_Media' ) ) {
16 16
 
17
-	/**
18
-	 * Main Redux_Extension_multi_media extension class
19
-	 *
20
-	 * @since       1.0.0
21
-	 */
22
-	class Redux_Extension_Multi_Media extends Redux_Extension_Abstract {
17
+    /**
18
+     * Main Redux_Extension_multi_media extension class
19
+     *
20
+     * @since       1.0.0
21
+     */
22
+    class Redux_Extension_Multi_Media extends Redux_Extension_Abstract {
23 23
 
24
-		/**
25
-		 * Extension version.
26
-		 *
27
-		 * @var string
28
-		 */
29
-		public static $version = '4.4.1';
24
+        /**
25
+         * Extension version.
26
+         *
27
+         * @var string
28
+         */
29
+        public static $version = '4.4.1';
30 30
 
31
-		/**
32
-		 * Extension name.
33
-		 *
34
-		 * @var string
35
-		 */
36
-		public string $extension_name = 'Multi Media';
31
+        /**
32
+         * Extension name.
33
+         *
34
+         * @var string
35
+         */
36
+        public string $extension_name = 'Multi Media';
37 37
 
38
-		/**
39
-		 * Class Constructor. Defines the args for the extensions class
40
-		 *
41
-		 * @since       1.0.0
42
-		 * @access      public
43
-		 *
44
-		 * @param       ReduxFramework $redux Parent settings.
45
-		 *
46
-		 * @return      void
47
-		 */
48
-		public function __construct( $redux ) {
49
-			parent::__construct( $redux, __FILE__ );
38
+        /**
39
+         * Class Constructor. Defines the args for the extensions class
40
+         *
41
+         * @since       1.0.0
42
+         * @access      public
43
+         *
44
+         * @param       ReduxFramework $redux Parent settings.
45
+         *
46
+         * @return      void
47
+         */
48
+        public function __construct( $redux ) {
49
+            parent::__construct( $redux, __FILE__ );
50 50
 
51
-			$this->add_field( 'multi_media' );
52
-		}
51
+            $this->add_field( 'multi_media' );
52
+        }
53 53
 
54
-		/**
55
-		 * Get extended image data.
56
-		 *
57
-		 * @param int|string $id image ID.
58
-		 *
59
-		 * @return array|null
60
-		 * @depreacted Remove camelCase function name.
61
-		 */
62
-		public static function getExtendedData( $id ): ?array {
63
-			_deprecated_function( 'getExtendedData', '4.3.15', 'Redux_Extension_Multi_Media::get_extended_data( $id )' );
54
+        /**
55
+         * Get extended image data.
56
+         *
57
+         * @param int|string $id image ID.
58
+         *
59
+         * @return array|null
60
+         * @depreacted Remove camelCase function name.
61
+         */
62
+        public static function getExtendedData( $id ): ?array {
63
+            _deprecated_function( 'getExtendedData', '4.3.15', 'Redux_Extension_Multi_Media::get_extended_data( $id )' );
64 64
 
65
-			return self::get_extended_data( $id );
66
-		}
65
+            return self::get_extended_data( $id );
66
+        }
67 67
 
68
-		/**
69
-		 * Get extended image data.
70
-		 *
71
-		 * @param int|string $id image ID.
72
-		 *
73
-		 * @return array|null
74
-		 */
75
-		public static function get_extended_data( $id ): ?array {
76
-			if ( '' !== $id && is_numeric( $id ) ) {
77
-				return wp_prepare_attachment_for_js( $id );
78
-			}
68
+        /**
69
+         * Get extended image data.
70
+         *
71
+         * @param int|string $id image ID.
72
+         *
73
+         * @return array|null
74
+         */
75
+        public static function get_extended_data( $id ): ?array {
76
+            if ( '' !== $id && is_numeric( $id ) ) {
77
+                return wp_prepare_attachment_for_js( $id );
78
+            }
79 79
 
80
-			return null;
81
-		}
82
-	}
80
+            return null;
81
+        }
82
+    }
83 83
 }
Please login to merge, or discard this patch.
inc/extensions/widget_areas/class-redux-extension-widget-areas.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -14,46 +14,46 @@
 block discarded – undo
14 14
 
15 15
 if ( ! class_exists( 'Redux_Extension_Widget_Areas' ) ) {
16 16
 
17
-	/**
18
-	 * Class Redux_Extension_Widget_Areas
19
-	 */
20
-	class Redux_Extension_Widget_Areas extends Redux_Extension_Abstract {
21
-
22
-		/**
23
-		 * Extension version.
24
-		 *
25
-		 * @var string
26
-		 */
27
-		public static $version = '4.3.20';
28
-
29
-		/**
30
-		 * Extension Friendly name.
31
-		 *
32
-		 * @var string
33
-		 */
34
-		public string $extension_name = 'Widget Areas';
35
-
36
-
37
-		/**
38
-		 * Redux_Extension_Widget_Areas constructor.
39
-		 *
40
-		 * @param ReduxFramework $redux ReduxFramework object pointer.
41
-		 */
42
-		public function __construct( $redux ) {
43
-			parent::__construct( $redux, __FILE__ );
44
-
45
-			$this->add_field( 'widget_areas' );
46
-
47
-			require_once __DIR__ . '/class-redux-widget-areas.php';
48
-			$widget_areas = new Redux_Widget_Areas( $this->parent );
49
-
50
-			// Allow users to extend if they want.
51
-			// Phpcs:ignore WordPress.NamingConventions.ValidHookName
52
-			do_action( 'redux/widget_areas/' . $redux->args['opt_name'] . '/construct' );
53
-
54
-			add_action( 'wp_ajax_redux_delete_widget_area', array( $widget_areas, 'redux_delete_widget_area_area' ) );
55
-		}
56
-	}
57
-
58
-	class_alias( Redux_Extension_Widget_Areas::class, 'ReduxFramework_extension_widget_areas' );
17
+    /**
18
+     * Class Redux_Extension_Widget_Areas
19
+     */
20
+    class Redux_Extension_Widget_Areas extends Redux_Extension_Abstract {
21
+
22
+        /**
23
+         * Extension version.
24
+         *
25
+         * @var string
26
+         */
27
+        public static $version = '4.3.20';
28
+
29
+        /**
30
+         * Extension Friendly name.
31
+         *
32
+         * @var string
33
+         */
34
+        public string $extension_name = 'Widget Areas';
35
+
36
+
37
+        /**
38
+         * Redux_Extension_Widget_Areas constructor.
39
+         *
40
+         * @param ReduxFramework $redux ReduxFramework object pointer.
41
+         */
42
+        public function __construct( $redux ) {
43
+            parent::__construct( $redux, __FILE__ );
44
+
45
+            $this->add_field( 'widget_areas' );
46
+
47
+            require_once __DIR__ . '/class-redux-widget-areas.php';
48
+            $widget_areas = new Redux_Widget_Areas( $this->parent );
49
+
50
+            // Allow users to extend if they want.
51
+            // Phpcs:ignore WordPress.NamingConventions.ValidHookName
52
+            do_action( 'redux/widget_areas/' . $redux->args['opt_name'] . '/construct' );
53
+
54
+            add_action( 'wp_ajax_redux_delete_widget_area', array( $widget_areas, 'redux_delete_widget_area_area' ) );
55
+        }
56
+    }
57
+
58
+    class_alias( Redux_Extension_Widget_Areas::class, 'ReduxFramework_extension_widget_areas' );
59 59
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/tabbed/class-redux-extension-tabbed.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -15,39 +15,39 @@
 block discarded – undo
15 15
 if ( ! class_exists( 'Redux_Extension_Tabbed' ) ) {
16 16
 
17 17
 
18
-	/**
19
-	 * Class Redux_Extension_Tabbed
20
-	 */
21
-	class Redux_Extension_Tabbed extends Redux_Extension_Abstract {
22
-
23
-		/**
24
-		 * Extension version.
25
-		 *
26
-		 * @var string
27
-		 */
28
-		public static $version = '4.4.8';
29
-
30
-		/**
31
-		 * Extension friendly name.
32
-		 *
33
-		 * @var string
34
-		 */
35
-		public string $extension_name = 'Tabbed';
36
-
37
-		/**
38
-		 * Class Constructor. Defines the args for the extensions class
39
-		 *
40
-		 * @since       1.0.0
41
-		 * @access      public
42
-		 *
43
-		 * @param       object $redux Parent settings.
44
-		 *
45
-		 * @return      void
46
-		 */
47
-		public function __construct( $redux ) {
48
-			parent::__construct( $redux, __FILE__ );
49
-
50
-			$this->add_field( 'tabbed' );
51
-		}
52
-	}
18
+    /**
19
+     * Class Redux_Extension_Tabbed
20
+     */
21
+    class Redux_Extension_Tabbed extends Redux_Extension_Abstract {
22
+
23
+        /**
24
+         * Extension version.
25
+         *
26
+         * @var string
27
+         */
28
+        public static $version = '4.4.8';
29
+
30
+        /**
31
+         * Extension friendly name.
32
+         *
33
+         * @var string
34
+         */
35
+        public string $extension_name = 'Tabbed';
36
+
37
+        /**
38
+         * Class Constructor. Defines the args for the extensions class
39
+         *
40
+         * @since       1.0.0
41
+         * @access      public
42
+         *
43
+         * @param       object $redux Parent settings.
44
+         *
45
+         * @return      void
46
+         */
47
+        public function __construct( $redux ) {
48
+            parent::__construct( $redux, __FILE__ );
49
+
50
+            $this->add_field( 'tabbed' );
51
+        }
52
+    }
53 53
 }
Please login to merge, or discard this patch.
redux-core/inc/extensions/icon_select/class-redux-extension-icon-select.php 1 patch
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -16,115 +16,115 @@
 block discarded – undo
16 16
 if ( ! class_exists( 'Redux_Extension_Icon_Select' ) ) {
17 17
 
18 18
 
19
-	/**
20
-	 * Main ReduxFramework icon_select extension class
21
-	 *
22
-	 * @since       3.1.6
23
-	 */
24
-	class Redux_Extension_Icon_Select extends Redux_Extension_Abstract {
25
-
26
-		/**
27
-		 * Extension version.
28
-		 *
29
-		 * @var string
30
-		 */
31
-		public static $version = '4.4.2';
32
-
33
-		/**
34
-		 * Extension friendly name.
35
-		 *
36
-		 * @var string
37
-		 */
38
-		public string $extension_name = 'Icon Select';
39
-
40
-		/**
41
-		 * ReduxFramework_Extension_Icon_Select constructor.
42
-		 *
43
-		 * @param ReduxFramework $redux ReduxFramework object.
44
-		 */
45
-		public function __construct( $redux ) {
46
-			parent::__construct( $redux, __FILE__ );
47
-
48
-			$this->add_field( 'icon_select' );
49
-
50
-			add_action( 'wp_ajax_redux_get_icons', array( $this, 'get_icons' ) );
51
-		}
52
-
53
-		/**
54
-		 * Add icons to modal.
55
-		 *
56
-		 * @return void
57
-		 */
58
-		public function get_icons() {
59
-			$nonce       = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
60
-			$icon_set    = ( ! empty( $_POST['icon_set'] ) ) ? sanitize_text_field( wp_unslash( $_POST['icon_set'] ) ) : '';
61
-			$select_text = ( ! empty( $_POST['select_text'] ) ) ? sanitize_text_field( wp_unslash( $_POST['select_text'] ) ) : '';
62
-
63
-			if ( ! wp_verify_nonce( $nonce, 'redux_icon_nonce' ) ) {
64
-				wp_send_json_error( array( 'error' => esc_html__( 'Error: Invalid nonce verification.', 'redux-framework' ) ) );
65
-			}
66
-
67
-			ob_start();
68
-
69
-			$class = '';
70
-
71
-			if ( 'font-awesome' === $icon_set ) {
72
-				require_once Redux_Core::$dir . 'inc/lib/font-awesome-6-free.php';
73
-
74
-				// phpcs:ignore WordPress.NamingConventions.ValidHookName
75
-				$icon_lists = apply_filters( 'redux/extensions/icon_select/fontawesome/icons', redux_icon_select_fa_6_free() );
76
-			} elseif ( 'dashicons' === $icon_set ) {
77
-				require_once Redux_Core::$dir . 'inc/lib/dashicons.php';
78
-
79
-				// phpcs:ignore WordPress.NamingConventions.ValidHookName
80
-				$icon_lists = apply_filters( 'redux/extensions/icon_select/dashicons/icons', redux_get_dashicons() );
81
-			} elseif ( 'elusive' === $icon_set ) {
82
-				require_once Redux_Core::$dir . 'inc/lib/elusive-icons.php';
83
-
84
-				// phpcs:ignore WordPress.NamingConventions.ValidHookName
85
-				$icon_lists = apply_filters( 'redux/extensions/icon_select/elusive/icons', redux_get_font_icons() );
86
-			} else {
87
-				$data  = ( ! empty( $_POST['data'] ) ) ? ( wp_unslash( $_POST['data'] ) ) : ''; // phpcs:ignore WordPress.Security
88
-				$data  = json_decode( rawurldecode( $data ), true );
89
-				$icons = '';
90
-
91
-				foreach ( $data as $arr_data ) {
92
-					if ( $arr_data['title'] === $select_text ) {
93
-						$icons = $arr_data['icons'];
94
-
95
-						$class = ( ! empty( $arr_data['class'] ) ? $arr_data['class'] . ' ' : '' );
96
-					}
97
-				}
98
-
99
-				// phpcs:ignore WordPress.NamingConventions.ValidHookName
100
-				$icon_lists = apply_filters( 'redux/extensions/icon_select/custom/icons', $icons );
101
-			}
102
-
103
-			if ( ! empty( $icon_lists ) ) {
104
-				foreach ( $icon_lists as $list ) {
105
-
106
-					/**
107
-					 * Icon output.
108
-					 * Custom output for icon libraries that support different standards.
109
-					 *
110
-					 * @param string $default Original output.
111
-					 * @param string $title   Title of the icon.
112
-					 * @param string $class   Class of the icon.
113
-					 * @param string $icon_Set Selected Icon set.
114
-					 *
115
-					 * @since 4.4.2
116
-					 */
117
-					echo apply_filters( 'redux/extension/icon_select/' . $this->parent->args['opt_name'] . '/output', '<i title="' . esc_attr( $list ) . '" class="' . esc_attr( $class . ' ' . $list ) . '" /></i>', $list, $class, $select_text ); // phpcs:ignore WordPress.NamingConventions.ValidHookName, WordPress.Security.EscapeOutput
118
-				}
119
-			} else {
120
-				echo '<div class="redux-error-text">' . esc_html__( 'No data available.', 'redux-framework' ) . '</div>';
121
-			}
122
-
123
-			$content = ob_get_clean();
124
-
125
-			wp_send_json_success( array( 'content' => $content ) );
126
-		}
127
-	}
128
-
129
-	class_alias( Redux_Extension_Icon_Select::class, 'ReduxFramework_extension_icon_select' );
19
+    /**
20
+     * Main ReduxFramework icon_select extension class
21
+     *
22
+     * @since       3.1.6
23
+     */
24
+    class Redux_Extension_Icon_Select extends Redux_Extension_Abstract {
25
+
26
+        /**
27
+         * Extension version.
28
+         *
29
+         * @var string
30
+         */
31
+        public static $version = '4.4.2';
32
+
33
+        /**
34
+         * Extension friendly name.
35
+         *
36
+         * @var string
37
+         */
38
+        public string $extension_name = 'Icon Select';
39
+
40
+        /**
41
+         * ReduxFramework_Extension_Icon_Select constructor.
42
+         *
43
+         * @param ReduxFramework $redux ReduxFramework object.
44
+         */
45
+        public function __construct( $redux ) {
46
+            parent::__construct( $redux, __FILE__ );
47
+
48
+            $this->add_field( 'icon_select' );
49
+
50
+            add_action( 'wp_ajax_redux_get_icons', array( $this, 'get_icons' ) );
51
+        }
52
+
53
+        /**
54
+         * Add icons to modal.
55
+         *
56
+         * @return void
57
+         */
58
+        public function get_icons() {
59
+            $nonce       = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
60
+            $icon_set    = ( ! empty( $_POST['icon_set'] ) ) ? sanitize_text_field( wp_unslash( $_POST['icon_set'] ) ) : '';
61
+            $select_text = ( ! empty( $_POST['select_text'] ) ) ? sanitize_text_field( wp_unslash( $_POST['select_text'] ) ) : '';
62
+
63
+            if ( ! wp_verify_nonce( $nonce, 'redux_icon_nonce' ) ) {
64
+                wp_send_json_error( array( 'error' => esc_html__( 'Error: Invalid nonce verification.', 'redux-framework' ) ) );
65
+            }
66
+
67
+            ob_start();
68
+
69
+            $class = '';
70
+
71
+            if ( 'font-awesome' === $icon_set ) {
72
+                require_once Redux_Core::$dir . 'inc/lib/font-awesome-6-free.php';
73
+
74
+                // phpcs:ignore WordPress.NamingConventions.ValidHookName
75
+                $icon_lists = apply_filters( 'redux/extensions/icon_select/fontawesome/icons', redux_icon_select_fa_6_free() );
76
+            } elseif ( 'dashicons' === $icon_set ) {
77
+                require_once Redux_Core::$dir . 'inc/lib/dashicons.php';
78
+
79
+                // phpcs:ignore WordPress.NamingConventions.ValidHookName
80
+                $icon_lists = apply_filters( 'redux/extensions/icon_select/dashicons/icons', redux_get_dashicons() );
81
+            } elseif ( 'elusive' === $icon_set ) {
82
+                require_once Redux_Core::$dir . 'inc/lib/elusive-icons.php';
83
+
84
+                // phpcs:ignore WordPress.NamingConventions.ValidHookName
85
+                $icon_lists = apply_filters( 'redux/extensions/icon_select/elusive/icons', redux_get_font_icons() );
86
+            } else {
87
+                $data  = ( ! empty( $_POST['data'] ) ) ? ( wp_unslash( $_POST['data'] ) ) : ''; // phpcs:ignore WordPress.Security
88
+                $data  = json_decode( rawurldecode( $data ), true );
89
+                $icons = '';
90
+
91
+                foreach ( $data as $arr_data ) {
92
+                    if ( $arr_data['title'] === $select_text ) {
93
+                        $icons = $arr_data['icons'];
94
+
95
+                        $class = ( ! empty( $arr_data['class'] ) ? $arr_data['class'] . ' ' : '' );
96
+                    }
97
+                }
98
+
99
+                // phpcs:ignore WordPress.NamingConventions.ValidHookName
100
+                $icon_lists = apply_filters( 'redux/extensions/icon_select/custom/icons', $icons );
101
+            }
102
+
103
+            if ( ! empty( $icon_lists ) ) {
104
+                foreach ( $icon_lists as $list ) {
105
+
106
+                    /**
107
+                     * Icon output.
108
+                     * Custom output for icon libraries that support different standards.
109
+                     *
110
+                     * @param string $default Original output.
111
+                     * @param string $title   Title of the icon.
112
+                     * @param string $class   Class of the icon.
113
+                     * @param string $icon_Set Selected Icon set.
114
+                     *
115
+                     * @since 4.4.2
116
+                     */
117
+                    echo apply_filters( 'redux/extension/icon_select/' . $this->parent->args['opt_name'] . '/output', '<i title="' . esc_attr( $list ) . '" class="' . esc_attr( $class . ' ' . $list ) . '" /></i>', $list, $class, $select_text ); // phpcs:ignore WordPress.NamingConventions.ValidHookName, WordPress.Security.EscapeOutput
118
+                }
119
+            } else {
120
+                echo '<div class="redux-error-text">' . esc_html__( 'No data available.', 'redux-framework' ) . '</div>';
121
+            }
122
+
123
+            $content = ob_get_clean();
124
+
125
+            wp_send_json_success( array( 'content' => $content ) );
126
+        }
127
+    }
128
+
129
+    class_alias( Redux_Extension_Icon_Select::class, 'ReduxFramework_extension_icon_select' );
130 130
 }
Please login to merge, or discard this patch.