当前位置: 首页>>代码示例>>PHP>>正文


PHP hybrid_set_content_width函数代码示例

本文整理汇总了PHP中hybrid_set_content_width函数的典型用法代码示例。如果您正苦于以下问题:PHP hybrid_set_content_width函数的具体用法?PHP hybrid_set_content_width怎么用?PHP hybrid_set_content_width使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hybrid_set_content_width函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lifelog_setup

/**
 * General Setup
 * @since 0.1.0
 */
function lifelog_setup()
{
    /* === DEBUG === */
    $debug_args = array('mobile' => 0, 'no-js' => 0, 'media-queries' => 1);
    //add_theme_support( 'tamatebako-debug', $debug_args );
    /* === Post Formats === */
    $post_formats_args = array('aside', 'image', 'gallery', 'link', 'quote', 'status', 'video', 'audio', 'chat');
    add_theme_support('post-formats', $post_formats_args);
    /* Remove Infinity */
    remove_filter('hybrid_aside_infinity', 'tamatebako_aside_infinity');
    /* === Theme Layouts === */
    $layouts = array('content' => 'Content');
    $layouts_args = array('default' => 'content', 'customize' => false, 'post_meta' => false);
    add_theme_support('theme-layouts', $layouts, $layouts_args);
    /* === Register Menus === */
    $menus_args = array("primary" => lifelog_string('menu-primary-name'));
    add_theme_support('tamatebako-menus', $menus_args);
    /* Custom Header */
    $header_args = array('width' => 160, 'height' => 160, 'admin-head-callback' => 'lifelog_custom_header_admin_head_cb', 'header-text' => false);
    add_theme_support('custom-header', $header_args);
    /* === Load Stylesheet === */
    $style_args = array('theme-open-sans-font', 'dashicons', 'theme-reset', 'theme-menus', 'parent', 'style', 'media-queries');
    add_theme_support('hybrid-core-styles', $style_args);
    /* === Editor Style === */
    $editor_css = array('css/reset.min.css', 'style.css', tamatebako_google_open_sans_font_url());
    add_editor_style($editor_css);
    /* === Customizer Mobile View === */
    add_theme_support('tamatebako-customize-mobile-view');
    /* === Set Content Width === */
    hybrid_set_content_width(650);
}
开发者ID:jikoyster,项目名称:test-wp,代码行数:35,代码来源:functions.php

示例2: stargazer_theme_setup

/**
 * 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);
}
开发者ID:htmELS,项目名称:stargazer,代码行数:42,代码来源:functions.php

示例3: compass_setup

/**
 * 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 for post thumbnails.
 *
 * @since   1.0.0
 * @return  void
 */
function compass_setup()
{
    // Add Support for Theme layouts.
    add_theme_support('theme-layouts', array('1c' => __('1 Column Wide', 'compass'), '1c-narrow' => __('1 Column Narrow', 'compass'), '2c-l' => __('2 Columns: Content / Sidebar', 'compass'), '2c-r' => __('2 Columns: Sidebar / Content', 'compass')), array('default' => is_rtl() ? '2c-r' : '2c-l'));
    // Handle content width for embeds and images.
    hybrid_set_content_width(1140);
    // Add default posts and comments RSS feed links to head.
    add_theme_support('automatic-feed-links');
    // Load theme styles.
    add_theme_support('hybrid-core-styles', array('google-fonts', 'parent', 'style'));
    // Add navigation menus.
    register_nav_menu('after-header', _x('After Header Menu', 'nav menu location', 'compass'));
    $formats = array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat');
    // Add support for Post Formats.
    add_theme_support('post-formats', $formats);
    // Add support for Post Thumbnails on posts and pages.
    add_theme_support('post-thumbnails');
    // Add support for easer image usage.
    add_theme_support('get-the-image');
    // Add a nicer [gallery] shortcode implementation.
    add_theme_support('cleaner-gallery');
    // Add better captions for themes to style.
    add_theme_support('cleaner-caption');
    // Add support for loop pagination.
    add_theme_support('loop-pagination');
    // Add support for flagship footer widgets.
    add_theme_support('flagship-footer-widgets', 3);
}
开发者ID:stedy67,项目名称:Compass,代码行数:38,代码来源:functions.php

