@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function register_hook_listener() { |
59 | 59 | |
60 | - add_action( 'admin_menu', array( $this, 'register_settings_screen' ), 60 ); |
|
60 | + add_action( 'admin_menu', array( $this, 'register_settings_screen' ), 60 ); |
|
61 | 61 | add_action( 'admin_init', array( $this, 'settings_fields' ) ); |
62 | - add_action( 'init', array( $this, 'general_init' ), 5 ); |
|
62 | + add_action( 'init', array( $this, 'general_init' ), 5 ); |
|
63 | 63 | |
64 | 64 | } // End setup_settings() |
65 | 65 | |
@@ -293,14 +293,14 @@ discard block |
||
293 | 293 | * @return void |
294 | 294 | */ |
295 | 295 | public function settings_screen () |
296 | - { |
|
296 | + { |
|
297 | 297 | |
298 | - ?> |
|
298 | + ?> |
|
299 | 299 | <div id="woothemes-sensei" class="wrap <?php echo esc_attr($this->token); ?>"> |
300 | 300 | <?php screen_icon('woothemes-sensei'); ?> |
301 | 301 | <h2><?php echo esc_html($this->name); ?><?php if ('' != $this->settings_version) { |
302 | - echo ' <span class="version">' . $this->settings_version . '</span>'; |
|
303 | - } ?></h2> |
|
302 | + echo ' <span class="version">' . $this->settings_version . '</span>'; |
|
303 | + } ?></h2> |
|
304 | 304 | <p class="powered-by-woo"><?php _e('Powered by', 'woothemes-sensei'); ?><a href="http://www.woothemes.com/" |
305 | 305 | title="WooThemes"><img |
306 | 306 | src="<?php echo Sensei()->plugin_url; ?>assets/images/woothemes.png" alt="WooThemes"/></a></p> |
@@ -308,26 +308,26 @@ discard block |
||
308 | 308 | <form action="options.php" method="post"> |
309 | 309 | |
310 | 310 | <?php |
311 | - $this->settings_tabs(); |
|
312 | - settings_fields($this->token); |
|
313 | - $page = 'woothemes-sensei-settings'; |
|
314 | - foreach ($this->sections as $section_id => $section) { |
|
311 | + $this->settings_tabs(); |
|
312 | + settings_fields($this->token); |
|
313 | + $page = 'woothemes-sensei-settings'; |
|
314 | + foreach ($this->sections as $section_id => $section) { |
|
315 | 315 | |
316 | - echo '<section id="' . $section_id . '">'; |
|
316 | + echo '<section id="' . $section_id . '">'; |
|
317 | 317 | |
318 | - if ($section['name']) |
|
319 | - echo "<h2>{$section['name']}</h2>\n"; |
|
318 | + if ($section['name']) |
|
319 | + echo "<h2>{$section['name']}</h2>\n"; |
|
320 | 320 | |
321 | - echo '<table class="form-table">'; |
|
322 | - do_settings_fields($page, $section_id ); |
|
323 | - echo '</table>'; |
|
321 | + echo '<table class="form-table">'; |
|
322 | + do_settings_fields($page, $section_id ); |
|
323 | + echo '</table>'; |
|
324 | 324 | |
325 | - echo '</section>'; |
|
325 | + echo '</section>'; |
|
326 | 326 | |
327 | - } |
|
327 | + } |
|
328 | 328 | |
329 | - submit_button(); |
|
330 | - ?> |
|
329 | + submit_button(); |
|
330 | + ?> |
|
331 | 331 | </form> |
332 | 332 | <?php do_action( 'settings_after_form' ); ?> |
333 | 333 | </div><!--/#woothemes-sensei--> |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function get_settings () { |
344 | 344 | |
345 | - $this->settings = get_option( $this->token, array() ); |
|
345 | + $this->settings = get_option( $this->token, array() ); |
|
346 | 346 | |
347 | 347 | foreach ( $this->fields as $k => $v ) { |
348 | 348 | if ( ! isset( $this->settings[$k] ) && isset( $v['default'] ) ) { |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | * @return void |
376 | 376 | */ |
377 | 377 | public function settings_errors () { |
378 | - settings_errors( $this->token . '-errors' ); |
|
378 | + settings_errors( $this->token . '-errors' ); |
|
379 | 379 | } // End settings_errors() |
380 | 380 | |
381 | 381 | /** |
@@ -441,9 +441,9 @@ discard block |
||
441 | 441 | echo '<input id="' . $args['key'] . '" name="' . $this->token . '[' . esc_attr( $args['key'] ) . ']" type="checkbox" value="1"' . checked( esc_attr( $options[$args['key']] ), '1', false ) . ' />' . "\n"; |
442 | 442 | if ( $has_description ) { |
443 | 443 | echo wp_kses( $args['data']['description'], array( 'a' => array( |
444 | - 'href' => array(), |
|
445 | - 'title' => array() |
|
446 | - ) |
|
444 | + 'href' => array(), |
|
445 | + 'title' => array() |
|
446 | + ) |
|
447 | 447 | ) |
448 | 448 | ) . '</label>' . "\n"; |
449 | 449 | } |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | */ |
833 | 833 | public function enqueue_scripts () { |
834 | 834 | |
835 | - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
|
835 | + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
|
836 | 836 | |
837 | 837 | wp_enqueue_script( 'farbtastic' ); |
838 | 838 | wp_enqueue_script( 'woothemes-sensei-settings', esc_url( Sensei()->plugin_url . 'assets/js/settings' . $suffix . '.js' ), array( 'jquery', 'farbtastic' ), Sensei()->version ); |