Make WordPress Core

Changeset 25214


Ignore:
Timestamp:
09/02/2013 09:24:41 PM (11 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r25021 r25214  
    2424
    2525<body <?php body_class(); ?>>
    26 <?php
    27     $email_link = get_theme_mod( 'email_link' );
    28     $twitter_link = get_theme_mod( 'twitter_link' );
    29     $facebook_link = get_theme_mod( 'facebook_link' );
    30     $pinterest_link = get_theme_mod( 'pinterest_link' );
    31     $google_plus_link = get_theme_mod( 'google_plus_link' );
    32     $linkedin_link = get_theme_mod( 'linkedin_link' );
    33     $flickr_link = get_theme_mod( 'flickr_link' );
    34     $github_link = get_theme_mod( 'github_link' );
    35     $dribbble_link = get_theme_mod( 'dribbble_link' );
    36     $vimeo_link = get_theme_mod( 'vimeo_link' );
    37     $youtube_link = get_theme_mod( 'youtube_link' );
    38     $social_links = ( '' != $email_link
    39         || '' != $twitter_link
    40         || '' != $facebook_link
    41         || '' != $pinterest_link
    42         || '' != $google_plus_link
    43         || '' != $linkedin_link
    44         || '' != $flickr_link
    45         || '' != $github_link
    46         || '' != $dribbble_link
    47         || '' != $vimeo_link
    48         || '' != $youtube_link
    49     ) ? true : false;
    50 ?>
    5126<div id="page" class="hfeed site">
    5227    <?php do_action( 'before' ); ?>
     
    6237
    6338    <header id="masthead" class="site-header" role="banner">
    64         <div class="header-main clear">
     39        <div class="header-main">
    6540            <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>
    6641
    6742            <div class="header-extra">
    68                 <?php if ( $social_links ) : ?>
    69                 <div class="social-links-toggle">
    70                     <span class="genericon"><?php _e( 'Connect', 'twentyfourteen' ); ?></span>
    71                 </div>
    72                 <?php endif; ?>
    73 
    7443                <div class="search-toggle">
    75                     <span class="genericon"><?php _e( 'Search', 'twentyfourteen' ); ?></span>
     44                    <span class="genericon-search"><?php _e( 'Search', 'twentyfourteen' ); ?></span>
    7645                </div>
    7746            </div>
     
    8251                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    8352            </nav>
    84 
    8553        </div>
    8654
    8755        <div id="mobile-navigations" class="hide"></div>
    8856
    89         <?php if ( $social_links ) : ?>
    90             <div class="social-links-wrapper hide">
    91                 <ul class="social-links clear">
    92                     <?php if ( is_email( $email_link ) ) : ?>
    93                     <li class="email-link">
    94                         <a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank">
    95                             <?php _e( 'Email', 'twentyfourteen' ); ?>
    96                         </a>
    97                     </li>
    98                     <?php endif; ?>
    99 
    100                     <?php if ( '' != $twitter_link ) : ?>
    101                     <li class="twitter-link">
    102                         <a href="<?php echo esc_url( $twitter_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Twitter', 'twentyfourteen' ); ?>" target="_blank">
    103                             <?php _e( 'Twitter', 'twentyfourteen' ); ?>
    104                         </a>
    105                     </li>
    106                     <?php endif; ?>
    107 
    108                     <?php if ( '' != $facebook_link ) : ?>
    109                     <li class="facebook-link">
    110                         <a href="<?php echo esc_url( $facebook_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Facebook', 'twentyfourteen' ); ?>" target="_blank">
    111                             <?php _e( 'Facebook', 'twentyfourteen' ); ?>
    112                         </a>
    113                     </li>
    114                     <?php endif; ?>
    115 
    116                     <?php if ( '' != $pinterest_link ) : ?>
    117                     <li class="pinterest-link">
    118                         <a href="<?php echo esc_url( $pinterest_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Pinterest', 'twentyfourteen' ); ?>" target="_blank">
    119                             <?php _e( 'Pinterest', 'twentyfourteen' ); ?>
    120                         </a>
    121                     </li>
    122                     <?php endif; ?>
    123 
    124                     <?php if ( '' != $google_plus_link ) : ?>
    125                     <li class="google-link">
    126                         <a href="<?php echo esc_url( $google_plus_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Google Plus', 'twentyfourteen' ); ?>" target="_blank">
    127                             <?php _e( 'Google Plus', 'twentyfourteen' ); ?>
    128                         </a>
    129                     </li>
    130                     <?php endif; ?>
    131 
    132                     <?php if ( '' != $linkedin_link ) : ?>
    133                     <li class="linkedin-link">
    134                         <a href="<?php echo esc_url( $linkedin_link ); ?>" class="genericon" title="<?php esc_attr_e( 'LinkedIn', 'twentyfourteen' ); ?>" target="_blank">
    135                             <?php _e( 'LinkedIn', 'twentyfourteen' ); ?>
    136                         </a>
    137                     </li>
    138                     <?php endif; ?>
    139 
    140                     <?php if ( '' != $flickr_link ) : ?>
    141                     <li class="flickr-link">
    142                         <a href="<?php echo esc_url( $flickr_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Flickr', 'twentyfourteen' ); ?>" target="_blank">
    143                             <?php _e( 'Flickr', 'twentyfourteen' ); ?>
    144                         </a>
    145                     </li>
    146                     <?php endif; ?>
    147 
    148                     <?php if ( '' != $github_link ) : ?>
    149                     <li class="github-link">
    150                         <a href="<?php echo esc_url( $github_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Github', 'twentyfourteen' ); ?>" target="_blank">
    151                             <?php _e( 'Github', 'twentyfourteen' ); ?>
    152                         </a>
    153                     </li>
    154                     <?php endif; ?>
    155 
    156                     <?php if ( '' != $dribbble_link ) : ?>
    157                     <li class="dribbble-link">
    158                         <a href="<?php echo esc_url( $dribbble_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Dribbble', 'twentyfourteen' ); ?>" target="_blank">
    159                             <?php _e( 'Dribbble', 'twentyfourteen' ); ?>
    160                         </a>
    161                     </li>
    162                     <?php endif; ?>
    163 
    164                     <?php if ( '' != $vimeo_link ) : ?>
    165                     <li class="vimeo-link">
    166                         <a href="<?php echo esc_url( $vimeo_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Vimeo', 'twentyfourteen' ); ?>" target="_blank">
    167                             <?php _e( 'Vimeo', 'twentyfourteen' ); ?>
    168                         </a>
    169                     </li>
    170                     <?php endif; ?>
    171 
    172                     <?php if ( '' != $youtube_link ) : ?>
    173                     <li class="youtube-link">
    174                         <a href="<?php echo esc_url( $youtube_link ); ?>" class="genericon" title="<?php esc_attr_e( 'YouTube', 'twentyfourteen' ); ?>" target="_blank">
    175                             <?php _e( 'YouTube', 'twentyfourteen' ); ?>
    176                         </a>
    177                     </li>
    178                     <?php endif; ?>
    179                 </ul>
    180             </div>
    181         <?php endif; ?>
    182 
    18357        <div class="search-box-wrapper hide">
    18458            <div class="search-box clear">
    185             <?php get_search_form(); ?>
     59                <?php get_search_form(); ?>
    18660            </div>
    18761        </div>
  • trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php

    r25021 r25214  
    1616    $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    1717    $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
    18 
    19     $wp_customize->add_section( 'twentyfourteen_theme_options', array(
    20         'title'         => __( 'Theme Options', 'twentyfourteen' ),
    21         'priority'      => 35,
    22     ) );
    23 
    24     $wp_customize->add_setting( 'email_link', array(
    25         'default'       => '',
    26         'type'          => 'theme_mod',
    27         'capability'    => 'edit_theme_options',
    28     ) );
    29 
    30     $wp_customize->add_control( 'email_link', array(
    31         'label'         => __( 'Email Link', 'twentyfourteen' ),
    32         'section'       => 'twentyfourteen_theme_options',
    33         'settings'      => 'email_link',
    34         'type'          => 'text',
    35         'priority'      => 1,
    36     ) );
    37 
    38     $wp_customize->add_setting( 'twitter_link', array(
    39         'default'       => '',
    40         'type'          => 'theme_mod',
    41         'capability'    => 'edit_theme_options',
    42     ) );
    43 
    44     $wp_customize->add_control( 'twitter_link', array(
    45         'label'         => __( 'Twitter Link', 'twentyfourteen' ),
    46         'section'       => 'twentyfourteen_theme_options',
    47         'settings'      => 'twitter_link',
    48         'type'          => 'text',
    49         'priority'      => 2,
    50     ) );
    51 
    52     $wp_customize->add_setting( 'facebook_link', array(
    53         'default'       => '',
    54         'type'          => 'theme_mod',
    55         'capability'    => 'edit_theme_options',
    56     ) );
    57 
    58     $wp_customize->add_control( 'facebook_link', array(
    59         'label'         => __( 'Facebook Link', 'twentyfourteen' ),
    60         'section'       => 'twentyfourteen_theme_options',
    61         'settings'      => 'facebook_link',
    62         'type'          => 'text',
    63         'priority'      => 3,
    64     ) );
    65 
    66     $wp_customize->add_setting( 'pinterest_link', array(
    67         'default'       => '',
    68         'type'          => 'theme_mod',
    69         'capability'    => 'edit_theme_options',
    70     ) );
    71 
    72     $wp_customize->add_control( 'pinterest_link', array(
    73         'label'         => __( 'Pinterest Link', 'twentyfourteen' ),
    74         'section'       => 'twentyfourteen_theme_options',
    75         'settings'      => 'pinterest_link',
    76         'type'          => 'text',
    77         'priority'      => 4,
    78     ) );
    79 
    80     $wp_customize->add_setting( 'google_plus_link', array(
    81         'default'       => '',
    82         'type'          => 'theme_mod',
    83         'capability'    => 'edit_theme_options',
    84     ) );
    85 
    86     $wp_customize->add_control( 'google_plus_link', array(
    87         'label'         => __( 'Google+ Link', 'twentyfourteen' ),
    88         'section'       => 'twentyfourteen_theme_options',
    89         'settings'      => 'google_plus_link',
    90         'type'          => 'text',
    91         'priority'      => 5,
    92     ) );
    93 
    94     $wp_customize->add_setting( 'linkedin_link', array(
    95         'default'       => '',
    96         'type'          => 'theme_mod',
    97         'capability'    => 'edit_theme_options',
    98     ) );
    99 
    100     $wp_customize->add_control( 'linkedin_link', array(
    101         'label'         => __( 'LinkedIn Link', 'twentyfourteen' ),
    102         'section'       => 'twentyfourteen_theme_options',
    103         'settings'      => 'linkedin_link',
    104         'type'          => 'text',
    105         'priority'      => 6,
    106     ) );
    107 
    108     $wp_customize->add_setting( 'flickr_link', array(
    109         'default'       => '',
    110         'type'          => 'theme_mod',
    111         'capability'    => 'edit_theme_options',
    112     ) );
    113 
    114     $wp_customize->add_control( 'flickr_link', array(
    115         'label'         => __( 'Flickr Link', 'twentyfourteen' ),
    116         'section'       => 'twentyfourteen_theme_options',
    117         'settings'      => 'flickr_link',
    118         'type'          => 'text',
    119         'priority'      => 7,
    120     ) );
    121 
    122     $wp_customize->add_setting( 'github_link', array(
    123         'default'       => '',
    124         'type'          => 'theme_mod',
    125         'capability'    => 'edit_theme_options',
    126     ) );
    127 
    128     $wp_customize->add_control( 'github_link', array(
    129         'label'         => __( 'Github Link', 'twentyfourteen' ),
    130         'section'       => 'twentyfourteen_theme_options',
    131         'settings'      => 'github_link',
    132         'type'          => 'text',
    133         'priority'      => 8,
    134     ) );
    135 
    136     $wp_customize->add_setting( 'dribbble_link', array(
    137         'default'       => '',
    138         'type'          => 'theme_mod',
    139         'capability'    => 'edit_theme_options',
    140     ) );
    141 
    142     $wp_customize->add_control( 'dribbble_link', array(
    143         'label'         => __( 'Dribbble Link', 'twentyfourteen' ),
    144         'section'       => 'twentyfourteen_theme_options',
    145         'settings'      => 'dribbble_link',
    146         'type'          => 'text',
    147         'priority'      => 9,
    148     ) );
    149 
    150     $wp_customize->add_setting( 'vimeo_link', array(
    151         'default'       => '',
    152         'type'          => 'theme_mod',
    153         'capability'    => 'edit_theme_options',
    154     ) );
    155 
    156     $wp_customize->add_control( 'vimeo_link', array(
    157         'label'         => __( 'Vimeo Link', 'twentyfourteen' ),
    158         'section'       => 'twentyfourteen_theme_options',
    159         'settings'      => 'vimeo_link',
    160         'type'          => 'text',
    161         'priority'      => 10,
    162     ) );
    163 
    164     $wp_customize->add_setting( 'youtube_link', array(
    165         'default'       => '',
    166         'type'          => 'theme_mod',
    167         'capability'    => 'edit_theme_options',
    168     ) );
    169 
    170     $wp_customize->add_control( 'youtube_link', array(
    171         'label'         => __( 'YouTube Link', 'twentyfourteen' ),
    172         'section'       => 'twentyfourteen_theme_options',
    173         'settings'      => 'youtube_link',
    174         'type'          => 'text',
    175         'priority'      => 11,
    176     ) );
    17718}
    17819add_action( 'customize_register', 'twentyfourteen_customize_register' );
  • trunk/src/wp-content/themes/twentyfourteen/js/theme.js

    r25094 r25214  
    88            $secondaryTop = $( '#secondary-top' ),
    99            $mobileNavigations = $( '#mobile-navigations'),
    10             $socialLinksWrapper = $( 'div.social-links-wrapper' ),
    1110            $searchBoxWrapper = $( 'div.search-box-wrapper' ),
    1211            $searchToggle = $( 'div.search-toggle' ),
    13             $socialLinksToggle = $( 'div.social-links-toggle' ),
    1412            timeout = false;
    1513
     
    2018        }
    2119
    22         // Click event for toggle the social links
    23         $socialLinksToggle.click( function() {
    24             $( this ).toggleClass( 'active' );
    25             $socialLinksWrapper.toggleClass( 'hide' );
    26             // if .search-box-wrapper is visible hide it
    27             if ( ! $searchBoxWrapper.hasClass( 'hide' ) ) {
    28                 $searchBoxWrapper.addClass( 'hide' );
    29             }
    30             if ( $searchToggle.hasClass( 'active' ) ) {
    31                 $searchToggle.removeClass( 'active' );
    32             }
    33         } );
    34 
    3520        // Click event for toggle the search
    3621        $searchToggle.click( function() {
    3722            $( this ).toggleClass( 'active' );
    3823            $searchBoxWrapper.toggleClass( 'hide' );
    39             // if .social-links-wrapper is visible hide it
    40             if ( ! $socialLinksWrapper.hasClass( 'hide' ) ) {
    41                 $socialLinksWrapper.addClass( 'hide' );
    42             }
    43             if ( $socialLinksToggle.hasClass( 'active' ) ) {
    44                 $socialLinksToggle.removeClass( 'active' );
    45             }
     24
    4625            if ( $( this ).hasClass( 'active' ) )
    4726                $searchBoxWrapper.find( '.search-field' ).focus();
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r25213 r25214  
    8383}
    8484
    85 .social-links-toggle,
    8685.search-toggle {
    8786    float: right;
    8887}
    8988
    90 .social-links-toggle {
    91     border-left: 1px solid rgba(255, 255, 255, 0.4);
    92     border-right: none;
    93 }
    94 
    95 .social-links-toggle span:before,
    96 .search-toggle span:before {
     89.genericon-search:before {
    9790    margin-right: -8px;
    9891    margin-right: -0.8rem;
     
    10093    left: auto;
    10194    margin-left: auto;
    102 }
    103 
    104 .social-links li {
    105     float: left;
    106     margin: 8px 0 8px 10px;
    107     margin: 0.8rem 0 0.8rem 1.0rem;
    10895}
    10996
     
    636623    }
    637624
    638     .social-links-wrapper,
    639625    .search-box-wrapper {
    640626        padding-right: 222px;
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r25213 r25214  
    432432.attachment-featured-featured img,
    433433.attachment-featured-thumbnail img,
    434 .social-links-toggle,
    435434.search-toggle,
    436435button,
     
    640639    cursor: pointer;
    641640}
    642 .social-links-toggle,
    643641.search-toggle {
    644642    background-color: #24890d;
     
    660658    text-transform: uppercase;
    661659}
    662 .social-links-toggle:hover,
    663660.search-toggle:hover,
    664 .social-links-toggle.active,
    665661.search-toggle.active {
    666662    background-color: #35921f;
     
    669665    display: none;
    670666}
    671 .social-links-toggle:hover,
    672667.search-toggle:hover {
    673668    cursor: pointer;
    674669}
    675 .social-links-toggle span,
    676 .search-toggle span {
     670.genericon-search {
    677671    display: inline-block;
    678672    padding: 25px 0 0 0;
    679673    padding: 2.5rem 0 0 0;
    680674}
    681 .social-links-toggle span:before,
    682 .search-toggle span:before {
     675.genericon-search:before {
    683676    color: #fff;
    684677    margin-left: -8px;
     
    689682        left: 50%;
    690683}
    691 .social-links-toggle span:before {
    692     content: '\F107';
    693 }
    694 .search-toggle span:before {
    695     content: '\F400';
    696 }
    697 .social-links-wrapper,
    698684.search-box-wrapper {
    699685    -moz-box-sizing: border-box;
     
    702688    width: 100%;
    703689    z-index: 2;
    704 }
    705 .social-links {
    706     background-color: #35921f;
    707     list-style: none;
    708     margin: 0;
    709     padding-top: 8px;
    710     padding-top: 0.8rem;
    711 }
    712 .social-links li {
    713     display: block;
    714     float: right;
    715     margin: 0 10px 8px 0;
    716     margin: 0 1.0rem 0.8rem 0;
    717     width: 32px;
    718     width: 3.2rem;
    719     height: 32px;
    720     height: 3.2rem;
    721 }
    722 .social-links a {
    723     background-color: rgba(255,255,255,0.2);
    724     border-radius: 2px;
    725     color: #fff;
    726     display: inline-block;
    727     overflow: hidden;
    728     position: relative;
    729     text-align: center;
    730     text-decoration: none;
    731     width: 32px;
    732     width: 3.2rem;
    733     height: 32px;s
    734     height: 3.2rem;
    735 }
    736 .social-links li a:hover {
    737     background-color: rgba(0,0,0,0.2);
    738 }
    739 .social-links a:before {
    740     line-height: 2;
    741 }
    742 .email-link a:before {
    743     content: '\f410';
    744 }
    745 .facebook-link a:before {
    746     content: '\f203';
    747 }
    748 .twitter-link a:before {
    749     content: '\f202';
    750 }
    751 .google-link a:before {
    752     content: '\f206';
    753 }
    754 .pinterest-link a:before {
    755     content: '\f210';
    756 }
    757 .linkedin-link a:before {
    758     content: '\f208';
    759 }
    760 .flickr-link a:before {
    761     content: '\f211';
    762 }
    763 .github-link a:before {
    764     content: '\f200';
    765 }
    766 .dribbble-link a:before {
    767     content: '\f201';
    768 }
    769 .vimeo-link a:before {
    770     content: '\f212';
    771 }
    772 .youtube-link a:before {
    773     content: '\f213';
    774690}
    775691.search-box {
     
    24962412        display: block;
    24972413    }
    2498     .social-links-toggle {
    2499         border-right: 1px solid rgba(255, 255, 255, 0.4);
    2500     }
    2501     .social-links-wrapper {
    2502         margin: 0;
    2503     }
    25042414    .content-area {
    25052415        float: left;
     
    27892699        padding-left: 2.7rem;
    27902700    }
    2791     .social-links-wrapper,
    27922701    .search-box-wrapper {
    27932702        padding-left: 222px;
Note: See TracChangeset for help on using the changeset viewer.