Changeset 2098466
- Timestamp:
- 05/31/2019 10:05:13 AM (7 years ago)
- File:
-
- 1 edited
-
be-lazy/trunk/app/Controllers/Backend.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
be-lazy/trunk/app/Controllers/Backend.php
r2087009 r2098466 7 7 public function __construct() 8 8 { 9 add_action('admin_enqueue_scripts', [$this, 'enqueue_styles']);10 add_action('admin_menu', [$this, 'add_menu']);11 add_action('admin_init', [$this, 'register_settings']);9 add_action('admin_enqueue_scripts', [$this, 'enqueue_styles']); 10 add_action('admin_menu', [$this, 'add_menu']); 11 add_action('admin_init', [$this, 'register_settings']); 12 12 } 13 13 14 14 public function enqueue_styles() 15 {16 wp_enqueue_style('be-lazy', BE_LAZY_URL_CSS .'be-lazy-admin.css', [], BE_LAZY_VERSION);17 }15 { 16 wp_enqueue_style('be-lazy', BE_LAZY_URL_CSS . 'be-lazy-admin.css', [], BE_LAZY_VERSION); 17 } 18 18 19 19 public function add_menu() 20 {21 add_menu_page(22 'Be Lazy',23 'Be Lazy',24 'manage_options',25 BE_LAZY_SLUG,26 [$this, 'show_options_page'],27 BE_LAZY_URL_IMG .'/be-lazy.svg',28 99929 );30 }20 { 21 add_menu_page( 22 'Be Lazy', 23 'Be Lazy', 24 'manage_options', 25 BE_LAZY_SLUG, 26 [$this, 'show_options_page'], 27 BE_LAZY_URL_IMG . '/be-lazy.svg', 28 999 29 ); 30 } 31 31 32 public function show_options_page() 33 { 34 require_once BE_LAZY_DIR_VIEWS .'options_page.php'; 35 } 36 37 public function register_settings() 38 { 39 register_setting(BE_LAZY_SLUG, BE_LAZY_SLUG_DB .'_active', [ 40 // 'default' => '1' 41 ]); 42 } 32 public function show_options_page() 33 { 34 require_once BE_LAZY_DIR_VIEWS . 'options_page.php'; 35 } 43 36 }
Note: See TracChangeset
for help on using the changeset viewer.