function cp_admin_bar_render() { global $wp_admin_bar; if (is_user_logged_in()) { $wp_admin_bar->remove_menu('logout'); $wp_admin_bar->add_menu(array('parent' => 'user-actions', 'id' => 'logout', 'title' => __('Log out', APP_TD), 'href' => cp_logout_url())); } }
function cpro_login_head() { if (is_user_logged_in()) { global $current_user; $current_user = wp_get_current_user(); $display_user_name = cp_get_user_name(); $logout_url = cp_logout_url(); ?> <?php _e('Welcome,', APP_TD); ?> <strong><?php echo $display_user_name; ?> </strong> [ <a href="<?php echo CP_DASHBOARD_URL; ?> "><?php _e('My Dashboard', APP_TD); ?> </a> | <a href="<?php echo $logout_url; ?> "><?php _e('Log out', APP_TD); ?> </a> ] <?php } else { ?> <?php _e('Welcome,', APP_TD); ?> <strong><?php _e('visitor!', APP_TD); ?> </strong> [ <a href="<?php echo appthemes_get_registration_url(); ?> "><?php _e('Register', APP_TD); ?> </a> | <a href="<?php echo wp_login_url(); ?> "><?php _e('Login', APP_TD); ?> </a> ] <?php } }
function cp_main_comment_form() { global $post; ?> <script type="text/javascript"> <!--//--><![CDATA[//><!-- jQuery(document).ready(function($) { /* initialize the form validation */ $(function() { $("#commentform").validate({ errorClass: "invalid", errorElement: "div", errorPlacement: function(error, element) { error.insertAfter(element); } }); $("#commentform").fadeIn(); }); }); //-->!]]> </script> <div id="respond"> <h2 class="dotted"><?php comment_form_title(__('Leave a Reply', APP_TD), __('Leave a Reply to %s', APP_TD)); ?> </h2> <div class="cancel-comment-reply"> <small><?php cancel_comment_reply_link(); ?> </small> </div> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <p><?php printf(__("You must be <a href='%s'>logged in</a> to post a comment.", APP_TD), wp_login_url(get_permalink())); ?> </p> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="commentform" class="commentform"> <?php do_action('comment_form_top'); ?> <fieldset class="form-comments"> <?php if (is_user_logged_in()) { global $user_identity; ?> <p><?php _e('Logged in as', APP_TD); ?> <a href="<?php echo CP_PROFILE_URL; ?> "><?php echo $user_identity; ?> </a>. <a href="<?php echo cp_logout_url(); ?> " title="<?php _e('Logout of this account', APP_TD); ?> "><?php _e('Logout', APP_TD); ?> »</a></p> <?php } else { ?> <?php $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); ?> <p class="comments"> <label for="author"><?php _e('Name', APP_TD); ?> <?php if ($req) { _e('(required)', APP_TD); } ?> </label> <input type="text" name="author" id="author" class="text required" value="<?php echo esc_attr($commenter['comment_author']); ?> " size="22" tabindex="1" /> </p> <div class="clr"></div> <p class="comments"> <label for="email"><?php _e('Email (will not be visible)', APP_TD); ?> <?php if ($req) { _e('(required)', APP_TD); } ?> </label> <input type="text" name="email" id="email" class="text required email" value="<?php echo esc_attr($commenter['comment_author_email']); ?> " size="22" tabindex="2" /> </p> <div class="clr"></div> <p class="comments"> <label for="url"><?php _e('Website', APP_TD); ?> </label> <input type="text" name="url" id="url" class="text" value="<?php echo esc_attr($commenter['comment_author_url']); ?> " size="22" tabindex="3" /> </p> <div class="clr"></div> <?php } ?> <!--<li><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?> </small><div class="clr"></div></li>--> <p class="comments-box"> <textarea name="comment" rows="" cols="" id="comment" class="required" tabindex="4"></textarea> </p> <div class="clr"></div> <p class="comments"> <input name="submit" type="submit" id="submit" tabindex="5" class="btn_orange" value="<?php _e('Leave a Reply', APP_TD); ?> " /> <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?> " /> </p> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </fieldset> </form> <?php } // if logged in ?> <div class="clr"></div> </div> <!-- /respond --> <?php }
<?php /** * User Sidebar template. * * @package ClassiPress\Templates * @author AppThemes * @since ClassiPress 1.0 */ global $current_user, $cp_options; $logout_url = cp_logout_url(); ?> <!-- right sidebar --> <div class="content_right"> <div class="shadowblock_out"> <div class="shadowblock"> <h2 class="dotted"><?php _e('Dashboard', APP_TD); ?> </h2> <div class="recordfromblog"> <?php if (has_nav_menu('theme_dashboard')) { wp_nav_menu(array('theme_location' => 'theme_dashboard', 'menu_id' => 'menu-dashboard', 'container' => false)); } else {