@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @since 1.9.0 |
| 37 | 37 | */ |
| 38 | - private function setup_themes(){ |
|
| 38 | + private function setup_themes() { |
|
| 39 | 39 | |
| 40 | 40 | $this->themes = array( |
| 41 | 41 | 'twentyeleven', |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @since 1.9.0 |
| 56 | 56 | */ |
| 57 | - private function setup_currently_active_theme(){ |
|
| 57 | + private function setup_currently_active_theme() { |
|
| 58 | 58 | |
| 59 | 59 | $this->active_theme = get_option('template'); |
| 60 | 60 | |
@@ -67,33 +67,33 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @since 1.9.0 |
| 69 | 69 | */ |
| 70 | - private function possibly_load_supported_theme_wrappers(){ |
|
| 70 | + private function possibly_load_supported_theme_wrappers() { |
|
| 71 | 71 | |
| 72 | - if ( in_array( $this->active_theme, $this->themes ) ){ |
|
| 72 | + if (in_array($this->active_theme, $this->themes)) { |
|
| 73 | 73 | |
| 74 | 74 | // setup file and class names |
| 75 | - $supported_theme_class_file = trailingslashit( Sensei()->plugin_path ) . 'includes/theme-integrations/' . $this->active_theme . '.php'; |
|
| 76 | - $supported_theme_class_name = 'Sensei_'. ucfirst( $this->active_theme ); |
|
| 75 | + $supported_theme_class_file = trailingslashit(Sensei()->plugin_path).'includes/theme-integrations/'.$this->active_theme.'.php'; |
|
| 76 | + $supported_theme_class_name = 'Sensei_'.ucfirst($this->active_theme); |
|
| 77 | 77 | |
| 78 | 78 | // load the file or exit if there is no file for this theme |
| 79 | - if( ! file_exists( $supported_theme_class_file ) ){ |
|
| 79 | + if ( ! file_exists($supported_theme_class_file)) { |
|
| 80 | 80 | return; |
| 81 | 81 | } |
| 82 | - include_once( $supported_theme_class_file ); |
|
| 83 | - include_once( 'twentytwelve.php' ); |
|
| 82 | + include_once($supported_theme_class_file); |
|
| 83 | + include_once('twentytwelve.php'); |
|
| 84 | 84 | //initialize the class or exit if there is no class for this theme |
| 85 | - if( ! class_exists( $supported_theme_class_name ) ){ |
|
| 85 | + if ( ! class_exists($supported_theme_class_name)) { |
|
| 86 | 86 | return; |
| 87 | 87 | } |
| 88 | 88 | $supported_theme = new $supported_theme_class_name; |
| 89 | 89 | |
| 90 | 90 | // remove default wrappers |
| 91 | - remove_action( 'sensei_before_main_content', array( Sensei()->frontend, 'sensei_output_content_wrapper' ), 10 ); |
|
| 92 | - remove_action( 'sensei_after_main_content', array( Sensei()->frontend, 'sensei_output_content_wrapper_end' ), 10 ); |
|
| 91 | + remove_action('sensei_before_main_content', array(Sensei()->frontend, 'sensei_output_content_wrapper'), 10); |
|
| 92 | + remove_action('sensei_after_main_content', array(Sensei()->frontend, 'sensei_output_content_wrapper_end'), 10); |
|
| 93 | 93 | |
| 94 | 94 | // load the supported theme wrappers |
| 95 | - add_action( 'sensei_before_main_content', array( $supported_theme, 'wrapper_start' ), 10 ); |
|
| 96 | - add_action( 'sensei_after_main_content', array( $supported_theme, 'wrapper_end' ), 10 ); |
|
| 95 | + add_action('sensei_before_main_content', array($supported_theme, 'wrapper_start'), 10); |
|
| 96 | + add_action('sensei_after_main_content', array($supported_theme, 'wrapper_end'), 10); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ |
|
| 16 | + public function wrapper_start() { |
|
| 17 | 17 | |
| 18 | 18 | // output inline styles |
| 19 | 19 | $this->print_styles(); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @since 1.9.0 |
| 32 | 32 | */ |
| 33 | - private function print_styles(){?> |
|
| 33 | + private function print_styles() {?> |
|
| 34 | 34 | |
| 35 | 35 | <style> |
| 36 | 36 | @media screen and (min-width: 59.6875em){ |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ ?> |
|
| 16 | + public function wrapper_start() { ?> |
|
| 17 | 17 | <div id="primary" class="content-area"> |
| 18 | 18 | <main id="main" class="site-main" role="main"> |
| 19 | 19 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @since 1.9.0 |
| 26 | 26 | */ |
| 27 | - public function wrapper_end(){ ?> |
|
| 27 | + public function wrapper_end() { ?> |
|
| 28 | 28 | |
| 29 | 29 | </main> <!-- main-site --> |
| 30 | 30 | </div> <!-- content-area --> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ |
|
| 16 | + public function wrapper_start() { |
|
| 17 | 17 | ?> |
| 18 | 18 | |
| 19 | 19 | <div id="primary" class="site-content"> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @since 1.9.0 |
| 28 | 28 | */ |
| 29 | - public function wrapper_end(){ ?> |
|
| 29 | + public function wrapper_end() { ?> |
|
| 30 | 30 | |
| 31 | 31 | </div> |
| 32 | 32 | </div> |
@@ -7,4 +7,4 @@ |
||
| 7 | 7 | * |
| 8 | 8 | * @since 1.9.0 |
| 9 | 9 | */ |
| 10 | -Class Sensei_Twentysixteen extends Sensei__S{ } |
|
| 10 | +Class Sensei_Twentysixteen extends Sensei__S { } |
|
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 2 | +if ( ! defined('ABSPATH')) exit; |
|
| 3 | 3 | /** |
| 4 | 4 | * Content wrappers |
| 5 | 5 | * |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ |
|
| 16 | + public function wrapper_start() { |
|
| 17 | 17 | ?> |
| 18 | 18 | |
| 19 | 19 | <div id="primary" class="site-content"> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @since 1.9.0 |
| 28 | 28 | */ |
| 29 | - public function wrapper_end(){ ?> |
|
| 29 | + public function wrapper_end() { ?> |
|
| 30 | 30 | |
| 31 | 31 | </div> |
| 32 | 32 | </div> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ |
|
| 16 | + public function wrapper_start() { |
|
| 17 | 17 | ?> |
| 18 | 18 | |
| 19 | 19 | <div id="primary" class="site-content"> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @since 1.9.0 |
| 28 | 28 | */ |
| 29 | - public function wrapper_end(){ ?> |
|
| 29 | + public function wrapper_end() { ?> |
|
| 30 | 30 | |
| 31 | 31 | </div> |
| 32 | 32 | </div> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * Output opening wrappers |
| 14 | 14 | * @since 1.9.0 |
| 15 | 15 | */ |
| 16 | - public function wrapper_start(){ |
|
| 16 | + public function wrapper_start() { |
|
| 17 | 17 | ?> |
| 18 | 18 | |
| 19 | 19 | <div id="primary" class="site-content"> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @since 1.9.0 |
| 28 | 28 | */ |
| 29 | - public function wrapper_end(){ ?> |
|
| 29 | + public function wrapper_end() { ?> |
|
| 30 | 30 | |
| 31 | 31 | </div> |
| 32 | 32 | </div> |