Пример #1
0
/**
 * Run the Engine
 */
function calibrefx_initializing()
{
    global $calibrefx;
    $calibrefx = Calibrefx::get_instance();
    // Add theme support
    add_theme_support('html5', array('comment-list', 'comment-form', 'search-form'));
    add_theme_support('menus');
    add_theme_support('title-tag');
    add_theme_support('automatic-feed-links');
    add_theme_support('post-thumbnails');
    add_theme_support('post-formats', array('aside', 'status', 'image', 'video', 'audio', 'quote', 'link', 'gallery', 'chat'));
    if (is_child_theme()) {
        add_filter('calibrefx_helpers_to_include', 'childfx_load_extension', 10, 2);
        add_filter('calibrefx_shortcodes_to_include', 'childfx_load_extension', 15, 2);
        add_filter('calibrefx_hooks_to_include', 'childfx_load_extension', 20, 2);
        add_filter('calibrefx_widgets_to_include', 'childfx_load_extension', 25, 2);
        add_filter('calibrefx_library_path', 'childfx_load_library');
    }
    //Load every active module
    Calibrefx::load_modules();
    /*
     * This theme styles the visual editor to resemble the theme style,
     * specifically font, colors, icons, and column width.
     */
    add_editor_style(array('assets/css/editor-style.css', 'assets/css/cfxicons.css', 'assets/css/font-awesome.css', 'assets/css/genericons.css', calibrefx_fonts_url()));
    // Run the engine
    $calibrefx->run();
    /** Run the calibrefx_post_init hook */
    do_action('calibrefx_post_init');
}
Пример #2
0
/**
 * Load default calibrefx styles
 *
 * since @1.0
 */
function calibrefx_load_styles()
{
    global $wp_styles;
    wp_enqueue_style('font-awesome');
    wp_enqueue_style('calibrefx-icons');
    wp_enqueue_style('genericons');
    wp_enqueue_style('jquery-superfish');
    wp_enqueue_style('calibrefx-shortcodes');
    $calibrefx_default_style = get_theme_support('calibrefx-default-styles');
    if (!is_child_theme()) {
        wp_enqueue_style('calibrefx-fonts', calibrefx_fonts_url(), array(), null);
    }
    wp_enqueue_style('twitter-bootstrap');
    wp_enqueue_style('calibrefx-style');
    wp_enqueue_style('calibrefx-child-style', get_stylesheet_uri());
}