Skip to content

Commit 1404522

Browse files
authored
Merge pull request #155 from chyvak1831/v2-fixes
V2 fixes
2 parents 1ee7a65 + 1ad033c commit 1404522

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# STARTER
22

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

66

@@ -87,7 +87,6 @@ Probably Starter will works with other plugin versions - but with versions below
8787
And paste here
8888
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/wysiwyg/wysiwyg_03.jpg" alt="TinyMCE settings 3">
8989
</details>
90-
* [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))
9190
* [Classic Editor](https://wordpress.org/plugins/classic-editor/) >= 1.6.2
9291
* [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/) >= 6.4.1
9392
<details><summary>Show details</summary>
@@ -98,7 +97,6 @@ Probably Starter will works with other plugin versions - but with versions below
9897
W3TC used for optimize page cache and js only.
9998
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/w3tc_01.jpg" alt="W3TC settings 1">
10099
<img src="https://raw.githubusercontent.com/chyvak1831/starter_img/master/archive/v1.2.0/screenshots/w3tc_02.jpg" alt="W3TC settings 2"></details>
101-
* [WooCommerce](https://wordpress.org/plugins/woocommerce/) >= 6.2.0
102100
* [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))
103101
* gulp = 4.0.2 (how to install - see next step Setup)
104102

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

130128

131129
### 👍 Highly recommended/integrated to theme plugins
130+
* [WooCommerce](https://wordpress.org/plugins/woocommerce/) >= 6.2.0
131+
* [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))
132132
* [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))
133133
<details><summary>Show details</summary>
134134
After installation go to TI Wishlist and setup minimum recommnded settings. You can to play with other settings.

assets/scss/theme/snippets/_menus.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929

3030

3131
// subnavs - dropdowns
32-
svg.arrow {
32+
.menu svg.arrow {
3333
height: 0.7em;
3434
margin-left: 3px;
3535
width: 0.7em;
3636
}
37-
[aria-expanded="true"] > svg.arrow {transform: rotate(200grad);}
37+
.menu [aria-expanded="true"] > svg.arrow {transform: rotate(200grad);}
3838
@include media-breakpoint-up(md) {
3939
.dropdown_left:not(.menu_nested_list) {
4040
.sub-menu {

footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
wp_nav_menu(
2222
array(
2323
'theme_location' => 'footer_nav',
24-
'menu_class' => 'list footer_nav',
24+
'menu_class' => 'menu list footer_nav',
2525
)
2626
);
2727
?>

inc/image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function starter_img_func( $atts ) {
2222
$img = $atts['img_id'] ? $atts['img_id'] : get_theme_mod( 'image_placeholder' );
2323

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

2727
/*default values*/
2828
$img_width = 'width="100%"';

inc/menu.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ function starter_nav_menu_objects( $sorted_menu_items, $args ) {
9393
$img_visibility = get_field( 'menu_item_img_visibility', $item );
9494
$icon_img_toggler = get_field( 'menu_item_img_toggler', $item );
9595
$icon = get_field( 'menu_item_icon', $item );
96-
$icon_response = wp_remote_get( wp_get_attachment_image_src( $icon['ID'] )[0] );
9796
$img = get_field( 'menu_item_img', $item );
9897
$img_width = get_field( 'menu_item_img_width', $item ) . 'px';
9998
$item_grow_shrink = get_field( 'menu_item_flex_width', $item );
@@ -111,10 +110,10 @@ function starter_nav_menu_objects( $sorted_menu_items, $args ) {
111110
$item->title .= "<span class='notifications_text'></span>";
112111

113112
if ( $img_visibility ) {
114-
if ( 'menu_item_icon_on' === $icon_img_toggler && '200' == $icon_response['response']['code'] ) {
115-
$item->title .= '<span class="menu_icon">' . $icon_response['body'] . '</span>';
113+
if ( 'menu_item_icon_on' === $icon_img_toggler && $icon ) {
114+
$item->title .= '<span class="menu_icon">' . wp_remote_get( wp_get_attachment_image_src( $icon['ID'] )[0] )['body'] . '</span>';
116115
} elseif ( 'menu_item_img_on' === $icon_img_toggler && $img ) {
117-
$item->title .= '<picture style="max-width:' . $img_width . '">' . starter_img_func(
116+
$item->title .= '<picture style="width:' . $img_width . '">' . starter_img_func(
118117
array(
119118
'img_src' => 'w1000',
120119
'img_sizes' => $img_width,

inc/tiny-mce-advanced.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function starter_add_editor_styles() {
265265
* @since starter 1.0
266266
*/
267267
function starter_admin_google_fonts() {
268-
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), '1' );
268+
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), null );
269269
wp_add_inline_style( 'google-fonts', starter_google_fonts_css() );
270270
}
271271
add_action( 'admin_enqueue_scripts', 'starter_admin_google_fonts' );
@@ -277,7 +277,7 @@ function starter_admin_google_fonts() {
277277
* @since starter 1.0
278278
*/
279279
function starter_frontend_google_fonts() {
280-
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), '1' );
280+
wp_enqueue_style( 'google-fonts', starter_get_google_fonts_url(), array(), null );
281281
wp_add_inline_style( 'google-fonts', starter_google_fonts_css() );
282282
}
283283
add_action( 'get_footer', 'starter_frontend_google_fonts' );

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Theme Name: starter
33
Text Domain: starter
4-
Version: 2.0.0
4+
Version: 2.0.1
55
Author: https://github.com/chyvak1831
66
*/

0 commit comments

Comments
 (0)