function list_all_categories() { if (is_main_query() and get_query_var("chronosly_category") != "") { wp_register_style('chronosly-front-css' . CHRONOSLY_VERSION, CHRONOSLY_URL . '/css/front_template.css'); wp_enqueue_style('chronosly-front-css' . CHRONOSLY_VERSION); if (file_exists(CHRONOSLY_PATH . DIRECTORY_SEPARATOR . "css" . DIRECTORY_SEPARATOR . "custom.css")) { wp_register_style('chronosly-custom-css', CHRONOSLY_URL . '/css/custom.css'); wp_enqueue_style('chronosly-custom-css'); } if (!$settings["chronosly-disable-gmap-js"]) { wp_register_script('chronosly-gmap', 'http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array('jquery')); wp_enqueue_script('chronosly-gmap'); } wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-tooltip'); wp_enqueue_script('jquery-ui-resizable'); wp_enqueue_script('jquery-ui-draggable'); wp_register_style('chronosly-icons', CHRONOSLY_URL . '/css/icons/styles.css'); wp_enqueue_style('chronosly-icons'); wp_register_style('chronosly-fa-icons', "http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"); wp_enqueue_style('chronosly-fa-icons'); if (!is_admin() or stripos($_SERVER["REQUEST_URI"], "wp-admin") === FALSE) { wp_register_script('chronosly-front-js', CHRONOSLY_URL . '/js/front.js', array('jquery')); $translation_array = array("weburl" => get_site_url(), "calendarurl" => Post_Type_Chronosly_Calendar::get_permalink(), 'ajaxurl' => admin_url('admin-ajax.php')); wp_localize_script('chronosly-front-js', 'translated1', $translation_array); wp_enqueue_script('chronosly-front-js'); } wp_register_style('chronosly-templates-base', CHRONOSLY_URL . '/css/templates_base.css'); wp_enqueue_style('chronosly-templates-base'); //templates and addons css do_action("chronosly_custom_frontend_css"); $sets = unserialize(get_option("chronosly-settings")); if (isset($sets["chronosly-base-templates-id"]) and $sets["chronosly-base-templates-id"] != 0 and !$_REQUEST["js_render"]) { if (get_query_var("chronosly_category") == "list_all_cats") { $_REQUEST["shortcode_categories"] = 1; } else { $_REQUEST["shortcode_category"] = 1; } Post_Type_Chronosly::base_template_code("ch-category"); //exit; } else { if (get_query_var("chronosly_category") == "list_all_cats") { include CHRONOSLY_PATH . DIRECTORY_SEPARATOR . "templates" . DIRECTORY_SEPARATOR . 'archive-category-chronosly.php'; } else { add_action('pre_get_posts', array("Post_Type_Chronosly", 'add_custom_post_vars')); include CHRONOSLY_PATH . DIRECTORY_SEPARATOR . "templates" . DIRECTORY_SEPARATOR . 'single-category-chronosly.php'; } exit; } } }