WPtouch - Version 4.3.20

Version Description

Download this release

Release Info

Developer wptouch
Plugin Icon 128x128 WPtouch
Version 4.3.20
Comparing to
See all releases

Code changes from version 4.3.19 to 4.3.20

admin/customizer/wptouch-customize-control-multiple-checkbox.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extend WP_Customize_Control to allow for multiple checkboxes.
4
+ */
5
+
6
+ class WPtouch_Customize_Control_Multiple_Checkbox extends WP_Customize_Control {
7
+
8
+ /**
9
+ * The type of customize control being rendered.
10
+ */
11
+ public $type = 'checklist';
12
+
13
+ /**
14
+ * Displays the multiple select on the customize screen.
15
+ */
16
+ public function render_content() {
17
+ if ( empty( $this->choices ) ) {
18
+ return;
19
+ } ?>
20
+ <?php if ( ! empty( $this->label ) ) : ?>
21
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
22
+ <?php endif; ?>
23
+ <?php if ( ! empty( $this->description ) ) : ?>
24
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
25
+ <?php endif; ?>
26
+ <?php $multi_values = ! is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value(); ?>
27
+ <ul class="customize-control-selectlist">
28
+ <?php foreach ( $this->choices as $value => $label ) : ?>
29
+ <li>
30
+ <label>
31
+ <input type="checkbox" value="<?php echo esc_attr( $value ); ?>" <?php checked( in_array( $value, $multi_values ) ); ?> />
32
+ <?php echo esc_html( $label ); ?>
33
+ </label>
34
+ </li>
35
+ <?php endforeach; ?>
36
+ </ul>
37
+ <input type="hidden" <?php $this->link(); ?> value="<?php echo esc_attr( implode( ',', $multi_values ) ); ?>"/>
38
+ <?php
39
+ }
40
+ }
41
+
admin/customizer/wptouch-customizer.css CHANGED
@@ -316,6 +316,17 @@ li#customize-control-blogname, li#customize-control-blogdescription {
316
 
317
  /* @end */
318
 
 
 
 
 
 
 
 
 
 
 
 
319
  @media all and (max-height: 820px) {
320
  #customize-preview.tablet {
321
  margin-top: -550px;
@@ -326,4 +337,4 @@ li#customize-control-blogname, li#customize-control-blogdescription {
326
  #customize-preview.tablet.landscape {
327
  margin-top: -400px;
328
  }
329
- }
316
 
317
  /* @end */
318
 
319
+ /* @group Selectlist */
320
+
321
+ .customize-control-selectlist {
322
+ max-height: 200px;
323
+ padding: 10px;
324
+ border: 1px solid #b4b9be;
325
+ overflow-y: scroll;
326
+ }
327
+
328
+ /* @end */
329
+
330
  @media all and (max-height: 820px) {
331
  #customize-preview.tablet {
332
  margin-top: -550px;
337
  #customize-preview.tablet.landscape {
338
  margin-top: -400px;
339
  }
340
+ }
admin/customizer/wptouch-customizer.js CHANGED
@@ -1,187 +1,189 @@
1
- function wptouchCustomizerCloseButton(){
2
- jQuery( '.wp-full-overlay #customize-header-actions' ).unbind().on( 'click', 'a.customize-controls-close', function( e ){
3
- e.preventDefault();
4
- window.location = WPtouchCustomizer.settings_url;
5
- });
6
- }
 
7
 
8
- function wptouchCustomizerDeviceToggles() {
9
- html = '<div class="toggle-wrapper">';
10
  // html += '<i class="customize-tooltip" title="Click to change orientation"></i>';
11
- html += '<div class="toggle-inner portrait">';
12
- html += '<span>' + WPtouchCustomizer.device_orientation + ':</span>';
13
- html += '<i class="icon-mobile toggle active"></i>';
14
- if ( WPtouchCustomizer.device_tags.indexOf( 'tablet' ) > -1 ) {
15
- html += '<i class="icon-tablet toggle"></i>';
 
 
 
16
  }
17
- html += '</div>';
18
- html += '</div>';
19
- }
20
 
21
- function wptouchCustomizerWindowMods(){
22
 
23
- // New free ad
24
  // if ( WPtouchCustomizer.wptouch_is_pro == 'no' ) {
25
  // html += '<div id="wptouch-pro-notice">Upgrade to WPtouch Pro and save $10 with coupon code <span>TOUCHUP10</span><a class="button button-primary" href="http://www.wptouch.com/go-pro/?utm_source=free_admin&utm_medium=website&utm_term=customizer&utm_campaign=customizer" target="_blank">Go Pro Today</a></div>';
26
  // }
27
 
28
- jQuery( '.wp-full-overlay' ).append( html);
29
-
30
- jQuery( '.toggle-inner' ).on( 'click', 'i', function( e ){
31
-
32
- var previewDiv = jQuery( '#customize-preview' );
33
- var innerDiv = jQuery( '.toggle-inner' );
34
-
35
- // Active device
36
- if ( !jQuery( this ).hasClass( 'active' ) ) {
37
- jQuery( '.toggle-inner i' ).removeClass( 'active' );
38
- jQuery( this ).addClass( 'active' );
39
- if ( jQuery( this ).hasClass( 'icon-tablet' ) ) {
40
- previewDiv.addClass( 'tablet' );
41
- } else {
42
- previewDiv.removeClass( 'tablet' );
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
- if ( jQuery( this ).hasClass( 'icon-mobile' ) ) {
45
- previewDiv.removeClass( 'tablet' );
 
 
46
  } else {
47
- previewDiv.addClass( 'tablet' );
 
48
  }
49
- // Cleanup orientation on device switch
50
- innerDiv.removeClass( 'landscape' ).addClass( 'portrait' );
51
- previewDiv.removeClass( 'landscape' );
52
- // Don't do the orientation change on active switch
53
- return;
54
- }
55
- // Handle Orientation
56
- if ( innerDiv.hasClass( 'portrait' ) ) {
57
- innerDiv.removeClass( 'portrait' ).addClass( 'landscape' );
58
- previewDiv.addClass( 'landscape' );
59
- } else {
60
- innerDiv.removeClass( 'landscape' ).addClass( 'portrait' );
61
- previewDiv.removeClass( 'landscape' );
62
- }
63
-
64
- e.preventDefault();
65
 
66
- });
67
- }
68
 
69
- function wptouchCustomizerAddRangeValue(){
70
- jQuery( 'input[type="range"]', '#customize-theme-controls' ).each( function(){
71
- jQuery( this ).after( '<span class="rangeval"></span>' );
72
- jQuery( this ).on( 'click mousemove', function(){
73
- rangeValue = jQuery( this ).val();
74
- jQuery( this ).next( 'span' ).text( rangeValue );
75
- }).click();
76
- });
77
- }
78
 
79
- function wptouchCustomizerGetLuma( hexvalue ) {
80
- var c = hexvalue.substring( 1 ); // strip #
81
- var rgb = parseInt( c, 16 ); // convert rrggbb to decimal
82
- var r = ( rgb >> 16 ) & 0xff; // extract red
83
- var g = ( rgb >> 8 ) & 0xff; // extract green
84
- var b = ( rgb >> 0 ) & 0xff; // extract blue
 
 
 
85
 
86
- return 0.2126 * r + 0.7152 * g + 0.0722 * b; // per ITU-R BT.709'
87
- }
 
 
 
 
 
 
 
 
 
 
88
 
89
- function wptouchCustomizerFoundationSettings(){
90
 
91
- // Sharing Links on/off
92
- var sharingCheckbox = jQuery( '[id$=show_share]' );
93
- sharingCheckbox.on( 'change wptouch.customizerReady', 'input', function(){
94
- if ( jQuery( this ).is( ':checked' ) ) {
95
- sharingCheckbox.nextAll( 'li' ).css( 'visibility', '' );
96
- } else {
97
- sharingCheckbox.nextAll( 'li' ).css( 'visibility', 'hidden' );
98
- }
99
- });
100
-
101
- // Featured Slider on/off
102
- var featuredCheckbox = jQuery( '[id$=wptouch_featured_enabled]' );
103
- featuredCheckbox.on( 'change wptouch.customizerReady', 'input', function(){
104
- if ( jQuery( this ).is( ':checked' ) ) {
105
- featuredCheckbox.nextAll( 'li' ).css( 'visibility', '' );
106
- } else {
107
- featuredCheckbox.nextAll( 'li' ).css( 'visibility', 'hidden' );
108
- }
109
- });
110
-
111
- // Featured slider source select
112
- jQuery( '[id$="featured_type"]' ).on( 'change wptouch.customizerReady', 'select', function() {
113
- var tagSetting = jQuery( '[id$=featured_tag] *' );
114
- var catSetting = jQuery( '[id$=featured_category] *' );
115
- var posttySetting = jQuery( '[id$=featured_post_type] *' );
116
- var postSetting = jQuery( '[id$=featured_post_ids] *' );
117
-
118
- switch( jQuery( this ).val() ) {
119
- case 'tag':
120
- tagSetting.show();
121
- catSetting.hide();
122
- posttySetting.hide();
123
- postSetting.hide();
124
- break;
125
- case 'category':
126
- tagSetting.hide();
127
- catSetting.show();
128
- posttySetting.hide();
129
- postSetting.hide();
130
- break;
131
- case 'post_type':
132
- tagSetting.hide();
133
- catSetting.hide();
134
- posttySetting.show();
135
- postSetting.hide();
136
- break;
137
- case 'posts':
138
- tagSetting.hide();
139
- catSetting.hide();
140
- posttySetting.hide();
141
- postSetting.show();
142
- break;
143
- case 'latest':
144
- default:
145
- tagSetting.hide();
146
- catSetting.hide();
147
- posttySetting.hide();
148
- postSetting.hide();
149
- break;
150
- }
151
- });
152
 
153
- // Fire a change to deal with Customizer controlof .change()
154
- jQuery( '#customize-theme-controls' ).find( 'input[type="checkbox"], select' ).trigger( 'wptouch.customizerReady' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
- }
 
 
157
 
158
- function wptouchCustomizerChecklist() {
159
- jQuery( '.customize-control-checklist input[type="checkbox"]' ).on(
160
- 'change',
161
- function() {
 
 
 
 
 
 
 
162
 
163
- checkbox_values = jQuery( this ).parents( '.customize-control' ).find( 'input[type="checkbox"]:checked' ).map(
164
- function() {
165
- return this.value;
166
- }
167
- ).get().join( ',' );
 
 
 
 
 
168
 
169
- jQuery( this ).parents( '.customize-control' ).find( 'input[type="hidden"]' ).val( checkbox_values ).trigger( 'change' );
170
- }
171
- );
172
- }
173
 
174
- function wptouchCustomizerAdminReady(){
175
- wptouchCustomizerDeviceToggles();
176
- if ( WPtouchCustomizer.mobile_preview == true ) {
177
- wptouchCustomizerCloseButton();
178
- wptouchCustomizerWindowMods();
179
- wptouchCustomizerAddRangeValue();
180
- wptouchCustomizerChecklist();
181
- wptouchCustomizerFoundationSettings();
182
- }
183
  }
184
-
185
- jQuery( document ).ready( function() {
186
- wptouchCustomizerAdminReady();
187
- });
1
+ ( function( $ ) {
2
+ function wptouchCustomizerCloseButton() {
3
+ $( '.wp-full-overlay #customize-header-actions' ).unbind().on( 'click', 'a.customize-controls-close', function( e ) {
4
+ e.preventDefault();
5
+ window.location = WPtouchCustomizer.settings_url;
6
+ } );
7
+ }
8
 
9
+ function wptouchCustomizerDeviceToggles() {
10
+ html = '<div class="toggle-wrapper">';
11
  // html += '<i class="customize-tooltip" title="Click to change orientation"></i>';
12
+ html += '<div class="toggle-inner portrait">';
13
+ html += '<span>' + WPtouchCustomizer.device_orientation + ':</span>';
14
+ html += '<i class="icon-mobile toggle active"></i>';
15
+ if ( WPtouchCustomizer.device_tags.indexOf( 'tablet' ) > - 1 ) {
16
+ html += '<i class="icon-tablet toggle"></i>';
17
+ }
18
+ html += '</div>';
19
+ html += '</div>';
20
  }
 
 
 
21
 
22
+ function wptouchCustomizerWindowMods() {
23
 
24
+ // New free ad
25
  // if ( WPtouchCustomizer.wptouch_is_pro == 'no' ) {
26
  // html += '<div id="wptouch-pro-notice">Upgrade to WPtouch Pro and save $10 with coupon code <span>TOUCHUP10</span><a class="button button-primary" href="http://www.wptouch.com/go-pro/?utm_source=free_admin&utm_medium=website&utm_term=customizer&utm_campaign=customizer" target="_blank">Go Pro Today</a></div>';
27
  // }
28
 
29
+ $( '.wp-full-overlay' ).append( html );
30
+
31
+ $( '.toggle-inner' ).on( 'click', 'i', function( e ) {
32
+
33
+ var previewDiv = $( '#customize-preview' );
34
+ var innerDiv = $( '.toggle-inner' );
35
+
36
+ // Active device
37
+ if ( ! $( this ).hasClass( 'active' ) ) {
38
+ $( '.toggle-inner i' ).removeClass( 'active' );
39
+ $( this ).addClass( 'active' );
40
+ if ( $( this ).hasClass( 'icon-tablet' ) ) {
41
+ previewDiv.addClass( 'tablet' );
42
+ } else {
43
+ previewDiv.removeClass( 'tablet' );
44
+ }
45
+ if ( $( this ).hasClass( 'icon-mobile' ) ) {
46
+ previewDiv.removeClass( 'tablet' );
47
+ } else {
48
+ previewDiv.addClass( 'tablet' );
49
+ }
50
+ // Cleanup orientation on device switch
51
+ innerDiv.removeClass( 'landscape' ).addClass( 'portrait' );
52
+ previewDiv.removeClass( 'landscape' );
53
+ // Don't do the orientation change on active switch
54
+ return;
55
  }
56
+ // Handle Orientation
57
+ if ( innerDiv.hasClass( 'portrait' ) ) {
58
+ innerDiv.removeClass( 'portrait' ).addClass( 'landscape' );
59
+ previewDiv.addClass( 'landscape' );
60
  } else {
61
+ innerDiv.removeClass( 'landscape' ).addClass( 'portrait' );
62
+ previewDiv.removeClass( 'landscape' );
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
+ e.preventDefault();
 
66
 
67
+ } );
68
+ }
 
 
 
 
 
 
 
69
 
70
+ function wptouchCustomizerAddRangeValue() {
71
+ $( 'input[type="range"]', '#customize-theme-controls' ).each( function() {
72
+ $( this ).after( '<span class="rangeval"></span>' );
73
+ $( this ).on( 'click mousemove', function() {
74
+ rangeValue = $( this ).val();
75
+ $( this ).next( 'span' ).text( rangeValue );
76
+ } ).click();
77
+ } );
78
+ }
79
 
80
+ function wptouchCustomizerGetLuma( hexvalue ) {
81
+ var c = hexvalue.substring( 1 ); // strip #
82
+ var rgb = parseInt( c, 16 ); // convert rrggbb to decimal
83
+ var r = ( rgb >> 16
84
+ ) & 0xff; // extract red
85
+ var g = ( rgb >> 8
86
+ ) & 0xff; // extract green
87
+ var b = ( rgb >> 0
88
+ ) & 0xff; // extract blue
89
+
90
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b; // per ITU-R BT.709'
91
+ }
92
 
93
+ function wptouchCustomizerFoundationSettings() {
94
 
95
+ // Sharing Links on/off
96
+ var sharingCheckbox = $( '[id$=show_share]' );
97
+ sharingCheckbox.on( 'change wptouch.customizerReady', 'input', function() {
98
+ if ( $( this ).is( ':checked' ) ) {
99
+ sharingCheckbox.nextAll( 'li' ).css( 'visibility', '' );
100
+ } else {
101
+ sharingCheckbox.nextAll( 'li' ).css( 'visibility', 'hidden' );
102
+ }
103
+ } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
+ // Featured Slider on/off
106
+ var featuredCheckbox = $( '[id$=wptouch_featured_enabled]' );
107
+ featuredCheckbox.on( 'change wptouch.customizerReady', 'input', function() {
108
+ if ( $( this ).is( ':checked' ) ) {
109
+ featuredCheckbox.nextAll( 'li' ).css( 'visibility', '' );
110
+ } else {
111
+ featuredCheckbox.nextAll( 'li' ).css( 'visibility', 'hidden' );
112
+ }
113
+ } );
114
+
115
+ // Featured slider source select
116
+ $( '[id$="featured_type"]' ).on( 'change wptouch.customizerReady', 'select', function() {
117
+ var tagSetting = $( '[id$=featured_tag] *' );
118
+ var catSetting = $( '[id$=featured_category] *' );
119
+ var posttySetting = $( '[id$=featured_post_type] *' );
120
+ var postSetting = $( '[id$=featured_post_ids] *' );
121
+
122
+ switch ( $( this ).val() ) {
123
+ case 'tag':
124
+ tagSetting.show();
125
+ catSetting.hide();
126
+ posttySetting.hide();
127
+ postSetting.hide();
128
+ break;
129
+ case 'category':
130
+ tagSetting.hide();
131
+ catSetting.show();
132
+ posttySetting.hide();
133
+ postSetting.hide();
134
+ break;
135
+ case 'post_type':
136
+ tagSetting.hide();
137
+ catSetting.hide();
138
+ posttySetting.show();
139
+ postSetting.hide();
140
+ break;
141
+ case 'posts':
142
+ tagSetting.hide();
143
+ catSetting.hide();
144
+ posttySetting.hide();
145
+ postSetting.show();
146
+ break;
147
+ case 'latest':
148
+ default:
149
+ tagSetting.hide();
150
+ catSetting.hide();
151
+ posttySetting.hide();
152
+ postSetting.hide();
153
+ break;
154
+ }
155
+ } );
156
 
157
+ // Fire a change to deal with Customizer controlof .change()
158
+ $( '#customize-theme-controls' ).find( 'input[type="checkbox"], select' ).trigger( 'wptouch.customizerReady' );
159
+ }
160
 
161
+ function wptouchCustomizerChecklist() {
162
+ $( '.customize-control-checklist input[type="checkbox"]' ).on( 'change', function() {
163
+ checkbox_values = $( this ).parents( '.customize-control' ).find( 'input[type="checkbox"]:checked' ).map(
164
+ function() {
165
+ return this.value;
166
+ }
167
+ ).get().join( ',' );
168
+ $( this ).parents( '.customize-control' ).find( 'input[type="hidden"]' ).val( checkbox_values ).trigger( 'change' );
169
+ }
170
+ );
171
+ }
172
 
173
+ function wptouchCustomizerAdminReady() {
174
+ wptouchCustomizerDeviceToggles();
175
+ if ( true == WPtouchCustomizer.mobile_preview ) {
176
+ wptouchCustomizerCloseButton();
177
+ wptouchCustomizerWindowMods();
178
+ wptouchCustomizerAddRangeValue();
179
+ wptouchCustomizerChecklist();
180
+ wptouchCustomizerFoundationSettings();
181
+ }
182
+ }
183
 
184
+ $( document ).ready( function() {
185
+ wptouchCustomizerAdminReady();
186
+ } );
 
187
 
 
 
 
 
 
 
 
 
 
188
  }
189
+ )( jQuery );
 
 
 
admin/customizer/wptouch-customizer.php CHANGED
@@ -167,7 +167,7 @@ $merging_setting = false;
167
  function wptouch_customizer_merge_setting( $domain, $setting, $value ) {
168
  require_once( WPTOUCH_DIR . '/core/admin-load.php' );
169
 
170
- global $merging_setting;
171
  global $wptouch_pro;
172
  global $options_domains;
173
 
@@ -191,7 +191,7 @@ function wptouch_customizer_merge_setting( $domain, $setting, $value ) {
191
  set_theme_mod( 'wptouch_' . $setting, $value );
192
  }
193
  }
194
- }
195
  $merging_setting = false;
196
  }
197
 
@@ -319,48 +319,7 @@ function wptouch_customizer_setup( $wp_customize ) {
319
 
320
  if ( wptouch_is_customizing_mobile() ) {
321
  // We're in the customizer and editing the mobile theme.
322
-
323
- class WPtouch_Customize_Control_Multiple_Checkbox extends WP_Customize_Control {
324
-
325
- /**
326
- * The type of customize control being rendered.
327
- */
328
- public $type = 'checklist';
329
-
330
- /**
331
- * Displays the multiple select on the customize screen.
332
- */
333
- public function render_content() {
334
- if ( empty( $this->choices ) )
335
- return; ?>
336
-
337
- <?php if ( !empty( $this->label ) ) : ?>
338
- <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
339
- <?php endif; ?>
340
-
341
- <?php if ( !empty( $this->description ) ) : ?>
342
- <span class="description customize-control-description"><?php echo $this->description; ?></span>
343
- <?php endif; ?>
344
-
345
- <?php $multi_values = !is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value(); ?>
346
-
347
- <ul>
348
- <?php foreach ( $this->choices as $value => $label ) : ?>
349
-
350
- <li>
351
- <label>
352
- <input type="checkbox" value="<?php echo esc_attr( $value ); ?>" <?php checked( in_array( $value, $multi_values ) ); ?> />
353
- <?php echo esc_html( $label ); ?>
354
- </label>
355
- </li>
356
-
357
- <?php endforeach; ?>
358
- </ul>
359
-
360
- <input type="hidden" <?php $this->link(); ?> value="<?php echo esc_attr( implode( ',', $multi_values ) ); ?>" />
361
- <?php
362
- }
363
- }
364
 
365
  // Prepare to set defaults; we'll need Foundation defaults for sure, but we'll load others as needed.
366
  $defaults = array(
@@ -581,8 +540,6 @@ function wptouch_customizer_scripts() {
581
  true
582
  );
583
 
584
-
585
-
586
  global $wptouch_pro;
587
  $theme = $wptouch_pro->get_current_theme_info();
588
  $pro_or_free = ( !defined( 'WPTOUCH_IS_FREE' ) ) ? 'yes' : 'no';
@@ -591,7 +548,7 @@ function wptouch_customizer_scripts() {
591
  'device_tags' => $theme->tags,
592
  'settings_url' => admin_url( 'admin.php?page=wptouch-admin-general-settings' ),
593
  'wptouch_is_pro' => $pro_or_free,
594
- 'mobile_preview' => wptouch_is_customizing_mobile()
595
  );
596
 
597
  wp_localize_script( 'wptouch-theme-customizer-js', 'WPtouchCustomizer', $customizer_params );
@@ -786,7 +743,7 @@ function wptouch_customizer_begin_theme_override() {
786
  global $wptouch_queued_items;
787
 
788
  if ( $wptouch_queued_items == 0 ) {
789
- add_filter( 'pre_option_stylesheet', 'wptouch_get_current_theme_name', 50 );
790
  }
791
 
792
  $wptouch_queued_items++;
@@ -798,7 +755,7 @@ function wptouch_customizer_end_theme_override() {
798
  $wptouch_queued_items--;
799
 
800
  if ( $wptouch_queued_items == 0 ) {
801
- remove_filter( 'pre_option_stylesheet', 'wptouch_get_current_theme_name', 50 );
802
  }
803
  }
804
 
@@ -866,4 +823,4 @@ function wptouch_customizer_modify_homepage_query( $query_vars ) {
866
  }
867
 
868
  return $query_vars;
869
- }
167
  function wptouch_customizer_merge_setting( $domain, $setting, $value ) {
168
  require_once( WPTOUCH_DIR . '/core/admin-load.php' );
169
 
170
+ global $merging_setting;
171
  global $wptouch_pro;
172
  global $options_domains;
173
 
191
  set_theme_mod( 'wptouch_' . $setting, $value );
192
  }
193
  }
194
+ }
195
  $merging_setting = false;
196
  }
197
 
319
 
320
  if ( wptouch_is_customizing_mobile() ) {
321
  // We're in the customizer and editing the mobile theme.
322
+ require_once( WPTOUCH_DIR . '/admin/customizer/wptouch-customize-control-multiple-checkbox.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
 
324
  // Prepare to set defaults; we'll need Foundation defaults for sure, but we'll load others as needed.
325
  $defaults = array(
540
  true
541
  );
542
 
 
 
543
  global $wptouch_pro;
544
  $theme = $wptouch_pro->get_current_theme_info();
545
  $pro_or_free = ( !defined( 'WPTOUCH_IS_FREE' ) ) ? 'yes' : 'no';
548
  'device_tags' => $theme->tags,
549
  'settings_url' => admin_url( 'admin.php?page=wptouch-admin-general-settings' ),
550
  'wptouch_is_pro' => $pro_or_free,
551
+ 'mobile_preview' => wptouch_is_customizing_mobile(),
552
  );
553
 
554
  wp_localize_script( 'wptouch-theme-customizer-js', 'WPtouchCustomizer', $customizer_params );
743
  global $wptouch_queued_items;
744
 
745
  if ( $wptouch_queued_items == 0 ) {
746
+ add_filter( 'pre_option_stylesheet', 'wptouch_get_current_theme_name', 50 );
747
  }
748
 
749
  $wptouch_queued_items++;
755
  $wptouch_queued_items--;
756
 
757
  if ( $wptouch_queued_items == 0 ) {
758
+ remove_filter( 'pre_option_stylesheet', 'wptouch_get_current_theme_name', 50 );
759
  }
760
  }
761
 
823
  }
824
 
825
  return $query_vars;
826
+ }
admin/pages/wptouch-admin-general-settings.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
- if ( !defined( 'FOUNDATION_SETTING_DOMAIN' ) ) {
3
- define( 'FOUNDATION_SETTING_DOMAIN', 'foundation' );
4
  }
