// add pm count to the Classipress header function pm_toolbar_link($cp_header) { global $cartpaujPMS; $URL = get_permalink($cartpaujPMS->getPageID()); $numNew = $cartpaujPMS->getNewMsgs(); $args = array( 'id' => 'pm', 'title' => ''. __("You have", "cartpaujpm").' (<span style="color: red;"> ' . $numNew . ' </span>) '.__("new messages", "cartpaujpm").'', 'href' => '' . $URL . '', 'meta' => array( 'class' => 'pm', 'title' => '' . $URL . '' ) ); $cp_header->add_node($args); } add_action('appthemes_header', 'pm_toolbar_link');
// display the login message in the header if (!function_exists('cp_login_head')) { function cp_login_head() { if (is_user_logged_in()) : global $current_user, $facebook; $current_user = wp_get_current_user(); if ( 'fb-' == substr( $current_user->user_login, 0, 3 ) ) { $display_user_name = $current_user->display_name; } else { $display_user_name = $current_user->user_login; } $logout_url = cp_logout_url(); ?> <?php _e('Welcome,','appthemes'); ?> <strong><?php echo $display_user_name; ?></strong> [ <a href="<?php echo CP_DASHBOARD_URL ?>"><?php _e('My Dashboard','appthemes'); ?></a> | <a href="http://monti.com.mt/message/"><?php _e('Messaging','appthemes'); ?></a> | <a href="<?php echo $logout_url; ?>"><?php _e('Log out','appthemes'); ?></a> ] <?php else : ?> <?php _e('Welcome,','appthemes'); ?> <strong><?php _e('visitor!','appthemes'); ?></strong> [ <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=register"><?php _e('Register','appthemes'); ?></a> | <a href="<?php echo get_option('siteurl'); ?>/wp-login.php"><?php _e('Login','appthemes'); ?></a> ] <?php endif; } }
There are currently 1 users browsing this thread. (0 members and 1 guests)