Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2021 04:56:32 AM (9 months ago)
Author:
imath
Message:

Improve ways to disable BP RSS feeds

Returning false to the filter bp_activity_enable_feeds is completely disabling all RSS feeds and will now avoid the output of an empty link.

A second argument has been added to the filter to allow to disable a specific feed in particular, one of these feed identifiers:

  • 'sitewide',
  • 'personal',
  • 'friends',
  • 'mygroups',
  • 'mentions',
  • 'favorites'.

The BP Nouveau Template pack has also been improved to update the user's profile activity RSS feed links according to the context.

Props sippis

Fixes #8454

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/index.php

    r12595 r12907  
    190190    <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Activity secondary navigation', 'buddypress' ); ?>" role="navigation">
    191191        <ul>
    192             <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
     192            <?php if ( bp_activity_is_feed_enable( 'sitewide' ) ) : ?>
     193                <li class="feed">
     194                    <a href="<?php bp_sitewide_activity_feed_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>">
     195                        <?php esc_html_e( 'RSS', 'buddypress' ); ?>
     196                    </a>
     197                </li>
     198            <?php endif; ?>
    193199
    194200            <?php
Note: See TracChangeset for help on using the changeset viewer.