5
- if ( ( !wptouch_is_controlled_network() || ( wptouch_is_controlled_network() && is_network_admin() ) ) && !defined( 'WPTOUCH_IS_FREE' ) ) {
6
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_updates_page' );
7
  }
8
 
@@ -36,7 +36,7 @@ function wptouch_render_updates_page( $page_options ) {
36
  false,
37
  WPTOUCH_SETTING_BASIC,
38
  '4.0'
39
- )
40
  ),
41
  $page_options
42
  );
@@ -70,10 +70,10 @@ function wptouch_render_general_page( $page_options ) {
70
  false
71
  );
72
 
73
- if ( defined( 'WPTOUCH_IS_FREE' ) ){
74
- $display_text = wptouchize_it( __( 'If disabled WPtouch Pro will be off for visitors but can be configured.' , 'wptouch-pro' ) );
75
  } else {
76
- $display_text = wptouchize_it( __( 'If disabled WPtouch Pro will be off for visitors but can be configured in the Customizer.' , 'wptouch-pro' ) );
77
  }
78
 
79
  wptouch_add_page_section(
@@ -92,14 +92,14 @@ function wptouch_render_general_page( $page_options ) {
92
  wptouch_add_pro_setting(
93
  'list',
94
  'url_filter_behaviour',
95
- __( 'URL filtering' , 'wptouch-pro' ),
96
  false,
97
  WPTOUCH_SETTING_BASIC,
98
  '3.5.3',
99
  array(
100
- 'disabled' => wptouchize_it( __( 'Show WPtouch Pro for all URLs' , 'wptouch-pro' ) ),
101
- 'exclude_urls' => wptouchize_it( __( 'Exclude WPtouch Pro on these URLs', 'wptouch-pro' ) ),
102
- 'exclusive_urls' => wptouchize_it( __( 'Only show WPtouch Pro on these URLs', 'wptouch-pro' ) )
103
  )
104
  ),
105
  wptouch_add_pro_setting(
@@ -117,7 +117,7 @@ function wptouch_render_general_page( $page_options ) {
117
  false,
118
  WPTOUCH_SETTING_BASIC,
119
  '3.5.3'
120
- )
121
  ),
122
  $page_options
123
  );
@@ -131,9 +131,9 @@ function wptouch_render_general_page( $page_options ) {
131
  WPTOUCH_SETTING_BASIC,
132
  '3.0',
133
  array(
134
- 'none' => __( 'WordPress Reading Settings', 'wptouch-pro' ),
135
  'select' => __( 'Redirect to a page', 'wptouch-pro' ),
136
- 'custom' => _x( 'Redirect to a custom URL', 'Refers to a custom landing page', 'wptouch-pro' )
137
  )
138
  ),
139
  wptouch_add_setting(
@@ -151,7 +151,7 @@ function wptouch_render_general_page( $page_options ) {
151
  false,
152
  WPTOUCH_SETTING_BASIC,
153
  '3.0'
154
- )
155
  );
156
 
157
  $landing_settings = apply_filters( 'foundation_settings_pages', $landing_settings );
@@ -189,16 +189,16 @@ function wptouch_render_general_page( $page_options ) {
189
  WPTOUCH_ADMIN_SETUP_GENERAL,
190
  __( 'Page Zoom', 'wptouch-pro' ),
191
  'foundation-zoom',
192
- array(
193
- wptouch_add_setting(
194
- 'checkbox',
195
- 'allow_zoom',
196
- __( 'Allow mobile browser zooming', 'wptouch-pro' ),
197
- wptouchize_it( __( 'By default WPtouch Pro disables browser zooming.' ) ),
198
- WPTOUCH_SETTING_BASIC,
199
- '2.0'
200
- )
201
  ),
 
202
  $page_options,
203
  FOUNDATION_SETTING_DOMAIN
204
  );
@@ -223,43 +223,55 @@ function wptouch_render_general_page( $page_options ) {
223
  sprintf( __( 'Find your ID from the %siTunes Link Maker%s.', 'wptouch-pro' ), '<a href="http://itunes.apple.com/linkmaker/" target="_blank">', '</a>' )
224
  );
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  wptouch_add_page_section(
227
  WPTOUCH_ADMIN_SETUP_GENERAL,
228
  __( 'Analytics', 'wptouch-pro' ),
229
  'setup-custom-code',
230
- array(
231
- wptouch_add_pro_setting(
232
- 'list',
233
- 'analytics_embed_method',
234
- __( 'Analytics Code', 'wptouch-pro' ),
235
- false,
236
- WPTOUCH_SETTING_BASIC,
237
- '4.0',
238
- array(
239
- 'disabled' => __( 'None', 'wptouch-pro' ),
240
- 'simple' => 'Google Analytics',
241
- 'custom' => __( 'Custom', 'wptouch-pro' )
242
- )
243
- ),
244
-
245
- wptouch_add_pro_setting(
246
- 'text',
247
- 'analytics_google_id',
248
- __( 'Site ID', 'wptouch-pro' ),
249
- false,
250
- WPTOUCH_SETTING_BASIC,
251
- '3.0'
252
- ),
253
-
254
- wptouch_add_pro_setting(
255
- 'textarea',
256
- 'custom_stats_code',
257
- false,
258
- false,
259
- WPTOUCH_SETTING_BASIC,
260
- '3.0'
261
- )
262
- ),
263
  $page_options,
264
  'wptouch_pro'
265
  );
@@ -276,7 +288,7 @@ function wptouch_render_general_page( $page_options ) {
276
  false,
277
  WPTOUCH_SETTING_BASIC,
278
  '3.0'
279
- )
280
  ),
281
  $page_options,
282
  'wptouch_pro'
@@ -303,7 +315,7 @@ function wptouch_render_general_page( $page_options ) {
303
  false,
304
  WPTOUCH_SETTING_BASIC,
305
  '3.0'
306
- )
307
  ),
308
  $page_options,
309
  'wptouch_pro'
@@ -336,7 +348,7 @@ function wptouch_render_compat_page( $page_options ) {
336
  wptouchize_it( __( 'Filters out shortcodes from displaying when WPtouch Pro is active.', 'wptouch-pro' ) ),
337
  WPTOUCH_SETTING_BASIC,
338
  '3.0'
339
- )
340
  ),
341
  $page_options,
342
  'wptouch_pro'
@@ -362,23 +374,23 @@ function wptouch_render_compat_page( $page_options ) {
362
 
363
  $page_options = apply_filters( 'wptouch_settings_compat', $page_options );
364
 
365
- if ( !defined( 'WPTOUCH_IS_FREE' ) ) {
366
- wptouch_add_page_section(
367
- WPTOUCH_ADMIN_SETUP_COMPAT,
368
- __( 'Active Plugins', 'wptouch-pro' ),
369
- 'setup-general-plugin-compat',
370
- array(
371
- wptouch_add_pro_setting(
372
- 'custom',
373
- 'plugin-compat'
374
- )
375
- ),
376
- $page_options,
377
- 'wptouch_pro',
378
- false,
379
- wptouchize_it( __( 'Attempts to disable plugins for mobile visitors. Some plugins don‘t support this feature due to the way they load in WordPress.', 'wptouch-pro' ) )
380
- );
381
- }
382
 
383
  return $page_options;
384
  }
@@ -516,7 +528,7 @@ function wptouch_render_devices_page( $page_options ) {
516
  false,
517
  WPTOUCH_SETTING_BASIC,
518
  '4.0'
519
- )
520
  ),
521
  $page_options,
522
  'wptouch_pro',
@@ -537,7 +549,7 @@ function wptouch_render_devices_page( $page_options ) {
537
  __( 'You can enter partial i.e. "nokia" or full agent strings', 'wptouch-pro' ),
538
  WPTOUCH_SETTING_BASIC,
539
  '3.0'
540
- )
541
  ),
542
  $page_options,
543
  'wptouch_pro'
@@ -561,7 +573,7 @@ function wptouch_render_menu_page( $page_options ) {
561
  false,
562
  WPTOUCH_SETTING_BASIC,
563
  '4.0'
564
- )
565
  ),
566
  $page_options,
567
  'wptouch_pro'
@@ -587,7 +599,7 @@ function wptouch_render_menu_page( $page_options ) {
587
  __( 'Adds the ability to associate icons with menu items', 'wptouch-pro' ) . ' (in WordPress Appearance->Menus)',
588
  WPTOUCH_SETTING_BASIC,
589
  '3.0'
590
- )
591
  ) ),
592
  $page_options,
593
  'wptouch_pro'
@@ -601,7 +613,7 @@ function wptouch_render_menu_page( $page_options ) {
601
  wptouch_add_setting(
602
  'custom',
603
  'installed_icon_sets'
604
- )
605
  ),
606
  $page_options
607
  );
@@ -618,7 +630,7 @@ function wptouch_render_menu_page( $page_options ) {
618
  wptouch_add_setting(
619
  'custom',
620
  'custom_icon_management'
621
- )
622
  ),
623
  $page_options
624
  );
@@ -628,7 +640,7 @@ function wptouch_render_menu_page( $page_options ) {
628
 
629
  function wptouch_add_custom_menus( $menu_array ) {
630
  $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
631
- foreach( $menus as $key => $menu ) {
632
  $menu_array[ $menu->term_id ] = $menu->name;
633
  }
634
 
@@ -639,13 +651,13 @@ function wptouch_get_custom_menu_list( $include_wp_pages = true, $include_none =
639
  $custom_menu = array();
640
 
641
  if ( $include_wp_pages ) {
642
- $custom_menu[ 'wp' ] = __( 'WordPress Pages', 'wptouch-pro' );
643
  }
644
 
645
  $custom_menu = wptouch_add_custom_menus( $custom_menu );
646
 
647
  if ( $include_none ) {
648
- $custom_menu[ 'none' ] = __( 'None', 'wptouch-pro' );
649
  }
650
 
651
  return $custom_menu;
@@ -663,7 +675,7 @@ function wptouch_render_theme_customize_page( $page_options ) {
663
  wptouch_add_setting(
664
  'custom',
665
  'customizing_in_customizer'
666
- )
667
  ),
668
  $page_options
669
  );
@@ -685,7 +697,7 @@ function wptouch_render_themes( $page_options ) {
685
  wptouch_add_setting(
686
  'custom',
687
  'theme-browser'
688
- )
689
  ),
690
  $page_options
691
  );
@@ -706,7 +718,7 @@ function wptouch_render_addons( $page_options ) {
706
  wptouch_add_setting(
707
  'custom',
708
  'extension-browser'
709
- )
710
  ),
711
  $page_options
712
  );
@@ -716,6 +728,7 @@ function wptouch_render_addons( $page_options ) {
716
 
717
  function wptouch_render_addon_settings( $page_options ) {
718
  $page_options = apply_filters( 'wptouch_addon_options', $page_options );
 
719
  return $page_options;
720
  }
721
 
@@ -729,7 +742,7 @@ function wptouch_render_subscribe_to_updates( $page_options ) {
729
  wptouch_add_setting(
730
  'custom',
731
  'free-newsletter-signup'
732
- )
733
  ),
734
  $page_options
735
  );
1
  <?php
2
+ if ( ! defined( 'FOUNDATION_SETTING_DOMAIN' ) ) {
3
+ define( 'FOUNDATION_SETTING_DOMAIN', 'foundation' );
4
  }
5
+ if ( ( ! wptouch_is_controlled_network() || ( wptouch_is_controlled_network() && is_network_admin() ) ) && ! defined( 'WPTOUCH_IS_FREE' ) ) {
6
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_updates_page' );
7
  }
8
 
36
  false,
37
  WPTOUCH_SETTING_BASIC,
38
  '4.0'
39
+ ),
40
  ),
