diff options
author | Zach van Rijn <me@zv.io> | 2021-07-21 16:19:29 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2021-07-21 16:19:29 -0500 |
commit | 69c17f9c1942fd0d6a5ea941636e87723b8a6fe2 (patch) | |
tree | e1d0212147048204b0eede0aa6ff79849ed479da /inc/compatibility/class-astra-ubermeu.php | |
parent | 74a7109a2a5ab0d191f26c917ae69e46f0d83b32 (diff) | |
download | blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.gz blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.bz2 blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.xz blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.zip |
dos2unix on all .php files, begin paring down admin page and site branding.
Diffstat (limited to 'inc/compatibility/class-astra-ubermeu.php')
-rw-r--r-- | inc/compatibility/class-astra-ubermeu.php | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/inc/compatibility/class-astra-ubermeu.php b/inc/compatibility/class-astra-ubermeu.php index 168c379..745b32f 100644 --- a/inc/compatibility/class-astra-ubermeu.php +++ b/inc/compatibility/class-astra-ubermeu.php @@ -1,87 +1,87 @@ -<?php
-/**
- * Ubermenu Compatibility File.
- *
- * @link https://Ubermenu.me/
- * @since 1.1.7
- *
- * @package Astra
- */
-
-// If plugin - 'Ubermenu' not exist then return.
-if ( ! class_exists( 'UberMenu' ) ) {
- return;
-}
-
-/**
- * Astra Ubermenu Compatibility
- */
-if ( ! class_exists( 'Astra_Ubermeu' ) ) :
-
- /**
- * Astra Ubermenu Compatibility
- *
- * @since 1.0.0
- */
- class Astra_Ubermeu {
-
- /**
- * Member Variable
- *
- * @var object instance
- */
- private static $instance;
-
- /**
- * Initiator
- *
- * @since 1.1.7
- */
- public static function get_instance() {
- if ( ! isset( self::$instance ) ) {
- self::$instance = new self();
- }
- return self::$instance;
- }
-
- /**
- * Constructor
- *
- * @since 1.1.7
- */
- public function __construct() {
- add_filter( 'astra_enable_mobile_menu_buttons', array( $this, 'disable_primary_menu_toggle' ), 30 );
- }
-
- /**
- * Disable the Mobile Menu toggles from Astra if Uber Menu is used.
- *
- * @since 1.1.7
- * @param bool $status Status if the mobile menu toggels are enaled or disaled.
- * @return bool False If ubermenu is configured on this location. Unchanged if it is not configured.
- */
- public function disable_primary_menu_toggle( $status ) {
-
- // Don't overrde anythign if ubermenu's function is not present.
- if ( ! function_exists( 'ubermenu_get_menu_instance_by_theme_location' ) ) {
- return $status;
- }
-
- $ubermenu_auto_config = ubermenu_get_menu_instance_by_theme_location( 'primary' );
-
- // If ubermenu's auto configuration is not used here, don't override the filter.
- if ( '' === $ubermenu_auto_config || false === $ubermenu_auto_config ) {
- return $status;
- }
-
- return false;
- }
-
- }
-
-endif;
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-Astra_Ubermeu::get_instance();
+<?php +/** + * Ubermenu Compatibility File. + * + * @link https://Ubermenu.me/ + * @since 1.1.7 + * + * @package Astra + */ + +// If plugin - 'Ubermenu' not exist then return. +if ( ! class_exists( 'UberMenu' ) ) { + return; +} + +/** + * Astra Ubermenu Compatibility + */ +if ( ! class_exists( 'Astra_Ubermeu' ) ) : + + /** + * Astra Ubermenu Compatibility + * + * @since 1.0.0 + */ + class Astra_Ubermeu { + + /** + * Member Variable + * + * @var object instance + */ + private static $instance; + + /** + * Initiator + * + * @since 1.1.7 + */ + public static function get_instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Constructor + * + * @since 1.1.7 + */ + public function __construct() { + add_filter( 'astra_enable_mobile_menu_buttons', array( $this, 'disable_primary_menu_toggle' ), 30 ); + } + + /** + * Disable the Mobile Menu toggles from Astra if Uber Menu is used. + * + * @since 1.1.7 + * @param bool $status Status if the mobile menu toggels are enaled or disaled. + * @return bool False If ubermenu is configured on this location. Unchanged if it is not configured. + */ + public function disable_primary_menu_toggle( $status ) { + + // Don't overrde anythign if ubermenu's function is not present. + if ( ! function_exists( 'ubermenu_get_menu_instance_by_theme_location' ) ) { + return $status; + } + + $ubermenu_auto_config = ubermenu_get_menu_instance_by_theme_location( 'primary' ); + + // If ubermenu's auto configuration is not used here, don't override the filter. + if ( '' === $ubermenu_auto_config || false === $ubermenu_auto_config ) { + return $status; + } + + return false; + } + + } + +endif; + +/** + * Kicking this off by calling 'get_instance()' method + */ +Astra_Ubermeu::get_instance(); |