function theme_js() { global $wp_scripts; wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false); wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false); $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9'); $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9'); wp_enqueue_script('bootstrap_js', theme_dir() . '/js/bootstrap.min.js', ['jquery'], '', true); wp_enqueue_script('theme_js', theme_dir() . '/js/theme.js', ['jquery', 'bootstrap_js'], '', true); }
function is_microblog_theme() { global $microblog_themes; if (in_array(environment('theme'), $microblog_themes)) { return true; } if (is_file(theme_dir() . "post-form.php")) { return true; } return false; }
/** * @package Helios Calendar * @subpackage Mobile Theme Hacks */ function my_menu($active_p) { $url_root = cal_url(); $primary = array('/index.php?com=digest' => '<img src="' . theme_dir() . '/img/home.png' . '" width="16" height="16" alt="" />', '/index.php' => 'Events', '/index.php?com=location' => 'Venues', '/index.php?com=tools' => 'Tools'); $x = 0; echo ' <nav> <ul>'; foreach ($primary as $link => $label) { echo ' <li><a href="' . $url_root . $link . '" class="' . ($x == $active_p ? 'on' : 'off') . '">' . $label . '</a></li>'; ++$x; } echo ' </ul> </nav>'; }
<html lang="<?php echo get_lang_config('HTMLTemplate'); ?> "> <head> <meta charset="<?php echo get_lang_config('CharSet'); ?> "> <meta http-equiv="preview-refresh" content="3600" /> <link rel="stylesheet" type="text/css" href="<?php echo cal_url(); ?> /themes/core.css" /> <link rel="stylesheet" type="text/css" href="<?php echo theme_dir(); ?> /css/style.css" /> <link rel="shortcut icon" href="<?php echo cal_url(); ?> /favicon.ico"> <?php hc_header(); ?> <script> //<!-- var listDivs = ["hc_featured","hc_popular","hc_newest"]; var listLinks = ["hc_l","hc_c","hc_r"]; function toggleList(show){var i = 0;while(i < listDivs.length){document.getElementById(listDivs[i]).style.display = (i == show) ? "block" : "none";document.getElementById(listLinks[i]).className = (i == show) ? "on" : "off";i++;}}
/** * Get mobile touch icon appropriate for user device (iPhone/Other). * @since 2.0.0 * @version 2.0.0 * @return string URL of icon */ function mobile_icon() { return preg_match('/iP[hone|ad|od]/i', $_SERVER['HTTP_USER_AGENT']) ? theme_dir() . '/img/touch/iOS.png' : theme_dir() . '/img/touch/other.png'; }