Browse files

Cleaning up The Den and Air

Removed embedded sharing from The Den; it gets that from the parent theme now.
Removed theme options from Air; it doesn't need it.
  • Loading branch information...
1 parent 7193085 commit e712d8165aa13794ec218bbdb09658e80c4579e9 @craigcook craigcook committed Oct 2, 2012
View
4 themes/OneMozilla-Air/functions.php
@@ -13,6 +13,10 @@ function remove_onemozilla_options() {
}
add_action( 'after_setup_theme','remove_onemozilla_options', 100 );
+function remove_onemozilla_theme_options() {
+ remove_submenu_page('themes.php', 'theme_options');
+}
+add_action('admin_init', 'remove_onemozilla_theme_options', 11);
/**
* Register our sidebars and widgetized areas.
View
10 themes/OneMozilla-Den/bitly-config.php.dist
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * For bit.ly link shortening
- * Custom short domains (like mzl.la) are configured at the bitly account
- */
-define('BITLY_USERNAME', 'bitlyusername');
-define('BITLY_APIKEY', 'bitlyapikey');
-
-?>
View
37 themes/OneMozilla-Den/content-single.php
@@ -1,37 +0,0 @@
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <h1 class="entry-title"><?php the_title(); ?></h1>
-
- <?php if ( 'post' == get_post_type() ) : ?>
- <p class="entry-posted">
- <time class="published" title="<?php the_time('Y-m-d\TH:i:sP'); ?>" datetime="<?php the_time('Y-m-d\TH:i:sP'); ?>">
- <a class="posted-month" href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>" title="See all posts from <?php echo get_the_time('F, Y'); ?>"><?php the_time('M'); ?></a>
- <span class="posted-date"><?php the_time('j'); ?></span>
- <a class="posted-year" href="<?php echo get_year_link(get_the_time('Y'), get_the_time('y')); ?>" title="See all posts from <?php echo get_the_time('Y'); ?>"><?php the_time('Y'); ?></a>
- </time>
- </p>
- <?php endif; ?>
- </header><!-- .entry-header -->
-
- <div class="entry-content">
- <?php edit_post_link( __( 'Edit Post', 'onemozilla' ), '<p class="edit">', '</p>' ); ?>
- <?php if (has_post_thumbnail()) { the_post_thumbnail('thumbnail', array('alt' => "", 'title' => "")); } ?>
- <?php the_content(); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'onemozilla' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
-
- <footer class="entry-meta">
- <ul class="share">
- <li><a class="facebook" href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink());?>&amp;t=<?php echo urlencode(get_the_title_rss()); ?>" title="<?php _e('Share this on Facebook', 'onemozilla'); ?>"><span><?php _e('Share this on Facebook', 'onemozilla'); ?></span></a></li>
- <li><a class="twitter" href="https://twitter.com/intent/tweet?url=<?php echo wp_get_shortlink(); ?>&amp;text=<?php echo urlencode(get_the_title_rss().' - '); ?>&amp;via=firefox" title="<?php _e('Share this on Twitter', 'onemozilla'); ?>"><span><?php _e('Share this on Twitter', 'onemozilla'); ?></span></a></li>
- </ul>
-
- <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
- <?php if (has_tag()) : ?>
- <p class="meta"><b><?php _e('Tags','onemozilla'); ?>:</b> <?php $tags_list = the_tags('',', ',''); ?></p>
- <?php endif; ?>
- <p class="meta"><b><?php _e('Categories','onemozilla'); ?>:</b> <?php the_category(', ') ?></p>
- <?php endif; ?>
-
- </footer><!-- .entry-meta -->
-</article><!-- #post-<?php the_ID(); ?> -->
View
49 themes/OneMozilla-Den/content.php
@@ -1,49 +0,0 @@
-<?php $options = onemozilla_get_theme_options(); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permanent link to &ldquo;%s&rdquo;', 'onemozilla' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php esc_attr(the_title()); ?></a></h2>
-
- <?php if ( 'post' == get_post_type() ) : // No posted date for Pages ?>
- <p class="entry-posted">
- <time class="published" title="<?php the_time('Y-m-d\TH:i:sP'); ?>" datetime="<?php the_time('Y-m-d\TH:i:sP'); ?>">
- <a class="posted-month" href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>" title="<?php printf( __( 'See all posts from %s', 'onemozilla' ), get_the_time('F, Y') ); ?>"><?php the_time('M'); ?></a>
- <span class="posted-date"><?php the_time('j'); ?></span>
- <a class="posted-year" href="<?php echo get_year_link(get_the_time('Y'), get_the_time('y')); ?>" title="<?php printf( __( 'See all posts from %s', 'onemozilla' ), get_the_time('Y') ); ?>"><?php the_time('Y'); ?></a>
- </time>
- </p>
- <?php endif; ?>
-
- <?php if ( $options['hide_author'] != 1 ) : ?>
- <address class="vcard"><?php _e('Posted by','onemozilla'); ?> <cite class="author fn"><a class="url" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ?>" title="<?php printf( esc_attr__( 'See all %1s posts by %2s', 'onemozilla'), get_the_author_posts(), get_the_author() ); ?>"><?php esc_html(the_author()); ?> <?php echo get_avatar(get_the_author_meta('user_email'), 24) ?></a></cite></address>
- <?php endif; ?>
-
- <?php $comment_count = get_comments_number($post->ID);
- if ( comments_open() || pings_open() || ($comment_count > 0) ) : ?>
- <p class="entry-comments"><a href="<?php comments_link() ?>" title="<?php comments_number('No responses yet','1 response','% responses'); ?>"><?php if ($comment_count > 999) : comments_number('0','1','1k+'); else : comments_number('0','1','%'); endif; ?></a></p>
- <?php endif; ?>
- </header>
-
- <div class="entry-content">
- <?php if (has_post_thumbnail()) { the_post_thumbnail('thumbnail', array('alt' => "", 'title' => "")); } ?>
-
- <?php the_content( __( 'Continue reading &hellip;', 'onemozilla' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="pages" role="navigation"><span>' . __( 'Pages:', 'onemozilla' ) . '</span>', 'after' => '</p>' ) ); ?>
- </div><!-- .entry-content -->
-
- <?php edit_post_link( __( 'Edit Post', 'onemozilla' ), '<p class="edit">', '</p>' ); ?>
-
- <?php if ( has_tag() || ( 'post' == get_post_type() ) ) : // No need for a footer if there's nothing to show ?>
- <footer class="entry-meta">
- <ul class="share">
- <li><a class="facebook" href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink());?>&amp;t=<?php echo urlencode(get_the_title_rss()); ?>" title="<?php _e('Share this on Facebook', 'onemozilla'); ?>"><span><?php _e('Share this on Facebook', 'onemozilla'); ?></span></a></li>
- <li><a class="twitter" href="https://twitter.com/intent/tweet?url=<?php echo wp_get_shortlink(); ?>&amp;text=<?php echo urlencode(get_the_title_rss().' - '); ?>&amp;via=firefox" title="<?php _e('Share this on Twitter', 'onemozilla'); ?>"><span><?php _e('Share this on Twitter', 'onemozilla'); ?></span></a></li>
- </ul>
-
- <?php if (has_tag()) : ?>
- <p class="meta"><b><?php _e('Tags','onemozilla'); ?>:</b> <?php $tags_list = the_tags('',', ',''); ?></p>
- <?php endif; ?>
- <p class="meta"><b><?php _e('Categories','onemozilla'); ?>:</b> <?php the_category(', ') ?></p>
- </footer>
- <?php endif; ?>
-
- </article><!-- #post-<?php the_ID(); ?> -->
View
56 themes/OneMozilla-Den/functions.php
@@ -1,56 +0,0 @@
-<?php
-
-function remove_onemozilla_options() {
- remove_custom_background();
-}
-add_action( 'after_setup_theme','remove_onemozilla_options', 100 );
-
-
-wp_enqueue_script('sharewindow', get_stylesheet_directory_uri().'/js/sharewindow.js', array('jquery'));
-
-
-/*********
-* Generate bit.ly/mzl.la shortlinks for posts.
-* Requires a bit.ly username and API key defined as constants in a 'bitly-config.php' file in the theme directory
-*/
-
-if ( file_exists( get_stylesheet_directory() . '/bitly-config.php' ) )
- require( get_stylesheet_directory() . '/bitly-config.php' );
-
-if (defined('BITLY_USERNAME') && defined('BITLY_APIKEY')) :
-
- function mozShortlink() {
- global $post;
-
- $short_url = json_decode(file_get_contents('http://api.bit.ly/v3/shorten?login='.BITLY_USERNAME.'&apiKey='.BITLY_APIKEY.'&longURL='.urlencode(get_permalink($post->ID)).'&format=json'));
-
- if($short_url->status_code=="200") {
- $short_url = $short_url->data->url;
- }
- else {
- $short_url = "Bit.ly Error! ".$short_url->status_txt;
- }
-
- do_action('mozShortlink');
- return $short_url;
- }
-
- function mozShortlink_metabox() {
- if(is_admin()) {
- add_meta_box('mzllaurl',__('Short URL','short-url'),'show_mozShortlinkbox','post','side');
- add_meta_box('mzllaurl',__('Short URL','short-url'),'show_mozShortlinkbox','page','side');
- }
- }
-
- function show_mozShortlinkbox() {
- echo '<label for="mzllaurl">'.__('Shortened URL','short-url-label').': '.mozShortlink().'</label><br/><br/>';
- }
-
- add_filter( 'get_shortlink', 'mozShortlink', 10, 3 );
- add_action('publish_post','mozShortlink');
- add_action('publish_page','mozShortlink');
- add_action('do_meta_boxes','mozShortlink_metabox');
-
-endif;
-
-?>
View
BIN themes/OneMozilla-Den/img/share-buttons.png
Deleted file not rendered
View
21 themes/OneMozilla-Den/js/sharewindow.js
@@ -1,21 +0,0 @@
-jQuery(document).ready(function() {
-
- jQuery("ul.share a").click(function(event){
- var windowOptions = "scrollbars=yes,resizable=yes,toolbar=no,location=yes",
- url = jQuery(this).attr("href"),
- width = 550,
- height = 420,
- winHeight = screen.height,
- winWidth = screen.width,
- left = Math.round((winWidth / 2) - (width / 2)),
- top = 0;
-
- if (winHeight > height) {
- top = Math.round((winHeight / 2) - (height / 2));
- }
-
- window.open(url, 'share', windowOptions + ',width='+width+',height='+height+',left='+left+',top='+top);
- event.preventDefault();
- });
-
-});
View
50 themes/OneMozilla-Den/style.css
@@ -1,56 +1,13 @@
/*
Theme Name: One Mozilla - The Den
-Description: Site theme for The Den. This theme is a child of the One Mozilla WordPress theme.
+Description: Site theme for The Den. This theme is a child of the One Mozilla WordPress theme.
Author: Craig Cook
Template: OneMozilla
-Version: 1.0
+Version: 1.1
*/
@import url("../OneMozilla/style.css");
-/* @Share @Buttons *********/
-.share { list-style: none; }
-.share li { display: inline; margin: 0 10px 0 0; }
-.share a { display: inline-block; background: #ebf4fb; border: 1px solid; margin: 0;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 2px 0 rgba(150,150,150,.1);
- -webkit-box-shadow: 0 2px 0 rgba(150,150,150,.1);
- box-shadow: 0 2px 0 rgba(150,150,150,.1);
-}
-.share span { display: block; width: 16px; height: 16px; padding: 3px; text-indent: -999em; overflow: hidden;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: inset 0 -2px #c1daef;
- -webkit-box-shadow: inset 0 -2px #c1daef;
- box-shadow: inset 0 -2px #c1daef;
-}
-.share a.twitter {
- border-color: #97b9d5;
- background: -moz-linear-gradient(top, #fff 0%, #ddecf7 100% );
- background: -webkit-linear-gradient(top, #fff 0%, #ddecf7 100% );
- background: linear-gradient(top, #fff 0%, #ddecf7 100% );
-}
-.share a.twitter span {
- background: url("img/share-buttons.png") 50% 4px no-repeat;
-}
-.share a.facebook {
- border-color: #283c7f;
- background: #5e77ac;
- background: -moz-linear-gradient(top, #5e77ac 0%, #3b5998 100% );
- background: -webkit-linear-gradient(top, #5e77ac 0%, #3b5998 100% );
- background: linear-gradient(top, #5e77ac 0%, #3b5998 100% );
-
-}
-.share a.facebook span {
- background: url("img/share-buttons.png") 50% -46px no-repeat;
- -moz-box-shadow: inset 0 -2px #284787;
- -webkit-box-shadow: inset 0 -2px #284787;
- box-shadow: inset 0 -2px #284787;
-}
-
/* @Firefox @Affiliates *********/
.get-firefox .latest { padding: 0; margin: 0 0 24px; border-bottom: 1px dotted rgba(0,0,0,.2); }
.get-firefox .widgettitle { font-size: 1.5em; margin: 0 0 .5em; }
@@ -59,6 +16,3 @@ Version: 1.0
/* @Newsletter @Subscribe *********/
.newsletter-sub a { padding: 15px 15px 85px; background: url(img/mail-small.png) 90% 90% no-repeat; background-color: rgba(255,255,255,.3); border: 1px solid #dbdbdb; border-radius: 6px; box-shadow: inset rgba(0,0,0,0.1) 0 0 4px, rgba(255,255,255, 0.1) 0 1px 0; }
.newsletter-sub a { display: block; font-size: 16px; }
-
-
-

0 comments on commit e712d81

Please sign in to comment.