Example #1
1
 function cherry_plugin_settings()
 {
     global $wpdb;
     if (!function_exists('get_plugin_data')) {
         require_once ABSPATH . 'wp-admin/includes/plugin.php';
     }
     $upload_dir = wp_upload_dir();
     $plugin_data = get_plugin_data(plugin_dir_path(__FILE__) . 'cherry-plugin.php');
     //Cherry plugin constant variables
     define('CHERRY_PLUGIN_DIR', plugin_dir_path(__FILE__));
     define('CHERRY_PLUGIN_URL', plugin_dir_url(__FILE__));
     define('CHERRY_PLUGIN_DOMAIN', $plugin_data['TextDomain']);
     define('CHERRY_PLUGIN_DOMAIN_DIR', $plugin_data['DomainPath']);
     define('CHERRY_PLUGIN_VERSION', $plugin_data['Version']);
     define('CHERRY_PLUGIN_NAME', $plugin_data['Name']);
     define('CHERRY_PLUGIN_SLUG', plugin_basename(__FILE__));
     define('CHERRY_PLUGIN_DB', $wpdb->prefix . CHERRY_PLUGIN_DOMAIN);
     define('CHERRY_PLUGIN_REMOTE_SERVER', esc_url('http://tmbhtest.com/cherryframework.com/components_update/'));
     //Other constant variables
     define('CURRENT_THEME_DIR', get_stylesheet_directory());
     define('CURRENT_THEME_URI', get_stylesheet_directory_uri());
     define('UPLOAD_BASE_DIR', str_replace("\\", "/", $upload_dir['basedir']));
     define('UPLOAD_DIR', str_replace("\\", "/", $upload_dir['path'] . '/'));
     // if ( !defined('API_URL') ) {
     // 	define( 'API_URL', esc_url( 'http://updates.cherry.template-help.com/cherrymoto/v3/api/' ) );
     // }
     load_plugin_textdomain(CHERRY_PLUGIN_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/' . CHERRY_PLUGIN_DOMAIN_DIR);
     do_action('cherry_plugin_settings');
 }
Example #2
0
/**
 *
 * This function adds all the constants that can be used for the CRM Press framework.
 *
 * @since 1.0
 *
 */
function crmpress_constants()
{
    // Define directory constants
    define('PARENT_DIR', get_template_directory());
    define('CHILD_DIR', get_stylesheet_directory());
    define('CRMPRESS_IMAGES_DIR', PARENT_DIR . '/images');
    define('CRMPRESS_LIB_DIR', PARENT_DIR . '/lib');
    define('CRMPRESS_ADMIN_DIR', CRMPRESS_LIB_DIR . '/admin');
    define('CRMPRESS_BUILD_DIR', CRMPRESS_LIB_DIR . '/build');
    define('CRMPRESS_METABOX_DIR', CRMPRESS_LIB_DIR . '/metabox');
    define('CRMPRESS_CSS_DIR', CRMPRESS_LIB_DIR . '/css');
    define('CRMPRESS_FUNCTIONS_DIR', CRMPRESS_LIB_DIR . '/functions');
    define('CRMPRESS_JS_DIR', CRMPRESS_LIB_DIR . '/js');
    define('CRMPRESS_RESOURCES_DIR', CRMPRESS_LIB_DIR . '/resources');
    define('CRMPRESS_WIDGETS_DIR', CRMPRESS_LIB_DIR . '/widgets');
    // Define URL constants
    define('PARENT_URL', get_template_directory_uri());
    define('CHILD_URL', get_stylesheet_directory_uri());
    define('CRMPRESS_IMAGES_URL', PARENT_URL . '/images');
    define('CRMPRESS_LIB_URL', PARENT_URL . '/lib');
    define('CRMPRESS_ADMIN_URL', CRMPRESS_LIB_URL . '/admin');
    define('CRMPRESS_BUILD_URL', CRMPRESS_LIB_URL . '/build');
    define('CRMPRESS_METABOX_URL', CRMPRESS_LIB_URL . '/metabox');
    define('CRMPRESS_CSS_URL', CRMPRESS_LIB_URL . '/css');
    define('CRMPRESS_FUNCTIONS_URL', CRMPRESS_LIB_URL . '/functions');
    define('CRMPRESS_JS_URL', CRMPRESS_LIB_URL . '/js');
    define('CRMPRESS_RESOURCES_URL', CRMPRESS_LIB_URL . '/resources');
    define('CRMPRESS_WIDGETS_URL', CRMPRESS_LIB_URL . '/widgets');
}
Example #3
0
function register_custom_post_types()
{
    /* Register custom post types
     *****************************/
    register_post_type('news', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/news-icon.png', 'labels' => array('name' => _x('Новости', 'post type general name'), 'singular_name' => _x('Новость', 'post type singular name'), 'add_new' => _x('Добавить новую', 'Новость'), 'add_new_item' => __('Добавить новую новость'), 'edit_item' => __('Редактировать новость'), 'new_item' => __('Новая новость'), 'view_item' => __('Посмотреть новость'), 'search_items' => __('Поиск новостей'), 'not_found' => __('Новостей не найдено'), 'not_found_in_trash' => __('Новостей не найдено в корзине'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'nitem', 'with_front' => FALSE), 'register_meta_box_cb' => 'news_add_box', 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    register_post_type('banners', array('public' => true, 'publicly_queryable' => true, 'has_archive' => false, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/banners-icon.png', 'labels' => array('name' => _x('Баннеры', 'post type general name'), 'singular_name' => _x('Баннер', 'post type singular name'), 'add_new' => _x('Добавить новый', 'Баннер'), 'add_new_item' => __('Добавить новый баннер'), 'edit_item' => __('Редактировать баннер'), 'new_item' => __('Новый баннер'), 'view_item' => __('Посмотреть баннер'), 'search_items' => __('Поиск баннеров'), 'not_found' => __('Баннеры не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'banners', 'with_front' => FALSE), 'supports' => array('title')));
    register_post_type('ads', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/adsa_icon.png', 'labels' => array('name' => _x('Объявления', 'post type general name'), 'singular_name' => _x('Объявление', 'post type singular name'), 'add_new' => _x('Добавить новое', 'Объявление'), 'add_new_item' => __('Добавить новое объявление'), 'edit_item' => __('Редактировать объявление'), 'new_item' => __('Новое объявление'), 'view_item' => __('Посмотреть объявление'), 'search_items' => __('Поиск объявлений'), 'not_found' => __('Объявления не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'ads', 'with_front' => FALSE), 'register_meta_box_cb' => 'ads_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('catalog', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/catalog_icon.png', 'labels' => array('name' => _x('Справочник', 'post type general name'), 'singular_name' => _x('Организация', 'post type singular name'), 'add_new' => _x('Добавить организацию', 'Организация'), 'add_new_item' => __('Добавить новую организацию'), 'edit_item' => __('Редактировать организацию'), 'new_item' => __('Новая организация'), 'view_item' => __('Посмотреть организацию'), 'search_items' => __('Поиск организаций'), 'not_found' => __('Организации не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'catalog', 'with_front' => FALSE), 'register_meta_box_cb' => 'cat_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('people', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/drs-icon.png', 'labels' => array('name' => _x('Врачи', 'post type general name'), 'singular_name' => _x('Врач', 'post type singular name'), 'add_new' => _x('Добавить врача', 'врач'), 'add_new_item' => __('Добавить нового врача'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новый врач'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск врача'), 'not_found' => __('Записи не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'register_meta_box_cb' => 'pl_add_box', 'rewrite' => array('slug' => 'people', 'with_front' => FALSE), 'supports' => array('title', 'editor', 'thumbnail', 'comments')));
    /*Новости АВТОМАБИЛКИ начало*/
    register_post_type('som', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/car-icon.png', 'labels' => array('name' => _x('Somicadze', 'post type general name'), 'singular_name' => _x('Som', 'post type singular name'), 'add_new' => _x('Добавить запись', 'новость'), 'add_new_item' => __('Добавить новую запись'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новая запись'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск записей'), 'not_found' => __('Запись не найдена'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 6, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'somnews', 'with_front' => FALSE), 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    /* Register custom taxonomies
     *****************************/
    $labelsTags = array('name' => _x('Метки', 'taxonomy general name'), 'singular_name' => _x('Метки', 'taxonomy singular name'), 'search_items' => __('Поиск меток'), 'all_items' => __('Все метки'), 'edit_item' => __('Редактировать метку'), 'update_item' => __('Обновить метку'), 'add_new_item' => __('Добавить новую метку'), 'new_item_name' => __('Новая метка'));
    register_taxonomy('ntag', array('news'), array('hierarchical' => false, 'labels' => $labelsTags, 'show_ui' => 'radio', 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => array('slug' => 'ntag')));
    $labelsCat = array('name' => _x('Рубрики новостей', 'taxonomy general name'), 'singular_name' => _x('Рубрика', 'taxonomy singular name'), 'search_items' => __('Поиск рубрик'), 'all_items' => __('Все рубрики'), 'parent_item' => __('Родительская рубрика'), 'parent_item_colon' => __('Родительская рубрика:'), 'edit_item' => __('Редактировать рубрику'), 'update_item' => __('Обновить рубрику'), 'add_new_item' => __('Добавить новую рубрику'), 'new_item_name' => __('Новая рубрика'));
    register_taxonomy('ncategory', array('news'), array('hierarchical' => true, 'labels' => $labelsCat, 'show_ui' => 'radio', 'query_var' => true, 'rewrite' => array('slug' => 'ncategory')));
    $labelsLoc = array('name' => _x('Регионы', 'taxonomy general name'), 'singular_name' => _x('Регион', 'taxonomy singular name'), 'search_items' => __('Поиск региона'), 'all_items' => __('Все регионы'), 'parent_item' => __('Родительский регион'), 'parent_item_colon' => __('Родительский регион:'), 'edit_item' => __('Редактировать регион'), 'update_item' => __('Обновить регион'), 'add_new_item' => __('Добавить новый регион'), 'new_item_name' => __('Новый регион'));
    register_taxonomy('nlocation', array('news', 'ads', 'catalog'), array('public' => true, 'hierarchical' => true, 'labels' => $labelsLoc, 'query_var' => 'nlocation', 'show_ui' => true, 'rewrite' => array('slug' => 'nlocation', 'with_front' => false)));
    $labelsAdsCat = array('name' => _x('Категории объявлений', 'taxonomy general name'), 'singular_name' => _x('Категория', 'taxonomy singular name'), 'search_items' => __('Поиск категории'), 'all_items' => __('Все категории'), 'parent_item' => __('Родительская категория'), 'parent_item_colon' => __('Родительская категория:'), 'edit_item' => __('Редактировать категорию'), 'update_item' => __('Обновить категорию'), 'add_new_item' => __('Добавить новую категорию'), 'new_item_name' => __('Новая категория'));
    register_taxonomy('adscategory', 'ads', array('public' => true, 'hierarchical' => true, 'labels' => $labelsAdsCat, 'query_var' => 'adscategory', 'show_ui' => true, 'rewrite' => array('slug' => 'adscategory', 'with_front' => false)));
    $labelsCatalogCat = array('name' => _x('Разделы справочника', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский раздел'), 'parent_item_colon' => __('Родительский раздел:'), 'edit_item' => __('Редактировать раздел'), 'update_item' => __('Обновить раздел'), 'add_new_item' => __('Добавить новый раздел'), 'new_item_name' => __('Новый раздел'));
    register_taxonomy('catcategory', 'catalog', array('public' => true, 'hierarchical' => true, 'labels' => $labelsCatalogCat, 'query_var' => 'catcategory', 'show_ui' => true, 'rewrite' => array('slug' => 'catcategory', 'with_front' => false)));
    $labelsMedicalNewsCat = array('name' => _x('Тип', 'taxonomy general name'), 'singular_name' => _x('Тип', 'taxonomy singular name'), 'search_items' => __('Поиск типов'), 'all_items' => __('Все типы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('medcat', 'medicalnews', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsMedicalNewsCat, 'query_var' => 'medcat', 'show_ui' => true, 'rewrite' => array('slug' => 'medcat', 'with_front' => false)));
    $labelsSomCat = array('name' => _x('Разделы', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('somcat', 'som', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsSomCat, 'query_var' => 'somcat', 'show_ui' => true, 'rewrite' => array('slug' => 'somcat', 'with_front' => false)));
}
function localedge_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // modernizr (without media query polyfill)
    wp_enqueue_script('localedge-modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js', false, null);
    // respondjs
    wp_enqueue_script('localedge-respondjs', '//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js', false, null);
    // register main stylesheet
    wp_enqueue_style('localedge-stylesheet', get_stylesheet_directory_uri() . '/css/style.css', array(), '', 'all');
    // ie-only style sheet
    wp_enqueue_style('localedge-ie-only', get_stylesheet_directory_uri() . '/css/ie.css', array(), '');
    $wp_styles->add_data('localedge-ie-only', 'conditional', 'lt IE 9');
    // add conditional wrapper around ie stylesheet
    //Magnific Popup (LightBox)
    wp_enqueue_script('localedge-magnific-popup-js', '//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js', array('jquery'), '0.9.9', true);
    //Font Awesome (icon set)
    wp_enqueue_style('localedge-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3');
    // iCheck (better radio and checkbox inputs)
    wp_enqueue_script('localedge-icheck', '//cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.1/icheck.min.js', array('jquery'), '1.0.1', true);
    //Chosen - http://harvesthq.github.io/chosen/
    wp_enqueue_script('chosen-js', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.jquery.min.js', array('jquery'), '1.1.0', true);
    // comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
    //adding scripts file in the footer
    wp_enqueue_script('localedge-js', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), '', true);
}
Example #5
0
function wl_removeScripts()
{
    //De-Queuing Styles sheet
    wp_dequeue_style('default', get_template_directory_uri() . '/css/default.css');
    //EN-Queing Style sheet
    wp_enqueue_style('lite-brown', get_stylesheet_directory_uri() . '/green.css');
}
Example #6
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (!empty($instance['email'])) {
         echo '<a href="mailto:' . $instance['email'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/mail.png" alt="Email" /></a> ';
     }
     if (!empty($instance['rss'])) {
         echo '<a href="' . $instance['rss'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/rss.png" alt="RSS" /></a> ';
     }
     if (!empty($instance['twitter'])) {
         echo '<a href="' . $instance['twitter'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/twitter.png" alt="Twitter" /></a> ';
     }
     if (!empty($instance['facebook'])) {
         echo '<a href="' . $instance['facebook'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/facebook.png" alt="Facebook" /></a> ';
     }
     if (!empty($instance['linkedin'])) {
         echo '<a href="' . $instance['linkedin'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/linkedin.png" alt="Linkedin" /></a> ';
     }
     echo $after_widget;
 }
Example #7
0
function ellak_font_awesome()
{
    // Font Awesome
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
    // Facebook SDK
    wp_enqueue_script('facebook-sdk', get_stylesheet_directory_uri() . '/js/facebook.js', array(), '2.3', true);
}
Example #8
0
/**
 * Enqueue scripts and styles.
 */
function _s_scripts()
{
    /**
     * If WP is in script debug, or we pass ?script_debug in a URL - set debug to true.
     */
    $debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true || isset($_GET['script_debug']) ? true : false;
    /**
     * If we are debugging the site, use a unique version every page load so as to ensure no cache issues.
     */
    $version = '1.0.0';
    /**
     * Should we load minified scripts? Also enqueue live reload to allow for extensionless reloading.
     */
    $suffix = '.min';
    if (true === $debug) {
        $suffix = '';
        wp_enqueue_script('live-reload', '//localhost:35729/livereload.js', array(), $version, true);
    }
    wp_enqueue_style('_s-google-font', _s_font_url(), array(), null);
    wp_enqueue_style('_s-style', get_stylesheet_directory_uri() . '/style' . $suffix . '.css', array(), $version);
    wp_enqueue_script('_s-project', get_template_directory_uri() . '/assets/js/project' . $suffix . '.js', array('jquery'), $version, true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #9
0
/**
 * Returns full URI of the WPAS directory
 *
 * @return string
 */
function get_wpas_uri()
{
    if (defined('WPAS_URI')) {
        return rtrim(WPAS_URI, '/');
    }
    return get_stylesheet_directory_uri() . '/' . basename(__DIR__);
}
Example #10
0
function theme_enqueue_styles()
{
    $parent_style = 'parent-style';
    wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
    wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
    wp_enqueue_script('rankmenu', get_stylesheet_directory_uri() . '/js/script.js', 'jquery', '1.0', true);
}
Example #11
0
function dfwpchild_enqueue_style()
{
    //Le nom du fichier css du projet
    //dépends du 'mode' choisi en admin
    $projectCssName = get_option('debug_mode') == 'prod' ? 'index.min.css' : 'index.css';
    //Enregistrer la css dans la pile
    wp_register_style('dfwpchild_index', get_stylesheet_directory_uri() . '/dist/css/' . $projectCssName);
    //Enregistrer la css de la pattern
    wp_register_style('dfwpchild_pattern', get_stylesheet_directory_uri() . '/dist/css/pattern.min.css');
    //Enregistrer la css de la maintenance
    wp_register_style('dfwpchild_maintenance', get_stylesheet_directory_uri() . '/dist/css/maintenance.min.css');
    //Charger le css du projet
    wp_enqueue_style('dfwpchild_index');
    //Pour la page pattern uniquement
    if (is_page_Template('page-pattern.php')) {
        //On charge la css qui va bien
        wp_dequeue_style('dfwpchild_index');
        wp_enqueue_style('dfwpchild_pattern');
    }
    //Si la maintenance est activée
    if (get_option('maintenance_mode') == 'true') {
        //Si on est pas sur l'admin, qu'on est pas un utilisateur connecté ou que l'on est pas sur la page de login
        if (!is_admin() && !is_user_logged_in() && Login::isLoginPage() == false) {
            //On charge la feuille de style de la maintenance
            wp_dequeue_style('dfwpchild_index');
            wp_enqueue_style('dfwpchild_maintenance');
        }
    }
}
function homepage_scripts()
{
    if (is_front_page()) {
        wp_enqueue_style('lander-styles', get_stylesheet_directory_uri() . '/home-styles.css');
        wp_enqueue_script('landerjs', get_template_directory_uri() . '/library/js/home.js', array('jquery'), '', true);
    }
}
Example #13
0
 function wpo_init_constants()
 {
     $theme_mods = get_theme_mods();
     if (!defined('TEMPLATEURI')) {
         define('TEMPLATEURI', trailingslashit(get_stylesheet_directory_uri()));
     }
     if (!defined('HOMEURL')) {
         define('HOMEURL', trailingslashit(get_home_url()));
     }
     if (!defined('THEMECOLOR')) {
         if (!empty($theme_mods['wpo_theme_color'])) {
             $meta_color = $theme_mods['wpo_theme_color'];
         } else {
             $meta_color = '#000000';
         }
         define('THEMECOLOR', $meta_color);
     }
     if (!defined('HEADERCOLOR')) {
         if (!empty($theme_mods['wpo_header_color'])) {
             $meta_color = $theme_mods['wpo_header_color'];
         } else {
             $meta_color = '#000000';
         }
         define('HEADERCOLOR', $meta_color);
     }
 }
Example #14
0
function teutopress_acf_settings_dir($dir)
{
    // update path
    $dir = get_stylesheet_directory_uri() . '/acf/';
    // return
    return $dir;
}
Example #15
0
 /**
  * Properly set the Kirki URL for assets.
  * Determines if Kirki is installed as a plugin, in a child theme, or a parent theme
  * and then does some calculations to get the proper URL for its CSS & JS assets.
  */
 public function set_url()
 {
     // The path of the Kirki's parent-folder.
     $path = wp_normalize_path(dirname(Kirki::$path));
     // Get parent-theme path.
     $parent_theme_path = get_template_directory();
     $parent_theme_path = wp_normalize_path($parent_theme_path);
     // Get child-theme path.
     $child_theme_path = get_stylesheet_directory_uri();
     $child_theme_path = wp_normalize_path($child_theme_path);
     Kirki::$url = plugin_dir_url(dirname(__FILE__) . 'kirki.php');
     // Is Kirki included in a parent theme?
     if (false !== strpos(Kirki::$path, $parent_theme_path)) {
         Kirki::$url = get_template_directory_uri() . str_replace($parent_theme_path, '', Kirki::$path);
     }
     // Is there a child-theme?
     if ($child_theme_path !== $parent_theme_path) {
         // Is Kirki included in a child theme?
         if (false !== strpos(Kirki::$path, $child_theme_path)) {
             Kirki::$url = get_template_directory_uri() . str_replace($child_theme_path, '', Kirki::$path);
         }
     }
     // Apply the kirki/config filter.
     $config = apply_filters('kirki/config', array());
     if (isset($config['url_path'])) {
         Kirki::$url = esc_url_raw($config['url_path']);
     }
 }
Example #16
0
function bones_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    if (!is_admin()) {
        // modernizr and main stylesheets
        wp_register_script('bones-modernizr', get_stylesheet_directory_uri() . '/assets/js/libs/modernizr.custom.min.js', array(), '2.5.3', false);
        wp_register_style('bones-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-css', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.carousel.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-theme', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.theme.default.min.css', array(), '', 'all');
        wp_register_style('bones-ie-only', get_stylesheet_directory_uri() . '/assets/css/ie.min.css', array(), '');
        // comment reply script for threaded comments
        if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
            wp_enqueue_script('comment-reply');
        }
        //adding scripts file in the footer
        wp_register_script('bones-js', get_stylesheet_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
        wp_register_script('bones-quickshare', get_stylesheet_directory_uri() . '/assets/vendor/quickshare/dist/quickshare.min.js', array('jquery'), '', true);
        wp_register_script('bones-owlcarousel-js', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/owl.carousel.min.js', array('jquery'), '', true);
        wp_enqueue_script('bones-modernizr');
        wp_enqueue_style('bones-stylesheet');
        wp_enqueue_style('bones-owlcarousel-css');
        wp_enqueue_style('bones-owlcarousel-theme');
        wp_enqueue_style('bones-ie-only');
        $wp_styles->add_data('bones-ie-only', 'conditional', 'lt IE 9');
        // add conditional wrapper around ie stylesheet
        wp_enqueue_script('jquery');
        wp_enqueue_script('bones-js');
        wp_enqueue_script('bones-quickshare');
        wp_enqueue_script('bones-owlcarousel-js');
    }
}
Example #17
0
function no_wp_logo_admin_bar_remove()
{
    ?>
        <style type="text/css">
            #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
                content: url(<?php 
    echo get_stylesheet_directory_uri();
    ?>
/img/logo-s.png)   !important;
                top: 0px;
/*                right: 0;
                z-index: 100000 !important;
*//*                display: none;
*/            }

            #wpadminbar #wp-admin-bar-wp-logo > a.ab-item {
                pointer-events: none;
                cursor: default;
                top: 0px;
/*                right: 0;
                z-index: 100000 !important;
*/                display: none;

            }   
        </style>
    <?php 
}
/**
 * Enqueues admin stylesheets and JavaScript.
 */
function hudson_enqueue_admin_styles()
{
    wp_register_style('hudson-admin', get_stylesheet_directory_uri() . '/css/admin.css');
    wp_enqueue_style('hudson-admin');
    wp_register_script('hudson-admin', get_stylesheet_directory_uri() . '/js/admin.min.js');
    wp_enqueue_script('hudson-admin');
}
 function foundationpress_scripts()
 {
     // Enqueue Main Stylesheet
     wp_enqueue_style('Main Stylesheet', get_stylesheet_directory_uri() . '/css/foundation.css');
     // Deregister the jquery version bundled with wordpress
     wp_deregister_script('jquery');
     // Modernizr is used for polyfills and feature detection. Must be placed in header. (Not required)
     wp_register_script('modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '2.8.3', false);
     // Fastclick removes the 300ms delay on click events in mobile environments. Must be placed in header. (Not required)
     wp_register_script('fastclick', get_template_directory_uri() . '/js/vendor/fastclick.js', array(), '1.0.0', false);
     // CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
     wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);
     // Self hosted jQuery placed in the footer. (Comment the script above and uncomment the script below if you want to switch).
     //wp_register_script( 'jquery', get_template_directory_uri() . '/js/vendor/jquery.js', array(), '2.1.3', true );
     // If you'd like to cherry-pick the foundation components you need in your project, head over to Gruntfile.js and see lines 67-88
     // It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :)
     wp_register_script('foundation', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '5.5.1', true);
     wp_register_script('troispointszero', get_template_directory_uri() . '/js/custom/troispointzero.js', array('jquery'), '1.0');
     // Enqueue all registered scripts
     wp_enqueue_script('modernizr');
     wp_enqueue_script('fastclick');
     wp_enqueue_script('jquery');
     wp_enqueue_script('foundation');
     wp_enqueue_script('troispointszero');
 }
    public function widget($args, $instance)
    {
        global $post;
        $postID = $post->ID;
        $type = $instance['type'];
        $text = $instance['text'];
        ?>
        <div class='widget uw-story-social'>
            <h3 class='widget-title'><?php 
        echo $type;
        ?>
</h3>
            <div class='<?php 
        echo strtolower($type);
        ?>
-widget'>
                <div class='social-head'>
                    <img src='<?php 
        echo get_stylesheet_directory_uri();
        ?>
/img/social.jpg'>
                    <span>University of Washington</span>
                </div>
                <p><?php 
        echo $text;
        ?>
</p>
            </div>
        </div>
        <?php 
    }
/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the "id" fields, make sure to use all lowercase and no spaces.
 *  
 */
function optionsframework_options()
{
    $themename = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme();
    $themename = $themename['Name'];
    $shortname = "of";
    //Stylesheet Reader
    $alt_stylesheets = array("black" => "black", "brown" => "brown", "blue" => "blue", "green" => "green", "pink" => "pink", "purple" => "purple", "red" => "red", "yellow" => "yellow");
    // Test data
    $test_array = array("one" => "One", "two" => "Two", "three" => "Three", "four" => "Four", "five" => "Five");
    // Multicheck Array
    $multicheck_array = array("one" => "French Toast", "two" => "Pancake", "three" => "Omelette", "four" => "Crepe", "five" => "Waffle");
    // Multicheck Defaults
    $multicheck_defaults = array("one" => "1", "five" => "1");
    // Background Defaults
    $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
    // Pull all the categories into an array
    $options_categories = array();
    $options_categories_obj = get_categories();
    foreach ($options_categories_obj as $category) {
        $options_categories[$category->cat_ID] = $category->cat_name;
    }
    // Pull all the pages into an array
    $options_pages = array();
    $options_pages_obj = get_pages('sort_column=post_parent,menu_order');
    $options_pages[''] = 'Select a page:';
    foreach ($options_pages_obj as $page) {
        $options_pages[$page->ID] = $page->post_title;
    }
    // If using image radio buttons, define a directory path
    $imagepath = get_stylesheet_directory_uri() . '/images/';
    $options = array(array("name" => "General Settings", "type" => "heading"), array("name" => "Custom Logo", "desc" => "Choose your own logo. Optimal Size: 215px Wide by 55px Height", "id" => "colorway_logo", "type" => "upload"), array("name" => "Custom Favicon", "desc" => "Specify a 16px x 16px image that will represent your website's favicon.", "id" => "colorway_favicon", "type" => "upload"), array("name" => "Tracking Code", "desc" => "Paste your Google Analytics (or other) tracking code here.", "id" => "colorway_analytics", "std" => "", "type" => "textarea"), array("name" => "Body Background Image", "desc" => "Select image to change your website background", "id" => "inkthemes_bodybg", "std" => "", "type" => "upload"), array("name" => "Home Top Feature", "type" => "heading"), array("name" => "Home Top Feature Image", "desc" => "Choose Image for your Home Top Feature. Optimal Size: 900px x 350px", "id" => "colorway_slideimage1", "type" => "upload"), array("name" => "Home Top Feature Heading", "desc" => "Enter the Heading for Home Top Feature", "id" => "colorway_slideheading1", "std" => "", "type" => "text"), array("name" => "Home Top Feature Heading Link", "desc" => "Enter the Link URL in Heading for Home Top Feature", "id" => "colorway_slidelink1", "std" => "", "type" => "text"), array("name" => "Home Top Feature Description", "desc" => "Description for Home Top Feature", "id" => "colorway_slidedescription1", "std" => "", "type" => "textarea"), array("name" => "Home Page Settings", "type" => "heading"), array("name" => "Home Page Intro", "desc" => "Enter your heading text for home page", "id" => "inkthemes_mainheading", "std" => "", "type" => "text"), array("name" => "First Feature Image", "desc" => "Choose image for your feature column first. Optimal size 198px x 115px", "id" => "inkthemes_fimg1", "std" => "", "type" => "upload"), array("name" => "First Feature Heading", "desc" => "Enter your heading line for first column", "id" => "inkthemes_headline1", "std" => "", "type" => "text"), array("name" => "First Feature Link", "desc" => "Enter your link for feature column first", "id" => "inkthemes_link1", "std" => "", "type" => "text"), array("name" => "First Feature Content", "desc" => "Enter your feature content for column first", "id" => "inkthemes_feature1", "std" => "", "type" => "textarea"), array("name" => "Second Feature Image", "desc" => "Choose image for your feature column second. Optimal size 198px x 115px", "id" => "inkthemes_fimg2", "std" => "", "type" => "upload"), array("name" => "Second Feature Heading", "desc" => "Enter your heading line for second column", "id" => "inkthemes_headline2", "std" => "", "type" => "text"), array("name" => "Second Feature Link", "desc" => "Enter your link for feature column second", "id" => "inkthemes_link2", "std" => "", "type" => "text"), array("name" => "Second Feature Content", "desc" => "Enter your feature content for column second", "id" => "inkthemes_feature2", "std" => "", "type" => "textarea"), array("name" => "Third Feature Image", "desc" => "Choose image for your feature column thrid. Optimal size 198px x 115px", "id" => "inkthemes_fimg3", "std" => "", "type" => "upload"), array("name" => "Third Feature Heading", "desc" => "Enter your heading line for third column", "id" => "inkthemes_headline3", "std" => "", "type" => "text"), array("name" => "Third Feature Link", "desc" => "Enter your link for feature column third", "id" => "inkthemes_link3", "std" => "", "type" => "text"), array("name" => "Third Feature Content", "desc" => "Enter your feature content for third column", "id" => "inkthemes_feature3", "std" => "", "type" => "textarea"), array("name" => "Fourth Feature Image", "desc" => "Choose image for your feature column fourth. Optimal size 198px x 115px", "id" => "inkthemes_fimg4", "std" => "", "type" => "upload"), array("name" => "Fourth Feature Heading", "desc" => "Enter your heading line for fourth column", "id" => "inkthemes_headline4", "std" => "", "type" => "text"), array("name" => "Fourth Feature link", "desc" => "Enter your link for feature column fourth", "id" => "inkthemes_link4", "std" => "", "type" => "text"), array("name" => "Fourth Feature Content", "desc" => "Enter your feature content for fourth column", "id" => "inkthemes_feature4", "std" => "", "type" => "textarea"), array("name" => "Home Page Testimonial", "desc" => "Enter your text for homepage testimonial in short paragraph.", "id" => "inkthemes_testimonial", "std" => "", "type" => "textarea"), $options[] = array("name" => "Styling Options", "type" => "heading"), array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => "inkthemes_customcss", "std" => "", "type" => "textarea"), array("name" => "Footer Settings", "type" => "heading"), array("name" => "Facebook URL", "desc" => "Enter your Facebook URL if you have one", "id" => "colorway_facebook", "std" => "", "type" => "text"), array("name" => "Twitter URL", "desc" => "Enter your Twitter URL if you have one", "id" => "colorway_twitter", "std" => "", "type" => "text"), array("name" => "RSS Feed URL", "desc" => "Enter your RSS Feed URL if you have one", "id" => "colorway_rss", "std" => "", "type" => "text"), array("name" => "Linked In URL", "desc" => "Enter your Linkedin URL if you have one", "id" => "colorway_linkedin", "std" => "", "type" => "text"), array("name" => "Stumble Upon URL", "desc" => "Enter your Stumble Upon URL if you have one", "id" => "colorway_stumble", "std" => "", "type" => "text"), array("name" => "Digg URL", "desc" => "Enter your Stumble Upon URL if you have one", "id" => "colorway_digg", "std" => "", "type" => "text"));
    update_option('of_themename', $themename);
    return $options;
}
Example #22
0
function wildcat_scripts_styles()
{
    wp_enqueue_style('theme-main', get_stylesheet_directory_uri() . '/style.less', array(), '1.11');
    wp_deregister_style('mediaelement');
    wp_deregister_script('mediaelement');
    wp_deregister_script('wp-mediaelement');
}
    /**
     * Prints the alert box
     * @return void
     */
    public function print_box()
    {
        ?>
		<section class="wrap wrap--content wrap--shadow wrap--alert wrap--alert__<?php 
        echo $this->args['type'];
        ?>
" data-delay="<?php 
        echo $this->args['delay'];
        ?>
" data-auto-close="<?php 
        echo $this->args['auto_close'] ? 'true' : '';
        ?>
">
			<div class="wrap wrap--icon wrap--icon__close js-section-launch">
			      <img src="<?php 
        echo get_stylesheet_directory_uri();
        ?>
/img/icons/close.svg" alt="Close" class="icon icon--close icon--corner">
			 </div>
			<?php 
        echo $this->msg;
        ?>
	
		</section>
		<?php 
    }
function add_doctrinal_statement_JS()
{
    wp_register_script('doctrinal-statement', get_stylesheet_directory_uri() . '/JS/doctrine.min.js', array('jquery'));
    if (get_the_ID() == '8') {
        wp_enqueue_script('doctrinal-statement');
    }
}
 /**
  * Enqueue styles and scripts
  * 
  * @access public
  * @return void 
  * @since 1.0.0
  */
 public function enqueue_styles_scripts()
 {
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     wp_register_script('yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix . '.js', array('jquery'), '1.2.7', true);
     $css = file_exists(get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css') ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css';
     wp_enqueue_style('yith_wcas_frontend', $css);
 }
Example #26
0
function unity_night_ahoy()
{
    //Allow editor style.
    add_editor_style(get_stylesheet_directory_uri() . '/library/css/editor-style.css');
    // let's get language support going, if you need it
    load_theme_textdomain('unity-night', get_template_directory() . '/library/translation');
    // USE THIS TEMPLATE TO CREATE CUSTOM POST TYPES EASILY
    require_once 'library/custom-post-type.php';
    // launching operation cleanup
    add_action('init', 'unity_night_head_cleanup');
    // A better title
    add_filter('wp_title', 'rw_title', 10, 3);
    // remove WP version from RSS
    add_filter('the_generator', 'unity_night_rss_version');
    // remove pesky injected css for recent comments widget
    add_filter('wp_head', 'unity_night_remove_wp_widget_recent_comments_style', 1);
    // clean up comment styles in the head
    add_action('wp_head', 'unity_night_remove_recent_comments_style', 1);
    // clean up gallery output in wp
    add_filter('gallery_style', 'unity_night_gallery_style');
    // enqueue base scripts and styles
    add_action('wp_enqueue_scripts', 'unity_night_scripts_and_styles', 999);
    // ie conditional wrapper
    // launching this stuff after theme setup
    unity_night_theme_support();
    // adding sidebars to Wordpress (these are created in functions.php)
    add_action('widgets_init', 'unity_night_register_sidebars');
    // cleaning up random code around images
    add_filter('the_content', 'unity_night_filter_ptags_on_images');
    // cleaning up excerpt
    add_filter('excerpt_more', 'unity_night_excerpt_more');
}
Example #27
0
/**
 * understrap enqueue scripts
 *
 * @package understrap
 */
function understrap_scripts()
{
    // wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.2.8', false );
    wp_enqueue_style('understrap-theme', get_stylesheet_directory_uri() . '/css/theme.css', array(), '0.2.8', false);
    // wp_enqueue_script('jquery');
    wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.js', array(), '2.1.4', false);
    wp_enqueue_script('understrap-navigation', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true);
    wp_enqueue_script('understrap-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);
    // angular relations
    wp_enqueue_script('angular', get_template_directory_uri() . '/js/angular.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-ui-router', '//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.17/angular-ui-router.min.js', array(), '0.2.17', true);
    wp_enqueue_script('angular-animate', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-animate.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-sanitize', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-sanitize.min.js', array(), '1.4.9', true);
    wp_enqueue_script('ui-bootstrap', '//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.1.2.js', array(), '1.1.2', true);
    // Angualr APP
    wp_enqueue_script('app', get_template_directory_uri() . '/js/app.js', array(), null, true);
    // Custom JS
    wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', array(), null, true);
    // NON SASS CSS
    wp_enqueue_style('animate', get_stylesheet_directory_uri() . '/css/animate.css', array(), '0.2.8', false);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_active_sidebar('hero')) {
        wp_enqueue_style('understrap-carousel-style', get_template_directory_uri() . '/css/owl.carousel.css', array(), '20024', false);
        wp_enqueue_script('understrap-carousel-script', get_template_directory_uri() . '/js/owl.carousel.min.js', array(), '20024', true);
    }
}
function glow_script()
{
    // register your script location, dependencies and version
    wp_register_script('custom_script', get_stylesheet_directory_uri() . '/js/glowbutton.js', array('jquery'), '1.0');
    // enqueue the script
    wp_enqueue_script('custom_script');
}
Example #29
0
function themeInit()
{
    // allow editor style
    add_editor_style(get_stylesheet_directory_uri() . '/library/css/editor-style.css');
    // let's get language support going, if you need it
    load_theme_textdomain('bonestheme', get_template_directory() . '/library/translation');
    // a better title (library/bones.php)
    add_filter('wp_title', 'rw_title', 10, 3);
    // remove wp version from rss (library/bones.php)
    add_filter('the_generator', 'bones_rss_version');
    // remove pesky injected css for recent comments widget (library/bones.php)
    add_filter('wp_head', 'bones_remove_wp_widget_recent_comments_style', 1);
    // clean up comment styles in the head (library/bones.php)
    add_action('wp_head', 'bones_remove_recent_comments_style', 1);
    // clean up gallery output in wp (library/bones.php)
    add_filter('gallery_style', 'bones_gallery_style');
    // launching this stuff after theme setup (library/bones.php)
    bones_theme_support();
    // cleaning up random code around images
    add_filter('the_content', 'bones_filter_ptags_on_images');
    // cleaning up excerpt
    add_filter('excerpt_more', 'bones_excerpt_more');
    // add filter to prevent "slack.png" from occupying the "slack" slug
    add_filter('wp_unique_post_slug_is_bad_attachment_slug', '__return_true');
}
Example #30
0
function theme_init()
{
    global $pagenow;
    // Assets version - on deploy we'll bump the version number
    if (get_option('asset_version') !== false) {
        // Update version using URL param (post deploy)
        if (isset($_GET['post_deploy_hook']) && $_GET['post_deploy_hook'] == "j2r39fwj") {
            update_option('asset_version', get_option('asset_version') + 0.1);
            plant_clearCache();
        }
        $asset_version = get_option('asset_version');
    } else {
        add_option('asset_version', 0.1, 'yes');
        $asset_version = get_option('asset_version');
    }
    // EOF - Assets version - on deploy we'll bump the version number
    if (!is_admin() && 'wp-login.php' !== $pagenow) {
        $themeUrl = get_stylesheet_directory_uri();
        wp_register_script('modernizr', $themeUrl . (ENVIRONMENT !== 'local' ? '/js/modernizr-custom.min.js' : '/js/modernizr-custom.js'), false, $asset_version, false);
        wp_enqueue_script('modernizr');
        wp_deregister_script('jquery');
        wp_register_script('jquery', $themeUrl . (ENVIRONMENT !== 'local' ? '/js/vendors.min.js' : '/js/vendors.js'), false, $asset_version, true);
        wp_enqueue_script('jquery');
        wp_register_script('site', $themeUrl . (ENVIRONMENT !== 'local' ? '/js/site.min.js' : '/js/site.js'), array('jquery'), $asset_version, true);
        wp_enqueue_script('site');
        wp_register_style('style', $themeUrl . (ENVIRONMENT === 'local' ? '/style.min.css' : '/style.css'), array(), $asset_version);
        wp_enqueue_style('style');
        if (defined('BUGHERD_PROJECT_KEY')) {
            add_action('wp_head', 'add_bugherd');
        }
        add_action('wp_head', 'add_jsconstants');
    }
}