wordpress-theme-openmamba/sidebar-top.php

54 lines
1.7 KiB
PHP
Raw 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=".site_url('/login/').">".__('Login')."</a> / ";
echo "<a class='mytoplink' href=".site_url('/register/').">".__('Register')."</a>&nbsp;&nbsp;";
} else {
get_currentuserinfo();
$a = sprintf( __('Howdy, %1$s'), $current_user->display_name );
echo "<a class='mytoplink' href=".site_url('/forums/users/').$current_user->display_name.">".$a." ".get_avatar( $current_user->ID, 20 )."</a>&nbsp;&nbsp;";
}
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 ?>