示例#1
0
function cwp_theme_setup()
{
    add_theme_support('menus');
    register_nav_menu('primary', __('Primary', 'basejump'));
    /**
     * Make theme available for translation
     * Translations can be filed in the /languages/ directory
     * If you're building a theme based on _s, use a find and replace
     * to change '_s' to the name of your theme in all the template files
     */
    load_theme_textdomain('basejump', get_template_directory() . '/languages');
    $locale = get_locale();
    $locale_file = get_template_directory() . "/languages/{$locale}.php";
    if (is_readable($locale_file)) {
        require_once $locale_file;
    }
    /**
     * Add default posts and comments RSS feed links to head
     */
    add_theme_support('automatic-feed-links');
    core_functions::favicon();
    add_theme_support('post-thumbnails');
    add_theme_support('automatic-feed-links');
    add_image_size('icon-60', 60, 60, true);
    add_image_size('icon-100', 100, 100, true);
    add_image_size('icon-40', 40, 40, true);
    /**
     * default widgets
     */
}
示例#2
0
 public static function theme_setup()
 {
     self::jquery();
     self::shortcodes_in_widgets();
     self::remove_head_meta();
     self::remove_update_notification();
     self::theme_images();
     add_theme_support('post-thumbnails');
     add_theme_support('automatic-feed-links');
     core_functions::favicon();
     core_functions::no_smiley_face();
     core_functions::all_post_formats();
 }
wp_register_script('masonry', $js_masonry, array('jquery'));
wp_register_script('tiptip', $js_tiptip, array('jquery'));
wp_register_script('flex-slider', get_stylesheet_directory_uri() . '/library/js/jquery.flexslider-min.js', array('jquery'));
/**
 * Main theme js scripts
 */
if (!is_admin()) {
    cwp::jquery();
    wp_enqueue_script('modernizer', get_template_directory_uri() . '/library/js/modernizr.custom.48627.js', array('jquery'));
    wp_enqueue_script('theme-scripts', get_template_directory_uri() . '/library/js/scripts.js');
    wp_enqueue_script('media-queries', get_template_directory_uri() . '/library/js/css3-mediaqueries.js');
    wp_enqueue_script('fitvids', get_template_directory_uri() . '/library/js/jquery.fitvids.js', array('jquery'));
    //wp_enqueue_script('less', 'http://lesscss.googlecode.com/files/less-1.0.21.min.js', array('jquery'));
    wp_enqueue_script('hf5', $js_h5f);
}
core_functions::favicon();
add_theme_support('post-thumbnails');
add_theme_support('automatic-feed-links');
//add_editor_style();
//cwp::theme_images(); //adds  image sizes slideshow-[720,960,1200,1560], icon-[40,60,100]
add_image_size('icon-60', 60, 60, true);
add_image_size('icon-100', 100, 100, true);
add_image_size('icon-40', 40, 40, true);
/*
 * footer widgets
 */
cwp::add_widget('info 1', 'info-1', 'Display widgets in the first footer box');
cwp::add_widget('info 2', 'info-2', 'Display widgets in the second footer box');
cwp::add_widget('info 3', 'info-3', 'Display widgets in the third footer box');
cwp::add_widget('info 4', 'info-4', 'Display widgets in the fourth footer box');
cwp::add_widget('info 5', 'info-5', 'Display widgets in the fifth footer box');