config = $config; self::$instance->blogson_setup_config(); } } /** * Setup the class props based on the config array. */ public function blogson_setup_config() { $theme = wp_get_theme(); if ( is_child_theme() ) { $this->theme_name = $theme->parent()->get( 'Name' ); $this->theme = $theme->parent(); } else { $this->theme_name = $theme->get( 'Name' ); $this->theme = $theme->parent(); } $this->theme_version = $theme->get( 'Version' ); $this->theme_slug = $theme->get_template(); } } } /** * Adding a About page */ add_action('admin_menu', 'blogson_add_menu'); function blogson_add_menu() { add_theme_page(esc_html__('About BlogSon Theme','blogson'), esc_html__('BlogSon Info','blogson'),'manage_options', esc_html__('blogson-theme-info','blogson'), esc_html__('blogson_theme_info','blogson')); } /** * Callback */ function blogson_theme_info() { ?>