41
  $page_options
42
  );
70
  false
71
  );
72
 
73
+ if ( defined( 'WPTOUCH_IS_FREE' ) ) {
74
+ $display_text = wptouchize_it( __( 'If disabled WPtouch Pro will be off for visitors but can be configured.', 'wptouch-pro' ) );
75
  } else {
76
+ $display_text = wptouchize_it( __( 'If disabled WPtouch Pro will be off for visitors but can be configured in the Customizer.', 'wptouch-pro' ) );
77
  }
78
 
79
  wptouch_add_page_section(
92
  wptouch_add_pro_setting(
93
  'list',
94
  'url_filter_behaviour',
95
+ __( 'URL filtering', 'wptouch-pro' ),
96
  false,
97
  WPTOUCH_SETTING_BASIC,
98
  '3.5.3',
99
  array(
100
+ 'disabled' => wptouchize_it( __( 'Show WPtouch Pro for all URLs', 'wptouch-pro' ) ),
101
+ 'exclude_urls' => wptouchize_it( __( 'Exclude WPtouch Pro on these URLs', 'wptouch-pro' ) ),
102
+ 'exclusive_urls' => wptouchize_it( __( 'Only show WPtouch Pro on these URLs', 'wptouch-pro' ) ),
103
  )
104
  ),
105
  wptouch_add_pro_setting(
117
  false,
118
  WPTOUCH_SETTING_BASIC,
119
  '3.5.3'
120
+ ),
121
  ),
122
  $page_options
123
  );
131
  WPTOUCH_SETTING_BASIC,
132
  '3.0',
133
  array(
134
+ 'none' => __( 'WordPress Reading Settings', 'wptouch-pro' ),
135
  'select' => __( 'Redirect to a page', 'wptouch-pro' ),
136
+ 'custom' => _x( 'Redirect to a custom URL', 'Refers to a custom landing page', 'wptouch-pro' ),
137
  )
138
  ),
139
  wptouch_add_setting(
151
  false,
152
  WPTOUCH_SETTING_BASIC,
153
  '3.0'
154
+ ),
155
  );
156
 
157
  $landing_settings = apply_filters( 'foundation_settings_pages', $landing_settings );
189
  WPTOUCH_ADMIN_SETUP_GENERAL,
190
  __( 'Page Zoom', 'wptouch-pro' ),
191
  'foundation-zoom',
192
+ array(
193
+ wptouch_add_setting(
194
+ 'checkbox',
195
+ 'allow_zoom',
196
+ __( 'Allow mobile browser zooming', 'wptouch-pro' ),
197
+ wptouchize_it( __( 'By default WPtouch Pro disables browser zooming.' ) ),
198
+ WPTOUCH_SETTING_BASIC,
199
+ '2.0'
 
200
  ),
201
+ ),
202
  $page_options,
203
  FOUNDATION_SETTING_DOMAIN
204
  );
223
  sprintf( __( 'Find your ID from the %siTunes Link Maker%s.', 'wptouch-pro' ), '<a href="http://itunes.apple.com/linkmaker/" target="_blank">', '</a>' )
224
  );
225
 
226
+ $analytics_settings = array(
227
+ wptouch_add_pro_setting(
228
+ 'list',
229
+ 'analytics_embed_method',
230
+ __( 'Analytics Code', 'wptouch-pro' ),
231
+ false,
232
+ WPTOUCH_SETTING_BASIC,
233
+ '4.0',
234
+ array(
235
+ 'disabled' => __( 'None', 'wptouch-pro' ),
236
+ 'simple' => 'Google Analytics',
237
+ 'custom' => __( 'Custom', 'wptouch-pro' ),
238
+ )
239
+ ),
240
+
241
+ wptouch_add_pro_setting(
242
+ 'text',
243
+ 'analytics_google_id',
244
+ __( 'Site ID', 'wptouch-pro' ),
245
+ false,
246
+ WPTOUCH_SETTING_BASIC,
247
+ '3.0'
248
+ ),
249
+
250
+ wptouch_add_pro_setting(
251
+ 'textarea',
252
+ 'custom_stats_code',
253
+ '',
254
+ false,
255
+ WPTOUCH_SETTING_BASIC,
256
+ '3.0'
257
+ ),
258
+
259
+ );
260
+
261
+ /**
262
+ * Filter WPtouch Pro analytics section settings.
263
+ *
264
+ * @since 4.3.17
265
+ *
266
+ * @param array $analytics_settings Existing analytics section settings.
267
+ */
268
+ $analytics_settings = apply_filters( 'wptouch_pro_analytics_settings', $analytics_settings );
269
+
270
  wptouch_add_page_section(
271
  WPTOUCH_ADMIN_SETUP_GENERAL,
272
  __( 'Analytics', 'wptouch-pro' ),
273
  'setup-custom-code',
274
+ $analytics_settings,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  $page_options,
276
  'wptouch_pro'
277
  );
288
  false,
289
  WPTOUCH_SETTING_BASIC,
290
  '3.0'
291
+ ),
292
  ),
293
  $page_options,
294
  'wptouch_pro'
315
  false,
316
  WPTOUCH_SETTING_BASIC,
317
  '3.0'
318
+ ),
319
  ),
320
  $page_options,
321
  'wptouch_pro'
348
  wptouchize_it( __( 'Filters out shortcodes from displaying when WPtouch Pro is active.', 'wptouch-pro' ) ),
349
  WPTOUCH_SETTING_BASIC,
350
  '3.0'
351
+ ),
352
  ),
353
  $page_options,
354
  'wptouch_pro'
374
 
375
  $page_options = apply_filters( 'wptouch_settings_compat', $page_options );
376
 
377
+ if ( ! defined( 'WPTOUCH_IS_FREE' ) ) {
378
+ wptouch_add_page_section(
379
+ WPTOUCH_ADMIN_SETUP_COMPAT,
380
+ __( 'Active Plugins', 'wptouch-pro' ),
381
+ 'setup-general-plugin-compat',
382
+ array(
383
+ wptouch_add_pro_setting(
384
+ 'custom',
385
+ 'plugin-compat'
386
+ ),
387
+ ),
388
+ $page_options,
389
+ 'wptouch_pro',
390
+ false,
391
+ wptouchize_it( __( 'Attempts to disable plugins for mobile visitors. Some plugins don‘t support this feature due to the way they load in WordPress.', 'wptouch-pro' ) )
392
+ );
393
+ }
394
 
395
  return $page_options;
396
  }
528
  false,
529
  WPTOUCH_SETTING_BASIC,
530
  '4.0'
531
+ ),
532
  ),
533
  $page_options,
534
  'wptouch_pro',
549
  __( 'You can enter partial i.e. "nokia" or full agent strings', 'wptouch-pro' ),
550
  WPTOUCH_SETTING_BASIC,
551
  '3.0'
552
+ ),
553
  ),
554
  $page_options,
555
  'wptouch_pro'
573
  false,
574
  WPTOUCH_SETTING_BASIC,
575
  '4.0'
576
+ ),
577
  ),
578
  $page_options,
579
  'wptouch_pro'
599
  __( 'Adds the ability to associate icons with menu items', 'wptouch-pro' ) . ' (in WordPress Appearance->Menus)',
600
  WPTOUCH_SETTING_BASIC,
601
  '3.0'
602
+ ),
603
  ) ),
604
  $page_options,
605
  'wptouch_pro'
613
  wptouch_add_setting(
614
  'custom',
615
  'installed_icon_sets'
616
+ ),
617
  ),
618
  $page_options
619
  );
630
  wptouch_add_setting(
631
  'custom',
632
  'custom_icon_management'
633
+ ),
634
  ),
635
  $page_options
636
  );
640
 
641
  function wptouch_add_custom_menus( $menu_array ) {
642
  $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
643
+ foreach ( $menus as $key => $menu ) {
644
  $menu_array[ $menu->term_id ] = $menu->name;
645
  }
646
 
651
  $custom_menu = array();
652
 
653
  if ( $include_wp_pages ) {
654
+ $custom_menu['wp'] = __( 'WordPress Pages', 'wptouch-pro' );
655
  }
656
 
657
  $custom_menu = wptouch_add_custom_menus( $custom_menu );
658
 
659
  if ( $include_none ) {
660
+ $custom_menu['none'] = __( 'None', 'wptouch-pro' );
661
  }
662
 
663
  return $custom_menu;
675
  wptouch_add_setting(
676
  'custom',
677
  'customizing_in_customizer'
678
+ ),
679
  ),
680
  $page_options
681
  );
697
  wptouch_add_setting(
698
  'custom',
699
  'theme-browser'
700
+ ),
701
  ),
702
  $page_options
703
  );
718
  wptouch_add_setting(
719
  'custom',
720
  'extension-browser'
721
+ ),
722
  ),
723
  $page_options
724
  );
728
 
729
  function wptouch_render_addon_settings( $page_options ) {
730
  $page_options = apply_filters( 'wptouch_addon_options', $page_options );
731
+
732
  return $page_options;
733
  }
734
 
742
  wptouch_add_setting(
743
  'custom',
744
  'free-newsletter-signup'
745
+ ),
746
  ),
747
  $page_options
748
  );
lang/wptouch.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: WPtouch Mobile Plugin 4.3.19\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
7
- "POT-Creation-Date: 2017-08-21 22:00:30+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,15 +12,15 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: admin/customizer/wptouch-customizer.php:590
16
  msgid "Device Orientation"
17
  msgstr ""
18
 
19
- #: admin/customizer/wptouch-customizer.php:617
20
  msgid "Switch to Mobile Theme"
21
  msgstr ""
22
 
23
- #: admin/customizer/wptouch-customizer.php:618
24
  msgid "Switch to Desktop Theme"
25
  msgstr ""
26
 
@@ -386,8 +386,7 @@ msgstr ""
386
  #: admin/settings/html/extension-browser-item.php:10
387
  #: admin/settings/html/installed_icon_sets_ajax.php:13
388
  #: admin/settings/html/installed_icon_sets_ajax.php:26
389
- #: admin/settings/html/theme-browser-item.php:12
390
- #: core/class-wptouch-pro.php:989
391
  msgid "Installed"
392
  msgstr ""
393
 
@@ -675,168 +674,168 @@ msgstr ""
675
  msgid "Find your ID from the %siTunes Link Maker%s."
676
  msgstr ""
677
 
678
- #: admin/pages/wptouch-admin-general-settings.php:228
679
- msgid "Analytics"
680
- msgstr ""
681
-
682
- #: admin/pages/wptouch-admin-general-settings.php:234
683
  msgid "Analytics Code"
684
  msgstr ""
685
 
686
- #: admin/pages/wptouch-admin-general-settings.php:239
687
- #: admin/pages/wptouch-admin-general-settings.php:648
688
  msgid "None"
689
  msgstr ""
690
 
691
- #: admin/pages/wptouch-admin-general-settings.php:241
692
  msgid "Custom"
693
  msgstr ""
694
 
695
- #: admin/pages/wptouch-admin-general-settings.php:248
696
  msgid "Site ID"
697
  msgstr ""
698
 
699
- #: admin/pages/wptouch-admin-general-settings.php:269
 
 
 
 
700
  msgid "WPtouch Pro Love"
701
  msgstr ""
702
 
703
- #: admin/pages/wptouch-admin-general-settings.php:275
704
  msgid "Show powered by WPtouch Pro link in theme footer"
705
  msgstr ""
706
 
707
- #: admin/pages/wptouch-admin-general-settings.php:287
708
  msgid "Language"
709
  msgstr ""
710
 
711
- #: admin/pages/wptouch-admin-general-settings.php:293
712
  msgid "Theme Language"
713
  msgstr ""
714
 
715
- #: admin/pages/wptouch-admin-general-settings.php:302
716
  msgid "Also applies to admin"
717
  msgstr ""
718
 
719
- #: admin/pages/wptouch-admin-general-settings.php:321
720
  msgctxt ""
721
  "shortcodes are pieces of code [like_this] that users can drop into textareas "
722
  "that will convert to longer pieces of code"
723
  msgid "Shortcodes"
724
  msgstr ""
725
 
726
- #: admin/pages/wptouch-admin-general-settings.php:327
727
  msgid "Process desktop theme shortcodes"
728
  msgstr ""
729
 
730
- #: admin/pages/wptouch-admin-general-settings.php:335
731
  msgid "Filter out shortcodes"
732
  msgstr ""
733
 
734
- #: admin/pages/wptouch-admin-general-settings.php:336
735
  msgid "Filters out shortcodes from displaying when WPtouch Pro is active."
736
  msgstr ""
737
 
738
- #: admin/pages/wptouch-admin-general-settings.php:347
739
  msgctxt ""
740
  "caching services like Varnish can sometimes cause issues with WPtouch."
741
  msgid "Caching"
742
  msgstr ""
743
 
744
- #: admin/pages/wptouch-admin-general-settings.php:353
745
  msgid "Stop sending \"no cache\" request headers for mobile site."
746
  msgstr ""
747
 
748
- #: admin/pages/wptouch-admin-general-settings.php:354
749
  msgid ""
750
  "By default WPtouch requests that mobile pages are not cached. This helps "
751
  "prevent the mobile site from being served to desktop users and the desktop "
752
  "site from being served to mobile users."
753
  msgstr ""
754
 
755
- #: admin/pages/wptouch-admin-general-settings.php:368
756
  msgid "Active Plugins"
757
  msgstr ""
758
 
759
- #: admin/pages/wptouch-admin-general-settings.php:379
760
  msgid ""
761
  "Attempts to disable plugins for mobile visitors. Some plugins don‘t support "
762
  "this feature due to the way they load in WordPress."
763
  msgstr ""
764
 
765
- #: admin/pages/wptouch-admin-general-settings.php:391
766
  msgid "Mobile Devices & Browsers"
767
  msgstr ""
768
 
769
- #: admin/pages/wptouch-admin-general-settings.php:451
770
  msgid "Tablets"
771
  msgstr ""
772
 
773
- #: admin/pages/wptouch-admin-general-settings.php:509
774
  msgid "Tablet Devices & Browsers"
775
  msgstr ""
776
 
777
- #: admin/pages/wptouch-admin-general-settings.php:524
778
  msgid ""
779
  "If your theme supports tablets, devices and browsers WPtouch Pro can be "
780
  "enabled for will be listed below."
781
  msgstr ""
782
 
783
- #: admin/pages/wptouch-admin-general-settings.php:530
784
  msgid "Additional User Agents"
785
  msgstr ""
786
 
787
- #: admin/pages/wptouch-admin-general-settings.php:536
788
  msgid "User agents to add"
789
  msgstr ""
790
 
791
- #: admin/pages/wptouch-admin-general-settings.php:537
792
  msgid "You can enter partial i.e. \"nokia\" or full agent strings"
793
  msgstr ""
794
 
795
- #: admin/pages/wptouch-admin-general-settings.php:554
796
  msgid "Menu Setup"
797
  msgstr ""
798
 
799
- #: admin/pages/wptouch-admin-general-settings.php:572
800
  msgid "Menu Options"
801
  msgstr ""
802
 
803
- #: admin/pages/wptouch-admin-general-settings.php:578
804
  msgid "Enable parent items as links"
805
  msgstr ""
806
 
807
- #: admin/pages/wptouch-admin-general-settings.php:579
808
  msgid "If disabled, parent menu items will only toggle child items."
809
  msgstr ""
810
 
811
- #: admin/pages/wptouch-admin-general-settings.php:586
812
  msgid "Use menu icons"
813
  msgstr ""
814
 
815
- #: admin/pages/wptouch-admin-general-settings.php:587
816
  msgid "Adds the ability to associate icons with menu items"
817
  msgstr ""
818
 
819
- #: admin/pages/wptouch-admin-general-settings.php:598
820
  msgid "Menu Icon Sets"
821
  msgstr ""
822
 
823
- #: admin/pages/wptouch-admin-general-settings.php:611
824
  #: admin/settings/html/installed_icon_sets_ajax.php:4
825
  #: core/class-wptouch-pro.php:2185 core/class-wptouch-pro.php:2186
826
  #: core/config.php:54
827
  msgid "Custom Icons"
828
  msgstr ""
829
 
830
- #: admin/pages/wptouch-admin-general-settings.php:642
831
  msgid "WordPress Pages"
832
  msgstr ""
833
 
834
- #: admin/pages/wptouch-admin-general-settings.php:660 core/admin-render.php:78
835
  #: core/admin-render.php:110 core/config.php:94
836
  msgid "Customize Theme"
837
  msgstr ""
838
 
839
- #: admin/pages/wptouch-admin-general-settings.php:726
840
  msgctxt "wptouch-pro"
841
  msgid "Subscribe to updates about new releases and tips"
842
  msgstr ""
@@ -1684,8 +1683,7 @@ msgstr ""
1684
  msgid "Comments are closed"
1685
  msgstr ""
1686
 
1687
- #: themes/bauhaus/default/footer.php:10
1688
- #: themes/foundation/default/footer.php:10
1689
  msgid "Back to top"
1690
  msgstr ""
1691
 
@@ -1729,8 +1727,7 @@ msgstr ""
1729
  msgid "older posts"
1730
  msgstr ""
1731
 
1732
- #: themes/bauhaus/default/nav-bar.php:6
1733
- #: themes/foundation/default/nav-bar.php:6
1734
  msgid "previous post"
1735
  msgstr ""
1736
 
@@ -1766,28 +1763,23 @@ msgstr ""
1766
  msgid "No results found"
1767
  msgstr ""
1768
 
1769
- #: themes/bauhaus/default/search.php:66
1770
- #: themes/foundation/default/search.php:43
1771
  msgid "Load more %s results"
1772
  msgstr ""
1773
 
1774
- #: themes/bauhaus/default/sharing.php:2
1775
- #: themes/foundation/default/sharing.php:2
1776
  msgid "Share"
1777
  msgstr ""
1778
 
1779
- #: themes/bauhaus/default/sharing.php:3
1780
- #: themes/foundation/default/sharing.php:3
1781
  msgid "Tweet"
1782
  msgstr ""
1783
 
1784
- #: themes/bauhaus/default/sharing.php:4
1785
- #: themes/foundation/default/sharing.php:4
1786
  msgid "Pin"
1787
  msgstr ""
1788
 
1789
- #: themes/bauhaus/default/sharing.php:5
1790
- #: themes/foundation/default/sharing.php:5
1791
  msgid "Mail"
1792
  msgstr ""
1793
 
@@ -2369,7 +2361,7 @@ msgid "iPad"
2369
  msgstr ""
2370
 
2371
  #: themes/foundation/modules/tablets/tablets.php:64
2372
- #: themes/foundation/root-functions.php:466
2373
  msgid "%d by %d pixels (PNG)"
2374
  msgstr ""
2375
 
