Skip to content

Commit

Permalink
Merge branch '1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Tadlock committed Oct 30, 2013
2 parents 4883884 + f9038fb commit 5e338d5
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 22 deletions.
6 changes: 6 additions & 0 deletions css/admin.css
Expand Up @@ -23,6 +23,12 @@
}

/* Widgets page. */

/* Fixes the MP6 Plugin's small container issue that doesn't allow widget controls to expand. */
.widgets-php div.widget-liquid-right div.widgets-holder-wrap {
width: 100%;
}

.widgets-php .columns-1 {
}
.widgets-php .columns-2 {
Expand Down
2 changes: 1 addition & 1 deletion css/admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions extensions/breadcrumb-trail.php
Expand Up @@ -15,7 +15,7 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package BreadcrumbTrail
* @version 0.6.0
* @version 0.6.1
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2013, Justin Tadlock
* @link http://themehybrid.com/plugins/breadcrumb-trail
Expand Down Expand Up @@ -123,6 +123,9 @@ public function trail() {
/* Connect the breadcrumb trail if there are items in the trail. */
if ( !empty( $this->items ) && is_array( $this->items ) ) {

/* Make sure we have a unique array of items. */
$this->items = array_unique( $this->items );

/* Open the breadcrumb trail containers. */
$breadcrumb = "\n\t\t" . '<' . tag_escape( $this->args['container'] ) . ' class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">';

Expand Down Expand Up @@ -320,7 +323,7 @@ public function do_paged_items() {
*/
public function do_network_home_link() {
if ( is_multisite() && !is_main_site() && true === $this->args['network'] )
$this->items[] = '<a href="' . network_home_url() . '" title="' . esc_attr( $this->args['labels']['home'] ) . '">' . $this->args['labels']['home'] . '</a>';
$this->items[] = '<a href="' . network_home_url() . '" title="' . esc_attr( $this->args['labels']['home'] ) . '" rel="home">' . $this->args['labels']['home'] . '</a>';
}

/**
Expand All @@ -332,7 +335,8 @@ public function do_network_home_link() {
*/
public function do_site_home_link() {
$label = ( is_multisite() && !is_main_site() && true === $this->args['network'] ) ? get_bloginfo( 'name' ) : $this->args['labels']['home'];
$this->items[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '">' . $label . '</a>';
$rel = ( is_multisite() && !is_main_site() && true === $this->args['network'] ) ? '' : ' rel="home"';
$this->items[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '"' . $rel .'>' . $label . '</a>';
}

/**
Expand All @@ -345,7 +349,7 @@ public function do_site_home_link() {
public function do_front_page_items() {

/* Only show front items if the 'show_on_front' argument is set to 'true'. */
if ( true === $this->args['show_on_front'] ) {
if ( true === $this->args['show_on_front'] || is_paged() || ( is_singular() && 1 < get_query_var( 'page' ) ) ) {

/* If on a paged view, add the home link items. */
if ( is_paged() ) {
Expand Down Expand Up @@ -521,7 +525,7 @@ public function do_post_hierarchy( $post_id ) {
/* Add support for a non-standard label of 'archive_title' (special use case). */
$label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name;

$this->items[] = '<a href="' . get_post_type_archive_link( $post_type ) . '" title="' . esc_attr( $label ) . '">' . $label . '</a>';
$this->items[] = '<a href="' . get_post_type_archive_link( $post_type ) . '">' . $label . '</a>';
}
}

Expand Down Expand Up @@ -1086,6 +1090,10 @@ class bbPress_Breadcrumb_Trail extends Breadcrumb_Trail {
*/
public function do_trail_items() {

/* Add the network and site home links. */
$this->do_network_home_link();
$this->do_site_home_link();

/* Get the forum post type object. */
$post_type_object = get_post_type_object( bbp_get_forum_post_type() );

Expand Down
36 changes: 28 additions & 8 deletions extensions/color-palette.php
Expand Up @@ -23,7 +23,7 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package ColorPalette
* @version 0.1.0
* @version 0.2.0-alpha
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2013, Justin Tadlock
* @link http://justintadlock.com
Expand All @@ -38,23 +38,32 @@
*/
final class Color_Palette {

/**
* Theme-supports arguments passed by the theme.
*
* @since 0.2.0
* @access public
* @var array
*/
public $supports = array();

/**
* Array of individual color options and their settings.
*
* @since 0.1.0
* @access protected
* @access public
* @var array
*/
protected $colors = array();
public $colors = array();

/**
* An array of properties and selectors. "$rules[ $color_id ][ $property ][ $selectors ]"
*
* @since 0.1.0
* @access protected
* @access public
* @var array
*/
protected $rules = array();
public $rules = array();

/**
* The allowed CSS properties the theme developer can set a color rule for.
Expand Down Expand Up @@ -83,11 +92,15 @@ final class Color_Palette {
public function __construct() {

/* Get the theme support arguements for 'color-palette'. */
$supports = get_theme_support( 'color-palette' );
$this->supports = get_theme_support( 'color-palette' );

/* If a callback was set, add it to the correct action hook. */
if ( !empty( $supports[0] ) && isset( $supports[0]['callback'] ) )
add_action( 'color_palette_register', $supports[0]['callback'] );
if ( !empty( $this->supports[0] ) && isset( $this->supports[0]['callback'] ) )
add_action( 'color_palette_register', $this->supports[0]['callback'] );

/* If a wp-head-callback was set, add it to the correct action hook. */
if ( !empty( $this->supports[0] ) && isset( $this->supports[0]['wp-head-callback'] ) )
add_action( 'color_palette_wp_head_callback', $this->supports[0]['wp-head-callback'] );

/* Output CSS into <head>. */
add_action( 'wp_head', array( &$this, 'wp_head_callback' ) );
Expand Down Expand Up @@ -188,6 +201,13 @@ public function body_class( $classes ) {
*/
public function wp_head_callback() {

/* Allow devs to hook in early. This is used for the `wp-head-callback`. */
do_action( 'color_palette_wp_head_callback', $this );

/* If a `wp-head-callback` was set, bail. */
if ( !empty( $this->supports[0] ) && isset( $this->supports[0]['wp-head-callback'] ) )
return;

/* Get the cached style. */
$style = wp_cache_get( 'color_palette' );

Expand Down
11 changes: 9 additions & 2 deletions extensions/theme-layouts.php
Expand Up @@ -19,7 +19,7 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package ThemeLayouts
* @version 0.5.2
* @version 0.5.3
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2010 - 2013, Justin Tadlock
* @link http://justintadlock.com
Expand Down Expand Up @@ -153,8 +153,15 @@ function theme_layouts_filter_layout( $theme_layout ) {
$layout = get_user_layout( get_queried_object_id() );

/* If a layout was found, set it. */
if ( !empty( $layout ) && 'default' !== $layout )
if ( !empty( $layout ) && 'default' !== $layout ) {
$theme_layout = $layout;
}

/* Else, if no layout option has yet been saved, return the theme default. */
elseif ( empty( $theme_layout ) ) {
$args = theme_layouts_get_args();
$theme_layout = $args['default'];
}

return $theme_layout;
}
Expand Down
3 changes: 3 additions & 0 deletions functions/comments.php
Expand Up @@ -84,6 +84,9 @@ function hybrid_comments_callback( $comment, $args, $depth ) {
/* Add the fallback 'comment.php' template. */
$templates[] = 'comment.php';

/* Allow devs to filter the template hierarchy. */
$templates = apply_filters( 'hybrid_comment_template_hierarchy', $templates, $comment_type );

/* Locate the comment template. */
$template = locate_template( $templates );

Expand Down
8 changes: 4 additions & 4 deletions functions/context.php
Expand Up @@ -143,7 +143,7 @@ function hybrid_body_attributes() {
$attributes = apply_atomic( 'body_attributes', $attributes );

foreach( $attributes as $attr => $value )
$output .= " {$attr}='{$value}'";
$output .= !empty( $value ) ? " {$attr}='{$value}'" : " {$attr}";

echo $output;
}
Expand Down Expand Up @@ -204,7 +204,7 @@ function hybrid_get_body_class( $class = '' ) {
$classes[] = 'custom-background';

/* Add the '.custom-header' class if the user is using a custom header. */
if ( get_header_image() )
if ( get_header_image() || ( display_header_text() && get_header_textcolor() ) )
$classes[] = 'custom-header';

/* Merge base contextual classes with $classes. */
Expand Down Expand Up @@ -268,7 +268,7 @@ function hybrid_post_attributes() {
$attributes = apply_atomic( 'post_attributes', $attributes );

foreach( $attributes as $attr => $value )
$output .= " {$attr}='{$value}'";
$output .= !empty( $value ) ? " {$attr}='{$value}'" : " {$attr}";

echo $output;
}
Expand Down Expand Up @@ -411,7 +411,7 @@ function hybrid_comment_attributes() {
$attributes = apply_atomic( 'comment_attributes', $attributes );

foreach( $attributes as $attr => $value )
$output .= " {$attr}='{$value}'";
$output .= !empty( $value ) ? " {$attr}='{$value}'" : " {$attr}";

echo $output;
}
Expand Down
4 changes: 2 additions & 2 deletions hybrid.php
Expand Up @@ -24,7 +24,7 @@
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package HybridCore
* @version 1.6.1
* @version 1.6.2
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2013, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
Expand Down Expand Up @@ -93,7 +93,7 @@ function __construct() {
function constants() {

/* Sets the framework version number. */
define( 'HYBRID_VERSION', '1.6.1' );
define( 'HYBRID_VERSION', '1.6.2' );

/* Sets the path to the parent theme directory. */
define( 'THEME_DIR', get_template_directory() );
Expand Down

0 comments on commit 5e338d5

Please sign in to comment.