Changeset 11933
- Timestamp:
- 04/02/2018 05:35:08 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r11888 r11933 662 662 } 663 663 664 /** 665 * Catch and route the 'settings' notifications screen. 666 * 667 * This is currently unused. 668 * 669 * @since 1.9.0 670 */ 671 function bp_notifications_screen_settings() {} 672 664 673 /** Meta **********************************************************************/ 665 674 -
trunk/src/bp-notifications/classes/class-bp-notifications-component.php
r11360 r11933 45 45 public function includes( $includes = array() ) { 46 46 $includes = array( 47 'actions',48 'screens',49 47 'adminbar', 50 48 'template', … … 54 52 55 53 parent::includes( $includes ); 54 } 55 56 /** 57 * Late includes method. 58 * 59 * Only load up certain code when on specific pages. 60 * 61 * @since 3.0.0 62 */ 63 public function late_includes() { 64 // Bail if PHPUnit is running. 65 if ( defined( 'BP_TESTS_DIR' ) ) { 66 return; 67 } 68 69 // Bail if not on a notifications page or logged in. 70 if ( ! bp_is_user_notifications() || ! is_user_logged_in() ) { 71 return; 72 } 73 74 // Actions. 75 if ( bp_is_post_request() ) { 76 require $this->path . 'bp-notifications/actions/bulk-manage.php'; 77 } elseif ( bp_is_get_request() ) { 78 require $this->path . 'bp-notifications/actions/delete.php'; 79 } 80 81 // Screens. 82 require $this->path . 'bp-notifications/screens/unread.php'; 83 if ( bp_is_current_action( 'read' ) ) { 84 require $this->path . 'bp-notifications/screens/read.php'; 85 } 56 86 } 57 87 -
trunk/tests/phpunit/includes/loader.php
r11931 r11933 24 24 * loaded at the same time to prevent weird load order issues. 25 25 */ 26 $components = array( 'activity', 'friends', 'groups', 'members', 'messages', ' settings', 'xprofile' );26 $components = array( 'activity', 'friends', 'groups', 'members', 'messages', 'notifications', 'settings', 'xprofile' ); 27 27 foreach ( $components as $component ) { 28 28 add_action( "bp_{$component}_includes", function() use ( $component ) {
Note: See TracChangeset
for help on using the changeset viewer.