Skip to content

Commit

Permalink
Merge pull request #155 from chyvak1831/v2-fixes
Browse files Browse the repository at this point in the history
V2 fixes
  • Loading branch information
chyvak1831 authored Aug 22, 2022
2 parents 1ee7a65 + 1ad033c commit 1404522
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# STARTER

Starter WooCommerce theme, how it looks/works by default see here https://starter-demo.dakha.info/.
Starter WooCommerce theme, how it looks/works by default see here https://starter-demo.dakha.info/shop.
Open source, free to use - MIT license.


Expand Down Expand Up @@ -87,7 +87,6 @@ Probably Starter will works with other plugin versions - but with versions below
And paste here
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/wysiwyg/wysiwyg_03.jpg" alt="TinyMCE settings 3">
</details>
* [Advanced Woo Search](https://wordpress.org/plugins/advanced-woo-search/) >= 2.47 (see [Widgets (search, minicart, wishlist) in menu](https://github.com/chyvak1831/starter/wiki/Menus))
* [Classic Editor](https://wordpress.org/plugins/classic-editor/) >= 1.6.2
* [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/) >= 6.4.1
<details><summary>Show details</summary>
Expand All @@ -98,7 +97,6 @@ Probably Starter will works with other plugin versions - but with versions below
W3TC used for optimize page cache and js only.
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/w3tc_01.jpg" alt="W3TC settings 1">
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/w3tc_02.jpg" alt="W3TC settings 2"></details>
* [WooCommerce](https://wordpress.org/plugins/woocommerce/) >= 6.2.0
* [Node.js](https://nodejs.org/) = 17.x.x (**IMPORTANT for Windows: be sure that you're using x86 version, e.g. [v17](https://nodejs.org/download/release/v17.0.0/node-v17.0.0-x86.msi))
* gulp = 4.0.2 (how to install - see next step Setup)

Expand Down Expand Up @@ -129,6 +127,8 @@ Open site with port 4000 to get [browserSync](https://browsersync.io/docs/gulp)


### 👍 Highly recommended/integrated to theme plugins
* [WooCommerce](https://wordpress.org/plugins/woocommerce/) >= 6.2.0
* [Advanced Woo Search](https://wordpress.org/plugins/advanced-woo-search/) >= 2.47 (see [Widgets (search, minicart, wishlist) in menu](https://github.com/chyvak1831/starter/wiki/Menus))
* [TI WooCommerce Wishlist](https://wordpress.org/plugins/ti-woocommerce-wishlist/) >= 1.40.1 (see [Widgets (search, minicart, wishlist) in menu](https://github.com/chyvak1831/starter/wiki/Menus))
<details><summary>Show details</summary>
After installation go to TI Wishlist and setup minimum recommnded settings. You can to play with other settings.
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/theme/snippets/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@


// subnavs - dropdowns
svg.arrow {
.menu svg.arrow {
height: 0.7em;
margin-left: 3px;
width: 0.7em;
}
[aria-expanded="true"] > svg.arrow {transform: rotate(200grad);}
.menu [aria-expanded="true"] > svg.arrow {transform: rotate(200grad);}
@include media-breakpoint-up(md) {
.dropdown_left:not(.menu_nested_list) {
.sub-menu {
Expand Down
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
wp_nav_menu(
array(
'theme_location' => 'footer_nav',
'menu_class' => 'list footer_nav',
'menu_class' => 'menu list footer_nav',
)
);
?>
Expand Down
2 changes: 1 addition & 1 deletion inc/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function starter_img_func( $atts ) {
$img = $atts['img_id'] ? $atts['img_id'] : get_theme_mod( 'image_placeholder' );

/*get image lazy parameter*/
$lazy = ( isset( $atts['lazy'] ) ) ? '' : 'loading="lazy"';
$lazy = ( isset( $atts['lazy'] ) && 'false' == $atts['lazy'] ) ? '' : 'loading="lazy"';

/*default values*/
$img_width = 'width="100%"';
Expand Down
7 changes: 3 additions & 4 deletions inc/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function starter_nav_menu_objects( $sorted_menu_items, $args ) {
$img_visibility = get_field( 'menu_item_img_visibility', $item );
$icon_img_toggler = get_field( 'menu_item_img_toggler', $item );
$icon = get_field( 'menu_item_icon', $item );
$icon_response = wp_remote_get( wp_get_attachment_image_src( $icon['ID'] )[0] );
$img = get_field( 'menu_item_img', $item );
$img_width = get_field( 'menu_item_img_width', $item ) . 'px';
$item_grow_shrink = get_field( 'menu_item_flex_width', $item );
Expand All @@ -111,10 +110,10 @@ function starter_nav_menu_objects( $sorted_menu_items, $args ) {
$item->title .= "<span class='notifications_text'></span>";

if ( $img_visibility ) {
if ( 'menu_item_icon_on' === $icon_img_toggler && '200' == $icon_response['response']['code'] ) {
$item->title .= '<span class="menu_icon">' . $icon_response['body'] . '</span>';
if ( 'menu_item_icon_on' === $icon_img_toggler && $icon ) {
$item->title .= '<span class="menu_icon">' . wp_remote_get( wp_get_attachment_image_src( $icon['ID'] )[0] )['body'] . '</span>';
} elseif ( 'menu_item_img_on' === $icon_img_toggler && $img ) {
$item->title .= '<picture style="max-width:' . $img_width . '">' . starter_img_func(
$item->title .= '<picture style="width:' . $img_width . '">' . starter_img_func(
array(
'img_src' => 'w1000',
'img_sizes' => $img_width,
Expand Down
4 changes: 2 additions & 2 deletions inc/tiny-mce-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function starter_add_editor_styles() {
* @since starter 1.0
*/
function starter_admin_google_fonts() {
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), '1' );
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), null );
wp_add_inline_style( 'google-fonts', starter_google_fonts_css() );
}
add_action( 'admin_enqueue_scripts', 'starter_admin_google_fonts' );
Expand All @@ -277,7 +277,7 @@ function starter_admin_google_fonts() {
* @since starter 1.0
*/
function starter_frontend_google_fonts() {
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), '1' );
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), null );
wp_add_inline_style( 'google-fonts', starter_google_fonts_css() );
}
add_action( 'get_footer', 'starter_frontend_google_fonts' );
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Theme Name: starter
Text Domain: starter
Version: 2.0.0
Version: 2.0.1
Author: https://github.com/chyvak1831
*/

0 comments on commit 1404522

Please sign in to comment.