@@ -2393,123 +2385,127 @@ msgstr ""
2393
  msgid "Language: "
2394
  msgstr ""
2395
 
2396
- #: themes/foundation/root-functions.php:390
2397
  msgid "Theme Colors"
2398
  msgstr ""
2399
 
2400
- #: themes/foundation/root-functions.php:406
2401
  msgid "Number of posts in post listings"
2402
  msgstr ""
2403
 
2404
- #: themes/foundation/root-functions.php:407
2405
  msgid ""
2406
  "Overrides the WordPress Reading settings for \"Blog pages show at most\""
2407
  msgstr ""
2408
 
2409
- #: themes/foundation/root-functions.php:419
2410
  msgid "Excluded categories"
2411
  msgstr ""
2412
 
2413
- #: themes/foundation/root-functions.php:420
2414
  msgid "Comma separated by category name"
2415
  msgstr ""
2416
 
2417
- #: themes/foundation/root-functions.php:427
2418
  msgid "Excluded tags"
2419
  msgstr ""
2420
 
2421
- #: themes/foundation/root-functions.php:428
2422
  msgid "Comma separated by tag name"
2423
  msgstr ""
2424
 
2425
- #: themes/foundation/root-functions.php:439
2426
  msgid "Blog"
2427
  msgstr ""
2428
 
2429
- #: themes/foundation/root-functions.php:449
2430
- #: themes/foundation/root-functions.php:1220
2431
  msgid "Pages"
2432
  msgstr ""
2433
 
2434
- #: themes/foundation/root-functions.php:460
2435
  msgid "Site Icon"
2436
  msgstr ""
2437
 
2438
- #: themes/foundation/root-functions.php:484
2439
  msgid "Site Logo"
2440
  msgstr ""
2441
 
2442
- #: themes/foundation/root-functions.php:496
2443
  msgid "Header"
2444
  msgstr ""
2445
 
2446
- #: themes/foundation/root-functions.php:508
2447
- msgid "Footer"
2448
  msgstr ""
2449
 
2450
- #: themes/foundation/root-functions.php:514
2451
- msgid "Custom footer content (HTML is allowed)"
 
 
 
 
2452
  msgstr ""
2453
 
2454
- #: themes/foundation/root-functions.php:529
2455
  msgid "Custom CSS"
2456
  msgstr ""
2457
 
2458
- #: themes/foundation/root-functions.php:535
2459
  msgid "Custom CSS Declarations"
2460
  msgstr ""
2461
 
2462
- #: themes/foundation/root-functions.php:886
2463
  msgid "search results for '%s'"
2464
  msgstr ""
2465
 
2466
- #: themes/foundation/root-functions.php:888
2467
  msgid "%sCategories &rsaquo;%s %s"
2468
  msgstr ""
2469
 
2470
- #: themes/foundation/root-functions.php:890
2471
  msgid "Tags &rsaquo; %s"
2472
  msgstr ""
2473
 
2474
- #: themes/foundation/root-functions.php:892
2475
- #: themes/foundation/root-functions.php:894
2476
- #: themes/foundation/root-functions.php:896
2477
  msgid "Archives &rsaquo; %s"
2478
  msgstr ""
2479
 
2480
- #: themes/foundation/root-functions.php:910
2481
  msgid "Load more from this category"
2482
  msgstr ""
2483
 
2484
- #: themes/foundation/root-functions.php:912
2485
  msgid "Load more tagged like this"
2486
  msgstr ""
2487
 
2488
- #: themes/foundation/root-functions.php:914
2489
  msgid "Load more from this day"
2490
  msgstr ""
2491
 
2492
- #: themes/foundation/root-functions.php:916
2493
  msgid "Load more from this month"
2494
  msgstr ""
2495
 
2496
- #: themes/foundation/root-functions.php:918
2497
  msgid "Load more from this year"
2498
  msgstr ""
2499
 
2500
- #: themes/foundation/root-functions.php:920
2501
  msgid "Load more in this section"
2502
  msgstr ""
2503
 
2504
- #: themes/foundation/root-functions.php:922
2505
  msgid "Load more entries"
2506
  msgstr ""
2507
 
2508
- #: themes/foundation/root-functions.php:1169
2509
  msgid "Post"
2510
  msgstr ""
2511
 
2512
- #: themes/foundation/root-functions.php:1171
2513
  msgid "Page"
2514
  msgstr ""
2515
 
4
  msgstr ""
5
  "Project-Id-Version: WPtouch Mobile Plugin 4.3.19\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
7
+ "POT-Creation-Date: 2017-10-05 20:28:28+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: admin/customizer/wptouch-customizer.php:547
16
  msgid "Device Orientation"
17
  msgstr ""
18
 
19
+ #: admin/customizer/wptouch-customizer.php:574
20
  msgid "Switch to Mobile Theme"
21
  msgstr ""
22
 
23
+ #: admin/customizer/wptouch-customizer.php:575
24
  msgid "Switch to Desktop Theme"
25
  msgstr ""
26
 
386
  #: admin/settings/html/extension-browser-item.php:10
387
  #: admin/settings/html/installed_icon_sets_ajax.php:13
388
  #: admin/settings/html/installed_icon_sets_ajax.php:26
389
+ #: admin/settings/html/theme-browser-item.php:12 core/class-wptouch-pro.php:989
 
390
  msgid "Installed"
391
  msgstr ""
392
 
674
  msgid "Find your ID from the %siTunes Link Maker%s."
675
  msgstr ""
676
 
677
+ #: admin/pages/wptouch-admin-general-settings.php:230
 
 
 
 
678
  msgid "Analytics Code"
679
  msgstr ""
680
 
681
+ #: admin/pages/wptouch-admin-general-settings.php:235
682
+ #: admin/pages/wptouch-admin-general-settings.php:660
683
  msgid "None"
684
  msgstr ""
685
 
686
+ #: admin/pages/wptouch-admin-general-settings.php:237
687
  msgid "Custom"
688
  msgstr ""
689
 
690
+ #: admin/pages/wptouch-admin-general-settings.php:244
691
  msgid "Site ID"
692
  msgstr ""
693
 
694
+ #: admin/pages/wptouch-admin-general-settings.php:272
695
+ msgid "Analytics"
696
+ msgstr ""
697
+
698
+ #: admin/pages/wptouch-admin-general-settings.php:281
699
  msgid "WPtouch Pro Love"
700
  msgstr ""
701
 
702
+ #: admin/pages/wptouch-admin-general-settings.php:287
703
  msgid "Show powered by WPtouch Pro link in theme footer"
704
  msgstr ""
705
 
706
+ #: admin/pages/wptouch-admin-general-settings.php:299
707
  msgid "Language"
708
  msgstr ""
709
 
710
+ #: admin/pages/wptouch-admin-general-settings.php:305
711
  msgid "Theme Language"
712
  msgstr ""
713
 
714
+ #: admin/pages/wptouch-admin-general-settings.php:314
715
  msgid "Also applies to admin"
716
  msgstr ""
717
 
718
+ #: admin/pages/wptouch-admin-general-settings.php:333
719
  msgctxt ""
720
  "shortcodes are pieces of code [like_this] that users can drop into textareas "
721
  "that will convert to longer pieces of code"
722
  msgid "Shortcodes"
723
  msgstr ""
724
 
725
+ #: admin/pages/wptouch-admin-general-settings.php:339
726
  msgid "Process desktop theme shortcodes"
727
  msgstr ""
728
 
729
+ #: admin/pages/wptouch-admin-general-settings.php:347
730
  msgid "Filter out shortcodes"
731
  msgstr ""
732
 
733
+ #: admin/pages/wptouch-admin-general-settings.php:348
734
  msgid "Filters out shortcodes from displaying when WPtouch Pro is active."
735
  msgstr ""
736
 
737
+ #: admin/pages/wptouch-admin-general-settings.php:359
738
  msgctxt ""
739
  "caching services like Varnish can sometimes cause issues with WPtouch."
740
  msgid "Caching"
741
  msgstr ""
742
 
743
+ #: admin/pages/wptouch-admin-general-settings.php:365
744
  msgid "Stop sending \"no cache\" request headers for mobile site."
745
  msgstr ""
746
 
747
+ #: admin/pages/wptouch-admin-general-settings.php:366
748
  msgid ""
749
  "By default WPtouch requests that mobile pages are not cached. This helps "
750
  "prevent the mobile site from being served to desktop users and the desktop "
751
  "site from being served to mobile users."
752
  msgstr ""
753
 
754
+ #: admin/pages/wptouch-admin-general-settings.php:380
755
  msgid "Active Plugins"
756
  msgstr ""
757
 
758
+ #: admin/pages/wptouch-admin-general-settings.php:391
759
  msgid ""
760
  "Attempts to disable plugins for mobile visitors. Some plugins don‘t support "
761
  "this feature due to the way they load in WordPress."
762
  msgstr ""
763
 
764
+ #: admin/pages/wptouch-admin-general-settings.php:403
765
  msgid "Mobile Devices & Browsers"
766
  msgstr ""
767
 
768
+ #: admin/pages/wptouch-admin-general-settings.php:463
769
  msgid "Tablets"
770
  msgstr ""
771
 
772
+ #: admin/pages/wptouch-admin-general-settings.php:521
773
  msgid "Tablet Devices & Browsers"
774
  msgstr ""
775
 
776
+ #: admin/pages/wptouch-admin-general-settings.php:536
777
  msgid ""
778
  "If your theme supports tablets, devices and browsers WPtouch Pro can be "
779
  "enabled for will be listed below."
780
  msgstr ""
781
 
782
+ #: admin/pages/wptouch-admin-general-settings.php:542
783
  msgid "Additional User Agents"
784
  msgstr ""
785
 
786
+ #: admin/pages/wptouch-admin-general-settings.php:548
787
  msgid "User agents to add"
788
  msgstr ""
789
 
790
+ #: admin/pages/wptouch-admin-general-settings.php:549
791
  msgid "You can enter partial i.e. \"nokia\" or full agent strings"
792
  msgstr ""
793
 
794
+ #: admin/pages/wptouch-admin-general-settings.php:566
795
  msgid "Menu Setup"
796
  msgstr ""
797
 
798
+ #: admin/pages/wptouch-admin-general-settings.php:584
799
  msgid "Menu Options"
800
  msgstr ""
801
 
802
+ #: admin/pages/wptouch-admin-general-settings.php:590
803
  msgid "Enable parent items as links"
804
  msgstr ""
805
 
806
+ #: admin/pages/wptouch-admin-general-settings.php:591
807
  msgid "If disabled, parent menu items will only toggle child items."
808
  msgstr ""
809
 
810
+ #: admin/pages/wptouch-admin-general-settings.php:598
811
  msgid "Use menu icons"
812
  msgstr ""
813
 
814
+ #: admin/pages/wptouch-admin-general-settings.php:599
815
  msgid "Adds the ability to associate icons with menu items"
816
  msgstr ""
817
 
818
+ #: admin/pages/wptouch-admin-general-settings.php:610
819
  msgid "Menu Icon Sets"
820
  msgstr ""
821
 
822
+ #: admin/pages/wptouch-admin-general-settings.php:623
823
  #: admin/settings/html/installed_icon_sets_ajax.php:4
824
  #: core/class-wptouch-pro.php:2185 core/class-wptouch-pro.php:2186
825
  #: core/config.php:54
826
  msgid "Custom Icons"
827
  msgstr ""
828
 
829
+ #: admin/pages/wptouch-admin-general-settings.php:654
830
  msgid "WordPress Pages"
831
  msgstr ""
832
 
833
+ #: admin/pages/wptouch-admin-general-settings.php:672 core/admin-render.php:78
834
  #: core/admin-render.php:110 core/config.php:94
835
  msgid "Customize Theme"
836
  msgstr ""
837
 
838
+ #: admin/pages/wptouch-admin-general-settings.php:739
839
  msgctxt "wptouch-pro"
840
  msgid "Subscribe to updates about new releases and tips"
841
  msgstr ""
1683
  msgid "Comments are closed"
1684
  msgstr ""
1685
 
1686
+ #: themes/bauhaus/default/footer.php:10 themes/foundation/default/footer.php:10
 
1687
  msgid "Back to top"
1688
  msgstr ""
1689
 
1727
  msgid "older posts"
1728
  msgstr ""
1729
 
1730
+ #: themes/bauhaus/default/nav-bar.php:6 themes/foundation/default/nav-bar.php:6
 
1731
  msgid "previous post"
1732
  msgstr ""
1733
 
1763
  msgid "No results found"
1764
  msgstr ""
1765
 
1766
+ #: themes/bauhaus/default/search.php:66 themes/foundation/default/search.php:43
 
1767
  msgid "Load more %s results"
1768
  msgstr ""
1769
 
1770
+ #: themes/bauhaus/default/sharing.php:2 themes/foundation/default/sharing.php:2
 
1771
  msgid "Share"
1772
  msgstr ""
1773
 
1774
+ #: themes/bauhaus/default/sharing.php:3 themes/foundation/default/sharing.php:3
 
1775
  msgid "Tweet"
1776
  msgstr ""
1777
 
1778
+ #: themes/bauhaus/default/sharing.php:4 themes/foundation/default/sharing.php:4
 
1779
  msgid "Pin"
1780
  msgstr ""
1781
 
1782
+ #: themes/bauhaus/default/sharing.php:5 themes/foundation/default/sharing.php:5
 
1783
  msgid "Mail"
1784
  msgstr ""
1785
 
2361
  msgstr ""
2362
 
2363
  #: themes/foundation/modules/tablets/tablets.php:64
2364
+ #: themes/foundation/root-functions.php:540
2365
  msgid "%d by %d pixels (PNG)"
2366
  msgstr ""
2367
 
2385
  msgid "Language: "
2386
  msgstr ""
2387
 
2388
+ #: themes/foundation/root-functions.php:453
2389
  msgid "Theme Colors"
2390
  msgstr ""
2391
 
2392
+ #: themes/foundation/root-functions.php:469
2393
  msgid "Number of posts in post listings"
2394
  msgstr ""
2395
 
2396
+ #: themes/foundation/root-functions.php:470
2397
  msgid ""
2398
  "Overrides the WordPress Reading settings for \"Blog pages show at most\""
2399
  msgstr ""
2400
 
2401
+ #: themes/foundation/root-functions.php:482
2402
  msgid "Excluded categories"
2403
  msgstr ""
2404
 
2405
+ #: themes/foundation/root-functions.php:483
2406
  msgid "Comma separated by category name"
2407
  msgstr ""
2408
 
2409
+ #: themes/foundation/root-functions.php:490
2410
  msgid "Excluded tags"
2411
  msgstr ""
2412
 
2413
+ #: themes/foundation/root-functions.php:491
2414
  msgid "Comma separated by tag name"
2415
  msgstr ""
2416
 
2417
+ #: themes/foundation/root-functions.php:513
2418
  msgid "Blog"
2419
  msgstr ""
2420
 
2421
+ #: themes/foundation/root-functions.php:523
2422
+ #: themes/foundation/root-functions.php:1343
2423
  msgid "Pages"
2424
  msgstr ""
2425
 
2426
+ #: themes/foundation/root-functions.php:534
2427
  msgid "Site Icon"
2428
  msgstr ""
2429
 
2430
+ #: themes/foundation/root-functions.php:558
2431
  msgid "Site Logo"
2432
  msgstr ""
2433
 
2434
+ #: themes/foundation/root-functions.php:575
2435
  msgid "Header"
2436
  msgstr ""
2437
 
2438
+ #: themes/foundation/root-functions.php:589
2439
+ msgid "Custom footer content"
2440
  msgstr ""
2441
 
2442
+ #: themes/foundation/root-functions.php:590
2443
+ msgid "HTML is allowed"
2444
+ msgstr ""
2445
+
2446
+ #: themes/foundation/root-functions.php:607
2447
+ msgid "Footer"
2448
  msgstr ""
2449
 
2450
+ #: themes/foundation/root-functions.php:619
2451
  msgid "Custom CSS"
2452
  msgstr ""
2453
 
2454
+ #: themes/foundation/root-functions.php:625
2455
  msgid "Custom CSS Declarations"
2456
  msgstr ""
2457
 
2458
+ #: themes/foundation/root-functions.php:986
2459
  msgid "search results for '%s'"
2460
  msgstr ""
2461
 
2462
+ #: themes/foundation/root-functions.php:989
2463
  msgid "%sCategories &rsaquo;%s %s"
2464
  msgstr ""
2465
 
2466
+ #: themes/foundation/root-functions.php:991
2467
  msgid "Tags &rsaquo; %s"
2468
  msgstr ""
2469
 
2470
+ #: themes/foundation/root-functions.php:993
2471
+ #: themes/foundation/root-functions.php:995
2472
+ #: themes/foundation/root-functions.php:997
2473
  msgid "Archives &rsaquo; %s"
2474
  msgstr ""
2475
 
2476
+ #: themes/foundation/root-functions.php:1011
2477
  msgid "Load more from this category"
2478
  msgstr ""
2479
 
2480
+ #: themes/foundation/root-functions.php:1013
2481
  msgid "Load more tagged like this"
2482
  msgstr ""
2483
 
2484
+ #: themes/foundation/root-functions.php:1015
2485
  msgid "Load more from this day"
2486
  msgstr ""
2487
 
2488
+ #: themes/foundation/root-functions.php:1017
2489
  msgid "Load more from this month"
2490
  msgstr ""
2491
 
2492
+ #: themes/foundation/root-functions.php:1019
2493
  msgid "Load more from this year"
2494
  msgstr ""
2495
 
2496
+ #: themes/foundation/root-functions.php:1021
2497
  msgid "Load more in this section"
2498
  msgstr ""
2499
 
2500
+ #: themes/foundation/root-functions.php:1023
2501
  msgid "Load more entries"
2502
  msgstr ""
2503
 
2504
+ #: themes/foundation/root-functions.php:1286
2505
  msgid "Post"
2506
  msgstr ""
2507
 
2508
+ #: themes/foundation/root-functions.php:1288
2509
  msgid "Page"
2510
  msgstr ""
2511
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: wptouch, sureswiftcapital, duanestorey, dalemugford, adamdipardo, oxymoron
3
  Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
4
  Requires at least: 4.2
5
- Stable tag: 4.3.19
6
- Tested up to: 4.7
7
  License: GPLv2
8
 
9
  Make your WordPress website mobile-friendly with just a few clicks.
