mirror of
https://ghproxy.net/https://github.com/AlxMedia/splits.git
synced 2025-08-26 16:14:14 +08:00
Change AlxMedia to Splits (where Split didn't work before)
This commit is contained in:
parent
7f892aacf5
commit
77437c695e
4 changed files with 9 additions and 9 deletions
|
@ -46,7 +46,7 @@
|
||||||
<?php if ( has_nav_menu('footer') ): ?>
|
<?php if ( has_nav_menu('footer') ): ?>
|
||||||
<div id="wrap-nav-footer" class="wrap-nav">
|
<div id="wrap-nav-footer" class="wrap-nav">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'footer','menu_id' => 'nav-footer','fallback_cb'=> false)); ?>
|
<?php \Splits\Nav::nav_menu(array('theme_location'=>'footer','menu_id' => 'nav-footer','fallback_cb'=> false)); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -94,11 +94,11 @@ add_action( 'after_setup_theme', 'splits_setup' );
|
||||||
|
|
||||||
/* Custom navigation
|
/* Custom navigation
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
if ( ! class_exists( '\AlxMedia\Nav' ) ) {
|
if ( ! class_exists( '\Splits\Nav' ) ) {
|
||||||
require_once 'functions/nav.php';
|
require_once 'functions/nav.php';
|
||||||
}
|
}
|
||||||
add_action( 'wp', function() {
|
add_action( 'wp', function() {
|
||||||
$nav = new \AlxMedia\Nav();
|
$nav = new \Splits\Nav();
|
||||||
$nav->enqueue(
|
$nav->enqueue(
|
||||||
[
|
[
|
||||||
'script' => 'js/nav.js',
|
'script' => 'js/nav.js',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* An accessible and mobile-friendly implementation for navigation menus.
|
* An accessible and mobile-friendly implementation for navigation menus.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace AlxMedia;
|
namespace Splits;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object containing all methods and hooks to modify default menus.
|
* Object containing all methods and hooks to modify default menus.
|
||||||
|
@ -46,7 +46,7 @@ class Nav {
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $handle_prefix = 'alxmedia-nav';
|
protected $handle_prefix = 'splits-nav';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init.
|
* Init.
|
||||||
|
@ -56,7 +56,7 @@ class Nav {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function init() {
|
public function init() {
|
||||||
if ( apply_filters( 'alxmedia_disable_nav_mods', false ) ) {
|
if ( apply_filters( 'splits_disable_nav_mods', false ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
add_filter( 'walker_nav_menu_start_el', [ $this, 'add_nav_sub_menu_buttons' ], 10, 4 );
|
add_filter( 'walker_nav_menu_start_el', [ $this, 'add_nav_sub_menu_buttons' ], 10, 4 );
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
|
|
||||||
<?php if ( has_nav_menu('mobile') ): ?>
|
<?php if ( has_nav_menu('mobile') ): ?>
|
||||||
<div id="wrap-nav-mobile" class="wrap-nav">
|
<div id="wrap-nav-mobile" class="wrap-nav">
|
||||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'mobile','menu_id' => 'nav-mobile','fallback_cb'=> false)); ?>
|
<?php \Splits\Nav::nav_menu(array('theme_location'=>'mobile','menu_id' => 'nav-mobile','fallback_cb'=> false)); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( has_nav_menu('topbar') ): ?>
|
<?php if ( has_nav_menu('topbar') ): ?>
|
||||||
<div id="wrap-nav-topbar" class="wrap-nav">
|
<div id="wrap-nav-topbar" class="wrap-nav">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'topbar','menu_id' => 'nav-topbar','fallback_cb'=> false)); ?>
|
<?php \Splits\Nav::nav_menu(array('theme_location'=>'topbar','menu_id' => 'nav-topbar','fallback_cb'=> false)); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
<?php if ( has_nav_menu('header') ): ?>
|
<?php if ( has_nav_menu('header') ): ?>
|
||||||
<div id="wrap-nav-header" class="wrap-nav">
|
<div id="wrap-nav-header" class="wrap-nav">
|
||||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'header','menu_id' => 'nav-header','fallback_cb'=> false)); ?>
|
<?php \Splits\Nav::nav_menu(array('theme_location'=>'header','menu_id' => 'nav-header','fallback_cb'=> false)); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue