Пример #1
0
 function hoot_enqueue_admin_widget_styles_scripts($hook)
 {
     /* Load hoot widgets for SiteOrigin Page Builder plugin on Edit screens */
     $widgetload = ('post.php' == $hook || 'post-new.php' == $hook) && (defined('SITEORIGIN_PANELS_VERSION') && version_compare(SITEORIGIN_PANELS_VERSION, '2.0') >= 0) ? true : false;
     if ('widgets.php' == $hook || $widgetload) {
         /* Enqueue Styles */
         wp_enqueue_style('hoot-font-awesome');
         $style_uri = hoot_locate_style(trailingslashit(HOOT_CSS) . 'admin-widgets');
         wp_enqueue_style('hoot-admin-widgets', $style_uri, array(), HOOT_VERSION);
         /* Enqueue Scripts */
         // Load admin-widgets in footer to maintain script heirarchy
         $script_uri = hoot_locate_script(trailingslashit(HOOT_JS) . 'admin-widgets');
         wp_enqueue_script('hoot-admin-widgets', $script_uri, array('jquery'), HOOT_VERSION, true);
     }
 }
Пример #2
0
/**
 * Registers the framework stylesheet files.  The function does not load the stylesheet.  
 * It merely registers it with WordPress.
 *
 * @since 1.0.0
 * @access public
 * @return void
 */
function hoot_admin_register_styles()
{
    $style_uri = hoot_locate_style(trailingslashit(HOOT_CSS) . 'font-awesome');
    wp_register_style('hoot-font-awesome', $style_uri, false, '4.5.0');
}
Пример #3
0
/**
 * Load stylesheets for the front end.
 *
 * @since 1.0
 * @access public
 * @return void
 */
function hoot_base_enqueue_styles()
{
    /* Load Google Fonts if 'google-fonts' is active. */
    if (current_theme_supports('google-fonts')) {
        wp_enqueue_style('hoot-google-fonts', hoot_google_fonts_enqueue_url(), array(), null);
    }
    /* Load lightSlider style if 'light-slider' is active. */
    if (current_theme_supports('light-slider')) {
        $style_uri = hoot_locate_style('css/lightSlider');
        wp_enqueue_style('lightSlider', $style_uri, false, '1.1.0');
    }
    /* Load gallery style if 'cleaner-gallery' is active. */
    if (current_theme_supports('cleaner-gallery')) {
        $style_uri = hoot_locate_style(trailingslashit(HOOT_CSS) . 'gallery');
        wp_enqueue_style('gallery', $style_uri);
    }
    /* Load gallery styles if Jetpack 'tiled-gallery' module is active */
    if (class_exists('Jetpack') && Jetpack::is_module_active('tiled-gallery')) {
        $style_uri = hoot_locate_style(trailingslashit(HOOT_CSS) . 'gallery');
        wp_enqueue_style('gallery', $style_uri);
        $style_uri = hoot_locate_style('css/jetpack');
        wp_enqueue_style('hoot-jetpack', $style_uri);
    }
    /* Load font awesome if 'font-awesome' is active. */
    if (current_theme_supports('font-awesome')) {
        $style_uri = hoot_locate_style(trailingslashit(HOOT_CSS) . 'font-awesome');
        wp_enqueue_style('font-awesome', $style_uri, false, '4.5.0');
    }
}