From cb7b1af55022735f0edd3ce6687077d8827257e6 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 2 Sep 2013 21:25:10 +0000 Subject: [PATCH] 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 --- wp-content/themes/twentyfourteen/header.php | 132 +-------------- .../themes/twentyfourteen/inc/customizer.php | 159 ------------------ wp-content/themes/twentyfourteen/js/theme.js | 23 +-- wp-content/themes/twentyfourteen/rtl.css | 16 +- wp-content/themes/twentyfourteen/style.css | 95 +---------- 5 files changed, 7 insertions(+), 418 deletions(-) diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php index 8da029a882..bf40b19dfe 100644 --- a/wp-content/themes/twentyfourteen/header.php +++ b/wp-content/themes/twentyfourteen/header.php @@ -23,31 +23,6 @@ > -
@@ -61,18 +36,12 @@ diff --git a/wp-content/themes/twentyfourteen/inc/customizer.php b/wp-content/themes/twentyfourteen/inc/customizer.php index 20ecbf71c0..1a42b4b932 100644 --- a/wp-content/themes/twentyfourteen/inc/customizer.php +++ b/wp-content/themes/twentyfourteen/inc/customizer.php @@ -15,165 +15,6 @@ function twentyfourteen_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->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' ); diff --git a/wp-content/themes/twentyfourteen/js/theme.js b/wp-content/themes/twentyfourteen/js/theme.js index aa610fa373..ee0993dedd 100644 --- a/wp-content/themes/twentyfourteen/js/theme.js +++ b/wp-content/themes/twentyfourteen/js/theme.js @@ -7,10 +7,8 @@ $masthead = $( '#masthead' ), $secondaryTop = $( '#secondary-top' ), $mobileNavigations = $( '#mobile-navigations'), - $socialLinksWrapper = $( 'div.social-links-wrapper' ), $searchBoxWrapper = $( 'div.search-box-wrapper' ), $searchToggle = $( 'div.search-toggle' ), - $socialLinksToggle = $( 'div.social-links-toggle' ), timeout = false; // Toggle function. @@ -19,30 +17,11 @@ $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 $searchToggle.click( function() { $( this ).toggleClass( 'active' ); $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' ) ) $searchBoxWrapper.find( '.search-field' ).focus(); } ); diff --git a/wp-content/themes/twentyfourteen/rtl.css b/wp-content/themes/twentyfourteen/rtl.css index 4151db1418..4c68bb88ee 100644 --- a/wp-content/themes/twentyfourteen/rtl.css +++ b/wp-content/themes/twentyfourteen/rtl.css @@ -82,18 +82,11 @@ blockquote.pull.alignleft { right: auto; } -.social-links-toggle, .search-toggle { float: right; } -.social-links-toggle { - border-left: 1px solid rgba(255, 255, 255, 0.4); - border-right: none; -} - -.social-links-toggle span:before, -.search-toggle span:before { +.genericon-search:before { margin-right: -8px; margin-right: -0.8rem; right: 50%; @@ -101,12 +94,6 @@ blockquote.pull.alignleft { 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 { float: left; } @@ -635,7 +622,6 @@ img.alignleft, padding-left: 0; } - .social-links-wrapper, .search-box-wrapper { padding-right: 222px; padding-right: 22.2rem; diff --git a/wp-content/themes/twentyfourteen/style.css b/wp-content/themes/twentyfourteen/style.css index 3f23298765..7e6eec4edb 100644 --- a/wp-content/themes/twentyfourteen/style.css +++ b/wp-content/themes/twentyfourteen/style.css @@ -431,7 +431,6 @@ a:active { .post-format-archive-link .meta-nav, .attachment-featured-featured img, .attachment-featured-thumbnail img, -.social-links-toggle, .search-toggle, button, html input[type="button"], @@ -639,7 +638,6 @@ body { #nav-toggle:hover { cursor: pointer; } -.social-links-toggle, .search-toggle { background-color: #24890d; -moz-box-sizing: border-box; @@ -659,27 +657,22 @@ body { text-align: center; text-transform: uppercase; } -.social-links-toggle:hover, .search-toggle:hover, -.social-links-toggle.active, .search-toggle.active { background-color: #35921f; } .search-toggle { display: none; } -.social-links-toggle:hover, .search-toggle:hover { cursor: pointer; } -.social-links-toggle span, -.search-toggle span { +.genericon-search { display: inline-block; padding: 25px 0 0 0; padding: 2.5rem 0 0 0; } -.social-links-toggle span:before, -.search-toggle span:before { +.genericon-search:before { color: #fff; margin-left: -8px; margin-left: -0.8rem; @@ -688,13 +681,6 @@ body { top: 0.9rem; left: 50%; } -.social-links-toggle span:before { - content: '\F107'; -} -.search-toggle span:before { - content: '\F400'; -} -.social-links-wrapper, .search-box-wrapper { -moz-box-sizing: border-box; box-sizing: border-box; @@ -702,76 +688,6 @@ body { width: 100%; 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 { background-color: #35921f; } @@ -2495,12 +2411,6 @@ span > object { .search-toggle { display: block; } - .social-links-toggle { - border-right: 1px solid rgba(255, 255, 255, 0.4); - } - .social-links-wrapper { - margin: 0; - } .content-area { float: left; padding: 36px 0; @@ -2788,7 +2698,6 @@ span > object { padding-left: 27px; padding-left: 2.7rem; } - .social-links-wrapper, .search-box-wrapper { padding-left: 222px; padding-left: 22.2rem;