Skip to content

Commit

Permalink
Final Commit for 1.5.0
Browse files Browse the repository at this point in the history
See the changelog.
  • Loading branch information
swashata committed Oct 18, 2013
1 parent 6b9745a commit 0d37c16
Show file tree
Hide file tree
Showing 35 changed files with 17,461 additions and 8,825 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ Copyright: Twitter, http://twitter.com
```

```
Icomoon Icon Packs - ​http://icomoon.io/app/
License: Distributed under the terms of the creative commons Attribution 3.0 Unported (CC BY 3.0)
Icomoon Icon Packs - ​http://icomoon.io/#icons
License: Distributed under the terms of the GPL
Copyright: IcoMoon, http://icomoon.io/
```

Expand All @@ -130,7 +130,17 @@ Copyright: Google Fonts, http://www.google.com/fonts/attribution

## Changelog

### Version 1.5.0

* Updated to latest IcoMoon fonts which is now under GPL (thanks to @Keyamoon)
* Better CSS localization for Icon Classes (prefixed with `ipt-icon` instead of just `ipt`)
* Fixed comment template layout issue when viewed under small devices (comment textarea leaving a margin on left)
* Fixed invalid href on a div element in Affix Widget
* While using the rel property on the navigation menu for adding icons, it will not get added to the rel attribute and thereby produce incorrect HTML
* Improved category archive page appearance (changed well to well-sm for better white-space usage)

### Version 1.4.0

* Updated the home.php to use default blog type layout
* Added page templete (Knowledge Base Page) to populate the knowledge base appearance (see documentation to learn how to use this as the front page)
* Added author information on single posts and author archive
Expand Down
10 changes: 5 additions & 5 deletions category-templates/category-child.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
<?php if ( isset( $term_meta['icon_class'] ) && '' != $term_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $term_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
</a>
</p>
<div class="caption">
<?php if ( isset( $pterm_meta['support_forum'] ) && $pterm_meta['support_forum'] != '' ) : ?>
<p class="text-center"><a class="btn btn-default btn-block" href="<?php echo esc_url( $pterm_meta['support_forum'] ); ?>">
<i class="glyphicon ipt-support"></i> <?php _e( 'Support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Support', 'ipt_kb' ); ?>
</a></p>
<?php endif; ?>
</div>
Expand All @@ -54,14 +54,14 @@
<?php if ( isset( $term_meta['icon_class'] ) && '' != $term_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $term_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
</a>
</p>
<div class="caption">
<?php if ( isset( $pterm_meta['support_forum'] ) && $pterm_meta['support_forum'] != '' ) : ?>
<p class="text-center"><a class="btn btn-default btn-block" href="<?php echo esc_url( $pterm_meta['support_forum'] ); ?>">
<i class="glyphicon ipt-support"></i> <?php _e( 'Support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Support', 'ipt_kb' ); ?>
</a></p>
<?php endif; ?>
</div>
Expand All @@ -70,7 +70,7 @@
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description well">%s</div>', $term_description );
printf( '<div class="taxonomy-description well well-sm">%s</div>', $term_description );
endif;
?>
</div>
Expand Down
18 changes: 9 additions & 9 deletions category-templates/category-parent.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="caption">
<?php if ( isset( $term_meta['support_forum'] ) && '' != $term_meta['support_forum'] ) : ?>
<p class="text-center"><a class="btn btn-default btn-block" href="<?php echo esc_url( $term_meta['support_forum'] ); ?>">
<i class="glyphicon ipt-support"></i> <?php _e( 'Get Support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Get Support', 'ipt_kb' ); ?>
</a></p>
<?php endif; ?>
</div>
Expand All @@ -34,7 +34,7 @@
<div class="caption">
<?php if ( isset( $term_meta['support_forum'] ) && '' != $term_meta['support_forum'] ) : ?>
<p class="text-center"><a class="btn btn-default btn-block" href="<?php echo esc_url( $term_meta['support_forum'] ); ?>">
<i class="glyphicon ipt-support"></i> <?php _e( 'Get Support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Get Support', 'ipt_kb' ); ?>
</a></p>
<?php endif; ?>
</div>
Expand All @@ -43,7 +43,7 @@
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description well">%s</div>', $term_description );
printf( '<div class="taxonomy-description well well-sm">%s</div>', $term_description );
endif;
?>
</div>
Expand All @@ -67,23 +67,23 @@
<?php if ( isset( $sterm_meta['icon_class'] ) && '' != $sterm_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $sterm_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
</a>
</p>
</div>
<div class="col-md-9 col-sm-10 col-xs-12">
<h2 class="knowledgebase-title"><a data-placement="bottom" data-popt="kb-homepage-popover-<?php echo $scat->term_id; ?>" title="<?php echo esc_attr( sprintf( __( '%1$s / %2$s', 'ipt_kb' ), $cat->name, $scat->name ) ); ?>" href="#" class="btn btn-default btn-sm text-muted ipt-kb-popover"><i class="glyphicon ipt-paragraph-justify "></i></a> <?php echo $scat->name; ?></h2>
<h2 class="knowledgebase-title"><a data-placement="bottom" data-popt="kb-homepage-popover-<?php echo $scat->term_id; ?>" title="<?php echo esc_attr( sprintf( __( '%1$s / %2$s', 'ipt_kb' ), $cat->name, $scat->name ) ); ?>" href="#" class="btn btn-default btn-sm text-muted ipt-kb-popover"><i class="glyphicon ipt-icon-paragraph-justify2"></i></a> <?php echo $scat->name; ?></h2>
<div class="ipt-kb-popover-target" id="kb-homepage-popover-<?php echo $scat->term_id; ?>">
<?php echo wpautop( $scat->description ); ?>
<p class="text-right">
<?php if ( isset( $term_meta['support_forum'] ) && '' != $term_meta['support_forum'] ) : ?>
<a class="btn btn-default" href="<?php echo esc_url( $term_meta['support_forum'] ); ?>">
<i class="glyphicon ipt-support"></i> <?php _e( 'Get support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Get support', 'ipt_kb' ); ?>
</a>
<?php endif; ?>
<a href="<?php echo $sterm_link; ?>" class="btn btn-info">
<i class="glyphicon ipt-link"></i> <?php _e( 'Browse all', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-link"></i> <?php _e( 'Browse all', 'ipt_kb' ); ?>
</a>
</p>
</div>
Expand All @@ -94,7 +94,7 @@
<?php if ( isset( $sterm_meta['icon_class'] ) && '' != $sterm_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $sterm_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
</a>
</p>
Expand All @@ -110,7 +110,7 @@
<?php endif; ?>
</div>
<p class="text-right">
<a class="btn btn-default" href="<?php echo $sterm_link; ?>"><i class="glyphicon ipt-link"></i> <?php printf( _n( 'Browse %d article', 'Browse all %d articles', $scat_totals, 'ipt_kb' ), $scat_totals ); ?></a>
<a class="btn btn-default" href="<?php echo $sterm_link; ?>"><i class="glyphicon ipt-icon-link"></i> <?php printf( _n( 'Browse %d article', 'Browse all %d articles', $scat_totals, 'ipt_kb' ), $scat_totals ); ?></a>
</p>
</div>
<div class="clearfix"></div>
Expand Down
2 changes: 1 addition & 1 deletion category-templates/content-date.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
// The plugin is most likely override it.
?>
<span class="badge"><?php echo get_the_date(); ?></span>
<h3><span class="glyphicon ipt-file-3"></span> <?php the_title(); ?></h3>
<h3><span class="glyphicon ipt-icon-file"></span> <?php the_title(); ?></h3>
<span class="clearfix"></span>
</a>
2 changes: 1 addition & 1 deletion category-templates/content-popular.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<a rel="bookmark" class="list-group-item kb-list-date kb-post-list" href="<?php the_permalink(); ?>">
<span class="badge"><?php echo get_post_meta( $post->ID, 'ipt_kb_like_article', true ); ?></span>
<h3><span class="glyphicon ipt-file-3"></span> <?php the_title(); ?></h3>
<h3><span class="glyphicon ipt-icon-file"></span> <?php the_title(); ?></h3>
<span class="clearfix"></span>
</a>
2 changes: 1 addition & 1 deletion category-templates/no-result.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/
?>
<div class="list-group-item text-muted">
<span class="glyphicon ipt-blocked"></span> <?php _e( 'No articles published. Check back later?', 'ipt_kb' ); ?>
<span class="glyphicon ipt-icon-blocked"></span> <?php _e( 'No articles published. Check back later?', 'ipt_kb' ); ?>
</div>
2 changes: 1 addition & 1 deletion content.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<?php endif; // End if 'post' == get_post_type() ?>

<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link">&nbsp;&nbsp;<i class="glyphicon ipt-bubbles-2"></i>&nbsp;<?php comments_popup_link( __( 'Leave a comment', 'ipt_kb' ), __( '1 Comment', 'ipt_kb' ), __( '% Comments', 'ipt_kb' ) ); ?></span>
<span class="comments-link">&nbsp;&nbsp;<i class="glyphicon ipt-icon-bubbles2"></i>&nbsp;<?php comments_popup_link( __( 'Leave a comment', 'ipt_kb' ), __( '1 Comment', 'ipt_kb' ), __( '% Comments', 'ipt_kb' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'ipt_kb' ), '&nbsp;&nbsp;<i class="glyphicon glyphicon-edit"></i>&nbsp;<span class="edit-link">', '</span>' ); ?>
</p>
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Set the version
*/
global $ipt_kb_version;
$ipt_kb_version = '1.4.0';
$ipt_kb_version = '1.5.0';

/**
* Set the content width based on the theme's design and stylesheet.
Expand Down
14 changes: 7 additions & 7 deletions inc/class-ipt-kb-affix-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function widget( $args, $instance ) {
<div class="form-group">
<div class="input-group input-group-sm">
<input type="search" class="search-field form-control" placeholder="<?php _e( 'Search&hellip;', 'ipt_kb' ) ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" />
<span class="input-group-btn"><button type="submit" class="btn btn-default"><span class="ipt-search"></span></button></span>
<span class="input-group-btn"><button type="submit" class="btn btn-default"><span class="ipt-icon-search"></span></button></span>
</div>
</div>
</form>
Expand All @@ -123,7 +123,7 @@ function widget( $args, $instance ) {
<?php if ( isset( $term_meta['support_forum'] ) && '' != $term_meta['support_forum'] ) : ?>
<p>
<a href="<?php echo esc_url( $term_meta['support_forum'] ); ?>" class="btn btn-block btn-default">
<i class="glyphicon ipt-support"></i> <?php _e( 'Get support', 'ipt_kb' ); ?>
<i class="glyphicon ipt-icon-support"></i> <?php _e( 'Get support', 'ipt_kb' ); ?>
</a>
</p>
<?php endif; ?>
Expand Down Expand Up @@ -164,7 +164,7 @@ protected function print_toc() {
}
?>
<div class="text-muted ipt-kb-toc">
<a href="#ipt-kb-toc-scrollspy" title="<?php esc_attr_e( 'Click to show/hide table of contents.', 'ipt_kb' ); ?>" class="bstooltip pull-right btn btn-xs btn-default accordion-toggle ipt-kb-sub-toc-toggle" data-toggle="collapse"><i class="glyphicon ipt-menu"></i></a>
<a href="#ipt-kb-toc-scrollspy" title="<?php esc_attr_e( 'Click to show/hide table of contents.', 'ipt_kb' ); ?>" class="bstooltip pull-right btn btn-xs btn-default accordion-toggle ipt-kb-sub-toc-toggle" data-toggle="collapse"><i class="glyphicon ipt-icon-menu"></i></a>
<h4>
<?php _e( 'Table of Contents', 'ipt_kb' ); ?>
</h4>
Expand Down Expand Up @@ -194,14 +194,14 @@ protected function print_cat( $cat ) {
}
?>
<?php if ( $do_posts ) : ?>
<div href="<?php echo get_category_link( $cat ); ?>" class="list-group-item <?php echo $btn_class; ?>">
<div class="list-group-item <?php echo $btn_class; ?>">
<a href="#ipt-kb-affix-active-post" title="<?php esc_attr_e( 'Click to show/hide articles under this category.', 'ipt_kb' ); ?>" class="bstooltip accordion-toggle pull-right btn btn-default btn-xs text-center ipt-kb-sub-cat-toggle" data-toggle="collapse">
<i class="glyphicon ipt-enter"></i>
<i class="glyphicon ipt-icon-enter"></i>
</a>
<?php if ( isset( $sterm_meta['icon_class'] ) && '' != $sterm_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $sterm_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
<?php echo $cat->name; ?>
</div>
Expand All @@ -210,7 +210,7 @@ protected function print_cat( $cat ) {
<?php if ( isset( $sterm_meta['icon_class'] ) && '' != $sterm_meta['icon_class'] ) : ?>
<i class="glyphicon <?php echo esc_attr( $sterm_meta['icon_class'] ); ?>"></i>
<?php else : ?>
<i class="glyphicon ipt-books"></i>
<i class="glyphicon ipt-icon-books"></i>
<?php endif; ?>
<?php echo $cat->name; ?>
</a>
Expand Down
14 changes: 7 additions & 7 deletions inc/class-ipt-kb-social-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ function IPT_KB_Social_Widget() {
'envato' => __( 'Follow us on envato marketplaces', 'ipt_kb' ),
),
'social_classes' => array(
'facebook' => 'ipt-facebook',
'twitter' => 'ipt-twitter',
'gplus' => 'ipt-google-plus',
'youtube' => 'ipt-youtube',
'vimeo' => 'ipt-vimeo',
'pinterest' => 'ipt-pinterest',
'envato' => 'ipt-leaf',
'facebook' => 'ipt-icon-facebook',
'twitter' => 'ipt-icon-twitter',
'gplus' => 'ipt-icon-google-plus',
'youtube' => 'ipt-icon-youtube',
'vimeo' => 'ipt-icon-vimeo',
'pinterest' => 'ipt-icon-pinterest',
'envato' => 'ipt-icon-leaf',
),
);
$this->default_settings = apply_filters( 'ipt_kb_social_widget_defaults', $default_settings );
Expand Down
20 changes: 10 additions & 10 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function ipt_kb_comment( $comment, $args, $depth ) {
'max_depth' => $args['max_depth'],
'before' => '<div class="reply text-right">',
'after' => '</div>',
'reply_text'=> __( '<i class="glyphicon ipt-bubbles-4"></i>&nbsp;&nbsp;Reply', 'ipt_kb' ),
'reply_text'=> __( '<i class="glyphicon ipt-icon-reply"></i>&nbsp;&nbsp;Reply', 'ipt_kb' ),
) ) );
?>
</div>
Expand Down Expand Up @@ -487,11 +487,11 @@ function ipt_kb_comment_form( $args = array(), $post_id = null ) {
$html5 = 'html5' === $args['format'];
$fields = array(
'author' => '<div class="form-group comment-form-author">' . '<label class="sr-only control-label" for="author">' . __( 'Name', 'ipt_kb' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-user-4"></span></span><input placeholder="' . __( 'Name', 'ipt_kb' ) . ( $req ? ' *' : '' ) . '" class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div></div>',
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-icon-user"></span></span><input placeholder="' . __( 'Name', 'ipt_kb' ) . ( $req ? ' *' : '' ) . '" class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div></div>',
'email' => '<div class="form-group comment-form-email"><label class="sr-only control-label" for="email">' . __( 'Email', 'ipt_kb' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-mail-4"></span></span><input placeholder="' . __( 'Email', 'ipt_kb' ) . ( $req ? ' *' : '' ) . '" class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div></div>',
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-icon-mail"></span></span><input placeholder="' . __( 'Email', 'ipt_kb' ) . ( $req ? ' *' : '' ) . '" class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div></div>',
'url' => '<div class="form-group comment-form-url"><label class="sr-only control-label" for="url">' . __( 'Website', 'ipt_kb' ) . '</label> ' .
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-link"></span></span><input placeholder="' . __( 'Website', 'ipt_kb' ) . '" class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div></div>',
'<div class="input-group"><span class="input-group-addon"><span class="glyphicon ipt-icon-link"></span></span><input placeholder="' . __( 'Website', 'ipt_kb' ) . '" class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div></div>',
);

$required_text = sprintf( ' ' . __( 'Required fields are marked %s', 'ipt_kb' ), '<span class="required">*</span>' );
Expand Down Expand Up @@ -534,15 +534,15 @@ function ipt_kb_comment_form( $args = array(), $post_id = null ) {
<?php
do_action( 'comment_form_before_fields' );
?>
<div class="col-md-5">
<div class="col-sm-5">
<?php
foreach ( (array) $args['fields'] as $name => $field ) {
echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
}
do_action( 'comment_form_after_fields' );
?>
</div>
<div class="col-md-7">
<div class="col-sm-7">
<?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?>
</div>
<div class="clearfix"></div>
Expand Down Expand Up @@ -628,20 +628,20 @@ function ipt_kb_author_meta( $author_id = null ) {
$buttons = array(
'user_url' => array(
'title' => __( 'Website', 'ipt_kb' ),
'icon' => 'ipt-home',
'icon' => 'ipt-icon-home',
),
// Some compatibility with WordPress SEO
'facebook' => array(
'title' => __( 'Facebook', 'ipt_kb' ),
'icon' => 'ipt-facebook',
'icon' => 'ipt-icon-facebook',
),
'twitter' => array(
'title' => __( 'Twitter', 'ipt_kb' ),
'icon' => 'ipt-twitter',
'icon' => 'ipt-icon-twitter',
),
'googleplus' => array(
'title' => __( 'Google+', 'ipt_kb' ),
'icon' => 'ipt-google-plus',
'icon' => 'ipt-icon-google-plus',
),
);

Expand Down
4 changes: 2 additions & 2 deletions inc/wp_bootstrap_navwalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
* If not empty, then add something with glymphicons class
*/
$icon = '';
if ( ! empty( $item->xfn ) ) {
if ( ! empty( $item->xfn ) && preg_match( '/(ipt-icon-)|(glyphicon)/', $item->xfn ) ) {
$icon = '<span class="glyphicon ' . esc_attr( $item->xfn ) . '"></span>&nbsp;';
}

Expand Down Expand Up @@ -88,7 +88,7 @@ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$atts = array();
$atts['title'] = ! empty( $item->title ) ? $item->title : '';
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
$atts['rel'] = ! empty( $item->xfn ) && ! preg_match( '/(ipt-icon-)|(glyphicon)/', $item->xfn ) ? $item->xfn : '';

//If item has_children add atts to a
if($args->has_children && $depth === 0) {
Expand Down
Loading

0 comments on commit 0d37c16

Please sign in to comment.