set_page_title();
}
public function set_page_title() {
$locale = self::$locale;
$sections = Admins::getInstance()->getAdminSections();
$pages = Admins::getInstance()->getAdminPages();
$is_current_page = Admins::getInstance()->getCurrentPage();
if (!empty($sections) && !empty($pages)) {
$pages = flatten_array($pages);
if (!empty($is_current_page)) {
foreach ($pages as $page_data) {
if ($page_data['admin_link'] == $is_current_page) {
$page_title = $page_data['admin_title'];
$page_section = $sections[$page_data['admin_page']];
$page_rights = $page_data['admin_rights'];
return [
"title" => $page_section.$locale['global_201'].$page_title,
"icon" => "",
];
}
}
}
}
return [
"title" => self::get_locale('artemis_admin'),
"icon" => "
",
];
}
public static function get_locale($key = NULL) {
return $key === NULL ? self::$locale : (isset(self::$locale[$key]) ? self::$locale[$key] : NULL);
}
public static function add_css($file) {
if (file_exists(THEMES."admin_themes/Artemis/css/".$file)) {
add_to_head("");
}
}
public static function get_title() {
return self::$page_title;
}
public static function admin_language_switcher() {
$locale = self::get_locale();
$language_opts = '';
if (count(fusion_get_enabled_languages()) > 1) {
$language_opts = "