Esempio n. 1
0
/**
 * Setup P2 Theme.
 *
 * Hooks into the after_setup_theme action.
 *
 * @uses p2_get_supported_post_formats()
 */
function p2_setup() {
	require_once( get_template_directory() . '/inc/custom-header.php' );
	p2_setup_custom_header();

	add_theme_support( 'automatic-feed-links' );
	add_theme_support( 'post-formats', p2_get_supported_post_formats( 'post-format' ) );

	$args = apply_filters( 'p2_custom_background_args', array( 'default-color' => 'f1f1f1' ) );
	if ( function_exists( 'get_custom_header' ) ) {
		add_theme_support( 'custom-background', $args );
	} else {
		// Compat: Versions of WordPress prior to 3.4.
		define( 'BACKGROUND_COLOR', $args['default-color'] );
		add_custom_background();
	}

	add_filter( 'the_content', 'make_clickable', 12 ); // Run later to avoid shortcode conflicts

	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'p2' ),
	) );

	if ( is_admin() && false === get_option( 'prologue_show_titles' ) )
		add_option( 'prologue_show_titles', 1 );

	add_theme_support( 'print-style' );
}
Esempio n. 2
0
/**
 * Setup P2 Theme.
 *
 * Hooks into the after_setup_theme action.
 *
 * @uses p2_get_supported_post_formats()
 */
function p2_setup()
{
    require_once get_template_directory() . '/inc/custom-header.php';
    p2_setup_custom_header();
    add_theme_support('automatic-feed-links');
    add_theme_support('post-formats', p2_get_supported_post_formats('post-format'));
    add_theme_support('custom-background', apply_filters('p2_custom_background_args', array('default-color' => 'f1f1f1')));
    add_filter('the_content', 'make_clickable', 12);
    // Run later to avoid shortcode conflicts
    register_nav_menus(array('primary' => __('Primary Menu', 'p2')));
    if (is_admin() && false === get_option('prologue_show_titles')) {
        add_option('prologue_show_titles', 1);
    }
}