Permalink
Browse files

Hybrid Core 1.3

This means that Cakifo 1.3 will be released shortly but I'm still awaiting the official release of HC 1.3
  • Loading branch information...
1 parent 1ebaca9 commit f9cf163e4c4213c8b30f9a6f8fb4ef892b89ce16 @jayj committed Apr 20, 2012
View
Binary file not shown.
@@ -77,7 +77,7 @@ function widget( $sidebar, $instance ) {
/* Some arguments must be set to the sidebar arguments to be output correctly. */
$args['title_li'] = apply_filters( 'widget_title', ( empty( $args['title_li'] ) ? __( 'Bookmarks', 'hybrid-core' ) : $args['title_li'] ), $instance, $this->id_base );
$args['title_before'] = $before_title;
- $args['after_title'] = $after_title;
+ $args['title_after'] = $after_title;
$args['category_before'] = $before_widget;
$args['category_after'] = $after_widget;
$args['category_name'] = '';
@@ -223,22 +223,26 @@ function hybrid_comment_class( $class = '' ) {
$classes = get_comment_class( $class );
/* Get the comment type. */
- $classes[] = get_comment_type();
+ $comment_type = get_comment_type();
+
+ /* If the comment type is 'pingback' or 'trackback', add the 'ping' comment class. */
+ if ( 'pingback' == $comment_type || 'trackback' == $comment_type )
+ $classes[] = 'ping';
/* User classes to match user role and user. */
if ( $comment->user_id > 0 ) {
/* Create new user object. */
$user = new WP_User( $comment->user_id );
- /* Set a class with the user's role. */
+ /* Set a class with the user's role(s). */
if ( is_array( $user->roles ) ) {
foreach ( $user->roles as $role )
- $classes[] = "role-{$role}";
+ $classes[] = sanitize_html_class( "role-{$role}" );
}
/* Set a class with the user's name. */
- $classes[] = 'user-' . sanitize_html_class( $user->user_nicename, $user->ID );
+ $classes[] = sanitize_html_class( "user-{$user->user_nicename}", "user-{$user->ID}" );
}
/* If not a registered user */
@@ -259,6 +263,9 @@ function hybrid_comment_class( $class = '' ) {
if ( get_option( 'show_avatars' ) && in_array( $comment->comment_type, $avatar_comment_types ) )
$classes[] = 'has-avatar';
+ /* Make sure comment classes doesn't have any duplicates. */
+ $classes = array_unique( $classes );
+
/* Join all the classes into one string and echo them. */
$class = join( ' ', $classes );
View
@@ -24,7 +24,7 @@
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package HybridCore
- * @version 1.3.0-beta-3
+ * @version 1.3.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core

0 comments on commit f9cf163

Please sign in to comment.