* @copyright Copyright 2014, Chris Aprea * @link http://wpaxl.com/themes/adoration * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ // Exit if accessed directly defined( 'ABSPATH' ) || exit; $template_directory = trailingslashit( get_template_directory() ); /* Load function files */ require_once $template_directory . 'inc/functions.php'; /* Load additional files */ require_once $template_directory . 'inc/abstracts/abstract-adoration-widget.php'; require_once $template_directory . 'inc/structure/comments.php'; require_once $template_directory . 'inc/structure/hooks.php'; require_once $template_directory . 'inc/structure/masthead.php'; require_once $template_directory . 'inc/structure/social-media-menu.php'; require_once $template_directory . 'inc/structure/subsidiary-banner.php'; require_once $template_directory . 'inc/structure/template-tags.php'; require_once $template_directory . 'inc/structure/wc-template-tags.php'; require_once $template_directory . 'inc/adoration.php'; require_once $template_directory . 'inc/class-adoration-wc-widget-recent-reviews.php'; require_once $template_directory . 'inc/class-adoration-widget-recent-posts.php'; require_once $template_directory . 'inc/class-adoration-widget-recent-comments.php'; require_once $template_directory . 'inc/customizer.php'; require_once $template_directory . 'inc/woocommerce.php'; /* Load the Hybrid Core framework and launch it. */ require_once $template_directory . 'library/hybrid.php'; new Hybrid(); /* Set up the theme early. */ add_action( 'after_setup_theme', 'adoration_setup', 5 ); /** * The theme setup function. This function sets up support for various WordPress and framework functionality. * * @since 1.0.0 */ function adoration_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' ); /* Pagination. */ add_theme_support( 'loop-pagination' ); /* Better captions for themes to style. */ add_theme_support( 'cleaner-caption' ); /* Automatically add feed links to . */ add_theme_support( 'automatic-feed-links' ); /* Whistles plugin. */ add_theme_support( 'whistles', array( 'styles' => true ) ); /* Declare support for WooCommerce */ add_theme_support( 'woocommerce' ); /* Let WordPress handle the rendering of the tag */ add_theme_support( 'title-tag' ); /* Prevent hybrid core from outputting the <title> tag. */ remove_action( 'wp_head', 'hybrid_doctitle', 0 ); /* Declare support for the custom background feature */ $color_scheme = adoration_get_color_scheme(); $default_color = trim( $color_scheme[0], '#' ); add_theme_support( 'custom-background', apply_filters( 'adoration_custom_background_args', array( 'default-color' => $default_color, 'default-attachment' => 'fixed', ) ) ); /* Editor styles. */ add_editor_style( adoration_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( 1136 ); }