コード例 #1
0
function bouquet_setup() {

	// This theme has an options page that lets users pick layout, color scheme, featured post title text and configure a twitter icon
	//require_once( dirname( __FILE__ ) . '/inc/theme-options.php' );

	// Make theme available for translation
	load_theme_textdomain( 'bouquet', get_template_directory() . '/languages' );

	 // Add default posts and comments RSS feed links to head
	add_theme_support( 'automatic-feed-links' );

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'bouquet' ),
	) );

	// This theme allows users to set a custom background.
	add_custom_background();

	// This theme allows users to upload a custom header.
	define( 'HEADER_TEXTCOLOR', bouquet_header_text_color() );
	define( 'HEADER_IMAGE', '' );
	define( 'HEADER_IMAGE_WIDTH', 1100 ); // use width and height appropriate for your theme
	define( 'HEADER_IMAGE_HEIGHT', 180 );

	// Add a way for the custom header to be styled in the admin panel that controls
	// custom headers. See bouquet_admin_header_style(), below.
	add_custom_image_header( 'bouquet_header_style', 'bouquet_admin_header_style' );

	// Add support for Post Formats
	add_theme_support( 'post-formats', array( 'aside', 'image', 'gallery' ) );
}
コード例 #2
0
 function bouquet_setup()
 {
     // Make theme available for translation
     load_theme_textdomain('bouquet', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head
     add_theme_support('automatic-feed-links');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'bouquet')));
     // This theme allows users to set a custom background.
     add_theme_support('custom-background');
     // This theme allows users to upload a custom header.
     add_theme_support('custom-header', apply_filters('bouquet_custom_header_args', array('default-image' => '', 'default-text-color' => bouquet_header_text_color(), 'width' => 1100, 'height' => 180, 'flex-height' => true, 'wp-head-callback' => 'bouquet_header_style', 'admin-head-callback' => 'bouquet_admin_header_style')));
     // Add support for Post Formats
     add_theme_support('post-formats', array('aside', 'image', 'gallery'));
 }