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-nouveau/buddypress/groups/single/activity.php

    r12156 r12907  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 8.0.0
    77 */
    8 
    98?>
    109
     
    1817
    1918    <ul>
    20 
    21         <li class="feed"><a href="<?php bp_group_activity_feed_link(); ?>" class="bp-tooltip no-ajax" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><span class="bp-screen-reader-text"><?php esc_html_e( 'RSS', 'buddypress' ); ?></span></a></li>
     19        <?php if ( bp_activity_is_feed_enable( 'group' ) ) : ?>
     20            <li class="feed">
     21                <a href="<?php bp_group_activity_feed_link(); ?>" class="bp-tooltip no-ajax" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>">
     22                    <span class="bp-screen-reader-text"><?php esc_html_e( 'RSS', 'buddypress' ); ?></span>
     23                </a>
     24            </li>
     25        <?php endif; ?>
    2226
    2327        <li class="group-act-search"><?php bp_nouveau_search_form(); ?></li>
    24 
    2528    </ul>
    2629
    27         <?php bp_get_template_part( 'common/filters/groups-screens-filters' ); ?>
     30    <?php bp_get_template_part( 'common/filters/groups-screens-filters' ); ?>
    2831</div><!-- // .subnav-filters -->
    2932
     
    3235<div id="activity-stream" class="activity single-group" data-bp-list="activity">
    3336
    34         <li id="bp-activity-ajax-loader"><?php bp_nouveau_user_feedback( 'group-activity-loading' ); ?></li>
     37    <div id="bp-activity-ajax-loader"><?php bp_nouveau_user_feedback( 'group-activity-loading' ); ?></div>
    3538
    3639</div><!-- .activity -->
Note: See TracChangeset for help on using the changeset viewer.