Permalink
Browse files

Loads of fun, new stuff. Plus, random backgrounds.

  • Loading branch information...
1 parent 300007f commit e3fb7cf2dc20dcd6e0081f7e22eaff925b9fa94b @justintadlock committed Sep 4, 2012
View
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Aside Content Template
+ *
+ * Template used to show posts with the 'aside' post format.
+ *
+ * @package Unique
+ * @subpackage Template
+ * @since 0.1.0
+ * @author Justin Tadlock <justin@justintadlock.com>
+ * @copyright Copyright (c) 2012, Justin Tadlock
+ * @link http://themeforest.net/user/greenshady
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ */
+
+do_atomic( 'before_entry' ); // unique_before_entry ?>
+
+<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+
+ <?php do_atomic( 'open_entry' ); // unique_open_entry ?>
+
+ <?php if ( is_singular() && is_main_query() ) { ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h1 class="entry-title">', '</h1>', false ) ); ?>
+ <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[post-format-link] published on [entry-published] [entry-edit-link before="| "]', 'unique' ) . '</div>' ); ?>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'unique' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php } else { ?>
+
+ <div class="entry-content">
+ <?php the_content( __( 'Read more &rarr;', 'unique' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[post-format-link] published on [entry-published] [entry-permalink before="| "] [entry-comments-link before="| "] [entry-edit-link before="| "]', 'unique' ) . '</div>' ); ?>
+ </footer>
+
+ <?php } ?>
+
+ <?php do_atomic( 'close_entry' ); // unique_close_entry ?>
+
+</article><!-- .hentry -->
+
+<?php do_atomic( 'after_entry' ); // unique_after_entry ?>
View
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Quote Content Template
+ *
+ * Template used to show posts with the 'quote' post format.
+ *
+ * @package Unique
+ * @subpackage Template
+ * @since 0.1.0
+ * @author Justin Tadlock <justin@justintadlock.com>
+ * @copyright Copyright (c) 2012, Justin Tadlock
+ * @link http://themeforest.net/user/greenshady
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ */
+
+do_atomic( 'before_entry' ); // unique_before_entry ?>
+
+<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+
+ <?php do_atomic( 'open_entry' ); // unique_open_entry ?>
+
+ <?php if ( is_singular() && is_main_query() ) { ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h1 class="entry-title">', '</h1>', false ) ); ?>
+ <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[post-format-link] published on [entry-published] [entry-edit-link before="| "]', 'unique' ) . '</div>' ); ?>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'unique' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php } else { ?>
+
+ <div class="entry-content">
+ <?php the_content( __( 'Read more &rarr;', 'unique' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[post-format-link] published on [entry-published] [entry-permalink before="| "] [entry-comments-link before="| "] [entry-edit-link before="| "]', 'unique' ) . '</div>' ); ?>
+ </footer>
+
+ <?php } ?>
+
+ <?php do_atomic( 'close_entry' ); // unique_close_entry ?>
+
+</article><!-- .hentry -->
+
+<?php do_atomic( 'after_entry' ); // unique_after_entry ?>
View
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Video Content Template
+ *
+ * Template used to show posts with the 'image' post format.
+ *
+ * @package Unique
+ * @subpackage Template
+ * @since 0.1.0
+ * @author Justin Tadlock <justin@justintadlock.com>
+ * @copyright Copyright (c) 2012, Justin Tadlock
+ * @link http://themeforest.net/user/greenshady
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ */
+
+do_atomic( 'before_entry' ); // unique_before_entry ?>
+
+<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+
+ <?php do_atomic( 'open_entry' ); // unique_open_entry ?>
+
+ <?php if ( is_singular() && is_main_query() ) { ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h1 class="entry-title">', '</h1>', false ) ); ?>
+ <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[post-format-link] published on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'unique' ) . '</div>' ); ?>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'unique' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php } else { ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ </header><!-- .entry-header -->
+
+ <?php echo ( $video = just_me_get_video_embed() ); ?>
+
+ <?php if ( has_excerpt() ) { ?>
+
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+
+ <?php } elseif ( empty( $video ) ) { ?>
+
+ <div class="entry-content">
+ <?php the_content( __( 'Read more &rarr;', 'unique' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'unique' ), 'after' => '</p>' ) ); ?>
+ </div><!-- .entry-content -->
+
+ <?php } ?>
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[post-format-link] published on [entry-published] [entry-permalink before="| "] [entry-comments-link before="| "] [entry-edit-link before="| "]', 'unique' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php } ?>
+
+ <?php do_atomic( 'close_entry' ); // unique_close_entry ?>
+
+</article><!-- .hentry -->
+
+<?php do_atomic( 'after_entry' ); // unique_after_entry ?>
View
@@ -38,7 +38,7 @@
<?php } else { ?>
<header class="entry-header">
- <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '">', '</a></h2>', false ) ); ?>
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
<?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'Article published on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'my-life' ) . '</div>' ); ?>
</header><!-- .entry-header -->
View
@@ -33,6 +33,8 @@
<div class="wrap">
+ <?php get_template_part( 'menu', 'subsidiary' ); // Loads the menu-subsidiary.php template. ?>
+
<div class="footer-content">
<?php hybrid_footer_content(); ?>
</div><!-- .footer-content -->
@@ -47,8 +49,6 @@
<?php do_atomic( 'after_footer' ); // my-life_after_footer ?>
- <?php get_template_part( 'menu', 'subsidiary' ); // Loads the menu-subsidiary.php template. ?>
-
</div><!-- #container -->
<?php do_atomic( 'close_body' ); // my-life_close_body ?>
View
@@ -9,15 +9,61 @@ function just_me_theme_setup() {
$prefix = hybrid_get_prefix();
+ hybrid_set_content_width( 780 );
+
+ //add_theme_support( 'hybrid-core-sidebars', array( 'primary' ) );
+ add_theme_support( 'hybrid-core-menus', array( 'primary', 'subsidiary' ) );
add_theme_support( 'hybrid-core-shortcodes' );
add_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );
//add_theme_support( 'breadcrumb-trail' );
add_theme_support( 'get-the-image' );
+ add_theme_support( 'cleaner-caption' );
+
+
+ $dir = trailingslashit( get_template_directory_uri() ) . 'images/backgrounds';
+ add_theme_support(
+ 'random-custom-background', // Wrapper for 'custom-background'.
+ array(
+ array( 'image' => "{$dir}/bg-yellow-stripe.png" ),
+ array( 'image' => "{$dir}/bg-autumnish-stripe.png" ),
+ array( 'image' => "{$dir}/bg-plaid-green.png" ),
+ array( 'image' => "{$dir}/bg-war-eagle-primary.png" ), // War Eagle! @link http://www.auburn.edu/template/colors.html
+ array( 'image' => "{$dir}/bg-war-eagle-secondary.png" ),
+ array( 'image' => "{$dir}/bg-fall-leaves-stripe.png" ),
+ array( 'image' => "{$dir}/bg-candy-cane-diagonal.png", 'color' => 'fff' ),
+ array( 'image' => "{$dir}/bg-by-plaid.png" )
+ )
+ );
+
+ require_once( trailingslashit( THEME_DIR ) . 'random-custom-background.php' );
+
+ add_theme_support( 'custom-header', array( 'random-default' => true, 'width' => 100, 'height' => 100 ) );
add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
+ add_action( 'wp_enqueue_scripts', 'just_me_enqueue_scripts' );
+
add_filter( 'the_content', 'my_link_format_make_clickable', 99 );
+
+ add_filter( "{$prefix}_default_theme_settings", 'just_me_default_settings' );
+}
+
+function just_me_default_settings( $settings ) {
+
+ /* If there is a child theme active, add the [child-link] shortcode to the $footer_insert. */
+ if ( is_child_theme() )
+ $settings['footer_insert'] = '<p class="credit">' . __( 'Powered by [wp-link], [theme-link], and [child-link].', 'just-me' ) . '</p>';
+
+ /* If no child theme is active, leave out the [child-link] shortcode. */
+ else
+ $settings['footer_insert'] = '<p class="credit">' . __( 'Powered by [wp-link] and [theme-link].', 'just-me' ) . '</p>';
+
+ return $settings;
+}
+
+function just_me_enqueue_scripts() {
+ wp_enqueue_script( hybrid_get_prefix(), trailingslashit( THEME_URI ) . 'js/just-me.js', array( 'jquery' ), '20120901', true );
}
function my_link_format_make_clickable( $content ) {
@@ -57,14 +103,82 @@ function just_me_wp_widgets_ui_fail() {
}
+function just_me_get_video_embed() {
+ global $wp_embed;
+
+ /* If this is not a 'video' post, return. */
+ if ( !has_post_format( 'video' ) )
+ return false;
+ /* Get the post content. */
+ $content = get_the_content();
+ /* Set the default $embed variable to false. */
+ $embed = false;
+ /* Use WP's built in WP_Embed class methods to handle the dirty work. */
+ add_filter( 'just_me_video_shortcode_embed', array( $wp_embed, 'run_shortcode' ) );
+ add_filter( 'just_me_video_auto_embed', array( $wp_embed, 'autoembed' ) );
+ /* We don't want to return a link when an embed doesn't work. Filter this to return false. */
+ add_filter( 'embed_maybe_make_link', '__return_false' );
+ /* Check for matches against the [embed] shortcode. */
+ preg_match_all( '|\[embed.*?](.*?)\[/embed\]|i', $content, $matches, PREG_SET_ORDER );
+ /* If matches were found, loop through them to see if we can hit the jackpot. */
+ if ( is_array( $matches ) ) {
+ foreach ( $matches as $value ) {
+ /* Apply filters (let WP handle this) to get an embedded video. */
+ $embed = apply_filters( 'just_me_video_shortcode_embed', '[embed]' . $value[1]. '[/embed]' );
+ /* If no embed, continue looping through the array of matches. */
+ if ( empty( $embed ) )
+ continue;
+ }
+ }
+ /* If no embed at this point and the user has 'auto embeds' turned on, let's check for URLs in the post. */
+ if ( empty( $embed ) && get_option( 'embed_autourls' ) ) {
+ preg_match_all( '|^\s*(https?://[^\s"]+)\s*$|im', $content, $matches, PREG_SET_ORDER );
+
+ /* If URL matches are found, loop through them to see if we can get an embed. */
+ if ( is_array( $matches ) ) {
+ foreach ( $matches as $value ) {
+
+ /* Let WP work its magic with the 'autoembed' method. */
+ $embed = apply_filters( 'just_me_video_auto_embed', $value[0] );
+
+ /* If no embed, continue looping through the array of matches. */
+ if ( empty( $embed ) )
+ continue;
+ }
+ }
+ }
+
+ /* Remove the maybe make link filter. */
+ remove_filter( 'embed_maybe_make_link', '__return_false' );
+
+ /* Return the embed. */
+ return $embed;
+}
+
+add_filter( 'previous_posts_link_attributes', 'just_me_previous_posts_link_attributes' );
+add_filter( 'next_posts_link_attributes', 'just_me_next_posts_link_attributes' );
+
+function just_me_previous_posts_link_attributes( $attr ) {
+
+ $attr .= ' rel="prev"';
+
+ return $attr;
+}
+
+function just_me_next_posts_link_attributes( $attr ) {
+
+ $attr .= ' rel="next"';
+
+ return $attr;
+}
?>
View
@@ -48,17 +48,19 @@
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
</hgroup><!-- #branding -->
+ <?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template. ?>
+
<?php do_atomic( 'header' ); // my-life_header ?>
- </header><!-- .wrap -->
+ </div><!-- .wrap -->
<?php do_atomic( 'close_header' ); // my-life_close_header ?>
- </div><!-- #header -->
+ </header><!-- #header -->
<?php do_atomic( 'after_header' ); // my-life_after_header ?>
- <?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template. ?>
+ <?php //get_search_form(); // Loads the search form. */ ?>
<?php if ( get_header_image() ) echo '<img class="header-image" src="' . get_header_image() . '" alt="" />'; ?>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit e3fb7cf

Please sign in to comment.