Skip to content

Commit

Permalink
release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
skyshab committed Apr 29, 2019
1 parent 1d499b1 commit c4bd0be
Show file tree
Hide file tree
Showing 51 changed files with 688 additions and 2,485 deletions.
2 changes: 1 addition & 1 deletion app/Customize/Panels/elements/panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// Button tabs
$panel->tabs([
'title' => __('Button', 'taproot'),
'title' => __('Buttons', 'taproot'),
'sections' => [
'elements--buttons' => [ 'label' => 'default', 'hide' => false ],
'elements--buttons-hover' => [ 'label' => 'hover', 'hide' => true ],
Expand Down
4 changes: 2 additions & 2 deletions app/Customize/Panels/footer/bottom-bar/section.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@

// Color Setting: Bottom Bar Default Color
color( $manager, 'footer--bottom-bar--default-color', [
'label' => esc_html__( 'Bottom Bar Default Color', 'taproot' ),
'label' => esc_html__( 'Bottom Bar Text Color', 'taproot' ),
'section' => 'footer--bottom-bar',
]);


// Color Setting: Bottom Bar Default Color
color( $manager, 'footer--bottom-bar--default-color--hover', [
'label' => esc_html__( 'Bottom Bar Default Color: Hover', 'taproot' ),
'label' => esc_html__( 'Bottom Bar Hover Color', 'taproot' ),
'section' => 'footer--bottom-bar',
]);

Expand Down
7 changes: 6 additions & 1 deletion app/Customize/Panels/footer/panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
// footer widgets sequence
$panel->sequence([
'sections' => [
'footer--widgets' => [ 'hide' => false ],
'footer--widgets' => [
'hide' => false,
'next' => [
'label' => esc_html__('mobile', 'taproot'),
],
],
'footer--widgets-mobile' => [
'device' => 'mobile',
'hide' => true,
Expand Down
2 changes: 1 addition & 1 deletion app/Customize/Panels/footer/widgets/section.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

// Color Setting: Widget Default Color
color( $manager, 'footer--widgets--default-color', [
'label' => esc_html__( 'Default Color', 'taproot' ),
'label' => esc_html__( 'Text Color', 'taproot' ),
'section' => 'footer--widgets',
]);

Expand Down
4 changes: 4 additions & 0 deletions app/Customize/Panels/nav/header-fixed/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@
$defaults->add( 'nav--header-fixed--height--enable', false );


// menu item height
$defaults->add( 'nav--header-fixed--height', '4em' );


// dropdown background color
$defaults->add( 'nav--header-fixed--dropdown--background-color', get_theme_mod( 'colors--theme--accent' ) );
14 changes: 12 additions & 2 deletions app/Customize/Panels/typography/panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
// body sequence
$panel->sequence([
'sections' => [
'typography--body' => [ 'hide' => false ],
'typography--body' => [
'hide' => false,
'next' => [
'label' => esc_html__('mobile', 'taproot'),
],
],
'typography--body-mobile' => [
'device' => 'mobile',
'hide' => true,
Expand Down Expand Up @@ -78,7 +83,12 @@
// headings sequence
$panel->sequence([
'sections' => [
'typography--headings' => [ 'hide' => false ],
'typography--headings' => [
'hide' => false,
'next' => [
'label' => esc_html__('styles', 'taproot'),
],
],
'typography--h1' => $heading_sequence_tabs_array,
'typography--h2' => $heading_sequence_tabs_array,
'typography--h3' => $heading_sequence_tabs_array,
Expand Down
3 changes: 0 additions & 3 deletions app/Template/Header/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
use function Hybrid\View\render;
use function Hybrid\Post\render_title;
use function Hybrid\Post\render_date;
use function Hybrid\Carbon\Image\render as get_featured_img;
use function Taproot\Template\Icons\location as icon;
use function Taproot\Template\render_author;


use function wp_get_attachment_image_src as get_featured_url;
use function get_post_thumbnail_id as featured_id;

Expand Down
4 changes: 2 additions & 2 deletions app/Template/Icons/SVG.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class SVG extends Icons {
*/
public function __construct() {

$child_theme_file = '/img/theme-icons.svg';
$child_theme_file = '/svg/theme-icons.svg';
$child_theme_path = get_stylesheet_directory() . $child_theme_file;
$child_theme_url = get_stylesheet_directory_uri() . $child_theme_file;

$parent_theme_file = '/dist/img/theme-icons.svg';
$parent_theme_file = '/dist/svg/theme-icons.svg';
$parent_theme_path = get_parent_theme_file_path( $parent_theme_file );
$parent_theme_url = get_parent_theme_file_uri( $parent_theme_file );

Expand Down
26 changes: 23 additions & 3 deletions app/Template/Nav/Nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ class Nav implements Bootable {
*/
public function boot() {
add_action( 'init', [ $this, 'register_nav_menus' ], 5 );
add_filter( 'hybrid/attr/menu/class', [ $this, 'nav_classes' ], 100, 2 );
add_filter( 'hybrid/attr/menu/class', [ $this, 'nav_classes' ], 100, 2 );
add_filter( 'nav_menu_css_class', [ $this, 'menu_item_classes' ], 10, 3 );
add_filter( 'nav_menu_item_args', [ $this, 'menu_item_dropdowns' ], 10, 2 );
add_filter( 'taproot/template/menu-toggle', [ $this, 'menu_toggle' ], 10, 2 );
add_filter( 'nav_menu_link_attributes', [ $this, 'nav_menu_link_attributes' ], 10, 3 );
add_filter( 'taproot/template/menu-toggle', [ $this, 'menu_toggle' ], 10, 2 );
add_filter( 'nav_menu_link_attributes', [ $this, 'nav_menu_link_attributes' ], 10, 3 );
add_filter( 'nav_menu_submenu_css_class', [ $this, 'nav_menu_submenu_css_class' ], 10, 2 );
add_filter( 'hybrid/pagination/posts/args', [ $this, 'pagination' ] );
add_filter( 'hybrid/pagination/post/args', [ $this, 'pagination' ] );
add_filter( 'hybrid/pagination/comments/args', [ $this, 'pagination' ] );
Expand Down Expand Up @@ -254,6 +255,7 @@ public function menu_toggle( $location ) {
function menu_item_classes( $classes, $item, $args = [] ) {

if( $args->theme_location ) {
$classes[] = 'menu--theme__item';
$classes[] = sprintf( 'menu--%s__item', $args->theme_location );
}

Expand Down Expand Up @@ -292,13 +294,31 @@ function menu_item_dropdowns( $args, $item ) {
* @since 1.0.0
*/
public function nav_menu_link_attributes( $atts, $item, $args ) {

if( $args->theme_location ) {
$atts['class'] .= ' menu--theme__link';
$atts['class'] .= sprintf( ' menu--%s__link', $args->theme_location );
}

return $atts;
}


/**
* Set submenu classes
*
* @since 1.1.1
*/
public function nav_menu_submenu_css_class( $classes, $args ) {

if( $args->theme_location ) {
$classes[] = 'menu--theme__sub-menu';
}

return $classes;
}


/**
* Add custom pagination attributes
*
Expand Down
26 changes: 21 additions & 5 deletions app/Template/Post/functions-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Taproot\Template;

use function Taproot\Customize\theme_mod;
use Hybrid\Carbon\Image as Featured_Image;


/**
* Output Archive Link
Expand Down Expand Up @@ -121,16 +121,32 @@ function render_author( array $args = [] ) {
* Displays the featured image.
*
* @since 1.0.0
* @param array $args
* @return string
* @param array $args
* @param string $type
* @return void
*/
function featured_image( $args = [], $type = '' ) {

if( !apply_filters( 'taproot/template/featured-image/display', true, $type ) ) return;

$post_id = get_the_ID();
$args = wp_parse_args( $args, [
'size' => 'full',
'link' => false,
'class' => ''
]);

Featured_Image::display( 'featured', $args );
if ( has_post_thumbnail( $post_id ) ) {

$html = '';
if( $args['link'] ) {
$html .= '<a href="' . get_permalink( $post_id ) . '" title="' . get_the_title() . '">';
}

$html .= get_the_post_thumbnail( $post_id, $args['size'], array( 'class' => $args['class'] ) );

if( $args['link'] ) {
$html .= '</a>';
}
echo $html;
}
}
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

= 1.1.1 =
* 04/28/19
* Fix - Nav menu widget styles
* Fix - Button block aligncenter styles
* Fix - Fixed fatal related to featured image class
* General - Added missing Customizer labels
* General - Moved SVG icons file
* General - Removed unecessary menu class selectors

= 1.1.0 =
* 04/24/19
* Bug Fix - Customizer live preview js was not importing utility functions.
Expand Down
2 changes: 1 addition & 1 deletion dist/css/editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/editor.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/screen.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/screen.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit c4bd0be

Please sign in to comment.