Changeset 2105
- Timestamp:
- 11/22/2015 03:55:11 PM (9 years ago)
- Location:
- sites/trunk/translate.wordpress.org/public_html/gp-templates-new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates-new/header.php
r1157 r2105 1 1 <?php 2 wp_enqueue_style( 'base' );3 wp_enqueue_script( 'jquery' );4 5 2 global $pagetitle; 6 3 $pagetitle = gp_title(); … … 16 13 <a class="menu-link" href="//make.wordpress.org/polyglots/handbook/">Translator Handbook</a> 17 14 <?php 18 if ( GP::$user->logged_in()):19 $user = GP::$user->current();15 if ( is_user_logged_in() ): 16 $user = wp_get_current_user(); 20 17 21 18 printf( __('Hi, %s.'), '<a href="'.gp_url( '/profile' ).'">'.$user->user_login.'</a>' ); 22 19 ?> 23 <a href="<?php echo gp_url('/logout')?>"><?php _e('Log out'); ?></a>20 <a href="<?php echo esc_url( wp_logout_url( home_url( '/' ) ) ); ?>"><?php _e( 'Log out' ); ?></a> 24 21 <?php else: ?> 25 <strong><a href="<?php echo gp_url_login(); ?>"><?php _e('Log in'); ?></a></strong>22 <strong><a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a></strong> 26 23 <?php endif; ?> 27 24 <?php do_action( 'after_hello' ); ?> … … 44 41 <?php endif; ?> 45 42 <?php echo gp_breadcrumb(); ?> 46 <?php do_action( ' after_notices' ); ?>43 <?php do_action( 'gp_after_notices' ); ?> 47 44 -
sites/trunk/translate.wordpress.org/public_html/gp-templates-new/helper-functions.php
r2073 r2105 1 1 <?php 2 wp_register_style( 'wporg-translate', 'https://wordpress.org/translate/gp-templates-new/style.css', array( 'base' ), '20151111' ); 3 gp_enqueue_style( 'wporg-translate' ); 2 4 3 wp_enqueue_style( 'wporg', gp_url_ssl( gp_url_public_root() ) . 'gp-templates/style.css', array( 'base' ), '20151111' ); 4 5 add_action( 'tmpl_load_locations', function( $locations, $template, $args, $template_path ) { 5 add_action( 'gp_tmpl_load_locations', function( $locations, $template, $args, $template_path ) { 6 6 $core_templates = GP_PATH . 'gp-templates/'; 7 7 require_once $core_templates . 'helper-functions.php'; … … 9 9 return $locations; 10 10 }, 50, 4 ); 11
Note: See TracChangeset
for help on using the changeset viewer.