Twenty Fourteen: general cleanup for spacing, inline comments. Props obenland, see #25946.
Built from https://develop.svn.wordpress.org/trunk@26227 git-svn-id: http://core.svn.wordpress.org/trunk@26134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
433c648e1d
commit
3c0f497fad
|
@ -97,24 +97,18 @@ function twentyfourteen_setup() {
|
||||||
'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
|
'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
/*
|
// This theme allows users to set a custom background.
|
||||||
* This theme allows users to set a custom background.
|
|
||||||
*/
|
|
||||||
add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
|
add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
|
||||||
'default-color' => 'f5f5f5',
|
'default-color' => 'f5f5f5',
|
||||||
) ) );
|
) ) );
|
||||||
|
|
||||||
/*
|
// Add support for featured content.
|
||||||
* Add support for featured content.
|
|
||||||
*/
|
|
||||||
add_theme_support( 'featured-content', array(
|
add_theme_support( 'featured-content', array(
|
||||||
'featured_content_filter' => 'twentyfourteen_get_featured_posts',
|
'featured_content_filter' => 'twentyfourteen_get_featured_posts',
|
||||||
'max_posts' => 6,
|
'max_posts' => 6,
|
||||||
) );
|
) );
|
||||||
|
|
||||||
/*
|
// This theme uses its own gallery styles.
|
||||||
* This theme uses its own gallery styles.
|
|
||||||
*/
|
|
||||||
add_filter( 'use_default_gallery_style', '__return_false' );
|
add_filter( 'use_default_gallery_style', '__return_false' );
|
||||||
}
|
}
|
||||||
endif; // twentyfourteen_setup
|
endif; // twentyfourteen_setup
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<div id="page" class="hfeed site">
|
<div id="page" class="hfeed site">
|
||||||
<?php do_action( 'before' ); ?>
|
|
||||||
|
|
||||||
<?php if ( get_header_image() ) : ?>
|
<?php if ( get_header_image() ) : ?>
|
||||||
<div id="site-header">
|
<div id="site-header">
|
||||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
|
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
|
||||||
|
|
|
@ -73,8 +73,8 @@ get_header();
|
||||||
|
|
||||||
<nav id="image-navigation" class="navigation image-navigation">
|
<nav id="image-navigation" class="navigation image-navigation">
|
||||||
<div class="nav-links">
|
<div class="nav-links">
|
||||||
<?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
|
<div class="previous-image"><?php previous_image_link( false, __( 'Previous Image', 'twentyfourteen' ) ); ?></div>
|
||||||
<?php next_image_link( false, __( '<div class="next-image">Next Image</div>', 'twentyfourteen' ) ); ?>
|
<div class="next-image"><?php next_image_link( false, __( 'Next Image', 'twentyfourteen' ) ); ?></div>
|
||||||
</div><!-- .nav-links -->
|
</div><!-- .nav-links -->
|
||||||
</nav><!-- #image-navigation -->
|
</nav><!-- #image-navigation -->
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ function twentyfourteen_customize_register( $wp_customize ) {
|
||||||
'section' => 'colors',
|
'section' => 'colors',
|
||||||
) ) );
|
) ) );
|
||||||
|
|
||||||
add_filter( 'theme_mod_accent_mid', 'twentyfourteen_accent_mid' );
|
add_filter( 'theme_mod_accent_mid', 'twentyfourteen_accent_mid' );
|
||||||
add_filter( 'theme_mod_accent_light', 'twentyfourteen_accent_light' );
|
add_filter( 'theme_mod_accent_light', 'twentyfourteen_accent_light' );
|
||||||
|
|
||||||
// Add the featured content section in case it's not already there.
|
// Add the featured content section in case it's not already there.
|
||||||
|
@ -138,7 +138,7 @@ function twentyfourteen_accent_light() {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function twentyfourteen_rebuild_accent_colors() {
|
function twentyfourteen_rebuild_accent_colors() {
|
||||||
set_theme_mod( 'accent_mid', twentyfourteen_accent_mid() );
|
set_theme_mod( 'accent_mid', twentyfourteen_accent_mid() );
|
||||||
set_theme_mod( 'accent_light', twentyfourteen_accent_light() );
|
set_theme_mod( 'accent_light', twentyfourteen_accent_light() );
|
||||||
}
|
}
|
||||||
add_action( 'update_option_theme_mods_twentyfourteen', 'twentyfourteen_rebuild_accent_colors' );
|
add_action( 'update_option_theme_mods_twentyfourteen', 'twentyfourteen_rebuild_accent_colors' );
|
||||||
|
@ -157,7 +157,7 @@ function twentyfourteen_customizer_styles() {
|
||||||
if ( '#24890d' === $accent_color )
|
if ( '#24890d' === $accent_color )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$accent_mid = get_theme_mod( 'accent_mid' );
|
$accent_mid = get_theme_mod( 'accent_mid' );
|
||||||
$accent_light = get_theme_mod( 'accent_light' );
|
$accent_light = get_theme_mod( 'accent_light' );
|
||||||
|
|
||||||
$css = '/* Custom accent color. */
|
$css = '/* Custom accent color. */
|
||||||
|
@ -317,7 +317,6 @@ function twentyfourteen_customizer_styles() {
|
||||||
color: ' . $accent_light . ';
|
color: ' . $accent_light . ';
|
||||||
}';
|
}';
|
||||||
|
|
||||||
|
|
||||||
wp_add_inline_style( 'twentyfourteen-style', $css );
|
wp_add_inline_style( 'twentyfourteen-style', $css );
|
||||||
}
|
}
|
||||||
add_action( 'wp_enqueue_scripts', 'twentyfourteen_customizer_styles' );
|
add_action( 'wp_enqueue_scripts', 'twentyfourteen_customizer_styles' );
|
||||||
|
|
|
@ -162,6 +162,8 @@ add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
|
||||||
* Displays an optional post thumbnail, with an anchor element
|
* Displays an optional post thumbnail, with an anchor element
|
||||||
* when on index views, and a div element when on a single view.
|
* when on index views, and a div element when on a single view.
|
||||||
*
|
*
|
||||||
|
* @since Twenty Fourteen 1.0
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function twentyfourteen_post_thumbnail() {
|
function twentyfourteen_post_thumbnail() {
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
_window.load( function() {
|
_window.load( function() {
|
||||||
if ( body.is( '.slider' ) ) {
|
if ( body.is( '.slider' ) ) {
|
||||||
$( '.featured-content' ).featuredslider( {
|
$( '.featured-content' ).featuredslider( {
|
||||||
selector: '.featured-content-inner > article',
|
selector: '.featured-content-inner > article',
|
||||||
controlsContainer: '.featured-content'
|
controlsContainer: '.featured-content'
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,3 @@ get_header(); ?>
|
||||||
get_sidebar( 'content' );
|
get_sidebar( 'content' );
|
||||||
get_sidebar();
|
get_sidebar();
|
||||||
get_footer();
|
get_footer();
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,5 @@ if ( ! is_active_sidebar( 'sidebar-2' ) )
|
||||||
return;
|
return;
|
||||||
?>
|
?>
|
||||||
<div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
|
<div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
|
||||||
<?php do_action( 'before_sidebar' ); ?>
|
|
||||||
|
|
||||||
<?php dynamic_sidebar( 'sidebar-2' ); ?>
|
<?php dynamic_sidebar( 'sidebar-2' ); ?>
|
||||||
</div><!-- #content-sidebar -->
|
</div><!-- #content-sidebar -->
|
||||||
|
|
|
@ -23,10 +23,7 @@
|
||||||
|
|
||||||
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
|
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
|
||||||
<div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
|
<div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
|
||||||
<?php
|
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||||
do_action( 'before_sidebar' );
|
</div><!-- #primary-sidebar -->
|
||||||
dynamic_sidebar( 'sidebar-1' );
|
|
||||||
?>
|
|
||||||
</div><!-- #primary-sidebar .primary-sidebar -->
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div><!-- #secondary -->
|
</div><!-- #secondary -->
|
||||||
|
|
Loading…
Reference in New Issue