Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaning up redundant buddypress code

  • Loading branch information...
commit 529295aa02f32e54f0f7fcc473137302a4e78321 1 parent c7160d4
@craigcook craigcook authored
View
18 themes/QMO5/comments.php
@@ -46,12 +46,20 @@
<p id="cancel-comment-reply"><?php cancel_comment_reply_link('Cancel Reply'); ?></p>
<ol>
<?php if ( $user_ID ) : ?>
- <?php global $current_user; get_currentuserinfo(); ?>
- <li class="self">Logged in as <a href="<?php echo bp_loggedin_user_domain(); ?>"><?php echo $current_user->display_name; ?> <?php echo bp_core_fetch_avatar( 'item_id='.$current_user->ID ); ?></a> <a class="logout" href="<?php echo wp_logout_url($_SERVER['REQUEST_URI']); ?>" title="Log out of this account">Log out</a></li>
+ <li class="self"><?php printf( __( 'You are logged in as <a href="%1$s">%2$s</a>. <a class="logout" href="%3$s">Log out?</a>', 'onemozilla' ), admin_url( 'profile.php' ), esc_html($user_identity), wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ); ?></li>
<?php else : ?>
- <li id="cmt-name"><label for="author">Your name <?php if ($req) echo "<abbr title='required'>*</abbr>"; ?></label> <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="25" /></li>
- <li id="cmt-email"><label for="email">Your e-mail <?php if ($req) echo "<abbr title='required'>*</abbr>"; ?> <span class="note">(not published)</span> </label> <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="25" /></li>
- <li id="cmt-web"><label for="url">Your website</label> <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="25" /></li>
+ <li id="cmt-name">
+ <label for="author">Your name <?php if ($req) : ?><span class="note"><?php _e('(required)', 'onemozilla'); ?></span><?php endif; ?></label>
+ <input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="25" <?php if ($req) echo "required aria-required='true'"; ?>>
+ </li>
+ <li id="cmt-email">
+ <label for="email">Your e-mail <?php if ($req) : ?><span class="note"><?php _e('(required, will not be published)', 'onemozilla'); ?></span><?php endif; ?></label>
+ <input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="25" <?php if ($req) echo "required aria-required='true'"; ?>>
+ </li>
+ <li id="cmt-web">
+ <label for="url">Your website</label>
+ <input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="25">
+ </li>
<?php endif; ?>
<li id="cmt-cmt">
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.textarea-expander.js" type="text/javascript"></script>
View
8 themes/QMO5/footer.php
@@ -1,8 +1,5 @@
</div><!-- /#content -->
-<?php do_action( 'bp_after_container' ); ?>
-<?php do_action( 'bp_before_footer' ); ?>
-
<footer id="site-info" role="contentinfo" class="section">
<p id="copyright">Copyright &copy; <?php echo date('Y'); ?> Mozilla. All rights reserved. | <a href="http://www.mozilla.org/privacy-policy.html" rel="external">Privacy Policy</a> | <a href="http://www.mozilla.org/about/legal.html" rel="external">Legal Notices</a></p>
<p>Portions of QMO content are &copy; 1998&ndash;<?php echo date('Y');?> by individual mozilla.org contributors.</p>
@@ -11,10 +8,7 @@
<?php if (get_page_by_path('about')) : ?>
<p><a href="<?php echo get_permalink(get_page_by_path('about')->ID); ?>"><?php echo get_page_by_path('about')->post_title; ?></a></p>
<?php endif; ?>
- </footer>
-
-<?php do_action( 'bp_footer' ); ?>
-<?php do_action( 'bp_after_footer' ); ?>
+ </footer>
<?php wp_footer(); ?>
</div>
View
13 themes/QMO5/header.php
@@ -52,15 +52,8 @@
elseif ( is_day() ) { $post = $posts[0]; _e('Posts for ', 'qmo'); echo the_time('F jS, Y'); echo ' &#124; '; bloginfo('name'); qmo_page_number(); }
elseif ( is_month() ) { $post = $posts[0]; _e('Posts for ', 'qmo'); echo the_time('F, Y'); echo ' &#124; '; bloginfo('name'); qmo_page_number(); }
elseif ( is_year() ) { $post = $posts[0]; _e('Posts for ', 'qmo'); echo the_time('Y'); echo ' &#124; '; bloginfo('name'); qmo_page_number(); }
- else {
- if ( function_exists('bp_is_active') ) :
- qmo_page_title('&#124;',1,'right'); bloginfo('name'); qmo_page_number();
- else :
- wp_title('&#124;',1,'right'); bloginfo('name'); qmo_page_number();
- endif;
- }
- ?></title>
- <?php if ( function_exists('bp_is_active') ) { do_action( 'bp_head' ); } ?>
+ else { wp_title('&#124;',1,'right'); bloginfo('name'); qmo_page_number(); } ?>
+ </title>
<?php wp_head(); ?>
<script type="text/javascript">
var _gaq = _gaq || [];
@@ -76,9 +69,7 @@
<body <?php body_class(); ?>>
<div class="wrapper">
-<?php do_action( 'bp_before_header' ); ?>
<header id="masthead" class="section">
-
<div id="header">
<a href="http://www.mozilla.org/" id="tabzilla">Mozilla</a>
</div><!-- end #header -->
View
14 themes/QMO5/home.php
@@ -31,20 +31,6 @@
</ul>
<?php endif; ?>
-
- <?php if ( function_exists('bp_is_active') && bp_is_active( 'groups' ) && bp_has_groups( bp_ajax_querystring( 'groups' ) ) ) : ?>
- <ul class="teams-list">
- <?php while ( bp_groups() ) : bp_the_group(); ?>
- <li>
- <a href="<?php bp_group_permalink(); ?>">
- <?php bp_group_avatar( 'width=100&height=100' ); ?>
- <?php bp_group_name(); ?>
- </a>
- </li>
- <?php endwhile; ?>
- </ul>
- <?php endif; ?>
-
<?php the_content(); ?>
</header>
View
5 themes/QMO5/user-state.php
@@ -8,11 +8,7 @@
get_currentuserinfo(); ?>
<div id="user-state">
<ul class="howdy">
- <?php if ( function_exists('bp_is_active') ) : ?>
- <li class="user-greet"><a href="<?php echo bp_loggedin_user_domain(); ?>" title="Your profile"><?php echo bp_core_fetch_avatar( 'item_id='.$current_user->ID ); ?><?php echo $current_user->display_name; ?></a></li>
- <?php else : ?>
<li class="user-greet"><a href="<?php echo admin_url('profile.php'); ?>" title="Your profile"><?php echo get_avatar( $current_user->ID, 50 ); ?><?php echo $current_user->display_name; ?></a></li>
- <?php endif; ?>
<?php if( current_user_can('publish_posts') ) : ?>
<li class="user-admin"><a href="<?php echo get_admin_url(); ?>">Site Admin</a></li>
<?php endif; ?>
@@ -25,7 +21,6 @@
<li><label for="pwd">Password</label> <input type="password" name="pwd" id="pwd"></li>
<li class="check"><label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" value="forever"> Remember me</label></li>
<li class="submit"><button type="submit" name="submit" class="button">Log in</button></li>
- <li class="signup"><strong><a href="<?php echo bp_get_signup_page(false); ?>" title="<?php _e('Not registered? Sign up!', 'qmo'); ?>"><?php _e('Sign up', 'qmo'); ?></a></strong></li>
</ul>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>">
</form>
Please sign in to comment.
Something went wrong with that request. Please try again.