Base Directory:
/home/ecedu/public_html/wp-content/themes/meta-news/inc/theme-info
theme_name = $theme->Name;
$this->theme_version = $theme->Version;
$this->theme_slug = $theme->get_template();
/* Define Tabs Sections */
$this->tab_sections = array(
'getting_started' => __('Getting Started', 'meta-news'),
'recommended_actions' => __('Recommended Actions', 'meta-news'),
'demo_content' => __('Demo Content', 'meta-news'),
'support' => __('Support', 'meta-news'),
'free_vs_pro' => __('Free Vs Pro', 'meta-news'),
);
/* Theme Activation Notice */
add_action( 'admin_notices', array( $this, 'meta_news_activation_admin_notice' ) );
/* Create a Theme Details Page */
add_action( 'admin_menu', array( $this, 'meta_news_info_register_menu' ) );
/* Enqueue Styles & Scripts for Theme Details Page */
add_action( 'admin_enqueue_scripts', array( $this, 'meta_news_info_styles_and_scripts' ) );
}
/* Notification Message on Theme Activation */
public function meta_news_activation_admin_notice() {
global $pagenow;
if ( is_admin() && ('themes.php' == $pagenow) && (isset($_GET['activated'])) ) { ?>
theme_name) ); ?>theme_version); ?>
theme_name), '
' ); ?>
tab_sections);
// Sanitize and Validate the section
$section = isset($_GET['section']) ? sanitize_file_name($_GET['section']) : 'getting_started';
if (!in_array($section, $allowed_sections)) {
$section = 'getting_started'; // Default if invalid
}
?>
tab_sections;
foreach($tabs as $id => $label) :
$nav_class = 'nav-tab ';
$nav_class .= $id;
if ($id == $section) {
$nav_class .= ' nav-tab-active';
} ?>
theme_slug . '-details' ) {
wp_enqueue_style( 'meta-news-details-screen', get_template_directory_uri() . '/inc/theme-info/css/theme-info.css' );
}
}
}
new Meta_News_Info();
endif;