init
This commit is contained in:
commit
296a2258c1
35 changed files with 12274 additions and 0 deletions
45
template-parts/header/site-branding.php
Normal file
45
template-parts/header/site-branding.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Displays header site branding
|
||||
*
|
||||
* @package Modern
|
||||
* @copyright WebMan Design, Oliver Juhas
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @version 2.5.0
|
||||
*/
|
||||
|
||||
$site_title = '<a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo( 'name', 'display' ) . '</a>';
|
||||
$title_tag = 'h1';
|
||||
$description = get_bloginfo( 'description', 'display' );
|
||||
|
||||
if (
|
||||
(bool) get_theme_support( 'custom-logo', 'unlink-homepage-logo' )
|
||||
&& is_front_page()
|
||||
&& ! is_paged()
|
||||
) {
|
||||
$site_title = get_bloginfo( 'name', 'display' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="site-branding">
|
||||
<?php the_custom_logo(); ?>
|
||||
<div class="site-branding-text">
|
||||
<<?php echo tag_escape( $title_tag ) ?> class="site-title"><?php
|
||||
echo $site_title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?></<?php echo tag_escape( $title_tag ) ?>>
|
||||
|
||||
<?php
|
||||
|
||||
if ( $description || is_customize_preview() ) :
|
||||
?>
|
||||
<p class="site-description"><?php
|
||||
echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?></p>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
68
template-parts/menu/menu-primary.php
Normal file
68
template-parts/menu/menu-primary.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* Primary menu template
|
||||
*
|
||||
* Accessibility markup applied (ARIA).
|
||||
*
|
||||
* @link http://a11yproject.com/patterns/
|
||||
*
|
||||
* @package Modern
|
||||
* @copyright WebMan Design, Oliver Juhas
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @version 2.5.0
|
||||
*/
|
||||
|
||||
$is_mobile_nav_enabled = Modern_Library_Customize::get_theme_mod( 'navigation_mobile' );
|
||||
|
||||
?>
|
||||
|
||||
<div class="site-header-navigation"><div class="site-header-inner">
|
||||
<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'modern' ); ?>">
|
||||
|
||||
<?php
|
||||
|
||||
if ( $is_mobile_nav_enabled ) :
|
||||
?>
|
||||
<button
|
||||
id="menu-toggle"
|
||||
class="menu-toggle"
|
||||
aria-controls="menu-primary"
|
||||
aria-expanded="false"
|
||||
><?php
|
||||
|
||||
echo esc_html_x( 'Menu', 'Mobile navigation toggle button title.', 'modern' );
|
||||
|
||||
?></button>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
?>
|
||||
<div id="site-navigation-container" class="main-navigation-container">
|
||||
<?php
|
||||
|
||||
/**
|
||||
* For `theme_location` see `Modern_Menu::primary_menu_args()` method
|
||||
* in `includes/frontend/class-menu.php` file.
|
||||
*/
|
||||
wp_nav_menu( Modern_Menu::primary_menu_args( $is_mobile_nav_enabled ) );
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- das ist Code, der die Anzeige des Language buttons betrifft und muss ins CHILD Theme verschoben werden -->
|
||||
|
||||
|
||||
<div class="language-switcher">
|
||||
<div class="language-switcher-link">
|
||||
<label for="lang_choice_1" class="visuallyhidden">Language selector</label>
|
||||
<?php
|
||||
pll_the_languages( array( 'dropdown' => 1, 'display_names_as' => 'slug' ) );
|
||||
?>
|
||||
<span class="language-switcher-icon" role="img" aria-label="Language switcher icon"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue