| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * Plugin Dependency. | |
| 4 | + * Plugin Dependency | |
| 5 | 5 | * |
| 6 | 6 | * The purpose of the following hooks is to mimic the behavior of something |
| 7 | 7 | * called 'plugin dependency' which enables a plugin to have plugins of their |
| 8 | 8 | * own in a safe and reliable way. |
| @@ -22,9 +22,9 @@ | ||
| 22 | 22 | |
| 23 | 23 | /** Activation Actions ********************************************************/ |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * Runs on bbPress activation. | |
| 26 | + * Runs on bbPress activation | |
| 27 | 27 | * |
| 28 | 28 | * @since 2.0.0 bbPress (r2509) |
| 29 | 29 | */ |
| 30 | 30 | function bbp_activation() { |
| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | do_action( 'bbp_activation' ); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * Runs on bbPress deactivation. | |
| 35 | + * Runs on bbPress deactivation | |
| 36 | 36 | * |
| 37 | 37 | * @since 2.0.0 bbPress (r2509) |
| 38 | 38 | */ |
| 39 | 39 | function bbp_deactivation() { |
| @@ -40,9 +40,9 @@ | ||
| 40 | 40 | do_action( 'bbp_deactivation' ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * Runs when uninstalling bbPress. | |
| 44 | + * Runs when uninstalling bbPress | |
| 45 | 45 | * |
| 46 | 46 | * @since 2.0.0 bbPress (r2509) |
| 47 | 47 | */ |
| 48 | 48 | function bbp_uninstall() { |
| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | |
| 52 | 52 | /** Main Actions **************************************************************/ |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Main action responsible for constants, globals, and includes. | |
| 55 | + * Main action responsible for constants, globals, and includes | |
| 56 | 56 | * |
| 57 | 57 | * @since 2.0.0 bbPress (r2599) |
| 58 | 58 | */ |
| 59 | 59 | function bbp_loaded() { |
| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | do_action( 'bbp_loaded' ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * Setup constants. | |
| 64 | + * Setup constants | |
| 65 | 65 | * |
| 66 | 66 | * @since 2.0.0 bbPress (r2599) |
| 67 | 67 | */ |
| 68 | 68 | function bbp_constants() { |
| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | do_action( 'bbp_constants' ); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * Setup globals BEFORE includes. | |
| 73 | + * Setup globals BEFORE includes | |
| 74 | 74 | * |
| 75 | 75 | * @since 2.0.0 bbPress (r2599) |
| 76 | 76 | */ |
| 77 | 77 | function bbp_boot_strap_globals() { |
| @@ -78,9 +78,9 @@ | ||
| 78 | 78 | do_action( 'bbp_boot_strap_globals' ); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | - * Include files. | |
| 82 | + * Include files | |
| 83 | 83 | * |
| 84 | 84 | * @since 2.0.0 bbPress (r2599) |
| 85 | 85 | */ |
| 86 | 86 | function bbp_includes() { |
| @@ -87,9 +87,9 @@ | ||
| 87 | 87 | do_action( 'bbp_includes' ); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * Setup globals AFTER includes. | |
| 91 | + * Setup globals AFTER includes | |
| 92 | 92 | * |
| 93 | 93 | * @since 2.0.0 bbPress (r2599) |
| 94 | 94 | */ |
| 95 | 95 | function bbp_setup_globals() { |
| @@ -96,9 +96,9 @@ | ||
| 96 | 96 | do_action( 'bbp_setup_globals' ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | - * Register any objects before anything is initialized. | |
| 100 | + * Register any objects before anything is initialized | |
| 101 | 101 | * |
| 102 | 102 | * @since 2.2.0 bbPress (r4180) |
| 103 | 103 | */ |
| 104 | 104 | function bbp_register() { |
| @@ -105,9 +105,9 @@ | ||
| 105 | 105 | do_action( 'bbp_register' ); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | - * Initialize any code after everything has been loaded. | |
| 109 | + * Initialize any code after everything has been loaded | |
| 110 | 110 | * |
| 111 | 111 | * @since 2.0.0 bbPress (r2599) |
| 112 | 112 | */ |
| 113 | 113 | function bbp_init() { |
| @@ -114,11 +114,11 @@ | ||
| 114 | 114 | do_action( 'bbp_init' ); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | - * Initialize the bbPress REST API. | |
| 118 | + * Initialize the bbPress REST API | |
| 119 | 119 | * |
| 120 | - * @since 2.7.0 | |
| 120 | + * @since 2.6.17 | |
| 121 | 121 | */ |
| 122 | 122 | function bbp_rest_api_init() { |
| 123 | 123 | do_action( 'bbp_rest_api_init' ); |
| 124 | 124 | } |
| @@ -125,9 +125,9 @@ | ||
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | 127 | * Pass an XML-RPC request through bbPress. |
| 128 | 128 | * |
| 129 | - * @since 2.7.0 bbPress | |
| 129 | + * @since 2.6.17 bbPress | |
| 130 | 130 | * |
| 131 | 131 | * @param string $method XML-RPC method name. |
| 132 | 132 | * @param array $args XML-RPC method arguments. |
| 133 | 133 | * @param wp_xmlrpc_server $server XML-RPC server instance. |
| @@ -136,13 +136,13 @@ | ||
| 136 | 136 | do_action( 'bbp_xmlrpc_call', $method, $args, $server ); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | - * Initialize roles. | |
| 140 | + * Initialize roles | |
| 141 | 141 | * |
| 142 | 142 | * @since 2.6.0 bbPress (r6106) |
| 143 | 143 | * |
| 144 | - * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized. | |
| 144 | + * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized | |
| 145 | 145 | */ |
| 146 | 146 | function bbp_roles_init( $wp_roles ) { |
| 147 | 147 | do_action( 'bbp_roles_init', $wp_roles ); |
| 148 | 148 | } |
| @@ -147,9 +147,9 @@ | ||
| 147 | 147 | do_action( 'bbp_roles_init', $wp_roles ); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * Initialize widgets. | |
| 151 | + * Initialize widgets | |
| 152 | 152 | * |
| 153 | 153 | * @since 2.0.0 bbPress (r3389) |
| 154 | 154 | */ |
| 155 | 155 | function bbp_widgets_init() { |
| @@ -156,9 +156,9 @@ | ||
| 156 | 156 | do_action( 'bbp_widgets_init' ); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | - * Setup the currently logged-in user. | |
| 160 | + * Setup the currently logged-in user | |
| 161 | 161 | * |
| 162 | 162 | * @link https://bbpress.trac.wordpress.org/ticket/2309 |
| 163 | 163 | * @link https://core.trac.wordpress.org/ticket/24169 |
| 164 | 164 | * |
| @@ -168,9 +168,9 @@ | ||
| 168 | 168 | do_action( 'bbp_setup_current_user' ); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | - * Setup the user engagements strategy. | |
| 172 | + * Setup the user engagements strategy | |
| 173 | 173 | * |
| 174 | 174 | * @since 2.6.0 bbPress (r6875) |
| 175 | 175 | */ |
| 176 | 176 | function bbp_setup_engagements() { |
| @@ -179,9 +179,9 @@ | ||
| 179 | 179 | |
| 180 | 180 | /** Supplemental Actions ******************************************************/ |
| 181 | 181 | |
| 182 | 182 | /** |
| 183 | - * Load translations for current language. | |
| 183 | + * Load translations for current language | |
| 184 | 184 | * |
| 185 | 185 | * @since 2.0.0 bbPress (r2599) |
| 186 | 186 | */ |
| 187 | 187 | function bbp_load_textdomain() { |
| @@ -188,9 +188,9 @@ | ||
| 188 | 188 | do_action( 'bbp_load_textdomain' ); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | - * Setup the post types. | |
| 192 | + * Setup the post types | |
| 193 | 193 | * |
| 194 | 194 | * @since 2.0.0 bbPress (r2464) |
| 195 | 195 | */ |
| 196 | 196 | function bbp_register_post_types() { |
| @@ -197,9 +197,9 @@ | ||
| 197 | 197 | do_action( 'bbp_register_post_types' ); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
| 201 | - * Setup the post statuses. | |
| 201 | + * Setup the post statuses | |
| 202 | 202 | * |
| 203 | 203 | * @since 2.0.0 bbPress (r2727) |
| 204 | 204 | */ |
| 205 | 205 | function bbp_register_post_statuses() { |
| @@ -206,9 +206,9 @@ | ||
| 206 | 206 | do_action( 'bbp_register_post_statuses' ); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
| 210 | - * Register the built in bbPress taxonomies. | |
| 210 | + * Register the built in bbPress taxonomies | |
| 211 | 211 | * |
| 212 | 212 | * @since 2.0.0 bbPress (r2464) |
| 213 | 213 | */ |
| 214 | 214 | function bbp_register_taxonomies() { |
| @@ -215,9 +215,9 @@ | ||
| 215 | 215 | do_action( 'bbp_register_taxonomies' ); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | - * Register the default bbPress views. | |
| 219 | + * Register the default bbPress views | |
| 220 | 220 | * |
| 221 | 221 | * @since 2.0.0 bbPress (r2789) |
| 222 | 222 | */ |
| 223 | 223 | function bbp_register_views() { |
| @@ -224,9 +224,9 @@ | ||
| 224 | 224 | do_action( 'bbp_register_views' ); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | - * Register the default bbPress shortcodes. | |
| 228 | + * Register the default bbPress shortcodes | |
| 229 | 229 | * |
| 230 | 230 | * @since 2.2.0 bbPress (r4211) |
| 231 | 231 | */ |
| 232 | 232 | function bbp_register_shortcodes() { |
| @@ -233,19 +233,10 @@ | ||
| 233 | 233 | do_action( 'bbp_register_shortcodes' ); |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /** |
| 237 | - * Register the default bbPress blocks. | |
| 237 | + * Register the default bbPress meta-data | |
| 238 | 238 | * |
| 239 | - * @since 2.7.0 bbPress (r7382) | |
| 240 | - */ | |
| 241 | -function bbp_register_blocks() { | |
| 242 | - do_action( 'bbp_register_blocks' ); | |
| 243 | -} | |
| 244 | - | |
| 245 | -/** | |
| 246 | - * Register the default bbPress meta-data. | |
| 247 | - * | |
| 248 | 239 | * @since 2.6.0 bbPress (r46300) |
| 249 | 240 | */ |
| 250 | 241 | function bbp_register_meta() { |
| 251 | 242 | do_action( 'bbp_register_meta' ); |
| @@ -251,9 +242,9 @@ | ||
| 251 | 242 | do_action( 'bbp_register_meta' ); |
| 252 | 243 | } |
| 253 | 244 | |
| 254 | 245 | /** |
| 255 | - * Enqueue bbPress specific CSS and JS. | |
| 246 | + * Enqueue bbPress specific CSS and JS | |
| 256 | 247 | * |
| 257 | 248 | * @since 2.0.0 bbPress (r3373) |
| 258 | 249 | */ |
| 259 | 250 | function bbp_enqueue_scripts() { |
| @@ -260,9 +251,9 @@ | ||
| 260 | 251 | do_action( 'bbp_enqueue_scripts' ); |
| 261 | 252 | } |
| 262 | 253 | |
| 263 | 254 | /** |
| 264 | - * Add the bbPress-specific rewrite tags. | |
| 255 | + * Add the bbPress-specific rewrite tags | |
| 265 | 256 | * |
| 266 | 257 | * @since 2.0.0 bbPress (r2753) |
| 267 | 258 | */ |
| 268 | 259 | function bbp_add_rewrite_tags() { |
| @@ -269,9 +260,9 @@ | ||
| 269 | 260 | do_action( 'bbp_add_rewrite_tags' ); |
| 270 | 261 | } |
| 271 | 262 | |
| 272 | 263 | /** |
| 273 | - * Add the bbPress-specific rewrite rules. | |
| 264 | + * Add the bbPress-specific rewrite rules | |
| 274 | 265 | * |
| 275 | 266 | * @since 2.4.0 bbPress (r4918) |
| 276 | 267 | */ |
| 277 | 268 | function bbp_add_rewrite_rules() { |
| @@ -278,9 +269,9 @@ | ||
| 278 | 269 | do_action( 'bbp_add_rewrite_rules' ); |
| 279 | 270 | } |
| 280 | 271 | |
| 281 | 272 | /** |
| 282 | - * Add the bbPress-specific permalink structures. | |
| 273 | + * Add the bbPress-specific permalink structures | |
| 283 | 274 | * |
| 284 | 275 | * @since 2.4.0 bbPress (r4918) |
| 285 | 276 | */ |
| 286 | 277 | function bbp_add_permastructs() { |
| @@ -287,9 +278,9 @@ | ||
| 287 | 278 | do_action( 'bbp_add_permastructs' ); |
| 288 | 279 | } |
| 289 | 280 | |
| 290 | 281 | /** |
| 291 | - * Add the bbPress-specific login forum action. | |
| 282 | + * Add the bbPress-specific login forum action | |
| 292 | 283 | * |
| 293 | 284 | * @since 2.0.0 bbPress (r2753) |
| 294 | 285 | */ |
| 295 | 286 | function bbp_login_form_login() { |
| @@ -296,15 +287,15 @@ | ||
| 296 | 287 | do_action( 'bbp_login_form_login' ); |
| 297 | 288 | } |
| 298 | 289 | |
| 299 | 290 | /** |
| 300 | - * Add the bbPress-specific post status transition action. | |
| 291 | + * Add the bbPress-specific post status transition action | |
| 301 | 292 | * |
| 302 | 293 | * @since 2.6.0 bbPress (r6792) |
| 303 | 294 | * |
| 304 | - * @param string $new_status New post status. | |
| 305 | - * @param string $old_status Old post status. | |
| 306 | - * @param WP_Post $post Post object. | |
| 295 | + * @param string $new_status New post status | |
| 296 | + * @param string $old_status Old post status | |
| 297 | + * @param WP_Post $post Post object | |
| 307 | 298 | */ |
| 308 | 299 | function bbp_transition_post_status( $new_status = '', $old_status = '', $post = false ) { |
| 309 | 300 | |
| 310 | 301 | // Get bbPress post types |
| @@ -343,13 +334,13 @@ | ||
| 343 | 334 | |
| 344 | 335 | /** User Actions **************************************************************/ |
| 345 | 336 | |
| 346 | 337 | /** |
| 347 | - * The main action for hooking into when a user account is updated. | |
| 338 | + * The main action for hooking into when a user account is updated | |
| 348 | 339 | * |
| 349 | 340 | * @since 2.2.0 bbPress (r4304) |
| 350 | 341 | * |
| 351 | - * @param int $user_id ID of user being edited. | |
| 342 | + * @param int $user_id ID of user being edited | |
| 352 | 343 | * @param array $old_user_data The old, unmodified user data |
| 353 | 344 | */ |
| 354 | 345 | function bbp_profile_update( $user_id = 0, $old_user_data = array() ) { |
| 355 | 346 | do_action( 'bbp_profile_update', $user_id, $old_user_data ); |
| @@ -355,13 +346,13 @@ | ||
| 355 | 346 | do_action( 'bbp_profile_update', $user_id, $old_user_data ); |
| 356 | 347 | } |
| 357 | 348 | |
| 358 | 349 | /** |
| 359 | - * The main action for hooking into a user being registered. | |
| 350 | + * The main action for hooking into a user being registered | |
| 360 | 351 | * |
| 361 | 352 | * @since 2.2.0 bbPress (r4304) |
| 362 | 353 | * |
| 363 | - * @param int $user_id ID of user being edited. | |
| 354 | + * @param int $user_id ID of user being edited | |
| 364 | 355 | */ |
| 365 | 356 | function bbp_user_register( $user_id = 0 ) { |
| 366 | 357 | do_action( 'bbp_user_register', $user_id ); |
| 367 | 358 | } |
| @@ -368,9 +359,9 @@ | ||
| 368 | 359 | |
| 369 | 360 | /** Final Action **************************************************************/ |
| 370 | 361 | |
| 371 | 362 | /** |
| 372 | - * bbPress has loaded and initialized everything, and is okay to go. | |
| 363 | + * bbPress has loaded and initialized everything, and is okay to go | |
| 373 | 364 | * |
| 374 | 365 | * @since 2.0.0 bbPress (r2618) |
| 375 | 366 | */ |
| 376 | 367 | function bbp_ready() { |
| @@ -380,9 +371,9 @@ | ||
| 380 | 371 | /** Theme Permissions *********************************************************/ |
| 381 | 372 | |
| 382 | 373 | /** |
| 383 | 374 | * The main action used for redirecting bbPress theme actions that are not |
| 384 | - * permitted by the current_user. | |
| 375 | + * permitted by the current_user | |
| 385 | 376 | * |
| 386 | 377 | * @since 2.1.0 bbPress (r3605) |
| 387 | 378 | */ |
| 388 | 379 | function bbp_template_redirect() { |
| @@ -391,9 +382,9 @@ | ||
| 391 | 382 | |
| 392 | 383 | /** Theme Helpers *************************************************************/ |
| 393 | 384 | |
| 394 | 385 | /** |
| 395 | - * The main action used for executing code before the theme has been setup. | |
| 386 | + * The main action used for executing code before the theme has been setup | |
| 396 | 387 | * |
| 397 | 388 | * @since 2.1.0 bbPress (r3829) |
| 398 | 389 | */ |
| 399 | 390 | function bbp_register_theme_packages() { |
| @@ -400,9 +391,9 @@ | ||
| 400 | 391 | do_action( 'bbp_register_theme_packages' ); |
| 401 | 392 | } |
| 402 | 393 | |
| 403 | 394 | /** |
| 404 | - * The main action used for executing code before the theme has been setup. | |
| 395 | + * The main action used for executing code before the theme has been setup | |
| 405 | 396 | * |
| 406 | 397 | * @since 2.1.0 bbPress (r3732) |
| 407 | 398 | */ |
| 408 | 399 | function bbp_setup_theme() { |
| @@ -409,9 +400,9 @@ | ||
| 409 | 400 | do_action( 'bbp_setup_theme' ); |
| 410 | 401 | } |
| 411 | 402 | |
| 412 | 403 | /** |
| 413 | - * The main action used for executing code after the theme has been setup. | |
| 404 | + * The main action used for executing code after the theme has been setup | |
| 414 | 405 | * |
| 415 | 406 | * @since 2.1.0 bbPress (r3732) |
| 416 | 407 | */ |
| 417 | 408 | function bbp_after_setup_theme() { |
| @@ -418,9 +409,9 @@ | ||
| 418 | 409 | do_action( 'bbp_after_setup_theme' ); |
| 419 | 410 | } |
| 420 | 411 | |
| 421 | 412 | /** |
| 422 | - * The main action used for handling theme-side POST requests. | |
| 413 | + * The main action used for handling theme-side POST requests | |
| 423 | 414 | * |
| 424 | 415 | * @since 2.3.0 bbPress (r4550) |
| 425 | 416 | */ |
| 426 | 417 | function bbp_post_request() { |
| @@ -429,9 +420,9 @@ | ||
| 429 | 420 | if ( ! bbp_is_post_request() ) { |
| 430 | 421 | return; |
| 431 | 422 | } |
| 432 | 423 | |
| 433 | - // Bail if no action, of if not a string (arrays not supported) | |
| 424 | + // Bail if no action, or if not a string (arrays not supported) | |
| 434 | 425 | if ( empty( $_POST['action'] ) || ! is_string( $_POST['action'] ) ) { |
| 435 | 426 | return; |
| 436 | 427 | } |
| 437 | 428 | |
| @@ -451,9 +442,9 @@ | ||
| 451 | 442 | do_action( 'bbp_post_request', $action ); |
| 452 | 443 | } |
| 453 | 444 | |
| 454 | 445 | /** |
| 455 | - * The main action used for handling theme-side GET requests. | |
| 446 | + * The main action used for handling theme-side GET requests | |
| 456 | 447 | * |
| 457 | 448 | * @since 2.3.0 bbPress (r4550) |
| 458 | 449 | */ |
| 459 | 450 | function bbp_get_request() { |
| @@ -500,9 +491,9 @@ | ||
| 500 | 491 | return apply_filters( 'bbp_plugin_locale', $locale, $domain ); |
| 501 | 492 | } |
| 502 | 493 | |
| 503 | 494 | /** |
| 504 | - * Piggy back filter for WordPress's 'request' filter. | |
| 495 | + * Piggy back filter for WordPress's 'request' filter | |
| 505 | 496 | * |
| 506 | 497 | * @since 2.1.0 bbPress (r3758) |
| 507 | 498 | * |
| 508 | 499 | * @param array $query_vars |
| @@ -520,9 +511,9 @@ | ||
| 520 | 511 | * |
| 521 | 512 | * @since 2.0.0 bbPress (r3311) |
| 522 | 513 | * |
| 523 | 514 | * @param string $template |
| 524 | - * @return string Template file to use. | |
| 515 | + * @return string Template file to use | |
| 525 | 516 | */ |
| 526 | 517 | function bbp_template_include( $template = '' ) { |
| 527 | 518 | |
| 528 | 519 | // Filter & return |
| @@ -529,9 +520,9 @@ | ||
| 529 | 520 | return apply_filters( 'bbp_template_include', $template ); |
| 530 | 521 | } |
| 531 | 522 | |
| 532 | 523 | /** |
| 533 | - * Generate bbPress-specific rewrite rules. | |
| 524 | + * Generate bbPress-specific rewrite rules | |
| 534 | 525 | * |
| 535 | 526 | * @since 2.0.0 bbPress (r2688) |
| 536 | 527 | * |
| 537 | 528 | * @deprecated 2.4.0 bbPress (r4918) |
| @@ -542,15 +533,15 @@ | ||
| 542 | 533 | do_action_ref_array( 'bbp_generate_rewrite_rules', array( &$wp_rewrite ) ); |
| 543 | 534 | } |
| 544 | 535 | |
| 545 | 536 | /** |
| 546 | - * Filter the allowed themes list for bbPress specific themes. | |
| 537 | + * Filter the allowed themes list for bbPress specific themes | |
| 547 | 538 | * |
| 548 | 539 | * @since 2.0.0 bbPress (r2944) |
| 549 | 540 | * |
| 550 | 541 | * @param array $themes |
| 551 | 542 | * |
| 552 | - * @return array Array of allowed themes. | |
| 543 | + * @return array Array of allowed themes | |
| 553 | 544 | */ |
| 554 | 545 | function bbp_allowed_themes( $themes ) { |
| 555 | 546 | |
| 556 | 547 | // Filter & return |
| @@ -557,18 +548,18 @@ | ||
| 557 | 548 | return (array) apply_filters( 'bbp_allowed_themes', $themes ); |
| 558 | 549 | } |
| 559 | 550 | |
| 560 | 551 | /** |
| 561 | - * Maps forum/topic/reply caps to built in WordPress caps. | |
| 552 | + * Maps forum/topic/reply caps to built in WordPress caps | |
| 562 | 553 | * |
| 563 | 554 | * @since 2.0.0 bbPress (r2593) |
| 564 | 555 | * |
| 565 | - * @param array $caps Capabilities for meta capability. | |
| 566 | - * @param string $cap Capability name. | |
| 567 | - * @param int $user_id User id. | |
| 568 | - * @param array $args Arguments. | |
| 556 | + * @param array $caps Capabilities for meta capability | |
| 557 | + * @param string $cap Capability name | |
| 558 | + * @param int $user_id User id | |
| 559 | + * @param array $args Arguments | |
| 569 | 560 | * |
| 570 | - * @return array Array of capabilities. | |
| 561 | + * @return array Array of capabilities | |
| 571 | 562 | */ |
| 572 | 563 | function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) { |
| 573 | 564 | |
| 574 | 565 | // Filter & return |
| @@ -575,9 +566,9 @@ | ||
| 575 | 566 | return (array) apply_filters( 'bbp_map_meta_caps', $caps, $cap, $user_id, $args ); |
| 576 | 567 | } |
| 577 | 568 | |
| 578 | 569 | /** |
| 579 | - * Filter the arguments used by wp_mail for bbPress specific emails. | |
| 570 | + * Filter the arguments used by wp_mail for bbPress specific emails | |
| 580 | 571 | * |
| 581 | 572 | * @since 2.6.0 bbPress (r6918) |
| 582 | 573 | * |
| 583 | 574 | * @param array $args A compacted array of wp_mail() arguments, including the "to" email, |
| @@ -582,9 +573,9 @@ | ||
| 582 | 573 | * |
| 583 | 574 | * @param array $args A compacted array of wp_mail() arguments, including the "to" email, |
| 584 | 575 | * subject, message, headers, and attachments values. |
| 585 | 576 | * |
| 586 | - * @return array Array of capabilities. | |
| 577 | + * @return array Array of capabilities | |
| 587 | 578 | */ |
| 588 | 579 | function bbp_mail( $args = array() ) { |
| 589 | 580 | |
| 590 | 581 | // Bail if headers are missing/malformed |
| @@ -601,25 +592,5 @@ | ||
| 601 | 592 | } |
| 602 | 593 | |
| 603 | 594 | // Filter & return |
| 604 | 595 | return (array) apply_filters( 'bbp_mail', $args ); |
| 605 | -} | |
| 606 | - | |
| 607 | -/** | |
| 608 | - * Redirects incoming links to the proper URL based on the site URL. | |
| 609 | - * | |
| 610 | - * @see redirect_canonical() | |
| 611 | - * | |
| 612 | - * @since 2.0.0 bbPress (r2628) | |
| 613 | - * @since 2.7.0 bbPress {r7345) Converted to a sub-action. | |
| 614 | - * | |
| 615 | - * @param string $redirect_url The redirect URL. | |
| 616 | - * @param string $requested_url The requested URL. | |
| 617 | - * | |
| 618 | - * @return string Empty string if a topic/forum and their first page, | |
| 619 | - * otherwise the redirect URL. | |
| 620 | - */ | |
| 621 | -function bbp_redirect_canonical( $redirect_url = '', $requested_url = '' ) { | |
| 622 | - | |
| 623 | - // Filter & return | |
| 624 | - return (string) apply_filters( 'bbp_redirect_canonical', $redirect_url, $requested_url ); | |
| 625 | 596 | } |