Skip to:
Content

BuddyPress.org

Changeset 3600


Ignore:
Timestamp:
12/28/2010 03:36:33 PM (14 years ago)
Author:
djpaul
Message:

Tidies up default theme's header.php -- removes duplicated generator line and the hardcoded activity feed links and attaches them to bp_head. Fixes #2975, props r-a-y

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r3598 r3600  
    11391139    }
    11401140
     1141/**
     1142 * Template tag so we can hook activity feed to <head>
     1143 *
     1144 * @since 1.3
     1145 */
     1146function bp_dtheme_sitewide_feed() {
    11411147?>
     1148<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() ?>" />
     1149<?php
     1150}
     1151add_action( 'bp_head', 'bp_dtheme_sitewide_feed' );
     1152
     1153/**
     1154 * Template tag so we can hook member activity feed to <head>
     1155 *
     1156 * @since 1.3
     1157 */
     1158function bp_dtheme_member_feed() {
     1159    if ( !bp_is_member() )
     1160        return;
     1161?>
     1162        <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() ?>" />
     1163<?php
     1164}
     1165add_action( 'bp_head', 'bp_dtheme_member_feed' );
     1166
     1167/**
     1168 * Template tag so we can hook group activity feed to <head>
     1169 *
     1170 * @since 1.3
     1171 */
     1172function bp_dtheme_group_feed() {
     1173    if ( !bp_is_active( 'groups' ) || !bp_is_group() )
     1174        return;
     1175?>
     1176        <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() ?>" />
     1177<?php
     1178}
     1179add_action( 'bp_head', 'bp_dtheme_group_feed' );
     1180?>
  • trunk/bp-themes/bp-default/header.php

    r3598 r3600  
    22
    33<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    4 
    54    <head profile="http://gmpg.org/xfn/11">
    6 
    7         <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    8 
     5        <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ) ?>; charset=<?php bloginfo( 'charset' ) ?>" />
    96        <title><?php bp_page_title() ?></title>
     7        <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url') ?>" type="text/css" media="screen" />
    108
    119        <?php do_action( 'bp_head' ) ?>
    1210
    13         <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    14 
    15         <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    16 
    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; ?>
    28 
    29         <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
     11        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ) ?>" />
    3012
    3113        <?php wp_head(); ?>
    32 
    3314    </head>
    3415
     
    3819
    3920        <div id="header">
    40 
    4121            <h1 id="logo" role="banner"><a href="<?php echo home_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1>
    4222
     
    4929
    5030                <?php if ( bp_search_form_enabled() ) : ?>
    51 
    5231                    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
    5332                        <input type="text" id="search-terms" name="search-terms" value="" />
     
    5736                        <?php wp_nonce_field( 'bp_search_form' ) ?>
    5837                    </form><!-- #search-form -->
    59 
    6038                <?php endif; ?>
    6139
Note: See TracChangeset for help on using the changeset viewer.