Changeset 11934
- Timestamp:
- 04/02/2018 06:15:37 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 1 deleted
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/actions/random.php
r11933 r11934 1 1 <?php 2 2 /** 3 * B uddyPress Blogs Actions.3 * Blogs: Random blog action handler 4 4 * 5 5 * @package BuddyPress 6 6 * @subpackage BlogsActions 7 * @since 1.5.07 * @since 3.0.0 8 8 */ 9 10 // Exit if accessed directly.11 defined( 'ABSPATH' ) || exit;12 9 13 10 /** -
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r11799 r11934 126 126 $includes = array( 127 127 'cache', 128 'actions',129 'screens',130 128 'template', 131 129 'filters', … … 143 141 // Include the files. 144 142 parent::includes( $includes ); 143 } 144 145 /** 146 * Late includes method. 147 * 148 * Only load up certain code when on specific pages. 149 * 150 * @since 3.0.0 151 */ 152 public function late_includes() { 153 // Bail if PHPUnit is running. 154 if ( defined( 'BP_TESTS_DIR' ) ) { 155 return; 156 } 157 158 // Bail if not on a blogs page or not multisite. 159 if ( ! bp_is_blogs_component() || ! is_multisite() ) { 160 return; 161 } 162 163 // Actions. 164 if ( isset( $_GET['random-blog'] ) ) { 165 require $this->path . 'bp-blogs/actions/random.php'; 166 } 167 168 // Screens. 169 if ( bp_is_user() ) { 170 require $this->path . 'bp-blogs/screens/my-blogs.php'; 171 } else { 172 if ( bp_is_blogs_directory() ) { 173 require $this->path . 'bp-blogs/screens/directory.php'; 174 } 175 176 if ( is_user_logged_in() && bp_is_current_action( 'create' ) ) { 177 require $this->path . 'bp-blogs/screens/create.php'; 178 } 179 180 // Theme compatibility. 181 new BP_Blogs_Theme_Compat(); 182 } 145 183 } 146 184 -
trunk/tests/phpunit/includes/loader.php
r11933 r11934 24 24 * loaded at the same time to prevent weird load order issues. 25 25 */ 26 $components = array( 'activity', ' friends', 'groups', 'members', 'messages', 'notifications', 'settings', 'xprofile' );26 $components = array( 'activity', 'blogs', '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.