. add_theme_support( 'automatic-feed-links' ); // Add support for custom backgrounds add_custom_background(); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'basically' ), 'secondary' => __( 'Secondary Navigation', 'basically' ) ) ); // This theme uses Featured Images (also known as post thumbnails) add_theme_support( 'post-thumbnails' ); // Add custom image sizes add_image_size( '150px' , 150, 150, true ); // 150px thumbnail // Load the theme options require_once get_template_directory() . '/includes/options/options.php'; // Load the theme functions require_once get_template_directory() . '/includes/theme-functions.php'; $args = array( 'default-image' => '', 'default-text-color' => '', 'width' => 940, 'height' => 200, 'flex-height' => true, 'admin-head-callback' => 'basically_admin_header_style', ); $args = apply_filters( 'basically_custom_header_args', $args ); if ( function_exists( 'wp_get_theme' ) ) { add_theme_support( 'custom-header', $args ); } else { // Compat: Versions of WordPress prior to 3.4. define( 'HEADER_TEXTCOLOR', $args['default-text-color'] ); define( 'HEADER_IMAGE', $args['default-image'] ); define( 'HEADER_IMAGE_WIDTH', $args['width'] ); define( 'HEADER_IMAGE_HEIGHT', $args['height'] ); define( 'NO_HEADER_TEXT', true ); add_custom_image_header( '', $args['admin-head-callback']); } } endif; // end basically_setup /** * Shiv for get_custom_header(). * * get_custom_header() was introduced to WordPress * in version 3.4. To provide backward compatibility * with previous versions, we will define our own version * of this function. * * @return stdClass All properties represent attributes of the curent header image. * * @package basically * @since basically 2.1.0 */ if ( ! function_exists( 'get_custom_header' ) ) { function get_custom_header() { return (object) array( 'url' => get_header_image(), 'thumbnail_url' => get_header_image(), 'width' => HEADER_IMAGE_WIDTH, 'height' => HEADER_IMAGE_HEIGHT, ); } } /** * Styles the header image displayed on the Appearance > Header admin panel. * * * @since basically 2.1.0 */ if ( ! function_exists( 'basically_admin_header_style' ) ) : function basically_admin_header_style() { ?>