theme = wp_get_theme(); $this->slug = $this->theme->template; add_action( 'admin_menu', array( $this, 'add_menu' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); } /** * Add theme dashboard page. */ public function add_menu() { add_theme_page( $this->theme->name, $this->theme->name, 'edit_theme_options', $this->slug, array( $this, 'render' ) ); } /** * Show dashboard page. */ public function render() { ?>