Twenty Fourteen: remove Social Links integration. Props obenland, see #25094.

Built from https://develop.svn.wordpress.org/trunk@25214


git-svn-id: http://core.svn.wordpress.org/trunk@25185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-09-02 21:25:10 +00:00
parent 01da15c050
commit cb7b1af550
5 changed files with 7 additions and 418 deletions

View File

@ -23,31 +23,6 @@
</head> </head>
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<?php
$email_link = get_theme_mod( 'email_link' );
$twitter_link = get_theme_mod( 'twitter_link' );
$facebook_link = get_theme_mod( 'facebook_link' );
$pinterest_link = get_theme_mod( 'pinterest_link' );
$google_plus_link = get_theme_mod( 'google_plus_link' );
$linkedin_link = get_theme_mod( 'linkedin_link' );
$flickr_link = get_theme_mod( 'flickr_link' );
$github_link = get_theme_mod( 'github_link' );
$dribbble_link = get_theme_mod( 'dribbble_link' );
$vimeo_link = get_theme_mod( 'vimeo_link' );
$youtube_link = get_theme_mod( 'youtube_link' );
$social_links = ( '' != $email_link
|| '' != $twitter_link
|| '' != $facebook_link
|| '' != $pinterest_link
|| '' != $google_plus_link
|| '' != $linkedin_link
|| '' != $flickr_link
|| '' != $github_link
|| '' != $dribbble_link
|| '' != $vimeo_link
|| '' != $youtube_link
) ? true : false;
?>
<div id="page" class="hfeed site"> <div id="page" class="hfeed site">
<?php do_action( 'before' ); ?> <?php do_action( 'before' ); ?>
@ -61,18 +36,12 @@
<?php endif; ?> <?php endif; ?>
<header id="masthead" class="site-header" role="banner"> <header id="masthead" class="site-header" role="banner">
<div class="header-main clear"> <div class="header-main">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<div class="header-extra"> <div class="header-extra">
<?php if ( $social_links ) : ?>
<div class="social-links-toggle">
<span class="genericon"><?php _e( 'Connect', 'twentyfourteen' ); ?></span>
</div>
<?php endif; ?>
<div class="search-toggle"> <div class="search-toggle">
<span class="genericon"><?php _e( 'Search', 'twentyfourteen' ); ?></span> <span class="genericon-search"><?php _e( 'Search', 'twentyfourteen' ); ?></span>
</div> </div>
</div> </div>
@ -81,108 +50,13 @@
<div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div> <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav> </nav>
</div> </div>
<div id="mobile-navigations" class="hide"></div> <div id="mobile-navigations" class="hide"></div>
<?php if ( $social_links ) : ?>
<div class="social-links-wrapper hide">
<ul class="social-links clear">
<?php if ( is_email( $email_link ) ) : ?>
<li class="email-link">
<a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Email', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $twitter_link ) : ?>
<li class="twitter-link">
<a href="<?php echo esc_url( $twitter_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Twitter', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Twitter', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $facebook_link ) : ?>
<li class="facebook-link">
<a href="<?php echo esc_url( $facebook_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Facebook', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Facebook', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $pinterest_link ) : ?>
<li class="pinterest-link">
<a href="<?php echo esc_url( $pinterest_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Pinterest', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Pinterest', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $google_plus_link ) : ?>
<li class="google-link">
<a href="<?php echo esc_url( $google_plus_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Google Plus', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Google Plus', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $linkedin_link ) : ?>
<li class="linkedin-link">
<a href="<?php echo esc_url( $linkedin_link ); ?>" class="genericon" title="<?php esc_attr_e( 'LinkedIn', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'LinkedIn', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $flickr_link ) : ?>
<li class="flickr-link">
<a href="<?php echo esc_url( $flickr_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Flickr', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Flickr', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $github_link ) : ?>
<li class="github-link">
<a href="<?php echo esc_url( $github_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Github', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Github', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $dribbble_link ) : ?>
<li class="dribbble-link">
<a href="<?php echo esc_url( $dribbble_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Dribbble', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Dribbble', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $vimeo_link ) : ?>
<li class="vimeo-link">
<a href="<?php echo esc_url( $vimeo_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Vimeo', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'Vimeo', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
<?php if ( '' != $youtube_link ) : ?>
<li class="youtube-link">
<a href="<?php echo esc_url( $youtube_link ); ?>" class="genericon" title="<?php esc_attr_e( 'YouTube', 'twentyfourteen' ); ?>" target="_blank">
<?php _e( 'YouTube', 'twentyfourteen' ); ?>
</a>
</li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<div class="search-box-wrapper hide"> <div class="search-box-wrapper hide">
<div class="search-box clear"> <div class="search-box clear">
<?php get_search_form(); ?> <?php get_search_form(); ?>
</div> </div>
</div> </div>
</header><!-- #masthead --> </header><!-- #masthead -->

View File

