Permalink
Browse files

Updating Trending to version 0.2.

git-svn-id: http://svn.locallylost.com/themes/trending/trunk@841 dba0f204-706d-4bc1-bc29-8b92e0485636
  • Loading branch information...
1 parent 75ec9c6 commit 6a73db462eab0bd9a4b331a03dce3ca57e234a93 greenshady committed Sep 14, 2011
Showing with 11 additions and 29 deletions.
  1. +7 −25 functions.php
  2. +2 −2 style.css
  3. +2 −2 style.dev.css
View
@@ -20,7 +20,7 @@
*
* @package Trending
* @subpackage Functions
- * @version 0.1.0
+ * @version 0.2.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2011, Justin Tadlock
* @link http://themehybrid.com/themes/trending
@@ -50,9 +50,7 @@ function trending_theme_setup() {
add_theme_support( 'hybrid-core-sidebars', array( 'primary', 'secondary', 'header', 'before-content', 'after-content', 'after-singular' ) );
add_theme_support( 'hybrid-core-widgets' );
add_theme_support( 'hybrid-core-shortcodes' );
- add_theme_support( 'hybrid-core-post-meta-box' );
- add_theme_support( 'hybrid-core-theme-settings' );
- add_theme_support( 'hybrid-core-meta-box-footer' );
+ add_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );
add_theme_support( 'hybrid-core-drop-downs' );
add_theme_support( 'hybrid-core-seo' );
add_theme_support( 'hybrid-core-template-hierarchy' );
@@ -73,6 +71,9 @@ function trending_theme_setup() {
/* Embed width/height defaults. */
add_filter( 'embed_defaults', 'trending_embed_defaults' );
+ /* Set content width. */
+ hybrid_set_content_width( 600 );
+
/* Filter the sidebar widgets. */
add_filter( 'sidebars_widgets', 'trending_disable_sidebars' );
add_action( 'template_redirect', 'trending_one_column' );
@@ -107,7 +108,7 @@ function trending_one_column() {
if ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) )
add_filter( 'get_theme_layout', 'trending_theme_layout_one_column' );
- elseif ( is_attachment() )
+ elseif ( is_attachment() && 'layout-default' == theme_layouts_get_layout() )
add_filter( 'get_theme_layout', 'trending_theme_layout_one_column' );
}
@@ -207,33 +208,14 @@ function trending_get_image_size_links() {
/* Add the link to the array if there's an image and if $is_intermediate (4th array value) is true or full size. */
if ( !empty( $image ) && ( true === $image[3] || 'full' == $size ) )
- $links[] = "<a class='image-size-link' href='{$image[0]}'>{$image[1]} &times; {$image[2]}</a>";
+ $links[] = "<a class='image-size-link' href='" . esc_url( $image[0] ) . "'>{$image[1]} &times; {$image[2]}</a>";
}
/* Join the links in a string and return. */
return join( ' <span class="sep">/</span> ', $links );
}
/**
- * Adds a 'has-avatar' class to the comment class array. This is a temporary function that will be removed
- * once this theme is updated to Hybrid Core 1.2.0, which is currently in beta.
- *
- * @since 0.1.0
- */
-function trending_comment_class( $classes ) {
- global $comment;
-
- /* Get comment types that are allowed to have an avatar. */
- $avatar_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );
-
- /* If avatars are enabled and the comment types can display avatars, add the 'has-avatar' class. */
- if ( get_option( 'show_avatars' ) && in_array( $comment->comment_type, $avatar_comment_types ) )
- $classes[] = 'has-avatar';
-
- return $classes;
-}
-
-/**
* This is a fix for when a user sets a custom background color with no custom background image. What
* happens is the theme's background image hides the user-selected background color. If a user selects a
* background image, we'll just use the WordPress custom background callback.
Oops, something went wrong.

0 comments on commit 6a73db4

Please sign in to comment.