(int) $options['anima_headerheight'], 'width' => 240, 'flex-height' => true, 'flex-width' => true ) ); add_filter( 'get_custom_logo', 'anima_filter_wp_logo_img' ); // This theme uses wp_nav_menu() in 3 locations. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'anima' ), 'sidebar' => __( 'Left Sidebar', 'anima' ), 'footer' => __( 'Footer Navigation', 'anima' ), 'socials' => __( 'Social Icons', 'anima' ), ) ); $fheight = $options['anima_fheight']; $falign = (bool)$options['anima_falign']; if (false===$falign) { $fheight = 0; } else { $falign = explode( ' ', $options['anima_falign'] ); if (!is_array($falign) ) $falign = array( 'center', 'center' ); //failsafe } // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( // default Post Thumbnail dimensions apply_filters( 'anima_thumbnail_image_width', anima_featured_width() ), apply_filters( 'anima_thumbnail_image_height', $options['anima_fheight'] ), false ); // Custom image size for use with post thumbnails add_image_size( 'anima-featured', apply_filters( 'anima_featured_image_width', anima_featured_width() ), apply_filters( 'anima_featured_image_height', $fheight ), $falign ); // Additional responsive image sizes add_image_size( 'anima-featured-lp', apply_filters( 'anima_featured_image_lp_width', ceil( $options['anima_sitewidth'] / apply_filters( 'anima_lppostslayout_filter', $options['anima_magazinelayout'] ) ) ), apply_filters( 'anima_featured_image_lp_height', $options['anima_fheight'] ), $falign ); add_image_size( 'anima-featured-half', apply_filters( 'anima_featured_image_half_width', 800 ), apply_filters( 'anima_featured_image_falf_height', $options['anima_fheight'] ), $falign ); add_image_size( 'anima-featured-third', apply_filters( 'anima_featured_image_third_width', 512 ), apply_filters( 'anima_featured_image_third_height', $options['anima_fheight'] ), $falign ); // Boxes image sizes add_image_size( 'anima-lpbox-1', $options['anima_lpboxwidth1'], $options['anima_lpboxheight1'], true ); add_image_size( 'anima-lpbox-2', $options['anima_lpboxwidth2'], $options['anima_lpboxheight2'], true ); // Add support for flexible headers add_theme_support( 'custom-header', array( 'flex-height' => true, 'height' => (int) $options['anima_headerheight'], 'flex-width' => true, 'width' => 1920, 'default-image' => get_template_directory_uri() . '/resources/images/headers/glasses.jpg', 'video' => true, )); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'glasses' => array( 'url' => '%s/resources/images/headers/glasses.jpg', 'thumbnail_url' => '%s/resources/images/headers/glasses.jpg', 'description' => __( 'glasses', 'anima' ) ), 'laptop' => array( 'url' => '%s/resources/images/headers/laptop.jpg', 'thumbnail_url' => '%s/resources/images/headers/laptop.jpg', 'description' => __( 'laptop', 'anima' ) ), ) ); // WooCommerce compatibility add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } // anima_setup() /* * Have two textdomains work with translation systems. * https://gist.github.com/justintadlock/7ac29ae26c78d0 */ function anima_override_load_textdomain( $override, $domain ) { // Check if the domain is our framework domain. if ( 'cryout' === $domain ) { global $l10n; // If the theme's textdomain is loaded, assign the theme's translations // to the framework's textdomain. if ( isset( $l10n[ 'anima' ] ) ) $l10n[ $domain ] = $l10n[ 'anima' ]; // Always override. We only want the theme to handle translations. $override = true; } return $override; } add_filter( 'override_load_textdomain', 'anima_override_load_textdomain', 10, 2 ); /* * Remove inline logo styling */ function anima_filter_wp_logo_img ( $input ) { return preg_replace( '/(height=".*?"|width=".*?")/i', '', $input ); } /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function anima_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'anima_page_menu_args' ); /** Main menu */ function anima_main_menu() { ?>
'', 'menu_id' => 'prime_nav', 'menu_class' => '', 'theme_location'=> 'primary', 'link_before' => '', 'link_after' => '', 'items_wrap' => '