[buddypress-trac] [BuddyPress Trac] #7218: Only load component action and screen code when we're on the component's page

buddypress-trac noreply at wordpress.org
Tue Apr 18 20:38:02 UTC 2017


#7218: Only load component action and screen code when we're on the component's
page
------------------------------------+-----------------------
 Reporter:  r-a-y                   |       Owner:
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:  2.9
Component:  Core                    |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by r-a-y):

 I've refreshed patches for the Activity, Friends, Groups and Members
 components.

 For the Activity component, I moved the RSS feed code to a new file called
 `bp-activity-feeds.php` and loading that only on activity RSS pages.

 For the Members component, I moved the registration and activation screen
 code to a new file called `bp-members-register.php` and loading that only
 on those pages.

 For the Groups component, I moved the legacy forum screen code to `bp-
 groups-forums.php` and am loading this if the Legacy Forums component is
 active.

 For the Friends component, the activity code is only loaded if the
 Activity component is active.

 For all components, the action and screen code is only loaded if
 necessary.  Also, I am conditionally loading the `<table>` markup used on
 the "Settings > Email" page as chances are this code isn't going to be
 used outside of that page.

 ----

 I haven't done this for the Messages, Settings and Notifications
 components yet, but I will once we've decided we like this approach.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7218#comment:20>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list