@ -15,165 +15,6 @@
function twentyfourteen_customize_register( $wp_customize ) { function twentyfourteen_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->add_section( 'twentyfourteen_theme_options', array(
'title' => __( 'Theme Options', 'twentyfourteen' ),
'priority' => 35,
) );
$wp_customize->add_setting( 'email_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'email_link', array(
'label' => __( 'Email Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'email_link',
'type' => 'text',
'priority' => 1,
) );
$wp_customize->add_setting( 'twitter_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'twitter_link', array(
'label' => __( 'Twitter Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'twitter_link',
'type' => 'text',
'priority' => 2,
) );
$wp_customize->add_setting( 'facebook_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'facebook_link', array(
'label' => __( 'Facebook Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'facebook_link',
'type' => 'text',
'priority' => 3,
) );
$wp_customize->add_setting( 'pinterest_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'pinterest_link', array(
'label' => __( 'Pinterest Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'pinterest_link',
'type' => 'text',
'priority' => 4,
) );
$wp_customize->add_setting( 'google_plus_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'google_plus_link', array(
'label' => __( 'Google+ Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'google_plus_link',
'type' => 'text',
'priority' => 5,
) );
$wp_customize->add_setting( 'linkedin_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'linkedin_link', array(
'label' => __( 'LinkedIn Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'linkedin_link',
'type' => 'text',
'priority' => 6,
) );
$wp_customize->add_setting( 'flickr_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'flickr_link', array(
'label' => __( 'Flickr Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'flickr_link',
'type' => 'text',
'priority' => 7,
) );
$wp_customize->add_setting( 'github_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'github_link', array(
'label' => __( 'Github Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'github_link',
'type' => 'text',
'priority' => 8,
) );
$wp_customize->add_setting( 'dribbble_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'dribbble_link', array(
'label' => __( 'Dribbble Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'dribbble_link',
'type' => 'text',
'priority' => 9,
) );
$wp_customize->add_setting( 'vimeo_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'vimeo_link', array(
'label' => __( 'Vimeo Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'vimeo_link',
'type' => 'text',
'priority' => 10,
) );
$wp_customize->add_setting( 'youtube_link', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'youtube_link', array(
'label' => __( 'YouTube Link', 'twentyfourteen' ),
'section' => 'twentyfourteen_theme_options',
'settings' => 'youtube_link',
'type' => 'text',
'priority' => 11,
) );
} }
add_action( 'customize_register', 'twentyfourteen_customize_register' ); add_action( 'customize_register', 'twentyfourteen_customize_register' );

View File

@ -7,10 +7,8 @@
$masthead = $( '#masthead' ), $masthead = $( '#masthead' ),
$secondaryTop = $( '#secondary-top' ), $secondaryTop = $( '#secondary-top' ),
$mobileNavigations = $( '#mobile-navigations'), $mobileNavigations = $( '#mobile-navigations'),
$socialLinksWrapper = $( 'div.social-links-wrapper' ),
$searchBoxWrapper = $( 'div.search-box-wrapper' ), $searchBoxWrapper = $( 'div.search-box-wrapper' ),
$searchToggle = $( 'div.search-toggle' ), $searchToggle = $( 'div.search-toggle' ),
$socialLinksToggle = $( 'div.social-links-toggle' ),
timeout = false; timeout = false;
// Toggle function. // Toggle function.
@ -19,30 +17,11 @@
$masthead.find( '#mobile-navigations' ).toggleClass( 'hide' ); $masthead.find( '#mobile-navigations' ).toggleClass( 'hide' );
} }
// Click event for toggle the social links
$socialLinksToggle.click( function() {
$( this ).toggleClass( 'active' );
$socialLinksWrapper.toggleClass( 'hide' );
// if .search-box-wrapper is visible hide it
if ( ! $searchBoxWrapper.hasClass( 'hide' ) ) {
$searchBoxWrapper.addClass( 'hide' );
}
if ( $searchToggle.hasClass( 'active' ) ) {
$searchToggle.removeClass( 'active' );
}
} );
// Click event for toggle the search // Click event for toggle the search
$searchToggle.click( function() { $searchToggle.click( function() {
$( this ).toggleClass( 'active' ); $( this ).toggleClass( 'active' );
$searchBoxWrapper.toggleClass( 'hide' ); $searchBoxWrapper.toggleClass( 'hide' );
// if .social-links-wrapper is visible hide it
if ( ! $socialLinksWrapper.hasClass( 'hide' ) ) {
$socialLinksWrapper.addClass( 'hide' );
}
if ( $socialLinksToggle.hasClass( 'active' ) ) {
$socialLinksToggle.removeClass( 'active' );
}
if ( $( this ).hasClass( 'active' ) ) if ( $( this ).hasClass( 'active' ) )
$searchBoxWrapper.find( '.search-field' ).focus(); $searchBoxWrapper.find( '.search-field' ).focus();
} ); } );

View File

