Skip to content

Commit

Permalink
コメント追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Jan 8, 2025
1 parent 8714363 commit eaee24e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/nav-menu-class-custom/class-nav-menu-class-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ public static function is_active_menu_item( $item_src ) {
}
}

// メニュー項目のリンク先のページの投稿タイプを取得
$menu_url_post_type = self::get_post_type_from_url( $item_src );

if ( ! empty( $menu_url_post_type ) && ! empty( $displaying_page_post_type_slug ) ) {
// 今表示しているページの投稿タイプとメニューに記入されているURLの投稿タイプが同じ場合
// 今表示しているページの投稿タイプとメニューに記入されているURLのページの投稿タイプが同じ場合
if ( $displaying_page_post_type_slug === $menu_url_post_type ) {
$return = true;
}
Expand Down

0 comments on commit eaee24e

Please sign in to comment.