@@ -33,6 +33,10 @@ For more information visit [WPtouch.com](http://www.wptouch.com/?utm_campaign=wp
33
 
34
  == Changelog ==
35
 
 
 
 
 
36
  = Version 4.3.19 (August 21, 2017) =
37
 
38
  * Security: Added escaping to untrusted output.
@@ -276,10 +280,6 @@ You can install *WPtouch* directly from the WordPress admin. Visit the *Plugins
276
 
277
  Once you have installed and activated WPtouch, visit the admin page via the sidebar menu to customize your WPtouch installation's appearance.
278
 
279
- = Caching Plugin Configuration =
280
-
281
- Please note that if you are using a caching plugin like W3 Total Cache or WP Super Cache, you will have to do additional configuration, otherwise you may occasionally see the mobile site in a desktop browser and the desktop site in a mobile browser. These changes are outlined in the user manual which is accessible in the WPtouch admin.
282
-
283
  = User Manual =
284
 
285
  You can download the user manual from within the WPtouch administration panel, or [download the WPtouch manual here](). It contains information on how to configure WPtouch. Please note that if you are using a caching plugin, you will need to perform additional steps for WPtouch to work as expected.
@@ -332,13 +332,13 @@ In the free version, the newest changes have more to do with under the hood impr
332
 
333
  = What's Next? =
334
 
335
- We've got theme and feature updates planned into 2016 based on feedback from our users, but that's all we'll share!
336
 
337
- == Other Notes ==
338
 
339
  If you are using a caching plugin, you will need to configure it to work properly with WPtouch. If your caching plugin is not configured, or not configured properly, you will most encounter inconsistent behaviour where WPtouch shows for desktop visitors, or mobile visitors see your desktop site.
340
 
341
- = W3 Total Cache =
342
 
343
  1. If you have “Browser Cache” enabled, please disable ‘Set expires header' in the Browser cache settings to prevent Desktop/Mobile switch link issues.
344
  2. Go to the “Page Cache” settings under the Performance tab.
@@ -356,7 +356,7 @@ Scroll down to the “Rejected User Agents” field and paste the list of WPtouc
356
 
357
  Ensure that W3 Total Cache is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
358
 
359
- = WP Super Cache =
360
 
361
  Note: The native support for the free version of WPtouch found in WP Super Cache (under the “Plugins” tab) must be disabled to prevent conflicts in WPtouch.
362
 
@@ -366,13 +366,13 @@ Note: The native support for the free version of WPtouch found in WP Super Cache
366
  4. In the “Contents” tab, click “Delete Cache” and “Delete Expired” to delete pages that were likely cached before adding the new list of rejected user agents.
367
  5. Ensure that WP Super Cache is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
368
 
369
- = WP Rocket =
370
 
371
  In the "Basic Options" of WP Rocket's settings page, make sure "Enable caching for mobile devices." is deselected. Ensure that WP Rocket is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
372
 
373
  Please see the user manual for additional information.
374
 
375
- = WP Engine =
376
 
377
  Please contact WPEngine and ask them to exclude the user agents found in the “User agent list for configuring cache plugins“.
378
 
2
  Contributors: wptouch, sureswiftcapital, duanestorey, dalemugford, adamdipardo, oxymoron
3
  Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
4
  Requires at least: 4.2
5
+ Stable tag: 4.3.20
6
+ Tested up to: 4.8.2
7
  License: GPLv2
8
 
9
  Make your WordPress website mobile-friendly with just a few clicks.
33
 
34
  == Changelog ==
35
 
36
+ = Version 4.3.20 (October 5, 2017) =
37
+
38
+ * Fixed: Prevent stripping of form input elements from the additional footer html content entered in the customizer.
39
+
40
  = Version 4.3.19 (August 21, 2017) =
41
 
42
  * Security: Added escaping to untrusted output.
280
 
281
  Once you have installed and activated WPtouch, visit the admin page via the sidebar menu to customize your WPtouch installation's appearance.
282
 
 
 
 
 
283
  = User Manual =
284
 
285
  You can download the user manual from within the WPtouch administration panel, or [download the WPtouch manual here](). It contains information on how to configure WPtouch. Please note that if you are using a caching plugin, you will need to perform additional steps for WPtouch to work as expected.
332
 
333
  = What's Next? =
334
 
335
+ We've got theme and feature updates planned based on feedback from our users, but that's all we'll share!
336
 
337
+ = What if I'm using a caching plugin? =
338
 
339
  If you are using a caching plugin, you will need to configure it to work properly with WPtouch. If your caching plugin is not configured, or not configured properly, you will most encounter inconsistent behaviour where WPtouch shows for desktop visitors, or mobile visitors see your desktop site.
340
 
341
+ **W3 Total Cache**
342
 
343
  1. If you have “Browser Cache” enabled, please disable ‘Set expires header' in the Browser cache settings to prevent Desktop/Mobile switch link issues.
344
  2. Go to the “Page Cache” settings under the Performance tab.
356
 
357
  Ensure that W3 Total Cache is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
358
 
359
+ **WP Super Cache**
360
 
361
  Note: The native support for the free version of WPtouch found in WP Super Cache (under the “Plugins” tab) must be disabled to prevent conflicts in WPtouch.
362
 
366
  4. In the “Contents” tab, click “Delete Cache” and “Delete Expired” to delete pages that were likely cached before adding the new list of rejected user agents.
367
  5. Ensure that WP Super Cache is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
368
 
369
+ **WP Rocket**
370
 
371
  In the "Basic Options" of WP Rocket's settings page, make sure "Enable caching for mobile devices." is deselected. Ensure that WP Rocket is selected in the plugins list in the Compatibility section of the WPtouch admin panel.
372
 
373
  Please see the user manual for additional information.
374
 
375
+ **WP Engine**
376
 
377
  Please contact WPEngine and ask them to exclude the user agents found in the “User agent list for configuring cache plugins“.
378
 
themes/bauhaus/readme.txt CHANGED
@@ -2,7 +2,7 @@ Theme Name: Bauhaus
2
  Theme URI: http://www.wptouch.com/themes/bauhaus
3
  Author: WPtouch
4
  Description: Clean, modern, functional design. Great for all types of WordPress sites.
5
- Version: 2.2.1
6
  Depends on: 4.3
7
  Framework: 2.0
8
  Tags: smartphone
@@ -25,13 +25,17 @@ Bauhaus is one of our more flexible themes, and is designed to easily take on th
25
 
26
  == Changelog ==
27
 
 
 
 
 
28
  = Version 2.2.1 =
29
 
30
- * Bug Fix: Addressed issue with titles not showing when header color was set to dark.
31
 
32
  = Version 2.2 =
33
 
34
- * SEO Improvement: Update page and post titles to <h1> tags. Change site title away from <h1> tag.
35
 
36
  = Version 2.1 =
37
 
2
  Theme URI: http://www.wptouch.com/themes/bauhaus
3
  Author: WPtouch
4
  Description: Clean, modern, functional design. Great for all types of WordPress sites.
5
+ Version: 2.2.2
6
  Depends on: 4.3
7
  Framework: 2.0
8
  Tags: smartphone
25
 
26
  == Changelog ==
27
 
28
+ = Version 2.2.2 =
29
+
30
+ * Fixed: Fix HTML output issue in readme.txt file.
31
+
32
  = Version 2.2.1 =
33
 
34
+ * Fixed: Addressed issue with titles not showing when header color was set to dark.
35
 
36
  = Version 2.2 =
37
 
38
+ * SEO Improvement: Update page and post titles to h1 tags. Change site title away from h1 tag.
39
 
40
  = Version 2.1 =
41
 
themes/bauhaus/root-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- define( 'BAUHAUS_THEME_VERSION', '2.2.1' );
4
  define( 'BAUHAUS_SETTING_DOMAIN', 'bauhaus' );
5
  define( 'BAUHAUS_DIR', wptouch_get_bloginfo( 'theme_root_directory' ) );
6
  define( 'BAUHAUS_URL', wptouch_get_bloginfo( 'theme_parent_url' ) );
1
  <?php
2
 
3
+ define( 'BAUHAUS_THEME_VERSION', '2.2.2' );
4
  define( 'BAUHAUS_SETTING_DOMAIN', 'bauhaus' );
5
  define( 'BAUHAUS_DIR', wptouch_get_bloginfo( 'theme_root_directory' ) );
6
  define( 'BAUHAUS_URL', wptouch_get_bloginfo( 'theme_parent_url' ) );
themes/foundation/root-functions.php CHANGED
@@ -7,7 +7,7 @@ define( 'FOUNDATION_URL', WPTOUCH_URL . '/themes/foundation' );
7
  define( 'FOUNDATION_SETTING_DOMAIN', 'foundation' );
8
 
9
  define( 'FOUNDATION_PAGE_GENERAL', __( 'Theme Settings', 'wptouch-pro' ) );
10
- define( 'FOUNDATION_PAGE_BRANDING', __( 'Branding', 'wptouch-pro') );
11
  define( 'FOUNDATION_PAGE_MEDIA', __( 'Media Handling', 'wptouch-pro' ) );
12
  define( 'FOUNDATION_PAGE_HOMESCREEN_ICONS', __( 'Bookmark Icons', 'wptouch-pro' ) );
13
  define( 'FOUNDATION_PAGE_CUSTOM', __( 'Custom Content', 'wptouch-pro' ) );
@@ -18,7 +18,7 @@ add_filter( 'wptouch_setting_defaults_foundation', 'foundation_setting_defaults'
18
  add_filter( 'wptouch_admin_page_render_wptouch-admin-theme-settings', 'foundation_render_theme_settings' );
19
  add_filter( 'wptouch_setting_version_compare', 'foundation_setting_version_compare', 10, 2 );
20
  add_filter( 'wptouch_body_classes', 'foundation_body_classes' );
21
- add_filter( 'wptouch_the_content', 'foundation_insert_multipage_links');
22
 
23
  // fix for JetPack
24
  add_filter( 'jetpack_check_mobile', 'foundation_override_jetpack_check_mobile' );
@@ -50,9 +50,11 @@ function foundation_add_wpml_lang_switcher() {
50
  echo '<div id="wpml-language-chooser-wrap"><div id="wpml-language-chooser">';
51
  echo '<strong>' . __( 'Language: ', 'wptouch-pro' ) . '</strong>';
52
  echo '<select>';
53
- foreach( $data as $lang => $item ) {
54
  echo '<option value="' . $item['url'] . '"';
55
- if ( $item["active"] ) echo " selected";
 
 
56
  echo '>' . $item['native_name'] . '</option>';
57
  }
58
  echo '</select>';
@@ -84,13 +86,13 @@ function foundation_process_image_file( $file_name, $setting_name ) {
84
 
85
  $size = getimagesize( $file_name );
86
  if ( $size ) {
87
- $width = $size[0];
88
  $height = $size[1];
89
 
90
  if ( $size['mime'] == 'image/png' ) {
91
  if ( $width > FOUNDATION_MAX_LOGO_SIZE ) {
92
- $new_width = FOUNDATION_MAX_LOGO_SIZE;
93
- $new_height = $height*$new_width/$width;
94
 
95
  $src_image = imagecreatefrompng( $file_name );
96
 
@@ -99,7 +101,7 @@ function foundation_process_image_file( $file_name, $setting_name ) {
99
  // Preserve Transparency
100
  imagecolortransparent( $saved_image, imagecolorallocate( $saved_image, 0, 0, 0 ) );
101
 
102
- imagecopyresampled( $saved_image, $src_image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
103
 
104
  // Get rid of the old file
105
  unlink( $file_name );
@@ -114,7 +116,7 @@ function foundation_process_image_file( $file_name, $setting_name ) {
114
  }
115
 
116
  function foundation_prepare_uploaded_file_url( $uploaded_file ) {
117
- if ( !strstr( $uploaded_file, 'http' ) && !strstr( $uploaded_file, 'wp-content' ) ) {
118
  $uploaded_file = WPTOUCH_BASE_CONTENT_URL . $uploaded_file;
119
  } else {
120
  $uploaded_file = wptouch_check_url_ssl( $uploaded_file );
@@ -127,7 +129,7 @@ function foundation_setting_defaults( $settings ) {
127
 
128
  // Depreciated and removed in 4.0
129
  $settings->allow_nested_comment_replies = false;
130
- $settings->twitter_account = false;
131
 
132
  // Landing Pages
133
  $settings->latest_posts_page = 'none';
@@ -136,97 +138,97 @@ function foundation_setting_defaults( $settings ) {
136
  $settings->new_video_handling = true;
137
 
138
  // Theme Settings
139
- $settings->allow_zoom = false;
140
- $settings->smart_app_banner = '';
141
- $settings->custom_footer_message = '';
142
  $settings->custom_css_declarations = '';
143
 
144
  // Misc
145
  $settings->logo_image = '';
146
 
147
  // Blog
148
- $settings->posts_per_page = '5';
149
  $settings->excluded_categories = '';
150
- $settings->excluded_tags = '';
151
 
152
  // Branding
153
  $settings->typography_sets = 'default';
154
 
155
  // Homescreen Icons
156
- $settings->iphone_icon_retina = false;
157
  $settings->android_others_icon = false;
158
- $settings->ipad_icon_retina = false;
159
 
160
  // Web App Mode
161
  $settings->webapp_enable_persistence = false;
162
- $settings->webapp_show_notice = true;
163
- $settings->webapp_ignore_urls = '';
164
  $settings->webapp_notice_expiry_days = 30;
165
 
166
  // Statrup Screens
167
- $settings->startup_screen_iphone_2g_3g = false;
168
- $settings->startup_screen_iphone_4_4s = false;
169
- $settings->startup_screen_iphone_5 = false;
170
- $settings->startup_screen_iphone_6 = false;
171
- $settings->startup_screen_iphone_6plus = false;
172
- $settings->startup_screen_ipad_1_portrait = false;
173
- $settings->startup_screen_ipad_1_landscape = false;
174
- $settings->startup_screen_ipad_3_portrait = false;
175
- $settings->startup_screen_ipad_3_landscape = false;
176
- $settings->startup_screen_full_res = false;
177
- $settings->startup_screen_ipad_full_portrait = false;
178
  $settings->startup_screen_ipad_full_landscape = false;
179
 
180
  // Advertising
181
- $settings->advertising_type = 'none';
182
- $settings->advertising_location = 'header';
183
  $settings->advertising_blog_listings = true;
184
- $settings->advertising_single = true;
185
- $settings->advertising_pages = false;
186
- $settings->advertising_taxonomy = true;
187
- $settings->advertising_search = true;
188
- $settings->google_adsense_id = '';
189
- $settings->google_slot_id = '';
190
- $settings->google_code_type = 'sync';
191
  $settings->custom_advertising_mobile = '';
192
 
193
  // Sharing
194
- $settings->show_share = true;
195
- $settings->share_on_pages = false;
196
- $settings->share_location = 'top';
197
  $settings->share_colour_scheme = 'default';
198
 
199
  // Social Links
200
- $settings->social_facebook_url = '';
201
- $settings->social_twitter_url = '';
202
- $settings->social_google_url = '';
203
  $settings->social_instagram_url = '';
204
- $settings->social_tumblr_url = '';
205
  $settings->social_pinterest_url = '';
206
- $settings->social_vimeo_url = '';
207
- $settings->social_youtube_url = '';
208
- $settings->social_linkedin_url = '';
209
- $settings->social_yelp_url = '';
210
- $settings->social_email_url = '';
211
- $settings->social_rss_url = '';
212
 
213
  // Featured Slider
214
- $settings->featured_enabled = true;
215
- $settings->featured_blog = true;
216
- $settings->featured_homepage = true;
217
- $settings->featured_style = 'enhanced';
218
- $settings->featured_autoslide = false;
219
- $settings->featured_continuous = false;
220
- $settings->featured_grayscale = false;
221
- $settings->featured_comments = false;
222
- $settings->featured_type = 'latest';
223
- $settings->featured_tag = '';
224
- $settings->featured_category = '';
225
- $settings->featured_post_type = '';
226
- $settings->featured_post_ids = '';
227
- $settings->featured_speed = 'normal';
228
  $settings->featured_max_number_of_posts = '5';
229
- $settings->featured_filter_posts = true;
230
 
231
  return $settings;
232
  }
@@ -248,7 +250,7 @@ function foundation_enqueue_color_data() {
248
  if ( is_array( $colors ) && count( $colors ) ) {
249
  $inline_color_data = '';
250
 
251
- foreach( $colors as $color ) {
252
  $settings = wptouch_get_settings( $color->domain );
253
 
254
  $setting_name = $color->setting;
@@ -273,7 +275,13 @@ function foundation_enqueue_color_data() {
273
  function foundation_handle_footer() {
274
  $settings = foundation_get_settings();
275
 
276
- if( $settings->custom_footer_message ) {
 
 
 
 
 
 
277
  $message = apply_filters( 'foundation_footer_message', $settings->custom_footer_message );
278
 
279
  if ( strip_tags( $message ) == $message ) {
@@ -282,14 +290,64 @@ function foundation_handle_footer() {
282
  $output_message = $message;
283
  }
284
 
285
- echo wp_kses_post( apply_filters( 'foundation_footer_message_output', $output_message ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  }
287
  }
288
 
289
  function foundation_handle_custom_css_declarations() {
290
  $settings = foundation_get_settings();
291
- if( $settings->custom_css_declarations ) {
292
- $styles = apply_filters( 'foundation_custom_css_declarations', $settings->custom_css_declarations );
 
 
 
 
 
293
  $trimmed_styles = trim( $styles );
294
 
295
  if ( strip_tags( $trimmed_styles ) == $trimmed_styles ) {
@@ -298,6 +356,11 @@ function foundation_handle_custom_css_declarations() {
298
  $output_code = $trimmed_styles;
299
  }
300
 
 
 
 
 
 
301
  echo apply_filters( 'foundation_footer_css_declarations_output', $output_code );
302
  }
303
  }
@@ -325,12 +388,12 @@ function foundation_get_tag_list() {
325
 
326
  $tags = get_tags(
327
  array(
328
- 'number' => 50,
329
- 'orderby' => 'count'
330
  )
331
  );
332
 
333
- foreach( $tags as $tag ) {
334
  $all_tags[ $tag->slug ] = $tag->name;
335
  }
336
 
@@ -342,37 +405,37 @@ function foundation_get_category_list() {
342
 
343
  $categories = get_categories(
344
  array(
345
- 'number' => 50,
346
- 'orderby' => 'count'
347
  )
348
  );
349
 
350
- foreach( $categories as $cat ) {
351
  $all_cats[ $cat->slug ] = $cat->name;
352
  }
353
 
354
  return $all_cats;
355
  }
356
 
357
- function foundation_setup_viewport(){
358
- $settings = foundation_get_settings();
359
  $zoomState = 'no';
360
  if ( $settings->allow_zoom == true ) {
361
  $zoomState = 'yes';
362
  }
363
- echo '<meta name="viewport" content="initial-scale=1.0, maximum-scale=3.0, user-scalable=' . $zoomState .', width=device-width" />';
364
  }
365
 
366
  function foundation_render_theme_settings( $page_options ) {
367
  wptouch_add_sub_page( FOUNDATION_PAGE_GENERAL, 'foundation-page-theme-settings', $page_options );
368
 
369
- if ( !wptouch_admin_use_customizer() ) {
370
  if ( foundation_has_theme_colors() ) {
371
  $color_settings = array();
372
 
373
  $colors = foundation_get_theme_colors();
374
 
375
- foreach( $colors as $name => $color ) {
376
  $color_settings[] = wptouch_add_setting(
377
  'color',
378
  $color->setting,
@@ -408,8 +471,8 @@ function foundation_render_theme_settings( $page_options ) {
408
  WPTOUCH_SETTING_BASIC,
409
  '1.0',
410
  array(
411
- 'min' => 1,
412
- 'max' => 15,
413
  'step' => 1,
414
  )
415
  ),
@@ -428,10 +491,21 @@ function foundation_render_theme_settings( $page_options ) {
428
  __( 'Comma separated by tag name', 'wptouch-pro' ),
429
  WPTOUCH_SETTING_BASIC,
430
  '1.0'
431
- )
432
  );
433
 
 
 
 
 
 
434
  $foundation_blog_settings = apply_filters( 'foundation_settings_blog', $foundation_blog_settings );
 
 
 
 
 
 
435
  $foundation_page_settings = apply_filters( 'foundation_settings_page', array() );
436
 
437
  wptouch_add_page_section(
@@ -454,7 +528,7 @@ function foundation_render_theme_settings( $page_options ) {
454
  true
455
  );
456
 
457
- if ( !function_exists( 'has_site_icon' ) ) {
458
  wptouch_add_page_section(
459
  FOUNDATION_PAGE_GENERAL,
460
  __( 'Site Icon', 'wptouch-pro' ),
@@ -486,9 +560,14 @@ function foundation_render_theme_settings( $page_options ) {
486
  WPTOUCH_SETTING_BASIC,
487
  false,
488
  '1.0'
489
- )
490
  );
491
 
 
 
 
 
 
492
  $foundation_header_settings = apply_filters( 'foundation_settings_header', $foundation_header_settings );
493
 
494
  wptouch_add_page_section(
@@ -503,20 +582,31 @@ function foundation_render_theme_settings( $page_options ) {
503
  10
504
  );
505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  wptouch_add_page_section(
507
  FOUNDATION_PAGE_BRANDING,
508
  __( 'Footer', 'wptouch-pro' ),
509
  'foundation-custom-content',
510
- array(
511
- wptouch_add_setting(
512
- 'textarea',
513
- 'custom_footer_message',
514
- __( 'Custom footer content (HTML is allowed)', 'wptouch-pro' ),
515
- false,
516
- WPTOUCH_SETTING_BASIC,
517
- '1.0'
518
- )
519
- ),
520
  $page_options,
521
  FOUNDATION_SETTING_DOMAIN,
522
  true,
@@ -536,7 +626,7 @@ function foundation_render_theme_settings( $page_options ) {
536
  false,
537
  WPTOUCH_SETTING_BASIC,
538
  '4.0'
539
- )
540
  ),
541
  $page_options,
542
  FOUNDATION_SETTING_DOMAIN,
@@ -563,7 +653,7 @@ function foundation_maybe_output_homescreen_icon( $image, $width, $height, $pixe
563
  $use_wordpress_icon = false;
564
  }
565
 
566
- if ( $image && !$use_wordpress_icon ) {
567
  if ( $width != 57 ) {
568
  $size_string = ' sizes="' . $width . 'x' . $height . '"';
569
  } else {
@@ -595,15 +685,15 @@ function foundation_setup_homescreen_icons() {
595
  foundation_maybe_output_homescreen_icon( $settings->iphone_icon_retina, 57, 57, 1 );
596
 
597
  // Default (if no icon added in admin, or icon isn't formatted correctly, and as a catch-all)
598
- if ( !$has_icon ) {
599
  echo '<link rel="apple-touch-icon-precomposed" href="' . WPTOUCH_DEFAULT_HOMESCREEN_ICON . '" />' . "\n";
600
  }
601
  }
602
  }
603
 
604
- function foundation_setup_smart_app_banner(){
605
  $settings = foundation_get_settings();
606
- $appID = $settings->smart_app_banner;
607
  if ( $appID ) {
608
  echo '<meta name="apple-itunes-app" content="app-id=' . $appID . '" />' . "\n";
609
  }
@@ -654,18 +744,28 @@ function foundation_load_theme_modules() {
654
 
655
  $theme_data = foundation_get_theme_data();
656
 
657
- $theme_data->theme_support = apply_filters( 'wptouch_theme_support', $theme_data->theme_support );
 
 
 
 
 
658
 
659
  if ( count( $theme_data->theme_support ) ) {
660
- foreach( $theme_data->theme_support as $module ) {
661
 
 
 
 
 
 
662
  $allow_module_load = apply_filters( 'wptouch_allow_module_' . $module, true );
663
- if ( !$allow_module_load ) {
664
  continue;
665
  }
666
 
667
  $bootstrap_file = dirname( __FILE__ ) . '/modules/' . $module . '/' . $module . '.php';
668
- $defined_name = 'WPTOUCH_MODULE_' . str_replace( '-', '_', strtoupper( $module ) ) . '_INSTALLED';
669
 
670
  if ( file_exists( $bootstrap_file ) ) {
671
  // Load the main bootstrap file
@@ -674,18 +774,18 @@ function foundation_load_theme_modules() {
674
  define( $defined_name, '1' );
675
  }
676
 
677
- if ( !defined( 'WPTOUCH_IS_FREE' ) ) {
678
  // Pro version
679
  $alternate_location = WPTOUCH_DIR . '/pro/modules/' . $module . '/' . $module . '.php';
680
 
681
  if ( file_exists( $alternate_location ) ) {
682
  require_once( $alternate_location );
683
 
684
- if ( !defined( $defined_name ) ) {
685
  define( $defined_name, '1' );
686
  }
687
  }
688
- }
689
  }
690
 
691
  // Force settings to be reloaded
@@ -712,14 +812,14 @@ function foundation_add_theme_support( $theme_support ) {
712
  $theme_data = foundation_get_theme_data();
713
 
714
  if ( is_array( $theme_support ) ) {
715
- foreach( $theme_support as $module ) {
716
- if ( !in_array( $module, $theme_data->theme_support ) ) {
717
- $theme_data->theme_support[] = $module;
718
  }
719
  }
720
  } else {
721
- if ( !in_array( $theme_support, $theme_data->theme_support ) ) {
722
- $theme_data->theme_support[] = $theme_support;
723
  }
724
  }
725
  }
@@ -755,13 +855,13 @@ function foundation_body_classes( $classes ) {
755
  }
756
 
757
  // iOS Device
758
- if ( strpos( $_SERVER['HTTP_USER_AGENT'],'iPhone' ) || strpos( $_SERVER['HTTP_USER_AGENT'],'iPod' ) || strpos( $_SERVER['HTTP_USER_AGENT'],'iPad' ) ) {
759
- $classes[] = 'ios';
760
  }
761
 
762
  // Android Device
763
- if ( strpos( $_SERVER['HTTP_USER_AGENT'],'Android' ) ) {
764
- $classes[] = 'android';
765
  }
766
 
767
  if ( wptouch_should_load_rtl() ) {
@@ -790,14 +890,14 @@ $foundation_registered_colors = array();
790
  function foundation_register_theme_color( $setting_name, $desc, $fg_selectors, $bg_selectors, $domain = FOUNDATION_SETTING_DOMAIN, $live_preview = false, $luma_threshold = false, $luma_class = false ) {
791
  $theme_color = new stdClass;
792
 
793
- $theme_color->setting = $setting_name;
794
- $theme_color->desc = $desc;
795
- $theme_color->fg_selectors = $fg_selectors;
796
- $theme_color->bg_selectors = $bg_selectors;
797
- $theme_color->domain = $domain;
798
  $theme_color->luma_threshold = $luma_threshold;
799
- $theme_color->luma_class = $luma_class;
800
- $theme_color->live_preview = $live_preview;
801
 
802
  global $foundation_registered_colors;
803
  $foundation_registered_colors[ $setting_name ] = $theme_color;
@@ -828,31 +928,31 @@ function wptouch_fdn_comments_pagination() {
828
 
829
  /* Previous + Next Post Functions For Single Post Pages */
830
  function wptouch_fdn_get_previous_post_link() {
831
- $excluded = wptouch_fdn_convert_catname_to_id();
832
  $prev_post = get_adjacent_post( false, $excluded, true );
833
  echo esc_url( get_permalink( $prev_post->ID ) );
834
  }
835
 
836
  function wptouch_fdn_get_next_post_link() {
837
- $excluded = wptouch_fdn_convert_catname_to_id();
838
  $next_post = get_adjacent_post( false, $excluded, false );
839
  echo esc_url( get_permalink( $next_post->ID ) );
840
  }
841
 
842
  function wptouch_fdn_get_previous_post_link_w_title() {
843
- $excluded = wptouch_fdn_convert_catname_to_id();
844
  $prev_post = get_adjacent_post( false, $excluded, true );
845
  echo '<a class="prev-post" href="' . esc_url( get_permalink( $prev_post->ID ) ) . '">' . $prev_post->post_title . '</a>';
846
  }
847
 
848
  function wptouch_fdn_get_next_post_link_w_title() {
849
- $excluded = wptouch_fdn_convert_catname_to_id();
850
  $next_post = get_adjacent_post( false, $excluded, false );
851
  echo '<a class="next-post" href="' . esc_url( get_permalink( $next_post->ID ) ) . '">' . $next_post->post_title . '</a>';
852
  }
853
 
854
- function wptouch_fdn_if_next_post_link(){
855
- $excluded = wptouch_fdn_convert_catname_to_id();
856
  $next_post = get_adjacent_post( false, $excluded, false );
857
 
858
  if ( $next_post ) {
@@ -862,8 +962,8 @@ function wptouch_fdn_if_next_post_link(){
862
  }
863
  }
864
 
865
- function wptouch_fdn_if_previous_post_link(){
866
- $excluded = wptouch_fdn_convert_catname_to_id();
867
  $prev_post = get_adjacent_post( false, $excluded, true );
868
 
869
  if ( $prev_post ) {
@@ -878,25 +978,26 @@ function wptouch_fdn_archive_title_text() {
878
  global $wp_query;
879
  $total_results = $wp_query->found_posts;
880
 
881
- if ( !( is_home() || is_single() ) ) {
882
  echo '<div class="archive-text">';
883
  }
884
  if ( is_search() ) {
885
  echo $total_results . '&nbsp;';
886
- echo sprintf( __( "search results for '%s'", "wptouch-pro" ), get_search_query() );
887
- } if ( is_category() ) {
888
- echo sprintf( __( "%sCategories &rsaquo;%s %s", "wptouch-pro" ), '<span class="type">', '</span>', single_cat_title( "", false ) );
 
889
  } elseif ( is_tag() ) {
890
- echo sprintf( __( "Tags &rsaquo; %s", "wptouch-pro" ), single_tag_title(" ", false ) );
891
  } elseif ( is_day() ) {
892
- echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'F jS, Y' ) );
893
  } elseif ( is_month() ) {
894
- echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'F, Y' ) );
895
  } elseif ( is_year() ) {
896
- echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'Y' ) );
897
  } elseif ( get_post_type() ) {
898
  }
899
- if ( !( is_home() || is_single() ) ) {
900
  echo '</div>';
901
  }
902
  }
@@ -933,16 +1034,22 @@ function wptouch_fdn_ordered_cat_list( $num, $include_count = true, $taxonomy =
933
  if ( $settings->excluded_categories ) {
934
  $new_cats = _foundation_explode_and_trim_taxonomy( $settings->excluded_categories, 'category' );
935
 
936
- if ( is_array( $new_cats ) && count ( $new_cats ) ) {
937
  $excluded_cats = implode( ',', $new_cats );
938
  }
939
  }
940
 
941
 
942
  echo $opening_tag;
943
- $sql = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = '{$taxonomy}' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_cats) AND count >= 1 ORDER BY count DESC LIMIT 0, $num");
944
 
945
  if ( $sql ) {
 
 
 
 
 
 
946
  $sql = apply_filters( 'wptouch_ordered_cat_list_categories', $sql );
947
 
948
  foreach ( $sql as $result ) {
@@ -968,30 +1075,30 @@ function wptouch_fdn_ordered_cat_list( $num, $include_count = true, $taxonomy =
968
  }
969
 
970
  function wptouch_fdn_hierarchical_cat_list( $num, $include_count = true, $taxonomy = 'category', $opening_tag = '<ul>', $closing_tag = '</ul>' ) {
971
- $walker = new WPtouchProMainNavMenuWalker;
972
  $defaults = array(
973
- 'number' => $num,
974
- 'show_option_all' => false,
975
- 'show_option_none' => false,
976
- 'orderby' => 'name',
977
- 'order' => 'ASC',
978
- 'style' => 'list',
979
- 'show_count' => $include_count,
980
- 'hide_empty' => 1,
981
  'use_desc_for_title' => 1,
982
- 'child_of' => 0,
983
- 'feed' => '',
984
- 'feed_type' => '',
985
- 'feed_image' => '',
986
- 'exclude' => '',
987
- 'exclude_tree' => '',
988
- 'current_category' => 0,
989
- 'hierarchical' => true,
990
- 'title_li' => false,
991
- 'echo' => 1,
992
- 'depth' => 0,
993
- 'taxonomy' => $taxonomy,
994
- 'walker' => new WPtouchProCategoryWalker
995
  );
996
 
997
  if ( isset( $args ) ) {
@@ -1000,22 +1107,24 @@ function wptouch_fdn_hierarchical_cat_list( $num, $include_count = true, $taxono
1000
  $r = $defaults;
1001
  }
1002
 
1003
- if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] )
1004
  $r['pad_counts'] = true;
 
1005
 
1006
  if ( true == $r['hierarchical'] ) {
1007
  $r['exclude_tree'] = $r['exclude'];
1008
- $r['exclude'] = '';
1009
  }
1010
 
1011
- if ( ! isset( $r['class'] ) )
1012
  $r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy'];
 
1013
 
1014
  if ( ! taxonomy_exists( $r['taxonomy'] ) ) {
1015
  return false;
1016
  }
1017
 
1018
- $show_option_all = $r['show_option_all'];
1019
  $show_option_none = $r['show_option_none'];
1020
 
1021
  $categories = get_categories( $r );
@@ -1037,7 +1146,7 @@ function wptouch_fdn_hierarchical_cat_list( $num, $include_count = true, $taxono
1037
  $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' );
1038
  $posts_page = esc_url( $posts_page );
1039
  if ( 'list' == $r['style'] ) {
1040
- $output .= "<li class='cat-item-all'><a href='$posts_page'>$show_option_all</a></li>";
1041
  } else {
1042
  $output .= "<a href='$posts_page'>$show_option_all</a>";
1043
  }
@@ -1053,7 +1162,7 @@ function wptouch_fdn_hierarchical_cat_list( $num, $include_count = true, $taxono
1053
  if ( $r['hierarchical'] ) {
1054
  $depth = $r['depth'];
1055
  } else {
1056
- $depth = -1; // Flat.
1057
  }
1058
  $output .= walk_category_tree( $categories, $depth, $r );
1059
 
@@ -1087,14 +1196,14 @@ function wptouch_fdn_ordered_tag_list( $num ) {
1087
  if ( $settings->excluded_tags ) {
1088
  $new_tags = _foundation_explode_and_trim_taxonomy( $settings->excluded_tags, 'post_tag' );
1089
 
1090
- if ( is_array( $new_tags ) && count ( $new_tags ) ) {
1091
  $excluded_tags = implode( ',', $new_tags );
1092
  }
1093
  }
1094
 
1095
  echo '<ul>';
1096
 
1097
- $sql = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = 'post_tag' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_tags) AND count >= 1 ORDER BY count DESC LIMIT 0, $num");
1098
 
1099
  if ( $sql ) {
1100
  foreach ( $sql as $result ) {
@@ -1107,54 +1216,62 @@ function wptouch_fdn_ordered_tag_list( $num ) {
1107
  }
1108
 
1109
  function wptouch_fdn_display_comment( $comment, $args, $depth ) {
1110
- $GLOBALS[ 'comment' ] = $comment;
1111
- $GLOBALS[ 'comment_args' ] = $args;
1112
- $GLOBALS[ 'comment_depth' ] = $depth;
1113
  extract( $args, EXTR_SKIP );
1114
 
1115
  locate_template( 'one-comment.php', true, false );
1116
  }
1117
 
1118
  function wptouch_fdn_get_search_post_types() {
 
 
 
 
 
 
1119
  return apply_filters( 'foundation_search_post_types', array( 'post', 'page' ) );
1120
  }
1121
 
1122
- function wptouch_fdn_convert_catname_to_id(){
1123
  $settings = foundation_get_settings();
1124
- $cats = $settings->excluded_categories;
1125
 
1126
  if ( $cats ) {
1127
- $cat_ids = explode( ',', $cats );
1128
  $new_cats_by_id = array();
1129
 
1130
- foreach( $cat_ids as $cat ) {
1131
- $trimmed_cat = trim( $cat );
1132
  $new_cats_by_id[] = get_cat_ID( $trimmed_cat );
1133
  }
1134
 
1135
  $new_cats_by_id_list = implode( ',', $new_cats_by_id );
 
1136
  return $new_cats_by_id_list;
1137
  } else {
1138
  return false;
1139
  }
1140
  }
1141
 
1142
- function wptouch_fdn_convert_tagname_to_id(){
1143
  $settings = foundation_get_settings();
1144
- $tags = $settings->excluded_tags;
1145
 
1146
  if ( $tags ) {
1147
- $tag_ids = explode( ',', $tags );
1148
  $new_tags_by_id = array();
1149
 
1150
- foreach( $tag_ids as $tag ) {
1151
- $trimmed_tag = trim( $tag );
1152
- $tagname = get_term_by( 'name', $trimmed_tag, 'post_tag' );
1153
- $tagid = $tagname->term_id;
1154
  $new_tags_by_id[] = $tagid;
1155
  }
1156
 
1157
  $new_tags_by_id_list = implode( ',', $new_tags_by_id );
 
1158
  return $new_tags_by_id_list;
1159
  } else {
1160
  return false;
@@ -1164,21 +1281,26 @@ function wptouch_fdn_convert_tagname_to_id(){
1164
  function wptouch_fdn_get_search_post_type() {
1165
  global $search_post_type;
1166
 
1167
- switch( $search_post_type ) {
1168
  case 'post':
1169
  return __( 'Post', 'wptouch-pro' );
1170
  case 'page':
1171
  return __( 'Page', 'wptouch-pro' );
1172
  default:
 
 
 
 
 
1173
  return apply_filters( 'wptouch_foundation_search_post_type_text', $search_post_type );
1174
  }
1175
  }
1176
 
1177
  function _foundation_explode_and_trim_taxonomy( $tax, $tax_type ) {
1178
- $cats = explode( ',', $tax );
1179
  $new_cats = array();
1180
 
1181
- foreach( $cats as $cat ) {
1182
  $trimmed_cat = trim( $cat );
1183
  if ( is_numeric( $trimmed_cat ) ) {
1184
  $new_cats[] = $trimmed_cat;
@@ -1200,7 +1322,7 @@ function foundation_exclude_categories_tags( $query ) {
1200
  if ( $settings->excluded_categories ) {
1201
  $new_cats = _foundation_explode_and_trim_taxonomy( $settings->excluded_categories, 'category' );
1202
 
1203
- if ( !$query->is_single() ) {
1204
  $query->set( 'category__not_in', $new_cats );
1205
  }
1206
  }
@@ -1208,17 +1330,18 @@ function foundation_exclude_categories_tags( $query ) {
1208
  if ( $settings->excluded_tags ) {
1209
  $new_tags = _foundation_explode_and_trim_taxonomy( $settings->excluded_tags, 'post_tag' );
1210
 
1211
- if ( !$query->is_single() ) {
1212
  $query->set( 'tag__not_in', $new_tags );
1213
  }
1214
  }
1215
  }
 
1216
  return $query;
1217
  }
1218
 
1219
  function foundation_insert_multipage_links( $content ) {
1220
  $multipage_links = wp_link_pages( 'before=<div class="wp-page-nav">' . __( 'Pages', 'wptouch-pro' ) . ':&after=</div>&echo=0' );
1221
- if( !is_feed() && !is_home() ) {
1222
  return $content . $multipage_links;
1223
  } else {
1224
  return $content;
@@ -1226,8 +1349,9 @@ function foundation_insert_multipage_links( $content ) {
1226
  }
1227
 
1228
  function foundation_number_of_posts_to_show() {
1229
- $settings = wptouch_get_settings( 'foundation' );
1230
  $num_posts = $settings->posts_per_page;
 
1231
  return $num_posts;
1232
  }
1233
 
@@ -1237,6 +1361,11 @@ function foundation_get_base_module_dir() {
1237
  }
1238
 
1239
  function foundation_inline_styles() {
 
 
 
 
 
1240
  $style_data = apply_filters( 'foundation_inline_style', '' );
1241
  if ( strlen( $style_data ) ) {
1242
  echo "\n<!-- Foundation Styles -->\n";
@@ -1247,9 +1376,9 @@ function foundation_inline_styles() {
1247
  function foundation_custom_die_handler( $function ) {
1248
  $error_template = FOUNDATION_DIR . '/default/formerror.php';
1249
 
1250
- if ( !is_admin() && file_exists( $error_template ) ) {
1251
- require_once( $error_template );
1252
- die();
1253
  }
1254
 
1255
  return $function;
@@ -1257,6 +1386,11 @@ function foundation_custom_die_handler( $function ) {
1257
 
1258
  function foundation_add_meta_theme_color() {
1259
 
 
 
 
 
 
1260
  $header_color = apply_filters( 'wptouch_theme_color', '' );
1261
 
1262
  if ( strlen( $header_color ) ) {
7
  define( 'FOUNDATION_SETTING_DOMAIN', 'foundation' );
8
 
9
  define( 'FOUNDATION_PAGE_GENERAL', __( 'Theme Settings', 'wptouch-pro' ) );
10
+ define( 'FOUNDATION_PAGE_BRANDING', __( 'Branding', 'wptouch-pro' ) );
11
  define( 'FOUNDATION_PAGE_MEDIA', __( 'Media Handling', 'wptouch-pro' ) );
12
  define( 'FOUNDATION_PAGE_HOMESCREEN_ICONS', __( 'Bookmark Icons', 'wptouch-pro' ) );
13
  define( 'FOUNDATION_PAGE_CUSTOM', __( 'Custom Content', 'wptouch-pro' ) );
18
  add_filter( 'wptouch_admin_page_render_wptouch-admin-theme-settings', 'foundation_render_theme_settings' );
19
  add_filter( 'wptouch_setting_version_compare', 'foundation_setting_version_compare', 10, 2 );
20
  add_filter( 'wptouch_body_classes', 'foundation_body_classes' );
21
+ add_filter( 'wptouch_the_content', 'foundation_insert_multipage_links' );
22
 
23
  // fix for JetPack
24
  add_filter( 'jetpack_check_mobile', 'foundation_override_jetpack_check_mobile' );
50
  echo '<div id="wpml-language-chooser-wrap"><div id="wpml-language-chooser">';
51
  echo '<strong>' . __( 'Language: ', 'wptouch-pro' ) . '</strong>';
52
  echo '<select>';
53
+ foreach ( $data as $lang => $item ) {
54
  echo '<option value="' . $item['url'] . '"';
55
+ if ( $item["active"] ) {
56
+ echo " selected";
57
+ }
58
  echo '>' . $item['native_name'] . '</option>';
59
  }
60
  echo '</select>';
86
 
87
  $size = getimagesize( $file_name );
88
  if ( $size ) {
89
+ $width = $size[0];
90
  $height = $size[1];
91
 
92
  if ( $size['mime'] == 'image/png' ) {
93
  if ( $width > FOUNDATION_MAX_LOGO_SIZE ) {
94
+ $new_width = FOUNDATION_MAX_LOGO_SIZE;
95
+ $new_height = $height * $new_width / $width;
96
 
97
  $src_image = imagecreatefrompng( $file_name );
98
 
101
  // Preserve Transparency
102
  imagecolortransparent( $saved_image, imagecolorallocate( $saved_image, 0, 0, 0 ) );
103
 
104
+ imagecopyresampled( $saved_image, $src_image, 0, 0, 0, 0, $new_width, $new_height, $width, $height );
105
 
106
  // Get rid of the old file
107
  unlink( $file_name );
116
  }
117
 
118
  function foundation_prepare_uploaded_file_url( $uploaded_file ) {
119
+ if ( ! strstr( $uploaded_file, 'http' ) && ! strstr( $uploaded_file, 'wp-content' ) ) {
120
  $uploaded_file = WPTOUCH_BASE_CONTENT_URL . $uploaded_file;
121
  } else {
122
  $uploaded_file = wptouch_check_url_ssl( $uploaded_file );
129
 
130
  // Depreciated and removed in 4.0
131
  $settings->allow_nested_comment_replies = false;
132
+ $settings->twitter_account = false;
133
 
134
  // Landing Pages
135
  $settings->latest_posts_page = 'none';
138
  $settings->new_video_handling = true;
139
 
140
  // Theme Settings
141
+ $settings->allow_zoom = false;
142
+ $settings->smart_app_banner = '';
143
+ $settings->custom_footer_message = '';
144
  $settings->custom_css_declarations = '';
145
 
146
  // Misc
147
  $settings->logo_image = '';
148
 
149
  // Blog
150
+ $settings->posts_per_page = '5';
151
  $settings->excluded_categories = '';
152
+ $settings->excluded_tags = '';
153
 
154
  // Branding
155
  $settings->typography_sets = 'default';
156
 
157
  // Homescreen Icons
158
+ $settings->iphone_icon_retina = false;
159
  $settings->android_others_icon = false;
160
+ $settings->ipad_icon_retina = false;
161
 
162
  // Web App Mode
163
  $settings->webapp_enable_persistence = false;
164
+ $settings->webapp_show_notice = true;
165
+ $settings->webapp_ignore_urls = '';
166
  $settings->webapp_notice_expiry_days = 30;
167
 
168
  // Statrup Screens
169
+ $settings->startup_screen_iphone_2g_3g = false;
170
+ $settings->startup_screen_iphone_4_4s = false;
171
+ $settings->startup_screen_iphone_5 = false;
172
+ $settings->startup_screen_iphone_6 = false;
173
+ $settings->startup_screen_iphone_6plus = false;
174
+ $settings->startup_screen_ipad_1_portrait = false;
175
+ $settings->startup_screen_ipad_1_landscape = false;
176
+ $settings->startup_screen_ipad_3_portrait = false;
177
+ $settings->startup_screen_ipad_3_landscape = false;
178
+ $settings->startup_screen_full_res = false;
179
+ $settings->startup_screen_ipad_full_portrait = false;
180
  $settings->startup_screen_ipad_full_landscape = false;
181
 
182
  // Advertising
183
+ $settings->advertising_type = 'none';
184
+ $settings->advertising_location = 'header';
185
  $settings->advertising_blog_listings = true;
186
+ $settings->advertising_single = true;
187
+ $settings->advertising_pages = false;
188
+ $settings->advertising_taxonomy = true;
189
+ $settings->advertising_search = true;
190
+ $settings->google_adsense_id = '';
191
+ $settings->google_slot_id = '';
192
+ $settings->google_code_type = 'sync';
193
  $settings->custom_advertising_mobile = '';
194
 
195
  // Sharing
196
+ $settings->show_share = true;
197
+ $settings->share_on_pages = false;
198
+ $settings->share_location = 'top';
199
  $settings->share_colour_scheme = 'default';
200
 
201
  // Social Links
202
+ $settings->social_facebook_url = '';
203
+ $settings->social_twitter_url = '';
204
+ $settings->social_google_url = '';
205
  $settings->social_instagram_url = '';
206
+ $settings->social_tumblr_url = '';
207
  $settings->social_pinterest_url = '';
208
+ $settings->social_vimeo_url = '';
209
+ $settings->social_youtube_url = '';
210
+ $settings->social_linkedin_url = '';
211
+ $settings->social_yelp_url = '';
212
+ $settings->social_email_url = '';
213
+ $settings->social_rss_url = '';
214
 
215
  // Featured Slider
216
+ $settings->featured_enabled = true;
217
+ $settings->featured_blog = true;
218
+ $settings->featured_homepage = true;
219
+ $settings->featured_style = 'enhanced';
220
+ $settings->featured_autoslide = false;
221
+ $settings->featured_continuous = false;
222
+ $settings->featured_grayscale = false;
223
+ $settings->featured_comments = false;
224
+ $settings->featured_type = 'latest';
225
+ $settings->featured_tag = '';
226
+ $settings->featured_category = '';
227
+ $settings->featured_post_type = '';
228
+ $settings->featured_post_ids = '';
229
+ $settings->featured_speed = 'normal';
230
  $settings->featured_max_number_of_posts = '5';
231
+ $settings->featured_filter_posts = true;
232
 
233
  return $settings;
234
  }
250
  if ( is_array( $colors ) && count( $colors ) ) {
251
  $inline_color_data = '';
252
 
253
+ foreach ( $colors as $color ) {
254
  $settings = wptouch_get_settings( $color->domain );
255
 
256
  $setting_name = $color->setting;
275
  function foundation_handle_footer() {
276
  $settings = foundation_get_settings();
277
 
278
+ if ( $settings->custom_footer_message ) {
279
+
280
+ /**
281
+ * Filters the custom footer message obtained from the custom footer section.
282
+ *
283
+ * @param string $settings->custom_footer_message The footer message.
284
+ */
285
  $message = apply_filters( 'foundation_footer_message', $settings->custom_footer_message );
286
 
287
  if ( strip_tags( $message ) == $message ) {
290
  $output_message = $message;
291
  }
292
 
293
+ $allowed_tags = wp_kses_allowed_html( 'post' );
294
+ $allowed_tags['form']['autocomplete'] = true;
295
+ $allowed_tags['form']['novalidate'] = true;
296
+ $allowed_tags['form']['autocapitalize'] = true;
297
+ $allowed_tags['input'] = array(
298
+ 'class' => true,
299
+ 'id' => true,
300
+ 'name' => true,
301
+ 'value' => true,
302
+ 'type' => true,
303
+ 'placeholder' => true,
304
+ 'required' => true,
305
+ 'accept' => true,
306
+ 'align' => true,
307
+ 'alt' => true,
308
+ 'autocomplete ' => true,
309
+ 'autofocus' => true,
310
+ 'checked' => true,
311
+ 'disabled' => true,
312
+ 'form' => true,
313
+ 'formaction' => true,
314
+ 'formenctype' => true,
315
+ 'formmethod ' => true,
316
+ 'formnovalidate ' => true,
317
+ 'formtarget' => true,
318
+ 'formtarget' => true,
319
+ 'height' => true,
320
+ 'list' => true,
321
+ 'max' => true,
322
+ 'maxlength' => true,
323
+ 'min' => true,
324
+ 'multiple' => true,
325
+ 'pattern' => true,
326
+ 'readonly' => true,
327
+ 'size' => true,
328
+ 'step' => true,
329
+ 'width' => true,
330
+ );
331
+
332
+ /**
333
+ * Filters the custom footer message obtained from the custom footer section.
334
+ *
335
+ * @param string $output_message The footer message for output.
336
+ * @param array $allowed_tags The allowed tags for the sanitization function.
337
+ */
338
+ echo wp_kses( apply_filters( 'foundation_footer_message_output', $output_message ), $allowed_tags );
339
  }
340
  }
341
 
342
  function foundation_handle_custom_css_declarations() {
343
  $settings = foundation_get_settings();
344
+ if ( $settings->custom_css_declarations ) {
345
+ /**
346
+ * Filters the custom css declarations from the customizer settings.
347
+ *
348
+ * @param string $settings->custom_css_declarations The css declarations.
349
+ */
350
+ $styles = apply_filters( 'foundation_custom_css_declarations', $settings->custom_css_declarations );
351
  $trimmed_styles = trim( $styles );
352
 
353
  if ( strip_tags( $trimmed_styles ) == $trimmed_styles ) {
356
  $output_code = $trimmed_styles;
357
  }
358
 
359
+ /**
360
+ * Filters the custom css declarations from the customizer settings before ouput.
361
+ *
362
+ * @param string $output_code The css declarations code before output.
363
+ */
364
  echo apply_filters( 'foundation_footer_css_declarations_output', $output_code );
365
  }
366
  }
388
 
389
  $tags = get_tags(
390
  array(
391
+ 'number' => 50,
392
+ 'orderby' => 'count',
393
  )
394
  );
395
 
396
+ foreach ( $tags as $tag ) {
397
  $all_tags[ $tag->slug ] = $tag->name;
398
  }
399
 
405
 
406
  $categories = get_categories(
407
  array(
408
+ 'number' => 50,
409
+ 'orderby' => 'count',
410
  )
411
  );
412
 
413
+ foreach ( $categories as $cat ) {
414
  $all_cats[ $cat->slug ] = $cat->name;
415
  }
416
 
417
  return $all_cats;
418
  }
419
 
420
+ function foundation_setup_viewport() {
421
+ $settings = foundation_get_settings();
422
  $zoomState = 'no';
423
  if ( $settings->allow_zoom == true ) {
424
  $zoomState = 'yes';
425
  }
426
+ echo '<meta name="viewport" content="initial-scale=1.0, maximum-scale=3.0, user-scalable=' . $zoomState . ', width=device-width" />';
427
  }
428
 
429
  function foundation_render_theme_settings( $page_options ) {
430
  wptouch_add_sub_page( FOUNDATION_PAGE_GENERAL, 'foundation-page-theme-settings', $page_options );
431
 
432
+ if ( ! wptouch_admin_use_customizer() ) {
433
  if ( foundation_has_theme_colors() ) {
434
  $color_settings = array();
435
 
436
  $colors = foundation_get_theme_colors();
437
 
438
+ foreach ( $colors as $name => $color ) {
439
  $color_settings[] = wptouch_add_setting(
440
  'color',
441
  $color->setting,
471
  WPTOUCH_SETTING_BASIC,
472
  '1.0',
473
  array(
474
+ 'min' => 1,
475
+ 'max' => 15,
476
  'step' => 1,
477
  )
478
  ),
491
  __( 'Comma separated by tag name', 'wptouch-pro' ),
492
  WPTOUCH_SETTING_BASIC,
493
  '1.0'
494
+ ),
495
  );
496
 
497
+ /**
498
+ * Filters the customizer settings for the blog section.
499
+ *
500
+ * @param array $foundation_blog_settings The blog settings.
501
+ */
502
  $foundation_blog_settings = apply_filters( 'foundation_settings_blog', $foundation_blog_settings );
503
+
504
+ /**
505
+ * Filters the customizer settings for the page section.
506
+ *
507
+ * @param array Empty array.
508
+ */
509
  $foundation_page_settings = apply_filters( 'foundation_settings_page', array() );
510
 
511
  wptouch_add_page_section(
528
  true
529
  );
530
 
531
+ if ( ! function_exists( 'has_site_icon' ) ) {
532
  wptouch_add_page_section(
533
  FOUNDATION_PAGE_GENERAL,
534
  __( 'Site Icon', 'wptouch-pro' ),
560
  WPTOUCH_SETTING_BASIC,
561
  false,
562
  '1.0'
563
+ ),
564
  );
565
 
566
+ /**
567
+ * Filters the customizer settings for the header section.
568
+ *
569
+ * @param array $foundation_header_settings The header settings.
570
+ */
571
  $foundation_header_settings = apply_filters( 'foundation_settings_header', $foundation_header_settings );
572
 
573
  wptouch_add_page_section(
582
  10
583
  );
584
 
585
+ $foundation_footer_settings = array(
586
+ wptouch_add_setting(
587
+ 'textarea',
588
+ 'custom_footer_message',
589
+ __( 'Custom footer content', 'wptouch-pro' ),
590
+ __( 'HTML is allowed', 'wptouch-pro' ),
591
+ WPTOUCH_SETTING_BASIC,
592
+ '1.0'
593
+ ),
594
+ );
595
+
596
+ /**
597
+ * Filters the customizer settings for the footer section.
598
+ *
599
+ * @since 4.3.17
600
+ *
601
+ * @param array $foundation_footer_settings The footer settings.
602
+ */
603
+ $foundation_footer_settings = apply_filters( 'foundation_settings_footer', $foundation_footer_settings );
604
+
605
  wptouch_add_page_section(
606
  FOUNDATION_PAGE_BRANDING,
607
  __( 'Footer', 'wptouch-pro' ),
608
  'foundation-custom-content',
609
+ $foundation_footer_settings,
 
 
 
 
 
 
 
 
 
610
  $page_options,
611
  FOUNDATION_SETTING_DOMAIN,
612
  true,
626
  false,
627
  WPTOUCH_SETTING_BASIC,
628
  '4.0'
629
+ ),
630
  ),
631
  $page_options,
632
  FOUNDATION_SETTING_DOMAIN,
653
  $use_wordpress_icon = false;
654
  }
655
 
656
+ if ( $image && ! $use_wordpress_icon ) {
657
  if ( $width != 57 ) {
658
  $size_string = ' sizes="' . $width . 'x' . $height . '"';
659
  } else {
685
  foundation_maybe_output_homescreen_icon( $settings->iphone_icon_retina, 57, 57, 1 );
686
 
687
  // Default (if no icon added in admin, or icon isn't formatted correctly, and as a catch-all)
688
+ if ( ! $has_icon ) {
689
  echo '<link rel="apple-touch-icon-precomposed" href="' . WPTOUCH_DEFAULT_HOMESCREEN_ICON . '" />' . "\n";
690
  }
691
  }
692
  }
693
 
694
+ function foundation_setup_smart_app_banner() {
695
  $settings = foundation_get_settings();
696
+ $appID = $settings->smart_app_banner;
697
  if ( $appID ) {
698
  echo '<meta name="apple-itunes-app" content="app-id=' . $appID . '" />' . "\n";
699
  }
744
 
745
  $theme_data = foundation_get_theme_data();
746
 
747
+ /**
748
+ * Filters the theme support setting.
749
+ *
750
+ * @param array $theme_data->theme_support The theme support data.
751
+ */
752
+ $theme_data->theme_support = apply_filters( 'wptouch_theme_support', $theme_data->theme_support );
753
 
754
  if ( count( $theme_data->theme_support ) ) {
755
+ foreach ( $theme_data->theme_support as $module ) {
756
 
757
+ /**
758
+ * Dynamically filters the allowed module support based on the $module name.
759
+ *
760
+ * @param bool Whether the module is allowed.
761
+ */
762
  $allow_module_load = apply_filters( 'wptouch_allow_module_' . $module, true );
763
+ if ( ! $allow_module_load ) {
764
  continue;
765
  }
766
 
767
  $bootstrap_file = dirname( __FILE__ ) . '/modules/' . $module . '/' . $module . '.php';
768
+ $defined_name = 'WPTOUCH_MODULE_' . str_replace( '-', '_', strtoupper( $module ) ) . '_INSTALLED';
769
 
770
  if ( file_exists( $bootstrap_file ) ) {
771
  // Load the main bootstrap file
774
  define( $defined_name, '1' );
775
  }
776
 
777
+ if ( ! defined( 'WPTOUCH_IS_FREE' ) ) {
778
  // Pro version
779
  $alternate_location = WPTOUCH_DIR . '/pro/modules/' . $module . '/' . $module . '.php';
780
 
781
  if ( file_exists( $alternate_location ) ) {
782
  require_once( $alternate_location );
783
 
784
+ if ( ! defined( $defined_name ) ) {
785
  define( $defined_name, '1' );
786
  }
787
  }
788
+ }
789
  }
790
 
791
  // Force settings to be reloaded
812
  $theme_data = foundation_get_theme_data();
813
 
814
  if ( is_array( $theme_support ) ) {
815
+ foreach ( $theme_support as $module ) {
816
+ if ( ! in_array( $module, $theme_data->theme_support ) ) {
817
+ $theme_data->theme_support[] = $module;
818
  }
819
  }
820
  } else {
821
+ if ( ! in_array( $theme_support, $theme_data->theme_support ) ) {
822
+ $theme_data->theme_support[] = $theme_support;
823
  }
824
  }
825
  }
855
  }
856
 
857
  // iOS Device
858
+ if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'iPhone' ) || strpos( $_SERVER['HTTP_USER_AGENT'], 'iPod' ) || strpos( $_SERVER['HTTP_USER_AGENT'], 'iPad' ) ) {
859
+ $classes[] = 'ios';
860
  }
861
 
862
  // Android Device
863
+ if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Android' ) ) {
864
+ $classes[] = 'android';
865
  }
866
 
867
  if ( wptouch_should_load_rtl() ) {
890
  function foundation_register_theme_color( $setting_name, $desc, $fg_selectors, $bg_selectors, $domain = FOUNDATION_SETTING_DOMAIN, $live_preview = false, $luma_threshold = false, $luma_class = false ) {
891
  $theme_color = new stdClass;
892
 
893
+ $theme_color->setting = $setting_name;
894
+ $theme_color->desc = $desc;
895
+ $theme_color->fg_selectors = $fg_selectors;
896
+ $theme_color->bg_selectors = $bg_selectors;
897
+ $theme_color->domain = $domain;
898
  $theme_color->luma_threshold = $luma_threshold;
899
+ $theme_color->luma_class = $luma_class;
900
+ $theme_color->live_preview = $live_preview;
901
 
902
  global $foundation_registered_colors;
903
  $foundation_registered_colors[ $setting_name ] = $theme_color;
928
 
929
  /* Previous + Next Post Functions For Single Post Pages */
930
  function wptouch_fdn_get_previous_post_link() {
931
+ $excluded = wptouch_fdn_convert_catname_to_id();
932
  $prev_post = get_adjacent_post( false, $excluded, true );
933
  echo esc_url( get_permalink( $prev_post->ID ) );
934
  }
935
 
936
  function wptouch_fdn_get_next_post_link() {
937
+ $excluded = wptouch_fdn_convert_catname_to_id();
938
  $next_post = get_adjacent_post( false, $excluded, false );
939
  echo esc_url( get_permalink( $next_post->ID ) );
940
  }
941
 
942
  function wptouch_fdn_get_previous_post_link_w_title() {
943
+ $excluded = wptouch_fdn_convert_catname_to_id();
944
  $prev_post = get_adjacent_post( false, $excluded, true );
945
  echo '<a class="prev-post" href="' . esc_url( get_permalink( $prev_post->ID ) ) . '">' . $prev_post->post_title . '</a>';
946
  }
947
 
948
  function wptouch_fdn_get_next_post_link_w_title() {
949
+ $excluded = wptouch_fdn_convert_catname_to_id();
950
  $next_post = get_adjacent_post( false, $excluded, false );
951
  echo '<a class="next-post" href="' . esc_url( get_permalink( $next_post->ID ) ) . '">' . $next_post->post_title . '</a>';
952
  }
953
 
954
+ function wptouch_fdn_if_next_post_link() {
955
+ $excluded = wptouch_fdn_convert_catname_to_id();
956
  $next_post = get_adjacent_post( false, $excluded, false );
957
 
958
  if ( $next_post ) {
962
  }
963
  }
964
 
965
+ function wptouch_fdn_if_previous_post_link() {
966
+ $excluded = wptouch_fdn_convert_catname_to_id();
967
  $prev_post = get_adjacent_post( false, $excluded, true );
968
 
969
  if ( $prev_post ) {
978
  global $wp_query;
979
  $total_results = $wp_query->found_posts;
980
 
981
+ if ( ! ( is_home() || is_single() ) ) {
982
  echo '<div class="archive-text">';
983
  }
984
  if ( is_search() ) {
985
  echo $total_results . '&nbsp;';
986
+ echo sprintf( __( "search results for '%s'", "wptouch-pro" ), get_search_query() );
987
+ }
988
+ if ( is_category() ) {
989
+ echo sprintf( __( "%sCategories &rsaquo;%s %s", "wptouch-pro" ), '<span class="type">', '</span>', single_cat_title( "", false ) );
990
  } elseif ( is_tag() ) {
991
+ echo sprintf( __( "Tags &rsaquo; %s", "wptouch-pro" ), single_tag_title( " ", false ) );
992
  } elseif ( is_day() ) {
993
+ echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'F jS, Y' ) );
994
  } elseif ( is_month() ) {
995
+ echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'F, Y' ) );
996
  } elseif ( is_year() ) {
997
+ echo sprintf( __( "Archives &rsaquo; %s", "wptouch-pro" ), get_the_time( 'Y' ) );
998
  } elseif ( get_post_type() ) {
999
  }
1000
+ if ( ! ( is_home() || is_single() ) ) {
1001
  echo '</div>';
1002
  }
1003
  }
1034
  if ( $settings->excluded_categories ) {
1035
  $new_cats = _foundation_explode_and_trim_taxonomy( $settings->excluded_categories, 'category' );
1036
 
1037
+ if ( is_array( $new_cats ) && count( $new_cats ) ) {
1038
  $excluded_cats = implode( ',', $new_cats );
1039
  }
1040
  }
1041
 
1042
 
1043
  echo $opening_tag;
1044
+ $sql = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = '{$taxonomy}' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_cats) AND count >= 1 ORDER BY count DESC LIMIT 0, $num" );
1045
 
1046
  if ( $sql ) {
1047
+
1048
+ /**
1049
+ * Filters the SQL to allow categories list.
1050
+ *
1051
+ * @param array $sql The $sql results.
1052
+ */
1053
  $sql = apply_filters( 'wptouch_ordered_cat_list_categories', $sql );
1054
 
1055
  foreach ( $sql as $result ) {
1075
  }
1076
 
1077
  function wptouch_fdn_hierarchical_cat_list( $num, $include_count = true, $taxonomy = 'category', $opening_tag = '<ul>', $closing_tag = '</ul>' ) {
1078
+ $walker = new WPtouchProMainNavMenuWalker;
1079
  $defaults = array(
1080
+ 'number' => $num,
1081
+ 'show_option_all' => false,
1082
+ 'show_option_none' => false,
1083
+ 'orderby' => 'name',
1084
+ 'order' => 'ASC',
1085
+ 'style' => 'list',
1086
+ 'show_count' => $include_count,
1087
+ 'hide_empty' => 1,
1088
  'use_desc_for_title' => 1,
1089
+ 'child_of' => 0,
1090
+ 'feed' => '',
1091
+ 'feed_type' => '',
1092
+ 'feed_image' => '',
1093
+ 'exclude' => '',
1094
+ 'exclude_tree' => '',
1095
+ 'current_category' => 0,
1096
+ 'hierarchical' => true,
1097
+ 'title_li' => false,
1098
+ 'echo' => 1,
1099
+ 'depth' => 0,
1100
+ 'taxonomy' => $taxonomy,
1101
+ 'walker' => new WPtouchProCategoryWalker,
1102
  );
1103
 
1104
  if ( isset( $args ) ) {
1107
  $r = $defaults;
1108
  }
1109
 
1110
+ if ( ! isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) {
1111
  $r['pad_counts'] = true;
1112
+ }
1113
 
1114
  if ( true == $r['hierarchical'] ) {
1115
  $r['exclude_tree'] = $r['exclude'];
1116
+ $r['exclude'] = '';
1117
  }
1118
 
1119
+ if ( ! isset( $r['class'] ) ) {
1120
  $r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy'];
1121
+ }
1122
 
1123
  if ( ! taxonomy_exists( $r['taxonomy'] ) ) {
1124
  return false;
1125
  }
1126
 
1127
+ $show_option_all = $r['show_option_all'];
1128
  $show_option_none = $r['show_option_none'];
1129
 
1130
  $categories = get_categories( $r );
1146
  $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' );
1147
  $posts_page = esc_url( $posts_page );
1148
  if ( 'list' == $r['style'] ) {
1149
+ $output .= '<li class="cat-item-all"><a href="$posts_pageEXTERNAL_FRAGMENT">$show_option_all</a></li>';
1150
  } else {
1151
  $output .= "<a href='$posts_page'>$show_option_all</a>";
1152
  }
1162
  if ( $r['hierarchical'] ) {
1163
  $depth = $r['depth'];
1164
  } else {
1165
+ $depth = - 1; // Flat.
1166
  }
1167
  $output .= walk_category_tree( $categories, $depth, $r );
1168
 
1196
  if ( $settings->excluded_tags ) {
1197
  $new_tags = _foundation_explode_and_trim_taxonomy( $settings->excluded_tags, 'post_tag' );
1198
 
1199
+ if ( is_array( $new_tags ) && count( $new_tags ) ) {
1200
  $excluded_tags = implode( ',', $new_tags );
1201
  }
1202
  }
1203
 
1204
  echo '<ul>';
1205
 
1206
+ $sql = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}term_taxonomy INNER JOIN {$wpdb->prefix}terms ON {$wpdb->prefix}term_taxonomy.term_id = {$wpdb->prefix}terms.term_id WHERE taxonomy = 'post_tag' AND {$wpdb->prefix}term_taxonomy.term_id NOT IN ($excluded_tags) AND count >= 1 ORDER BY count DESC LIMIT 0, $num" );
1207
 
1208
  if ( $sql ) {
1209
  foreach ( $sql as $result ) {
1216
  }
1217
 
1218
  function wptouch_fdn_display_comment( $comment, $args, $depth ) {
1219
+ $GLOBALS['comment'] = $comment;
1220
+ $GLOBALS['comment_args'] = $args;
1221
+ $GLOBALS['comment_depth'] = $depth;
1222
  extract( $args, EXTR_SKIP );
1223
 
1224
  locate_template( 'one-comment.php', true, false );
1225
  }
1226
 
1227
  function wptouch_fdn_get_search_post_types() {
1228
+
1229
+ /**
1230
+ * Filters the theme's search post types.
1231
+ *
1232
+ * @param array The searchable post types.
1233
+ */
1234
  return apply_filters( 'foundation_search_post_types', array( 'post', 'page' ) );
1235
  }
1236
 
1237
+ function wptouch_fdn_convert_catname_to_id() {
1238
  $settings = foundation_get_settings();
1239
+ $cats = $settings->excluded_categories;
1240
 
1241
  if ( $cats ) {
1242
+ $cat_ids = explode( ',', $cats );
1243
  $new_cats_by_id = array();
1244
 
1245
+ foreach ( $cat_ids as $cat ) {
1246
+ $trimmed_cat = trim( $cat );
1247
  $new_cats_by_id[] = get_cat_ID( $trimmed_cat );
1248
  }
1249
 
1250
  $new_cats_by_id_list = implode( ',', $new_cats_by_id );
1251
+
1252
  return $new_cats_by_id_list;
1253
  } else {
1254
  return false;
1255
  }
1256
  }
1257
 
1258
+ function wptouch_fdn_convert_tagname_to_id() {
1259
  $settings = foundation_get_settings();
1260
+ $tags = $settings->excluded_tags;
1261
 
1262
  if ( $tags ) {
1263
+ $tag_ids = explode( ',', $tags );
1264
  $new_tags_by_id = array();
1265
 
1266
+ foreach ( $tag_ids as $tag ) {
1267
+ $trimmed_tag = trim( $tag );
1268
+ $tagname = get_term_by( 'name', $trimmed_tag, 'post_tag' );
1269
+ $tagid = $tagname->term_id;
1270
  $new_tags_by_id[] = $tagid;
1271
  }
1272
 
1273
  $new_tags_by_id_list = implode( ',', $new_tags_by_id );
1274
+
1275
  return $new_tags_by_id_list;
1276
  } else {
1277
  return false;
1281
  function wptouch_fdn_get_search_post_type() {
1282
  global $search_post_type;
1283
 
1284
+ switch ( $search_post_type ) {
1285
  case 'post':
1286
  return __( 'Post', 'wptouch-pro' );
1287
  case 'page':
1288
  return __( 'Page', 'wptouch-pro' );
1289
  default:
1290
+ /**
1291
+ * Filters the theme search post type name.
1292
+ *
1293
+ * @param string $search_post_type The search post type.
1294
+ */
1295
  return apply_filters( 'wptouch_foundation_search_post_type_text', $search_post_type );
1296
  }
1297
  }
1298
 
1299
  function _foundation_explode_and_trim_taxonomy( $tax, $tax_type ) {
1300
+ $cats = explode( ',', $tax );
1301
  $new_cats = array();
1302
 
1303
+ foreach ( $cats as $cat ) {
1304
  $trimmed_cat = trim( $cat );
1305
  if ( is_numeric( $trimmed_cat ) ) {
1306
  $new_cats[] = $trimmed_cat;
1322
  if ( $settings->excluded_categories ) {
1323
  $new_cats = _foundation_explode_and_trim_taxonomy( $settings->excluded_categories, 'category' );
1324
 
1325
+ if ( ! $query->is_single() ) {
1326
  $query->set( 'category__not_in', $new_cats );
1327
  }
1328
  }
1330
  if ( $settings->excluded_tags ) {
1331
  $new_tags = _foundation_explode_and_trim_taxonomy( $settings->excluded_tags, 'post_tag' );
1332
 
1333
+ if ( ! $query->is_single() ) {
1334
  $query->set( 'tag__not_in', $new_tags );
1335
  }
1336
  }
1337
  }
1338
+
1339
  return $query;
1340
  }
1341
 
1342
  function foundation_insert_multipage_links( $content ) {
1343
  $multipage_links = wp_link_pages( 'before=<div class="wp-page-nav">' . __( 'Pages', 'wptouch-pro' ) . ':&after=</div>&echo=0' );
1344
+ if ( ! is_feed() && ! is_home() ) {
1345
  return $content . $multipage_links;
1346
  } else {
1347
  return $content;
1349
  }
1350
 
1351
  function foundation_number_of_posts_to_show() {
1352
+ $settings = wptouch_get_settings( 'foundation' );
1353
  $num_posts = $settings->posts_per_page;
1354
+
1355
  return $num_posts;
1356
  }
1357
 
1361
  }
1362
 
1363
  function foundation_inline_styles() {
1364
+ /**
1365
+ * Filters the theme's inline style.
1366
+ *
1367
+ * @param string Empty string.
1368
+ */
1369
  $style_data = apply_filters( 'foundation_inline_style', '' );
1370
  if ( strlen( $style_data ) ) {
1371
  echo "\n<!-- Foundation Styles -->\n";
1376
  function foundation_custom_die_handler( $function ) {
1377
  $error_template = FOUNDATION_DIR . '/default/formerror.php';
1378
 
1379
+ if ( ! is_admin() && file_exists( $error_template ) ) {
1380
+ require_once( $error_template );
1381
+ die();
1382
  }
1383
 
1384
  return $function;
1386
 
1387
  function foundation_add_meta_theme_color() {
1388
 
1389
+ /**
1390
+ * Filters the theme color.
1391
+ *
1392
+ * @param string Empty string.
1393
+ */
1394
  $header_color = apply_filters( 'wptouch_theme_color', '' );
1395
 
1396
  if ( strlen( $header_color ) ) {
wptouch.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
- Version: 4.3.19
6
  Description: Make a beautiful mobile-friendly version of your website with just a few clicks.
7
  Author: WPtouch
8
  Author URI: http://www.wptouch.com/
@@ -14,7 +14,7 @@
14
 
15
  function wptouch_create_four_object() {
16
  if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
17
- define( 'WPTOUCH_VERSION', '4.3.19' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
+ Version: 4.3.20
6
  Description: Make a beautiful mobile-friendly version of your website with just a few clicks.
7
  Author: WPtouch
8
  Author URI: http://www.wptouch.com/
14
 
15
  function wptouch_create_four_object() {
16
  if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
17
+ define( 'WPTOUCH_VERSION', '4.3.20' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );