mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
Twenty Fourteen: minor code cleanup in Customizer file, props obenland. Fixes #26414.
Built from https://develop.svn.wordpress.org/trunk@26643 git-svn-id: http://core.svn.wordpress.org/trunk@26533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
626d00589b
commit
05200ae863
@ -137,7 +137,10 @@ a.post-thumbnail:hover {
|
||||
.widget_nav_menu li,
|
||||
.widget_pages li,
|
||||
.widget_recent_comments li,
|
||||
.widget_recent_entries li {
|
||||
.widget_recent_entries li,
|
||||
.widget_categories li ul,
|
||||
.widget_nav_menu li ul,
|
||||
.widget_pages li ul {
|
||||
border-top: 1px solid #4d4d4d;
|
||||
}
|
||||
|
||||
@ -155,7 +158,10 @@ a.post-thumbnail:hover {
|
||||
.content-sidebar .widget_nav_menu li,
|
||||
.content-sidebar .widget_pages li,
|
||||
.content-sidebar .widget_recent_comments li,
|
||||
.content-sidebar .widget_recent_entries li {
|
||||
.content-sidebar .widget_recent_entries li,
|
||||
.content-sidebar .widget_categories li ul,
|
||||
.content-sidebar .widget_nav_menu li ul,
|
||||
.content-sidebar .widget_pages li ul {
|
||||
border-color: #e5e5e5;
|
||||
}
|
||||
|
||||
@ -560,6 +566,7 @@ a.post-thumbnail:hover {
|
||||
}
|
||||
|
||||
.ie8 .secondary-navigation {
|
||||
font-size: 11px;
|
||||
margin: 0 -30px 48px;
|
||||
width: calc(100% + 60px);
|
||||
}
|
||||
@ -754,7 +761,17 @@ a.post-thumbnail:hover {
|
||||
.ie8 .primary-sidebar .widget_recent_comments li,
|
||||
.ie8 .primary-sidebar .widget_recent_entries li {
|
||||
border-top: 0;
|
||||
padding: 0;
|
||||
padding: 0 0 6px;
|
||||
}
|
||||
|
||||
.ie8 .footer-sidebar .widget_categories li ul,
|
||||
.ie8 .footer-sidebar .widget_nav_menu li ul,
|
||||
.ie8 .footer-sidebar .widget_pages li ul,
|
||||
.ie8 .primary-sidebar .widget_categories li ul,
|
||||
.ie8 .primary-sidebar .widget_nav_menu li ul,
|
||||
.ie8 .primary-sidebar .widget_pages li ul {
|
||||
border-top: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.ie8 .grid .featured-content .entry-header {
|
||||
|
@ -15,28 +15,20 @@
|
||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
*/
|
||||
function twentyfourteen_customize_register( $wp_customize ) {
|
||||
// Add custom description to Colors and Background sections.
|
||||
$wp_customize->get_section( 'colors' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
|
||||
$wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
|
||||
|
||||
// Add postMessage support for site title and description.
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
|
||||
|
||||
// Rename the label to "Display Site Title & Tagline" in order to make this option extra clear.
|
||||
$wp_customize->add_control( 'display_header_text', array(
|
||||
'settings' => 'header_textcolor',
|
||||
'label' => __( 'Display Site Title & Tagline', 'twentyfourteen' ),
|
||||
'section' => 'title_tagline',
|
||||
'type' => 'checkbox',
|
||||
) );
|
||||
|
||||
// Rename the label to "Site Title Color" because this only effects the site title in this theme.
|
||||
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_textcolor', array(
|
||||
'label' => __( 'Site Title Color', 'twentyfourteen' ),
|
||||
'section' => 'colors',
|
||||
) ) );
|
||||
$wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' );
|
||||
|
||||
// Add custom description to Colors and Background sections.
|
||||
$wp_customize->get_section( 'colors' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
|
||||
$wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
|
||||
// Rename the label to "Display Site Title & Tagline" in order to make this option extra clear.
|
||||
$wp_customize->get_control( 'display_header_text' )->label = __( 'Display Site Title & Tagline', 'twentyfourteen' );
|
||||
|
||||
// Add the featured content section in case it's not already there.
|
||||
$wp_customize->add_section( 'featured_content', array(
|
||||
@ -72,8 +64,9 @@ add_action( 'customize_register', 'twentyfourteen_customize_register' );
|
||||
* @return string Filtered layout type (grid|slider).
|
||||
*/
|
||||
function twentyfourteen_sanitize_layout( $layout ) {
|
||||
if ( ! in_array( $layout, array( 'grid', 'slider' ) ) )
|
||||
if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) {
|
||||
$layout = 'grid';
|
||||
}
|
||||
|
||||
return $layout;
|
||||
}
|
||||
|
@ -974,12 +974,12 @@ span + .edit-link:before,
|
||||
|
||||
.secondary-navigation {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
margin: 48px 0;
|
||||
}
|
||||
|
||||
.secondary-navigation a {
|
||||
padding: 10px 0;
|
||||
padding: 9px 0;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
@ -2389,15 +2389,16 @@ a.post-thumbnail:hover {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.widget_archive li li,
|
||||
.widget_categories li li,
|
||||
.widget_links li li,
|
||||
.widget_meta li li,
|
||||
.widget_nav_menu li li,
|
||||
.widget_pages li li,
|
||||
.widget_recent_comments li li,
|
||||
.widget_recent_entries li li {
|
||||
border-top: 0;
|
||||
.widget_categories li ul,
|
||||
.widget_nav_menu li ul,
|
||||
.widget_pages li ul {
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.widget_categories li li:last-child,
|
||||
.widget_nav_menu li li:last-child,
|
||||
.widget_pages li li:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
@ -2559,7 +2560,10 @@ a.post-thumbnail:hover {
|
||||
.content-sidebar .widget_nav_menu li,
|
||||
.content-sidebar .widget_pages li,
|
||||
.content-sidebar .widget_recent_comments li,
|
||||
.content-sidebar .widget_recent_entries li {
|
||||
.content-sidebar .widget_recent_entries li,
|
||||
.content-sidebar .widget_categories li ul,
|
||||
.content-sidebar .widget_nav_menu li ul,
|
||||
.content-sidebar .widget_pages li ul {
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
@ -3591,6 +3595,7 @@ a.post-thumbnail:hover {
|
||||
}
|
||||
|
||||
.secondary-navigation {
|
||||
font-size: 11px;
|
||||
margin: 0 -30px 48px;
|
||||
width: 182px;
|
||||
}
|
||||
@ -3804,6 +3809,16 @@ a.post-thumbnail:hover {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer-sidebar .widget_categories li ul,
|
||||
.footer-sidebar .widget_nav_menu li ul,
|
||||
.footer-sidebar .widget_pages li ul,
|
||||
.primary-sidebar .widget_categories li ul,
|
||||
.primary-sidebar .widget_nav_menu li ul,
|
||||
.primary-sidebar .widget_pages li ul {
|
||||
border-top: 0;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#supplementary {
|
||||
padding: 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user