Skip to content
Permalink
Browse files

Remove the 'Twitter Username' option

After the Twitter sharing buttons was removed in e3198c2 and 93d0a05,
the Twitter username is only used in the Author Profile box.

If child themes wants a Twitter username, they can use:
add_action( "{$prefix}_close_author_box", 'youraction' );
  • Loading branch information
jayj committed Aug 7, 2013
1 parent f94db22 commit 5f5cb06d4eeb41d7b43d605f75ba1e6002748da1
Showing with 1 addition and 101 deletions.
  1. +0 −8 functions.php
  2. +0 −26 functions/admin.php
  3. +0 −21 functions/customize.php
  4. BIN images/twitter.png
  5. +0 −11 less/entry.less
  6. +0 −8 loop-meta.php
  7. +0 −15 rtl.css
  8. +1 −1 section-recentposts.php
  9. +0 −11 style.css
@@ -711,14 +711,6 @@ function cakifo_author_box() { ?>
<?php echo wpautop( get_the_author_meta( 'description' ) ); ?>
</div>

<?php if ( $twitter = get_the_author_meta( 'twitter' ) ) { ?>
<p class="twitter-link">
<a href="<?php echo esc_url( "http://twitter.com/{$twitter}" ); ?>" title="<?php printf( esc_attr__( 'Follow %s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>">
<?php printf( __( 'Follow %s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>
</a>
</p>
<?php } // Twitter ?>

<?php do_atomic( 'close_author_box' ); // cakifo_close_author_box ?>

</div> <!-- .author-profile -->
@@ -191,32 +191,6 @@ function cakifo_theme_meta_box() { ?>
</td>
</tr>

<!-- Twitter username -->
<tr>
<?php
/**
* Get Twitter username
*/
$current_user = wp_get_current_user();
$twitter_current_user = $current_user->twitter;
$twitter_setting = hybrid_get_setting( 'twitter_username' );
$twitter_username = '';

if ( isset( $twitter_setting ) )
$twitter_username = $twitter_setting;
elseif( isset( $twitter_current_user ) )
$twitter_username = $current_user->twitter;
?>

<th>
<label for="<?php echo hybrid_settings_field_id( 'twitter_username' ); ?>"><?php _e( 'Twitter username', 'cakifo' ); ?></label>
</th>
<td>
<p><input type="text" id="<?php echo hybrid_settings_field_id( 'twitter_username' ); ?>" name="<?php echo hybrid_settings_field_name( 'twitter_username' ); ?>" value="<?php echo esc_attr( $twitter_username ); ?>" /></p>
<p><?php _e( 'Your Twitter username (if you have one)', 'cakifo' ); ?>
</td>
</tr>

</table> <!-- .form-table --> <?php
}

@@ -124,27 +124,6 @@ function cakifo_customize_register( $wp_customize ) {
)
);

/* Add the 'twitter_username' setting */
$wp_customize->add_setting(
"{$prefix}_theme_settings[twitter_username]",
array(
'default' => '',
'type' => 'option',
'capability' => 'edit_theme_options',
)
);

/* Add the text control for the 'twitter_username' setting */
$wp_customize->add_control(
'twitter_username',
array(
'settings' => "{$prefix}_theme_settings[twitter_username]",
'label' => esc_html__( 'Optional: Twitter username', 'cakifo' ),
'section' => 'cakifo_customize_settings',
'type' => 'text',
)
);

/* Add the 'headlines_category' setting */
$wp_customize->add_setting(
"{$prefix}_theme_settings[headlines_category]",
BIN -737 Bytes images/twitter.png
Binary file not shown.
@@ -119,17 +119,6 @@
}
}

.author-profile .twitter-link,
.loop-meta .twitter-link {
text-align: right;

a {
padding-left: (@gutter-width-small - 2px);
.font-size(@font-size-small);
background: url(images/twitter.png) no-repeat left bottom;
}
}

/* =============================================================================
Components: Loop meta
========================================================================== */
@@ -116,14 +116,6 @@
<?php echo get_avatar( get_the_author_meta( 'user_email', $user_id ), 96, '', $name ); ?>

<?php echo wpautop( get_the_author_meta( 'description', $user_id ) ); ?>

<?php if ( $twitter = get_the_author_meta( 'twitter', $user_id ) ) { ?>
<p class="twitter-link">
<a href="<?php echo esc_url( "http://twitter.com/{$twitter}" ); ?>" title="<?php printf( esc_attr__( 'Follow %s on Twitter', 'cakifo' ), $name ); ?>">
<?php printf( __( 'Follow %s on Twitter', 'cakifo' ), $name ); ?>
</a>
</p>
<?php } // Twitter ?>
</div> <!-- .loop-description -->

</div> <!-- .loop-meta -->
15 rtl.css
@@ -383,21 +383,6 @@ thead th {
float: right;
}

/**
* Components: Author box
*/
.author-profile .twitter-link,
.loop-meta .twitter-link {
text-align: left;
}

.author-profile .twitter-link a,
.loop-meta .twitter-link a {
padding-right: 23px;
background-position: right bottom;
padding-left: 0;
}

/**
* Components: Recent Posts
*/
@@ -20,7 +20,7 @@
?>

<h1 class="section-title">
<a href="<?php echo esc_url( $posts_page ); ?>"><?php _e( 'Recent Posts', 'cakifo' ); ?></a>
<a href="<?php echo esc_url( $posts_page ); ?>"><?php _e( 'Recent Posts', 'cakifo' ); ?></a>
</h1>

<?php
@@ -1328,17 +1328,6 @@ body.page-template-template-front-page .site-main {
font-size: 18px;
font-size: 1.8rem;
}
.author-profile .twitter-link,
.loop-meta .twitter-link {
text-align: right;
}
.author-profile .twitter-link a,
.loop-meta .twitter-link a {
padding-left: 23px;
font-size: 14px;
font-size: 1.4rem;
background: url(images/twitter.png) no-repeat left bottom;
}
/* =============================================================================
Components: Loop meta
========================================================================== */

0 comments on commit 5f5cb06

Please sign in to comment.