';
+ /**
+ * Tab content
+ */
+ foreach ( $tabs as $key => $tab ) {
+
+ reset( $tabs );
+ $tab_active = ( $key === key( $tabs ) ) ? ' active' : '';
+
+ echo '
';
+ echo '';
+ echo '
';
+ echo '
';
foreach ( $tab['fields'] as $field ) {
@@ -69,8 +85,8 @@ public function output() {
}
echo '
';
-
- $i++;
+ echo '
';
+ echo '
';
}
diff --git a/exopite-notificator/admin/exopite-simple-options/fields/typography.php b/exopite-notificator/admin/exopite-simple-options/fields/typography.php
index 34f9f33..a66abb3 100644
--- a/exopite-notificator/admin/exopite-simple-options/fields/typography.php
+++ b/exopite-notificator/admin/exopite-simple-options/fields/typography.php
@@ -125,7 +125,7 @@ public function output() {
// 'before' => 'Size ',
'pseudo' => true,
'class' => 'font-size-js',
- 'prepend' => 'fa-arrows-v',
+ 'prepend' => 'fa-font',
'append' => 'px',
);
@@ -150,11 +150,11 @@ public function output() {
'class' => 'font-color-js',
);
- echo '
';
+ echo '
';
echo $self->add_field( $field_size, $value['size'] );
echo $self->add_field( $field_height, $value['height'] );
echo '
';
- echo '
';
+ echo '
';
echo $self->add_field( $field_color, $value['color'] );
echo '
';
@@ -213,7 +213,7 @@ public static function enqueue( $args ) {
'fn' => 'loader-jquery-chosen.min.js',
'type' => 'script',
'dependency' => array( 'jquery-chosen' ),
- 'version' => '',
+ 'version' => '20190407',
'attr' => true,
),
);
diff --git a/exopite-notificator/admin/exopite-simple-options/fields/upload.php b/exopite-notificator/admin/exopite-simple-options/fields/upload.php
index 3088278..db1f854 100644
--- a/exopite-notificator/admin/exopite-simple-options/fields/upload.php
+++ b/exopite-notificator/admin/exopite-simple-options/fields/upload.php
@@ -179,8 +179,8 @@ class="qq-ok-button-selector">field['options']['filecount'] . '
';
- echo __( 'Max file upload size: ', 'exopite-sof' ) . number_format( (float) ( Exopite_Simple_Options_Framework_Upload::file_upload_max_size() / 1048576 ), 2, '.', '' ) . 'Mb';
-
+ echo __( 'Max file upload size: ', 'exopite-sof' ) . number_format( (float) ( Exopite_Simple_Options_Framework_Upload::file_upload_max_size() / 1048576 ), 2, '.', '' ) . 'Mb
';
+ echo '
' . esc_attr__( 'To increase file upload limit in the standard built-in WordPress media uploader up as large as available disk space allows, you could use', 'exopite-sof' ) . ' Tuxedo Big File Uploads ' . esc_attr__( 'Plugin', 'exopite-sof' ) . '';
?>
diff --git a/exopite-notificator/admin/exopite-simple-options/sanitize-class.php b/exopite-notificator/admin/exopite-simple-options/sanitize-class.php
new file mode 100644
index 0000000..979c0bd
--- /dev/null
+++ b/exopite-notificator/admin/exopite-simple-options/sanitize-class.php
@@ -0,0 +1,282 @@
+ ok for groups
+ *
+ * https://www.sitepoint.com/community/t/best-way-to-do-array-search-on-multi-dimensional-array/16382/3
+ */
+if ( ! class_exists( 'Exopite_Simple_Options_Framework_Sanitize' ) ) {
+
+ class Exopite_Simple_Options_Framework_Sanitize {
+
+ public $is_multilang;
+ public $lang_current;
+ public $config;
+ public $fields;
+
+ public static $parent_key;
+
+ public function __construct( $is_multilang, $lang_current, $config, $fields ) {
+
+ $this->is_multilang = $is_multilang;
+ $this->lang_current = $lang_current;
+ $this->config = $config;
+ $this->fields = $fields;
+
+ }
+
+ public function get_sanitized_values( $fields, $posted_data ) {
+
+ // $this->write_log( 'post', var_export( $posted_data, true ) );
+
+ $posted_data = $this->array_search_and_replace( $posted_data );
+
+ // $this->write_log( 'post-after', var_export( $posted_data, true ) );
+
+ return $posted_data;
+
+ }
+
+ /**
+ * Array infos:
+ * https://stackoverflow.com/questions/7003559/use-strings-to-access-potentially-large-multidimensional-arrays
+ * https://stackoverflow.com/questions/6625808/how-can-i-use-a-php-array-as-a-path-to-target-a-value-in-another-array/6625931#6625931
+ */
+
+ /**
+ * Loop $_POST recursive.
+ */
+ public function array_search_and_replace( &$arr ) {
+
+ foreach ( $arr as $key => $value ) {
+
+ // If array, then call self.
+ if( is_array( $value ) ) {
+
+ if ( ! is_int( $key ) ) $this->parent_key = $key;
+ $this->array_search_and_replace( $arr[$key] );
+
+ } else {
+
+ $field = null;
+
+ /**
+ * Get field by id
+ */
+ if ( ! is_int( $key ) ) {
+ $field = $this->find_sub_array( 'id', $key, $this->fields );
+ if ( $field == null ) {
+ $field = $this->find_sub_array( 'id', $this->parent_key, $this->fields );
+ }
+ } else {
+ $field = $this->find_sub_array( 'id', $this->parent_key, $this->fields );
+ }
+
+ /**
+ * Here we have all the necessarily information to sanitize.
+ * [key,] field and value
+ */
+
+ $arr[$key] = $this->sanitize( $field, $value );
+
+ // $this->write_log( 'test_print_ext', var_export( $this->parent_key, true ) . PHP_EOL . var_export( $field, true ) . PHP_EOL . var_export( $key, true ) . PHP_EOL . var_export( $value, true ) . PHP_EOL . '----' . PHP_EOL );
+
+ }
+
+ }
+
+ return $arr;
+
+ }
+
+ /**
+ * Find field by id.
+ */
+ public function find_sub_array( $needle_key, $needle_value, $array ) {
+
+ if ( isset( $array[$needle_key] ) && $array[$needle_key] == $needle_value ) {
+ return $array;
+ }
+
+ foreach( $array as $key => $value ) {
+
+ if ( is_array( $value ) ) {
+
+ if ( isset( $value[$needle_key] ) && $value[$needle_key] == $needle_value ) {
+ return $value;
+ } else {
+ $finded = $this->find_sub_array( $needle_key, $needle_value, $value );
+
+ if( $finded !== null ) {
+ return $finded;
+ }
+
+ }
+
+ }
+
+ }
+
+ return null;
+
+ }
+
+ /**
+ * Validate and sanitize values
+ *
+ * @param $field
+ * @param $value
+ *
+ * @return mixed
+ */
+ public function sanitize( $field, $dirty_value ) {
+
+ $dirty_value = isset( $dirty_value ) ? $dirty_value : '';
+
+ // if $config array has sanitize function, then call it
+ if (
+ isset( $field['sanitize'] ) &&
+ ! empty( $field['sanitize'] ) &&
+ (
+ function_exists( $field['sanitize'] ) ||
+ is_callable( $field['sanitize'] )
+ )
+
+ ) {
+
+ $sanitize_func_name = $field['sanitize'];
+
+ $clean_value = call_user_func( $sanitize_func_name, $dirty_value );
+
+ } else {
+
+ // if $config array does not have sanitize function, do sanitize on field type basis
+ $clean_value = $this->get_sanitized_field_value_by_type( $field, $dirty_value );
+
+ }
+
+ return apply_filters( 'exopite_sof_sanitize_value', $clean_value, $dirty_value, $field, $this->config );
+
+ }
+
+ /**
+ * Pass the field and value to run sanitization by type of field
+ *
+ * @param array $field
+ * @param mixed $value
+ *
+ * $return mixed $value after sanitization
+ */
+ public function get_sanitized_field_value_by_type( $field, $value ) {
+
+ $field_type = ( isset( $field['type'] ) ) ? $field['type'] : '';
+
+ switch ( $field_type ) {
+
+ case 'editor':
+ // no break
+ case 'textarea':
+ /**
+ * HTML excepted accept