Ejemplo n.º 1
0
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which runs
 * before the init hook. The init hook is too late for some features, such as indicating
 * support post thumbnails.
 */
function omega_theme_setup()
{
    //remove_theme_mods();
    /* Load omega functions */
    require get_template_directory() . '/lib/functions/hooks.php';
    add_theme_support('title-tag');
    /* Load scripts. */
    add_theme_support('omega-scripts', array('comment-reply'));
    add_theme_support('post-thumbnails');
    add_theme_support('omega-theme-settings');
    add_theme_support('omega-content-archives');
    /* implement editor styling, so as to make the editor content match the resulting post output in the theme. */
    add_editor_style();
    /* Support pagination instead of prev/next links. */
    add_theme_support('loop-pagination');
    /* Add default posts and comments RSS feed links to <head>.  */
    add_theme_support('automatic-feed-links');
    /* Enable wraps */
    add_theme_support('omega-wraps');
    /* Enable custom post */
    add_theme_support('omega-custom-post');
    /* Enable custom css */
    add_theme_support('omega-custom-css');
    /* Enable custom logo */
    add_theme_support('omega-custom-logo');
    /* Enable child themes page */
    add_theme_support('omega-child-page');
    /* Handle content width for embeds and images. */
    omega_set_content_width(700);
}
Ejemplo n.º 2
0
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which runs
 * before the init hook. The init hook is too late for some features, such as indicating
 * support post thumbnails.
 */
function omega_theme_setup()
{
    /* Load omega functions */
    require get_template_directory() . '/lib/hooks.php';
    /* The best thumbnail/image script ever. */
    add_theme_support('get-the-image');
    /* Load scripts. */
    add_theme_support('omega-scripts', array('comment-reply'));
    add_theme_support('omega-theme-settings');
    add_theme_support('omega-content-archives');
    /* Enable custom template hierarchy. */
    //add_theme_support( 'omega-template-hierarchy' );
    /* Enable theme layouts (need to add stylesheet support). */
    add_theme_support('theme-layouts', array('1c' => __('Content', 'omega'), '2c-l' => __('Content / Sidebar', 'omega'), '2c-r' => __('Sidebar / Content', 'omega')), array('default' => is_rtl() ? '2c-r' : '2c-l', 'customize' => true));
    /* implement editor styling, so as to make the editor content match the resulting post output in the theme. */
    add_editor_style();
    /* Support pagination instead of prev/next links. */
    add_theme_support('loop-pagination');
    /* Better captions for themes to style. */
    add_theme_support('cleaner-caption');
    /* Add default posts and comments RSS feed links to <head>.  */
    add_theme_support('automatic-feed-links');
    /* Enable wraps */
    add_theme_support('omega-wraps');
    /* Enable custom post */
    add_theme_support('omega-custom-post');
    /* Enable custom css */
    add_theme_support('omega-custom-css');
    /* Enable custom logo */
    add_theme_support('omega-custom-logo');
    /* Enable child themes page */
    add_theme_support('omega-child-page');
    /* Handle content width for embeds and images. */
    omega_set_content_width(640);
}
Ejemplo n.º 3
0
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which runs
 * before the init hook. The init hook is too late for some features, such as indicating
 * support post thumbnails.
 */
function omega_theme_setup()
{
    /* The best thumbnail/image script ever. */
    add_theme_support('get-the-image');
    /* Load scripts. */
    add_theme_support('omega-scripts', array('comment-reply'));
    /* Load shortcodes. */
    add_theme_support('omega-shortcodes');
    add_theme_support('omega-theme-settings', array('about'));
    /* Enable custom template hierarchy. */
    //add_theme_support( 'omega-template-hierarchy' );
    /* Enable theme layouts (need to add stylesheet support). */
    add_theme_support('theme-layouts', array('1c' => __('Content', 'omega'), '2c-l' => __('Content / Sidebar', 'omega'), '2c-r' => __('Sidebar / Content', 'omega')), array('default' => is_rtl() ? '2c-r' : '2c-l', 'customizer' => true));
    /* Add default theme settings */
    add_filter("omega_default_theme_settings", 'omega_set_default_theme_settings');
    /* implement editor styling, so as to make the editor content match the resulting post output in the theme. */
    add_editor_style();
    /* Enable responsive support */
    add_theme_support('omega-deprecated');
    /* Support pagination instead of prev/next links. */
    add_theme_support('loop-pagination');
    /* Better captions for themes to style. */
    add_theme_support('cleaner-caption');
    /* Add default posts and comments RSS feed links to <head>.  */
    add_theme_support('automatic-feed-links');
    /* Enable wraps */
    add_theme_support('omega-wraps');
    /* Enable custom css */
    add_theme_support('omega-custom-css');
    /* Enable custom logo */
    add_theme_support('omega-custom-logo');
    /* Enable child themes page */
    add_theme_support('omega-child-page');
    /* Handle content width for embeds and images. */
    omega_set_content_width(640);
    add_action('wp_enqueue_scripts', 'omega_scripts');
    add_action('wp_head', 'omega_styles');
    add_action('wp_head', 'omega_header_scripts');
    add_action('wp_footer', 'omega_footer_scripts');
    /* Header actions. */
    add_action("omega_header", 'omega_header_markup_open', 5);
    add_action("omega_header", 'omega_branding');
    add_action("omega_header", 'omega_header_markup_close', 15);
    /* footer insert to the footer. */
    add_action("omega_footer", 'omega_footer_markup_open', 5);
    add_action("omega_footer", 'omega_footer_insert');
    add_action("omega_footer", 'omega_footer_markup_close', 15);
    /* Load the primary menu. */
    add_action("omega_before_header", 'omega_get_primary_menu');
    /* Add the title, byline, and entry meta before and after the entry.*/
    add_action("omega_before_entry", 'omega_entry_header');
    add_action("omega_entry", 'omega_entry');
    add_action("omega_singular_entry", 'omega_singular_entry');
    add_action("omega_after_entry", 'omega_entry_footer');
    add_action("omega_singular-page_after_entry", 'omega_page_entry_meta');
    /* Add the primary sidebars after the main content. */
    add_action("omega_after_main", 'omega_primary_sidebar');
    /* Filter the sidebar widgets. */
    add_filter('sidebars_widgets', 'omega_disable_sidebars');
    add_action('template_redirect', 'omega_one_column');
    /* Allow developers to filter the default sidebar arguments. */
    add_filter("omega_sidebar_defaults", 'omega_sidebar_defaults');
    add_filter('omega_footer_insert', 'omega_default_footer_insert');
    // add disqus compatibility
    if (function_exists('dsq_comments_template')) {
        remove_filter('comments_template', 'dsq_comments_template');
        add_filter('comments_template', 'dsq_comments_template', 12);
        // You can use any priority higher than '10'
    }
}