Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/05/2025 02:27:53 AM (6 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement: docs & code formatting improvements.

Props johnjamesjacoby, noruzzaman.

Fixes #3659.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/update.php

    r7378 r7380  
    22
    33/**
    4  * bbPress Updater
     4 * bbPress Updater.
    55 *
    66 * @package bbPress
     
    1212
    1313/**
    14  * If there is no raw DB version, this is the first installation
     14 * If there is no raw DB version, this is the first installation.
    1515 *
    1616 * @since 2.1.0 bbPress (r3764)
    1717 *
    18  * @return bool True if update, False if not
     18 * @return bool True if update, False if not.
    1919 */
    2020function bbp_is_install() {
     
    2323
    2424/**
    25  * Compare the bbPress version to the DB version to determine if updating
     25 * Compare the bbPress version to the DB version to determine if updating.
    2626 *
    2727 * @since 2.0.0 bbPress (r3421)
    2828 *
    29  * @return bool True if update, False if not
     29 * @return bool True if update, False if not.
    3030 */
    3131function bbp_is_update() {
     
    3737
    3838/**
    39  * Determine if bbPress is being activated
     39 * Determine if bbPress is being activated.
    4040 *
    4141 * Note that this function currently is not used in bbPress core and is here
     
    4646 * @global string $pagenow The filename of the current screen.
    4747 *
    48  * @return bool True if activating bbPress, false if not
     48 * @param string $basename Plugin base name.
     49 *
     50 * @return bool True if activating bbPress, false if not.
    4951 */
    5052function bbp_is_activation( $basename = '' ) {
     
    9294
    9395/**
    94  * Determine if bbPress is being deactivated
     96 * Determine if bbPress is being deactivated.
    9597 *
    9698 * @since 2.0.0 bbPress (r3421)
     
    98100 * @global string $pagenow The filename of the current screen.
    99101 *
    100  * @return bool True if deactivating bbPress, false if not
     102 * @param string $basename Plugin base name.
     103 *
     104 * @return bool True if deactivating bbPress, false if not.
    101105 */
    102106function bbp_is_deactivation( $basename = '' ) {
     
    144148
    145149/**
    146  * Update the DB to the latest version
     150 * Update the DB to the latest version.
    147151 *
    148152 * @since 2.0.0 bbPress (r3421)
     
    153157
    154158/**
    155  * Setup the bbPress updater
     159 * Setup the bbPress updater.
    156160 *
    157161 * @since 2.0.0 bbPress (r3419)
     
    170174/**
    171175 * Runs when a new site is created in a multisite network, and bbPress is active
    172  * on that site (hooked to `bbp_new_site`)
     176 * on that site (hooked to `bbp_new_site`).
    173177 *
    174178 * @since 2.6.0 bbPress (r6779)
     179 *
     180 * @param int $site_id Side id.
    175181 */
    176182function bbp_setup_new_site( $site_id = 0 ) {
     
    193199
    194200/**
    195  * Create a default forum, topic, and reply
     201 * Create a default forum, topic, and reply.
    196202 *
    197203 * @since 2.1.0 bbPress (r3767)
    198204 *
    199  * @param array $args Array of arguments to override default values
     205 * @param array $args Array of arguments to override default values.
    200206 */
    201207function bbp_create_initial_content( $args = array() ) {
     
    425431
    426432/**
    427  * Redirect user to the "What's New" page on activation
     433 * Redirect user to the "What's New" page on activation.
    428434 *
    429435 * @since 2.2.0 bbPress (r4389)
    430436 *
    431  * @internal Used internally to redirect bbPress to the about page on activation
    432  *
    433  * @return If network admin or bulk activation
     437 * @internal Used internally to redirect bbPress to the about page on activation.
     438 *
     439 * @return If network admin or bulk activation.
    434440 */
    435441function bbp_add_activation_redirect() {
     
    445451
    446452/**
    447  * Redirect user to "What's New" page on activation
     453 * Redirect user to "What's New" page on activation.
    448454 *
    449455 * @since 2.2.0 bbPress (r4389)
    450456 *
    451  * @internal Used internally to redirect bbPress to the about page on activation
    452  *
    453  * @return If no transient, or in network admin, or is bulk activation
     457 * @internal Used internally to redirect bbPress to the about page on activation.
     458 *
     459 * @return If no transient, or in network admin, or is bulk activation.
    454460 */
    455461function bbp_do_activation_redirect() {
     
    484490 * @since 2.4.0 bbPress (r4910)
    485491 *
    486  * @internal Used to internally make the current user a keymaster on activation
    487  *
    488  * @return If user can't activate plugins or is already a keymaster
     492 * @internal Used to internally make the current user a keymaster on activation.
     493 *
     494 * @return If user can't activate plugins or is already a keymaster.
    489495 */
    490496function bbp_make_current_user_keymaster() {
     
    532538
    533539/**
    534  * Return the number of pending upgrades
     540 * Return the number of pending upgrades.
    535541 *
    536542 * @since 2.6.0 bbPress (r6895)
    537543 *
    538  * @param string $type Type of pending upgrades (upgrade|repair|empty)
     544 * @param string $type Type of pending upgrades (upgrade|repair|empty).
    539545 *
    540546 * @return int
     
    545551
    546552/**
    547  * Return an array of pending upgrades
     553 * Return an array of pending upgrades.
    548554 *
    549555 * @since 2.6.0 bbPress (r6895)
    550556 *
    551  * @param string $type Type of pending upgrades (upgrade|repair|empty)
     557 * @param string $type Type of pending upgrades (upgrade|repair|empty).
    552558 *
    553559 * @return array
     
    569575
    570576/**
    571  * Add an upgrade ID to pending upgrades array
     577 * Add an upgrade ID to pending upgrades array.
    572578 *
    573579 * @since 2.6.0 bbPress (r6895)
     
    590596
    591597/**
    592  * Add an upgrade ID to pending upgrades array
     598 * Add an upgrade ID to pending upgrades array.
    593599 *
    594600 * @since 2.6.0 bbPress (r6895)
     
    614620
    615621/**
    616  * Delete all pending upgrades
     622 * Delete all pending upgrades.
    617623 *
    618624 * @since 2.6.0 bbPress (r6895)
     
    623629
    624630/**
    625  * Maybe append an upgrade count to a string
     631 * Maybe append an upgrade count to a string.
    626632 *
    627633 * @since 2.6.0 bbPress (r6896)
    628634 *
    629  * @param string $text Text to append count to
    630  * @param string $type Type of pending upgrades (upgrade|repair|empty)
     635 * @param string $text Text to append count to.
     636 * @param string $type Type of pending upgrades (upgrade|repair|empty).
    631637 *
    632638 * @return string
Note: See TracChangeset for help on using the changeset viewer.