Changeset 4924 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/header.php
- Timestamp:
- 02/18/2017 02:27:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/header.php
r4178 r4924 6 6 <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script> 7 7 8 <div id="headline"> 9 <div class="wrapper"> 10 <h2><a href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></h2> 11 <?php 12 wp_nav_menu( array( 13 'theme_location' => 'wporg_header_subsite_nav', 14 'fallback_cb' => '__return_false' 15 ) ); 16 ?> 8 <header id="masthead" class="site-header <?php echo wporg_gp_is_index() ? 'home' : ''; ?>" role="banner"> 9 <div class="site-branding"> 10 <?php if ( wporg_gp_is_index() ) : ?> 11 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 12 <p class="site-description"> 13 Contribute to WordPress core, themes, and plugins by translating them into your language.<br> 14 Select your locale below to get started. 15 </p> 16 <?php else : ?> 17 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 18 19 <nav id="site-navigation" class="navigation-main clear" role="navigation"> 20 <button type="button" class="menu-toggle dashicons dashicons-arrow-down-alt2"></button> 21 <?php 22 wp_nav_menu( [ 23 'theme_location' => 'wporg_header_subsite_nav', 24 'fallback_cb' => false, 25 ] ); 26 ?> 27 </nav> 28 <?php endif; ?> 17 29 </div> 18 <div class="wrapper"> 19 <ul class="translate-meta-nav"> 20 <?php 21 if ( is_user_logged_in() ) { 22 $user = wp_get_current_user(); 23 printf( 24 '<li>logged in as %s</li>', 25 '<a href="' . esc_url( gp_url_profile( $user->user_login ) ) . '">@' . esc_html( $user->user_nicename ) . '</a>' 26 ); 27 ?> 28 <li><a href="<?php echo esc_url( gp_url( '/settings' ) ); ?>">Settings</a></li> 29 <li><a href="<?php echo esc_url( wp_logout_url( home_url( '/' ) ) ); ?>">Log out</a></li> 30 <?php 31 } else { 32 ?> 33 <li><a href="<?php echo esc_url( wp_login_url( gp_url_current() ) ); ?>"><strong>Log in</strong></a></li> 34 <?php 35 } 36 ?> 37 </ul> 38 </div> 39 </div> 30 </header> 40 31 41 32 <div class="gp-content"> 42 33 43 <div id="gp-js-message"></div>34 <div id="gp-js-message"></div> 44 35 45 <?php if (gp_notice('error')): ?> 46 <div class="error"> 47 <?php echo gp_notice( 'error' ); //TODO: run kses on notices ?> 48 </div> 49 <?php endif; ?> 50 <?php if (gp_notice()): ?> 51 <div class="notice"> 52 <?php echo gp_notice(); ?> 53 </div> 54 <?php endif; ?> 55 <?php echo gp_breadcrumb(); ?> 56 <?php do_action( 'gp_after_notices' ); ?> 36 <?php 37 if ( gp_notice( 'error' ) ) : 38 ?> 39 <div class="error"> 40 <?php echo gp_notice( 'error' ); //TODO: run kses on notices ?> 41 </div> 42 <?php 43 endif; 57 44 45 if ( gp_notice() ) : 46 ?> 47 <div class="notice"> 48 <?php echo gp_notice(); ?> 49 </div> 50 <?php 51 endif; 52 53 echo gp_breadcrumb(); 54 55 do_action( 'gp_after_notices' ); 56
Note: See TracChangeset
for help on using the changeset viewer.