-
Notifications
You must be signed in to change notification settings - Fork 585
/
Copy pathframework.php
891 lines (765 loc) · 21.7 KB
/
framework.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Redux Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License or
* any later version.
*
* Redux Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Redux Framework. If not, see <https://www.gnu.org/licenses/>.
*
* The addition of the noinspection tags is because there are devs writing their
* in-house extensions improperly, and we have to compensate for that.
*
* @package Redux_Framework
* @subpackage Core
* @subpackage Core
* @author Redux Framework Team
*
* @noinspection PhpMissingParamTypeInspection
* @noinspection PhpMissingReturnTypeInspection
* @noinspection PhpUnhandledExceptionInspection
* @noinspection PhpDeprecationInspection
* @noinspection PhpUnused
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
require_once __DIR__ . '/class-redux-core.php';
Redux_Core::$version = '4.5.6.1';
Redux_Core::$redux_path = __DIR__;
Redux_Core::instance();
// Don't duplicate me!
if ( ! class_exists( 'ReduxFramework', false ) ) {
/**
* Main ReduxFramework class
*
* @since 1.0.0
*/
class ReduxFramework {
/**
* ReduxFramework instance storage.
*
* @var null|ReduxFramework
* @access public
*/
public static ?ReduxFramework $instance;
/**
* Redux current version.
*
* @var string
* @access public
*
* @deprecated 4.0.0
*/
public static string $_version = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Absolute directory of the Redux instance.
*
* @var string
* @access public
*
* @deprecated 4.0.0
*/
public static string $_dir = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Full URL of the Redux instance.
*
* @var string
* @access public
*
* @deprecated 4.0.0
*/
public static string $_url = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Current WordPress upload directory.
*
* @var string
* @access public
*
* @deprecated 4.0.0
*/
public static string $_upload_dir = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Current WordPress upload URL
*
* @var string
* @access public
*
* @deprecated 4.0.0
*/
public static string $_upload_url; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Init
*
* Backward compatibility for previous versions of Redux.
*/
public static function init() {
// Backward compatibility for extensions.
self::$_version = Redux_Core::$version;
self::$_dir = Redux_Core::$dir;
self::$_url = Redux_Core::$url;
self::$_upload_dir = Redux_Core::$upload_dir;
self::$_upload_url = Redux_Core::$upload_url;
self::$_as_plugin = Redux_Core::$as_plugin;
self::$_is_plugin = Redux_Core::$is_plugin;
}
/**
* Array of field arrays.
*
* @var null|array
*/
public ?array $fields = array();
/**
* Array of field sections.
*
* @var null|array
*/
public ?array $field_sections = array();
/**
* Array of field types.
*
* @var null|array
*/
public ?array $field_types = array();
/**
* Array of field heads.
*
* @var null|array
*/
public ?array $field_head = array();
/**
* Array of extensions by type used in the panel.
*
* @var null|array
*/
public ?array $extensions = array();
/**
* Array of sections and fields arrays.
*
* @var null|array
*/
public ?array $sections = array();
/**
* Array of generated errors from the panel for localization.
*
* @var null|array
*/
public ?array $errors = array();
/**
* Array of generated warnings from the panel for localization.
*
* @var null|array
*/
public ?array $warnings = array();
/**
* Array of generated sanitize notices from the panel for localization.
*
* @var null|array
*/
public ?array $sanitize = array();
/**
* Array of current option values.
*
* @var null|array
*/
public ?array $options = array();
/**
* Array of option defaults.
*
* @var null|array
*/
public ?array $options_defaults = null;
/**
* Array of fields set to trigger the compiler hook.
*
* @var null|array
*/
public ?array $compiler_fields = array();
/**
* Array of fields with CSS output selectors.
*
* @var null|array
*/
public ?array $output = array();
/**
* Autogenerated CSS appended to the header (snake case maintained for backward compatibility).
*
* @var null|string
*/
public ?string $outputCSS = ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
/**
* Autogenerated variables appended to dynamic output.
*
* @var null|array
*/
public ?array $output_variables = array();
/**
* CSS sent to the compiler hook (snake case maintained for backward compatibility).
*
* @var null|string
*/
public ?string $compilerCSS = ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
/**
* Array of global arguments.
*
* @var array|null
*/
public ?array $args = array();
/**
* Used in customizer hooks.
*
* @var null|string
*/
public ?string $old_opt_name = '';
/**
* Pointer to the Redux_Options_Default class.
*
* @var null|Redux_Options_Defaults
*/
public ?Redux_Options_Defaults $options_defaults_class = null;
/**
* Pointer to the Redux_Options class.
*
* @var null|Redux_Options_Constructor
*/
public ?Redux_Options_Constructor $options_class = null;
/**
* Pointer to the Redux_Required class
*
* @var null|Redux_Required
*/
public ?Redux_Required $required_class = null;
/**
* Pointer to the Redux_Output class.
*
* @var null|Redux_Output
*/
public ?Redux_Output $output_class = null;
/**
* Pointer to the Redux_Page_Render class.
*
* @var null|Redux_Page_Render
*/
public ?Redux_Page_Render $render_class = null;
/**
* Pointer to the Redux_Enqueue class.
*
* @var null|Redux_Enqueue
*/
public ?Redux_Enqueue $enqueue_class = null;
/**
* Pointer to the Redux_Transients class.
*
* @var null|Redux_Transients
*/
public ?Redux_Transients $transient_class = null;
/**
* Pointer to the Redux_wordPress_Data class.
*
* @var null|Redux_WordPress_Data
*/
public ?Redux_WordPress_Data $wordpress_data = null;
/**
* Pointer to the Redux_Validation class.
*
* @var null|Redux_Validation
*/
public ?Redux_Validation $validate_class = null;
/**
* Pointer to the Redux_Sanitize class.
*
* @var null|Redux_Sanitize
*/
public ?Redux_Sanitize $sanitize_class = null;
/**
* Pointer to the Redux_Args class.
*
* @var null|Redux_Args
*/
public ?Redux_Args $args_class = null;
/**
* Array of active transients used by Redux.
*
* @var null|mixed
*/
public $transients = array();
/**
* Array of localized repeater data.
*
* @var null|array
*/
public ?array $repeater_data = array();
/**
* Array of localized data.
*
* @var null|array
*/
public ?array $localize_data = array();
/**
* Array of checked transients used by Redux.
*
* @var null|mixed
*/
public $transients_check = array();
/**
* Never save to DB flag for metaboxes.
*
* @var bool
*/
public bool $never_save_to_db;
/**
* File system object used for I/O file operations. Done the WordPress way.
*
* @var null|object
*
* @deprecated 4.5.1
*/
public ?object $filesystem;
/**
* Deprecated shim for v3 templates.
*
* @var null|array
*
* @deprecated 4.0.0
*/
public ?array $hidden_perm_sections = array();
/**
* Deprecated shim for v3 as plugin check.
*
* @var bool
*
* @deprecated 4.0.0
*/
public static bool $_as_plugin = false; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Deprecated shim for v3 as plugin check.
*
* @var bool
*
* @deprecated 4.0.0
*/
public static bool $_is_plugin = false; // phpcs:ignore PSR2.Classes.PropertyDeclaration
/**
* Cloning is forbidden.
*
* @since 4.0.0
*/
public function __clone() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ eh?', 'redux-framework' ), '4.0' );
}
/**
* Un-serializing instances of this class are forbidden.
*
* @since 4.0.0
*/
public function __wakeup() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ eh?', 'redux-framework' ), '4.0' );
}
/**
* Add a deprecating notice for all the old themes that still use this method..
*
* @param object $filesystem Filesystem object.
*
* @since 4.0.0
*/
private function deprecated_filesystem( $filesystem ) {
//_deprecated_function( esc_html__( 'The global variable "$filesystem" of the ReduxFramework object', 'redux-framework' ), '4.5.1', 'Redux_Core::$filesystem' );
return $filesystem;
}
/**
* Class Constructor. Defines the args for the theme options class
*
* @param array $sections Panel sections.
* @param array $args Class constructor arguments.
*
* @throws ReflectionException Exception.
* @since 1.0.0
*/
public function __construct( array $sections = array(), array $args = array() ) {
global $pagenow;
if ( Redux_Core::is_heartbeat() ) {
return;
}
$args['load_on_cron'] = $args['load_on_cron'] ?? false;
if ( false === $args['load_on_cron'] && 'wp-cron.php' === $pagenow ) {
return;
}
if ( empty( $args ) || ( empty( $args['opt_name'] ) ) ) {
return;
}
if ( ! isset( Redux::$init[ $args['opt_name'] ] ) ) {
// Let's go back to the Redux API instead of having it run directly.
Redux_Functions_Ex::record_caller( $args['opt_name'] );
Redux::set_args( $args['opt_name'], $args );
if ( ! empty( $sections ) ) {
Redux::set_sections( $args['opt_name'], $sections );
}
$sections = Redux::construct_sections( $args['opt_name'] );
$args = Redux::construct_args( $args['opt_name'] );
Redux::set_defaults( $args['opt_name'] );
Redux::$init[ $args['opt_name'] ] = 1;
}
$args = new Redux_Args( $this, $args );
$this->args_class = $args;
$this->args = $args->get;
Redux_Core::core_construct( $this );
new Redux_Admin_Notices( $this );
if ( ! empty( $this->args['opt_name'] ) ) {
new Redux_Instances( $this );
Redux_Core::$filesystem = Redux_Filesystem::get_instance( $this );
$this->filesystem = $this->deprecated_filesystem( Redux_Core::$filesystem );
/**
* Filter 'redux/options/{opt_name}/sections'
*
* @param array $sections field option sections
*/
// phpcs:ignore WordPress.NamingConventions.ValidHookName
$this->sections = apply_filters( "redux/options/{$this->args['opt_name']}/sections", $sections );
/**
* Construct hook
* action 'redux/construct'
*
* @param object $this ReduxFramework
*/
// phpcs:ignore WordPress.NamingConventions.ValidHookName
do_action( 'redux/construct', $this );
// Internationalization.
new Redux_I18n( $this, __FILE__ );
$this->required_class = new Redux_Required( $this );
$this->transient_class = new Redux_Transients( $this );
$this->wordpress_data = new Redux_WordPress_Data( $this );
$this->validate_class = new Redux_Validation( $this );
$this->sanitize_class = new Redux_Sanitize( $this );
// Register extra extensions.
new Redux_Extensions( $this );
// Grab database values.
$this->options_defaults_class = new Redux_Options_Defaults();
$this->options_class = new Redux_Options_Constructor( $this );
$this->options_class->get();
$this->output_class = new Redux_Output( $this );
$this->render_class = new Redux_Page_Render( $this );
$this->enqueue_class = new Redux_Enqueue( $this );
new Redux_AJAX_Save( $this );
new Redux_AJAX_Typography( $this );
new Redux_AJAX_Select2( $this );
}
/**
* Loaded hook
* action 'redux/loaded'
*
* @param object $this ReduxFramework
*/
// phpcs:ignore WordPress.NamingConventions.ValidHookName
do_action( 'redux/loaded', $this );
}
/**
* Begin backward compatibility shims for Redux v3 configs and extensions.
*/
/**
* SHIM: _register_settings
*
* @deprecated 4.0.0
*/
public function _register_settings() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->register()' );
$this->options_class->register();
}
/**
* SHIM: _field_input
*
* @param array $field Field array.
* @param string|array $v Field values.
*
* @deprecated 4.0.0
*/
public function _field_input( array $field, $v = null ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'render_class->field_input( $field, $value )' );
$this->render_class->field_input( $field, $v );
}
/**
* SHIM: field_default_values
*
* @param array $field Field array.
*
* @deprecated 4.0.0
*/
public function field_default_values( array $field ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'options_defaults_class->field_default_values( $opt_name, $field )' );
$this->options_defaults_class->field_default_values( '', $field );
}
/**
* SHIM: set_options
*
* @param string|array $value Option values.
*
* @deprecated 4.0.0
*/
public function set_options( $value ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->set( $value )' );
$this->options_class->set( $value );
}
/**
* SHIM: get_options
*
* @deprecated 4.0.0
*/
public function get_options() {
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->get()' );
$this->options_class->get();
}
/**
* SHIM: _default_values
*
* @return array
*
* @deprecated 4.0.0
*/
public function _default_values() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->default_values()' );
return $this->default_values();
}
/**
* Get default values.
*
* @return array
*/
public function default_values() {
if ( ! isset( $this->options_class ) ) {
$this->options_defaults_class = new Redux_Options_Defaults();
$this->options_class = new Redux_Options_Constructor( $this );
}
return $this->options_class->default_values();
}
/**
* SHIM: check_dependencies
*
* @param array $field Field array.
*
* @deprecated 4.0.0
*/
public function check_dependencies( array $field ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'required_class->check_dependencies( $field )' );
$this->required_class->check_dependencies( $field );
}
/**
* SHIM: _enqueue_output
*
* @throws ReflectionException Exception.
*
* @deprecated 4.0.0
*/
public function _enqueue_output() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'output_class->enqueue()' );
if ( empty( $this->output_class ) ) {
$obj = new ReduxFramework( $this->sections, $this->args );
$obj->options = $this->options;
$obj->output_class->enqueue();
$this->outputCSS = $obj->outputCSS; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
} else {
$this->output_class->enqueue();
}
}
/**
* SHIM: _enqueue
*
* @deprecated 4.0.0
*/
public function _enqueue() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'enqueue_class->init()' );
$this->enqueue_class->init();
}
/**
* _enqueue replacement.
*
* @return void
*/
public function init_enqueue() {
$this->enqueue_class->init();
}
/**
* SHIM: generate_panel
*
* @since 1.0.0
* @access public
* @return void
*
* @deprecated 4.0.0
*/
public function generate_panel() {
_deprecated_function( __FUNCTION__, '4.0.0', 'render_class->generate_panel()' );
$this->render_class->generate_panel();
}
/**
* SHIM: get_default_values
*
* @param string $key Key value.
* @param bool $array_key Flag to determine array status.
*
* @return array
*
* @deprecated 4.0.0
*/
public function get_default_values( $key, $array_key = false ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->get_default_value( $key, $array_key )' );
if ( ! isset( $this->options_class ) ) {
$this->options_defaults_class = new Redux_Options_Defaults();
$this->options_class = new Redux_Options_Constructor( $this );
}
return $this->options_class->get_default_value( $key, $array_key );
}
/**
* SHIM: get_default_value
*
* @param string $key Key value.
* @param bool $array_key Flag to determine array status.
*
* @return array
*
* @deprecated 4.0.0
*/
public function get_default_value( $key, $array_key = false ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'options_class->get_default_value( $key, $array_key )' );
if ( ! isset( $this->options_class ) ) {
$this->options_defaults_class = new Redux_Options_Defaults();
$this->options_class = new Redux_Options_Constructor( $this );
}
return $this->options_class->get_default_value( $key, $array_key );
}
/**
* SHIM: get_wordpress_data
*
* @param bool $type data type.
* @param array $args args to pass to WordPress API.
* @param string|array $current_value Current value.
*
* @return array|mixed|string|void
*
* @deprecated 4.0.0
*/
public function get_wordpress_data( $type = false, $args = array(), $current_value = null ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'wordpress_data->get( $type, $args, $opt_name, $value )' );
return $this->wordpress_data->get( $type, $args, $this->args['opt_name'], $current_value );
}
/**
* SHIM: _validate_values
*
* @param array $plugin_options Current panel options.
* @param array $options Options to validate.
* @param array $sections Sections array.
*
* @return array
*
* @deprecated 4.0.0
*/
public function _validate_values( $plugin_options, $options, $sections ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
_deprecated_function( __FUNCTION__, '4.0.0', 'validate_class->validate( $plugin_options, $options, $sections )' );
if ( ! isset( $this->validate_class ) ) {
$this->validate_class = new Redux_Validation( $this );
}
return $this->validate_class->validate( $plugin_options, $options, $sections );
}
/**
* SHIM: set_transients
*
* @return void
*
* @deprecated 4.0.0
*/
public function set_transients() {
_deprecated_function( __FUNCTION__, '4.0.0', 'Please update the extension that uses this deprecated function.' );
}
/**
* SHIM: section_menu
*
* @param int $k Array Key.
* @param array $section Section array.
* @param string $suffix Unique string.
* @param array $sections Section array.
*
* @return string
*
* @deprecated 4.0.0
*/
public function section_menu( $k, $section, $suffix = '', $sections = array() ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'render_class->section_menu( $index, $section, $suffix, $sections )' );
return $this->render_class->section_menu( $k, $section, $suffix, $sections );
}
/**
* SHIM: get_header_html
*
* @param array $field Field array.
*
* @return string
*
* @deprecated 4.0.0
*/
public function get_header_html( $field ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'render_class->get_header_html( $field )' );
return $this->render_class->get_header_html( $field );
}
/**
* SHIM: current_user_can
*
* @param string $permission User permission.
*
* @return bool
*
* @deprecated 4.0.0
*/
public function current_user_can( $permission ) {
_deprecated_function( __FUNCTION__, '4.0.0', 'Redux_Helpers::current_user_can' );
return Redux_Helpers::current_user_can( $permission );
}
/**
* End backward compatibility shims for Redux v3 configs and extensions.
*/
/**
* Pointer to the ReduxFramework instance.
*
* @return ReduxFramework|null
*/
public function get_instance(): ?ReduxFramework {
return self::$instance;
}
/**
* →get(); This is used to return and option value from the option array
*
* @since 1.0.0
* @access public
*
* @param string $opt_name The option name to return.
* @param mixed $defaults (null) The value to return if an option isn't set.
*
* @return mixed
*/
public function get( string $opt_name, $defaults = null ) {
return ( ! empty( $this->options[ $opt_name ] ) ) ? $this->options[ $opt_name ] : $this->options_class->get_default( $opt_name, $defaults );
}
/**
* →set(); This is used to set an arbitrary option in the option array
*
* @since 1.0.0
* @access public
*
* @param string $opt_name The name of the option being added.
* @param mixed $values The value of the option being added.
*
* @return void
*/
public function set( string $opt_name = '', $values = array() ) {
if ( ! empty( $opt_name ) && is_array( $values ) ) {
$this->options[ $opt_name ] = $values;
$this->options_class->set( $values );
}
}
}
ReduxFramework::init();
/**
* Action 'redux/init'
*/
do_action( 'redux/init' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
}