示例4: hybrid_base_theme_setup

/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function hybrid_base_theme_setup()
{
    /* Theme layouts. */
    add_theme_support('theme-layouts', array('1c' => __('1 Column', 'hybrid-base'), '2c-l' => __('2 Columns: Content / Sidebar', 'hybrid-base'), '2c-r' => __('2 Columns: Sidebar / Content', 'hybrid-base')), array('default' => is_rtl() ? '2c-r' : '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');
    /* 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');
    /* Post formats. */
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    add_theme_support('foundation-base');
    add_theme_support('foundation-topbar');
    add_theme_support('foundation-offcanvas');
    /* Editor styles. */
    add_editor_style(hybrid_base_get_editor_styles());
    /* Handle content width for embeds and images. */
    hybrid_set_content_width(1280);
}
开发者ID:bschmidttraub,项目名称:hybrid-foundation,代码行数:36,代码来源:functions.php

示例5: prototype_theme_setup

/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since 0.1.0
 */
function prototype_theme_setup()
{
    /* Get action/filter hook prefix. */
    $prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-menus', array('primary', 'secondary', 'subsidiary'));
    add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'header', 'subsidiary', 'after-singular'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-theme-settings', array('about', 'footer'));
    add_theme_support('hybrid-core-drop-downs');
    add_theme_support('hybrid-core-seo');
    add_theme_support('hybrid-core-template-hierarchy');
    /* Add theme support for framework extensions. */
    add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r', '3c-l', '3c-r', '3c-c'));
    add_theme_support('post-stylesheets');
    add_theme_support('dev-stylesheet');
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('breadcrumb-trail');
    add_theme_support('cleaner-gallery');
    /* Add theme support for WordPress features. */
    add_theme_support('automatic-feed-links');
    add_custom_background();
    /* Add the search form to the secondary menu. */
    add_action("{$prefix}_close_menu_secondary", 'get_search_form');
    /* Embed width/height defaults. */
    add_filter('embed_defaults', 'prototype_embed_defaults');
    /* Filter the sidebar widgets. */
    add_filter('sidebars_widgets', 'prototype_disable_sidebars');
    add_action('template_redirect', 'prototype_one_column');
    /* Set the content width. */
    hybrid_set_content_width(600);
}
开发者ID:rdbartlett,项目名称:kellyspencer.co.nz,代码行数:40,代码来源:functions.php

示例6: mirai_setup_theme

function mirai_setup_theme()
{
    Mirai_LinkedList::initialize();
    Mirai_Feeds::initialize();
    $prefix = hybrid_get_prefix();
    add_theme_support('hybrid-core-menus', array('primary'));
    add_theme_support('hybrid-core-sidebars', array('primary', 'subsidiary'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-theme-settings', array('about', 'footer'));
    add_theme_support('hybrid-core-drop-downs');
    add_theme_support('hybrid-core-template-hierarchy');
    add_theme_support('get-the-image');
    add_theme_support('automatic-feed-links');
    add_theme_support('post-formats', array('aside', 'link'));
    add_theme_support('loop-pagination ');
    hybrid_set_content_width(600);
    add_action("{$prefix}_inside_header", 'mirai_get_primary_menu');
    add_action("{$prefix}_after_content", 'mirai_get_navigation');
    add_action("{$prefix}_after_single", 'mirai_get_navigation');
    add_action("{$prefix}_header", 'hybrid_site_title');
    add_action("{$prefix}_header", 'hybrid_site_description');
    add_action("{$prefix}_before_entry", 'mirai_entry_title');
    add_action("{$prefix}_before_entry", 'mirai_entry_date');
    add_action("{$prefix}_after_entry", 'mirai_entry_meta');
    add_action("{$prefix}_before_comment", 'mirai_comment_header');
    add_action("{$prefix}_after_comment", 'mirai_comment_meta');
    add_action("{$prefix}_footer", 'mirai_footer');
    add_general_actions();
    add_general_filters();
}
开发者ID:ryanmr,项目名称:mirai-theme,代码行数:31,代码来源:functions.php

示例7: compass_setup

/**
 * 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 for post thumbnails.
 *
 * @since   1.0.0
 * @return  void
 */
function compass_setup()
{
    // http://themehybrid.com/docs/theme-layouts
    add_theme_support('theme-layouts', array('1c' => __('1 Column Wide', 'compass'), '1c-narrow' => __('1 Column Narrow', 'compass'), '2c-l' => __('2 Columns: Content / Sidebar', 'compass'), '2c-r' => __('2 Columns: Sidebar / Content', 'compass')), array('default' => is_rtl() ? '2c-r' : '2c-l'));
    // http://themehybrid.com/docs/hybrid_set_content_width
    hybrid_set_content_width(1140);
    // http://codex.wordpress.org/Automatic_Feed_Links
    add_theme_support('automatic-feed-links');
    // http://themehybrid.com/docs/hybrid-core-styles
    add_theme_support('hybrid-core-styles', array('style', 'google-fonts'));
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Site-Logo
    add_theme_support('site-logo');
    // https://developer.wordpress.org/themes/functionality/navigation-menus/
    register_nav_menus(array('primary' => _x('Primary Menu', 'nav menu location', 'compass'), 'secondary' => _x('Secondary Menu', 'nav menu location', 'compass')));
    // https://developer.wordpress.org/themes/functionality/post-formats/
    add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
    // https://github.com/justintadlock/breadcrumb-trail
    add_theme_support('breadcrumb-trail');
    // https://github.com/justintadlock/get-the-image
    add_theme_support('get-the-image');
    // http://themehybrid.com/docs/template-hierarchy
    add_theme_support('hybrid-core-template-hierarchy');
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Author-Box
    add_theme_support('flagship-author-box');
    // https://github.com/FlagshipWP/flagship-library/wiki/Flagship-Footer-Widgets
    add_theme_support('flagship-footer-widgets', 3);
}
开发者ID:flagshipwp,项目名称:compass,代码行数:37,代码来源:functions.php

示例8: stargazer_theme_setup

/**
 * 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);
}
开发者ID:KL-Kim,项目名称:my-theme,代码行数:40,代码来源:functions.php

示例9: socially_awkward_theme_setup

/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since  0.1.0
 * @access public
 * @return void
 */
function socially_awkward_theme_setup()
{
    /* Load includes. */
    require_once trailingslashit(get_template_directory()) . 'inc/hybrid-core-x.php';
    require_once trailingslashit(get_template_directory()) . 'inc/socially-awkward.php';
    /* Load scripts. */
    add_theme_support('hybrid-core-scripts', array('comment-reply', 'mobile-toggle'));
    /* Load styles. */
    add_theme_support('hybrid-core-styles', array('socially-awkward-fonts', 'one-five', 'gallery', 'theme-mediaelement', 'parent', 'style'));
    /* Load shortcodes. */
    add_theme_support('hybrid-core-shortcodes');
    /* Enable custom template hierarchy. */
    add_theme_support('hybrid-core-template-hierarchy');
    /* Allow per-post stylesheets. */
    add_theme_support('post-stylesheets');
    /* The best thumbnail/image script ever. */
    add_theme_support('get-the-image');
    /* 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');
    /* Post formats. */
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    /* Handle content width for embeds and images. */
    hybrid_set_content_width(960);
}
开发者ID:AngryPerm,项目名称:socially-awkward,代码行数:36,代码来源:functions.php

示例10: genbu_setup

/**
 * General Setup
 * @since 0.1.0
 */
function genbu_setup()
{
    /* === DEBUG === */
    $debug_args = array('mobile' => 0, 'media-queries' => 0);
    //add_theme_support( 'tamatebako-debug', $debug_args );
    /* === Post Formats === */
    $post_formats_args = array('aside', 'image', 'gallery', 'link', 'quote', 'status', 'video', 'audio', 'chat');
    add_theme_support('post-formats', $post_formats_args);
    /* === Theme Layouts === */
    $layouts = array('content' => genbu_string('layout-c'), 'content-sidebar1' => genbu_string('layout-c-s1'), 'sidebar1-content' => genbu_string('layout-s1-c'), 'sidebar2-content' => genbu_string('layout-s2-c'), 'content-sidebar2' => genbu_string('layout-c-s2'), 'sidebar2-content-sidebar1' => genbu_string('layout-s2-c-s1'), 'sidebar2-sidebar1-content' => genbu_string('layout-s2-s1-c'), 'content-sidebar1-sidebar2' => genbu_string('layout-c-s1-s2'), 'sidebar1-content-sidebar2' => genbu_string('layout-s1-c-s2'));
    $layouts_args = array('default' => 'sidebar2-content-sidebar1', 'customize' => true, 'post_meta' => true);
    add_theme_support('theme-layouts', $layouts, $layouts_args);
    /* === Register Sidebars === */
    $sidebars_args = array("primary" => array("name" => genbu_string('sidebar-primary-name'), "description" => ""), "secondary" => array("name" => genbu_string('sidebar-secondary-name'), "description" => ""));
    add_theme_support('tamatebako-sidebars', $sidebars_args);
    /* === Register Menus === */
    $menus_args = array("primary" => genbu_string('menu-primary-name'), "footer" => genbu_string('menu-footer-name'));
    add_theme_support('tamatebako-menus', $menus_args);
    /* === Load Stylesheet === */
    if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
        $style_args = array('theme-open-sans-font', 'dashicons', 'theme-reset', 'theme-menus', 'theme', 'media-queries', 'debug-media-queries');
        if (is_child_theme()) {
            $style_args[] = 'style';
        }
    } else {
        $style_args = array('theme-open-sans-font', 'dashicons', 'parent', 'style');
    }
    add_theme_support('hybrid-core-styles', $style_args);
    /* === Editor Style === */
    if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
        $editor_css = array(tamatebako_google_open_sans_font_url(), 'css/reset.min.css', 'css/editor.css');
    } else {
        $editor_css = array(tamatebako_google_open_sans_font_url(), 'css/reset.css', 'css/editor.css');
    }
    add_editor_style($editor_css);
    /* === Customizer Mobile View === */
    add_theme_support('tamatebako-customize-mobile-view');
    /* === Custom Background === */
    add_theme_support('custom-background', array('default-color' => 'e6e6e6'));
    /* === Custom Header === */
    $header_args = array('default-text-color' => '444444', 'wp-head-callback' => 'genbu_custom_header_wp_head_callback', 'admin-head-callback' => 'genbu_custom_header_admin_head_callback', 'admin-preview-callback' => 'genbu_custom_header_admin_preview_callback');
    add_theme_support('custom-header', $header_args);
    /* === Set Content Width === */
    hybrid_set_content_width(1200);
    /* === Plugins === */
    add_theme_support('woocommerce');
}
开发者ID:Harreh,项目名称:magicowl,代码行数:51,代码来源:functions.php

示例11: ltheme_theme_setup

/**
 * set up
 * @since 1.0
 */
function ltheme_theme_setup()
{
    /* Get action/filter hook prefix. */
    //$prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-menus', array('primary'));
    add_theme_support('hybrid-core-sidebars', array('logo', 'portfolio', 'portfolio-full', 'blog', 'clients', 'primary', 'left-sidebar', 'right-sidebar', 'subsidiary', 'after-singular'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-theme-settings', array('about', 'footer'));
    //add_theme_support('hybrid-core-styles', array('style'));
    add_theme_support('hybrid-core-scripts', array('drop-downs'));
    add_theme_support('hybrid-core-template-hierarchy');
    /* Add theme support for framework extensions. */
    add_theme_support('post-stylesheets');
    add_theme_support('dev-stylesheet');
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('breadcrumb-trail');
    add_theme_support('entry-views');
    add_theme_support('cleaner-gallery');
    add_theme_support('cleaner-caption');
    /* Add theme support for WordPress features. */
    /* Add content editor styles. */
    add_editor_style('css/editor-style.css');
    /* Add support for auto-feed links. */
    add_theme_support('automatic-feed-links');
    /* Add support for post formats. */
    add_theme_support('post-formats', array('aside', 'audio', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    /* Add custom background feature. */
    add_theme_support('custom-background');
    //add_custom_background( 'ltheme_custom_background_callback' );
    /* Set content width. */
    hybrid_set_content_width(600);
    /* Add respond.js for unsupported browsers. */
    add_action('wp_head', 'ltheme_respond_mediaqueries');
    /* Disable primary sidebar widgets when layout is one column. */
    add_filter('sidebars_widgets', 'ltheme_disable_sidebars');
    add_action('template_redirect', 'ltheme_one_column');
    /* Add custom image sizes. */
    add_action('init', 'ltheme_add_image_sizes');
    /* Add <blockquote> around quote posts if user have forgotten about it. */
    add_filter('the_content', 'ltheme_quote_content');
    /* Enqueue script. */
    add_action('wp_enqueue_scripts', 'ltheme_scripts');
}
开发者ID:syncrase,项目名称:webTemplates,代码行数:50,代码来源:functions.php

示例12: atheme_theme_setup

/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function atheme_theme_setup()
{
    // 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');
    // Post formats.
    add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    // Handle content width for embeds and images.
    hybrid_set_content_width(780);
}
开发者ID:lagrezd,项目名称:dx-coding-standards,代码行数:25,代码来源:functions.php

示例13: my_life_theme_setup

/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since 0.1.0
 */
function my_life_theme_setup()
{
    /* Get action/filter hook prefix. */
    $prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-menus', array('primary', 'secondary', 'subsidiary'));
    add_theme_support('hybrid-core-sidebars', array('primary', 'secondary'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-theme-settings', array('about', 'footer'));
    add_theme_support('hybrid-core-scripts', array('comment-reply', 'drop-downs'));
    add_theme_support('hybrid-core-styles', array('style'));
    add_theme_support('hybrid-core-template-hierarchy');
    /* Add theme support for framework extensions. */
    add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r', '3c-l', '3c-r', '3c-c'), array('default' => '2c-l', 'customize' => true));
    add_theme_support('post-stylesheets');
    add_theme_support('dev-stylesheet');
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('breadcrumb-trail');
    add_theme_support('cleaner-gallery');
    add_theme_support('cleaner-caption');
    /* Add theme support for WordPress features. */
    add_theme_support('automatic-feed-links');
    add_theme_support('post-formats', array('aside', 'audio', 'image', 'gallery', 'link', 'quote', 'status', 'video'));
    /* Add support for a custom background. */
    add_theme_support('custom-background', array('default-image' => trailingslashit(get_template_directory_uri()) . 'images/bg.png'));
    /* Add support for a custom header image. */
    add_theme_support('custom-header', array('default-image' => 'remove-header', 'width' => 1000, 'height' => 200, 'header-text' => false, 'wp-head-callback' => '__return_false', 'admin-head-callback' => '__return_false'));
    /* Embed width/height defaults. */
    add_filter('embed_defaults', 'my_life_embed_defaults');
    /* Set content width. */
    hybrid_set_content_width(600);
    /* Filter the sidebar widgets. */
    add_filter('sidebars_widgets', 'my_life_disable_sidebars');
    add_action('template_redirect', 'my_life_one_column');
    /* Add classes to the comments pagination. */
    add_filter('previous_comments_link_attributes', 'my_life_previous_comments_link_attributes');
    add_filter('next_comments_link_attributes', 'my_life_next_comments_link_attributes');
    /* Add custom image sizes. */
    add_action('init', 'my_life_add_image_sizes');
    /* Filter the header image on singular views. */
    add_filter('theme_mod_header_image', 'my_life_header_image');
    /* Filters the image/gallery post format archive galleries. */
    add_filter("{$prefix}_post_format_archive_gallery_columns", 'my_life_archive_gallery_columns');
}
开发者ID:panser,项目名称:wandromaha,代码行数:52,代码来源:functions.php

示例14: satu_theme_setup

/**
 * Theme setup function. This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since 1.0
 */
function satu_theme_setup()
{
    /* Get action/filter hook prefix. */
    $prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-template-hierarchy');
    add_theme_support('hybrid-core-scripts');
    add_theme_support('hybrid-core-media-grabber');
    add_theme_support('hybrid-core-menus', array('primary'));
    add_theme_support('hybrid-core-sidebars', array('subsidiary'));
    add_theme_support('hybrid-core-styles', array('gallery', 'parent', 'style'));
    add_theme_support('hybrid-core-theme-settings', array('footer'));
    /* Add theme support for framework extensions. */
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('breadcrumb-trail');
    add_theme_support('cleaner-caption');
    add_theme_support('post-stylesheets');
    /* Add theme support for WordPress features. */
    add_theme_support('automatic-feed-links');
    /* Editor styles. */
    add_editor_style('editor-style.css');
    /* Add support for custom backgrounds */
    add_theme_support('custom-background', array('default-color' => 'faf9f8'));
    /* Add post format support. */
    add_theme_support('post-formats', array('aside', 'audio', 'image', 'gallery', 'link', 'quote', 'video'));
    /* Set content width. */
    hybrid_set_content_width(630);
    /* Add custom image sizes. */
    add_action('init', 'satu_add_image_sizes');
    /* Add custom image sizes custom name. */
    add_filter('image_size_names_choose', 'satu_custom_name_image_sizes');
    /** 
     * Fix disqus issue.
     *
     * @since 1.7
     */
    if (function_exists('dsq_comments_template')) {
        remove_filter('comments_template', 'dsq_comments_template');
        add_filter('comments_template', 'dsq_comments_template', 11);
    }
}
开发者ID:centaurustech,项目名称:gapura,代码行数:50,代码来源:functions.php

示例15: clea_mairie_theme_setup

function clea_mairie_theme_setup()
{
    /* Register and load scripts. */
    add_action('wp_enqueue_scripts', 'clea_mairie_enqueue_scripts');
    /* Register and load styles. */
    add_action('wp_enqueue_scripts', 'clea_mairie_enqueue_styles', 4);
    /* Set content width. */
    hybrid_set_content_width(700);
    // add theme support for WordPress featured image and post thumbnails
    add_theme_support('featured-header');
    add_theme_support('post-thumbnails');
    // Add support for the Wordpress custom-Logo
    // see https://codex.wordpress.org/Theme_Logo
    add_theme_support('custom-logo', array('height' => 150, 'width' => 116, 'flex-width' => true));
    // see http://themehybrid.com/board/topics/custom-header-extended-with-custom-child-theme-of-stargazer
    add_filter('jetpack_photon_override_image_downsize', '__return_true');
    /* override stargazer custom header sizes */
    add_theme_support('custom-header', array('default-image' => '%s/images/headers/orange-burn.jpg', 'random-default' => false, 'width' => 1600, 'height' => 400, 'flex-width' => true, 'flex-height' => true, 'default-text-color' => '252525', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => 'stargazer_custom_header_wp_head'));
}
开发者ID:aldelpech,项目名称:clea-2-Mairie,代码行数:19,代码来源:functions.php


注:本文中的hybrid_set_content_width函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。