Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2021 04:56:32 AM (5 years 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/common/search-and-filters-bar.php

    r12892 r12907  
    1212                <div class="subnav-search clearfix">
    1313
    14                         <?php if ( bp_get_activity_slug() === bp_current_component() ) : ?>
    15                                 <div class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><span class="bp-screen-reader-text"><?php esc_html_e( 'RSS', 'buddypress' ); ?></span></a></div>
     14                        <?php if ( bp_nouveau_is_feed_enable() ) : ?>
     15                                <div id="activity-rss-feed" class="feed">
     16                                        <a href="<?php bp_nouveau_activity_rss_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php bp_nouveau_activity_rss_tooltip(); ?>">
     17                                                <span class="bp-screen-reader-text"><?php bp_nouveau_activity_rss_screen_reader_text(); ?></span>
     18                                        </a>
     19                                </div>
    1620                        <?php endif; ?>
    1721
    1822                        <?php bp_nouveau_search_form(); ?>
    1923
    20                 </div>
     24                </div>
    2125        <?php endif; ?>
    2226
    23                 <?php if ( bp_is_user() && ! bp_is_current_action( 'requests' ) ) : ?>
    24                         <?php bp_get_template_part( 'common/filters/user-screens-filters' ); ?>
    25                 <?php elseif ( bp_get_groups_slug() === bp_current_component() ) : ?>
    26                         <?php bp_get_template_part( 'common/filters/groups-screens-filters' ); ?>
    27                 <?php else : ?>
    28                         <?php bp_get_template_part( 'common/filters/directory-filters' ); ?>
    29                 <?php endif; ?>
     27        <?php if ( bp_is_user() && ! bp_is_current_action( 'requests' ) ) : ?>
     28                <?php bp_get_template_part( 'common/filters/user-screens-filters' ); ?>
     29        <?php elseif ( bp_get_groups_slug() === bp_current_component() ) : ?>
     30                <?php bp_get_template_part( 'common/filters/groups-screens-filters' ); ?>
     31        <?php else : ?>
     32                <?php bp_get_template_part( 'common/filters/directory-filters' ); ?>
     33        <?php endif; ?>
    3034
    3135</div><!-- search & filters -->
Note: See TracChangeset for help on using the changeset viewer.