diff --git a/css/admin.css b/css/admin.css index f36d59e3..f4ee06e8 100644 --- a/css/admin.css +++ b/css/admin.css @@ -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 { diff --git a/css/admin.min.css b/css/admin.min.css index 80a9ec1a..365dfd64 100644 --- a/css/admin.min.css +++ b/css/admin.min.css @@ -1 +1 @@ -.appearance_page_theme-settings .side .form-table th{width:20%;font-weight:bold;text-align:left;padding-left:0}.appearance_page_theme-settings .metabox-holder textarea{width:100%}.custom-post-format-wrap,.post-layout-wrap{padding:0 5px;max-height:170px;overflow-y:auto}.hybrid-post-settings{padding-top:5px}.hybrid-post-settings p{margin-bottom:15px !important}.widgets-php .columns-1{}.widgets-php .columns-2{overflow:hidden;float:left;width:48%}.widgets-php .columns-3{overflow:hidden;float:left;width:31%;margin-right:3.5%}.widgets-php .column-last{float:right;margin-right:0}.widgets-php .hybrid-widget-controls label{font-size:11px}.widgets-php .columns-2 input.widefat,.widgets-php .columns-2 select.widefat{width:99%}.widgets-php .columns-3 select.widefat{width:98.5%}.widgets-php .hybrid-widget-controls select[multiple="multiple"]{width:100%;height:5.0em !important}.widgets-php input.smallfat{float:right;width:66px}.widgets-php select.smallfat{float:right;min-width:66px} \ No newline at end of file +.appearance_page_theme-settings .side .form-table th{width:20%;font-weight:bold;text-align:left;padding-left:0}.appearance_page_theme-settings .metabox-holder textarea{width:100%}.custom-post-format-wrap,.post-layout-wrap{padding:0 5px;max-height:170px;overflow-y:auto}.hybrid-post-settings{padding-top:5px}.hybrid-post-settings p{margin-bottom:15px !important}.widgets-php div.widget-liquid-right div.widgets-holder-wrap{width:100%}.widgets-php .columns-1{}.widgets-php .columns-2{overflow:hidden;float:left;width:48%}.widgets-php .columns-3{overflow:hidden;float:left;width:31%;margin-right:3.5%}.widgets-php .column-last{float:right;margin-right:0}.widgets-php .hybrid-widget-controls label{font-size:11px}.widgets-php .columns-2 input.widefat,.widgets-php .columns-2 select.widefat{width:99%}.widgets-php .columns-3 select.widefat{width:98.5%}.widgets-php .hybrid-widget-controls select[multiple="multiple"]{width:100%;height:5.0em !important}.widgets-php input.smallfat{float:right;width:66px}.widgets-php select.smallfat{float:right;min-width:66px} \ No newline at end of file diff --git a/extensions/breadcrumb-trail.php b/extensions/breadcrumb-trail.php index 0b5878d7..56d7ce54 100644 --- a/extensions/breadcrumb-trail.php +++ b/extensions/breadcrumb-trail.php @@ -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 * @copyright Copyright (c) 2008 - 2013, Justin Tadlock * @link http://themehybrid.com/plugins/breadcrumb-trail @@ -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">'; @@ -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[] = '' . $this->args['labels']['home'] . ''; + $this->items[] = '' . $this->args['labels']['home'] . ''; } /** @@ -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[] = '' . $label . ''; + $rel = ( is_multisite() && !is_main_site() && true === $this->args['network'] ) ? '' : ' rel="home"'; + $this->items[] = '' . $label . ''; } /** @@ -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() ) { @@ -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[] = '' . $label . ''; + $this->items[] = '' . $label . ''; } } @@ -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() ); diff --git a/extensions/color-palette.php b/extensions/color-palette.php index dd8d0c21..cadfeb86 100644 --- a/extensions/color-palette.php +++ b/extensions/color-palette.php @@ -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 * @copyright Copyright (c) 2013, Justin Tadlock * @link http://justintadlock.com @@ -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. @@ -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 . */ add_action( 'wp_head', array( &$this, 'wp_head_callback' ) ); @@ -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' ); diff --git a/extensions/theme-layouts.php b/extensions/theme-layouts.php index 6bfb636f..1791fb49 100644 --- a/extensions/theme-layouts.php +++ b/extensions/theme-layouts.php @@ -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 * @copyright Copyright (c) 2010 - 2013, Justin Tadlock * @link http://justintadlock.com @@ -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; } diff --git a/functions/comments.php b/functions/comments.php index e824c266..09e2ae05 100644 --- a/functions/comments.php +++ b/functions/comments.php @@ -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 ); diff --git a/functions/context.php b/functions/context.php index 5344165c..aca94e13 100644 --- a/functions/context.php +++ b/functions/context.php @@ -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; } @@ -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. */ @@ -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; } @@ -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; } diff --git a/hybrid.php b/hybrid.php index 65ff6ced..b6a3ec51 100644 --- a/hybrid.php +++ b/hybrid.php @@ -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 * @copyright Copyright (c) 2008 - 2013, Justin Tadlock * @link http://themehybrid.com/hybrid-core @@ -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() );