Ejemplo n.º 1
0
 function blogolife_body_classes($classes)
 {
     global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
     // Adds a class of custom-background-image to sites with a custom background image.
     if (get_background_image()) {
         $classes[] = 'custom-background-image';
     }
     // Adds a class of group-blog to sites with more than 1 published author.
     if (is_multi_author()) {
         $classes[] = 'group-blog';
     }
     // Adds a class of theme version.
     $classes[] = 'blogolife-' . str_replace('.', '_', blogolife_get_theme_version());
     // Adds a class of user browser.
     if ($is_lynx) {
         $classes[] = 'lynx';
     } elseif ($is_gecko) {
         $classes[] = 'gecko';
     } elseif ($is_opera) {
         $classes[] = 'opera';
     } elseif ($is_NS4) {
         $classes[] = 'ns4';
     } elseif ($is_safari) {
         $classes[] = 'safari';
     } elseif ($is_chrome) {
         $classes[] = 'chrome';
     } elseif ($is_IE) {
         $classes[] = 'ie';
     } else {
         $classes[] = 'unknown';
     }
     // Adds a class for iphone.
     if ($is_iphone) {
         $classes[] = 'iphone';
     }
     return $classes;
 }
Ejemplo n.º 2
0
 function blogolife_scripts()
 {
     // Load our main stylesheet.
     wp_enqueue_style('blogolife-style', get_stylesheet_uri(), array('blogolife-vendors'), blogolife_get_theme_version(), 'all');
     // Load the Vendors specific stylesheet.
     wp_enqueue_style('blogolife-vendors', get_template_directory_uri() . '/assets/styles/vendors.min.css', array(), blogolife_get_theme_version(), 'all');
     // Add custom fonts, used in the main stylesheet.
     wp_enqueue_style('blogolife-google-fonts-roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,700,700italic,900italic,900,500italic,500,100italic,100', array('blogolife-style'), blogolife_get_theme_version(), 'all');
     // Add custom fonts, used in the main stylesheet.
     wp_enqueue_style('blogolife-google-fonts-arimo', 'https://fonts.googleapis.com/css?family=Arimo:400,700&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek', array('blogolife-style'), blogolife_get_theme_version(), 'all');
     // Load jQuery
     wp_enqueue_script('jquery');
     // Load the Vendors specific javascripts.
     wp_enqueue_script('blogolife-vendors', get_template_directory_uri() . '/assets/scripts/vendors.min.js', array('jquery'), blogolife_get_theme_version(), true);
     // Load our javascripts
     wp_enqueue_script('blogolife-main', get_template_directory_uri() . '/assets/scripts/blogolife.js', array('blogolife-vendors'), blogolife_get_theme_version(), true);
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
 }
Ejemplo n.º 3
0
function blogolife_customize_preview_js()
{
    wp_enqueue_script('blogolife-customize-preview', get_template_directory_uri() . '/assets/scripts/customize-preview.js', array('customize-preview'), blogolife_get_theme_version(), true);
}