setup_hooks(); } private function setup_hooks() { add_action( 'admin_menu', array( $this, 'create_menu' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); } public function enqueue_scripts() { wp_enqueue_style( 'colormag-admin-dashboard', get_template_directory_uri() . '/inc/admin/css/admin.css' ); } public function create_menu() { if ( is_child_theme() ) { $theme = wp_get_theme()->parent(); } else { $theme = wp_get_theme(); } /* translators: %s: Theme Name. */ $theme_page_name = sprintf( esc_html__( '%s Options', 'colormag' ), $theme->Name ); $page = add_theme_page( $theme_page_name, $theme_page_name, 'edit_theme_options', 'colormag-options', array( $this, 'option_page' ) ); add_action( 'admin_print_styles-' . $page, array( $this, 'enqueue_styles' ) ); } public function enqueue_styles() { wp_enqueue_style( 'colormag-dashboard', get_template_directory_uri() . '/inc/admin/css/admin.css', array(), COLORMAG_THEME_VERSION ); } public function option_page() { if ( is_child_theme() ) { $theme = wp_get_theme()->parent(); } else { $theme = wp_get_theme(); } ?>

Version ); ?>

Name ); ?>

Name ); ?>

  • ' . esc_html__( 'Documentation', 'colormag' ) . '', esc_url( 'https://docs.themegrill.com/colormag' ) ); ?>
  • ' . esc_html__( 'Starter Demos', 'colormag' ) . '', esc_url( 'https://demo.themegrill.com/colormag-demos' ) ); ?>
  • ' . esc_html__( 'Premium Version', 'colormag' ) . '', esc_url( 'https://themegrill.com/themes/colormag' ) ); ?>

  • ' . esc_html__( 'Got theme support question?', 'colormag' ) . '', esc_url( 'https://wordpress.org/support/theme/colormag/' ) ); ?>
  • ' . esc_html__( 'Leave a review', 'colormag' ) . '', esc_url( 'https://wordpress.org/support/theme/colormag/reviews/' ) ); ?>