/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
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(); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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'); }
/** * 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'); }
/** * 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); }
/** * 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'); }
/** * 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); } }
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')); }
/** * 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. */ function taylor_setup() { require_once trailingslashit(get_template_directory()) . 'inc/theme.php'; // Theme Layouts add_theme_support('theme-layouts', array('default' => is_rtl() ? '2c-r' : '2c-l')); // Enable custom template hierarchy add_theme_support('hybrid-core-template-hierarchy'); add_theme_support('get-the-image'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array('aside', 'audio', 'image', 'gallery', 'link', 'quote', 'status', 'video')); // Handles content width for embeds and images // Largest size based on the theme's layouts hybrid_set_content_width(1140); }
/** * The theme setup function. This function sets up support for various WordPress and framework functionality. * * @since 1.0.0 * @access public * @return void */ function saga_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'); /* 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')); /* Editor styles. */ add_editor_style(saga_get_editor_styles()); /* Handle content width for embeds and images. */ hybrid_set_content_width(1100); }
/** * 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 vaidusworld_theme_setup() { // Theme layouts. //add_theme_support( 'theme-layouts', array( 'default' => '1c' ) ); // 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'); // Jetpack's responsive videos add_theme_support('jetpack-responsive-videos'); // 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(1280); }
/** * 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 ubuntugnome_theme_setup() { // Theme layouts. add_theme_support('theme-layouts', 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' ); // 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')); // WordPress Custom Logo add_theme_support('custom-logo', array('width' => 100, 'height' => 100, 'header-text' => array('site-title', 'site-description'))); // Handle content width for embeds and images. hybrid_set_content_width(1280); }
/** * General Setup * @since 0.1.0 */ function cara_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', 'audio'); add_theme_support('post-formats', $post_formats_args); /* === 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 Sidebars === */ $sidebars_args = array("primary" => array("name" => cara_string('sidebar-primary-name'), "description" => "")); add_theme_support('tamatebako-sidebars', $sidebars_args); /* Sidebar Args */ add_filter("hybrid_sidebar_args", "cara_sidebar_args"); /* === Register Menus === */ $menus_args = array("primary" => cara_string('menu-primary-name')); add_theme_support('tamatebako-menus', $menus_args); /* === Load Stylesheet === */ $style_args = array('open-sans', 'theme-merriweather-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_merriweather_font_url()); 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 === */ /* === Set Content Width === */ hybrid_set_content_width(1200); /* === Context === */ add_filter('body_class', 'cara_body_class'); /* === Scripts === */ add_action('wp_enqueue_scripts', 'cara_enqueue_scripts'); /* === Image Size === */ //add_action( 'init', 'cara_register_image_sizes' ); }
/** * Theme support setup. This function adds support for theme features. * * @access public * @return void */ function theme_support() { // Theme layouts. add_theme_support('theme-layouts', 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'); // Nicer [gallery] shortcode implementation. if (get_theme_mod('theone_cleaner_gallery')) { add_theme_support('cleaner-gallery'); } // Automatically add feed links to <head>. add_theme_support('automatic-feed-links'); // Add support for custom-background add_theme_support('custom-background', apply_filters('theone_custom_background_args', array('default-color' => 'fafafa'))); // 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(1152); }
function croft_theme_setup() { // Theme layouts. add_theme_support('theme-layouts', 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'); // 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('image', 'gallery', 'video')); // Site logo. add_theme_support('custom-logo', array('height' => 200, 'width' => 300, 'flex-height' => true, 'flex-width' => true)); // Indicate widget sidebars can use selective refresh in the Customizer. add_theme_support('customize-selective-refresh-widgets'); // Handle content width for embeds and images. hybrid_set_content_width(1200); }
/** * Theme setup function. This function adds support for theme features and defines the default theme * actions and filters. * * @since 0.1.0 */ function trending_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', 'subsidiary')); add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'header', 'before-content', 'after-content', '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('trending_custom_background_callback'); /* Embed width/height defaults. */ add_filter('embed_defaults', 'trending_embed_defaults'); /* Set content width. */ hybrid_set_content_width(600); /* Filter the sidebar widgets. */ add_filter('sidebars_widgets', 'trending_disable_sidebars'); add_action('template_redirect', 'trending_one_column'); /* Add classes to the comments pagination. */ add_filter('previous_comments_link_attributes', 'trending_previous_comments_link_attributes'); add_filter('next_comments_link_attributes', 'trending_next_comments_link_attributes'); /* Add custom image sizes. */ add_action('init', 'trending_add_image_sizes'); }
/** * The theme setup function. This function sets up support for various WordPress and framework functionality. * * @since 1.0.0 * @access public * @return void */ function ravel_theme_setup() { /* Load files. */ require_once trailingslashit(get_template_directory()) . 'inc/ravel.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', 'ravel')), array('customize' => false, 'post_meta' => false)); /* Load stylesheets. */ add_theme_support('hybrid-core-styles', array('ravel-fonts', 'ravel-mediaelement', 'ravel-wp-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'); /* 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'); /* If support for Cleaner Gallery is removed, remove default gallery style as well and use ambience's gallery CSS. */ if (!current_theme_supports('cleaner-gallery')) { /* Remove default gallery inline CSS */ add_filter('use_default_gallery_style', '__return_false'); } /* 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')); /* Editor styles. */ add_editor_style(ravel_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(728); }
/** * 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 hybrid_base_theme_setup() { /* Get action/filter hook prefix. */ $prefix = hybrid_get_prefix(); /* Register menus. */ add_theme_support('hybrid-core-menus', array('primary', 'secondary', 'subsidiary')); /* Register sidebars. */ add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'subsidiary')); /* Load scripts. */ add_theme_support('hybrid-core-scripts', array('comment-reply')); /* Load styles. */ add_theme_support('hybrid-core-styles', array('25px', 'gallery', 'parent', 'style')); /* Load widgets. */ add_theme_support('hybrid-core-widgets'); /* Load shortcodes. */ add_theme_support('hybrid-core-shortcodes'); /* Enable custom template hierarchy. */ add_theme_support('hybrid-core-template-hierarchy'); /* Load the media grabber. */ add_theme_support('hybrid-core-media-grabber'); /* Enable theme layouts (need to add stylesheet support). */ add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r'), array('default' => '1c', 'customizer' => true)); /* Allow per-post stylesheets. */ add_theme_support('post-stylesheets'); /* Support pagination instead of prev/next links. */ add_theme_support('loop-pagination'); /* The best thumbnail/image script ever. */ add_theme_support('get-the-image'); /* Use breadcrumbs. */ add_theme_support('breadcrumb-trail'); /* 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 support for a custom header image. */ add_theme_support('custom-header', array('header-text' => false)); /* Custom background. */ add_theme_support('custom-background', array('default-color' => 'ffffff')); /* Handle content width for embeds and images. */ hybrid_set_content_width(1280); }
/** * 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 spine2_theme_setup() { /** Theme constants */ define('SPINE2_JS_URL', trailingslashit(get_template_directory_uri() . '/js')); define('SPINE2_INC_DIR', trailingslashit(get_template_directory() . '/inc')); define('SPINE2_DIR', dirname(__FILE__)); define('SPINE2_VERSION', '0.1'); define('SPINE2_FOUNDATION_JS_URL', trailingslashit(get_template_directory_uri() . '/foundation/javascripts/foundation')); define('SPINE2_VENDOR_JS_URL', trailingslashit(get_template_directory_uri() . '/foundation/javascripts/vendor')); // Include Spine Pagination include_once SPINE2_INC_DIR . 'pagination.php'; // Load Customizer settings include_once SPINE2_INC_DIR . 'spine-customizer.php'; include_once SPINE2_INC_DIR . 'gallery-shortcode.php'; include_once SPINE2_INC_DIR . 'meta.php'; add_action('customize_register', 'spine2_customize_register'); /* Get action/filter hook prefix. */ $prefix = hybrid_get_prefix(); /* Register menus. */ add_theme_support('hybrid-core-menus', array('primary', 'secondary', 'subsidiary')); /* Register sidebars. */ add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'subsidiary')); /* Load scripts. */ add_theme_support('hybrid-core-scripts', array('comment-reply')); /* Load styles. add_theme_support( 'hybrid-core-styles', array( '25px', 'gallery', 'parent', 'style' ) ); */ /* Load widgets. */ add_theme_support('hybrid-core-widgets'); /* Load shortcodes. */ add_theme_support('hybrid-core-shortcodes'); /* Enable custom template hierarchy. */ add_theme_support('hybrid-core-template-hierarchy'); /* Enable theme layouts (need to add stylesheet support). */ add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r', '3c-l', '3c-r', '3c-c'), array('default' => '1c', 'customizer' => true)); /* Allow per-post stylesheets. */ add_theme_support('post-stylesheets'); /* Support pagination instead of prev/next links. */ //add_theme_support( 'loop-pagination' ); /* The best thumbnail/image script ever. */ add_theme_support('get-the-image'); /** Custom thumbnail size */ add_image_size('featured', 640, 132, true); /* Use breadcrumbs. */ //add_theme_support( 'breadcrumb-trail' ); /* 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'); /* Add support for a custom header image. */ $args = array('header-text' => false, 'flex-width' => true, 'width' => 1000, 'flex-height' => true, 'height' => 300); add_theme_support('custom-header', $args); add_theme_support('featured-header'); /* Custom background. */ add_theme_support('custom-background', array('default-color' => 'ffffff')); /* Post formats. */ add_theme_support('post-formats', array('aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video')); /** Add theme settings */ add_theme_support('hybrid-core-theme-settings', array('about', 'footer')); /* Handle content width for embeds and images. */ hybrid_set_content_width(1280); /** Hybrid Core 1.6 changes **/ add_filter("{$prefix}_sidebar_defaults", 'spine2_sidebar_defaults', 15, 2); //add_filter( 'cleaner_gallery_defaults', 'spine2_gallery_defaults' ); add_filter('the_content', 'spine2_aside_infinity', 9); /****************************/ // load the stylesheet add_action('wp_enqueue_scripts', 'spine2_load_styles'); /** Load the javascripts */ add_action('wp_enqueue_scripts', 'spine2_load_scripts'); // customize the pagination markup add_filter('loop_pagination_args', 'spine2_foundation_pagination'); add_filter('embed_oembed_html', 'spine2_oembed_html', 99, 4); // Register widget areas add_action('widgets_init', 'spine2_register_sidebars', 11); // Add customizer styles to frontend add_action('wp_head', 'spine2_wp_head'); add_editor_style(); add_filter('sidebars_widgets', 'spine2_disable_sidebars'); //add_filter('post_thumbnail_html', 'pdw_spine_add_thumbnail_class',10, 3 ); add_filter('get_the_image', 'spine2_add_featured_img_class', 10, 1); }
/** * Theme setup function. This function adds support for theme features and defines the default theme * actions and filters. * * @since 0.1.0 */ function clea_base_theme_setup() { /* Get action/filter hook prefix. */ $prefix = hybrid_get_prefix(); /* Load clea_base theme includes. */ require_once trailingslashit(THEME_DIR) . 'inc/media.php'; /* load clea-base theme includes */ require_once trailingslashit(THEME_DIR) . 'inc/ald-custom-fonts.php'; require_once trailingslashit(THEME_DIR) . 'inc/ald-customize.php'; require_once trailingslashit(THEME_DIR) . 'inc/ald-custom-header.php'; require_once trailingslashit(THEME_DIR) . 'inc/ald-custom-colors.php'; require_once trailingslashit(THEME_DIR) . 'inc/ald-encode-email.php'; require_once trailingslashit(THEME_DIR) . 'inc/ald-enqueue.php'; /* 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', 'subsidiary')); // add_theme_support( 'hybrid-core-widgets' ); add_theme_support('hybrid-core-shortcodes'); add_theme_support('hybrid-core-scripts', array('comment-reply')); add_theme_support('hybrid-core-styles', array('25px', 'gallery', 'parent', 'style')); add_theme_support('hybrid-core-template-hierarchy'); add_theme_support('hybrid-core-media-grabber'); /* 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', 'customizer' => true)); 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', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video')); /* Add support for a custom header image (logo). */ add_theme_support('custom-header', array('width' => 1080, 'height' => 200, 'flex-height' => true, 'flex-width' => false, 'header-text' => false)); /* Add support for a custom background. */ add_theme_support('custom-background', array('default-color' => 'f1f1f1', 'default-image' => trailingslashit(get_template_directory_uri()) . 'images/bg.png', 'wp-head-callback' => 'clea_base_custom_background_callback')); /* Add support for the Whistles plugin. */ add_theme_support('whistles', array('styles' => true)); /* Embed width/height defaults. */ add_filter('embed_defaults', 'clea_base_embed_defaults'); /* add color choices in WordPress theme customizer */ /* chun_register_color is set in ald-custom-colors.php */ add_theme_support('color-palette', array('callback' => 'chun_register_colors')); /* auto-add some settings meta boxes for you. * Hybrid Core has a built-in meta box for “Footer settings” and an “About Theme Name” box. */ add_theme_support('hybrid-core-theme-settings', array('footer')); /* Custom editor stylesheet. */ add_editor_style('//fonts.googleapis.com/css?family=Bangers'); /* Set content width. */ hybrid_set_content_width(620); /* Filter the sidebar widgets. */ add_filter('sidebars_widgets', 'clea_base_disable_sidebars'); add_action('template_redirect', 'clea_base_theme_layout'); /* Add classes to the comments pagination. */ add_filter('previous_comments_link_attributes', 'clea_base_previous_comments_link_attributes'); add_filter('next_comments_link_attributes', 'clea_base_next_comments_link_attributes'); /* Filters the image/gallery post format archive galleries. */ add_filter("{$prefix}_post_format_archive_gallery_columns", 'clea_base_archive_gallery_columns'); /* Register additional widgets. */ add_action('widgets_init', 'clea_base_register_widgets'); /* Custom search form template. */ add_filter('get_search_form', 'clea_base_search_form'); // remove the original WP filter, which trims all excerpts to 55 words and 0 html tags // remove_filter('get_the_excerpt', 'wp_trim_excerpt'); // trim excerpt but don't trim html tags // add_filter('get_the_excerpt', 'clea_base_custom_wp_trim_excerpt'); // change pagination parameters add_filter('loop_pagination_args', 'clea_base_pagination_args'); }
/** * 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 bearded_theme_setup() { /* Get action/filter hook prefix. */ $prefix = hybrid_get_prefix(); /* Register menus. */ add_theme_support('hybrid-core-menus', array('primary')); /* Register sidebars. */ add_theme_support('hybrid-core-sidebars', array('primary')); /* Load scripts. */ add_theme_support('hybrid-core-scripts', array('comment-reply')); /* Load styles. */ add_theme_support('hybrid-core-styles', array('gallery', 'style')); add_theme_support('hybrid-core-theme-settings', array('about', 'footer')); add_theme_support('animate-slider', array('link', 'button', 'caption-style', 'caption-position', 'background')); if (is_admin()) { require_once trailingslashit(BEARDED_INC) . 'functions-admin.php'; } add_theme_support('post-thumbnails'); /* Load widgets. */ add_theme_support('hybrid-core-widgets'); /* Load shortcodes. */ add_theme_support('hybrid-core-shortcodes'); /* Load the media grabber. */ add_theme_support('hybrid-core-media-grabber'); /* Enable theme layouts (need to add stylesheet support). */ add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r'), array('default' => '2c-l', 'customizer' => true)); /* Support pagination instead of prev/next links. */ add_theme_support('loop-pagination'); /* 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')); /* Custom background. */ add_theme_support('custom-background', array('default-color' => 'f3f3f3')); add_action('init', 'bearded_image_size'); add_action('widgets_init', 'bearded_footer_sidebar', 50); add_filter("{$prefix}_sidebar_defaults", 'bearded_sidebar_default_setting', 10); add_filter('wp_tag_cloud', 'bearded_no_inline_style_tag_cloud'); add_filter("{$prefix}_list_comments_args", 'bearded_filter_comment_args', 10); add_filter('post_class', 'bearded_post_class_last', 10, 3); add_shortcode('gallery-carousel', 'bearded_gallery_carousel_shortcode'); add_action('ccp_item_info_meta_box', 'bearded_portfolio_metabox', 10, 2); add_action('save_post', 'bearded_save_portfolio_meta', 10, 2); add_action('admin_enqueue_scripts', 'bearded_enqueue_portfolio_script'); /* Handle content width for embeds and images. */ hybrid_set_content_width(570); add_filter('embed_defaults', 'bearded_embed_defaults'); /* Filter the sidebar widgets. */ add_filter('sidebars_widgets', 'bearded_disable_sidebars'); add_action('template_redirect', 'bearded_set_column'); add_action("{$prefix}_open_main_row", "bearded_open_main_row_hook", 1); add_action("{$prefix}_close_main_row", "bearded_close_main_row_hook", 1); add_theme_support('color-palette', array('callback' => 'bearded_register_colors')); add_action('wp_head', 'bearded_wp_head_shadow_css'); add_filter("{$prefix}_footer_content", "bearded_footer_content"); if (function_exists('is_woocommerce')) { require_once BEARDED_INC . 'functions-woocommerce.php'; require_once BEARDED_INC . 'widgets/widget-home-product.php'; } add_action('init', 'bearded_setup_admin_bar'); }
/** * Overwrites the default widths for embeds. This is especially useful for making sure videos properly * expand the full width on video pages. This function overwrites what the $content_width variable handles * with context-based widths. * * @uses hybrid_get_content_width() * @uses hybrid_set_content_width() * @uses theme_layouts_get_layout() * @param array $args Array with default embed settings * @since Cakifo 1.3 */ function cakifo_content_width($args) { $args['width'] = hybrid_get_content_width(); if (current_theme_supports('theme-layouts')) { $layout = theme_layouts_get_layout(); if ('layout-3c-l' == $layout || 'layout-3c-r' == $layout) { $args['width'] = 490; } elseif ('layout-3c-c' == $layout) { $args['width'] = 500; } elseif ('layout-1c' == $layout) { $args['width'] = 940; } /* Set $content_width */ hybrid_set_content_width($args['width']); } return $args; }
/** * Theme setup function. This function adds support for theme features and defines the default theme * actions and filters. * * @since 0.1.0 */ function news_theme_setup() { /* Get action/filter hook prefix. */ $prefix = hybrid_get_prefix(); /* Load shortcodes file. */ require_once trailingslashit(THEME_DIR) . 'includes/shortcodes.php'; /* Load admin functions. */ if (is_admin()) { require_once trailingslashit(THEME_DIR) . 'includes/admin.php'; } /* Add theme support for WordPress features. */ add_theme_support('automatic-feed-links'); /* 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', '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-seo'); add_theme_support('hybrid-core-template-hierarchy'); add_theme_support('hybrid-core-javascript', array('drop-downs')); /* Add theme support for extensions. */ add_theme_support('dev-stylesheet'); add_theme_support('loop-pagination'); add_theme_support('get-the-image'); add_theme_support('entry-views'); add_theme_support('breadcrumb-trail'); add_theme_support('cleaner-gallery'); /* Register shortcodes. */ add_action('init', 'news_register_shortcodes'); /* Register new image sizes. */ add_action('init', 'news_register_image_sizes'); /* Register additional widgets. */ add_action('widgets_init', 'news_register_widgets'); /* Load JavaScript. */ add_action('wp_enqueue_scripts', 'news_enqueue_script'); /* Site description. */ add_action("{$prefix}_before_menu_secondary", 'hybrid_site_description'); /* Hook additional items to the nav menus. */ add_filter('wp_nav_menu', 'news_nav_menu_add_items', 10, 2); /* Content. */ add_action("{$prefix}_singular-post_after_loop", 'news_singular_post_tags'); /* Tag cloud. */ add_filter('wp_tag_cloud', 'news_add_span_to_tag_cloud'); add_filter('term_links-post_tag', 'news_add_span_to_tag_cloud'); /* Embed width/height defaults. */ add_filter('embed_defaults', 'news_embed_defaults'); /* Set content width. */ hybrid_set_content_width(600); /* Allow all post types to have shortlinks. Do this early so plugins can still override. */ add_filter('get_shortlink', 'news_filter_shortlink', 1, 3); /* Add classes to the comments pagination. */ add_filter('previous_comments_link_attributes', 'news_previous_comments_link_attributes'); add_filter('next_comments_link_attributes', 'news_next_comments_link_attributes'); /* Add a wrapper class for singular videos. */ add_filter('the_content', 'news_video_embed_wrapper', 20); /* Shorter excerpt length. */ add_filter('excerpt_length', 'news_excerpt_length'); /* Comment form arguments. */ add_filter('comment_form_defaults', 'news_comment_form_defaults', 11); /* Additional default theme settings. */ add_filter("{$prefix}_default_theme_settings", 'news_theme_settings'); }