Skip to content

Commit

Permalink
Merge branch 'master' into add/kbd-style
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdkei authored Jun 13, 2024
2 parents f6fce6f + 3735abc commit c5e5862
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
24 changes: 6 additions & 18 deletions _g2/inc/vk-mobile-nav/package/class-vk-mobile-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ public static function menu_set_html() {
echo '<div class="vk-mobile-nav vk-mobile-nav-' . esc_attr( $option['slide_type'] ) . '" id="vk-mobile-nav">';
if ( is_active_sidebar( 'vk-mobile-nav-upper' ) ) {
dynamic_sidebar( 'vk-mobile-nav-upper' );
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-info">';
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Upper" Panel.', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

$menu_vk_mobile = wp_nav_menu(
Expand Down Expand Up @@ -140,31 +138,27 @@ public static function menu_set_html() {
echo $menu_vk_mobile;
} elseif ( $menu_theme_default ) {
echo $menu_theme_default;
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-danger">';
echo '<p>' . sprintf( __( 'Menu is not set.<br>Please set menu from [ <a href="%s">Appearance > Customize</a> ] Page -> "Menus" panel -> Menu Locations "Mobile Navigation".', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

if ( is_active_sidebar( 'vk-mobile-nav-bottom' ) ) {
dynamic_sidebar( 'vk-mobile-nav-bottom' );
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-info">';
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Bottom" Panel.', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

echo '</div>';
}

/*
Load js & CSS
Load js & CSS
/*-------------------------------------------*/

public static function add_script() {
Expand Down Expand Up @@ -217,7 +211,7 @@ public static function default_options() {
}

/*
Customizer
Customizer
/*-------------------------------------------*/

public function customize_register( $wp_customize ) {
Expand Down Expand Up @@ -294,7 +288,7 @@ public function customize_register( $wp_customize ) {
);

/*
Add Edit Customize Link Btn
Add Edit Customize Link Btn
/*-------------------------------------------*/
$wp_customize->selective_refresh->add_partial(
'vk_mobile_nav_options[position]',
Expand All @@ -303,13 +297,7 @@ public function customize_register( $wp_customize ) {
'render_callback' => '',
)
);

} // function customize_register( $wp_customize ) {





} // class Vk_Mobile_Nav

// Store in global variable so that hook in class can be removed
Expand Down
24 changes: 6 additions & 18 deletions _g3/inc/vk-mobile-nav/package/class-vk-mobile-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ public static function menu_set_html() {
echo '<div class="vk-mobile-nav vk-mobile-nav-' . esc_attr( $option['slide_type'] ) . '" id="vk-mobile-nav">';
if ( is_active_sidebar( 'vk-mobile-nav-upper' ) ) {
dynamic_sidebar( 'vk-mobile-nav-upper' );
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-info">';
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Upper" Panel.', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

$menu_vk_mobile = wp_nav_menu(
Expand Down Expand Up @@ -140,31 +138,27 @@ public static function menu_set_html() {
echo $menu_vk_mobile;
} elseif ( $menu_theme_default ) {
echo $menu_theme_default;
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-danger">';
echo '<p>' . sprintf( __( 'Menu is not set.<br>Please set menu from [ <a href="%s">Appearance > Customize</a> ] Page -> "Menus" panel -> Menu Locations "Mobile Navigation".', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

if ( is_active_sidebar( 'vk-mobile-nav-bottom' ) ) {
dynamic_sidebar( 'vk-mobile-nav-bottom' );
} else {
if ( current_user_can( 'edit_theme_options' ) ) {
} elseif ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="veu_adminEdit alert alert-info">';
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Bottom" Panel.', 'lightning' ), admin_url( 'customize.php' ) ) . '</p>';
echo '<p>' . __( '* This message is displayed only to users with editing authority.', 'lightning' ) . '</p>';
echo '</div>';
}
}

echo '</div>';
}

/*
Load js & CSS
Load js & CSS
/*-------------------------------------------*/

public static function add_script() {
Expand Down Expand Up @@ -217,7 +211,7 @@ public static function default_options() {
}

/*
Customizer
Customizer
/*-------------------------------------------*/

public function customize_register( $wp_customize ) {
Expand Down Expand Up @@ -294,7 +288,7 @@ public function customize_register( $wp_customize ) {
);

/*
Add Edit Customize Link Btn
Add Edit Customize Link Btn
/*-------------------------------------------*/
$wp_customize->selective_refresh->add_partial(
'vk_mobile_nav_options[position]',
Expand All @@ -303,13 +297,7 @@ public function customize_register( $wp_customize ) {
'render_callback' => '',
)
);

} // function customize_register( $wp_customize ) {





} // class Vk_Mobile_Nav

// Store in global variable so that hook in class can be removed
Expand Down
1 change: 1 addition & 0 deletions _g3/inc/vk-mobile-nav/package/js/vk-mobile-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ If you want to change this file that, you have to change original file.
/*-------------------------------------*/
// メニューを閉じる
function vk_mobile_nav_close(target){

let menuButton = document.getElementById('vk-mobile-nav-menu-btn');
if (menuButton) {
// ※ fix nav の方を押される事もある
Expand Down

0 comments on commit c5e5862

Please sign in to comment.