Ejemplo n.º 1
0
/**
 * The theme setup function.  This function sets up support for various WordPress and framework functionality.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function stargazer_theme_setup()
{
    /* Load files. */
    require_once trailingslashit(get_template_directory()) . 'inc/stargazer.php';
    require_once trailingslashit(get_template_directory()) . 'inc/customize.php';
    /* Load widgets. */
    add_theme_support('hybrid-core-widgets');
    /* Theme layouts. */
    add_theme_support('theme-layouts', array('1c' => __('1 Column Wide', 'stargazer'), '1c-narrow' => __('1 Column Narrow', 'stargazer'), '2c-l' => __('2 Columns: Content / Sidebar', 'stargazer'), '2c-r' => __('2 Columns: Sidebar / Content', 'stargazer')), array('default' => is_rtl() ? '2c-r' : '2c-l'));
    /* Load stylesheets. */
    add_theme_support('hybrid-core-styles', array('stargazer-fonts', 'one-five', 'gallery', 'stargazer-mediaelement', 'parent', 'style'));
    /* Enable custom template hierarchy. */
    add_theme_support('hybrid-core-template-hierarchy');
    /* The best thumbnail/image script ever. */
    add_theme_support('get-the-image');
    /* Breadcrumbs. Yay! */
    add_theme_support('breadcrumb-trail');
    /* Pagination. */
    add_theme_support('loop-pagination');
    /* Nicer [gallery] shortcode implementation. */
    add_theme_support('cleaner-gallery');
    /* Better captions for themes to style. */
    add_theme_support('cleaner-caption');
    /* Automatically add feed links to <head>. */
    add_theme_support('automatic-feed-links');
    /* Whistles plugin. */
    add_theme_support('whistles', array('styles' => true));
    /* Post formats. */
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    /* Editor styles. */
    add_editor_style(stargazer_get_editor_styles());
    /* Handle content width for embeds and images. */
    // Note: this is the largest size based on the theme's various layouts.
    hybrid_set_content_width(1025);
}
Ejemplo n.º 2
0
/**
 * The theme setup function.  This function sets up support for various WordPress and framework functionality.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function stargazer_theme_setup()
{
    $stargazer_dir = trailingslashit(get_template_directory());
    // Load files.
    require_once $stargazer_dir . 'inc/stargazer.php';
    require_once $stargazer_dir . 'inc/template.php';
    require_once $stargazer_dir . 'inc/customize.php';
    // Theme layouts.
    add_theme_support('theme-layouts', array('default' => '2c-l'));
    // Enable custom template hierarchy.
    add_theme_support('hybrid-core-template-hierarchy');
    // The best thumbnail/image script ever.
    add_theme_support('get-the-image');
    // Breadcrumbs. Yay!
    add_theme_support('breadcrumb-trail');
    // Nicer [gallery] shortcode implementation.
    add_theme_support('cleaner-gallery');
    // Automatically add feed links to <head>.
    add_theme_support('automatic-feed-links');
    // Support selective refresh of widgets.
    add_theme_support('customize-selective-refresh-widgets');
    // Whistles plugin.
    add_theme_support('whistles', array('styles' => true));
    // Post formats.
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    // Adds custom logo support
    add_theme_support('custom-logo', array('height' => 78, 'flex-width' => true));
    // Editor styles.
    add_editor_style(stargazer_get_editor_styles());
    // Handle content width for embeds and images.
    // Note: this is the largest size based on the theme's various layouts.
    hybrid_set_content_width(1025);
}