Changeset 8589 for trunk/src/bp-core/admin/bp-core-tools.php
- Timestamp:
- 07/10/2014 10:22:16 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/admin/bp-core-tools.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-tools.php
r8146 r8589 133 133 } 134 134 135 // Blogs: 136 // - user blog count 137 if ( bp_is_active( 'blogs' ) ) { 138 $repair_list[90] = array( 139 'bp-blog-records', 140 __( 'Repopulate blogs records', 'buddypress' ), 141 'bp_admin_repair_blog_records', 142 ); 143 } 144 135 145 ksort( $repair_list ); 136 146 … … 240 250 241 251 /** 252 * Recalculate user-to-blog relationships and useful blog meta data 253 * 254 * @since BuddyPress (2.1.0) 255 * 256 * @return array 257 */ 258 function bp_admin_repair_blog_records() { 259 260 // Description of this tool, dispalyed to the user 261 $statement = __( 'Repopulating Blogs records… %s', 'buddypress' ); 262 263 // Default to failure text 264 $result = __( 'Failed!', 'buddypress' ); 265 266 // Default to unrepaired 267 $repair = false; 268 269 // Run function if blogs component is active 270 if ( bp_is_active( 'blogs' ) ) { 271 $repair = bp_blogs_record_existing_blogs(); 272 } 273 274 // Setup success/fail messaging 275 if ( true === $repair ) { 276 $result = __( 'Complete!', 'buddypress' ); 277 } 278 279 // All done! 280 return array( 0, sprintf( $statement, $result ) ); 281 } 282 283 /** 242 284 * Recalculate the total number of active site members. 243 285 * … … 282 324 case 0: 283 325 return false; 284 break;285 326 286 327 case 1:
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)