Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/23/2013 12:14:44 AM (11 years ago)
Author:
boonebgorges
Message:

Improve inline docs in bp-core. See #5022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-update.php

    r7248 r7457  
    22
    33/**
    4  * BuddyPress Updater
     4 * BuddyPress Updater.
    55 *
    66 * @package BuddyPress
     
    1212
    1313/**
    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)
    1719 *
    1820 * @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.
    2124 */
    2225function bp_is_install() {
     
    2528
    2629/**
    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)
    3037 *
    3138 * @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.
    3442 */
    3543function bp_is_update() {
     
    4755
    4856/**
    49  * Determine if BuddyPress is being activated
    50  *
    51  * @since BuddyPress (1.6)
     57 * Determine whether BuddyPress is in the process of being activated.
     58 *
     59 * @since BuddyPress (1.6.0)
    5260 *
    5361 * @uses buddypress()
    54  * @return bool True if activating BuddyPress, false if not
     62 *
     63 * @return bool True if activating BuddyPress, false if not.
    5564 */
    5665function bp_is_activation( $basename = '' ) {
     
    91100
    92101/**
    93  * Determine if BuddyPress is being deactivated
    94  *
    95  * @since BuddyPress (1.6)
     102 * Determine whether BuddyPress is in the process of being deactivated.
     103 *
     104 * @since BuddyPress (1.6.0)
    96105 *
    97106 * @uses buddypress()
    98  * @return bool True if deactivating BuddyPress, false if not
     107 *
     108 * @return bool True if deactivating BuddyPress, false if not.
    99109 */
    100110function bp_is_deactivation( $basename = '' ) {
     
    135145
    136146/**
    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.
    144153 */
    145154function bp_version_bump() {
     
    148157
    149158/**
    150  * Setup the BuddyPress updater
    151  *
    152  * @since BuddyPress (1.6)
     159 * Set up the BuddyPress updater.
     160 *
     161 * @since BuddyPress (1.6.0)
    153162 */
    154163function bp_setup_updater() {
     
    162171
    163172/**
     173 * Initialize an update or installation of BuddyPress.
     174 *
    164175 * 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
    168180 * to correct issues with BuddyPress metadata silently on software update.
    169181 *
    170  * @since BuddyPress (1.7)
     182 * @since BuddyPress (1.7.0)
    171183 */
    172184function bp_version_updater() {
     
    211223
    212224/**
    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)
    216230 */
    217231function bp_update_to_1_5() {
     
    227241
    228242/**
    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)
    232248 */
    233249function bp_update_to_1_6() {
     
    247263
    248264/**
    249  * Redirect user to BuddyPress's What's New page on activation
    250  *
    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.
    256272 */
    257273function bp_add_activation_redirect() {
     
    274290
    275291/**
    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.
    281299 */
    282300function bp_activation() {
     
    293311
    294312/**
    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.
    300320 */
    301321function bp_deactivation() {
     
    320340
    321341/**
    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.
    327349 */
    328350function bp_uninstall() {
Note: See TracChangeset for help on using the changeset viewer.