Making WordPress.org


Ignore:
Timestamp:
11/22/2015 03:55:11 PM (9 years ago)
Author:
ocean90
Message:

Translate: Update 'header' and 'helper functions' templates for GlotPress as a plugin.

See #1352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/public_html/gp-templates-new/header.php

    r1157 r2105  
    11<?php
    2 wp_enqueue_style( 'base' );
    3 wp_enqueue_script( 'jquery' );
    4 
    52global $pagetitle;
    63$pagetitle = gp_title();
     
    1613        <a class="menu-link" href="//make.wordpress.org/polyglots/handbook/">Translator Handbook</a>
    1714        <?php
    18         if (GP::$user->logged_in()):
    19             $user = GP::$user->current();
     15        if ( is_user_logged_in() ):
     16            $user = wp_get_current_user();
    2017
    2118            printf( __('Hi, %s.'), '<a href="'.gp_url( '/profile' ).'">'.$user->user_login.'</a>' );
    2219            ?>
    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>
    2421        <?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>
    2623        <?php endif; ?>
    2724        <?php do_action( 'after_hello' ); ?>
     
    4441        <?php endif; ?>
    4542        <?php echo gp_breadcrumb(); ?>
    46         <?php do_action( 'after_notices' ); ?>
     43        <?php do_action( 'gp_after_notices' ); ?>
    4744
Note: See TracChangeset for help on using the changeset viewer.