Changeset 2087017
- Timestamp:
- 05/13/2019 03:37:53 PM (7 years ago)
- File:
-
- 1 edited
-
be-lazy/trunk/app/Controllers/Frontend.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
be-lazy/trunk/app/Controllers/Frontend.php
r2087009 r2087017 7 7 public function __construct() 8 8 { 9 switch(get_option(BE_LAZY_SLUG_DB .'_active')) 9 if($this->is_active()) 10 { 11 add_action('wp_enqueue_scripts', [$this, 'enqueue_styles']); 12 add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts']); 13 add_filter('the_content', [$this, 'filter_content'], 100); 14 } 15 } 16 17 public function is_active() 18 { 19 switch(get_option(BE_LAZY_SLUG_DB .'_active')) 10 20 { 11 21 case '0': 22 return false; 12 23 case '1': 13 add_action('wp_enqueue_scripts', [$this, 'enqueue_styles']); 14 add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts']); 15 add_filter('the_content', [$this, 'filter_content'], 100); 16 break; 24 return true; 25 case '2': 26 // TODO: return boolean (current page manually selected?) 27 default: 28 return false; 17 29 } 18 }30 } 19 31 20 32 public function enqueue_styles()
Note: See TracChangeset
for help on using the changeset viewer.