@ -82,18 +82,11 @@ blockquote.pull.alignleft {
right: auto; right: auto;
} }
.social-links-toggle,
.search-toggle { .search-toggle {
float: right; float: right;
} }
.social-links-toggle { .genericon-search:before {
border-left: 1px solid rgba(255, 255, 255, 0.4);
border-right: none;
}
.social-links-toggle span:before,
.search-toggle span:before {
margin-right: -8px; margin-right: -8px;
margin-right: -0.8rem; margin-right: -0.8rem;
right: 50%; right: 50%;
@ -101,12 +94,6 @@ blockquote.pull.alignleft {
margin-left: auto; margin-left: auto;
} }
.social-links li {
float: left;
margin: 8px 0 8px 10px;
margin: 0.8rem 0 0.8rem 1.0rem;
}
.search-box .search-field { .search-box .search-field {
float: left; float: left;
} }
@ -635,7 +622,6 @@ img.alignleft,
padding-left: 0; padding-left: 0;
} }
.social-links-wrapper,
.search-box-wrapper { .search-box-wrapper {
padding-right: 222px; padding-right: 222px;
padding-right: 22.2rem; padding-right: 22.2rem;

View File

@ -431,7 +431,6 @@ a:active {
.post-format-archive-link .meta-nav, .post-format-archive-link .meta-nav,
.attachment-featured-featured img, .attachment-featured-featured img,
.attachment-featured-thumbnail img, .attachment-featured-thumbnail img,
.social-links-toggle,
.search-toggle, .search-toggle,
button, button,
html input[type="button"], html input[type="button"],
@ -639,7 +638,6 @@ body {
#nav-toggle:hover { #nav-toggle:hover {
cursor: pointer; cursor: pointer;
} }
.social-links-toggle,
.search-toggle { .search-toggle {
background-color: #24890d; background-color: #24890d;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
@ -659,27 +657,22 @@ body {
text-align: center; text-align: center;
text-transform: uppercase; text-transform: uppercase;
} }
.social-links-toggle:hover,
.search-toggle:hover, .search-toggle:hover,
.social-links-toggle.active,
.search-toggle.active { .search-toggle.active {
background-color: #35921f; background-color: #35921f;
} }
.search-toggle { .search-toggle {
display: none; display: none;
} }
.social-links-toggle:hover,
.search-toggle:hover { .search-toggle:hover {
cursor: pointer; cursor: pointer;
} }
.social-links-toggle span, .genericon-search {
.search-toggle span {
display: inline-block; display: inline-block;
padding: 25px 0 0 0; padding: 25px 0 0 0;
padding: 2.5rem 0 0 0; padding: 2.5rem 0 0 0;
} }
.social-links-toggle span:before, .genericon-search:before {
.search-toggle span:before {
color: #fff; color: #fff;
margin-left: -8px; margin-left: -8px;
margin-left: -0.8rem; margin-left: -0.8rem;
@ -688,13 +681,6 @@ body {
top: 0.9rem; top: 0.9rem;
left: 50%; left: 50%;
} }
.social-links-toggle span:before {
content: '\F107';
}
.search-toggle span:before {
content: '\F400';
}
.social-links-wrapper,
.search-box-wrapper { .search-box-wrapper {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
@ -702,76 +688,6 @@ body {
width: 100%; width: 100%;
z-index: 2; z-index: 2;
} }
.social-links {
background-color: #35921f;
list-style: none;
margin: 0;
padding-top: 8px;
padding-top: 0.8rem;
}
.social-links li {
display: block;
float: right;
margin: 0 10px 8px 0;
margin: 0 1.0rem 0.8rem 0;
width: 32px;
width: 3.2rem;
height: 32px;
height: 3.2rem;
}
.social-links a {
background-color: rgba(255,255,255,0.2);
border-radius: 2px;
color: #fff;
display: inline-block;
overflow: hidden;
position: relative;
text-align: center;
text-decoration: none;
width: 32px;
width: 3.2rem;
height: 32px;s
height: 3.2rem;
}
.social-links li a:hover {
background-color: rgba(0,0,0,0.2);
}
.social-links a:before {
line-height: 2;
}
.email-link a:before {
content: '\f410';
}
.facebook-link a:before {
content: '\f203';
}
.twitter-link a:before {
content: '\f202';
}
.google-link a:before {
content: '\f206';
}
.pinterest-link a:before {
content: '\f210';
}
.linkedin-link a:before {
content: '\f208';
}
.flickr-link a:before {
content: '\f211';
}
.github-link a:before {
content: '\f200';
}
.dribbble-link a:before {
content: '\f201';
}
.vimeo-link a:before {
content: '\f212';
}
.youtube-link a:before {
content: '\f213';
}
.search-box { .search-box {
background-color: #35921f; background-color: #35921f;
} }
@ -2495,12 +2411,6 @@ span > object {
.search-toggle { .search-toggle {
display: block; display: block;
} }
.social-links-toggle {
border-right: 1px solid rgba(255, 255, 255, 0.4);
}
.social-links-wrapper {
margin: 0;
}
.content-area { .content-area {
float: left; float: left;
padding: 36px 0; padding: 36px 0;
@ -2788,7 +2698,6 @@ span > object {
padding-left: 27px; padding-left: 27px;
padding-left: 2.7rem; padding-left: 2.7rem;
} }
.social-links-wrapper,
.search-box-wrapper { .search-box-wrapper {
padding-left: 222px; padding-left: 222px;
padding-left: 22.2rem; padding-left: 22.2rem;