Ticket #2975: 2975.001.patch
| File 2975.001.patch, 5.2 KB (added by , 15 years ago) |
|---|
-
buddypress/bp-themes/bp-default/header.php
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 2 3 3 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 4 5 4 <head profile="http://gmpg.org/xfn/11"> 6 7 5 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 8 9 6 <title><?php bp_page_title() ?></title> 10 11 <?php do_action( 'bp_head' ) ?>12 13 <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->14 15 7 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> 16 8 17 <?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?> 18 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" /> 19 <?php endif; ?> 20 21 <?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_member() ) : ?> 22 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" /> 23 <?php endif; ?> 24 25 <?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?> 26 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" /> 27 <?php endif; ?> 9 <?php do_action( 'bp_head' ) ?> 28 10 29 11 <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> 30 12 31 13 <?php wp_head(); ?> 32 33 14 </head> 34 15 35 16 <body <?php body_class() ?> id="bp-default"> … … 37 18 <?php do_action( 'bp_before_header' ) ?> 38 19 39 20 <div id="header"> 40 41 21 <h1 id="logo" role="banner"><a href="<?php echo home_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1> 42 22 43 23 <div id="navigation" role="navigation"> … … 48 28 <div class="padder"> 49 29 50 30 <?php if ( bp_search_form_enabled() ) : ?> 51 52 31 <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form"> 53 32 <input type="text" id="search-terms" name="search-terms" value="" /> 54 33 <?php echo bp_search_form_type_select() ?> … … 56 35 <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 57 36 <?php wp_nonce_field( 'bp_search_form' ) ?> 58 37 </form><!-- #search-form --> 59 60 38 <?php endif; ?> 61 39 62 40 <?php do_action( 'bp_search_login_bar' ) ?> -
buddypress/bp-themes/bp-default/functions.php
103 103 // Blog button 104 104 if ( bp_is_active( 'blogs' ) ) 105 105 add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' ); 106 107 // Activity feeds 108 add_action( 'bp_head', 'bp_dtheme_sitewide_feed' ); 109 add_action( 'bp_head', 'bp_dtheme_member_feed' ); 110 add_action( 'bp_head', 'bp_dtheme_group_feed' ); 106 111 } 107 112 add_action( 'after_setup_theme', 'bp_dtheme_setup' ); 108 113 endif; … … 437 442 function bp_dtheme_activity_secondary_avatars( $action, $activity ) { 438 443 switch ( $activity->component ) { 439 444 case 'groups' : 440 case 'blogs' :441 445 case 'friends' : 442 446 // Only insert avatar if one exists 443 447 if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { … … 489 493 <?php do_action( 'bp_nav_items' ); ?> 490 494 </ul><!-- #nav --> 491 495 <?php 496 } 497 498 /** 499 * Hook activity feed to <head> 500 * 501 * @see bp_dtheme_setup() 502 * @since 1.3 503 */ 504 function bp_dtheme_sitewide_feed() { 505 if ( bp_is_active( 'activity' ) ) : 506 ?> 507 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" /> 508 <?php 509 endif; 510 } 511 512 /** 513 * Hook member activity feed to <head> 514 * 515 * @see bp_dtheme_setup() 516 * @since 1.3 517 */ 518 function bp_dtheme_member_feed() { 519 if ( bp_is_active( 'activity' ) && bp_is_member() ) : 520 ?> 521 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" /> 522 <?php 523 endif; 524 } 525 526 /** 527 * Hook group activity feed to <head> 528 * 529 * @see bp_dtheme_setup() 530 * @since 1.3 531 */ 532 function bp_dtheme_group_feed() { 533 if ( bp_is_active( 'activity' ) && bp_is_group() ) : 534 ?> 535 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" /> 536 <?php 537 endif; 492 538 } 493 539 494 540 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version.