Plugin Directory

Changeset 2830988


Ignore:
Timestamp:
12/09/2022 07:52:29 AM (3 years ago)
Author:
J4cob
Message:

v2.1.4

Location:
wp-bottom-menu
Files:
53 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-bottom-menu/trunk/assets/js/main.js

    r2826972 r2830988  
    4242// Page Back
    4343const wp_bottom_menu_page_back = document.querySelector(".wpbm-page-back");
    44 wp_bottom_menu_page_back.addEventListener('click', function handleClick(event) {
    45     if ( history.length > 2 ) {
    46         history.back();
    47     } else {
    48         window.location.href = WPBM.siteurl;
    49     }
    50 });
     44if ( wp_bottom_menu_page_back !== null ){
     45    wp_bottom_menu_page_back.addEventListener('click', function handleClick(event) {
     46        if ( history.length > 2 ) {
     47            history.back();
     48        } else {
     49            window.location.href = WPBM.siteurl;
     50        }
     51    });
     52}
  • wp-bottom-menu/trunk/readme.txt

    r2827503 r2830988  
    55Requires at least: 5.0
    66Tested up to: 6.1.1
    7 Stable tag: 2.1.3
     7Stable tag: 2.1.4
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    9292== Changelog ==
    9393
     94= 2.1.4 =
     95* Fix - Active menu color on the shop page.
     96* Fix - JS error on the console.
     97
    9498= 2.1.3 =
    9599* Fix - Dynamic Account Name not visible on frontend.
  • wp-bottom-menu/trunk/wp-bottom-menu.php

    r2827503 r2830988  
    33 * Plugin Name: WP Bottom Menu
    44 * Description: WP Bottom Menu allows you to add a woocommerce supported bottom menu to your site.
    5  * Version: 2.1.3
     5 * Version: 2.1.4
    66 * Author: J4 & LiquidThemes
    77 * Author URI: https://hub.liquid-themes.com/
     
    2424if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    2525
    26 define( 'WP_BOTTOM_MENU_VERSION', '2.1.3' );
     26define( 'WP_BOTTOM_MENU_VERSION', '2.1.4' );
    2727define( 'WP_BOTTOM_MENU_DIR_URL', plugin_dir_url( __FILE__ ) );
    2828define( 'WP_BOTTOM_MENU_DIR_PATH', plugin_dir_path( __FILE__ ) );
     
    287287                    if ( url_to_postid($wpbm_item_url) === get_the_ID() ){
    288288                        array_push( $classes, 'active' );
     289                    } elseif ( class_exists('WooCommerce') && is_shop() && url_to_postid($wpbm_item_url) === 0 ) {
     290                        if ( $wpbm_item_url !== home_url() ) {
     291                            array_push( $classes, 'active' );
     292                        }
    289293                    }
    290294                   
Note: See TracChangeset for help on using the changeset viewer.