Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/05/2025 02:27:53 AM (8 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/sub-actions.php

    r7348 r7380  
    22
    33/**
    4  * Plugin Dependency
     4 * Plugin Dependency.
    55 *
    66 * The purpose of the following hooks is to mimic the behavior of something
     
    2424
    2525/**
    26  * Runs on bbPress activation
     26 * Runs on bbPress activation.
    2727 *
    2828 * @since 2.0.0 bbPress (r2509)
     
    3333
    3434/**
    35  * Runs on bbPress deactivation
     35 * Runs on bbPress deactivation.
    3636 *
    3737 * @since 2.0.0 bbPress (r2509)
     
    4242
    4343/**
    44  * Runs when uninstalling bbPress
     44 * Runs when uninstalling bbPress.
    4545 *
    4646 * @since 2.0.0 bbPress (r2509)
     
    5353
    5454/**
    55  * Main action responsible for constants, globals, and includes
     55 * Main action responsible for constants, globals, and includes.
    5656 *
    5757 * @since 2.0.0 bbPress (r2599)
     
    6262
    6363/**
    64  * Setup constants
     64 * Setup constants.
    6565 *
    6666 * @since 2.0.0 bbPress (r2599)
     
    7171
    7272/**
    73  * Setup globals BEFORE includes
     73 * Setup globals BEFORE includes.
    7474 *
    7575 * @since 2.0.0 bbPress (r2599)
     
    8080
    8181/**
    82  * Include files
     82 * Include files.
    8383 *
    8484 * @since 2.0.0 bbPress (r2599)
     
    8989
    9090/**
    91  * Setup globals AFTER includes
     91 * Setup globals AFTER includes.
    9292 *
    9393 * @since 2.0.0 bbPress (r2599)
     
    9898
    9999/**
    100  * Register any objects before anything is initialized
     100 * Register any objects before anything is initialized.
    101101 *
    102102 * @since 2.2.0 bbPress (r4180)
     
    107107
    108108/**
    109  * Initialize any code after everything has been loaded
     109 * Initialize any code after everything has been loaded.
    110110 *
    111111 * @since 2.0.0 bbPress (r2599)
     
    116116
    117117/**
    118  * Initialize roles
     118 * Initialize roles.
    119119 *
    120120 * @since 2.6.0 bbPress (r6106)
    121121 *
    122  * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized
     122 * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized.
    123123 */
    124124function bbp_roles_init( $wp_roles ) {
     
    127127
    128128/**
    129  * Initialize widgets
     129 * Initialize widgets.
    130130 *
    131131 * @since 2.0.0 bbPress (r3389)
     
    136136
    137137/**
    138  * Setup the currently logged-in user
     138 * Setup the currently logged-in user.
    139139 *
    140140 * @link https://bbpress.trac.wordpress.org/ticket/2309
     
    148148
    149149/**
    150  * Setup the user engagements strategy
     150 * Setup the user engagements strategy.
    151151 *
    152152 * @since 2.6.0 bbPress (r6875)
     
    159159
    160160/**
    161  * Load translations for current language
     161 * Load translations for current language.
    162162 *
    163163 * @since 2.0.0 bbPress (r2599)
     
    168168
    169169/**
    170  * Setup the post types
     170 * Setup the post types.
    171171 *
    172172 * @since 2.0.0 bbPress (r2464)
     
    177177
    178178/**
    179  * Setup the post statuses
     179 * Setup the post statuses.
    180180 *
    181181 * @since 2.0.0 bbPress (r2727)
     
    186186
    187187/**
    188  * Register the built in bbPress taxonomies
     188 * Register the built in bbPress taxonomies.
    189189 *
    190190 * @since 2.0.0 bbPress (r2464)
     
    195195
    196196/**
    197  * Register the default bbPress views
     197 * Register the default bbPress views.
    198198 *
    199199 * @since 2.0.0 bbPress (r2789)
     
    204204
    205205/**
    206  * Register the default bbPress shortcodes
     206 * Register the default bbPress shortcodes.
    207207 *
    208208 * @since 2.2.0 bbPress (r4211)
     
    213213
    214214/**
    215  * Register the default bbPress meta-data
     215 * Register the default bbPress meta-data.
    216216 *
    217217 * @since 2.6.0 bbPress (r46300)
     
    222222
    223223/**
    224  * Enqueue bbPress specific CSS and JS
     224 * Enqueue bbPress specific CSS and JS.
    225225 *
    226226 * @since 2.0.0 bbPress (r3373)
     
    231231
    232232/**
    233  * Add the bbPress-specific rewrite tags
     233 * Add the bbPress-specific rewrite tags.
    234234 *
    235235 * @since 2.0.0 bbPress (r2753)
     
    240240
    241241/**
    242  * Add the bbPress-specific rewrite rules
     242 * Add the bbPress-specific rewrite rules.
    243243 *
    244244 * @since 2.4.0 bbPress (r4918)
     
    249249
    250250/**
    251  * Add the bbPress-specific permalink structures
     251 * Add the bbPress-specific permalink structures.
    252252 *
    253253 * @since 2.4.0 bbPress (r4918)
     
    267267
    268268/**
    269  * Add the bbPress-specific post status transition action
     269 * Add the bbPress-specific post status transition action.
    270270 *
    271271 * @since 2.6.0 bbPress (r6792)
    272272 *
    273  * @param string  $new_status New post status
    274  * @param string  $old_status Old post status
    275  * @param WP_Post $post       Post object
     273 * @param string  $new_status New post status.
     274 * @param string  $old_status Old post status.
     275 * @param WP_Post $post       Post object.
    276276 */
    277277function bbp_transition_post_status( $new_status = '', $old_status = '', $post = false ) {
     
    293293
    294294/**
    295  * The main action for hooking into when a user account is updated
     295 * The main action for hooking into when a user account is updated.
    296296 *
    297297 * @since 2.2.0 bbPress (r4304)
    298298 *
    299  * @param int $user_id ID of user being edited
     299 * @param int $user_id ID of user being edited.
    300300 * @param array $old_user_data The old, unmodified user data
    301301 */
     
    305305
    306306/**
    307  * The main action for hooking into a user being registered
     307 * The main action for hooking into a user being registered.
    308308 *
    309309 * @since 2.2.0 bbPress (r4304)
    310310 *
    311  * @param int $user_id ID of user being edited
     311 * @param int $user_id ID of user being edited.
    312312 */
    313313function bbp_user_register( $user_id = 0 ) {
     
    318318
    319319/**
    320  * bbPress has loaded and initialized everything, and is okay to go
     320 * bbPress has loaded and initialized everything, and is okay to go.
    321321 *
    322322 * @since 2.0.0 bbPress (r2618)
     
    330330/**
    331331 * The main action used for redirecting bbPress theme actions that are not
    332  * permitted by the current_user
     332 * permitted by the current_user.
    333333 *
    334334 * @since 2.1.0 bbPress (r3605)
     
    341341
    342342/**
    343  * The main action used for executing code before the theme has been setup
     343 * The main action used for executing code before the theme has been setup.
    344344 *
    345345 * @since 2.1.0 bbPress (r3829)
     
    350350
    351351/**
    352  * The main action used for executing code before the theme has been setup
     352 * The main action used for executing code before the theme has been setup.
    353353 *
    354354 * @since 2.1.0 bbPress (r3732)
     
    359359
    360360/**
    361  * The main action used for executing code after the theme has been setup
     361 * The main action used for executing code after the theme has been setup.
    362362 *
    363363 * @since 2.1.0 bbPress (r3732)
     
    368368
    369369/**
    370  * The main action used for handling theme-side POST requests
     370 * The main action used for handling theme-side POST requests.
    371371 *
    372372 * @since 2.3.0 bbPress (r4550)
     
    401401
    402402/**
    403  * The main action used for handling theme-side GET requests
     403 * The main action used for handling theme-side GET requests.
    404404 *
    405405 * @since 2.3.0 bbPress (r4550)
     
    450450
    451451/**
    452  * Piggy back filter for WordPress's 'request' filter
     452 * Piggy back filter for WordPress's 'request' filter.
    453453 *
    454454 * @since 2.1.0 bbPress (r3758)
     
    470470 *
    471471 * @param string $template
    472  * @return string Template file to use
     472 * @return string Template file to use.
    473473 */
    474474function bbp_template_include( $template = '' ) {
     
    479479
    480480/**
    481  * Generate bbPress-specific rewrite rules
     481 * Generate bbPress-specific rewrite rules.
    482482 *
    483483 * @since 2.0.0 bbPress (r2688)
     
    492492
    493493/**
    494  * Filter the allowed themes list for bbPress specific themes
     494 * Filter the allowed themes list for bbPress specific themes.
    495495 *
    496496 * @since 2.0.0 bbPress (r2944)
     
    498498 * @param array $themes
    499499 *
    500  * @return array Array of allowed themes
     500 * @return array Array of allowed themes.
    501501 */
    502502function bbp_allowed_themes( $themes ) {
     
    507507
    508508/**
    509  * Maps forum/topic/reply caps to built in WordPress caps
     509 * Maps forum/topic/reply caps to built in WordPress caps.
    510510 *
    511511 * @since 2.0.0 bbPress (r2593)
    512512 *
    513  * @param array $caps Capabilities for meta capability
    514  * @param string $cap Capability name
    515  * @param int $user_id User id
    516  * @param array $args Arguments
    517  *
    518  * @return array Array of capabilities
     513 * @param array $caps Capabilities for meta capability.
     514 * @param string $cap Capability name.
     515 * @param int $user_id User id.
     516 * @param array $args Arguments.
     517 *
     518 * @return array Array of capabilities.
    519519 */
    520520function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
     
    525525
    526526/**
    527  * Filter the arguments used by wp_mail for bbPress specific emails
     527 * Filter the arguments used by wp_mail for bbPress specific emails.
    528528 *
    529529 * @since 2.6.0 bbPress (r6918)
     
    532532 *                    subject, message, headers, and attachments values.
    533533 *
    534  * @return array Array of capabilities
     534 * @return array Array of capabilities.
    535535 */
    536536function bbp_mail( $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.