wordpress-theme-openmamba/sidebar-top.php

56 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2014-11-02 14:14:46 +01:00
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Top Widget Template
*
*
* @file sidebar-top.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/sidebar-top.php
* @link http://codex.wordpress.org/Theme_Development#Widgets_.28sidebar.php.29
* @since available since Release 1.0
*/
?>
<?php
if ( !is_active_sidebar( 'top-widget' )
) {
return;
}
?>
<?php responsive_widgets_before(); // above widgets container hook ?>
<div id="top-widget" class="top-widget">
<?php global $current_user;
echo "<br>";
if (!is_user_logged_in()) {
//echo "<a class='mytoplink' href=".wp_login_url( get_permalink() ).">".__('Login')."</a> / ";
echo "<a class='mytoplink' href=".site_url('/login/').">".__('Login')."</a>&nbsp;/&nbsp;";
2014-11-02 14:14:46 +01:00
echo "<a class='mytoplink' href=".site_url('/register/').">".__('Register')."</a>&nbsp;&nbsp;";
} else {
get_currentuserinfo();
2019-11-02 14:02:54 +01:00
$a = sprintf( __('Howdy, %1$s', 'responsive'), $current_user->display_name );
2014-11-02 14:14:46 +01:00
echo "<a class='mytoplink' href=".site_url('/forums/users/').$current_user->display_name.">".$a." ".get_avatar( $current_user->ID, 20 )."</a>&nbsp;&nbsp;";
echo "/ <a class='mytoplink' href=".wp_logout_url( get_permalink() ).">".__('Logout')."</a>&nbsp";
2014-11-02 14:14:46 +01:00
}
if ( function_exists ('the_msls' ) ) { echo " "; the_msls(); }
?>
<?php responsive_widgets(); // above widgets hook ?>
<?php if ( is_active_sidebar( 'top-widget' ) ) : ?>
<?php dynamic_sidebar( 'top-widget' ); ?>
<?php endif; //end of top-widget ?>
<?php responsive_widgets_end(); // after widgets hook ?>
</div><!-- end of #top-widget -->
<?php responsive_widgets_after(); // after widgets container hook ?>