Changeset 3193 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php
- Timestamp:
- 05/20/2016 05:16:55 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
-
Property
svn:ignore
set to
node_modules
-
Property
svn:ignore
set to
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php
r3009 r3193 1 1 <?php 2 namespace WordPressdotorg\Plugin_Directory\Theme;3 4 2 /** 5 3 * The header for our theme. 6 4 * 7 * @package wporg-plugins 5 * This is the template that displays all of the <head> section and everything up until <div id="content"> 6 * 7 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials 8 * 9 * @package WordPressdotorg\Plugin_Directory\Theme 8 10 */ 9 11 12 namespace WordPressdotorg\Plugin_Directory\Theme; 13 10 14 $GLOBALS['pagetitle'] = __( 'Plugin Directory — Free WordPress Plugins', 'wporg-plugins' ); 15 $description = get_bloginfo( 'description', 'display' ); 11 16 12 17 require WPORGPATH . 'header.php'; 13 18 ?> 19 <div id="page" class="site"> 20 <a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'wporg-plugins' ); ?></a> 14 21 15 <div id="headline"> 16 <div class="wrapper"> 17 <h2><a href="<?php echo home_url('/'); ?>"><?php _e( 'Plugin Directory', 'wporg-plugins' ); ?></a></h2> 18 <?php 19 $items = array(); 20 if ( is_user_logged_in() ) { 21 $items[] = sprintf( 22 __( 'Welcome, %s', 'wporg-plugins' ), 23 sprintf( 24 '<a href="https://profiles.wordpress.org/%s">%s</a>', 25 wp_get_current_user()->user_nicename, 26 wp_get_current_user()->display_name 27 ) 28 ); 29 if ( true /* user_has_plugins */ ) { 30 $items[] = '<a href="' . admin_url( 'edit.php?post_type=plugin' ) . '">' . __( 'Manage My Plugins', 'wporg-plugins' ) . '</a>'; 31 } 32 $items[] = '<a href="https://login.wordpress.org/logout">' . __( 'Log Out', 'wporg-plugins' ) . '</a>'; 33 } else { 34 $items[] = '<a href="https://login.wordpress.org/?redirect_to=' . urlencode( wporg_plugins_self_link() ) . '">' . __( 'Log In', 'wporg-plugins' ) . '</a>'; 35 } 36 echo '<p class="login">' . implode( ' | ', $items ) . '</p>'; 37 ?> 38 </div> 39 </div> 22 <header id="masthead" class="site-header" role="banner"> 23 <div class="site-branding"> 24 <?php if ( is_front_page() && is_home() ) : ?> 25 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 26 <?php else : ?> 27 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 28 <?php endif; ?> 40 29 41 <div id="pagebody"> 30 <?php if ( is_home() || is_search() ) : 31 if ( $description || is_customize_preview() ) : ?> 32 <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p> 33 <?php endif; ?> 34 <?php get_search_form(); ?> 35 <?php else : ?> 36 <nav id="site-navigation" class="main-navigation" role="navigation"> 37 <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', '_s' ); ?></button> 38 <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?> 39 </nav><!-- #site-navigation --> 40 <?php endif; ?> 41 </div><!-- .site-branding --> 42 </header><!-- #masthead --> 43 44 <div id="content" class="site-content">
Note: See TracChangeset
for help on using the changeset viewer.