Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/28/2010 02:25:51 PM (15 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 wp_head.

File:
1 edited

Legend:

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

    r3592 r3595  
    11391139    }
    11401140
     1141/**
     1142 * Template tag so we can hook activity feed to <head>
     1143 *
     1144 * @see bp_dtheme_setup()
     1145 * @since 1.3
     1146 */
     1147function bp_dtheme_sitewide_feed() {
    11411148?>
     1149        <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() ?>" />
     1150<?php
     1151}
     1152add_action( 'wp_head', 'bp_dtheme_sitewide_feed', 8 );
     1153
     1154/**
     1155 * Template tag so we can hook member activity feed to <head>
     1156 *
     1157 * @see bp_dtheme_setup()
     1158 * @since 1.3
     1159 */
     1160function bp_dtheme_member_feed() {
     1161    if ( !bp_is_member() )
     1162        return;
     1163?>
     1164        <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() ?>" />
     1165<?php
     1166}
     1167add_action( 'wp_head', 'bp_dtheme_member_feed', 8 );
     1168
     1169/**
     1170 * Template tag so we can hook group activity feed to <head>
     1171 *
     1172 * @see bp_dtheme_setup()
     1173 * @since 1.3
     1174 */
     1175function bp_dtheme_group_feed() {
     1176    if ( !bp_is_active( 'groups' ) || !bp_is_group() )
     1177        return;
     1178?>
     1179        <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() ?>" />
     1180<?php
     1181}
     1182add_action( 'wp_head', 'bp_dtheme_group_feed', 8 );
     1183?>
Note: See TracChangeset for help on using the changeset viewer.