Changeset 7457 for trunk/bp-core/bp-core-update.php
- Timestamp:
- 10/23/2013 12:14:44 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-update.php
r7248 r7457 2 2 3 3 /** 4 * BuddyPress Updater 4 * BuddyPress Updater. 5 5 * 6 6 * @package BuddyPress … … 12 12 13 13 /** 14 * If there is no raw DB version, this is the first installation 15 * 16 * @since BuddyPress (1.7) 14 * Is this a fresh installation of BuddyPress? 15 * 16 * If there is no raw DB version, we infer that this is the first installation. 17 * 18 * @since BuddyPress (1.7.0) 17 19 * 18 20 * @uses get_option() 19 * @uses bp_get_db_version() To get BuddyPress's database version 20 * @return bool True if update, False if not 21 * @uses bp_get_db_version() To get BuddyPress's database version. 22 * 23 * @return bool True if this is a fresh BP install, otherwise false. 21 24 */ 22 25 function bp_is_install() { … … 25 28 26 29 /** 27 * Compare the BuddyPress version to the DB version to determine if updating 28 * 29 * @since BuddyPress (1.6) 30 * Is this a BuddyPress update? 31 * 32 * Determined by comparing the registered BuddyPress version to the version 33 * number stored in the database. If the registered version is greater, it's 34 * an update. 35 * 36 * @since BuddyPress (1.6.0) 30 37 * 31 38 * @uses get_option() 32 * @uses bp_get_db_version() To get BuddyPress's database version 33 * @return bool True if update, False if not 39 * @uses bp_get_db_version() To get BuddyPress's database version. 40 * 41 * @return bool True if update, otherwise false. 34 42 */ 35 43 function bp_is_update() { … … 47 55 48 56 /** 49 * Determine if BuddyPress is being activated50 * 51 * @since BuddyPress (1.6 )57 * Determine whether BuddyPress is in the process of being activated. 58 * 59 * @since BuddyPress (1.6.0) 52 60 * 53 61 * @uses buddypress() 54 * @return bool True if activating BuddyPress, false if not 62 * 63 * @return bool True if activating BuddyPress, false if not. 55 64 */ 56 65 function bp_is_activation( $basename = '' ) { … … 91 100 92 101 /** 93 * Determine if BuddyPress is being deactivated94 * 95 * @since BuddyPress (1.6 )102 * Determine whether BuddyPress is in the process of being deactivated. 103 * 104 * @since BuddyPress (1.6.0) 96 105 * 97 106 * @uses buddypress() 98 * @return bool True if deactivating BuddyPress, false if not 107 * 108 * @return bool True if deactivating BuddyPress, false if not. 99 109 */ 100 110 function bp_is_deactivation( $basename = '' ) { … … 135 145 136 146 /** 137 * Update the DB to the latest version 138 * 139 * @since BuddyPress (1.6) 140 * 141 * @uses update_option() 142 * @uses bp_get_db_version() To get BuddyPress's database version 143 * @uses bp_update_option() To update BuddyPress's database version 147 * Update the BP version stored in the database to the current version. 148 * 149 * @since BuddyPress (1.6.0) 150 * 151 * @uses bp_get_db_version() To get BuddyPress's database version. 152 * @uses bp_update_option() To update BuddyPress's database version. 144 153 */ 145 154 function bp_version_bump() { … … 148 157 149 158 /** 150 * Set up the BuddyPress updater151 * 152 * @since BuddyPress (1.6 )159 * Set up the BuddyPress updater. 160 * 161 * @since BuddyPress (1.6.0) 153 162 */ 154 163 function bp_setup_updater() { … … 162 171 163 172 /** 173 * Initialize an update or installation of BuddyPress. 174 * 164 175 * BuddyPress's version updater looks at what the current database version is, 165 * and runs whatever other code is needed. 166 * 167 * This is most-often used when the data schema changes, but should also be used 176 * and runs whatever other code is needed - either the "update" or "install" 177 * code. 178 * 179 * This is most often used when the data schema changes, but should also be used 168 180 * to correct issues with BuddyPress metadata silently on software update. 169 181 * 170 * @since BuddyPress (1.7 )182 * @since BuddyPress (1.7.0) 171 183 */ 172 184 function bp_version_updater() { … … 211 223 212 224 /** 213 * Database update methods based on version numbers 214 * 215 * @since BuddyPress (1.7) 225 * Remove unused metadata from database when upgrading from < 1.5. 226 * 227 * Database update methods based on version numbers. 228 * 229 * @since BuddyPress (1.7.0) 216 230 */ 217 231 function bp_update_to_1_5() { … … 227 241 228 242 /** 229 * Database update methods based on version numbers 230 * 231 * @since BuddyPress (1.7) 243 * Remove unused metadata from database when upgrading from < 1.6. 244 * 245 * Database update methods based on version numbers. 246 * 247 * @since BuddyPress (1.7.0) 232 248 */ 233 249 function bp_update_to_1_6() { … … 247 263 248 264 /** 249 * Redirect user to B uddyPress's What's New page on activation250 * 251 * @since BuddyPress (1.7 )252 * 253 * @internal Used internally to redirect BuddyPress to the about page on activation 254 * 255 * @uses set_transient() To drop the activation transient for 30 seconds 265 * Redirect user to BP's What's New page on first page load after activation. 266 * 267 * @since BuddyPress (1.7.0) 268 * 269 * @internal Used internally to redirect BuddyPress to the about page on activation. 270 * 271 * @uses set_transient() To drop the activation transient for 30 seconds. 256 272 */ 257 273 function bp_add_activation_redirect() { … … 274 290 275 291 /** 276 * Runs on BuddyPress activation 277 * 278 * @since BuddyPress (1.6) 279 * 280 * @uses do_action() Calls 'bp_activation' hook 292 * Fire activation hooks and events. 293 * 294 * Runs on BuddyPress activation. 295 * 296 * @since BuddyPress (1.6.0) 297 * 298 * @uses do_action() Calls 'bp_activation' hook. 281 299 */ 282 300 function bp_activation() { … … 293 311 294 312 /** 295 * Runs on BuddyPress deactivation 296 * 297 * @since BuddyPress (1.6) 298 * 299 * @uses do_action() Calls 'bp_deactivation' hook 313 * Fire deactivation hooks and events. 314 * 315 * Runs on BuddyPress deactivation. 316 * 317 * @since BuddyPress (1.6.0) 318 * 319 * @uses do_action() Calls 'bp_deactivation' hook. 300 320 */ 301 321 function bp_deactivation() { … … 320 340 321 341 /** 322 * Runs when uninstalling BuddyPress 323 * 324 * @since BuddyPress (1.6) 325 * 326 * @uses do_action() Calls 'bp_uninstall' hook 342 * Fire uninstall hook. 343 * 344 * Runs when uninstalling BuddyPress. 345 * 346 * @since BuddyPress (1.6.0) 347 * 348 * @uses do_action() Calls 'bp_uninstall' hook. 327 349 */ 328 350 function bp_uninstall() {
Note: See TracChangeset
for help on using the changeset viewer.