-
diff --git src/bbpress.php src/bbpress.php
index 4bf8f51..3a32244 100644
|
|
|
if ( !class_exists( 'bbPress' ) ) : |
| 32 | 32 | * |
| 33 | 33 | * "How doth the little busy bee, improve each shining hour..." |
| 34 | 34 | * |
| 35 | | * @since bbPress (r2464) |
| | 35 | * @since 2.0.0 bbPress (r2464) |
| 36 | 36 | */ |
| 37 | 37 | final class bbPress { |
| 38 | 38 | |
| … |
… |
final class bbPress { |
| 90 | 90 | * Insures that only one instance of bbPress exists in memory at any one |
| 91 | 91 | * time. Also prevents needing to define globals all over the place. |
| 92 | 92 | * |
| 93 | | * @since bbPress (r3757) |
| | 93 | * @since 2.1.0 bbPress (r3757) |
| | 94 | * |
| 94 | 95 | * @staticvar object $instance |
| 95 | 96 | * @uses bbPress::setup_globals() Setup the globals needed |
| 96 | 97 | * @uses bbPress::includes() Include the required files |
| … |
… |
final class bbPress { |
| 120 | 121 | /** |
| 121 | 122 | * A dummy constructor to prevent bbPress from being loaded more than once. |
| 122 | 123 | * |
| 123 | | * @since bbPress (r2464) |
| | 124 | * @since 2.0.0 bbPress (r2464) |
| | 125 | * |
| 124 | 126 | * @see bbPress::instance() |
| 125 | 127 | * @see bbpress(); |
| 126 | 128 | */ |
| … |
… |
final class bbPress { |
| 129 | 131 | /** |
| 130 | 132 | * A dummy magic method to prevent bbPress from being cloned |
| 131 | 133 | * |
| 132 | | * @since bbPress (r2464) |
| | 134 | * @since 2.0.0 bbPress (r2464) |
| 133 | 135 | */ |
| 134 | 136 | public function __clone() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'bbpress' ), '2.1' ); } |
| 135 | 137 | |
| 136 | 138 | /** |
| 137 | 139 | * A dummy magic method to prevent bbPress from being unserialized |
| 138 | 140 | * |
| 139 | | * @since bbPress (r2464) |
| | 141 | * @since 2.0.0 bbPress (r2464) |
| 140 | 142 | */ |
| 141 | 143 | public function __wakeup() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'bbpress' ), '2.1' ); } |
| 142 | 144 | |
| 143 | 145 | /** |
| 144 | 146 | * Magic method for checking the existence of a certain custom field |
| 145 | 147 | * |
| 146 | | * @since bbPress (r3951) |
| | 148 | * @since 2.1.0 bbPress (r3951) |
| 147 | 149 | */ |
| 148 | 150 | public function __isset( $key ) { return isset( $this->data[ $key ] ); } |
| 149 | 151 | |
| 150 | 152 | /** |
| 151 | 153 | * Magic method for getting bbPress variables |
| 152 | 154 | * |
| 153 | | * @since bbPress (r3951) |
| | 155 | * @since 2.1.0 bbPress (r3951) |
| 154 | 156 | */ |
| 155 | 157 | public function __get( $key ) { return isset( $this->data[ $key ] ) ? $this->data[ $key ] : null; } |
| 156 | 158 | |
| 157 | 159 | /** |
| 158 | 160 | * Magic method for setting bbPress variables |
| 159 | 161 | * |
| 160 | | * @since bbPress (r3951) |
| | 162 | * @since 2.1.0 bbPress (r3951) |
| 161 | 163 | */ |
| 162 | 164 | public function __set( $key , $value ) { $this->data[ $key ] = $value; } |
| 163 | 165 | |
| 164 | 166 | /** |
| 165 | 167 | * Magic method for unsetting bbPress variables |
| 166 | 168 | * |
| 167 | | * @since bbPress (r4628) |
| | 169 | * @since 2.3.0 bbPress (r4628) |
| 168 | 170 | */ |
| 169 | 171 | public function __unset( $key ) { |
| 170 | 172 | if ( isset( $this->data[ $key ] ) ) { |
| … |
… |
final class bbPress { |
| 175 | 177 | /** |
| 176 | 178 | * Magic method to prevent notices and errors from invalid method calls |
| 177 | 179 | * |
| 178 | | * @since bbPress (r4252) |
| | 180 | * @since 2.2.0 bbPress (r4252) |
| 179 | 181 | */ |
| 180 | 182 | public function __call( $name = '', $args = array() ) { unset( $name, $args ); return null; } |
| 181 | 183 | |
| … |
… |
final class bbPress { |
| 185 | 187 | * Set some smart defaults to class variables. Allow some of them to be |
| 186 | 188 | * filtered to allow for early overriding. |
| 187 | 189 | * |
| 188 | | * @since bbPress (r2626) |
| | 190 | * @since 2.0.0 bbPress (r2626) |
| | 191 | * |
| 189 | 192 | * @access private |
| 190 | 193 | * @uses plugin_dir_path() To generate bbPress plugin path |
| 191 | 194 | * @uses plugin_dir_url() To generate bbPress plugin url |
| … |
… |
final class bbPress { |
| 286 | 289 | /** |
| 287 | 290 | * Include required files |
| 288 | 291 | * |
| 289 | | * @since bbPress (r2626) |
| | 292 | * @since 2.0.0 bbPress (r2626) |
| | 293 | * |
| 290 | 294 | * @access private |
| 291 | 295 | * @uses is_admin() If in WordPress admin, load additional file |
| 292 | 296 | */ |
| … |
… |
final class bbPress { |
| 359 | 363 | /** |
| 360 | 364 | * Setup the default hooks and actions |
| 361 | 365 | * |
| 362 | | * @since bbPress (r2644) |
| | 366 | * @since 2.0.0 bbPress (r2644) |
| | 367 | * |
| 363 | 368 | * @access private |
| 364 | 369 | * @uses add_action() To add various actions |
| 365 | 370 | */ |
| … |
… |
final class bbPress { |
| 408 | 413 | * the bbp-theme-compat folders, it's fine to hardcode these here. If at a |
| 409 | 414 | * later date we need to automate this, and API will need to be built. |
| 410 | 415 | * |
| 411 | | * @since bbPress (r3829) |
| | 416 | * @since 2.1.0 bbPress (r3829) |
| 412 | 417 | */ |
| 413 | 418 | public function register_theme_packages() { |
| 414 | 419 | |
| … |
… |
final class bbPress { |
| 430 | 435 | /** |
| 431 | 436 | * Setup the default bbPress theme compatibility location. |
| 432 | 437 | * |
| 433 | | * @since bbPress (r3778) |
| | 438 | * @since 2.1.0 bbPress (r3778) |
| 434 | 439 | */ |
| 435 | 440 | public function setup_theme() { |
| 436 | 441 | |
| … |
… |
final class bbPress { |
| 452 | 457 | * will be removed on bbPress updates. If you're creating custom |
| 453 | 458 | * translation files, please use the global language folder. |
| 454 | 459 | * |
| 455 | | * @since bbPress (r2596) |
| | 460 | * @since 2.0.0 bbPress (r2596) |
| 456 | 461 | * |
| 457 | 462 | * @uses apply_filters() Calls 'plugin_locale' with {@link get_locale()} value |
| 458 | 463 | * @uses load_textdomain() To load the textdomain |
| … |
… |
final class bbPress { |
| 480 | 485 | /** |
| 481 | 486 | * Setup the post types for forums, topics and replies |
| 482 | 487 | * |
| 483 | | * @since bbPress (r2597) |
| | 488 | * @since 2.0.0 bbPress (r2597) |
| | 489 | * |
| 484 | 490 | * @uses register_post_type() To register the post types |
| 485 | 491 | * @uses apply_filters() Calls various filters to modify the arguments |
| 486 | 492 | * sent to register_post_type() |
| … |
… |
final class bbPress { |
| 569 | 575 | * We do some manipulation of the 'trash' status so trashed topics and |
| 570 | 576 | * replies can be viewed from within the theme. |
| 571 | 577 | * |
| 572 | | * @since bbPress (r2727) |
| | 578 | * @since 2.0.0 bbPress (r2727) |
| | 579 | * |
| 573 | 580 | * @uses register_post_status() To register post statuses |
| 574 | 581 | * @uses $wp_post_statuses To modify trash and private statuses |
| 575 | 582 | * @uses current_user_can() To check if the current user is capable & |
| … |
… |
final class bbPress { |
| 654 | 661 | /** |
| 655 | 662 | * Register the topic tag and forum moderator taxonomies |
| 656 | 663 | * |
| 657 | | * @since bbPress (r2464) Added bbp_get_topic_tag_tax_id() taxonomy |
| 658 | | * @since bbPress (r5834) Added bbp_get_forum_mod_tax_id() taxonomy |
| | 664 | * @since 2.0.0 bbPress (r2464) Added bbp_get_topic_tag_tax_id() taxonomy |
| | 665 | * @since 2.6.0 bbPress (r5834) Added bbp_get_forum_mod_tax_id() taxonomy |
| 659 | 666 | * |
| 660 | 667 | * @uses register_taxonomy() To register the taxonomy |
| 661 | 668 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
final class bbPress { |
| 712 | 719 | /** |
| 713 | 720 | * Register the bbPress views |
| 714 | 721 | * |
| 715 | | * @since bbPress (r2789) |
| | 722 | * @since 2.0.0 bbPress (r2789) |
| | 723 | * |
| 716 | 724 | * @uses bbp_register_view() To register the views |
| 717 | 725 | */ |
| 718 | 726 | public static function register_views() { |
| … |
… |
final class bbPress { |
| 748 | 756 | /** |
| 749 | 757 | * Register the bbPress shortcodes |
| 750 | 758 | * |
| 751 | | * @since bbPress (r3031) |
| | 759 | * @since 2.0.0 bbPress (r3031) |
| 752 | 760 | * |
| 753 | 761 | * @uses BBP_Shortcodes |
| 754 | 762 | */ |
| … |
… |
final class bbPress { |
| 764 | 772 | * execution. get_currentuserinfo() is used to check for XMLRPC_REQUEST to |
| 765 | 773 | * avoid xmlrpc errors. |
| 766 | 774 | * |
| 767 | | * @since bbPress (r2697) |
| | 775 | * @since 2.0.0 bbPress (r2697) |
| | 776 | * |
| 768 | 777 | * @uses wp_get_current_user() |
| 769 | 778 | */ |
| 770 | 779 | public function setup_current_user() { |
| … |
… |
final class bbPress { |
| 776 | 785 | /** |
| 777 | 786 | * Add the bbPress-specific rewrite tags |
| 778 | 787 | * |
| 779 | | * @since bbPress (r2753) |
| | 788 | * @since 2.0.0 bbPress (r2753) |
| | 789 | * |
| 780 | 790 | * @uses add_rewrite_tag() To add the rewrite tags |
| 781 | 791 | */ |
| 782 | 792 | public static function add_rewrite_tags() { |
| … |
… |
final class bbPress { |
| 797 | 807 | * - Topic views |
| 798 | 808 | * - User profiles |
| 799 | 809 | * |
| 800 | | * @since bbPress (r2688) |
| | 810 | * @since 2.0.0 bbPress (r2688) |
| | 811 | * |
| 801 | 812 | * @todo Extract into an API |
| 802 | 813 | */ |
| 803 | 814 | public static function add_rewrite_rules() { |
| … |
… |
final class bbPress { |
| 896 | 907 | * - Topic Views |
| 897 | 908 | * - Search |
| 898 | 909 | * |
| 899 | | * @since bbPress (r4930) |
| | 910 | * @since 2.4.0 bbPress (r4930) |
| 900 | 911 | */ |
| 901 | 912 | public static function add_permastructs() { |
| 902 | 913 | |
-
diff --git src/includes/admin/actions.php src/includes/admin/actions.php
index 2bd8d6c..4f62f78 100644
|
|
|
add_filter( 'bbp_admin_replies_column_headers', 'bbp_filter_column_headers' ); |
| 101 | 101 | * When a new site is created in a multisite installation, run the activation |
| 102 | 102 | * routine on that site |
| 103 | 103 | * |
| 104 | | * @since bbPress (r3283) |
| | 104 | * @since 2.0.0 bbPress (r3283) |
| 105 | 105 | * |
| 106 | 106 | * @param int $blog_id |
| 107 | 107 | * @param int $user_id |
| … |
… |
function bbp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { |
| 130 | 130 | /** |
| 131 | 131 | * Show icons in list-table column headers instead of strings |
| 132 | 132 | * |
| 133 | | * @since bbPress (r5833) |
| | 133 | * @since 2.6.0 bbPress (r5833) |
| 134 | 134 | * |
| 135 | 135 | * @param array $columns Column headers fed into list-table objects |
| 136 | 136 | * |
| … |
… |
function bbp_filter_column_headers( $columns = array() ) { |
| 187 | 187 | /** |
| 188 | 188 | * Piggy back admin_init action |
| 189 | 189 | * |
| 190 | | * @since bbPress (r3766) |
| | 190 | * @since 2.1.0 bbPress (r3766) |
| | 191 | * |
| 191 | 192 | * @uses do_action() Calls 'bbp_admin_init' |
| 192 | 193 | */ |
| 193 | 194 | function bbp_admin_init() { |
| … |
… |
function bbp_admin_init() { |
| 197 | 198 | /** |
| 198 | 199 | * Piggy back admin_menu action |
| 199 | 200 | * |
| 200 | | * @since bbPress (r3766) |
| | 201 | * @since 2.1.0 bbPress (r3766) |
| | 202 | * |
| 201 | 203 | * @uses do_action() Calls 'bbp_admin_menu' |
| 202 | 204 | */ |
| 203 | 205 | function bbp_admin_menu() { |
| … |
… |
function bbp_admin_menu() { |
| 207 | 209 | /** |
| 208 | 210 | * Piggy back admin_head action |
| 209 | 211 | * |
| 210 | | * @since bbPress (r3766) |
| | 212 | * @since 2.1.0 bbPress (r3766) |
| | 213 | * |
| 211 | 214 | * @uses do_action() Calls 'bbp_admin_head' |
| 212 | 215 | */ |
| 213 | 216 | function bbp_admin_head() { |
| … |
… |
function bbp_admin_head() { |
| 217 | 220 | /** |
| 218 | 221 | * Piggy back admin_notices action |
| 219 | 222 | * |
| 220 | | * @since bbPress (r3766) |
| | 223 | * @since 2.1.0 bbPress (r3766) |
| | 224 | * |
| 221 | 225 | * @uses do_action() Calls 'bbp_admin_notices' |
| 222 | 226 | */ |
| 223 | 227 | function bbp_admin_notices() { |
| … |
… |
function bbp_admin_notices() { |
| 227 | 231 | /** |
| 228 | 232 | * Dedicated action to register bbPress importers |
| 229 | 233 | * |
| 230 | | * @since bbPress (r3766) |
| | 234 | * @since 2.1.0 bbPress (r3766) |
| | 235 | * |
| 231 | 236 | * @uses do_action() Calls 'bbp_admin_notices' |
| 232 | 237 | */ |
| 233 | 238 | function bbp_register_importers() { |
| … |
… |
function bbp_register_importers() { |
| 237 | 242 | /** |
| 238 | 243 | * Dedicated action to register admin styles |
| 239 | 244 | * |
| 240 | | * @since bbPress (r3766) |
| | 245 | * @since 2.1.0 bbPress (r3766) |
| | 246 | * |
| 241 | 247 | * @uses do_action() Calls 'bbp_admin_notices' |
| 242 | 248 | */ |
| 243 | 249 | function bbp_register_admin_style() { |
| … |
… |
function bbp_register_admin_style() { |
| 247 | 253 | /** |
| 248 | 254 | * Dedicated action to register admin settings |
| 249 | 255 | * |
| 250 | | * @since bbPress (r3766) |
| | 256 | * @since 2.1.0 bbPress (r3766) |
| | 257 | * |
| 251 | 258 | * @uses do_action() Calls 'bbp_register_admin_settings' |
| 252 | 259 | */ |
| 253 | 260 | function bbp_register_admin_settings() { |
-
diff --git src/includes/admin/admin.php src/includes/admin/admin.php
index a0e1bd8..0d67f16 100644
|
|
|
if ( !class_exists( 'BBP_Admin' ) ) : |
| 16 | 16 | * |
| 17 | 17 | * @package bbPress |
| 18 | 18 | * @subpackage Administration |
| 19 | | * @since bbPress (r2464) |
| | 19 | * @since 2.0.0 bbPress (r2464) |
| 20 | 20 | */ |
| 21 | 21 | class BBP_Admin { |
| 22 | 22 | |
| … |
… |
class BBP_Admin { |
| 80 | 80 | /** |
| 81 | 81 | * The main bbPress admin loader |
| 82 | 82 | * |
| 83 | | * @since bbPress (r2515) |
| | 83 | * @since 2.0.0 bbPress (r2515) |
| 84 | 84 | * |
| 85 | 85 | * @uses BBP_Admin::setup_globals() Setup the globals needed |
| 86 | 86 | * @uses BBP_Admin::includes() Include the required files |
| … |
… |
class BBP_Admin { |
| 95 | 95 | /** |
| 96 | 96 | * Admin globals |
| 97 | 97 | * |
| 98 | | * @since bbPress (r2646) |
| | 98 | * @since 2.0.0 bbPress (r2646) |
| | 99 | * |
| 99 | 100 | * @access private |
| 100 | 101 | */ |
| 101 | 102 | private function setup_globals() { |
| … |
… |
class BBP_Admin { |
| 111 | 112 | /** |
| 112 | 113 | * Include required files |
| 113 | 114 | * |
| 114 | | * @since bbPress (r2646) |
| | 115 | * @since 2.0.0 bbPress (r2646) |
| | 116 | * |
| 115 | 117 | * @access private |
| 116 | 118 | */ |
| 117 | 119 | private function includes() { |
| … |
… |
class BBP_Admin { |
| 129 | 131 | /** |
| 130 | 132 | * Setup the admin hooks, actions and filters |
| 131 | 133 | * |
| 132 | | * @since bbPress (r2646) |
| | 134 | * @since 2.0.0 bbPress (r2646) |
| | 135 | * |
| 133 | 136 | * @access private |
| 134 | 137 | * |
| 135 | 138 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Admin { |
| 188 | 191 | /** |
| 189 | 192 | * Add the admin menus |
| 190 | 193 | * |
| 191 | | * @since bbPress (r2646) |
| | 194 | * @since 2.0.0 bbPress (r2646) |
| 192 | 195 | * |
| 193 | 196 | * @uses add_management_page() To add the Recount page in Tools section |
| 194 | 197 | * @uses add_options_page() To add the Forums settings page in Settings |
| … |
… |
class BBP_Admin { |
| 296 | 299 | /** |
| 297 | 300 | * Add the network admin menus |
| 298 | 301 | * |
| 299 | | * @since bbPress (r3689) |
| | 302 | * @since 2.1.0 bbPress (r3689) |
| | 303 | * |
| 300 | 304 | * @uses add_submenu_page() To add the Update Forums page in Updates |
| 301 | 305 | */ |
| 302 | 306 | public function network_admin_menus() { |
| … |
… |
class BBP_Admin { |
| 319 | 323 | /** |
| 320 | 324 | * If this is a new installation, create some initial forum content. |
| 321 | 325 | * |
| 322 | | * @since bbPress (r3767) |
| | 326 | * @since 2.1.0 bbPress (r3767) |
| | 327 | * |
| 323 | 328 | * @return type |
| 324 | 329 | */ |
| 325 | 330 | public static function new_install() { |
| … |
… |
class BBP_Admin { |
| 333 | 338 | /** |
| 334 | 339 | * Register the settings |
| 335 | 340 | * |
| 336 | | * @since bbPress (r2737) |
| | 341 | * @since 2.0.0 bbPress (r2737) |
| 337 | 342 | * |
| 338 | 343 | * @uses add_settings_section() To add our own settings section |
| 339 | 344 | * @uses add_settings_field() To add various settings fields |
| … |
… |
class BBP_Admin { |
| 392 | 397 | /** |
| 393 | 398 | * Maps settings capabilities |
| 394 | 399 | * |
| 395 | | * @since bbPress (r4242) |
| | 400 | * @since 2.2.0 bbPress (r4242) |
| 396 | 401 | * |
| 397 | 402 | * @param array $caps Capabilities for meta capability |
| 398 | 403 | * @param string $cap Capability name |
| … |
… |
class BBP_Admin { |
| 453 | 458 | /** |
| 454 | 459 | * Register the importers |
| 455 | 460 | * |
| 456 | | * @since bbPress (r2737) |
| | 461 | * @since 2.0.0 bbPress (r2737) |
| 457 | 462 | * |
| 458 | 463 | * @uses apply_filters() Calls 'bbp_importer_path' filter to allow plugins |
| 459 | 464 | * to customize the importer script locations. |
| … |
… |
class BBP_Admin { |
| 492 | 497 | * |
| 493 | 498 | * Shows a nag message in admin area about the theme not supporting bbPress |
| 494 | 499 | * |
| 495 | | * @since bbPress (r2743) |
| | 500 | * @since 2.0.0 bbPress (r2743) |
| 496 | 501 | * |
| 497 | 502 | * @uses current_user_can() To check notice should be displayed. |
| 498 | 503 | */ |
| … |
… |
class BBP_Admin { |
| 503 | 508 | /** |
| 504 | 509 | * Add Settings link to plugins area |
| 505 | 510 | * |
| 506 | | * @since bbPress (r2737) |
| | 511 | * @since 2.0.0 bbPress (r2737) |
| 507 | 512 | * |
| 508 | 513 | * @param array $links Links array in which we would prepend our link |
| 509 | 514 | * @param string $file Current plugin basename |
| … |
… |
class BBP_Admin { |
| 536 | 541 | /** |
| 537 | 542 | * Add a link to bbPress about page to the admin bar |
| 538 | 543 | * |
| 539 | | * @since bbPress (r5136) |
| | 544 | * @since 2.5.0 bbPress (r5136) |
| 540 | 545 | * |
| 541 | 546 | * @param WP_Admin_Bar $wp_admin_bar |
| 542 | 547 | */ |
| … |
… |
class BBP_Admin { |
| 554 | 559 | /** |
| 555 | 560 | * Enqueue any admin scripts we might need |
| 556 | 561 | * |
| 557 | | * @since bbPress (r4260) |
| | 562 | * @since 2.2.0 bbPress (r4260) |
| 558 | 563 | */ |
| 559 | 564 | public function enqueue_scripts() { |
| 560 | 565 | |
| … |
… |
class BBP_Admin { |
| 593 | 598 | /** |
| 594 | 599 | * Enqueue any admin scripts we might need |
| 595 | 600 | * |
| 596 | | * @since bbPress (r5224) |
| | 601 | * @since 2.6.0 bbPress (r5224) |
| 597 | 602 | */ |
| 598 | 603 | public function enqueue_styles() { |
| 599 | 604 | |
| … |
… |
class BBP_Admin { |
| 609 | 614 | * Remove the individual recount and converter menus. |
| 610 | 615 | * They are grouped together by h2 tabs |
| 611 | 616 | * |
| 612 | | * @since bbPress (r2464) |
| | 617 | * @since 2.0.0 bbPress (r2464) |
| 613 | 618 | * |
| 614 | 619 | * @uses remove_submenu_page() To remove menu items with alternat navigation |
| 615 | 620 | */ |
| … |
… |
class BBP_Admin { |
| 628 | 633 | * way to be certain what the relative path of the admin images is. |
| 629 | 634 | * We are including the two most common configurations here, just in case. |
| 630 | 635 | * |
| 631 | | * @since bbPress (r2521) |
| | 636 | * @since 2.0.0 bbPress (r2521) |
| 632 | 637 | * |
| 633 | 638 | * @uses wp_admin_css_color() To register the color scheme |
| 634 | 639 | */ |
| … |
… |
class BBP_Admin { |
| 665 | 670 | /** |
| 666 | 671 | * Hide theme compat package selection if only 1 package is registered |
| 667 | 672 | * |
| 668 | | * @since bbPress (r4315) |
| | 673 | * @since 2.2.0 bbPress (r4315) |
| 669 | 674 | * |
| 670 | 675 | * @param array $sections Forums settings sections |
| 671 | 676 | * @return array |
| … |
… |
class BBP_Admin { |
| 681 | 686 | /** |
| 682 | 687 | * Allow keymaster role to save Forums settings |
| 683 | 688 | * |
| 684 | | * @since bbPress (r4678) |
| | 689 | * @since 2.3.0 bbPress (r4678) |
| 685 | 690 | * |
| 686 | 691 | * @param string $capability |
| 687 | 692 | * @return string Return 'keep_gate' capability |
| … |
… |
class BBP_Admin { |
| 696 | 701 | /** |
| 697 | 702 | * Ajax action for facilitating the forum auto-suggest |
| 698 | 703 | * |
| 699 | | * @since bbPress (r4261) |
| | 704 | * @since 2.2.0 bbPress (r4261) |
| 700 | 705 | * |
| 701 | 706 | * @uses get_posts() |
| 702 | 707 | * @uses bbp_get_topic_post_type() |
| … |
… |
class BBP_Admin { |
| 736 | 741 | /** |
| 737 | 742 | * Ajax action for facilitating the topic and reply author auto-suggest |
| 738 | 743 | * |
| 739 | | * @since bbPress (r5014) |
| | 744 | * @since 2.4.0 bbPress (r5014) |
| 740 | 745 | */ |
| 741 | 746 | public function suggest_user() { |
| 742 | 747 | |
| … |
… |
class BBP_Admin { |
| 775 | 780 | /** |
| 776 | 781 | * Output the about screen |
| 777 | 782 | * |
| 778 | | * @since bbPress (r4159) |
| | 783 | * @since 2.2.0 bbPress (r4159) |
| 779 | 784 | */ |
| 780 | 785 | public function about_screen() { |
| 781 | 786 | |
| … |
… |
class BBP_Admin { |
| 852 | 857 | * Hardcoding this in here is pretty janky. It's fine for 2.2, but we'll |
| 853 | 858 | * want to leverage api.wordpress.org eventually. |
| 854 | 859 | * |
| 855 | | * @since bbPress (r4159) |
| | 860 | * @since 2.2.0 bbPress (r4159) |
| 856 | 861 | */ |
| 857 | 862 | public function credits_screen() { |
| 858 | 863 | |
| … |
… |
class BBP_Admin { |
| 955 | 960 | /** |
| 956 | 961 | * Update all bbPress forums across all sites |
| 957 | 962 | * |
| 958 | | * @since bbPress (r3689) |
| | 963 | * @since 2.1.0 bbPress (r3689) |
| 959 | 964 | * |
| 960 | 965 | * @uses get_blog_option() |
| 961 | 966 | * @uses wp_remote_get() |
| … |
… |
class BBP_Admin { |
| 1000 | 1005 | /** |
| 1001 | 1006 | * Update all bbPress forums across all sites |
| 1002 | 1007 | * |
| 1003 | | * @since bbPress (r3689) |
| | 1008 | * @since 2.1.0 bbPress (r3689) |
| 1004 | 1009 | * |
| 1005 | 1010 | * @uses get_blog_option() |
| 1006 | 1011 | * @uses wp_remote_get() |
| … |
… |
endif; // class_exists check |
| 1114 | 1119 | /** |
| 1115 | 1120 | * Setup bbPress Admin |
| 1116 | 1121 | * |
| 1117 | | * @since bbPress (r2596) |
| | 1122 | * @since 2.0.0 bbPress (r2596) |
| 1118 | 1123 | * |
| 1119 | 1124 | * @uses BBP_Admin |
| 1120 | 1125 | */ |
-
diff --git src/includes/admin/converter.php src/includes/admin/converter.php
index 4ae3a21..5621819 100644
|
|
|
class BBP_Converter { |
| 20 | 20 | /** |
| 21 | 21 | * The main bbPress Converter loader |
| 22 | 22 | * |
| 23 | | * @since bbPress (r3813) |
| | 23 | * @since 2.1.0 bbPress (r3813) |
| | 24 | * |
| 24 | 25 | * @uses BBP_Converter::includes() Include the required files |
| 25 | 26 | * @uses BBP_Converter::setup_actions() Setup the actions |
| 26 | 27 | */ |
| … |
… |
class BBP_Converter { |
| 58 | 59 | /** |
| 59 | 60 | * Setup the default actions |
| 60 | 61 | * |
| 61 | | * @since bbPress (r3813) |
| | 62 | * @since 2.1.0 bbPress (r3813) |
| | 63 | * |
| 62 | 64 | * @uses add_action() To add various actions |
| 63 | 65 | */ |
| 64 | 66 | private function setup_actions() { |
| … |
… |
class BBP_Converter { |
| 76 | 78 | /** |
| 77 | 79 | * Register the settings |
| 78 | 80 | * |
| 79 | | * @since bbPress (r3813) |
| | 81 | * @since 2.1.0 bbPress (r3813) |
| | 82 | * |
| 80 | 83 | * @uses add_settings_section() To add our own settings section |
| 81 | 84 | * @uses add_settings_field() To add various settings fields |
| 82 | 85 | * @uses register_setting() To register various settings |
| … |
… |
class BBP_Converter { |
| 141 | 144 | /** |
| 142 | 145 | * Admin scripts |
| 143 | 146 | * |
| 144 | | * @since bbPress (r3813) |
| | 147 | * @since 2.1.0 bbPress (r3813) |
| 145 | 148 | */ |
| 146 | 149 | public function admin_head() { ?> |
| 147 | 150 | |
| … |
… |
class BBP_Converter { |
| 278 | 281 | /** |
| 279 | 282 | * Wrap the converter output in paragraph tags, so styling can be applied |
| 280 | 283 | * |
| 281 | | * @since bbPress (r4052) |
| | 284 | * @since 2.1.0 bbPress (r4052) |
| 282 | 285 | * |
| 283 | 286 | * @param string $output |
| 284 | 287 | */ |
| … |
… |
class BBP_Converter { |
| 299 | 302 | /** |
| 300 | 303 | * Callback processor |
| 301 | 304 | * |
| 302 | | * @since bbPress (r3813) |
| | 305 | * @since 2.1.0 bbPress (r3813) |
| 303 | 306 | */ |
| 304 | 307 | public function process_callback() { |
| 305 | 308 | |
| … |
… |
class BBP_Converter { |
| 626 | 629 | /** |
| 627 | 630 | * Create Tables for fast syncing |
| 628 | 631 | * |
| 629 | | * @since bbPress (r3813) |
| | 632 | * @since 2.1.0 bbPress (r3813) |
| 630 | 633 | */ |
| 631 | 634 | public function sync_table( $drop = false ) { |
| 632 | 635 | |
| … |
… |
class BBP_Converter { |
| 665 | 668 | /** |
| 666 | 669 | * Base class to be extended by specific individual importers |
| 667 | 670 | * |
| 668 | | * @since bbPress (r3813) |
| | 671 | * @since 2.1.0 bbPress (r3813) |
| 669 | 672 | */ |
| 670 | 673 | abstract class BBP_Converter_Base { |
| 671 | 674 | |
| … |
… |
abstract class BBP_Converter_Base { |
| 1273 | 1276 | /** |
| 1274 | 1277 | * This method converts old topic stickies to new bbPress stickies. |
| 1275 | 1278 | * |
| 1276 | | * @since bbPress (r5170) |
| | 1279 | * @since 2.5.0 bbPress (r5170) |
| 1277 | 1280 | * |
| 1278 | 1281 | * @uses WPDB $wpdb |
| 1279 | 1282 | * @uses bbp_stick_topic() to set the imported topic as sticky |
| … |
… |
abstract class BBP_Converter_Base { |
| 1304 | 1307 | /** |
| 1305 | 1308 | * This method converts old topic super stickies to new bbPress super stickies. |
| 1306 | 1309 | * |
| 1307 | | * @since bbPress (r5170) |
| | 1310 | * @since 2.5.0 bbPress (r5170) |
| 1308 | 1311 | * |
| 1309 | 1312 | * @uses WPDB $wpdb |
| 1310 | 1313 | * @uses bbp_stick_topic() to set the imported topic as super sticky |
| … |
… |
abstract class BBP_Converter_Base { |
| 1336 | 1339 | /** |
| 1337 | 1340 | * This method converts old closed topics to bbPress closed topics. |
| 1338 | 1341 | * |
| 1339 | | * @since bbPress (r5425) |
| | 1342 | * @since 2.6.0 bbPress (r5425) |
| 1340 | 1343 | * |
| 1341 | 1344 | * @uses bbp_close_topic() to close topics properly |
| 1342 | 1345 | * |
| … |
… |
abstract class BBP_Converter_Base { |
| 1366 | 1369 | /** |
| 1367 | 1370 | * This method converts old reply_to post id to new bbPress reply_to post id. |
| 1368 | 1371 | * |
| 1369 | | * @since bbPress (r5093) |
| | 1372 | * @since 2.4.0 bbPress (r5093) |
| 1370 | 1373 | */ |
| 1371 | 1374 | public function convert_reply_to_parents( $start ) { |
| 1372 | 1375 | |
| … |
… |
abstract class BBP_Converter_Base { |
| 1394 | 1397 | /** |
| 1395 | 1398 | * This method converts anonymous topics. |
| 1396 | 1399 | * |
| 1397 | | * @since bbPress (r5538) |
| | 1400 | * @since 2.6.0 bbPress (r5538) |
| 1398 | 1401 | * |
| 1399 | 1402 | * @uses add_post_meta() To add _bbp_anonymous_name topic meta key |
| 1400 | 1403 | */ |
| … |
… |
abstract class BBP_Converter_Base { |
| 1440 | 1443 | /** |
| 1441 | 1444 | * This method converts anonymous replies. |
| 1442 | 1445 | * |
| 1443 | | * @since bbPress (r5538) |
| | 1446 | * @since 2.6.0 bbPress (r5538) |
| 1444 | 1447 | * |
| 1445 | 1448 | * @uses add_post_meta() To add _bbp_anonymous_name reply meta key |
| 1446 | 1449 | */ |
| … |
… |
abstract class BBP_Converter_Base { |
| 1672 | 1675 | /** |
| 1673 | 1676 | * A mini cache system to reduce database calls to reply_to post id. |
| 1674 | 1677 | * |
| 1675 | | * @since bbPress (r5093) |
| | 1678 | * @since 2.4.0 bbPress (r5093) |
| 1676 | 1679 | * |
| 1677 | 1680 | * @param string $field |
| 1678 | 1681 | * @return string |
| … |
… |
abstract class BBP_Converter_Base { |
| 1724 | 1727 | /** |
| 1725 | 1728 | * Check if the topic or reply author is anonymous |
| 1726 | 1729 | * |
| 1727 | | * @since (r5544) |
| | 1730 | * @since 2.6.0 bbPress (r5544) |
| 1728 | 1731 | * |
| 1729 | 1732 | * @param string $field |
| 1730 | 1733 | * @return string |
-
diff --git src/includes/admin/converters/AEF.php src/includes/admin/converters/AEF.php
index a4c5ce9..d934cf7 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of AEF Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5139) |
| | 13 | * @since 2.5.0 bbPress (r5139) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/aef |
| 15 | 16 | */ |
| 16 | 17 | class AEF extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Drupal7.php src/includes/admin/converters/Drupal7.php
index fdbb4ce..01ac02a 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Drupal v7.x Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5138) |
| | 13 | * @since 2.5.0 bbPress (r5138) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/drupal |
| 15 | 16 | */ |
| 16 | 17 | class Drupal7 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Example.php src/includes/admin/converters/Example.php
index 24902fd..3498a9f 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Example converter base impoprter template for bbPress |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4689) |
| | 13 | * @since 2.3.0 bbPress (r4689) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/custom-import |
| 15 | 16 | */ |
| 16 | 17 | class Example extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/FluxBB.php src/includes/admin/converters/FluxBB.php
index 4beeee4..4719e95 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of FluxBB Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5138) |
| | 13 | * @since 2.5.0 bbPress (r5138) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/fluxbb |
| 15 | 16 | */ |
| 16 | 17 | class FluxBB extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Invision.php src/includes/admin/converters/Invision.php
index 726419e..737ff6e 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Invision Power Board v3.x converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4713) |
| | 13 | * @since 2.3.0 bbPress (r4713) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/invision |
| 15 | 16 | */ |
| 16 | 17 | class Invision extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Kunena1.php src/includes/admin/converters/Kunena1.php
index f51c283..f216033 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Kunena v1.x Forums for Joomla Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5144) |
| | 13 | * @since 2.5.0 bbPress (r5144) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/kunena/ |
| 15 | 16 | */ |
| 16 | 17 | class Kunena1 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Kunena2.php src/includes/admin/converters/Kunena2.php
index 7117b09..0364550 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Kunena v2.x Forums for Joomla Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5144) |
| | 13 | * @since 2.5.0 bbPress (r5144) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/kunena/ |
| 15 | 16 | */ |
| 16 | 17 | class Kunena2 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Kunena3.php src/includes/admin/converters/Kunena3.php
index 07a924d..add5afb 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Kunena v3.x Forums for Joomla Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5144) |
| | 13 | * @since 2.5.0 bbPress (r5144) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/kunena/ |
| 15 | 16 | */ |
| 16 | 17 | class Kunena3 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Mingle.php src/includes/admin/converters/Mingle.php
index fadd8b9..50f1f1e 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Mingle Forums converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4691) |
| | 13 | * @since 2.3.0 bbPress (r4691) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/mingle |
| 15 | 16 | */ |
| 16 | 17 | class Mingle extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/MyBB.php src/includes/admin/converters/MyBB.php
index 55d47f9..be02c82 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of MyBB Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5140) |
| | 13 | * @since 2.5.0 bbPress (r5140) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/mybb |
| 15 | 16 | */ |
| 16 | 17 | class MyBB extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/PHPFox3.php src/includes/admin/converters/PHPFox3.php
index 9f70af8..c2a57da 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of PHPFox v3.x Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5146) |
| | 13 | * @since 2.5.0 bbPress (r5146) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/phpfox |
| 15 | 16 | */ |
| 16 | 17 | class PHPFox3 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/PHPWind.php src/includes/admin/converters/PHPWind.php
index a584314..70f109d 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of PHPWind Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5142) |
| | 13 | * @since 2.5.0 bbPress (r5142) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/phpwind |
| 15 | 16 | */ |
| 16 | 17 | class PHPWind extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Phorum.php src/includes/admin/converters/Phorum.php
index 36bd6f6..8a84b2b 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Phorum Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5141) |
| | 13 | * @since 2.5.0 bbPress (r5141) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/phorum |
| 15 | 16 | */ |
| 16 | 17 | class Phorum extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/PunBB.php src/includes/admin/converters/PunBB.php
index aaaf6ab..be345b5 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of PunBB v1.4.2 Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5153) |
| | 13 | * @since 2.5.0 bbPress (r5153) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/punbb |
| 15 | 16 | */ |
| 16 | 17 | class PunBB extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/SMF.php src/includes/admin/converters/SMF.php
index 832b15d..7305353 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of SMF Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5189) |
| | 13 | * @since 2.5.0 bbPress (r5189) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/smf |
| 15 | 16 | */ |
| 16 | 17 | class SMF extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/SimplePress5.php src/includes/admin/converters/SimplePress5.php
index eb02dba..6f638cd 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of SimplePress v5 converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4638) |
| | 13 | * @since 2.3.0 bbPress (r4638) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/simplepress/ |
| 15 | 16 | */ |
| 16 | 17 | class SimplePress5 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/Vanilla.php src/includes/admin/converters/Vanilla.php
index 1e2ca08..986b240 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of Vanilla 2.0.18.1 Converter |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4717) |
| | 13 | * @since 2.3.0 bbPress (r4717) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/vanilla |
| 15 | 16 | */ |
| 16 | 17 | class Vanilla extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/XMB.php src/includes/admin/converters/XMB.php
index ae1e904..c7b95d3 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of XMB Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5143) |
| | 13 | * @since 2.5.0 bbPress (r5143) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/xmb |
| 15 | 16 | */ |
| 16 | 17 | class XMB extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/XenForo.php src/includes/admin/converters/XenForo.php
index 5adabec..11a5dc5 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of XenForo converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5145) |
| | 13 | * @since 2.5.0 bbPress (r5145) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/xenforo |
| 15 | 16 | */ |
| 16 | 17 | class XenForo extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/bbPress1.php src/includes/admin/converters/bbPress1.php
index 309cdde..2f44854 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * bbPress 1.1 Converter |
| 12 | 12 | * |
| 13 | | * @since bbPress (r3816) |
| | 13 | * @since 2.1.0 bbPress (r3816) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/bbpress-1-x-buddypress-group-forums |
| 15 | 16 | */ |
| 16 | 17 | class bbPress1 extends BBP_Converter_Base { |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 740 | 741 | /** |
| 741 | 742 | * This callback strips `topic-` from topic subscriptions taxonomy |
| 742 | 743 | * |
| 743 | | * @since (r5572) |
| | 744 | * @since 2.6.0 bbPress (r5572) |
| 744 | 745 | * |
| 745 | 746 | * @param string $field Topic ID |
| 746 | 747 | * @return integer WordPress safe |
-
diff --git src/includes/admin/converters/e107v1.php src/includes/admin/converters/e107v1.php
index 1310526..5c43281 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of e107 v1.x Forum converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5352) |
| | 13 | * @since 2.6.0 bbPress (r5352) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/e107 |
| 15 | 16 | */ |
| 16 | 17 | class e107v1 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/phpBB.php src/includes/admin/converters/phpBB.php
index d6d2a75..b203a13 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of phpBB v3 Converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4689) |
| | 13 | * @since 2.3.0 bbPress (r4689) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/phpbb |
| 15 | 16 | */ |
| 16 | 17 | class phpBB extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/vBulletin.php src/includes/admin/converters/vBulletin.php
index 9cd0656..0fe1f0e 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of vBulletin v4.x Converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r4724) |
| | 13 | * @since 2.3.0 bbPress (r4724) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/vbulletin |
| 15 | 16 | */ |
| 16 | 17 | class vBulletin extends BBP_Converter_Base { |
-
diff --git src/includes/admin/converters/vBulletin3.php src/includes/admin/converters/vBulletin3.php
index f42162c..5556e3e 100644
|
|
|
|
| 10 | 10 | /** |
| 11 | 11 | * Implementation of vBulletin v3.x Converter. |
| 12 | 12 | * |
| 13 | | * @since bbPress (r5151) |
| | 13 | * @since 2.5.0 bbPress (r5151) |
| | 14 | * |
| 14 | 15 | * @link Codex Docs https://codex.bbpress.org/import-forums/vbulletin |
| 15 | 16 | */ |
| 16 | 17 | class vBulletin3 extends BBP_Converter_Base { |
-
diff --git src/includes/admin/forums.php src/includes/admin/forums.php
index 246e55c..e0d4b76 100644
|
|
|
if ( !class_exists( 'BBP_Forums_Admin' ) ) : |
| 16 | 16 | * |
| 17 | 17 | * @package bbPress |
| 18 | 18 | * @subpackage Administration |
| 19 | | * @since bbPress (r2464) |
| | 19 | * @since 2.0.0 bbPress (r2464) |
| 20 | 20 | */ |
| 21 | 21 | class BBP_Forums_Admin { |
| 22 | 22 | |
| … |
… |
class BBP_Forums_Admin { |
| 32 | 32 | /** |
| 33 | 33 | * The main bbPress forums admin loader |
| 34 | 34 | * |
| 35 | | * @since bbPress (r2515) |
| | 35 | * @since 2.0.0 bbPress (r2515) |
| 36 | 36 | * |
| 37 | 37 | * @uses BBP_Forums_Admin::setup_globals() Setup the globals needed |
| 38 | 38 | * @uses BBP_Forums_Admin::setup_actions() Setup the hooks and actions |
| … |
… |
class BBP_Forums_Admin { |
| 46 | 46 | /** |
| 47 | 47 | * Setup the admin hooks, actions and filters |
| 48 | 48 | * |
| 49 | | * @since bbPress (r2646) |
| | 49 | * @since 2.0.0 bbPress (r2646) |
| | 50 | * |
| 50 | 51 | * @access private |
| 51 | 52 | * |
| 52 | 53 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Forums_Admin { |
| 90 | 91 | /** |
| 91 | 92 | * Should we bail out of this method? |
| 92 | 93 | * |
| 93 | | * @since bbPress (r4067) |
| | 94 | * @since 2.1.0 bbPress (r4067) |
| | 95 | * |
| 94 | 96 | * @return boolean |
| 95 | 97 | */ |
| 96 | 98 | private function bail() { |
| … |
… |
class BBP_Forums_Admin { |
| 104 | 106 | /** |
| 105 | 107 | * Admin globals |
| 106 | 108 | * |
| 107 | | * @since bbPress (r2646) |
| | 109 | * @since 2.0.0 bbPress (r2646) |
| | 110 | * |
| 108 | 111 | * @access private |
| 109 | 112 | */ |
| 110 | 113 | private function setup_globals() { |
| … |
… |
class BBP_Forums_Admin { |
| 116 | 119 | /** |
| 117 | 120 | * Contextual help for bbPress forum edit page |
| 118 | 121 | * |
| 119 | | * @since bbPress (r3119) |
| | 122 | * @since 2.0.0 bbPress (r3119) |
| | 123 | * |
| 120 | 124 | * @uses get_current_screen() |
| 121 | 125 | */ |
| 122 | 126 | public function edit_help() { |
| … |
… |
class BBP_Forums_Admin { |
| 179 | 183 | /** |
| 180 | 184 | * Contextual help for bbPress forum edit page |
| 181 | 185 | * |
| 182 | | * @since bbPress (r3119) |
| | 186 | * @since 2.0.0 bbPress (r3119) |
| | 187 | * |
| 183 | 188 | * @uses get_current_screen() |
| 184 | 189 | */ |
| 185 | 190 | public function new_help() { |
| … |
… |
class BBP_Forums_Admin { |
| 240 | 245 | /** |
| 241 | 246 | * Add the forum attributes metabox |
| 242 | 247 | * |
| 243 | | * @since bbPress (r2746) |
| | 248 | * @since 2.0.0 bbPress (r2746) |
| 244 | 249 | * |
| 245 | 250 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 246 | 251 | * @uses add_meta_box() To add the metabox |
| … |
… |
class BBP_Forums_Admin { |
| 267 | 272 | /** |
| 268 | 273 | * Return user nicename suggestions instead of tag suggestions |
| 269 | 274 | * |
| 270 | | * @since bbPress (r5834) |
| | 275 | * @since 2.6.0 bbPress (r5834) |
| 271 | 276 | * |
| 272 | 277 | * @uses bbp_get_forum_mod_tax_id() To get the forum moderator taxonomy id |
| 273 | 278 | * @uses sanitize_key() To sanitize the taxonomy id |
| … |
… |
class BBP_Forums_Admin { |
| 340 | 345 | /** |
| 341 | 346 | * Pass the forum attributes for processing |
| 342 | 347 | * |
| 343 | | * @since bbPress (r2746) |
| | 348 | * @since 2.0.0 bbPress (r2746) |
| 344 | 349 | * |
| 345 | 350 | * @param int $forum_id Forum id |
| 346 | 351 | * @uses current_user_can() To check if the current user is capable of |
| … |
… |
class BBP_Forums_Admin { |
| 407 | 412 | /** |
| 408 | 413 | * Add some general styling to the admin area |
| 409 | 414 | * |
| 410 | | * @since bbPress (r2464) |
| | 415 | * @since 2.0.0 bbPress (r2464) |
| 411 | 416 | * |
| 412 | 417 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 413 | 418 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
class BBP_Forums_Admin { |
| 490 | 495 | * |
| 491 | 496 | * Handles the admin-side opening/closing of forums |
| 492 | 497 | * |
| 493 | | * @since bbPress (r5254) |
| | 498 | * @since 2.6.0 bbPress (r5254) |
| 494 | 499 | * |
| 495 | 500 | * @uses bbp_get_forum() To get the forum |
| 496 | 501 | * @uses current_user_can() To check if the user is capable of editing |
| … |
… |
class BBP_Forums_Admin { |
| 566 | 571 | * Display the success/error notices from |
| 567 | 572 | * {@link BBP_Admin::toggle_forum()} |
| 568 | 573 | * |
| 569 | | * @since bbPress (r5254) |
| | 574 | * @since 2.6.0 bbPress (r5254) |
| 570 | 575 | * |
| 571 | 576 | * @uses bbp_get_forum() To get the forum |
| 572 | 577 | * @uses bbp_get_forum_title() To get the forum title of the forum |
| … |
… |
class BBP_Forums_Admin { |
| 629 | 634 | /** |
| 630 | 635 | * Manage the column headers for the forums page |
| 631 | 636 | * |
| 632 | | * @since bbPress (r2485) |
| | 637 | * @since 2.0.0 bbPress (r2485) |
| 633 | 638 | * |
| 634 | 639 | * @param array $columns The columns |
| 635 | 640 | * @uses apply_filters() Calls 'bbp_admin_forums_column_headers' with |
| … |
… |
class BBP_Forums_Admin { |
| 665 | 670 | /** |
| 666 | 671 | * Print extra columns for the forums page |
| 667 | 672 | * |
| 668 | | * @since bbPress (r2485) |
| | 673 | * @since 2.0.0 bbPress (r2485) |
| 669 | 674 | * |
| 670 | 675 | * @param string $column Column |
| 671 | 676 | * @param int $forum_id Forum id |
| … |
… |
class BBP_Forums_Admin { |
| 732 | 737 | * Remove the quick-edit action link and display the description under |
| 733 | 738 | * the forum title and add the open/close links |
| 734 | 739 | * |
| 735 | | * @since bbPress (r2577) |
| | 740 | * @since 2.0.0 bbPress (r2577) |
| 736 | 741 | * |
| 737 | 742 | * @param array $actions Actions |
| 738 | 743 | * @param array $forum Forum object |
| … |
… |
class BBP_Forums_Admin { |
| 776 | 781 | /** |
| 777 | 782 | * Custom user feedback messages for forum post type |
| 778 | 783 | * |
| 779 | | * @since bbPress (r3080) |
| | 784 | * @since 2.0.0 bbPress (r3080) |
| 780 | 785 | * |
| 781 | 786 | * @global int $post_ID |
| 782 | 787 | * @uses bbp_get_forum_permalink() |
| … |
… |
endif; // class_exists check |
| 854 | 859 | * This is currently here to make hooking and unhooking of the admin UI easy. |
| 855 | 860 | * It could use dependency injection in the future, but for now this is easier. |
| 856 | 861 | * |
| 857 | | * @since bbPress (r2596) |
| | 862 | * @since 2.0.0 bbPress (r2596) |
| 858 | 863 | * |
| 859 | 864 | * @uses BBP_Forums_Admin |
| 860 | 865 | */ |
-
diff --git src/includes/admin/functions.php src/includes/admin/functions.php
index 6e6b89e..299027e 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Add a separator to the WordPress admin menus |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2957) |
| | 18 | * @since 2.0.0 bbPress (r2957) |
| 19 | 19 | */ |
| 20 | 20 | function bbp_admin_separator() { |
| 21 | 21 | |
| … |
… |
function bbp_admin_separator() { |
| 47 | 47 | /** |
| 48 | 48 | * Tell WordPress we have a custom menu order |
| 49 | 49 | * |
| 50 | | * @since bbPress (r2957) |
| | 50 | * @since 2.0.0 bbPress (r2957) |
| 51 | 51 | * |
| 52 | 52 | * @param bool $menu_order Menu order |
| 53 | 53 | * @return mixed True if separator, false if not |
| … |
… |
function bbp_admin_custom_menu_order( $menu_order = false ) { |
| 63 | 63 | /** |
| 64 | 64 | * Move our custom separator above our custom post types |
| 65 | 65 | * |
| 66 | | * @since bbPress (r2957) |
| | 66 | * @since 2.0.0 bbPress (r2957) |
| 67 | 67 | * |
| 68 | 68 | * @param array $menu_order Menu Order |
| 69 | 69 | * @uses bbp_get_forum_post_type() To get the forum post type |
| … |
… |
function bbp_admin_menu_order( $menu_order ) { |
| 117 | 117 | /** |
| 118 | 118 | * Filter sample permalinks so that certain languages display properly. |
| 119 | 119 | * |
| 120 | | * @since bbPress (r3336) |
| | 120 | * @since 2.0.0 bbPress (r3336) |
| 121 | 121 | * |
| 122 | 122 | * @param string $post_link Custom post type permalink |
| 123 | 123 | * @param object $_post Post data object |
| … |
… |
function bbp_filter_sample_permalink( $post_link, $_post, $leavename = false, $s |
| 143 | 143 | /** |
| 144 | 144 | * Sanitize permalink slugs when saving the settings page. |
| 145 | 145 | * |
| 146 | | * @since bbPress (r5364) |
| | 146 | * @since 2.6.0 bbPress (r5364) |
| 147 | 147 | * |
| 148 | 148 | * @param string $slug |
| 149 | 149 | * @return string |
| … |
… |
function bbp_sanitize_slug( $slug = '' ) { |
| 173 | 173 | /** |
| 174 | 174 | * Uninstall all bbPress options and capabilities from a specific site. |
| 175 | 175 | * |
| 176 | | * @since bbPress (r3765) |
| | 176 | * @since 2.1.0 bbPress (r3765) |
| | 177 | * |
| 177 | 178 | * @param type $site_id |
| 178 | 179 | */ |
| 179 | 180 | function bbp_do_uninstall( $site_id = 0 ) { |
| … |
… |
function bbp_do_uninstall( $site_id = 0 ) { |
| 192 | 193 | /** |
| 193 | 194 | * Redirect user to bbPress's What's New page on activation |
| 194 | 195 | * |
| 195 | | * @since bbPress (r4389) |
| | 196 | * @since 2.2.0 bbPress (r4389) |
| 196 | 197 | * |
| 197 | 198 | * @internal Used internally to redirect bbPress to the about page on activation |
| 198 | 199 | * |
| … |
… |
function bbp_do_activation_redirect() { |
| 236 | 237 | * The conditional prevents the override when the user is viewing settings or |
| 237 | 238 | * any third-party plugins. |
| 238 | 239 | * |
| 239 | | * @since bbPress (r3888) |
| | 240 | * @since 2.1.0 bbPress (r3888) |
| | 241 | * |
| 240 | 242 | * @global string $plugin_page |
| 241 | 243 | * @global array $submenu_file |
| 242 | 244 | */ |
| … |
… |
function bbp_tools_modify_menu_highlight() { |
| 252 | 254 | /** |
| 253 | 255 | * Output the tabs in the admin area |
| 254 | 256 | * |
| 255 | | * @since bbPress (r3872) |
| | 257 | * @since 2.1.0 bbPress (r3872) |
| | 258 | * |
| 256 | 259 | * @param string $active_tab Name of the tab that is active |
| 257 | 260 | */ |
| 258 | 261 | function bbp_tools_admin_tabs( $active_tab = '' ) { |
| … |
… |
function bbp_tools_admin_tabs( $active_tab = '' ) { |
| 262 | 265 | /** |
| 263 | 266 | * Output the tabs in the admin area |
| 264 | 267 | * |
| 265 | | * @since bbPress (r3872) |
| | 268 | * @since 2.1.0 bbPress (r3872) |
| | 269 | * |
| 266 | 270 | * @param string $active_tab Name of the tab that is active |
| 267 | 271 | */ |
| 268 | 272 | function bbp_get_tools_admin_tabs( $active_tab = '' ) { |
-
diff --git src/includes/admin/list-tables/topic-replies.php src/includes/admin/list-tables/topic-replies.php
index 8ba566d..33a13d6 100644
|
|
|
if ( class_exists( 'WP_List_Table' ) ) : |
| 23 | 23 | * This list table is responsible for showing the replies to a topic in a |
| 24 | 24 | * metabox, similar to comments in posts and pages. |
| 25 | 25 | * |
| 26 | | * @since bbPress (r5886) |
| | 26 | * @since 2.6.0 bbPress (r5886) |
| 27 | 27 | */ |
| 28 | 28 | class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * The main constructor method |
| 32 | 32 | * |
| 33 | | * @since bbPress (r5886) |
| | 33 | * @since 2.6.0 bbPress (r5886) |
| 34 | 34 | */ |
| 35 | 35 | public function __construct( $args = array() ) { |
| 36 | 36 | $args = array( |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 44 | 44 | /** |
| 45 | 45 | * Setup the list-table's columns |
| 46 | 46 | * |
| 47 | | * @since bbPress (r5886) |
| | 47 | * @since 2.6.0 bbPress (r5886) |
| 48 | 48 | * |
| 49 | 49 | * @see WP_List_Table::::single_row_columns() |
| 50 | 50 | * |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 62 | 62 | /** |
| 63 | 63 | * Allow `bbp_reply_created` to be sortable |
| 64 | 64 | * |
| 65 | | * @since bbPress (r5886) |
| | 65 | * @since 2.6.0 bbPress (r5886) |
| 66 | 66 | * |
| 67 | 67 | * @return array An associative array containing the `bbp_reply_created` column |
| 68 | 68 | */ |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 75 | 75 | /** |
| 76 | 76 | * Setup the bulk actions |
| 77 | 77 | * |
| 78 | | * @since bbPress (r5886) |
| | 78 | * @since 2.6.0 bbPress (r5886) |
| 79 | 79 | * |
| 80 | 80 | * @return array An associative array containing all the bulk actions |
| 81 | 81 | */ |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 93 | 93 | /** |
| 94 | 94 | * Output the `cb` column for bulk actions (if we implement them) |
| 95 | 95 | * |
| 96 | | * @since bbPress (r5886) |
| | 96 | * @since 2.6.0 bbPress (r5886) |
| 97 | 97 | */ |
| 98 | 98 | public function column_cb( $item = '' ) { |
| 99 | 99 | return sprintf( |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 106 | 106 | /** |
| 107 | 107 | * Output the contents of the `bbp_topic_reply_author` column |
| 108 | 108 | * |
| 109 | | * @since bbPress (r5886) |
| | 109 | * @since 2.6.0 bbPress (r5886) |
| 110 | 110 | */ |
| 111 | 111 | public function column_bbp_topic_reply_author( $item = '' ) { |
| 112 | 112 | bbp_reply_author_avatar( $item->ID, 50 ); |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 120 | 120 | /** |
| 121 | 121 | * Output the contents of the `bbp_reply_created` column |
| 122 | 122 | * |
| 123 | | * @since bbPress (r5886) |
| | 123 | * @since 2.6.0 bbPress (r5886) |
| 124 | 124 | */ |
| 125 | 125 | public function column_bbp_reply_created( $item = '' ) { |
| 126 | 126 | return sprintf( '%1$s <br /> %2$s', |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 132 | 132 | /** |
| 133 | 133 | * Output the contents of the `bbp_reply_content` column |
| 134 | 134 | * |
| 135 | | * @since bbPress (r5886) |
| | 135 | * @since 2.6.0 bbPress (r5886) |
| 136 | 136 | */ |
| 137 | 137 | public function column_bbp_reply_content( $item = '' ) { |
| 138 | 138 | |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 158 | 158 | /** |
| 159 | 159 | * Handle bulk action requests |
| 160 | 160 | * |
| 161 | | * @since bbPress (r5886) |
| | 161 | * @since 2.6.0 bbPress (r5886) |
| 162 | 162 | */ |
| 163 | 163 | public function process_bulk_action() { |
| 164 | 164 | switch ( $this->current_action() ) { |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 174 | 174 | /** |
| 175 | 175 | * Prepare the list-table items for display |
| 176 | 176 | * |
| 177 | | * @since bbPress (r5886) |
| | 177 | * @since 2.6.0 bbPress (r5886) |
| 178 | 178 | * |
| 179 | 179 | * @uses $this->_column_headers |
| 180 | 180 | * @uses $this->items |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 233 | 233 | /** |
| 234 | 234 | * Message to be displayed when there are no items |
| 235 | 235 | * |
| 236 | | * @since bbPress (r5930) |
| | 236 | * @since 2.6.0 bbPress (r5930) |
| 237 | 237 | */ |
| 238 | 238 | public function no_items() { |
| 239 | 239 | esc_html_e( 'No replies to this topic.', 'bbpress' ); |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 245 | 245 | * This custom method is necessary because the one in `WP_List_Table` comes |
| 246 | 246 | * with a nonce and check that we do not need. |
| 247 | 247 | * |
| 248 | | * @since bbPress (r5930) |
| | 248 | * @since 2.6.0 bbPress (r5930) |
| 249 | 249 | */ |
| 250 | 250 | public function display() { |
| 251 | 251 | |
| … |
… |
class BBP_Topic_Replies_List_Table extends WP_List_Table { |
| 282 | 282 | * This custom method is necessary because the one in `WP_List_Table` comes |
| 283 | 283 | * with a nonce and check that we do not need. |
| 284 | 284 | * |
| 285 | | * @since bbPress (r5930) |
| | 285 | * @since 2.6.0 bbPress (r5930) |
| 286 | 286 | * |
| 287 | 287 | * @param string $which |
| 288 | 288 | */ |
-
diff --git src/includes/admin/metaboxes.php src/includes/admin/metaboxes.php
index 6fc4ff2..8303ef1 100644
|
|
|
|
| 12 | 12 | /** |
| 13 | 13 | * Filter the Dashboard "at a glance" items and append bbPress elements to it. |
| 14 | 14 | * |
| 15 | | * @since bbPress (r5268) |
| | 15 | * @since 2.6.0 bbPress (r5268) |
| 16 | 16 | * |
| 17 | 17 | * @param array $elements |
| 18 | 18 | * @return array |
| … |
… |
function bbp_filter_dashboard_glance_items( $elements = array() ) { |
| 59 | 59 | * |
| 60 | 60 | * Adds a dashboard widget with forum statistics |
| 61 | 61 | * |
| 62 | | * @since bbPress (r2770) |
| 63 | | * @deprecated bbPress (r5268) |
| | 62 | * @since 2.0.0 bbPress (r2770) |
| | 63 | * |
| | 64 | * @deprecated 2.6.0 bbPress (r5268) |
| 64 | 65 | * |
| 65 | 66 | * @uses bbp_get_version() To get the current bbPress version |
| 66 | 67 | * @uses bbp_get_statistics() To get the forum statistics |
| … |
… |
function bbp_dashboard_widget_right_now() { |
| 284 | 285 | * |
| 285 | 286 | * The metabox that holds all of the additional forum information |
| 286 | 287 | * |
| 287 | | * @since bbPress (r2744) |
| | 288 | * @since 2.0.0 bbPress (r2744) |
| 288 | 289 | * |
| 289 | 290 | * @uses bbp_is_forum_closed() To check if a forum is closed or not |
| 290 | 291 | * @uses bbp_is_forum_category() To check if a forum is a category or not |
| … |
… |
function bbp_forum_metabox() { |
| 382 | 383 | * |
| 383 | 384 | * The metabox that holds all of the additional topic information |
| 384 | 385 | * |
| 385 | | * @since bbPress (r2464) |
| | 386 | * @since 2.0.0 bbPress (r2464) |
| 386 | 387 | * |
| 387 | 388 | * @uses bbp_get_topic_forum_id() To get the topic forum id |
| 388 | 389 | * @uses do_action() Calls 'bbp_topic_metabox' |
| … |
… |
function bbp_topic_metabox() { |
| 459 | 460 | * |
| 460 | 461 | * The metabox that holds all of the additional reply information |
| 461 | 462 | * |
| 462 | | * @since bbPress (r2464) |
| | 463 | * @since 2.0.0 bbPress (r2464) |
| 463 | 464 | * |
| 464 | 465 | * @uses bbp_get_topic_post_type() To get the topic post type |
| 465 | 466 | * @uses do_action() Calls 'bbp_reply_metabox' |
| … |
… |
function bbp_reply_metabox() { |
| 550 | 551 | /** |
| 551 | 552 | * Output the topic replies metabox |
| 552 | 553 | * |
| 553 | | * @since bbPress (r5886) |
| | 554 | * @since 2.6.0 bbPress (r5886) |
| 554 | 555 | * |
| 555 | 556 | * @param type $topic |
| 556 | 557 | * |
| … |
… |
function bbp_topic_replies_metabox( $topic = false ) { |
| 591 | 592 | /** |
| 592 | 593 | * Anonymous user information metabox |
| 593 | 594 | * |
| 594 | | * @since bbPress (r2828) |
| | 595 | * @since 2.0.0 bbPress (r2828) |
| 595 | 596 | * |
| 596 | 597 | * @uses bbp_is_reply_anonymous() To check if reply is anonymous |
| 597 | 598 | * @uses bbp_is_topic_anonymous() To check if topic is anonymous |
-
diff --git src/includes/admin/replies.php src/includes/admin/replies.php
index 2ad892a..27284af 100644
|
|
|
if ( !class_exists( 'BBP_Replies_Admin' ) ) : |
| 16 | 16 | * |
| 17 | 17 | * @package bbPress |
| 18 | 18 | * @subpackage Administration |
| 19 | | * @since bbPress (r2464) |
| | 19 | * @since 2.0.0 bbPress (r2464) |
| 20 | 20 | */ |
| 21 | 21 | class BBP_Replies_Admin { |
| 22 | 22 | |
| … |
… |
class BBP_Replies_Admin { |
| 32 | 32 | /** |
| 33 | 33 | * The main bbPress admin loader |
| 34 | 34 | * |
| 35 | | * @since bbPress (r2515) |
| | 35 | * @since 2.0.0 bbPress (r2515) |
| 36 | 36 | * |
| 37 | 37 | * @uses BBP_Replies_Admin::setup_globals() Setup the globals needed |
| 38 | 38 | * @uses BBP_Replies_Admin::setup_actions() Setup the hooks and actions |
| … |
… |
class BBP_Replies_Admin { |
| 46 | 46 | /** |
| 47 | 47 | * Setup the admin hooks, actions and filters |
| 48 | 48 | * |
| 49 | | * @since bbPress (r2646) |
| | 49 | * @since 2.0.0 bbPress (r2646) |
| | 50 | * |
| 50 | 51 | * @access private |
| 51 | 52 | * |
| 52 | 53 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Replies_Admin { |
| 94 | 95 | /** |
| 95 | 96 | * Should we bail out of this method? |
| 96 | 97 | * |
| 97 | | * @since bbPress (r4067) |
| | 98 | * @since 2.1.0 bbPress (r4067) |
| | 99 | * |
| 98 | 100 | * @return boolean |
| 99 | 101 | */ |
| 100 | 102 | private function bail() { |
| … |
… |
class BBP_Replies_Admin { |
| 108 | 110 | /** |
| 109 | 111 | * Admin globals |
| 110 | 112 | * |
| 111 | | * @since bbPress (r2646) |
| | 113 | * @since 2.0.0 bbPress (r2646) |
| | 114 | * |
| 112 | 115 | * @access private |
| 113 | 116 | */ |
| 114 | 117 | private function setup_globals() { |
| … |
… |
class BBP_Replies_Admin { |
| 120 | 123 | /** |
| 121 | 124 | * Contextual help for bbPress reply edit page |
| 122 | 125 | * |
| 123 | | * @since bbPress (r3119) |
| | 126 | * @since 2.0.0 bbPress (r3119) |
| | 127 | * |
| 124 | 128 | * @uses get_current_screen() |
| 125 | 129 | */ |
| 126 | 130 | public function edit_help() { |
| … |
… |
class BBP_Replies_Admin { |
| 187 | 191 | /** |
| 188 | 192 | * Contextual help for bbPress reply edit page |
| 189 | 193 | * |
| 190 | | * @since bbPress (r3119) |
| | 194 | * @since 2.0.0 bbPress (r3119) |
| | 195 | * |
| 191 | 196 | * @uses get_current_screen() |
| 192 | 197 | */ |
| 193 | 198 | public function new_help() { |
| … |
… |
class BBP_Replies_Admin { |
| 246 | 251 | /** |
| 247 | 252 | * Add the reply attributes metabox |
| 248 | 253 | * |
| 249 | | * @since bbPress (r2746) |
| | 254 | * @since 2.0.0 bbPress (r2746) |
| 250 | 255 | * |
| 251 | 256 | * @uses bbp_get_reply_post_type() To get the reply post type |
| 252 | 257 | * @uses add_meta_box() To add the metabox |
| … |
… |
class BBP_Replies_Admin { |
| 273 | 278 | /** |
| 274 | 279 | * Pass the reply attributes for processing |
| 275 | 280 | * |
| 276 | | * @since bbPress (r2746) |
| | 281 | * @since 2.0.0 bbPress (r2746) |
| 277 | 282 | * |
| 278 | 283 | * @param int $reply_id Reply id |
| 279 | 284 | * @uses current_user_can() To check if the current user is capable of |
| … |
… |
class BBP_Replies_Admin { |
| 338 | 343 | * |
| 339 | 344 | * Allows editing of information about an author |
| 340 | 345 | * |
| 341 | | * @since bbPress (r2828) |
| | 346 | * @since 2.0.0 bbPress (r2828) |
| 342 | 347 | * |
| 343 | 348 | * @uses bbp_get_topic() To get the topic |
| 344 | 349 | * @uses bbp_get_reply() To get the reply |
| … |
… |
class BBP_Replies_Admin { |
| 375 | 380 | /** |
| 376 | 381 | * Add some general styling to the admin area |
| 377 | 382 | * |
| 378 | | * @since bbPress (r2464) |
| | 383 | * @since 2.0.0 bbPress (r2464) |
| 379 | 384 | * |
| 380 | 385 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 381 | 386 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
class BBP_Replies_Admin { |
| 450 | 455 | * |
| 451 | 456 | * Handles the admin-side spamming/unspamming of replies |
| 452 | 457 | * |
| 453 | | * @since bbPress (r2740) |
| | 458 | * @since 2.0.0 bbPress (r2740) |
| 454 | 459 | * |
| 455 | 460 | * @uses bbp_get_reply() To get the reply |
| 456 | 461 | * @uses current_user_can() To check if the user is capable of editing |
| … |
… |
class BBP_Replies_Admin { |
| 531 | 536 | * Display the success/error notices from |
| 532 | 537 | * {@link BBP_Admin::toggle_reply()} |
| 533 | 538 | * |
| 534 | | * @since bbPress (r2740) |
| | 539 | * @since 2.0.0 bbPress (r2740) |
| 535 | 540 | * |
| 536 | 541 | * @uses bbp_get_reply() To get the reply |
| 537 | 542 | * @uses bbp_get_reply_title() To get the reply title of the reply |
| … |
… |
class BBP_Replies_Admin { |
| 606 | 611 | /** |
| 607 | 612 | * Manage the column headers for the replies page |
| 608 | 613 | * |
| 609 | | * @since bbPress (r2577) |
| | 614 | * @since 2.0.0 bbPress (r2577) |
| 610 | 615 | * |
| 611 | 616 | * @param array $columns The columns |
| 612 | 617 | * @uses apply_filters() Calls 'bbp_admin_replies_column_headers' with |
| … |
… |
class BBP_Replies_Admin { |
| 634 | 639 | /** |
| 635 | 640 | * Print extra columns for the replies page |
| 636 | 641 | * |
| 637 | | * @since bbPress (r2577) |
| | 642 | * @since 2.0.0 bbPress (r2577) |
| 638 | 643 | * |
| 639 | 644 | * @param string $column Column |
| 640 | 645 | * @param int $reply_id reply id |
| … |
… |
class BBP_Replies_Admin { |
| 754 | 759 | * Remove the quick-edit action link under the reply title and add the |
| 755 | 760 | * content and spam link |
| 756 | 761 | * |
| 757 | | * @since bbPress (r2577) |
| | 762 | * @since 2.0.0 bbPress (r2577) |
| 758 | 763 | * |
| 759 | 764 | * @param array $actions Actions |
| 760 | 765 | * @param array $reply Reply object |
| … |
… |
class BBP_Replies_Admin { |
| 832 | 837 | /** |
| 833 | 838 | * Add forum dropdown to topic and reply list table filters |
| 834 | 839 | * |
| 835 | | * @since bbPress (r2991) |
| | 840 | * @since 2.0.0 bbPress (r2991) |
| 836 | 841 | * |
| 837 | 842 | * @uses bbp_get_reply_post_type() To get the reply post type |
| 838 | 843 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
class BBP_Replies_Admin { |
| 865 | 870 | /** |
| 866 | 871 | * Adjust the request query and include the forum id |
| 867 | 872 | * |
| 868 | | * @since bbPress (r2991) |
| | 873 | * @since 2.0.0 bbPress (r2991) |
| 869 | 874 | * |
| 870 | 875 | * @param array $query_vars Query variables from {@link WP_Query} |
| 871 | 876 | * @uses is_admin() To check if it's the admin section |
| … |
… |
class BBP_Replies_Admin { |
| 893 | 898 | /** |
| 894 | 899 | * Custom user feedback messages for reply post type |
| 895 | 900 | * |
| 896 | | * @since bbPress (r3080) |
| | 901 | * @since 2.0.0 bbPress (r3080) |
| 897 | 902 | * |
| 898 | 903 | * @global int $post_ID |
| 899 | 904 | * @uses bbp_get_topic_permalink() |
| … |
… |
endif; // class_exists check |
| 971 | 976 | * This is currently here to make hooking and unhooking of the admin UI easy. |
| 972 | 977 | * It could use dependency injection in the future, but for now this is easier. |
| 973 | 978 | * |
| 974 | | * @since bbPress (r2596) |
| | 979 | * @since 2.0.0 bbPress (r2596) |
| 975 | 980 | * |
| 976 | 981 | * @uses BBP_Replies_Admin |
| 977 | 982 | */ |
-
diff --git src/includes/admin/settings.php src/includes/admin/settings.php
index 6d47bff..62f0b5a 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Get the Forums settings sections. |
| 17 | 17 | * |
| 18 | | * @since bbPress (r4001) |
| | 18 | * @since 2.1.0 bbPress (r4001) |
| | 19 | * |
| 19 | 20 | * @return array |
| 20 | 21 | */ |
| 21 | 22 | function bbp_admin_get_settings_sections() { |
| … |
… |
function bbp_admin_get_settings_sections() { |
| 76 | 77 | /** |
| 77 | 78 | * Get all of the settings fields. |
| 78 | 79 | * |
| 79 | | * @since bbPress (r4001) |
| | 80 | * @since 2.1.0 bbPress (r4001) |
| | 81 | * |
| 80 | 82 | * @return type |
| 81 | 83 | */ |
| 82 | 84 | function bbp_admin_get_settings_fields() { |
| … |
… |
function bbp_admin_get_settings_fields() { |
| 429 | 431 | /** |
| 430 | 432 | * Get settings fields by section. |
| 431 | 433 | * |
| 432 | | * @since bbPress (r4001) |
| | 434 | * @since 2.1.0 bbPress (r4001) |
| | 435 | * |
| 433 | 436 | * @param string $section_id |
| 434 | 437 | * @return mixed False if section is invalid, array of fields otherwise. |
| 435 | 438 | */ |
| … |
… |
function bbp_admin_get_settings_fields_for_section( $section_id = '' ) { |
| 453 | 456 | /** |
| 454 | 457 | * User settings section description for the settings page |
| 455 | 458 | * |
| 456 | | * @since bbPress (r2786) |
| | 459 | * @since 2.0.0 bbPress (r2786) |
| 457 | 460 | */ |
| 458 | 461 | function bbp_admin_setting_callback_user_section() { |
| 459 | 462 | ?> |
| … |
… |
function bbp_admin_setting_callback_user_section() { |
| 467 | 470 | /** |
| 468 | 471 | * Edit lock setting field |
| 469 | 472 | * |
| 470 | | * @since bbPress (r2737) |
| | 473 | * @since 2.0.0 bbPress (r2737) |
| 471 | 474 | * |
| 472 | 475 | * @uses bbp_form_option() To output the option value |
| 473 | 476 | */ |
| … |
… |
function bbp_admin_setting_callback_editlock() { |
| 483 | 486 | /** |
| 484 | 487 | * Throttle setting field |
| 485 | 488 | * |
| 486 | | * @since bbPress (r2737) |
| | 489 | * @since 2.0.0 bbPress (r2737) |
| 487 | 490 | * |
| 488 | 491 | * @uses bbp_form_option() To output the option value |
| 489 | 492 | */ |
| … |
… |
function bbp_admin_setting_callback_throttle() { |
| 499 | 502 | /** |
| 500 | 503 | * Allow anonymous posting setting field |
| 501 | 504 | * |
| 502 | | * @since bbPress (r2737) |
| | 505 | * @since 2.0.0 bbPress (r2737) |
| 503 | 506 | * |
| 504 | 507 | * @uses checked() To display the checked attribute |
| 505 | 508 | */ |
| … |
… |
function bbp_admin_setting_callback_anonymous() { |
| 515 | 518 | /** |
| 516 | 519 | * Allow global access setting field |
| 517 | 520 | * |
| 518 | | * @since bbPress (r3378) |
| | 521 | * @since 2.0.0 bbPress (r3378) |
| 519 | 522 | * |
| 520 | 523 | * @uses checked() To display the checked attribute |
| 521 | 524 | */ |
| … |
… |
function bbp_admin_setting_callback_global_access() { |
| 552 | 555 | /** |
| 553 | 556 | * Features settings section description for the settings page |
| 554 | 557 | * |
| 555 | | * @since bbPress (r2786) |
| | 558 | * @since 2.0.0 bbPress (r2786) |
| 556 | 559 | */ |
| 557 | 560 | function bbp_admin_setting_callback_features_section() { |
| 558 | 561 | ?> |
| … |
… |
function bbp_admin_setting_callback_features_section() { |
| 565 | 568 | /** |
| 566 | 569 | * Allow favorites setting field |
| 567 | 570 | * |
| 568 | | * @since bbPress (r2786) |
| | 571 | * @since 2.0.0 bbPress (r2786) |
| 569 | 572 | * |
| 570 | 573 | * @uses checked() To display the checked attribute |
| 571 | 574 | */ |
| … |
… |
function bbp_admin_setting_callback_favorites() { |
| 581 | 584 | /** |
| 582 | 585 | * Allow subscriptions setting field |
| 583 | 586 | * |
| 584 | | * @since bbPress (r2737) |
| | 587 | * @since 2.0.0 bbPress (r2737) |
| 585 | 588 | * |
| 586 | 589 | * @uses checked() To display the checked attribute |
| 587 | 590 | */ |
| … |
… |
function bbp_admin_setting_callback_subscriptions() { |
| 597 | 600 | /** |
| 598 | 601 | * Allow topic tags setting field |
| 599 | 602 | * |
| 600 | | * @since bbPress (r4944) |
| | 603 | * @since 2.4.0 bbPress (r4944) |
| 601 | 604 | * |
| 602 | 605 | * @uses checked() To display the checked attribute |
| 603 | 606 | */ |
| … |
… |
function bbp_admin_setting_callback_topic_tags() { |
| 613 | 616 | /** |
| 614 | 617 | * Allow forum-mods setting field |
| 615 | 618 | * |
| 616 | | * @since bbPress (r5834) |
| | 619 | * @since 2.6.0 bbPress (r5834) |
| 617 | 620 | * |
| 618 | 621 | * @uses checked() To display the checked attribute |
| 619 | 622 | */ |
| … |
… |
function bbp_admin_setting_callback_forum_mods() { |
| 629 | 632 | /** |
| 630 | 633 | * Allow forum wide search |
| 631 | 634 | * |
| 632 | | * @since bbPress (r4970) |
| | 635 | * @since 2.4.0 bbPress (r4970) |
| 633 | 636 | * |
| 634 | 637 | * @uses checked() To display the checked attribute |
| 635 | 638 | */ |
| … |
… |
function bbp_admin_setting_callback_search() { |
| 647 | 650 | * |
| 648 | 651 | * Replies will be threaded if depth is 2 or greater |
| 649 | 652 | * |
| 650 | | * @since bbPress (r4944) |
| | 653 | * @since 2.4.0 bbPress (r4944) |
| 651 | 654 | * |
| 652 | 655 | * @uses apply_filters() Calls 'bbp_thread_replies_depth_max' to set a |
| 653 | 656 | * maximum displayed level |
| … |
… |
function bbp_admin_setting_callback_thread_replies_depth() { |
| 685 | 688 | /** |
| 686 | 689 | * Allow topic and reply revisions |
| 687 | 690 | * |
| 688 | | * @since bbPress (r3412) |
| | 691 | * @since 2.0.0 bbPress (r3412) |
| 689 | 692 | * |
| 690 | 693 | * @uses checked() To display the checked attribute |
| 691 | 694 | */ |
| … |
… |
function bbp_admin_setting_callback_revisions() { |
| 701 | 704 | /** |
| 702 | 705 | * Use the WordPress editor setting field |
| 703 | 706 | * |
| 704 | | * @since bbPress (r3586) |
| | 707 | * @since 2.1.0 bbPress (r3586) |
| 705 | 708 | * |
| 706 | 709 | * @uses checked() To display the checked attribute |
| 707 | 710 | */ |
| … |
… |
function bbp_admin_setting_callback_use_wp_editor() { |
| 717 | 720 | /** |
| 718 | 721 | * Main subtheme section |
| 719 | 722 | * |
| 720 | | * @since bbPress (r2786) |
| | 723 | * @since 2.0.0 bbPress (r2786) |
| 721 | 724 | */ |
| 722 | 725 | function bbp_admin_setting_callback_subtheme_section() { |
| 723 | 726 | ?> |
| … |
… |
function bbp_admin_setting_callback_subtheme_section() { |
| 730 | 733 | /** |
| 731 | 734 | * Use the WordPress editor setting field |
| 732 | 735 | * |
| 733 | | * @since bbPress (r3586) |
| | 736 | * @since 2.1.0 bbPress (r3586) |
| 734 | 737 | * |
| 735 | 738 | * @uses checked() To display the checked attribute |
| 736 | 739 | */ |
| … |
… |
function bbp_admin_setting_callback_subtheme_id() { |
| 764 | 767 | /** |
| 765 | 768 | * Allow oEmbed in replies |
| 766 | 769 | * |
| 767 | | * @since bbPress (r3752) |
| | 770 | * @since 2.1.0 bbPress (r3752) |
| 768 | 771 | * |
| 769 | 772 | * @uses checked() To display the checked attribute |
| 770 | 773 | */ |
| … |
… |
function bbp_admin_setting_callback_use_autoembed() { |
| 782 | 785 | /** |
| 783 | 786 | * Per page settings section description for the settings page |
| 784 | 787 | * |
| 785 | | * @since bbPress (r2786) |
| | 788 | * @since 2.0.0 bbPress (r2786) |
| 786 | 789 | */ |
| 787 | 790 | function bbp_admin_setting_callback_per_page_section() { |
| 788 | 791 | ?> |
| … |
… |
function bbp_admin_setting_callback_per_page_section() { |
| 795 | 798 | /** |
| 796 | 799 | * Topics per page setting field |
| 797 | 800 | * |
| 798 | | * @since bbPress (r2786) |
| | 801 | * @since 2.0.0 bbPress (r2786) |
| 799 | 802 | * |
| 800 | 803 | * @uses bbp_form_option() To output the option value |
| 801 | 804 | */ |
| … |
… |
function bbp_admin_setting_callback_topics_per_page() { |
| 811 | 814 | /** |
| 812 | 815 | * Replies per page setting field |
| 813 | 816 | * |
| 814 | | * @since bbPress (r2786) |
| | 817 | * @since 2.0.0 bbPress (r2786) |
| 815 | 818 | * |
| 816 | 819 | * @uses bbp_form_option() To output the option value |
| 817 | 820 | */ |
| … |
… |
function bbp_admin_setting_callback_replies_per_page() { |
| 829 | 832 | /** |
| 830 | 833 | * Per page settings section description for the settings page |
| 831 | 834 | * |
| 832 | | * @since bbPress (r2786) |
| | 835 | * @since 2.0.0 bbPress (r2786) |
| 833 | 836 | */ |
| 834 | 837 | function bbp_admin_setting_callback_per_rss_page_section() { |
| 835 | 838 | ?> |
| … |
… |
function bbp_admin_setting_callback_per_rss_page_section() { |
| 842 | 845 | /** |
| 843 | 846 | * Topics per RSS page setting field |
| 844 | 847 | * |
| 845 | | * @since bbPress (r2786) |
| | 848 | * @since 2.0.0 bbPress (r2786) |
| 846 | 849 | * |
| 847 | 850 | * @uses bbp_form_option() To output the option value |
| 848 | 851 | */ |
| … |
… |
function bbp_admin_setting_callback_topics_per_rss_page() { |
| 858 | 861 | /** |
| 859 | 862 | * Replies per RSS page setting field |
| 860 | 863 | * |
| 861 | | * @since bbPress (r2786) |
| | 864 | * @since 2.0.0 bbPress (r2786) |
| 862 | 865 | * |
| 863 | 866 | * @uses bbp_form_option() To output the option value |
| 864 | 867 | */ |
| … |
… |
function bbp_admin_setting_callback_replies_per_rss_page() { |
| 876 | 879 | /** |
| 877 | 880 | * Slugs settings section description for the settings page |
| 878 | 881 | * |
| 879 | | * @since bbPress (r2786) |
| | 882 | * @since 2.0.0 bbPress (r2786) |
| 880 | 883 | */ |
| 881 | 884 | function bbp_admin_setting_callback_root_slug_section() { |
| 882 | 885 | |
| … |
… |
function bbp_admin_setting_callback_root_slug_section() { |
| 893 | 896 | /** |
| 894 | 897 | * Root slug setting field |
| 895 | 898 | * |
| 896 | | * @since bbPress (r2786) |
| | 899 | * @since 2.0.0 bbPress (r2786) |
| 897 | 900 | * |
| 898 | 901 | * @uses bbp_form_option() To output the option value |
| 899 | 902 | */ |
| … |
… |
function bbp_admin_setting_callback_root_slug() { |
| 910 | 913 | /** |
| 911 | 914 | * Include root slug setting field |
| 912 | 915 | * |
| 913 | | * @since bbPress (r2786) |
| | 916 | * @since 2.0.0 bbPress (r2786) |
| 914 | 917 | * |
| 915 | 918 | * @uses checked() To display the checked attribute |
| 916 | 919 | */ |
| … |
… |
function bbp_admin_setting_callback_include_root() { |
| 926 | 929 | /** |
| 927 | 930 | * Include root slug setting field |
| 928 | 931 | * |
| 929 | | * @since bbPress (r2786) |
| | 932 | * @since 2.0.0 bbPress (r2786) |
| 930 | 933 | * |
| 931 | 934 | * @uses checked() To display the checked attribute |
| 932 | 935 | */ |
| … |
… |
function bbp_admin_setting_callback_show_on_root() { |
| 963 | 966 | /** |
| 964 | 967 | * Slugs settings section description for the settings page |
| 965 | 968 | * |
| 966 | | * @since bbPress (r2786) |
| | 969 | * @since 2.0.0 bbPress (r2786) |
| 967 | 970 | */ |
| 968 | 971 | function bbp_admin_setting_callback_user_slug_section() { |
| 969 | 972 | ?> |
| … |
… |
function bbp_admin_setting_callback_user_slug_section() { |
| 976 | 979 | /** |
| 977 | 980 | * User slug setting field |
| 978 | 981 | * |
| 979 | | * @since bbPress (r2786) |
| | 982 | * @since 2.0.0 bbPress (r2786) |
| 980 | 983 | * |
| 981 | 984 | * @uses bbp_form_option() To output the option value |
| 982 | 985 | */ |
| … |
… |
function bbp_admin_setting_callback_user_slug() { |
| 993 | 996 | /** |
| 994 | 997 | * Topic archive slug setting field |
| 995 | 998 | * |
| 996 | | * @since bbPress (r2786) |
| | 999 | * @since 2.0.0 bbPress (r2786) |
| 997 | 1000 | * |
| 998 | 1001 | * @uses bbp_form_option() To output the option value |
| 999 | 1002 | */ |
| … |
… |
function bbp_admin_setting_callback_topic_archive_slug() { |
| 1010 | 1013 | /** |
| 1011 | 1014 | * Reply archive slug setting field |
| 1012 | 1015 | * |
| 1013 | | * @since bbPress (r4932) |
| | 1016 | * @since 2.4.0 bbPress (r4932) |
| 1014 | 1017 | * |
| 1015 | 1018 | * @uses bbp_form_option() To output the option value |
| 1016 | 1019 | */ |
| … |
… |
function bbp_admin_setting_callback_reply_archive_slug() { |
| 1027 | 1030 | /** |
| 1028 | 1031 | * Favorites slug setting field |
| 1029 | 1032 | * |
| 1030 | | * @since bbPress (r4932) |
| | 1033 | * @since 2.4.0 bbPress (r4932) |
| 1031 | 1034 | * |
| 1032 | 1035 | * @uses bbp_form_option() To output the option value |
| 1033 | 1036 | */ |
| … |
… |
function bbp_admin_setting_callback_user_favs_slug() { |
| 1044 | 1047 | /** |
| 1045 | 1048 | * Favorites slug setting field |
| 1046 | 1049 | * |
| 1047 | | * @since bbPress (r4932) |
| | 1050 | * @since 2.4.0 bbPress (r4932) |
| 1048 | 1051 | * |
| 1049 | 1052 | * @uses bbp_form_option() To output the option value |
| 1050 | 1053 | */ |
| … |
… |
function bbp_admin_setting_callback_user_subs_slug() { |
| 1063 | 1066 | /** |
| 1064 | 1067 | * Slugs settings section description for the settings page |
| 1065 | 1068 | * |
| 1066 | | * @since bbPress (r2786) |
| | 1069 | * @since 2.0.0 bbPress (r2786) |
| 1067 | 1070 | */ |
| 1068 | 1071 | function bbp_admin_setting_callback_single_slug_section() { |
| 1069 | 1072 | ?> |
| … |
… |
function bbp_admin_setting_callback_single_slug_section() { |
| 1076 | 1079 | /** |
| 1077 | 1080 | * Forum slug setting field |
| 1078 | 1081 | * |
| 1079 | | * @since bbPress (r2786) |
| | 1082 | * @since 2.0.0 bbPress (r2786) |
| 1080 | 1083 | * |
| 1081 | 1084 | * @uses bbp_form_option() To output the option value |
| 1082 | 1085 | */ |
| … |
… |
function bbp_admin_setting_callback_forum_slug() { |
| 1093 | 1096 | /** |
| 1094 | 1097 | * Topic slug setting field |
| 1095 | 1098 | * |
| 1096 | | * @since bbPress (r2786) |
| | 1099 | * @since 2.0.0 bbPress (r2786) |
| 1097 | 1100 | * |
| 1098 | 1101 | * @uses bbp_form_option() To output the option value |
| 1099 | 1102 | */ |
| … |
… |
function bbp_admin_setting_callback_topic_slug() { |
| 1110 | 1113 | /** |
| 1111 | 1114 | * Reply slug setting field |
| 1112 | 1115 | * |
| 1113 | | * @since bbPress (r2786) |
| | 1116 | * @since 2.0.0 bbPress (r2786) |
| 1114 | 1117 | * |
| 1115 | 1118 | * @uses bbp_form_option() To output the option value |
| 1116 | 1119 | */ |
| … |
… |
function bbp_admin_setting_callback_reply_slug() { |
| 1127 | 1130 | /** |
| 1128 | 1131 | * Topic tag slug setting field |
| 1129 | 1132 | * |
| 1130 | | * @since bbPress (r2786) |
| | 1133 | * @since 2.0.0 bbPress (r2786) |
| 1131 | 1134 | * |
| 1132 | 1135 | * @uses bbp_form_option() To output the option value |
| 1133 | 1136 | */ |
| … |
… |
function bbp_admin_setting_callback_topic_tag_slug() { |
| 1145 | 1148 | /** |
| 1146 | 1149 | * View slug setting field |
| 1147 | 1150 | * |
| 1148 | | * @since bbPress (r2789) |
| | 1151 | * @since 2.0.0 bbPress (r2789) |
| 1149 | 1152 | * |
| 1150 | 1153 | * @uses bbp_form_option() To output the option value |
| 1151 | 1154 | */ |
| … |
… |
function bbp_admin_setting_callback_view_slug() { |
| 1162 | 1165 | /** |
| 1163 | 1166 | * Search slug setting field |
| 1164 | 1167 | * |
| 1165 | | * @since bbPress (r4579) |
| | 1168 | * @since 2.3.0 bbPress (r4579) |
| 1166 | 1169 | * |
| 1167 | 1170 | * @uses bbp_form_option() To output the option value |
| 1168 | 1171 | */ |
| … |
… |
function bbp_admin_setting_callback_search_slug() { |
| 1181 | 1184 | /** |
| 1182 | 1185 | * Extension settings section description for the settings page |
| 1183 | 1186 | * |
| 1184 | | * @since bbPress (r3575) |
| | 1187 | * @since 2.1.0 bbPress (r3575) |
| 1185 | 1188 | */ |
| 1186 | 1189 | function bbp_admin_setting_callback_buddypress_section() { |
| 1187 | 1190 | ?> |
| … |
… |
function bbp_admin_setting_callback_buddypress_section() { |
| 1194 | 1197 | /** |
| 1195 | 1198 | * Allow BuddyPress group forums setting field |
| 1196 | 1199 | * |
| 1197 | | * @since bbPress (r3575) |
| | 1200 | * @since 2.1.0 bbPress (r3575) |
| 1198 | 1201 | * |
| 1199 | 1202 | * @uses checked() To display the checked attribute |
| 1200 | 1203 | */ |
| … |
… |
function bbp_admin_setting_callback_group_forums() { |
| 1210 | 1213 | /** |
| 1211 | 1214 | * Replies per page setting field |
| 1212 | 1215 | * |
| 1213 | | * @since bbPress (r3575) |
| | 1216 | * @since 2.1.0 bbPress (r3575) |
| 1214 | 1217 | * |
| 1215 | 1218 | * @uses bbp_form_option() To output the option value |
| 1216 | 1219 | */ |
| … |
… |
function bbp_admin_setting_callback_group_forums_root_id() { |
| 1238 | 1241 | /** |
| 1239 | 1242 | * Extension settings section description for the settings page |
| 1240 | 1243 | * |
| 1241 | | * @since bbPress (r3575) |
| | 1244 | * @since 2.1.0 bbPress (r3575) |
| 1242 | 1245 | */ |
| 1243 | 1246 | function bbp_admin_setting_callback_akismet_section() { |
| 1244 | 1247 | ?> |
| … |
… |
function bbp_admin_setting_callback_akismet_section() { |
| 1252 | 1255 | /** |
| 1253 | 1256 | * Allow Akismet setting field |
| 1254 | 1257 | * |
| 1255 | | * @since bbPress (r3575) |
| | 1258 | * @since 2.1.0 bbPress (r3575) |
| 1256 | 1259 | * |
| 1257 | 1260 | * @uses checked() To display the checked attribute |
| 1258 | 1261 | */ |
| … |
… |
function bbp_admin_setting_callback_akismet() { |
| 1270 | 1273 | /** |
| 1271 | 1274 | * The main settings page |
| 1272 | 1275 | * |
| 1273 | | * @since bbPress (r2643) |
| | 1276 | * @since 2.0.0 bbPress (r2643) |
| 1274 | 1277 | * |
| 1275 | 1278 | * @uses settings_fields() To output the hidden fields for the form |
| 1276 | 1279 | * @uses do_settings_sections() To output the settings sections |
| … |
… |
function bbp_admin_settings() { |
| 1303 | 1306 | /** |
| 1304 | 1307 | * Main settings section description for the settings page |
| 1305 | 1308 | * |
| 1306 | | * @since bbPress (r3813) |
| | 1309 | * @since 2.1.0 bbPress (r3813) |
| 1307 | 1310 | */ |
| 1308 | 1311 | function bbp_converter_setting_callback_main_section() { |
| 1309 | 1312 | ?> |
| … |
… |
function bbp_converter_setting_callback_main_section() { |
| 1316 | 1319 | /** |
| 1317 | 1320 | * Edit Platform setting field |
| 1318 | 1321 | * |
| 1319 | | * @since bbPress (r3813) |
| | 1322 | * @since 2.1.0 bbPress (r3813) |
| 1320 | 1323 | */ |
| 1321 | 1324 | function bbp_converter_setting_callback_platform() { |
| 1322 | 1325 | |
| … |
… |
function bbp_converter_setting_callback_platform() { |
| 1347 | 1350 | /** |
| 1348 | 1351 | * Edit Database Server setting field |
| 1349 | 1352 | * |
| 1350 | | * @since bbPress (r3813) |
| | 1353 | * @since 2.1.0 bbPress (r3813) |
| 1351 | 1354 | */ |
| 1352 | 1355 | function bbp_converter_setting_callback_dbserver() { |
| 1353 | 1356 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbserver() { |
| 1361 | 1364 | /** |
| 1362 | 1365 | * Edit Database Server Port setting field |
| 1363 | 1366 | * |
| 1364 | | * @since bbPress (r3813) |
| | 1367 | * @since 2.1.0 bbPress (r3813) |
| 1365 | 1368 | */ |
| 1366 | 1369 | function bbp_converter_setting_callback_dbport() { |
| 1367 | 1370 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbport() { |
| 1375 | 1378 | /** |
| 1376 | 1379 | * Edit Database User setting field |
| 1377 | 1380 | * |
| 1378 | | * @since bbPress (r3813) |
| | 1381 | * @since 2.1.0 bbPress (r3813) |
| 1379 | 1382 | */ |
| 1380 | 1383 | function bbp_converter_setting_callback_dbuser() { |
| 1381 | 1384 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbuser() { |
| 1389 | 1392 | /** |
| 1390 | 1393 | * Edit Database Pass setting field |
| 1391 | 1394 | * |
| 1392 | | * @since bbPress (r3813) |
| | 1395 | * @since 2.1.0 bbPress (r3813) |
| 1393 | 1396 | */ |
| 1394 | 1397 | function bbp_converter_setting_callback_dbpass() { |
| 1395 | 1398 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbpass() { |
| 1403 | 1406 | /** |
| 1404 | 1407 | * Edit Database Name setting field |
| 1405 | 1408 | * |
| 1406 | | * @since bbPress (r3813) |
| | 1409 | * @since 2.1.0 bbPress (r3813) |
| 1407 | 1410 | */ |
| 1408 | 1411 | function bbp_converter_setting_callback_dbname() { |
| 1409 | 1412 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbname() { |
| 1417 | 1420 | /** |
| 1418 | 1421 | * Main settings section description for the settings page |
| 1419 | 1422 | * |
| 1420 | | * @since bbPress (r3813) |
| | 1423 | * @since 2.1.0 bbPress (r3813) |
| 1421 | 1424 | */ |
| 1422 | 1425 | function bbp_converter_setting_callback_options_section() { |
| 1423 | 1426 | ?> |
| … |
… |
function bbp_converter_setting_callback_options_section() { |
| 1430 | 1433 | /** |
| 1431 | 1434 | * Edit Table Prefix setting field |
| 1432 | 1435 | * |
| 1433 | | * @since bbPress (r3813) |
| | 1436 | * @since 2.1.0 bbPress (r3813) |
| 1434 | 1437 | */ |
| 1435 | 1438 | function bbp_converter_setting_callback_dbprefix() { |
| 1436 | 1439 | ?> |
| … |
… |
function bbp_converter_setting_callback_dbprefix() { |
| 1444 | 1447 | /** |
| 1445 | 1448 | * Edit Rows Limit setting field |
| 1446 | 1449 | * |
| 1447 | | * @since bbPress (r3813) |
| | 1450 | * @since 2.1.0 bbPress (r3813) |
| 1448 | 1451 | */ |
| 1449 | 1452 | function bbp_converter_setting_callback_rows() { |
| 1450 | 1453 | ?> |
| … |
… |
function bbp_converter_setting_callback_rows() { |
| 1459 | 1462 | /** |
| 1460 | 1463 | * Edit Delay Time setting field |
| 1461 | 1464 | * |
| 1462 | | * @since bbPress (r3813) |
| | 1465 | * @since 2.1.0 bbPress (r3813) |
| 1463 | 1466 | */ |
| 1464 | 1467 | function bbp_converter_setting_callback_delay_time() { |
| 1465 | 1468 | ?> |
| … |
… |
function bbp_converter_setting_callback_delay_time() { |
| 1474 | 1477 | /** |
| 1475 | 1478 | * Edit Restart setting field |
| 1476 | 1479 | * |
| 1477 | | * @since bbPress (r3813) |
| | 1480 | * @since 2.1.0 bbPress (r3813) |
| 1478 | 1481 | */ |
| 1479 | 1482 | function bbp_converter_setting_callback_restart() { |
| 1480 | 1483 | ?> |
| … |
… |
function bbp_converter_setting_callback_restart() { |
| 1489 | 1492 | /** |
| 1490 | 1493 | * Edit Clean setting field |
| 1491 | 1494 | * |
| 1492 | | * @since bbPress (r3813) |
| | 1495 | * @since 2.1.0 bbPress (r3813) |
| 1493 | 1496 | */ |
| 1494 | 1497 | function bbp_converter_setting_callback_clean() { |
| 1495 | 1498 | ?> |
| … |
… |
function bbp_converter_setting_callback_clean() { |
| 1504 | 1507 | /** |
| 1505 | 1508 | * Edit Convert Users setting field |
| 1506 | 1509 | * |
| 1507 | | * @since bbPress (r3813) |
| | 1510 | * @since 2.1.0 bbPress (r3813) |
| 1508 | 1511 | */ |
| 1509 | 1512 | function bbp_converter_setting_callback_convert_users() { |
| 1510 | 1513 | ?> |
| … |
… |
function bbp_converter_settings() { |
| 1555 | 1558 | /** |
| 1556 | 1559 | * Contextual help for Forums settings page |
| 1557 | 1560 | * |
| 1558 | | * @since bbPress (r3119) |
| | 1561 | * @since 2.0.0 bbPress (r3119) |
| | 1562 | * |
| 1559 | 1563 | * @uses get_current_screen() |
| 1560 | 1564 | */ |
| 1561 | 1565 | function bbp_admin_settings_help() { |
| … |
… |
function bbp_admin_settings_help() { |
| 1626 | 1630 | * Disable a settings field if the value is forcibly set in bbPress's global |
| 1627 | 1631 | * options array. |
| 1628 | 1632 | * |
| 1629 | | * @since bbPress (r4347) |
| | 1633 | * @since 2.2.0 bbPress (r4347) |
| 1630 | 1634 | * |
| 1631 | 1635 | * @param string $option_key |
| 1632 | 1636 | */ |
| … |
… |
function bbp_maybe_admin_setting_disabled( $option_key = '' ) { |
| 1637 | 1641 | /** |
| 1638 | 1642 | * Output settings API option |
| 1639 | 1643 | * |
| 1640 | | * @since bbPress (r3203) |
| | 1644 | * @since 2.0.0 bbPress (r3203) |
| 1641 | 1645 | * |
| 1642 | 1646 | * @uses bbp_get_bbp_form_option() |
| 1643 | 1647 | * |
| … |
… |
function bbp_form_option( $option, $default = '' , $slug = false ) { |
| 1651 | 1655 | /** |
| 1652 | 1656 | * Return settings API option |
| 1653 | 1657 | * |
| 1654 | | * @since bbPress (r3203) |
| | 1658 | * @since 2.0.0 bbPress (r3203) |
| 1655 | 1659 | * |
| 1656 | 1660 | * @uses get_option() |
| 1657 | 1661 | * @uses esc_attr() |
| … |
… |
function bbp_form_option( $option, $default = '' , $slug = false ) { |
| 1687 | 1691 | /** |
| 1688 | 1692 | * Used to check if a bbPress slug conflicts with an existing known slug. |
| 1689 | 1693 | * |
| 1690 | | * @since bbPress (r3306) |
| | 1694 | * @since 2.0.0 bbPress (r3306) |
| 1691 | 1695 | * |
| 1692 | 1696 | * @param string $slug |
| 1693 | 1697 | * @param string $default |
-
diff --git src/includes/admin/tools.php src/includes/admin/tools.php
index 5190542..6a22130 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Admin repair page |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2613) Converted from bbPress 1.2 |
| 19 | | * @since bbPress (r5885) Upgraded to list-table UI |
| | 18 | * @since 2.0.0 bbPress (r2613) Converted from bbPress 1.2 |
| | 19 | * @since 2.6.0 bbPress (r5885) Upgraded to list-table UI |
| 20 | 20 | * |
| 21 | 21 | * @todo Use a real list table |
| 22 | 22 | * |
| … |
… |
function bbp_admin_repair() { |
| 162 | 162 | /** |
| 163 | 163 | * Handle the processing and feedback of the admin tools page |
| 164 | 164 | * |
| 165 | | * @since bbPress (r2613) |
| | 165 | * @since 2.0.0 bbPress (r2613) |
| 166 | 166 | * |
| 167 | 167 | * @uses bbp_admin_repair_list() To get the recount list |
| 168 | 168 | * @uses check_admin_referer() To verify the nonce and the referer |
| … |
… |
function bbp_admin_repair_handler() { |
| 222 | 222 | /** |
| 223 | 223 | * Output the URL to run a specific repair tool |
| 224 | 224 | * |
| 225 | | * @since bbPress (r5885) |
| | 225 | * @since 2.6.0 bbPress (r5885) |
| 226 | 226 | * |
| 227 | 227 | * @param string $component |
| 228 | 228 | */ |
| … |
… |
function bbp_admin_repair_tool_run_url( $component = '' ) { |
| 233 | 233 | /** |
| 234 | 234 | * Return the URL to run a specific repair tool |
| 235 | 235 | * |
| 236 | | * @since bbPress (r5885) |
| | 236 | * @since 2.6.0 bbPress (r5885) |
| 237 | 237 | * |
| 238 | 238 | * @param string $component |
| 239 | 239 | */ |
| … |
… |
function bbp_get_admin_repair_tool_run_url( $component = '' ) { |
| 249 | 249 | /** |
| 250 | 250 | * Contextual help for Repair Forums tools page |
| 251 | 251 | * |
| 252 | | * @since bbPress (r5314) |
| | 252 | * @since 2.6.0 bbPress (r5314) |
| | 253 | * |
| 253 | 254 | * @uses get_current_screen() |
| 254 | 255 | */ |
| 255 | 256 | |
| … |
… |
function bbp_admin_tools_repair_help() { |
| 287 | 288 | /** |
| 288 | 289 | * Contextual help for Reset Forums tools page |
| 289 | 290 | * |
| 290 | | * @since bbPress (r5314) |
| | 291 | * @since 2.6.0 bbPress (r5314) |
| | 292 | * |
| 291 | 293 | * @uses get_current_screen() |
| 292 | 294 | */ |
| 293 | 295 | |
| … |
… |
function bbp_admin_tools_reset_help() { |
| 318 | 320 | /** |
| 319 | 321 | * Contextual help for Import Forums tools page |
| 320 | 322 | * |
| 321 | | * @since bbPress (r5314) |
| | 323 | * @since 2.6.0 bbPress (r5314) |
| | 324 | * |
| 322 | 325 | * @uses get_current_screen() |
| 323 | 326 | */ |
| 324 | 327 | |
| … |
… |
function bbp_admin_tools_converter_help() { |
| 377 | 380 | /** |
| 378 | 381 | * Assemble the admin notices |
| 379 | 382 | * |
| 380 | | * @since bbPress (r2613) |
| | 383 | * @since 2.0.0 bbPress (r2613) |
| 381 | 384 | * |
| 382 | 385 | * @param string|WP_Error $message A message to be displayed or {@link WP_Error} |
| 383 | 386 | * @param string $class Optional. A class to be added to the message div |
| … |
… |
function bbp_admin_tools_feedback( $message, $class = false ) { |
| 431 | 434 | /** |
| 432 | 435 | * Register an admin area repair tool |
| 433 | 436 | * |
| 434 | | * @since bbPress (r5885) |
| | 437 | * @since 2.6.0 bbPress (r5885) |
| 435 | 438 | * |
| 436 | 439 | * @param array $args |
| 437 | 440 | * @return |
| … |
… |
function bbp_register_repair_tool( $args = array() ) { |
| 474 | 477 | /** |
| 475 | 478 | * Register the default repair tools |
| 476 | 479 | * |
| 477 | | * @since bbPress (r5885) |
| | 480 | * @since 2.6.0 bbPress (r5885) |
| 478 | 481 | */ |
| 479 | 482 | function bbp_register_default_repair_tools() { |
| 480 | 483 | |
| … |
… |
function bbp_register_default_repair_tools() { |
| 672 | 675 | /** |
| 673 | 676 | * Get the array of available repair tools |
| 674 | 677 | * |
| 675 | | * @since bbPress (r5885) |
| | 678 | * @since 2.6.0 bbPress (r5885) |
| 676 | 679 | * |
| 677 | 680 | * @return array |
| 678 | 681 | */ |
| … |
… |
function bbp_get_admin_repair_tool_registered_components() { |
| 706 | 709 | /** |
| 707 | 710 | * Output the repair list search form |
| 708 | 711 | * |
| 709 | | * @since bbPress (r5885) |
| | 712 | * @since 2.6.0 bbPress (r5885) |
| 710 | 713 | */ |
| 711 | 714 | function bbp_admin_repair_list_search_form() { |
| 712 | 715 | ?> |
| … |
… |
function bbp_admin_repair_list_components_filter() { |
| 747 | 750 | /** |
| 748 | 751 | * Maybe translate a repair tool component name |
| 749 | 752 | * |
| 750 | | * @since bbPress (r5885) |
| | 753 | * @since 2.6.0 bbPress (r5885) |
| 751 | 754 | * |
| 752 | 755 | * @param string $component |
| 753 | 756 | * @return string |
| … |
… |
function bbp_admin_repair_tool_translate_component( $component = '' ) { |
| 779 | 782 | /** |
| 780 | 783 | * Get the array of the repair list |
| 781 | 784 | * |
| 782 | | * @since bbPress (r2613) |
| | 785 | * @since 2.0.0 bbPress (r2613) |
| 783 | 786 | * |
| 784 | 787 | * @uses apply_filters() Calls 'bbp_repair_list' with the list array |
| 785 | 788 | * @return array Repair list of options |
| … |
… |
function bbp_admin_repair_list() { |
| 836 | 839 | /** |
| 837 | 840 | * Get filter links for components for a specific admir repair tool |
| 838 | 841 | * |
| 839 | | * @since bbPress (r5885) |
| | 842 | * @since 2.6.0 bbPress (r5885) |
| 840 | 843 | * |
| 841 | 844 | * @param array $item |
| 842 | 845 | * @return array |
| … |
… |
function bbp_admin_repair_tool_overhead_filters( $args = array() ) { |
| 868 | 871 | /** |
| 869 | 872 | * Get filter links for components for a specific admir repair tool |
| 870 | 873 | * |
| 871 | | * @since bbPress (r5885) |
| | 874 | * @since 2.6.0 bbPress (r5885) |
| 872 | 875 | * |
| 873 | 876 | * @param array $args |
| 874 | 877 | * @return array |
| … |
… |
function bbp_get_admin_repair_tool_overhead_filters( $args = array() ) { |
| 951 | 954 | /** |
| 952 | 955 | * Recount topic replies |
| 953 | 956 | * |
| 954 | | * @since bbPress (r2613) |
| | 957 | * @since 2.0.0 bbPress (r2613) |
| 955 | 958 | * |
| 956 | 959 | * @uses wpdb::query() To run our recount sql queries |
| 957 | 960 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_topic_reply_count() { |
| 1006 | 1009 | /** |
| 1007 | 1010 | * Recount topic voices |
| 1008 | 1011 | * |
| 1009 | | * @since bbPress (r2613) |
| | 1012 | * @since 2.0.0 bbPress (r2613) |
| 1010 | 1013 | * |
| 1011 | 1014 | * @uses wpdb::query() To run our recount sql queries |
| 1012 | 1015 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_topic_voice_count() { |
| 1055 | 1058 | /** |
| 1056 | 1059 | * Recount topic hidden replies (spammed/trashed) |
| 1057 | 1060 | * |
| 1058 | | * @since bbPress (r2747) |
| | 1061 | * @since 2.0.0 bbPress (r2747) |
| 1059 | 1062 | * |
| 1060 | 1063 | * @uses wpdb::query() To run our recount sql queries |
| 1061 | 1064 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_topic_hidden_reply_count() { |
| 1094 | 1097 | /** |
| 1095 | 1098 | * Repair group forum ID mappings after a bbPress 1.1 to bbPress 2.2 conversion |
| 1096 | 1099 | * |
| 1097 | | * @since bbPress (r4395) |
| | 1100 | * @since 2.2.0 bbPress (r4395) |
| 1098 | 1101 | * |
| 1099 | 1102 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 1100 | 1103 | * @return If a wp_error() occurs and no converted forums are found |
| … |
… |
function bbp_admin_repair_group_forum_relationship() { |
| 1231 | 1234 | /** |
| 1232 | 1235 | * Recount forum topics |
| 1233 | 1236 | * |
| 1234 | | * @since bbPress (r2613) |
| | 1237 | * @since 2.0.0 bbPress (r2613) |
| 1235 | 1238 | * |
| 1236 | 1239 | * @uses wpdb::query() To run our recount sql queries |
| 1237 | 1240 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_forum_topic_count() { |
| 1268 | 1271 | /** |
| 1269 | 1272 | * Recount forum replies |
| 1270 | 1273 | * |
| 1271 | | * @since bbPress (r2613) |
| | 1274 | * @since 2.0.0 bbPress (r2613) |
| 1272 | 1275 | * |
| 1273 | 1276 | * @uses wpdb::query() To run our recount sql queries |
| 1274 | 1277 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_forum_reply_count() { |
| 1314 | 1317 | /** |
| 1315 | 1318 | * Recount topics by the users |
| 1316 | 1319 | * |
| 1317 | | * @since bbPress (r3889) |
| | 1320 | * @since 2.1.0 bbPress (r3889) |
| 1318 | 1321 | * |
| 1319 | 1322 | * @uses bbp_get_topic_post_type() To get the topic post type |
| 1320 | 1323 | * @uses bbp_get_public_status_id() To get the public status id |
| … |
… |
function bbp_admin_repair_user_topic_count() { |
| 1366 | 1369 | /** |
| 1367 | 1370 | * Recount topic replied by the users |
| 1368 | 1371 | * |
| 1369 | | * @since bbPress (r2613) |
| | 1372 | * @since 2.0.0 bbPress (r2613) |
| 1370 | 1373 | * |
| 1371 | 1374 | * @uses bbp_get_reply_post_type() To get the reply post type |
| 1372 | 1375 | * @uses bbp_get_public_status_id() To get the public status id |
| … |
… |
function bbp_admin_repair_user_reply_count() { |
| 1418 | 1421 | /** |
| 1419 | 1422 | * Clean the users' favorites |
| 1420 | 1423 | * |
| 1421 | | * @since bbPress (r2613) |
| | 1424 | * @since 2.0.0 bbPress (r2613) |
| 1422 | 1425 | * |
| 1423 | 1426 | * @uses wpdb::query() To run our recount sql queries |
| 1424 | 1427 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_user_favorites() { |
| 1488 | 1491 | /** |
| 1489 | 1492 | * Clean the users' topic subscriptions |
| 1490 | 1493 | * |
| 1491 | | * @since bbPress (r2668) |
| | 1494 | * @since 2.0.0 bbPress (r2668) |
| 1492 | 1495 | * |
| 1493 | 1496 | * @uses wpdb::query() To run our recount sql queries |
| 1494 | 1497 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_user_topic_subscriptions() { |
| 1557 | 1560 | /** |
| 1558 | 1561 | * Clean the users' forum subscriptions |
| 1559 | 1562 | * |
| 1560 | | * @since bbPress (r5155) |
| | 1563 | * @since 2.5.0 bbPress (r5155) |
| 1561 | 1564 | * |
| 1562 | 1565 | * @uses wpdb::query() To run our recount sql queries |
| 1563 | 1566 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_user_forum_subscriptions() { |
| 1628 | 1631 | * forums role. By default, Admins will be Key Masters, and every other role |
| 1629 | 1632 | * will be the default role defined in Settings > Forums (Participant). |
| 1630 | 1633 | * |
| 1631 | | * @since bbPress (r4340) |
| | 1634 | * @since 2.2.0 bbPress (r4340) |
| 1632 | 1635 | * |
| 1633 | 1636 | * @uses bbp_get_user_role_map() To get the map of user roles |
| 1634 | 1637 | * @uses bbp_get_default_role() To get the default bbPress user role |
| … |
… |
function bbp_admin_repair_user_roles() { |
| 1685 | 1688 | /** |
| 1686 | 1689 | * Recaches the last post in every topic and forum |
| 1687 | 1690 | * |
| 1688 | | * @since bbPress (r3040) |
| | 1691 | * @since 2.0.0 bbPress (r3040) |
| 1689 | 1692 | * |
| 1690 | 1693 | * @uses wpdb::query() To run our recount sql queries |
| 1691 | 1694 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_freshness() { |
| 1814 | 1817 | /** |
| 1815 | 1818 | * Repairs the relationship of sticky topics to the actual parent forum |
| 1816 | 1819 | * |
| 1817 | | * @since bbPress (r4695) |
| | 1820 | * @since 2.3.0 bbPress (r4695) |
| 1818 | 1821 | * |
| 1819 | 1822 | * @uses wpdb::get_col() To run our recount sql queries |
| 1820 | 1823 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_sticky() { |
| 1884 | 1887 | * had imported forums from another forum package previous to bbPress v2.6, |
| 1885 | 1888 | * https://bbpress.trac.wordpress.org/ticket/2577 |
| 1886 | 1889 | * |
| 1887 | | * @since bbPress (r5668) |
| | 1890 | * @since 2.6.0 bbPress (r5668) |
| 1888 | 1891 | * |
| 1889 | 1892 | * @uses wpdb::get_col() To run our recount sql queries |
| 1890 | 1893 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_closed_topics() { |
| 1933 | 1936 | /** |
| 1934 | 1937 | * Recaches the private and hidden forums |
| 1935 | 1938 | * |
| 1936 | | * @since bbPress (r4104) |
| | 1939 | * @since 2.2.0 bbPress (r4104) |
| 1937 | 1940 | * |
| 1938 | 1941 | * @uses bbp_repair_forum_visibility() To update private and hidden forum ids |
| 1939 | 1942 | * @return array An array of the status code and the message |
| … |
… |
function bbp_admin_repair_forum_visibility() { |
| 1954 | 1957 | /** |
| 1955 | 1958 | * Recaches the parent forum meta for each topic and reply |
| 1956 | 1959 | * |
| 1957 | | * @since bbPress (r3876) |
| | 1960 | * @since 2.1.0 bbPress (r3876) |
| 1958 | 1961 | * |
| 1959 | 1962 | * @uses wpdb::query() To run our recount sql queries |
| 1960 | 1963 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_forum_meta() { |
| 2009 | 2012 | /** |
| 2010 | 2013 | * Recaches the topic for each post |
| 2011 | 2014 | * |
| 2012 | | * @since bbPress (r3876) |
| | 2015 | * @since 2.1.0 bbPress (r3876) |
| 2013 | 2016 | * |
| 2014 | 2017 | * @uses wpdb::query() To run our recount sql queries |
| 2015 | 2018 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_topic_meta() { |
| 2064 | 2067 | /** |
| 2065 | 2068 | * Recalculate reply menu order |
| 2066 | 2069 | * |
| 2067 | | * @since bbPress (r5367) |
| | 2070 | * @since 2.5.4 bbPress (r5367) |
| 2068 | 2071 | * |
| 2069 | 2072 | * @uses wpdb::query() To run our recount sql queries |
| 2070 | 2073 | * @uses is_wp_error() To check if the executed query returned {@link WP_Error} |
| … |
… |
function bbp_admin_repair_reply_menu_order() { |
| 2123 | 2126 | /** |
| 2124 | 2127 | * Admin reset page |
| 2125 | 2128 | * |
| 2126 | | * @since bbPress (r2613) |
| | 2129 | * @since 2.0.0 bbPress (r2613) |
| 2127 | 2130 | * |
| 2128 | 2131 | * @uses check_admin_referer() To verify the nonce and the referer |
| 2129 | 2132 | * @uses do_action() Calls 'admin_notices' to display the notices |
| … |
… |
function bbp_admin_reset() { |
| 2190 | 2193 | /** |
| 2191 | 2194 | * Handle the processing and feedback of the admin tools page |
| 2192 | 2195 | * |
| 2193 | | * @since bbPress (r2613) |
| | 2196 | * @since 2.0.0 bbPress (r2613) |
| 2194 | 2197 | * |
| 2195 | 2198 | * @uses check_admin_referer() To verify the nonce and the referer |
| 2196 | 2199 | * @uses wp_cache_flush() To flush the cache |
-
diff --git src/includes/admin/topics.php src/includes/admin/topics.php
index d515db0..d9c327c 100644
|
|
|
if ( !class_exists( 'BBP_Topics_Admin' ) ) : |
| 16 | 16 | * |
| 17 | 17 | * @package bbPress |
| 18 | 18 | * @subpackage Administration |
| 19 | | * @since bbPress (r2464) |
| | 19 | * @since 2.0.0 bbPress (r2464) |
| 20 | 20 | */ |
| 21 | 21 | class BBP_Topics_Admin { |
| 22 | 22 | |
| … |
… |
class BBP_Topics_Admin { |
| 32 | 32 | /** |
| 33 | 33 | * The main bbPress topics admin loader |
| 34 | 34 | * |
| 35 | | * @since bbPress (r2515) |
| | 35 | * @since 2.0.0 bbPress (r2515) |
| 36 | 36 | * |
| 37 | 37 | * @uses BBP_Topics_Admin::setup_globals() Setup the globals needed |
| 38 | 38 | * @uses BBP_Topics_Admin::setup_actions() Setup the hooks and actions |
| … |
… |
class BBP_Topics_Admin { |
| 46 | 46 | /** |
| 47 | 47 | * Setup the admin hooks, actions and filters |
| 48 | 48 | * |
| 49 | | * @since bbPress (r2646) |
| | 49 | * @since 2.0.0 bbPress (r2646) |
| | 50 | * |
| 50 | 51 | * @access private |
| 51 | 52 | * |
| 52 | 53 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Topics_Admin { |
| 95 | 96 | /** |
| 96 | 97 | * Should we bail out of this method? |
| 97 | 98 | * |
| 98 | | * @since bbPress (r4067) |
| | 99 | * @since 2.1.0 bbPress (r4067) |
| | 100 | * |
| 99 | 101 | * @return boolean |
| 100 | 102 | */ |
| 101 | 103 | private function bail() { |
| … |
… |
class BBP_Topics_Admin { |
| 109 | 111 | /** |
| 110 | 112 | * Admin globals |
| 111 | 113 | * |
| 112 | | * @since bbPress (r2646) |
| | 114 | * @since 2.0.0 bbPress (r2646) |
| | 115 | * |
| 113 | 116 | * @access private |
| 114 | 117 | */ |
| 115 | 118 | private function setup_globals() { |
| … |
… |
class BBP_Topics_Admin { |
| 121 | 124 | /** |
| 122 | 125 | * Contextual help for bbPress topic edit page |
| 123 | 126 | * |
| 124 | | * @since bbPress (r3119) |
| | 127 | * @since 2.0.0 bbPress (r3119) |
| | 128 | * |
| 125 | 129 | * @uses get_current_screen() |
| 126 | 130 | */ |
| 127 | 131 | public function edit_help() { |
| … |
… |
class BBP_Topics_Admin { |
| 190 | 194 | /** |
| 191 | 195 | * Contextual help for bbPress topic edit page |
| 192 | 196 | * |
| 193 | | * @since bbPress (r3119) |
| | 197 | * @since 2.0.0 bbPress (r3119) |
| | 198 | * |
| 194 | 199 | * @uses get_current_screen() |
| 195 | 200 | */ |
| 196 | 201 | public function new_help() { |
| … |
… |
class BBP_Topics_Admin { |
| 248 | 253 | /** |
| 249 | 254 | * Add the topic attributes metabox |
| 250 | 255 | * |
| 251 | | * @since bbPress (r2744) |
| | 256 | * @since 2.0.0 bbPress (r2744) |
| 252 | 257 | * |
| 253 | 258 | * @uses bbp_get_topic_post_type() To get the topic post type |
| 254 | 259 | * @uses add_meta_box() To add the metabox |
| … |
… |
class BBP_Topics_Admin { |
| 275 | 280 | /** |
| 276 | 281 | * Pass the topic attributes for processing |
| 277 | 282 | * |
| 278 | | * @since bbPress (r2746) |
| | 283 | * @since 2.0.0 bbPress (r2746) |
| 279 | 284 | * |
| 280 | 285 | * @param int $topic_id Topic id |
| 281 | 286 | * @uses current_user_can() To check if the current user is capable of |
| … |
… |
class BBP_Topics_Admin { |
| 355 | 360 | /** |
| 356 | 361 | * Add the author info metabox |
| 357 | 362 | * |
| 358 | | * @since bbPress (r2828) |
| | 363 | * @since 2.0.0 bbPress (r2828) |
| 359 | 364 | * |
| 360 | 365 | * @uses bbp_get_topic() To get the topic |
| 361 | 366 | * @uses bbp_get_reply() To get the reply |
| … |
… |
class BBP_Topics_Admin { |
| 395 | 400 | * Allows viewing & moderating of replies to a topic, based on the way |
| 396 | 401 | * comments are visible on a blog post. |
| 397 | 402 | * |
| 398 | | * @since bbPress (r5886) |
| | 403 | * @since 2.6.0 bbPress (r5886) |
| 399 | 404 | * |
| 400 | 405 | * @uses bbp_get_topic() To get the topic |
| 401 | 406 | * @uses bbp_get_reply() To get the reply |
| … |
… |
class BBP_Topics_Admin { |
| 432 | 437 | /** |
| 433 | 438 | * Add some general styling to the admin area |
| 434 | 439 | * |
| 435 | | * @since bbPress (r2464) |
| | 440 | * @since 2.0.0 bbPress (r2464) |
| 436 | 441 | * |
| 437 | 442 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 438 | 443 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
class BBP_Topics_Admin { |
| 519 | 524 | * Handles the admin-side opening/closing, sticking/unsticking and |
| 520 | 525 | * spamming/unspamming of topics |
| 521 | 526 | * |
| 522 | | * @since bbPress (r2727) |
| | 527 | * @since 2.0.0 bbPress (r2727) |
| 523 | 528 | * |
| 524 | 529 | * @uses bbp_get_topic() To get the topic |
| 525 | 530 | * @uses current_user_can() To check if the user is capable of editing |
| … |
… |
class BBP_Topics_Admin { |
| 647 | 652 | * Display the success/error notices from |
| 648 | 653 | * {@link BBP_Admin::toggle_topic()} |
| 649 | 654 | * |
| 650 | | * @since bbPress (r2727) |
| | 655 | * @since 2.0.0 bbPress (r2727) |
| 651 | 656 | * |
| 652 | 657 | * @uses bbp_get_topic() To get the topic |
| 653 | 658 | * @uses bbp_get_topic_title() To get the topic title of the topic |
| … |
… |
class BBP_Topics_Admin { |
| 752 | 757 | /** |
| 753 | 758 | * Manage the column headers for the topics page |
| 754 | 759 | * |
| 755 | | * @since bbPress (r2485) |
| | 760 | * @since 2.0.0 bbPress (r2485) |
| 756 | 761 | * |
| 757 | 762 | * @param array $columns The columns |
| 758 | 763 | * @uses apply_filters() Calls 'bbp_admin_topics_column_headers' with |
| … |
… |
class BBP_Topics_Admin { |
| 782 | 787 | /** |
| 783 | 788 | * Print extra columns for the topics page |
| 784 | 789 | * |
| 785 | | * @since bbPress (r2485) |
| | 790 | * @since 2.0.0 bbPress (r2485) |
| 786 | 791 | * |
| 787 | 792 | * @param string $column Column |
| 788 | 793 | * @param int $topic_id Topic id |
| … |
… |
class BBP_Topics_Admin { |
| 884 | 889 | * Remove the quick-edit action link under the topic title and add the |
| 885 | 890 | * content and close/stick/spam links |
| 886 | 891 | * |
| 887 | | * @since bbPress (r2485) |
| | 892 | * @since 2.0.0 bbPress (r2485) |
| 888 | 893 | * |
| 889 | 894 | * @param array $actions Actions |
| 890 | 895 | * @param array $topic Topic object |
| … |
… |
class BBP_Topics_Admin { |
| 985 | 990 | /** |
| 986 | 991 | * Add forum dropdown to topic and reply list table filters |
| 987 | 992 | * |
| 988 | | * @since bbPress (r2991) |
| | 993 | * @since 2.0.0 bbPress (r2991) |
| 989 | 994 | * |
| 990 | 995 | * @uses bbp_get_reply_post_type() To get the reply post type |
| 991 | 996 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
class BBP_Topics_Admin { |
| 1018 | 1023 | /** |
| 1019 | 1024 | * Adjust the request query and include the forum id |
| 1020 | 1025 | * |
| 1021 | | * @since bbPress (r2991) |
| | 1026 | * @since 2.0.0 bbPress (r2991) |
| 1022 | 1027 | * |
| 1023 | 1028 | * @param array $query_vars Query variables from {@link WP_Query} |
| 1024 | 1029 | * @uses is_admin() To check if it's the admin section |
| … |
… |
class BBP_Topics_Admin { |
| 1046 | 1051 | /** |
| 1047 | 1052 | * Custom user feedback messages for topic post type |
| 1048 | 1053 | * |
| 1049 | | * @since bbPress (r3080) |
| | 1054 | * @since 2.0.0 bbPress (r3080) |
| 1050 | 1055 | * |
| 1051 | 1056 | * @global int $post_ID |
| 1052 | 1057 | * @uses bbp_get_topic_permalink() |
| … |
… |
endif; // class_exists check |
| 1124 | 1129 | * This is currently here to make hooking and unhooking of the admin UI easy. |
| 1125 | 1130 | * It could use dependency injection in the future, but for now this is easier. |
| 1126 | 1131 | * |
| 1127 | | * @since bbPress (r2596) |
| | 1132 | * @since 2.0.0 bbPress (r2596) |
| 1128 | 1133 | * |
| 1129 | 1134 | * @uses BBP_Forums_Admin |
| 1130 | 1135 | */ |
-
diff --git src/includes/admin/users.php src/includes/admin/users.php
index f060018..817f3fe 100644
|
|
|
if ( !class_exists( 'BBP_Users_Admin' ) ) : |
| 16 | 16 | * |
| 17 | 17 | * @package bbPress |
| 18 | 18 | * @subpackage Administration |
| 19 | | * @since bbPress (r2464) |
| | 19 | * @since 2.0.0 bbPress (r2464) |
| 20 | 20 | */ |
| 21 | 21 | class BBP_Users_Admin { |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * The bbPress users admin loader |
| 25 | 25 | * |
| 26 | | * @since bbPress (r2515) |
| | 26 | * @since 2.0.0 bbPress (r2515) |
| 27 | 27 | * |
| 28 | 28 | * @uses BBP_Users_Admin::setup_globals() Setup the globals needed |
| 29 | 29 | * @uses BBP_Users_Admin::setup_actions() Setup the hooks and actions |
| … |
… |
class BBP_Users_Admin { |
| 35 | 35 | /** |
| 36 | 36 | * Setup the admin hooks, actions and filters |
| 37 | 37 | * |
| 38 | | * @since bbPress (r2646) |
| | 38 | * @since 2.0.0 bbPress (r2646) |
| | 39 | * |
| 39 | 40 | * @access private |
| 40 | 41 | * |
| 41 | 42 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Users_Admin { |
| 62 | 63 | /** |
| 63 | 64 | * Default interface for setting a forum role |
| 64 | 65 | * |
| 65 | | * @since bbPress (r4285) |
| | 66 | * @since 2.2.0 bbPress (r4285) |
| 66 | 67 | * |
| 67 | 68 | * @param WP_User $profileuser User data |
| 68 | 69 | * @return bool Always false |
| … |
… |
class BBP_Users_Admin { |
| 123 | 124 | /** |
| 124 | 125 | * Add bulk forums role dropdown to the WordPress users table |
| 125 | 126 | * |
| 126 | | * @since bbPress (r4360) |
| | 127 | * @since 2.2.0 bbPress (r4360) |
| 127 | 128 | */ |
| 128 | 129 | public static function user_role_bulk_dropdown() { |
| 129 | 130 | |
| … |
… |
class BBP_Users_Admin { |
| 219 | 220 | * Add Forum Role column to the WordPress Users table, and change the |
| 220 | 221 | * core role title to "Site Role" |
| 221 | 222 | * |
| 222 | | * @since bbPress (r4337) |
| | 223 | * @since 2.2.0 bbPress (r4337) |
| 223 | 224 | * |
| 224 | 225 | * @param array $columns Users table columns |
| 225 | 226 | * @return array $columns |
| … |
… |
class BBP_Users_Admin { |
| 234 | 235 | /** |
| 235 | 236 | * Return user's forums role for display in the WordPress Users list table |
| 236 | 237 | * |
| 237 | | * @since bbPress (r4337) |
| | 238 | * @since 2.2.0 bbPress (r4337) |
| 238 | 239 | * |
| 239 | 240 | * @param string $retval |
| 240 | 241 | * @param string $column_name |
-
diff --git src/includes/common/ajax.php src/includes/common/ajax.php
index 03fe163..f8eb3e6 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 16 | 16 | /** |
| 17 | 17 | * Output the URL to use for theme-side bbPress AJAX requests |
| 18 | 18 | * |
| 19 | | * @since bbPress (r4543) |
| | 19 | * @since 2.3.0 bbPress (r4543) |
| 20 | 20 | * |
| 21 | 21 | * @uses bbp_get_ajax_url() To get the URL to use for AJAX requests |
| 22 | 22 | */ |
| … |
… |
function bbp_ajax_url() { |
| 26 | 26 | /** |
| 27 | 27 | * Return the URL to use for theme-side bbPress AJAX requests |
| 28 | 28 | * |
| 29 | | * @since bbPress (r4543) |
| | 29 | * @since 2.3.0 bbPress (r4543) |
| 30 | 30 | * |
| 31 | 31 | * @global WP $wp |
| 32 | 32 | * @return string |
| … |
… |
function bbp_ajax_url() { |
| 43 | 43 | /** |
| 44 | 44 | * Is this a bbPress AJAX request? |
| 45 | 45 | * |
| 46 | | * @since bbPress (r4543) |
| | 46 | * @since 2.3.0 bbPress (r4543) |
| 47 | 47 | * |
| 48 | 48 | * @return bool Looking for bbp-ajax |
| 49 | 49 | */ |
| … |
… |
function bbp_is_ajax() { |
| 55 | 55 | * Hooked to the 'bbp_template_redirect' action, this is bbPress's custom |
| 56 | 56 | * theme-side ajax handler. |
| 57 | 57 | * |
| 58 | | * @since bbPress (r4543) |
| | 58 | * @since 2.3.0 bbPress (r4543) |
| 59 | 59 | * |
| 60 | 60 | * @return If not a bbPress ajax request |
| 61 | 61 | */ |
| … |
… |
function bbp_do_ajax() { |
| 85 | 85 | /** |
| 86 | 86 | * Helper method to return JSON response for the ajax calls |
| 87 | 87 | * |
| 88 | | * @since bbPress (r4542) |
| | 88 | * @since 2.3.0 bbPress (r4542) |
| 89 | 89 | * |
| 90 | 90 | * @param bool $success |
| 91 | 91 | * @param string $content |
-
diff --git src/includes/common/classes.php src/includes/common/classes.php
index 6ce3d50..85f4c17 100644
|
|
|
if ( !class_exists( 'BBP_Component' ) ) : |
| 22 | 22 | * @package bbPress |
| 23 | 23 | * @subpackage Classes |
| 24 | 24 | * |
| 25 | | * @since bbPress (r2688) |
| | 25 | * @since 2.0.0 bbPress (r2688) |
| 26 | 26 | */ |
| 27 | 27 | class BBP_Component { |
| 28 | 28 | |
| … |
… |
class BBP_Component { |
| 58 | 58 | /** |
| 59 | 59 | * bbPress Component loader |
| 60 | 60 | * |
| 61 | | * @since bbPress (r2700) |
| | 61 | * @since 2.0.0 bbPress (r2700) |
| 62 | 62 | * |
| 63 | 63 | * @param array $args Required. Supports these args: |
| 64 | 64 | * - name: Unique name (for internal identification) |
| … |
… |
class BBP_Component { |
| 83 | 83 | /** |
| 84 | 84 | * Component global variables |
| 85 | 85 | * |
| 86 | | * @since bbPress (r2700) |
| | 86 | * @since 2.0.0 bbPress (r2700) |
| | 87 | * |
| 87 | 88 | * @access private |
| 88 | 89 | * |
| 89 | 90 | * @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_id' |
| … |
… |
class BBP_Component { |
| 98 | 99 | /** |
| 99 | 100 | * Include required files |
| 100 | 101 | * |
| 101 | | * @since bbPress (r2700) |
| | 102 | * @since 2.0.0 bbPress (r2700) |
| | 103 | * |
| 102 | 104 | * @access private |
| 103 | 105 | * |
| 104 | 106 | * @uses do_action() Calls 'bbp_{@link BBP_Component::name}includes' |
| … |
… |
class BBP_Component { |
| 110 | 112 | /** |
| 111 | 113 | * Setup the actions |
| 112 | 114 | * |
| 113 | | * @since bbPress (r2700) |
| | 115 | * @since 2.0.0 bbPress (r2700) |
| | 116 | * |
| 114 | 117 | * @access private |
| 115 | 118 | * |
| 116 | 119 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Component { |
| 130 | 133 | /** |
| 131 | 134 | * Setup the component post types |
| 132 | 135 | * |
| 133 | | * @since bbPress (r2700) |
| | 136 | * @since 2.0.0 bbPress (r2700) |
| 134 | 137 | * |
| 135 | 138 | * @uses do_action() Calls 'bbp_{@link BBP_Component::name}_register_post_types' |
| 136 | 139 | */ |
| … |
… |
class BBP_Component { |
| 141 | 144 | /** |
| 142 | 145 | * Register component specific taxonomies |
| 143 | 146 | * |
| 144 | | * @since bbPress (r2700) |
| | 147 | * @since 2.0.0 bbPress (r2700) |
| 145 | 148 | * |
| 146 | 149 | * @uses do_action() Calls 'bbp_{@link BBP_Component::name}_register_taxonomies' |
| 147 | 150 | */ |
| … |
… |
class BBP_Component { |
| 152 | 155 | /** |
| 153 | 156 | * Add any additional rewrite tags |
| 154 | 157 | * |
| 155 | | * @since bbPress (r2700) |
| | 158 | * @since 2.0.0 bbPress (r2700) |
| 156 | 159 | * |
| 157 | 160 | * @uses do_action() Calls 'bbp_{@link BBP_Component::name}_add_rewrite_tags' |
| 158 | 161 | */ |
| … |
… |
class BBP_Component { |
| 163 | 166 | /** |
| 164 | 167 | * Generate any additional rewrite rules |
| 165 | 168 | * |
| 166 | | * @since bbPress (r2700) |
| | 169 | * @since 2.0.0 bbPress (r2700) |
| 167 | 170 | * |
| 168 | 171 | * @uses do_action() Calls 'bbp_{@link BBP_Component::name}_generate_rewrite_rules' |
| 169 | 172 | */ |
| … |
… |
if ( class_exists( 'Walker' ) ) : |
| 180 | 183 | * @package bbPress |
| 181 | 184 | * @subpackage Classes |
| 182 | 185 | * |
| 183 | | * @since bbPress (r2746) |
| | 186 | * @since 2.0.0 bbPress (r2746) |
| | 187 | * |
| 184 | 188 | * @uses Walker |
| 185 | 189 | */ |
| 186 | 190 | class BBP_Walker_Dropdown extends Walker { |
| … |
… |
class BBP_Walker_Dropdown extends Walker { |
| 188 | 192 | /** |
| 189 | 193 | * @see Walker::$tree_type |
| 190 | 194 | * |
| 191 | | * @since bbPress (r2746) |
| | 195 | * @since 2.0.0 bbPress (r2746) |
| 192 | 196 | * |
| 193 | 197 | * @var string |
| 194 | 198 | */ |
| … |
… |
class BBP_Walker_Dropdown extends Walker { |
| 197 | 201 | /** |
| 198 | 202 | * @see Walker::$db_fields |
| 199 | 203 | * |
| 200 | | * @since bbPress (r2746) |
| | 204 | * @since 2.0.0 bbPress (r2746) |
| 201 | 205 | * |
| 202 | 206 | * @var array |
| 203 | 207 | */ |
| … |
… |
class BBP_Walker_Dropdown extends Walker { |
| 211 | 215 | /** |
| 212 | 216 | * Set the tree_type |
| 213 | 217 | * |
| 214 | | * @since bbPress (r2746) |
| | 218 | * @since 2.0.0 bbPress (r2746) |
| 215 | 219 | */ |
| 216 | 220 | public function __construct() { |
| 217 | 221 | $this->tree_type = bbp_get_forum_post_type(); |
| … |
… |
class BBP_Walker_Dropdown extends Walker { |
| 220 | 224 | /** |
| 221 | 225 | * @see Walker::start_el() |
| 222 | 226 | * |
| 223 | | * @since bbPress (r2746) |
| | 227 | * @since 2.0.0 bbPress (r2746) |
| 224 | 228 | * |
| 225 | 229 | * @param string $output Passed by reference. Used to append additional |
| 226 | 230 | * content. |
| … |
… |
class BBP_Walker_Dropdown extends Walker { |
| 271 | 275 | * @package bbPress |
| 272 | 276 | * @subpackage Classes |
| 273 | 277 | * |
| 274 | | * @since bbPress (r4944) |
| | 278 | * @since 2.4.0 bbPress (r4944) |
| 275 | 279 | */ |
| 276 | 280 | class BBP_Walker_Reply extends Walker { |
| 277 | 281 | |
| 278 | 282 | /** |
| 279 | 283 | * @see Walker::$tree_type |
| 280 | 284 | * |
| 281 | | * @since bbPress (r4944) |
| | 285 | * @since 2.4.0 bbPress (r4944) |
| 282 | 286 | * |
| 283 | 287 | * @var string |
| 284 | 288 | */ |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 287 | 291 | /** |
| 288 | 292 | * @see Walker::$db_fields |
| 289 | 293 | * |
| 290 | | * @since bbPress (r4944) |
| | 294 | * @since 2.4.0 bbPress (r4944) |
| 291 | 295 | * |
| 292 | 296 | * @var array |
| 293 | 297 | */ |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 299 | 303 | /** |
| 300 | 304 | * Confirm the tree_type |
| 301 | 305 | * |
| 302 | | * @since bbPress (r5389) |
| | 306 | * @since 2.6.0 bbPress (r5389) |
| 303 | 307 | */ |
| 304 | 308 | public function __construct() { |
| 305 | 309 | $this->tree_type = bbp_get_reply_post_type(); |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 308 | 312 | /** |
| 309 | 313 | * @see Walker::start_lvl() |
| 310 | 314 | * |
| 311 | | * @since bbPress (r4944) |
| | 315 | * @since 2.4.0 bbPress (r4944) |
| 312 | 316 | * |
| 313 | 317 | * @param string $output Passed by reference. Used to append additional content |
| 314 | 318 | * @param int $depth Depth of reply |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 333 | 337 | /** |
| 334 | 338 | * @see Walker::end_lvl() |
| 335 | 339 | * |
| 336 | | * @since bbPress (r4944) |
| | 340 | * @since 2.4.0 bbPress (r4944) |
| 337 | 341 | * |
| 338 | 342 | * @param string $output Passed by reference. Used to append additional content |
| 339 | 343 | * @param int $depth Depth of reply |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 356 | 360 | } |
| 357 | 361 | |
| 358 | 362 | /** |
| 359 | | * @since bbPress (r4944) |
| | 363 | * @since 2.4.0 bbPress (r4944) |
| 360 | 364 | */ |
| 361 | 365 | public function display_element( $element = false, &$children_elements = array(), $max_depth = 0, $depth = 0, $args = array(), &$output = '' ) { |
| 362 | 366 | |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 384 | 388 | /** |
| 385 | 389 | * @see Walker:start_el() |
| 386 | 390 | * |
| 387 | | * @since bbPress (r4944) |
| | 391 | * @since 2.4.0 bbPress (r4944) |
| 388 | 392 | */ |
| 389 | 393 | public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) { |
| 390 | 394 | |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 411 | 415 | } |
| 412 | 416 | |
| 413 | 417 | /** |
| 414 | | * @since bbPress (r4944) |
| | 418 | * @since 2.4.0 bbPress (r4944) |
| 415 | 419 | */ |
| 416 | 420 | public function end_el( &$output = '', $object = false, $depth = 0, $args = array() ) { |
| 417 | 421 | |
| … |
… |
class BBP_Walker_Reply extends Walker { |
| 436 | 440 | * @package bbPress |
| 437 | 441 | * @subpackage Classes |
| 438 | 442 | * |
| 439 | | * @since bbPress (r5389) |
| | 443 | * @since 2.6.0 bbPress (r5389) |
| | 444 | * |
| 440 | 445 | * @uses Walker |
| 441 | 446 | */ |
| 442 | 447 | class BBP_Walker_Reply_Dropdown extends Walker { |
| … |
… |
class BBP_Walker_Reply_Dropdown extends Walker { |
| 444 | 449 | /** |
| 445 | 450 | * @see Walker::$tree_type |
| 446 | 451 | * |
| 447 | | * @since bbPress (r5389) |
| | 452 | * @since 2.6.0 bbPress (r5389) |
| 448 | 453 | * |
| 449 | 454 | * @var string |
| 450 | 455 | */ |
| … |
… |
class BBP_Walker_Reply_Dropdown extends Walker { |
| 453 | 458 | /** |
| 454 | 459 | * @see Walker::$db_fields |
| 455 | 460 | * |
| 456 | | * @since bbPress (r5389) |
| | 461 | * @since 2.6.0 bbPress (r5389) |
| 457 | 462 | * |
| 458 | 463 | * @var array |
| 459 | 464 | */ |
| … |
… |
class BBP_Walker_Reply_Dropdown extends Walker { |
| 467 | 472 | /** |
| 468 | 473 | * Confirm the tree_type |
| 469 | 474 | * |
| 470 | | * @since bbPress (r5389) |
| | 475 | * @since 2.6.0 bbPress (r5389) |
| 471 | 476 | */ |
| 472 | 477 | public function __construct() { |
| 473 | 478 | $this->tree_type = bbp_get_reply_post_type(); |
| … |
… |
class BBP_Walker_Reply_Dropdown extends Walker { |
| 476 | 481 | /** |
| 477 | 482 | * @see Walker::start_el() |
| 478 | 483 | * |
| 479 | | * @since bbPress (r5389) |
| | 484 | * @since 2.6.0 bbPress (r5389) |
| 480 | 485 | * |
| 481 | 486 | * @param string $output Passed by reference. Used to append additional |
| 482 | 487 | * content. |
-
diff --git src/includes/common/formatting.php src/includes/common/formatting.php
index 851ecc7..34d51fb 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 17 | 17 | * |
| 18 | 18 | * Allows all users to post links, quotes, code, formatting, lists, and images |
| 19 | 19 | * |
| 20 | | * @since bbPress (r4603) |
| | 20 | * @since 2.3.0 bbPress (r4603) |
| 21 | 21 | * |
| 22 | 22 | * @return array Associative array of allowed tags and attributes |
| 23 | 23 | */ |
| … |
… |
function bbp_kses_allowed_tags() { |
| 76 | 76 | /** |
| 77 | 77 | * Custom kses filter for forum topics and replies, for filtering incoming data |
| 78 | 78 | * |
| 79 | | * @since bbPress (r4603) |
| | 79 | * @since 2.3.0 bbPress (r4603) |
| 80 | 80 | * |
| 81 | 81 | * @param string $data Content to filter, expected to be escaped with slashes |
| 82 | 82 | * @return string Filtered content |
| … |
… |
function bbp_filter_kses( $data = '' ) { |
| 88 | 88 | /** |
| 89 | 89 | * Custom kses filter for forum topics and replies, for raw data |
| 90 | 90 | * |
| 91 | | * @since bbPress (r4603) |
| | 91 | * @since 2.3.0 bbPress (r4603) |
| 92 | 92 | * |
| 93 | 93 | * @param string $data Content to filter, expected to not be escaped |
| 94 | 94 | * @return string Filtered content |
| … |
… |
function bbp_kses_data( $data = '' ) { |
| 102 | 102 | /** |
| 103 | 103 | * Filter the topic or reply content and output code and pre tags |
| 104 | 104 | * |
| 105 | | * @since bbPress (r4641) |
| | 105 | * @since 2.3.0 bbPress (r4641) |
| 106 | 106 | * |
| 107 | 107 | * @param string $content Topic and reply content |
| 108 | 108 | * @return string Partially encodedd content |
| … |
… |
function bbp_code_trick( $content = '' ) { |
| 119 | 119 | * When editing a topic or reply, reverse the code trick so the textarea |
| 120 | 120 | * contains the correct editable content. |
| 121 | 121 | * |
| 122 | | * @since bbPress (r4641) |
| | 122 | * @since 2.3.0 bbPress (r4641) |
| 123 | 123 | * |
| 124 | 124 | * @param string $content Topic and reply content |
| 125 | 125 | * @return string Partially encodedd content |
| … |
… |
function bbp_code_trick_reverse( $content = '' ) { |
| 143 | 143 | /** |
| 144 | 144 | * Filter the content and encode any bad HTML tags |
| 145 | 145 | * |
| 146 | | * @since bbPress (r4641) |
| | 146 | * @since 2.3.0 bbPress (r4641) |
| 147 | 147 | * |
| 148 | 148 | * @param string $content Topic and reply content |
| 149 | 149 | * @return string Partially encodedd content |
| … |
… |
function bbp_encode_bad( $content = '' ) { |
| 186 | 186 | /** |
| 187 | 187 | * Callback to encode the tags in topic or reply content |
| 188 | 188 | * |
| 189 | | * @since bbPress (r4641) |
| | 189 | * @since 2.3.0 bbPress (r4641) |
| 190 | 190 | * |
| 191 | 191 | * @param array $matches |
| 192 | 192 | * @return string |
| … |
… |
function bbp_encode_callback( $matches = array() ) { |
| 222 | 222 | /** |
| 223 | 223 | * Callback to decode the tags in topic or reply content |
| 224 | 224 | * |
| 225 | | * @since bbPress (r4641) |
| | 225 | * @since 2.3.0 bbPress (r4641) |
| 226 | 226 | * |
| 227 | 227 | * @param array $matches |
| 228 | 228 | * @todo Experiment with _wp_specialchars() |
| … |
… |
function bbp_decode_callback( $matches = array() ) { |
| 251 | 251 | /** |
| 252 | 252 | * Callback to replace empty HTML tags in a content string |
| 253 | 253 | * |
| 254 | | * @since bbPress (r4641) |
| | 254 | * @since 2.3.0 bbPress (r4641) |
| 255 | 255 | * |
| 256 | 256 | * @internal Used by bbp_encode_bad() |
| 257 | 257 | * @param string $content |
| … |
… |
function bbp_encode_empty_callback( &$content = '', $key = '', $preg = '' ) { |
| 267 | 267 | /** |
| 268 | 268 | * Callback to replace normal HTML tags in a content string |
| 269 | 269 | * |
| 270 | | * @since bbPress (r4641) |
| | 270 | * @since 2.3.0 bbPress (r4641) |
| 271 | 271 | * |
| 272 | 272 | * @internal Used by bbp_encode_bad() |
| 273 | 273 | * @param type $content |
| … |
… |
function bbp_encode_normal_callback( &$content = '', $key = '', $preg = '') { |
| 285 | 285 | /** |
| 286 | 286 | * Catches links so rel=nofollow can be added (on output, not save) |
| 287 | 287 | * |
| 288 | | * @since bbPress (r4865) |
| | 288 | * @since 2.3.0 bbPress (r4865) |
| | 289 | * |
| 289 | 290 | * @param string $text Post text |
| 290 | 291 | * @return string $text Text with rel=nofollow added to any links |
| 291 | 292 | */ |
| … |
… |
function bbp_rel_nofollow( $text = '' ) { |
| 296 | 297 | /** |
| 297 | 298 | * Adds rel=nofollow to a link |
| 298 | 299 | * |
| 299 | | * @since bbPress (r4865) |
| | 300 | * @since 2.3.0 bbPress (r4865) |
| | 301 | * |
| 300 | 302 | * @param array $matches |
| 301 | 303 | * @return string $text Link with rel=nofollow added |
| 302 | 304 | */ |
| … |
… |
function bbp_rel_nofollow_callback( $matches = array() ) { |
| 317 | 319 | * This custom version of WordPress's make_clickable() skips links inside of |
| 318 | 320 | * pre and code tags. |
| 319 | 321 | * |
| 320 | | * @since bbPress (r4941) |
| | 322 | * @since 2.4.0 bbPress (r4941) |
| 321 | 323 | * |
| 322 | 324 | * @param string $text Content to convert URIs. |
| 323 | 325 | * @return string Content with converted URIs. |
-
diff --git src/includes/common/functions.php src/includes/common/functions.php
index 67af13c..7101e96 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 18 | 18 | /** |
| 19 | 19 | * A bbPress specific method of formatting numeric values |
| 20 | 20 | * |
| 21 | | * @since bbPress (r2486) |
| | 21 | * @since 2.0.0 bbPress (r2486) |
| 22 | 22 | * |
| 23 | 23 | * @param string $number Number to format |
| 24 | 24 | * @param string $decimals Optional. Display decimals |
| … |
… |
function bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $t |
| 39 | 39 | /** |
| 40 | 40 | * A bbPress specific method of formatting numeric values |
| 41 | 41 | * |
| 42 | | * @since bbPress (r3857) |
| | 42 | * @since 2.1.0 bbPress (r3857) |
| 43 | 43 | * |
| 44 | 44 | * @param string $number Number to format |
| 45 | 45 | * @param string $decimals Optional. Display decimals |
| … |
… |
function bbp_number_format_i18n( $number = 0, $decimals = false ) { |
| 60 | 60 | /** |
| 61 | 61 | * Convert time supplied from database query into specified date format. |
| 62 | 62 | * |
| 63 | | * @since bbPress (r2455) |
| | 63 | * @since 2.0.0 bbPress (r2544) |
| 64 | 64 | * |
| 65 | 65 | * @param string $time Time to convert |
| 66 | 66 | * @param string $d Optional. Default is 'U'. Either 'G', 'U', or php date |
| … |
… |
function bbp_convert_date( $time, $d = 'U', $translate = false ) { |
| 81 | 81 | /** |
| 82 | 82 | * Output formatted time to display human readable time difference. |
| 83 | 83 | * |
| 84 | | * @since bbPress (r2544) |
| | 84 | * @since 2.0.0 bbPress (r2544) |
| 85 | 85 | * |
| 86 | 86 | * @param string $older_date Unix timestamp from which the difference begins. |
| 87 | 87 | * @param string $newer_date Optional. Unix timestamp from which the |
| … |
… |
function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) { |
| 95 | 95 | /** |
| 96 | 96 | * Return formatted time to display human readable time difference. |
| 97 | 97 | * |
| 98 | | * @since bbPress (r2544) |
| | 98 | * @since 2.0.0 bbPress (r2544) |
| 99 | 99 | * |
| 100 | 100 | * @param string $older_date Unix timestamp from which the difference begins. |
| 101 | 101 | * @param string $newer_date Optional. Unix timestamp from which the |
| … |
… |
function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) { |
| 204 | 204 | * - Removing periods from the end of the string |
| 205 | 205 | * - Trimming again |
| 206 | 206 | * |
| 207 | | * @since bbPress (r2782) |
| | 207 | * @since 2.0.0 bbPress (r2782) |
| 208 | 208 | * |
| 209 | 209 | * @param string $reason Optional. User submitted reason for editing. |
| 210 | 210 | * @return string Status of topic |
| … |
… |
function bbp_get_redirect_to() { |
| 249 | 249 | /** |
| 250 | 250 | * Append 'view=all' to query string if it's already there from referer |
| 251 | 251 | * |
| 252 | | * @since bbPress (r3325) |
| | 252 | * @since 2.0.0 bbPress (r3325) |
| 253 | 253 | * |
| 254 | 254 | * @param string $original_link Original Link to be modified |
| 255 | 255 | * @param bool $force Override bbp_get_view_all() check |
| … |
… |
function bbp_add_view_all( $original_link = '', $force = false ) { |
| 273 | 273 | /** |
| 274 | 274 | * Remove 'view=all' from query string |
| 275 | 275 | * |
| 276 | | * @since bbPress (r3325) |
| | 276 | * @since 2.0.0 bbPress (r3325) |
| 277 | 277 | * |
| 278 | 278 | * @param string $original_link Original Link to be modified |
| 279 | 279 | * @uses current_user_can() To check if the current user can moderate |
| … |
… |
function bbp_remove_view_all( $original_link = '' ) { |
| 288 | 288 | /** |
| 289 | 289 | * If current user can and is vewing all topics/replies |
| 290 | 290 | * |
| 291 | | * @since bbPress (r3325) |
| | 291 | * @since 2.0.0 bbPress (r3325) |
| 292 | 292 | * |
| 293 | 293 | * @uses current_user_can() To check if the current user can moderate |
| 294 | 294 | * @uses apply_filters() Calls 'bbp_get_view_all' with the link and original link |
| … |
… |
function bbp_get_view_all( $cap = 'moderate' ) { |
| 302 | 302 | /** |
| 303 | 303 | * Assist pagination by returning correct page number |
| 304 | 304 | * |
| 305 | | * @since bbPress (r2628) |
| | 305 | * @since 2.0.0 bbPress (r2628) |
| 306 | 306 | * |
| 307 | 307 | * @uses get_query_var() To get the 'paged' value |
| 308 | 308 | * @return int Current page number |
| … |
… |
function bbp_get_paged() { |
| 335 | 335 | * edits it, the post_author field is set to the logged in user's id. This |
| 336 | 336 | * function fixes that. |
| 337 | 337 | * |
| 338 | | * @since bbPress (r2734) |
| | 338 | * @since 2.0.0 bbPress (r2734) |
| 339 | 339 | * |
| 340 | 340 | * @param array $data Post data |
| 341 | 341 | * @param array $postarr Original post array (includes post id) |
| … |
… |
function bbp_fix_post_author( $data = array(), $postarr = array() ) { |
| 373 | 373 | /** |
| 374 | 374 | * Check the date against the _bbp_edit_lock setting. |
| 375 | 375 | * |
| 376 | | * @since bbPress (r3133) |
| | 376 | * @since 2.0.0 bbPress (r3133) |
| 377 | 377 | * |
| 378 | 378 | * @param string $post_date_gmt |
| 379 | 379 | * |
| … |
… |
function bbp_past_edit_lock( $post_date_gmt ) { |
| 415 | 415 | /** |
| 416 | 416 | * Get the forum statistics |
| 417 | 417 | * |
| 418 | | * @since bbPress (r2769) |
| | 418 | * @since 2.0.0 bbPress (r2769) |
| 419 | 419 | * |
| 420 | 420 | * @param array $args Optional. The function supports these arguments (all |
| 421 | 421 | * default to true): |
| … |
… |
function bbp_get_statistics( $args = array() ) { |
| 604 | 604 | * |
| 605 | 605 | * If there are any errors, those are directly added to {@link bbPress:errors} |
| 606 | 606 | * |
| 607 | | * @since bbPress (r2734) |
| | 607 | * @since 2.0.0 bbPress (r2734) |
| 608 | 608 | * |
| 609 | 609 | * @param array $args Optional. If no args are there, then $_POST values are |
| 610 | 610 | * used. |
| … |
… |
function bbp_filter_anonymous_post_data( $args = array() ) { |
| 651 | 651 | * |
| 652 | 652 | * Check to make sure that a user is not making a duplicate post |
| 653 | 653 | * |
| 654 | | * @since bbPress (r2763) |
| | 654 | * @since 2.0.0 bbPress (r2763) |
| 655 | 655 | * |
| 656 | 656 | * @param array $post_data Contains information about the comment |
| 657 | 657 | * @uses current_user_can() To check if the current user can throttle |
| … |
… |
function bbp_check_for_duplicate( $post_data = array() ) { |
| 723 | 723 | * Check to make sure that a user is not making too many posts in a short amount |
| 724 | 724 | * of time. |
| 725 | 725 | * |
| 726 | | * @since bbPress (r2734) |
| | 726 | * @since 2.0.0 bbPress (r2734) |
| 727 | 727 | * |
| 728 | 728 | * @param false|array $anonymous_data Optional - if it's an anonymous post. Do |
| 729 | 729 | * not supply if supplying $author_id. |
| … |
… |
function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) { |
| 773 | 773 | /** |
| 774 | 774 | * Checks topics and replies against the discussion moderation of blocked keys |
| 775 | 775 | * |
| 776 | | * @since bbPress (r3581) |
| | 776 | * @since 2.1.0 bbPress (r3581) |
| 777 | 777 | * |
| 778 | 778 | * @param array $anonymous_data Anonymous user data |
| 779 | 779 | * @param int $author_id Topic or reply author ID |
| … |
… |
function bbp_check_for_moderation( $anonymous_data = false, $author_id = 0, $tit |
| 897 | 897 | /** |
| 898 | 898 | * Checks topics and replies against the discussion blacklist of blocked keys |
| 899 | 899 | * |
| 900 | | * @since bbPress (r3446) |
| | 900 | * @since 2.0.0 bbPress (r3446) |
| 901 | 901 | * |
| 902 | 902 | * @param array $anonymous_data Anonymous user data |
| 903 | 903 | * @param int $author_id Topic or reply author ID |
| … |
… |
function bbp_check_for_blacklist( $anonymous_data = false, $author_id = 0, $titl |
| 1011 | 1011 | * WordPress core. Previously, we used `get_home_url()` to use already validated |
| 1012 | 1012 | * user input, but it was causing issues in some installations. |
| 1013 | 1013 | * |
| 1014 | | * @since bbPress (r5409) |
| | 1014 | * @since 2.6.0 bbPress (r5409) |
| 1015 | 1015 | * |
| 1016 | 1016 | * @see wp_mail |
| 1017 | 1017 | * @see wp_notify_postauthor |
| … |
… |
function bbp_get_do_not_reply_address() { |
| 1039 | 1039 | * those cases, we recommend unhooking this function and creating your own |
| 1040 | 1040 | * custom emailer script. |
| 1041 | 1041 | * |
| 1042 | | * @since bbPress (r5413) |
| | 1042 | * @since 2.6.0 bbPress (r5413) |
| 1043 | 1043 | * |
| 1044 | 1044 | * @param int $reply_id ID of the newly made reply |
| 1045 | 1045 | * @param int $topic_id ID of the topic of the reply |
| … |
… |
Login and visit the topic to unsubscribe from these emails.', 'bbpress' ), |
| 1203 | 1203 | * those cases, we recommend unhooking this function and creating your own |
| 1204 | 1204 | * custom emailer script. |
| 1205 | 1205 | * |
| 1206 | | * @since bbPress (r5156) |
| | 1206 | * @since 2.5.0 bbPress (r5156) |
| 1207 | 1207 | * |
| 1208 | 1208 | * @param int $topic_id ID of the newly made reply |
| 1209 | 1209 | * @param int $forum_id ID of the forum for the topic |
| … |
… |
Login and visit the topic to unsubscribe from these emails.', 'bbpress' ), |
| 1353 | 1353 | * |
| 1354 | 1354 | * This function is deprecated. Please use: bbp_notify_topic_subscribers() |
| 1355 | 1355 | * |
| 1356 | | * @since bbPress (r2668) |
| 1357 | | * @deprecated bbPress (r5412) |
| | 1356 | * @since 2.0.0 bbPress (r2668) |
| | 1357 | * |
| | 1358 | * @deprecated 2.6.0 bbPress (r5412) |
| 1358 | 1359 | * |
| 1359 | 1360 | * @param int $reply_id ID of the newly made reply |
| 1360 | 1361 | * @param int $topic_id ID of the topic of the reply |
| … |
… |
function bbp_logout_url( $url = '', $redirect_to = '' ) { |
| 1410 | 1411 | * it allows for arguments to be passively or aggressively filtered using the |
| 1411 | 1412 | * optional $filter_key parameter. |
| 1412 | 1413 | * |
| 1413 | | * @since bbPress (r3839) |
| | 1414 | * @since 2.1.0 bbPress (r3839) |
| 1414 | 1415 | * |
| 1415 | 1416 | * @param string|array $args Value to merge with $defaults |
| 1416 | 1417 | * @param array $defaults Array that serves as the defaults. |
| … |
… |
function bbp_parse_args( $args, $defaults = array(), $filter_key = '' ) { |
| 1450 | 1451 | /** |
| 1451 | 1452 | * Adds ability to include or exclude specific post_parent ID's |
| 1452 | 1453 | * |
| 1453 | | * @since bbPress (r2996) |
| 1454 | | * @deprecated bbPress (r5814) |
| | 1454 | * @since 2.0.0 bbPress (r2996) |
| | 1455 | * |
| | 1456 | * @deprecated 2.5.8 bbPress (r5814) |
| 1455 | 1457 | * |
| 1456 | 1458 | * @global WP $wp |
| 1457 | 1459 | * @param string $where |
| … |
… |
function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) { |
| 1546 | 1548 | /** |
| 1547 | 1549 | * Query the DB and get a count of public children |
| 1548 | 1550 | * |
| 1549 | | * @since bbPress (r2868) |
| | 1551 | * @since 2.0.0 bbPress (r2868) |
| 1550 | 1552 | * |
| 1551 | 1553 | * @param int $parent_id Parent id |
| 1552 | 1554 | * @param string $post_type Post type. Defaults to 'post' |
| … |
… |
function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) { |
| 1597 | 1599 | /** |
| 1598 | 1600 | * Query the DB and get a the child id's of public children |
| 1599 | 1601 | * |
| 1600 | | * @since bbPress (r2868) |
| | 1602 | * @since 2.0.0 bbPress (r2868) |
| 1601 | 1603 | * |
| 1602 | 1604 | * @param int $parent_id Parent id |
| 1603 | 1605 | * @param string $post_type Post type. Defaults to 'post' |
| … |
… |
function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) { |
| 1650 | 1652 | /** |
| 1651 | 1653 | * Query the DB and get a the child id's of all children |
| 1652 | 1654 | * |
| 1653 | | * @since bbPress (r3325) |
| | 1655 | * @since 2.0.0 bbPress (r3325) |
| 1654 | 1656 | * |
| 1655 | 1657 | * @param int $ parent_id Parent id |
| 1656 | 1658 | * @param string $post_type Post type. Defaults to 'post' |
| … |
… |
function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) { |
| 1734 | 1736 | * |
| 1735 | 1737 | * Used most frequently when editing a forum/topic/reply |
| 1736 | 1738 | * |
| 1737 | | * @since bbPress (r3694) |
| | 1739 | * @since 2.1.0 bbPress (r3694) |
| 1738 | 1740 | * |
| 1739 | 1741 | * @global WP_Query $post |
| 1740 | 1742 | * @param string $field Name of the key |
| … |
… |
function bbp_get_global_post_field( $field = 'ID', $context = 'edit' ) { |
| 1757 | 1759 | * |
| 1758 | 1760 | * To avoid security exploits within the theme. |
| 1759 | 1761 | * |
| 1760 | | * @since bbPress (r4022) |
| | 1762 | * @since 2.1.0 bbPress (r4022) |
| 1761 | 1763 | * |
| 1762 | 1764 | * @uses do_action() Calls 'bbp_check_referer' on $action. |
| 1763 | 1765 | * @param string $action Action nonce |
| … |
… |
function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) { |
| 1801 | 1803 | * |
| 1802 | 1804 | * Useful for configurations like reverse proxying. |
| 1803 | 1805 | * |
| 1804 | | * @since bbPress (2.5.0) |
| | 1806 | * @since 2.2.0 bbPress (r4361) |
| 1805 | 1807 | * |
| 1806 | 1808 | * @param string $requested_url The requested URL. |
| 1807 | 1809 | */ |
| … |
… |
function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) { |
| 1818 | 1820 | /** |
| 1819 | 1821 | * Fires at the end of the nonce verification check. |
| 1820 | 1822 | * |
| 1821 | | * @since bbPress (2.2.0) |
| | 1823 | * @since 2.1.0 bbPress (r4023) |
| 1822 | 1824 | * |
| 1823 | 1825 | * @param string $action Action nonce. |
| 1824 | 1826 | * @param bool $result Boolean result of nonce verification. |
| … |
… |
function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) { |
| 1835 | 1837 | * responsible for sniffing out the query vars and serving up RSS2 feeds if |
| 1836 | 1838 | * the stars align and the user has requested a feed of any bbPress type. |
| 1837 | 1839 | * |
| 1838 | | * @since bbPress (r3171) |
| | 1840 | * @since 2.0.0 bbPress (r3171) |
| 1839 | 1841 | * |
| 1840 | 1842 | * @param array $query_vars |
| 1841 | 1843 | * @return array |
| … |
… |
function bbp_request_feed_trap( $query_vars = array() ) { |
| 2058 | 2060 | /** |
| 2059 | 2061 | * Used to guess if page exists at requested path |
| 2060 | 2062 | * |
| 2061 | | * @since bbPress (r3304) |
| | 2063 | * @since 2.0.0 bbPress (r3304) |
| 2062 | 2064 | * |
| 2063 | 2065 | * @uses get_option() To see if pretty permalinks are enabled |
| 2064 | 2066 | * @uses get_page_by_path() To see if page exists at path |
| … |
… |
function bbp_get_page_by_path( $path = '' ) { |
| 2088 | 2090 | * |
| 2089 | 2091 | * Used primarily with topics/replies inside hidden forums. |
| 2090 | 2092 | * |
| 2091 | | * @since bbPress (r3051) |
| | 2093 | * @since 2.0.0 bbPress (r3051) |
| 2092 | 2094 | * |
| 2093 | 2095 | * @global WP_Query $wp_query |
| 2094 | 2096 | * @uses WP_Query::set_404() |
-
diff --git src/includes/common/shortcodes.php src/includes/common/shortcodes.php
index a2d44d7..ce1bcee 100644
|
|
|
if ( !class_exists( 'BBP_Shortcodes' ) ) : |
| 14 | 14 | /** |
| 15 | 15 | * bbPress Shortcode Class |
| 16 | 16 | * |
| 17 | | * @since bbPress (r3031) |
| | 17 | * @since 2.0.0 bbPress (r3031) |
| 18 | 18 | */ |
| 19 | 19 | class BBP_Shortcodes { |
| 20 | 20 | |
| … |
… |
class BBP_Shortcodes { |
| 30 | 30 | /** |
| 31 | 31 | * Add the register_shortcodes action to bbp_init |
| 32 | 32 | * |
| 33 | | * @since bbPress (r3031) |
| | 33 | * @since 2.0.0 bbPress (r3031) |
| 34 | 34 | * |
| 35 | 35 | * @uses setup_globals() |
| 36 | 36 | * @uses add_shortcodes() |
| … |
… |
class BBP_Shortcodes { |
| 43 | 43 | /** |
| 44 | 44 | * Shortcode globals |
| 45 | 45 | * |
| 46 | | * @since bbPress (r3143) |
| | 46 | * @since 2.0.0 bbPress (r3143) |
| | 47 | * |
| 47 | 48 | * @access private |
| 48 | 49 | * |
| 49 | 50 | * @uses apply_filters() |
| … |
… |
class BBP_Shortcodes { |
| 99 | 100 | /** |
| 100 | 101 | * Register the bbPress shortcodes |
| 101 | 102 | * |
| 102 | | * @since bbPress (r3031) |
| | 103 | * @since 2.0.0 bbPress (r3031) |
| 103 | 104 | * |
| 104 | 105 | * @uses add_shortcode() |
| 105 | 106 | * @uses do_action() |
| … |
… |
class BBP_Shortcodes { |
| 113 | 114 | /** |
| 114 | 115 | * Unset some globals in the $bbp object that hold query related info |
| 115 | 116 | * |
| 116 | | * @since bbPress (r3034) |
| | 117 | * @since 2.0.0 bbPress (r3034) |
| 117 | 118 | */ |
| 118 | 119 | private function unset_globals() { |
| 119 | 120 | $bbp = bbpress(); |
| … |
… |
class BBP_Shortcodes { |
| 144 | 145 | * than outputting the HTML at run-time. This allows shortcodes to appear |
| 145 | 146 | * in the correct location in the_content() instead of when it's created. |
| 146 | 147 | * |
| 147 | | * @since bbPress (r3079) |
| | 148 | * @since 2.0.0 bbPress (r3079) |
| 148 | 149 | * |
| 149 | 150 | * @param string $query_name |
| 150 | 151 | * |
| … |
… |
class BBP_Shortcodes { |
| 163 | 164 | /** |
| 164 | 165 | * Return the contents of the output buffer and flush its contents. |
| 165 | 166 | * |
| 166 | | * @since bbPress( r3079) |
| | 167 | * @since 2.0.0 bbPress (r3079) |
| 167 | 168 | * |
| 168 | 169 | * @uses BBP_Shortcodes::unset_globals() Cleans up global values |
| 169 | 170 | * @return string Contents of output buffer. |
| … |
… |
class BBP_Shortcodes { |
| 186 | 187 | * Display an index of all visible root level forums in an output buffer |
| 187 | 188 | * and return to ensure that post/page contents are displayed first. |
| 188 | 189 | * |
| 189 | | * @since bbPress (r3031) |
| | 190 | * @since 2.0.0 bbPress (r3031) |
| 190 | 191 | * |
| 191 | 192 | * @param array $attr |
| 192 | 193 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 212 | 213 | * Display the contents of a specific forum ID in an output buffer |
| 213 | 214 | * and return to ensure that post/page contents are displayed first. |
| 214 | 215 | * |
| 215 | | * @since bbPress (r3031) |
| | 216 | * @since 2.0.0 bbPress (r3031) |
| 216 | 217 | * |
| 217 | 218 | * @param array $attr |
| 218 | 219 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 255 | 256 | * Display the forum form in an output buffer and return to ensure |
| 256 | 257 | * post/page contents are displayed first. |
| 257 | 258 | * |
| 258 | | * @since bbPress (r3566) |
| | 259 | * @since 2.1.0 bbPress (r3566) |
| 259 | 260 | * |
| 260 | 261 | * @uses get_template_part() |
| 261 | 262 | */ |
| … |
… |
class BBP_Shortcodes { |
| 277 | 278 | * Display an index of all visible root level topics in an output buffer |
| 278 | 279 | * and return to ensure that post/page contents are displayed first. |
| 279 | 280 | * |
| 280 | | * @since bbPress (r3031) |
| | 281 | * @since 2.0.0 bbPress (r3031) |
| 281 | 282 | * |
| 282 | 283 | * @param array $attr |
| 283 | 284 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 309 | 310 | * Display the contents of a specific topic ID in an output buffer |
| 310 | 311 | * and return to ensure that post/page contents are displayed first. |
| 311 | 312 | * |
| 312 | | * @since bbPress (r3031) |
| | 313 | * @since 2.0.0 bbPress (r3031) |
| 313 | 314 | * |
| 314 | 315 | * @param array $attr |
| 315 | 316 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 375 | 376 | * forum. This currently has styling issues from not being wrapped in |
| 376 | 377 | * <div id="bbpress-forums"></div> which will need to be sorted out later. |
| 377 | 378 | * |
| 378 | | * @since bbPress (r3031) |
| | 379 | * @since 2.0.0 bbPress (r3031) |
| 379 | 380 | * |
| 380 | 381 | * @param array $attr |
| 381 | 382 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 430 | 431 | * Display the contents of a specific reply ID in an output buffer |
| 431 | 432 | * and return to ensure that post/page contents are displayed first. |
| 432 | 433 | * |
| 433 | | * @since bbPress (r3031) |
| | 434 | * @since 2.0.0 bbPress (r3031) |
| 434 | 435 | * |
| 435 | 436 | * @param array $attr |
| 436 | 437 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 492 | 493 | * Display the reply form in an output buffer and return to ensure |
| 493 | 494 | * post/page contents are displayed first. |
| 494 | 495 | * |
| 495 | | * @since bbPress (r3031) |
| | 496 | * @since 2.0.0 bbPress (r3031) |
| 496 | 497 | * |
| 497 | 498 | * @uses get_template_part() |
| 498 | 499 | */ |
| … |
… |
class BBP_Shortcodes { |
| 514 | 515 | * Display a tag cloud of all topic tags in an output buffer and return to |
| 515 | 516 | * ensure that post/page contents are displayed first. |
| 516 | 517 | * |
| 517 | | * @since bbPress (r3110) |
| | 518 | * @since 2.0.0 bbPress (r3110) |
| 518 | 519 | * |
| 519 | 520 | * @return string |
| 520 | 521 | */ |
| … |
… |
class BBP_Shortcodes { |
| 542 | 543 | * Display the contents of a specific topic tag in an output buffer |
| 543 | 544 | * and return to ensure that post/page contents are displayed first. |
| 544 | 545 | * |
| 545 | | * @since bbPress (r3110) |
| | 546 | * @since 2.0.0 bbPress (r3110) |
| 546 | 547 | * |
| 547 | 548 | * @param array $attr |
| 548 | 549 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 581 | 582 | * Display the contents of a specific topic tag in an output buffer |
| 582 | 583 | * and return to ensure that post/page contents are displayed first. |
| 583 | 584 | * |
| 584 | | * @since bbPress (r3346) |
| | 585 | * @since 2.0.0 bbPress (r3346) |
| 585 | 586 | * |
| 586 | 587 | * @param array $attr |
| 587 | 588 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 609 | 610 | * Display the contents of a specific view in an output buffer and return to |
| 610 | 611 | * ensure that post/page contents are displayed first. |
| 611 | 612 | * |
| 612 | | * @since bbPress (r3031) |
| | 613 | * @since 2.0.0 bbPress (r3031) |
| 613 | 614 | * |
| 614 | 615 | * @param array $attr |
| 615 | 616 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 652 | 653 | * Display the search form in an output buffer and return to ensure |
| 653 | 654 | * post/page contents are displayed first. |
| 654 | 655 | * |
| 655 | | * @since bbPress (r4585) |
| | 656 | * @since 2.3.0 bbPress (r4585) |
| 656 | 657 | * |
| 657 | 658 | * @uses get_template_part() |
| 658 | 659 | */ |
| … |
… |
class BBP_Shortcodes { |
| 677 | 678 | * Display the contents of search results in an output buffer and return to |
| 678 | 679 | * ensure that post/page contents are displayed first. |
| 679 | 680 | * |
| 680 | | * @since bbPress (r4579) |
| | 681 | * @since 2.3.0 bbPress (r4579) |
| 681 | 682 | * |
| 682 | 683 | * @param array $attr |
| 683 | 684 | * @param string $content |
| … |
… |
class BBP_Shortcodes { |
| 725 | 726 | /** |
| 726 | 727 | * Display a login form |
| 727 | 728 | * |
| 728 | | * @since bbPress (r3302) |
| | 729 | * @since 2.0.0 bbPress (r3302) |
| 729 | 730 | * |
| 730 | 731 | * @return string |
| 731 | 732 | */ |
| … |
… |
class BBP_Shortcodes { |
| 751 | 752 | /** |
| 752 | 753 | * Display a register form |
| 753 | 754 | * |
| 754 | | * @since bbPress (r3302) |
| | 755 | * @since 2.0.0 bbPress (r3302) |
| 755 | 756 | * |
| 756 | 757 | * @return string |
| 757 | 758 | */ |
| … |
… |
class BBP_Shortcodes { |
| 777 | 778 | /** |
| 778 | 779 | * Display a lost password form |
| 779 | 780 | * |
| 780 | | * @since bbPress (r3302) |
| | 781 | * @since 2.0.0 bbPress (r3302) |
| 781 | 782 | * |
| 782 | 783 | * @return string |
| 783 | 784 | */ |
| … |
… |
class BBP_Shortcodes { |
| 805 | 806 | /** |
| 806 | 807 | * Display forum statistics |
| 807 | 808 | * |
| 808 | | * @since bbPress (r4509) |
| | 809 | * @since 2.3.0 bbPress (r4509) |
| 809 | 810 | * |
| 810 | 811 | * @return shring |
| 811 | 812 | */ |
| … |
… |
class BBP_Shortcodes { |
| 827 | 828 | /** |
| 828 | 829 | * Display a breadcrumb |
| 829 | 830 | * |
| 830 | | * @since bbPress (r3302) |
| | 831 | * @since 2.0.0 bbPress (r3302) |
| 831 | 832 | * |
| 832 | 833 | * @return string |
| 833 | 834 | */ |
| … |
… |
class BBP_Shortcodes { |
| 851 | 852 | /** |
| 852 | 853 | * Filter the query for the topic index |
| 853 | 854 | * |
| 854 | | * @since bbPress (r3637) |
| | 855 | * @since 2.1.0 bbPress (r3637) |
| 855 | 856 | * |
| 856 | 857 | * @param array $args |
| 857 | 858 | * @return array |
| … |
… |
class BBP_Shortcodes { |
| 866 | 867 | /** |
| 867 | 868 | * Filter the query for topic tags |
| 868 | 869 | * |
| 869 | | * @since bbPress (r3637) |
| | 870 | * @since 2.1.0 bbPress (r3637) |
| 870 | 871 | * |
| 871 | 872 | * @param array $args |
| 872 | 873 | * @return array |
-
diff --git src/includes/common/template.php src/includes/common/template.php
index 49486f2..5e938e2 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 18 | 18 | /** |
| 19 | 19 | * Ouput the forum URL |
| 20 | 20 | * |
| 21 | | * @since bbPress (r3979) |
| | 21 | * @since 2.1.0 bbPress (r3979) |
| 22 | 22 | * |
| 23 | 23 | * @uses bbp_get_forums_url() To get the forums URL |
| 24 | 24 | * @param string $path Additional path with leading slash |
| … |
… |
function bbp_forums_url( $path = '/' ) { |
| 29 | 29 | /** |
| 30 | 30 | * Return the forum URL |
| 31 | 31 | * |
| 32 | | * @since bbPress (r3979) |
| | 32 | * @since 2.1.0 bbPress (r3979) |
| 33 | 33 | * |
| 34 | 34 | * @uses home_url() To get the home URL |
| 35 | 35 | * @uses bbp_get_root_slug() To get the forum root location |
| … |
… |
function bbp_forums_url( $path = '/' ) { |
| 42 | 42 | /** |
| 43 | 43 | * Ouput the forum URL |
| 44 | 44 | * |
| 45 | | * @since bbPress (r3979) |
| | 45 | * @since 2.1.0 bbPress (r3979) |
| 46 | 46 | * |
| 47 | 47 | * @uses bbp_get_topics_url() To get the topics URL |
| 48 | 48 | * @param string $path Additional path with leading slash |
| … |
… |
function bbp_topics_url( $path = '/' ) { |
| 53 | 53 | /** |
| 54 | 54 | * Return the forum URL |
| 55 | 55 | * |
| 56 | | * @since bbPress (r3979) |
| | 56 | * @since 2.1.0 bbPress (r3979) |
| 57 | 57 | * |
| 58 | 58 | * @uses home_url() To get the home URL |
| 59 | 59 | * @uses bbp_get_topic_archive_slug() To get the topics archive location |
| … |
… |
function bbp_topics_url( $path = '/' ) { |
| 69 | 69 | /** |
| 70 | 70 | * Add our custom head action to wp_head |
| 71 | 71 | * |
| 72 | | * @since bbPress (r2464) |
| | 72 | * @since 2.0.0 bbPress (r2464) |
| 73 | 73 | * |
| 74 | 74 | * @uses do_action() Calls 'bbp_head' |
| 75 | 75 | */ |
| … |
… |
function bbp_head() { |
| 80 | 80 | /** |
| 81 | 81 | * Add our custom head action to wp_head |
| 82 | 82 | * |
| 83 | | * @since bbPress (r2464) |
| | 83 | * @since 2.0.0 bbPress (r2464) |
| 84 | 84 | * |
| 85 | 85 | * @uses do_action() Calls 'bbp_footer' |
| 86 | 86 | */ |
| … |
… |
function bbp_footer() { |
| 93 | 93 | /** |
| 94 | 94 | * Check if current site is public |
| 95 | 95 | * |
| 96 | | * @since bbPress (r3398) |
| | 96 | * @since 2.0.0 bbPress (r3398) |
| 97 | 97 | * |
| 98 | 98 | * @param int $site_id |
| 99 | 99 | * @uses get_current_blog_id() |
| … |
… |
function bbp_is_site_public( $site_id = 0 ) { |
| 117 | 117 | /** |
| 118 | 118 | * Check if current page is a bbPress forum |
| 119 | 119 | * |
| 120 | | * @since bbPress (r2549) |
| | 120 | * @since 2.0.0 bbPress (r2549) |
| 121 | 121 | * |
| 122 | 122 | * @param int $post_id Possible post_id to check |
| 123 | 123 | * @uses bbp_get_forum_post_type() To get the forum post type |
| … |
… |
function bbp_is_forum( $post_id = 0 ) { |
| 139 | 139 | /** |
| 140 | 140 | * Check if we are viewing a forum archive. |
| 141 | 141 | * |
| 142 | | * @since bbPress (r3251) |
| | 142 | * @since 2.0.0 bbPress (r3251) |
| 143 | 143 | * |
| 144 | 144 | * @uses is_post_type_archive() To check if we are looking at the forum archive |
| 145 | 145 | * @uses bbp_get_forum_post_type() To get the forum post type ID |
| … |
… |
function bbp_is_forum_archive() { |
| 163 | 163 | /** |
| 164 | 164 | * Viewing a single forum |
| 165 | 165 | * |
| 166 | | * @since bbPress (r3338) |
| | 166 | * @since 2.0.0 bbPress (r3338) |
| 167 | 167 | * |
| 168 | 168 | * @uses is_single() |
| 169 | 169 | * @uses bbp_get_forum_post_type() |
| … |
… |
function bbp_is_single_forum() { |
| 193 | 193 | /** |
| 194 | 194 | * Check if current page is a forum edit page |
| 195 | 195 | * |
| 196 | | * @since bbPress (r3553) |
| | 196 | * @since 2.1.0 bbPress (r3553) |
| 197 | 197 | * |
| 198 | 198 | * @uses WP_Query Checks if WP_Query::bbp_is_forum_edit is true |
| 199 | 199 | * @return bool True if it's the forum edit page, false if not |
| … |
… |
function bbp_is_forum_edit() { |
| 219 | 219 | /** |
| 220 | 220 | * Check if current page is a bbPress topic |
| 221 | 221 | * |
| 222 | | * @since bbPress (r2549) |
| | 222 | * @since 2.0.0 bbPress (r2549) |
| 223 | 223 | * |
| 224 | 224 | * @param int $post_id Possible post_id to check |
| 225 | 225 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
function bbp_is_topic( $post_id = 0 ) { |
| 242 | 242 | /** |
| 243 | 243 | * Viewing a single topic |
| 244 | 244 | * |
| 245 | | * @since bbPress (r3338) |
| | 245 | * @since 2.0.0 bbPress (r3338) |
| 246 | 246 | * |
| 247 | 247 | * @uses is_single() |
| 248 | 248 | * @uses bbp_get_topic_post_type() |
| … |
… |
function bbp_is_single_topic() { |
| 272 | 272 | /** |
| 273 | 273 | * Check if we are viewing a topic archive. |
| 274 | 274 | * |
| 275 | | * @since bbPress (r3251) |
| | 275 | * @since 2.0.0 bbPress (r3251) |
| 276 | 276 | * |
| 277 | 277 | * @uses is_post_type_archive() To check if we are looking at the topic archive |
| 278 | 278 | * @uses bbp_get_topic_post_type() To get the topic post type ID |
| … |
… |
function bbp_is_topic_archive() { |
| 295 | 295 | /** |
| 296 | 296 | * Check if current page is a topic edit page |
| 297 | 297 | * |
| 298 | | * @since bbPress (r2753) |
| | 298 | * @since 2.0.0 bbPress (r2753) |
| 299 | 299 | * |
| 300 | 300 | * @uses WP_Query Checks if WP_Query::bbp_is_topic_edit is true |
| 301 | 301 | * @return bool True if it's the topic edit page, false if not |
| … |
… |
function bbp_is_topic_edit() { |
| 321 | 321 | /** |
| 322 | 322 | * Check if current page is a topic merge page |
| 323 | 323 | * |
| 324 | | * @since bbPress (r2756) |
| | 324 | * @since 2.0.0 bbPress (r2756) |
| 325 | 325 | * |
| 326 | 326 | * @uses bbp_is_topic_edit() To check if it's a topic edit page |
| 327 | 327 | * @return bool True if it's the topic merge page, false if not |
| … |
… |
function bbp_is_topic_merge() { |
| 342 | 342 | /** |
| 343 | 343 | * Check if current page is a topic split page |
| 344 | 344 | * |
| 345 | | * @since bbPress (r2756) |
| | 345 | * @since 2.0.0 bbPress (r2756) |
| 346 | 346 | * |
| 347 | 347 | * @uses bbp_is_topic_edit() To check if it's a topic edit page |
| 348 | 348 | * @return bool True if it's the topic split page, false if not |
| … |
… |
function bbp_is_topic_split() { |
| 363 | 363 | /** |
| 364 | 364 | * Check if the current page is a topic tag |
| 365 | 365 | * |
| 366 | | * @since bbPress (r3311) |
| | 366 | * @since 2.0.0 bbPress (r3311) |
| 367 | 367 | * |
| 368 | 368 | * @return bool True if it's a topic tag, false if not |
| 369 | 369 | */ |
| … |
… |
function bbp_is_topic_tag() { |
| 393 | 393 | /** |
| 394 | 394 | * Check if the current page is editing a topic tag |
| 395 | 395 | * |
| 396 | | * @since bbPress (r3346) |
| | 396 | * @since 2.0.0 bbPress (r3346) |
| 397 | 397 | * |
| 398 | 398 | * @uses WP_Query Checks if WP_Query::bbp_is_topic_tag_edit is true |
| 399 | 399 | * @return bool True if editing a topic tag, false if not |
| … |
… |
function bbp_is_topic_tag_edit() { |
| 424 | 424 | /** |
| 425 | 425 | * Check if the current post type is one of bbPress's |
| 426 | 426 | * |
| 427 | | * @since bbPress (r3311) |
| | 427 | * @since 2.0.0 bbPress (r3311) |
| 428 | 428 | * |
| 429 | 429 | * @param mixed $the_post Optional. Post object or post ID. |
| 430 | 430 | * @uses get_post_type() |
| … |
… |
function bbp_is_custom_post_type( $the_post = false ) { |
| 454 | 454 | /** |
| 455 | 455 | * Check if current page is a bbPress reply |
| 456 | 456 | * |
| 457 | | * @since bbPress (r2549) |
| | 457 | * @since 2.0.0 bbPress (r2549) |
| 458 | 458 | * |
| 459 | 459 | * @param int $post_id Possible post_id to check |
| 460 | 460 | * @uses bbp_get_reply_post_type() To get the reply post type |
| … |
… |
function bbp_is_reply( $post_id = 0 ) { |
| 477 | 477 | /** |
| 478 | 478 | * Check if current page is a reply edit page |
| 479 | 479 | * |
| 480 | | * @since bbPress (r2753) |
| | 480 | * @since 2.0.0 bbPress (r2753) |
| 481 | 481 | * |
| 482 | 482 | * @uses WP_Query Checks if WP_Query::bbp_is_reply_edit is true |
| 483 | 483 | * @return bool True if it's the reply edit page, false if not |
| … |
… |
function bbp_is_reply_move() { |
| 522 | 522 | /** |
| 523 | 523 | * Viewing a single reply |
| 524 | 524 | * |
| 525 | | * @since bbPress (r3344) |
| | 525 | * @since 2.0.0 bbPress (r3344) |
| 526 | 526 | * |
| 527 | 527 | * @uses is_single() |
| 528 | 528 | * @uses bbp_get_reply_post_type() |
| … |
… |
function bbp_is_single_reply() { |
| 552 | 552 | /** |
| 553 | 553 | * Check if current page is a bbPress user's favorites page (profile page) |
| 554 | 554 | * |
| 555 | | * @since bbPress (r2652) |
| | 555 | * @since 2.0.0 bbPress (r2652) |
| 556 | 556 | * |
| 557 | 557 | * @return bool True if it's the favorites page, false if not |
| 558 | 558 | */ |
| … |
… |
function bbp_is_favorites() { |
| 573 | 573 | /** |
| 574 | 574 | * Check if current page is a bbPress user's subscriptions page (profile page) |
| 575 | 575 | * |
| 576 | | * @since bbPress (r2652) |
| | 576 | * @since 2.0.0 bbPress (r2652) |
| 577 | 577 | * |
| 578 | 578 | * @return bool True if it's the subscriptions page, false if not |
| 579 | 579 | */ |
| … |
… |
function bbp_is_subscriptions() { |
| 595 | 595 | * Check if current page shows the topics created by a bbPress user (profile |
| 596 | 596 | * page) |
| 597 | 597 | * |
| 598 | | * @since bbPress (r2688) |
| | 598 | * @since 2.0.0 bbPress (r2688) |
| 599 | 599 | * |
| 600 | 600 | * @return bool True if it's the topics created page, false if not |
| 601 | 601 | */ |
| … |
… |
function bbp_is_topics_created() { |
| 617 | 617 | * Check if current page shows the topics created by a bbPress user (profile |
| 618 | 618 | * page) |
| 619 | 619 | * |
| 620 | | * @since bbPress (r4225) |
| | 620 | * @since 2.2.0 bbPress (r4225) |
| 621 | 621 | * |
| 622 | 622 | * @return bool True if it's the topics created page, false if not |
| 623 | 623 | */ |
| … |
… |
function bbp_is_replies_created() { |
| 638 | 638 | /** |
| 639 | 639 | * Check if current page is the currently logged in users author page |
| 640 | 640 | * |
| 641 | | * @since bbPress (r2688) |
| | 641 | * @since 2.0.0 bbPress (r2688) |
| | 642 | * |
| 642 | 643 | * @uses bbp_is_single_user() Check query variable |
| 643 | 644 | * @uses is_user_logged_in() Must be logged in to be home |
| 644 | 645 | * @uses bbp_get_displayed_user_id() |
| … |
… |
function bbp_is_user_home() { |
| 662 | 663 | /** |
| 663 | 664 | * Check if current page is the currently logged in users author edit page |
| 664 | 665 | * |
| 665 | | * @since bbPress (r3918) |
| | 666 | * @since 2.1.0 bbPress (r3918) |
| | 667 | * |
| 666 | 668 | * @uses bbp_is_single_user_edit() Check query variable |
| 667 | 669 | * @uses is_user_logged_in() Must be logged in to be home |
| 668 | 670 | * @uses bbp_get_displayed_user_id() |
| … |
… |
function bbp_is_user_home_edit() { |
| 684 | 686 | /** |
| 685 | 687 | * Check if current page is a user profile page |
| 686 | 688 | * |
| 687 | | * @since bbPress (r2688) |
| | 689 | * @since 2.0.0 bbPress (r2688) |
| 688 | 690 | * |
| 689 | 691 | * @uses WP_Query Checks if WP_Query::bbp_is_single_user is set to true |
| 690 | 692 | * @return bool True if it's a user's profile page, false if not |
| … |
… |
function bbp_is_single_user() { |
| 706 | 708 | /** |
| 707 | 709 | * Check if current page is a user profile edit page |
| 708 | 710 | * |
| 709 | | * @since bbPress (r2688) |
| | 711 | * @since 2.0.0 bbPress (r2688) |
| 710 | 712 | * |
| 711 | 713 | * @uses WP_Query Checks if WP_Query::bbp_is_single_user_edit is set to true |
| 712 | 714 | * @return bool True if it's a user's profile edit page, false if not |
| … |
… |
function bbp_is_single_user_edit() { |
| 728 | 730 | /** |
| 729 | 731 | * Check if current page is a user profile page |
| 730 | 732 | * |
| 731 | | * @since bbPress (r4225) |
| | 733 | * @since 2.2.0 bbPress (r4225) |
| 732 | 734 | * |
| 733 | 735 | * @uses WP_Query Checks if WP_Query::bbp_is_single_user_profile is set to true |
| 734 | 736 | * @return bool True if it's a user's profile page, false if not |
| … |
… |
function bbp_is_single_user_profile() { |
| 750 | 752 | /** |
| 751 | 753 | * Check if current page is a user topics created page |
| 752 | 754 | * |
| 753 | | * @since bbPress (r4225) |
| | 755 | * @since 2.2.0 bbPress (r4225) |
| 754 | 756 | * |
| 755 | 757 | * @uses WP_Query Checks if WP_Query::bbp_is_single_user_topics is set to true |
| 756 | 758 | * @return bool True if it's a user's topics page, false if not |
| … |
… |
function bbp_is_single_user_topics() { |
| 772 | 774 | /** |
| 773 | 775 | * Check if current page is a user replies created page |
| 774 | 776 | * |
| 775 | | * @since bbPress (r4225) |
| | 777 | * @since 2.2.0 bbPress (r4225) |
| 776 | 778 | * |
| 777 | 779 | * @uses WP_Query Checks if WP_Query::bbp_is_single_user_replies is set to true |
| 778 | 780 | * @return bool True if it's a user's replies page, false if not |
| … |
… |
function bbp_is_single_user_replies() { |
| 794 | 796 | /** |
| 795 | 797 | * Check if current page is a view page |
| 796 | 798 | * |
| 797 | | * @since bbPress (r2789) |
| | 799 | * @since 2.0.0 bbPress (r2789) |
| 798 | 800 | * |
| 799 | 801 | * @global WP_Query $wp_query To check if WP_Query::bbp_is_view is true |
| 800 | 802 | * @uses bbp_is_query_name() To get the query name |
| … |
… |
function bbp_is_single_view() { |
| 822 | 824 | /** |
| 823 | 825 | * Check if current page is a search page |
| 824 | 826 | * |
| 825 | | * @since bbPress (r4579) |
| | 827 | * @since 2.3.0 bbPress (r4579) |
| 826 | 828 | * |
| 827 | 829 | * @global WP_Query $wp_query To check if WP_Query::bbp_is_search is true |
| 828 | 830 | * @uses bbp_is_query_name() To get the query name |
| … |
… |
function bbp_is_search() { |
| 860 | 862 | /** |
| 861 | 863 | * Check if current page is a search results page |
| 862 | 864 | * |
| 863 | | * @since bbPress (r4919) |
| | 865 | * @since 2.4.0 bbPress (r4919) |
| 864 | 866 | * |
| 865 | 867 | * @global WP_Query $wp_query To check if WP_Query::bbp_is_search is true |
| 866 | 868 | * @uses bbp_is_query_name() To get the query name |
| … |
… |
function bbp_is_search_results() { |
| 898 | 900 | /** |
| 899 | 901 | * Check if current page is an edit page |
| 900 | 902 | * |
| 901 | | * @since bbPress (r3585) |
| | 903 | * @since 2.1.0 bbPress (r3585) |
| 902 | 904 | * |
| 903 | 905 | * @uses WP_Query Checks if WP_Query::bbp_is_edit is true |
| 904 | 906 | * @return bool True if it's the edit page, false if not |
| … |
… |
function bbp_is_edit() { |
| 920 | 922 | /** |
| 921 | 923 | * Use the above is_() functions to output a body class for each scenario |
| 922 | 924 | * |
| 923 | | * @since bbPress (r2926) |
| | 925 | * @since 2.0.0 bbPress (r2926) |
| 924 | 926 | * |
| 925 | 927 | * @param array $wp_classes |
| 926 | 928 | * @param array $custom_classes |
| … |
… |
function bbp_body_class( $wp_classes, $custom_classes = false ) { |
| 1073 | 1075 | /** |
| 1074 | 1076 | * Use the above is_() functions to return if in any bbPress page |
| 1075 | 1077 | * |
| 1076 | | * @since bbPress (r3344) |
| | 1078 | * @since 2.0.0 bbPress (r3344) |
| 1077 | 1079 | * |
| 1078 | 1080 | * @uses bbp_is_single_forum() |
| 1079 | 1081 | * @uses bbp_is_single_topic() |
| … |
… |
function is_bbpress() { |
| 1188 | 1190 | /** |
| 1189 | 1191 | * Output the login form action url |
| 1190 | 1192 | * |
| 1191 | | * @since bbPress (r2815) |
| | 1193 | * @since 2.0.0 bbPress (r2815) |
| 1192 | 1194 | * |
| 1193 | 1195 | * @param array $args This function supports these arguments: |
| 1194 | 1196 | * - action: The action being taken |
| … |
… |
function bbp_wp_login_action( $args = array() ) { |
| 1204 | 1206 | /** |
| 1205 | 1207 | * Return the login form action url |
| 1206 | 1208 | * |
| 1207 | | * @since bbPress (r5684) |
| | 1209 | * @since 2.6.0 bbPress (r5684) |
| 1208 | 1210 | * |
| 1209 | 1211 | * @param array $args This function supports these arguments: |
| 1210 | 1212 | * - action: The action being taken |
| … |
… |
function bbp_wp_login_action( $args = array() ) { |
| 1242 | 1244 | * The referer link is the current Request URI from the server super global. To |
| 1243 | 1245 | * check the field manually, use bbp_get_redirect_to(). |
| 1244 | 1246 | * |
| 1245 | | * @since bbPress (r2815) |
| | 1247 | * @since 2.0.0 bbPress (r2815) |
| 1246 | 1248 | * |
| 1247 | 1249 | * @param string $redirect_to Pass a URL to redirect to |
| 1248 | 1250 | * |
| … |
… |
function bbp_redirect_to_field( $redirect_to = '' ) { |
| 1274 | 1276 | * Use the $input_type parameter to properly process the value. This |
| 1275 | 1277 | * ensures correct sanitization of the value for the receiving input. |
| 1276 | 1278 | * |
| 1277 | | * @since bbPress (r2815) |
| | 1279 | * @since 2.0.0 bbPress (r2815) |
| 1278 | 1280 | * |
| 1279 | 1281 | * @param string $request Name of $_REQUEST to look for |
| 1280 | 1282 | * @param string $input_type Type of input. Default: text. Accepts: |
| … |
… |
function bbp_sanitize_val( $request = '', $input_type = 'text' ) { |
| 1290 | 1292 | * Use the $input_type parameter to properly process the value. This |
| 1291 | 1293 | * ensures correct sanitization of the value for the receiving input. |
| 1292 | 1294 | * |
| 1293 | | * @since bbPress (r2815) |
| | 1295 | * @since 2.0.0 bbPress (r2815) |
| 1294 | 1296 | * |
| 1295 | 1297 | * @param string $request Name of $_REQUEST to look for |
| 1296 | 1298 | * @param string $input_type Type of input. Default: text. Accepts: |
| … |
… |
function bbp_sanitize_val( $request = '', $input_type = 'text' ) { |
| 1336 | 1338 | * template file. Calling this function will automatically increment the global |
| 1337 | 1339 | * tab index by default. |
| 1338 | 1340 | * |
| 1339 | | * @since bbPress (r2810) |
| 1340 | | * @deprecated since version 2.6 |
| | 1341 | * @since 2.0.0 bbPress (r2810) |
| | 1342 | * |
| | 1343 | * @deprecated 2.6.0 bbPress (r5561) |
| | 1344 | * |
| 1341 | 1345 | * @link https://bbpress.trac.wordpress.org/attachment/ticket/2714 Trac Ticket |
| 1342 | 1346 | * @param int $auto_increment Optional. Default true. Set to false to prevent |
| 1343 | 1347 | * increment |
| … |
… |
function bbp_tab_index( $auto_increment = true ) { |
| 1353 | 1357 | * within a template file. Calling this function will automatically |
| 1354 | 1358 | * increment the global tab index by default. |
| 1355 | 1359 | * |
| 1356 | | * @since bbPress (r2810) |
| 1357 | | * @deprecated bbPress (r5560) |
| | 1360 | * @since 2.0.0 bbPress (r2810) |
| | 1361 | * |
| | 1362 | * @deprecated 2.6.0 bbPress (r5561) |
| | 1363 | * |
| 1358 | 1364 | * @link https://bbpress.trac.wordpress.org/attachment/ticket/2714 Trac Ticket |
| 1359 | 1365 | * @uses apply_filters Allows return value to be filtered |
| 1360 | 1366 | * @param int $auto_increment Optional. Default true. Set to false to |
| … |
… |
function bbp_tab_index( $auto_increment = true ) { |
| 1377 | 1383 | * |
| 1378 | 1384 | * Can be used for any post type, but is mostly used for topics and forums. |
| 1379 | 1385 | * |
| 1380 | | * @since bbPress (r2746) |
| | 1386 | * @since 2.0.0 bbPress (r2746) |
| 1381 | 1387 | * |
| 1382 | 1388 | * @param array $args See {@link bbp_get_dropdown()} for arguments |
| 1383 | 1389 | */ |
| … |
… |
function bbp_dropdown( $args = array() ) { |
| 1388 | 1394 | * Return a select box allowing to pick which forum/topic a new |
| 1389 | 1395 | * topic/reply belongs in. |
| 1390 | 1396 | * |
| 1391 | | * @since bbPress (r2746) |
| | 1397 | * @since 2.0.0 bbPress (r2746) |
| 1392 | 1398 | * |
| 1393 | 1399 | * @param array $args The function supports these args: |
| 1394 | 1400 | * - post_type: Post type, defaults to bbp_get_forum_post_type() (bbp_forum) |
| … |
… |
function bbp_dropdown( $args = array() ) { |
| 1561 | 1567 | /** |
| 1562 | 1568 | * Output the required hidden fields when creating/editing a forum |
| 1563 | 1569 | * |
| 1564 | | * @since bbPress (r3553) |
| | 1570 | * @since 2.1.0 bbPress (r3553) |
| 1565 | 1571 | * |
| 1566 | 1572 | * @uses bbp_is_forum_edit() To check if it's the forum edit page |
| 1567 | 1573 | * @uses wp_nonce_field() To generate hidden nonce fields |
| … |
… |
function bbp_forum_form_fields() { |
| 1604 | 1610 | /** |
| 1605 | 1611 | * Output the required hidden fields when creating/editing a topic |
| 1606 | 1612 | * |
| 1607 | | * @since bbPress (r2753) |
| | 1613 | * @since 2.0.0 bbPress (r2753) |
| 1608 | 1614 | * |
| 1609 | 1615 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 1610 | 1616 | * @uses wp_nonce_field() To generate hidden nonce fields |
| … |
… |
function bbp_topic_form_fields() { |
| 1647 | 1653 | /** |
| 1648 | 1654 | * Output the required hidden fields when creating/editing a reply |
| 1649 | 1655 | * |
| 1650 | | * @since bbPress (r2753) |
| | 1656 | * @since 2.0.0 bbPress (r2753) |
| 1651 | 1657 | * |
| 1652 | 1658 | * @uses bbp_is_reply_edit() To check if it's the reply edit page |
| 1653 | 1659 | * @uses wp_nonce_field() To generate hidden nonce fields |
| … |
… |
function bbp_reply_form_fields() { |
| 1690 | 1696 | /** |
| 1691 | 1697 | * Output the required hidden fields when editing a user |
| 1692 | 1698 | * |
| 1693 | | * @since bbPress (r2690) |
| | 1699 | * @since 2.0.0 bbPress (r2690) |
| 1694 | 1700 | * |
| 1695 | 1701 | * @uses bbp_displayed_user_id() To output the displayed user id |
| 1696 | 1702 | * @uses wp_nonce_field() To generate a hidden referer field |
| … |
… |
function bbp_edit_user_form_fields() { |
| 1709 | 1715 | * |
| 1710 | 1716 | * Output the required hidden fields when merging a topic |
| 1711 | 1717 | * |
| 1712 | | * @since bbPress (r2756) |
| | 1718 | * @since 2.0.0 bbPress (r2756) |
| 1713 | 1719 | * |
| 1714 | 1720 | * @uses wp_nonce_field() To generate a hidden nonce field |
| 1715 | 1721 | * @uses bbp_topic_id() To output the topic id |
| … |
… |
function bbp_merge_topic_form_fields() { |
| 1728 | 1734 | * |
| 1729 | 1735 | * Output the required hidden fields when splitting a topic |
| 1730 | 1736 | * |
| 1731 | | * @since bbPress (r2756) |
| | 1737 | * @since 2.0.0 bbPress (r2756) |
| 1732 | 1738 | * |
| 1733 | 1739 | * @uses wp_nonce_field() To generate a hidden nonce field |
| 1734 | 1740 | */ |
| … |
… |
function bbp_move_reply_form_fields() { |
| 1760 | 1766 | /** |
| 1761 | 1767 | * Output a textarea or TinyMCE if enabled |
| 1762 | 1768 | * |
| 1763 | | * @since bbPress (r3586) |
| | 1769 | * @since 2.1.0 bbPress (r3586) |
| 1764 | 1770 | * |
| 1765 | 1771 | * @param array $args |
| 1766 | 1772 | * @uses bbp_get_the_content() To return the content to output |
| … |
… |
function bbp_the_content( $args = array() ) { |
| 1771 | 1777 | /** |
| 1772 | 1778 | * Return a textarea or TinyMCE if enabled |
| 1773 | 1779 | * |
| 1774 | | * @since bbPress (r3586) |
| | 1780 | * @since 2.1.0 bbPress (r3586) |
| 1775 | 1781 | * |
| 1776 | 1782 | * @param array $args |
| 1777 | 1783 | * |
| … |
… |
function bbp_the_content( $args = array() ) { |
| 1878 | 1884 | /** |
| 1879 | 1885 | * Edit TinyMCE plugins to match core behaviour |
| 1880 | 1886 | * |
| 1881 | | * @since bbPress (r4574) |
| | 1887 | * @since 2.3.0 bbPress (r4574) |
| 1882 | 1888 | * |
| 1883 | 1889 | * @param array $plugins |
| 1884 | 1890 | * @see tiny_mce_plugins, teeny_mce_plugins |
| … |
… |
function bbp_get_tiny_mce_plugins( $plugins = array() ) { |
| 1903 | 1909 | /** |
| 1904 | 1910 | * Edit TeenyMCE buttons to match allowedtags |
| 1905 | 1911 | * |
| 1906 | | * @since bbPress (r4605) |
| | 1912 | * @since 2.3.0 bbPress (r4605) |
| 1907 | 1913 | * |
| 1908 | 1914 | * @param array $buttons |
| 1909 | 1915 | * @see teeny_mce_buttons |
| … |
… |
function bbp_get_teeny_mce_buttons( $buttons = array() ) { |
| 1928 | 1934 | /** |
| 1929 | 1935 | * Edit TinyMCE quicktags buttons to match allowedtags |
| 1930 | 1936 | * |
| 1931 | | * @since bbPress (r4606) |
| | 1937 | * @since 2.3.0 bbPress (r4606) |
| 1932 | 1938 | * |
| 1933 | 1939 | * @param array $settings |
| 1934 | 1940 | * @see quicktags_settings |
| … |
… |
function bbp_get_quicktags_settings( $settings = array() ) { |
| 1957 | 1963 | /** |
| 1958 | 1964 | * Output the view id |
| 1959 | 1965 | * |
| 1960 | | * @since bbPress (r2789) |
| | 1966 | * @since 2.0.0 bbPress (r2789) |
| 1961 | 1967 | * |
| 1962 | 1968 | * @param string $view Optional. View id |
| 1963 | 1969 | * @uses bbp_get_view_id() To get the view id |
| … |
… |
function bbp_view_id( $view = '' ) { |
| 1971 | 1977 | * |
| 1972 | 1978 | * Use view id if supplied, otherwise bbp_get_view_rewrite_id() query var. |
| 1973 | 1979 | * |
| 1974 | | * @since bbPress (r2789) |
| | 1980 | * @since 2.0.0 bbPress (r2789) |
| 1975 | 1981 | * |
| 1976 | 1982 | * @param string $view Optional. View id. |
| 1977 | 1983 | * @uses sanitize_title() To sanitize the view id |
| … |
… |
function bbp_view_id( $view = '' ) { |
| 2000 | 2006 | /** |
| 2001 | 2007 | * Output the view name aka title |
| 2002 | 2008 | * |
| 2003 | | * @since bbPress (r2789) |
| | 2009 | * @since 2.0.0 bbPress (r2789) |
| 2004 | 2010 | * |
| 2005 | 2011 | * @param string $view Optional. View id |
| 2006 | 2012 | * @uses bbp_get_view_title() To get the view title |
| … |
… |
function bbp_view_title( $view = '' ) { |
| 2015 | 2021 | * If a view id is supplied, that is used. Otherwise the bbp_view |
| 2016 | 2022 | * query var is checked for. |
| 2017 | 2023 | * |
| 2018 | | * @since bbPress (r2789) |
| | 2024 | * @since 2.0.0 bbPress (r2789) |
| 2019 | 2025 | * |
| 2020 | 2026 | * @param string $view Optional. View id |
| 2021 | 2027 | * @uses bbp_get_view_id() To get the view id |
| … |
… |
function bbp_view_title( $view = '' ) { |
| 2035 | 2041 | /** |
| 2036 | 2042 | * Output the view url |
| 2037 | 2043 | * |
| 2038 | | * @since bbPress (r2789) |
| | 2044 | * @since 2.0.0 bbPress (r2789) |
| 2039 | 2045 | * |
| 2040 | 2046 | * @param string $view Optional. View id |
| 2041 | 2047 | * @uses bbp_get_view_url() To get the view url |
| … |
… |
function bbp_view_url( $view = false ) { |
| 2046 | 2052 | /** |
| 2047 | 2053 | * Return the view url |
| 2048 | 2054 | * |
| 2049 | | * @since bbPress (r2789) |
| | 2055 | * @since 2.0.0 bbPress (r2789) |
| 2050 | 2056 | * |
| 2051 | 2057 | * @param string $view Optional. View id |
| 2052 | 2058 | * @uses sanitize_title() To sanitize the view id |
| … |
… |
function bbp_view_url( $view = false ) { |
| 2084 | 2090 | /** |
| 2085 | 2091 | * Check the passed parameter against the current _bbp_query_name |
| 2086 | 2092 | * |
| 2087 | | * @since bbPress (r2980) |
| | 2093 | * @since 2.0.0 bbPress (r2980) |
| 2088 | 2094 | * |
| 2089 | 2095 | * @uses bbp_get_query_name() Get the query var '_bbp_query_name' |
| 2090 | 2096 | * @return bool True if match, false if not |
| … |
… |
function bbp_is_query_name( $name = '' ) { |
| 2096 | 2102 | /** |
| 2097 | 2103 | * Get the '_bbp_query_name' setting |
| 2098 | 2104 | * |
| 2099 | | * @since bbPress (r2695) |
| | 2105 | * @since 2.0.0 bbPress (r2695) |
| 2100 | 2106 | * |
| 2101 | 2107 | * @uses get_query_var() To get the query var '_bbp_query_name' |
| 2102 | 2108 | * @return string To return the query var value |
| … |
… |
function bbp_get_query_name() { |
| 2108 | 2114 | /** |
| 2109 | 2115 | * Set the '_bbp_query_name' setting to $name |
| 2110 | 2116 | * |
| 2111 | | * @since bbPress (r2692) |
| | 2117 | * @since 2.0.0 bbPress (r2692) |
| 2112 | 2118 | * |
| 2113 | 2119 | * @param string $name What to set the query var to |
| 2114 | 2120 | * @uses set_query_var() To set the query var '_bbp_query_name' |
| … |
… |
function bbp_set_query_name( $name = '' ) { |
| 2120 | 2126 | /** |
| 2121 | 2127 | * Used to clear the '_bbp_query_name' setting |
| 2122 | 2128 | * |
| 2123 | | * @since bbPress (r2692) |
| | 2129 | * @since 2.0.0 bbPress (r2692) |
| 2124 | 2130 | * |
| 2125 | 2131 | * @uses bbp_set_query_name() To set the query var '_bbp_query_name' value to '' |
| 2126 | 2132 | */ |
| … |
… |
function bbp_reset_query_name() { |
| 2133 | 2139 | /** |
| 2134 | 2140 | * Output the page title as a breadcrumb |
| 2135 | 2141 | * |
| 2136 | | * @since bbPress (r2589) |
| | 2142 | * @since 2.0.0 bbPress (r2589) |
| 2137 | 2143 | * |
| 2138 | 2144 | * @param string $sep Separator. Defaults to '←' |
| 2139 | 2145 | * @param bool $current_page Include the current item |
| … |
… |
function bbp_title_breadcrumb( $args = array() ) { |
| 2147 | 2153 | /** |
| 2148 | 2154 | * Output a breadcrumb |
| 2149 | 2155 | * |
| 2150 | | * @since bbPress (r2589) |
| | 2156 | * @since 2.0.0 bbPress (r2589) |
| 2151 | 2157 | * |
| 2152 | 2158 | * @param string $sep Separator. Defaults to '←' |
| 2153 | 2159 | * @param bool $current_page Include the current item |
| … |
… |
function bbp_breadcrumb( $args = array() ) { |
| 2160 | 2166 | /** |
| 2161 | 2167 | * Return a breadcrumb ( forum -> topic -> reply ) |
| 2162 | 2168 | * |
| 2163 | | * @since bbPress (r2589) |
| | 2169 | * @since 2.0.0 bbPress (r2589) |
| 2164 | 2170 | * |
| 2165 | 2171 | * @param string $sep Separator. Defaults to '←' |
| 2166 | 2172 | * @param bool $current_page Include the current item |
| … |
… |
function bbp_breadcrumb( $args = array() ) { |
| 2448 | 2454 | * This is useful for displaying in the post area, which elements and |
| 2449 | 2455 | * attributes are supported. As well as any plugins which want to display it. |
| 2450 | 2456 | * |
| 2451 | | * @since bbPress (r2780) |
| | 2457 | * @since 2.0.0 bbPress (r2780) |
| 2452 | 2458 | * |
| 2453 | 2459 | * @uses bbp_get_allowed_tags() |
| 2454 | 2460 | */ |
| … |
… |
function bbp_allowed_tags() { |
| 2461 | 2467 | * This is useful for displaying in the post area, which elements and |
| 2462 | 2468 | * attributes are supported. As well as any plugins which want to display it. |
| 2463 | 2469 | * |
| 2464 | | * @since bbPress (r2780) |
| | 2470 | * @since 2.0.0 bbPress (r2780) |
| 2465 | 2471 | * |
| 2466 | 2472 | * @uses bbp_kses_allowed_tags() To get the allowed tags |
| 2467 | 2473 | * @uses apply_filters() Calls 'bbp_allowed_tags' with the tags |
| … |
… |
function bbp_allowed_tags() { |
| 2489 | 2495 | /** |
| 2490 | 2496 | * Display possible errors & messages inside a template file |
| 2491 | 2497 | * |
| 2492 | | * @since bbPress (r2688) |
| | 2498 | * @since 2.0.0 bbPress (r2688) |
| 2493 | 2499 | * |
| 2494 | 2500 | * @uses WP_Error bbPress::errors::get_error_codes() To get the error codes |
| 2495 | 2501 | * @uses WP_Error bbPress::errors::get_error_data() To get the error data |
| … |
… |
function bbp_template_notices() { |
| 2554 | 2560 | /** |
| 2555 | 2561 | * Output the logout link |
| 2556 | 2562 | * |
| 2557 | | * @since bbPress (r2827) |
| | 2563 | * @since 2.0.0 bbPress (r2827) |
| 2558 | 2564 | * |
| 2559 | 2565 | * @param string $redirect_to Redirect to url |
| 2560 | 2566 | * @uses bbp_get_logout_link() To get the logout link |
| … |
… |
function bbp_logout_link( $redirect_to = '' ) { |
| 2565 | 2571 | /** |
| 2566 | 2572 | * Return the logout link |
| 2567 | 2573 | * |
| 2568 | | * @since bbPress (r2827) |
| | 2574 | * @since 2.0.0 bbPress (r2827) |
| 2569 | 2575 | * |
| 2570 | 2576 | * @param string $redirect_to Redirect to url |
| 2571 | 2577 | * @uses wp_logout_url() To get the logout url |
| … |
… |
function bbp_logout_link( $redirect_to = '' ) { |
| 2582 | 2588 | /** |
| 2583 | 2589 | * Custom page title for bbPress pages |
| 2584 | 2590 | * |
| 2585 | | * @since bbPress (r2788) |
| | 2591 | * @since 2.0.0 bbPress (r2788) |
| 2586 | 2592 | * |
| 2587 | 2593 | * @param string $title Optional. The title (not used). |
| 2588 | 2594 | * @param string $sep Optional, default is '»'. How to separate the |
-
diff --git src/includes/common/widgets.php src/includes/common/widgets.php
index b3e0546..c644885 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 17 | 17 | * |
| 18 | 18 | * Adds a widget which displays the login form |
| 19 | 19 | * |
| 20 | | * @since bbPress (r2827) |
| | 20 | * @since 2.0.0 bbPress (r2827) |
| 21 | 21 | * |
| 22 | 22 | * @uses WP_Widget |
| 23 | 23 | */ |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 28 | 28 | * |
| 29 | 29 | * Registers the login widget |
| 30 | 30 | * |
| 31 | | * @since bbPress (r2827) |
| | 31 | * @since 2.0.0 bbPress (r2827) |
| 32 | 32 | * |
| 33 | 33 | * @uses apply_filters() Calls 'bbp_login_widget_options' with the |
| 34 | 34 | * widget options |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 45 | 45 | /** |
| 46 | 46 | * Register the widget |
| 47 | 47 | * |
| 48 | | * @since bbPress (r3389) |
| | 48 | * @since 2.0.0 bbPress (r3389) |
| 49 | 49 | * |
| 50 | 50 | * @uses register_widget() |
| 51 | 51 | */ |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 56 | 56 | /** |
| 57 | 57 | * Displays the output, the login form |
| 58 | 58 | * |
| 59 | | * @since bbPress (r2827) |
| | 59 | * @since 2.0.0 bbPress (r2827) |
| 60 | 60 | * |
| 61 | 61 | * @param array $args Arguments |
| 62 | 62 | * @param array $instance Instance |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 153 | 153 | /** |
| 154 | 154 | * Update the login widget options |
| 155 | 155 | * |
| 156 | | * @since bbPress (r2827) |
| | 156 | * @since 2.0.0 bbPress (r2827) |
| 157 | 157 | * |
| 158 | 158 | * @param array $new_instance The new instance options |
| 159 | 159 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 170 | 170 | /** |
| 171 | 171 | * Output the login widget options form |
| 172 | 172 | * |
| 173 | | * @since bbPress (r2827) |
| | 173 | * @since 2.0.0 bbPress (r2827) |
| 174 | 174 | * |
| 175 | 175 | * @param $instance Instance |
| 176 | 176 | * @uses BBP_Login_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 202 | 202 | /** |
| 203 | 203 | * Merge the widget settings into defaults array. |
| 204 | 204 | * |
| 205 | | * @since bbPress (r4802) |
| | 205 | * @since 2.3.0 bbPress (r4802) |
| 206 | 206 | * |
| 207 | 207 | * @param $instance Instance |
| 208 | 208 | * @uses bbp_parse_args() To merge widget settings into defaults |
| … |
… |
class BBP_Login_Widget extends WP_Widget { |
| 221 | 221 | * |
| 222 | 222 | * Adds a widget which displays the view list |
| 223 | 223 | * |
| 224 | | * @since bbPress (r3020) |
| | 224 | * @since 2.0.0 bbPress (r3020) |
| 225 | 225 | * |
| 226 | 226 | * @uses WP_Widget |
| 227 | 227 | */ |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 232 | 232 | * |
| 233 | 233 | * Registers the view widget |
| 234 | 234 | * |
| 235 | | * @since bbPress (r3020) |
| | 235 | * @since 2.0.0 bbPress (r3020) |
| 236 | 236 | * |
| 237 | 237 | * @uses apply_filters() Calls 'bbp_views_widget_options' with the |
| 238 | 238 | * widget options |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 249 | 249 | /** |
| 250 | 250 | * Register the widget |
| 251 | 251 | * |
| 252 | | * @since bbPress (r3389) |
| | 252 | * @since 2.0.0 bbPress (r3389) |
| 253 | 253 | * |
| 254 | 254 | * @uses register_widget() |
| 255 | 255 | */ |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 260 | 260 | /** |
| 261 | 261 | * Displays the output, the view list |
| 262 | 262 | * |
| 263 | | * @since bbPress (r3020) |
| | 263 | * @since 2.0.0 bbPress (r3020) |
| 264 | 264 | * |
| 265 | 265 | * @param array $args Arguments |
| 266 | 266 | * @param array $instance Instance |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 307 | 307 | /** |
| 308 | 308 | * Update the view widget options |
| 309 | 309 | * |
| 310 | | * @since bbPress (r3020) |
| | 310 | * @since 2.0.0 bbPress (r3020) |
| 311 | 311 | * |
| 312 | 312 | * @param array $new_instance The new instance options |
| 313 | 313 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 322 | 322 | /** |
| 323 | 323 | * Output the view widget options form |
| 324 | 324 | * |
| 325 | | * @since bbPress (r3020) |
| | 325 | * @since 2.0.0 bbPress (r3020) |
| 326 | 326 | * |
| 327 | 327 | * @param $instance Instance |
| 328 | 328 | * @uses BBP_Views_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 345 | 345 | /** |
| 346 | 346 | * Merge the widget settings into defaults array. |
| 347 | 347 | * |
| 348 | | * @since bbPress (r4802) |
| | 348 | * @since 2.3.0 bbPress (r4802) |
| 349 | 349 | * |
| 350 | 350 | * @param $instance Instance |
| 351 | 351 | * @uses bbp_parse_args() To merge widget settings into defaults |
| … |
… |
class BBP_Views_Widget extends WP_Widget { |
| 362 | 362 | * |
| 363 | 363 | * Adds a widget which displays the forum search form |
| 364 | 364 | * |
| 365 | | * @since bbPress (r4579) |
| | 365 | * @since 2.3.0 bbPress (r4579) |
| 366 | 366 | * |
| 367 | 367 | * @uses WP_Widget |
| 368 | 368 | */ |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 373 | 373 | * |
| 374 | 374 | * Registers the search widget |
| 375 | 375 | * |
| 376 | | * @since bbPress (r4579) |
| | 376 | * @since 2.3.0 bbPress (r4579) |
| 377 | 377 | * |
| 378 | 378 | * @uses apply_filters() Calls 'bbp_search_widget_options' with the |
| 379 | 379 | * widget options |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 390 | 390 | /** |
| 391 | 391 | * Register the widget |
| 392 | 392 | * |
| 393 | | * @since bbPress (r4579) |
| | 393 | * @since 2.3.0 bbPress (r4579) |
| 394 | 394 | * |
| 395 | 395 | * @uses register_widget() |
| 396 | 396 | */ |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 401 | 401 | /** |
| 402 | 402 | * Displays the output, the search form |
| 403 | 403 | * |
| 404 | | * @since bbPress (r4579) |
| | 404 | * @since 2.3.0 bbPress (r4579) |
| 405 | 405 | * |
| 406 | 406 | * @uses apply_filters() Calls 'bbp_search_widget_title' with the title |
| 407 | 407 | * @uses get_template_part() To get the search form |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 436 | 436 | /** |
| 437 | 437 | * Update the widget options |
| 438 | 438 | * |
| 439 | | * @since bbPress (r4579) |
| | 439 | * @since 2.3.0 bbPress (r4579) |
| 440 | 440 | * |
| 441 | 441 | * @param array $new_instance The new instance options |
| 442 | 442 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 451 | 451 | /** |
| 452 | 452 | * Output the search widget options form |
| 453 | 453 | * |
| 454 | | * @since bbPress (r4579) |
| | 454 | * @since 2.3.0 bbPress (r4579) |
| 455 | 455 | * |
| 456 | 456 | * @param $instance Instance |
| 457 | 457 | * @uses BBP_Search_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 474 | 474 | /** |
| 475 | 475 | * Merge the widget settings into defaults array. |
| 476 | 476 | * |
| 477 | | * @since bbPress (r4802) |
| | 477 | * @since 2.3.0 bbPress (r4802) |
| 478 | 478 | * |
| 479 | 479 | * @param $instance Instance |
| 480 | 480 | * @uses bbp_parse_args() To merge widget settings into defaults |
| … |
… |
class BBP_Search_Widget extends WP_Widget { |
| 491 | 491 | * |
| 492 | 492 | * Adds a widget which displays the forum list |
| 493 | 493 | * |
| 494 | | * @since bbPress (r2653) |
| | 494 | * @since 2.0.0 bbPress (r2653) |
| 495 | 495 | * |
| 496 | 496 | * @uses WP_Widget |
| 497 | 497 | */ |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 502 | 502 | * |
| 503 | 503 | * Registers the forum widget |
| 504 | 504 | * |
| 505 | | * @since bbPress (r2653) |
| | 505 | * @since 2.0.0 bbPress (r2653) |
| 506 | 506 | * |
| 507 | 507 | * @uses apply_filters() Calls 'bbp_forums_widget_options' with the |
| 508 | 508 | * widget options |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 519 | 519 | /** |
| 520 | 520 | * Register the widget |
| 521 | 521 | * |
| 522 | | * @since bbPress (r3389) |
| | 522 | * @since 2.0.0 bbPress (r3389) |
| 523 | 523 | * |
| 524 | 524 | * @uses register_widget() |
| 525 | 525 | */ |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 530 | 530 | /** |
| 531 | 531 | * Displays the output, the forum list |
| 532 | 532 | * |
| 533 | | * @since bbPress (r2653) |
| | 533 | * @since 2.0.0 bbPress (r2653) |
| 534 | 534 | * |
| 535 | 535 | * @param array $args Arguments |
| 536 | 536 | * @param array $instance Instance |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 603 | 603 | /** |
| 604 | 604 | * Update the forum widget options |
| 605 | 605 | * |
| 606 | | * @since bbPress (r2653) |
| | 606 | * @since 2.0.0 bbPress (r2653) |
| 607 | 607 | * |
| 608 | 608 | * @param array $new_instance The new instance options |
| 609 | 609 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 624 | 624 | /** |
| 625 | 625 | * Output the forum widget options form |
| 626 | 626 | * |
| 627 | | * @since bbPress (r2653) |
| | 627 | * @since 2.0.0 bbPress (r2653) |
| 628 | 628 | * |
| 629 | 629 | * @param $instance Instance |
| 630 | 630 | * @uses BBP_Forums_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 657 | 657 | /** |
| 658 | 658 | * Merge the widget settings into defaults array. |
| 659 | 659 | * |
| 660 | | * @since bbPress (r4802) |
| | 660 | * @since 2.3.0 bbPress (r4802) |
| 661 | 661 | * |
| 662 | 662 | * @param $instance Instance |
| 663 | 663 | * @uses bbp_parse_args() To merge widget settings into defaults |
| … |
… |
class BBP_Forums_Widget extends WP_Widget { |
| 675 | 675 | * |
| 676 | 676 | * Adds a widget which displays the topic list |
| 677 | 677 | * |
| 678 | | * @since bbPress (r2653) |
| | 678 | * @since 2.0.0 bbPress (r2653) |
| 679 | 679 | * |
| 680 | 680 | * @uses WP_Widget |
| 681 | 681 | */ |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 686 | 686 | * |
| 687 | 687 | * Registers the topic widget |
| 688 | 688 | * |
| 689 | | * @since bbPress (r2653) |
| | 689 | * @since 2.0.0 bbPress (r2653) |
| 690 | 690 | * |
| 691 | 691 | * @uses apply_filters() Calls 'bbp_topics_widget_options' with the |
| 692 | 692 | * widget options |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 703 | 703 | /** |
| 704 | 704 | * Register the widget |
| 705 | 705 | * |
| 706 | | * @since bbPress (r3389) |
| | 706 | * @since 2.0.0 bbPress (r3389) |
| 707 | 707 | * |
| 708 | 708 | * @uses register_widget() |
| 709 | 709 | */ |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 714 | 714 | /** |
| 715 | 715 | * Displays the output, the topic list |
| 716 | 716 | * |
| 717 | | * @since bbPress (r2653) |
| | 717 | * @since 2.0.0 bbPress (r2653) |
| 718 | 718 | * |
| 719 | 719 | * @param array $args |
| 720 | 720 | * @param array $instance |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 844 | 844 | /** |
| 845 | 845 | * Update the topic widget options |
| 846 | 846 | * |
| 847 | | * @since bbPress (r2653) |
| | 847 | * @since 2.0.0 bbPress (r2653) |
| 848 | 848 | * |
| 849 | 849 | * @param array $new_instance The new instance options |
| 850 | 850 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 869 | 869 | /** |
| 870 | 870 | * Output the topic widget options form |
| 871 | 871 | * |
| 872 | | * @since bbPress (r2653) |
| | 872 | * @since 2.0.0 bbPress (r2653) |
| 873 | 873 | * |
| 874 | 874 | * @param $instance Instance |
| 875 | 875 | * @uses BBP_Topics_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 911 | 911 | /** |
| 912 | 912 | * Merge the widget settings into defaults array. |
| 913 | 913 | * |
| 914 | | * @since bbPress (r4802) |
| | 914 | * @since 2.3.0 bbPress (r4802) |
| 915 | 915 | * |
| 916 | 916 | * @param $instance Instance |
| 917 | 917 | * @uses bbp_parse_args() To merge widget options into defaults |
| … |
… |
class BBP_Topics_Widget extends WP_Widget { |
| 933 | 933 | * |
| 934 | 934 | * Adds a widget which displays the forum statistics |
| 935 | 935 | * |
| 936 | | * @since bbPress (r4509) |
| | 936 | * @since 2.3.0 bbPress (r4509) |
| 937 | 937 | * |
| 938 | 938 | * @uses WP_Widget |
| 939 | 939 | */ |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 944 | 944 | * |
| 945 | 945 | * Registers the stats widget |
| 946 | 946 | * |
| 947 | | * @since bbPress (r4509) |
| | 947 | * @since 2.3.0 bbPress (r4509) |
| 948 | 948 | * |
| 949 | 949 | * @uses apply_filters() Calls 'bbp_stats_widget_options' with the |
| 950 | 950 | * widget options |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 961 | 961 | /** |
| 962 | 962 | * Register the widget |
| 963 | 963 | * |
| 964 | | * @since bbPress (r4509) |
| | 964 | * @since 2.3.0 bbPress (r4509) |
| 965 | 965 | * |
| 966 | 966 | * @uses register_widget() |
| 967 | 967 | */ |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 972 | 972 | /** |
| 973 | 973 | * Displays the output, the statistics |
| 974 | 974 | * |
| 975 | | * @since bbPress (r4509) |
| | 975 | * @since 2.3.0 bbPress (r4509) |
| 976 | 976 | * |
| 977 | 977 | * @param array $args Arguments |
| 978 | 978 | * @param array $instance Instance |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 1005 | 1005 | /** |
| 1006 | 1006 | * Update the stats widget options |
| 1007 | 1007 | * |
| 1008 | | * @since bbPress (r4509) |
| | 1008 | * @since 2.3.0 bbPress (r4509) |
| 1009 | 1009 | * |
| 1010 | 1010 | * @param array $new_instance The new instance options |
| 1011 | 1011 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 1022 | 1022 | /** |
| 1023 | 1023 | * Output the stats widget options form |
| 1024 | 1024 | * |
| 1025 | | * @since bbPress (r4509) |
| | 1025 | * @since 2.3.0 bbPress (r4509) |
| 1026 | 1026 | * |
| 1027 | 1027 | * @param $instance |
| 1028 | 1028 | * |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 1045 | 1045 | /** |
| 1046 | 1046 | * Merge the widget settings into defaults array. |
| 1047 | 1047 | * |
| 1048 | | * @since bbPress (r4802) |
| | 1048 | * @since 2.3.0 bbPress (r4802) |
| 1049 | 1049 | * |
| 1050 | 1050 | * @param $instance Instance |
| 1051 | 1051 | * @uses bbp_parse_args() To merge widget settings into defaults |
| … |
… |
class BBP_Stats_Widget extends WP_Widget { |
| 1063 | 1063 | * |
| 1064 | 1064 | * Adds a widget which displays the replies list |
| 1065 | 1065 | * |
| 1066 | | * @since bbPress (r2653) |
| | 1066 | * @since 2.0.0 bbPress (r2653) |
| 1067 | 1067 | * |
| 1068 | 1068 | * @uses WP_Widget |
| 1069 | 1069 | */ |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1074 | 1074 | * |
| 1075 | 1075 | * Registers the replies widget |
| 1076 | 1076 | * |
| 1077 | | * @since bbPress (r2653) |
| | 1077 | * @since 2.0.0 bbPress (r2653) |
| 1078 | 1078 | * |
| 1079 | 1079 | * @uses apply_filters() Calls 'bbp_replies_widget_options' with the |
| 1080 | 1080 | * widget options |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1091 | 1091 | /** |
| 1092 | 1092 | * Register the widget |
| 1093 | 1093 | * |
| 1094 | | * @since bbPress (r3389) |
| | 1094 | * @since 2.0.0 bbPress (r3389) |
| 1095 | 1095 | * |
| 1096 | 1096 | * @uses register_widget() |
| 1097 | 1097 | */ |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1102 | 1102 | /** |
| 1103 | 1103 | * Displays the output, the replies list |
| 1104 | 1104 | * |
| 1105 | | * @since bbPress (r2653) |
| | 1105 | * @since 2.0.0 bbPress (r2653) |
| 1106 | 1106 | * |
| 1107 | 1107 | * @param array $args |
| 1108 | 1108 | * @param array $instance |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1209 | 1209 | /** |
| 1210 | 1210 | * Update the reply widget options |
| 1211 | 1211 | * |
| 1212 | | * @since bbPress (r2653) |
| | 1212 | * @since 2.0.0 bbPress (r2653) |
| 1213 | 1213 | * |
| 1214 | 1214 | * @param array $new_instance The new instance options |
| 1215 | 1215 | * @param array $old_instance The old instance options |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1227 | 1227 | /** |
| 1228 | 1228 | * Output the reply widget options form |
| 1229 | 1229 | * |
| 1230 | | * @since bbPress (r2653) |
| | 1230 | * @since 2.0.0 bbPress (r2653) |
| 1231 | 1231 | * |
| 1232 | 1232 | * @param $instance Instance |
| 1233 | 1233 | * @uses BBP_Replies_Widget::get_field_id() To output the field id |
| … |
… |
class BBP_Replies_Widget extends WP_Widget { |
| 1249 | 1249 | /** |
| 1250 | 1250 | * Merge the widget settings into defaults array. |
| 1251 | 1251 | * |
| 1252 | | * @since bbPress (r4802) |
| | 1252 | * @since 2.3.0 bbPress (r4802) |
| 1253 | 1253 | * |
| 1254 | 1254 | * @param $instance Instance |
| 1255 | 1255 | * @uses bbp_parse_args() To merge widget settings into defaults |
-
diff --git src/includes/core/abstraction.php src/includes/core/abstraction.php
index 4d233fc..4ec2b99 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 19 | 19 | /** |
| 20 | 20 | * Lookup and return a global variable |
| 21 | 21 | * |
| 22 | | * @since bbPress (r5814) |
| | 22 | * @since 2.5.8 bbPress (r5814) |
| 23 | 23 | * |
| 24 | 24 | * @param string $name Name of global variable |
| 25 | 25 | * @param string $type Type of variable to check with `is_a()` |
| … |
… |
function bbp_get_global_object( $name = '', $type = '', $default = null ) { |
| 57 | 57 | * class. bbPress supports WordPress's `$wpdb` global by default, and can be |
| 58 | 58 | * filtered to support other configurations if needed. |
| 59 | 59 | * |
| 60 | | * @since bbPress (r5814) |
| | 60 | * @since 2.5.8 bbPress (r5814) |
| 61 | 61 | * |
| 62 | 62 | * @return object |
| 63 | 63 | */ |
| … |
… |
function bbp_db() { |
| 72 | 72 | * rules class. bbPress supports WordPress's `$wp_rewrite` by default, but can |
| 73 | 73 | * be filtered to support other configurations if needed. |
| 74 | 74 | * |
| 75 | | * @since bbPress (r5814) |
| | 75 | * @since 2.5.8 bbPress (r5814) |
| 76 | 76 | * |
| 77 | 77 | * @return object |
| 78 | 78 | */ |
| … |
… |
function bbp_rewrite() { |
| 86 | 86 | /** |
| 87 | 87 | * Get the root URL |
| 88 | 88 | * |
| 89 | | * @since bbPress (r5814) |
| | 89 | * @since 2.5.8 bbPress (r5814) |
| 90 | 90 | * |
| 91 | 91 | * @return string |
| 92 | 92 | */ |
| … |
… |
function bbp_get_root_url() { |
| 97 | 97 | /** |
| 98 | 98 | * Get the slug used for paginated requests |
| 99 | 99 | * |
| 100 | | * @since bbPress (r4926) |
| | 100 | * @since 2.4.0 bbPress (r4926) |
| 101 | 101 | * |
| 102 | 102 | * @return string |
| 103 | 103 | */ |
| … |
… |
function bbp_get_paged_slug() { |
| 108 | 108 | /** |
| 109 | 109 | * Is the environment using pretty URLs? |
| 110 | 110 | * |
| 111 | | * @since bbPress (r5814) |
| | 111 | * @since 2.5.8 bbPress (r5814) |
| 112 | 112 | * |
| 113 | 113 | * @global object $wp_rewrite The WP_Rewrite object |
| 114 | 114 | * |
-
diff --git src/includes/core/cache.php src/includes/core/cache.php
index 4734d13..3f4d6c6 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 25 | 25 | * child posts whenever a parent post is modified. This can cause thousands of |
| 26 | 26 | * cache invalidations to occur on a single edit, which is no good for anyone. |
| 27 | 27 | * |
| 28 | | * @since bbPress (r4011) |
| | 28 | * @since 2.1.0 bbPress (r4011) |
| 29 | 29 | * |
| 30 | 30 | * @package bbPress |
| 31 | 31 | * @subpackage Cache |
| … |
… |
class BBP_Skip_Children { |
| 47 | 47 | /** |
| 48 | 48 | * Hook into the 'pre_post_update' action. |
| 49 | 49 | * |
| 50 | | * @since bbPress (r4011) |
| | 50 | * @since 2.1.0 bbPress (r4011) |
| 51 | 51 | */ |
| 52 | 52 | public function __construct() { |
| 53 | 53 | add_action( 'pre_post_update', array( $this, 'pre_post_update' ) ); |
| … |
… |
class BBP_Skip_Children { |
| 60 | 60 | * post ID to be used later, and adds an action to 'clean_post_cache' that |
| 61 | 61 | * prevents child post caches from being cleared. |
| 62 | 62 | * |
| 63 | | * @since bbPress (r4011) |
| | 63 | * @since 2.1.0 bbPress (r4011) |
| 64 | 64 | * |
| 65 | 65 | * @param int $post_id The post ID being updated |
| 66 | 66 | * @return If invalid post data |
| … |
… |
class BBP_Skip_Children { |
| 84 | 84 | * Skip cache invalidation of related posts if the post ID being invalidated |
| 85 | 85 | * is not the one that was just updated. |
| 86 | 86 | * |
| 87 | | * @since bbPress (r4011) |
| | 87 | * @since 2.1.0 bbPress (r4011) |
| 88 | 88 | * |
| 89 | 89 | * @param int $post_id The post ID of the cache being invalidated |
| 90 | 90 | * @return If invalid post data |
| … |
… |
class BBP_Skip_Children { |
| 112 | 112 | /** |
| 113 | 113 | * Restore the cache invalidation to its previous value. |
| 114 | 114 | * |
| 115 | | * @since bbPress (r4011) |
| | 115 | * @since 2.1.0 bbPress (r4011) |
| | 116 | * |
| 116 | 117 | * @uses wp_suspend_cache_invalidation() |
| 117 | 118 | */ |
| 118 | 119 | public function restore_cache_invalidation() { |
| … |
… |
new BBP_Skip_Children(); |
| 128 | 129 | * |
| 129 | 130 | * Will call to clean the term object cache associated with the post ID. |
| 130 | 131 | * |
| 131 | | * @since bbPress (r4040) |
| | 132 | * @since 2.1.0 bbPress (r4040) |
| 132 | 133 | * |
| 133 | 134 | * @uses do_action() Calls 'bbp_clean_post_cache' on $id |
| 134 | 135 | * @param object|int $_post The post object or ID to remove from the cache |
-
diff --git src/includes/core/capabilities.php src/includes/core/capabilities.php
index 54e698f..a04e036 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 19 | 19 | /** |
| 20 | 20 | * Returns an array of capabilities based on the role that is being requested. |
| 21 | 21 | * |
| 22 | | * @since bbPress (r2994) |
| | 22 | * @since 2.0.0 bbPress (r2994) |
| 23 | 23 | * |
| 24 | 24 | * @todo Map all of these and deprecate |
| 25 | 25 | * |
| … |
… |
function bbp_get_caps_for_role( $role = '' ) { |
| 211 | 211 | /** |
| 212 | 212 | * Adds capabilities to WordPress user roles. |
| 213 | 213 | * |
| 214 | | * @since bbPress (r2608) |
| | 214 | * @since 2.0.0 bbPress (r2608) |
| 215 | 215 | */ |
| 216 | 216 | function bbp_add_caps() { |
| 217 | 217 | |
| … |
… |
function bbp_add_caps() { |
| 228 | 228 | /** |
| 229 | 229 | * Removes capabilities from WordPress user roles. |
| 230 | 230 | * |
| 231 | | * @since bbPress (r2608) |
| | 231 | * @since 2.0.0 bbPress (r2608) |
| 232 | 232 | */ |
| 233 | 233 | function bbp_remove_caps() { |
| 234 | 234 | |
| … |
… |
function bbp_remove_caps() { |
| 245 | 245 | /** |
| 246 | 246 | * Get the `$wp_roles` global without needing to declare it everywhere |
| 247 | 247 | * |
| 248 | | * @since bbPress (r4293) |
| | 248 | * @since 2.2.0 bbPress (r4293) |
| 249 | 249 | * |
| 250 | 250 | * @return WP_Roles |
| 251 | 251 | */ |
| … |
… |
function bbp_get_wp_roles() { |
| 265 | 265 | /** |
| 266 | 266 | * Get the available roles minus bbPress's dynamic roles |
| 267 | 267 | * |
| 268 | | * @since bbPress (r5064) |
| | 268 | * @since 2.4.0 bbPress (r5064) |
| 269 | 269 | * |
| 270 | 270 | * @uses bbp_get_wp_roles() To load and get the $wp_roles global |
| 271 | 271 | * @return array |
| … |
… |
function bbp_get_blog_roles() { |
| 292 | 292 | * |
| 293 | 293 | * We do this to avoid adding these values to the database. |
| 294 | 294 | * |
| 295 | | * @since bbPress (r4290) |
| | 295 | * @since 2.2.0 bbPress (r4290) |
| 296 | 296 | * |
| 297 | 297 | * @uses bbp_get_wp_roles() To load and get the $wp_roles global |
| 298 | 298 | * @uses bbp_get_dynamic_roles() To get and add bbPress's roles to $wp_roles |
| … |
… |
function bbp_add_forums_roles() { |
| 313 | 313 | /** |
| 314 | 314 | * Helper function to add filter to option_wp_user_roles |
| 315 | 315 | * |
| 316 | | * @since bbPress (r4363) |
| | 316 | * @since 2.2.0 bbPress (r4363) |
| 317 | 317 | * |
| 318 | 318 | * @see _bbp_reinit_dynamic_roles() |
| 319 | 319 | */ |
| … |
… |
function bbp_filter_user_roles_option() { |
| 339 | 339 | * @see restore_current_blog() |
| 340 | 340 | * @see WP_Roles::_init() |
| 341 | 341 | * |
| 342 | | * @since bbPress (r4363) |
| | 342 | * @since 2.2.0 bbPress (r4363) |
| 343 | 343 | * |
| 344 | 344 | * @internal Used by bbPress to reinitialize dynamic roles on blog switch |
| 345 | 345 | * |
| … |
… |
function _bbp_reinit_dynamic_roles( $roles = array() ) { |
| 366 | 366 | * only editors or authors. This filter allows admins to delegate |
| 367 | 367 | * user management. |
| 368 | 368 | * |
| 369 | | * @since bbPress (r4284) |
| | 369 | * @since 2.2.0 bbPress (r4284) |
| 370 | 370 | * |
| 371 | 371 | * @return array |
| 372 | 372 | */ |
| … |
… |
function bbp_get_dynamic_roles() { |
| 408 | 408 | /** |
| 409 | 409 | * Gets a translated role name from a role ID |
| 410 | 410 | * |
| 411 | | * @since bbPress (r4792) |
| | 411 | * @since 2.3.0 bbPress (r4792) |
| 412 | 412 | * |
| 413 | 413 | * @param string $role_id |
| 414 | 414 | * @return string Translated role name |
| … |
… |
function bbp_get_dynamic_role_name( $role_id = '' ) { |
| 426 | 426 | * This used to use array_diff_assoc() but it randomly broke before 2.2 release. |
| 427 | 427 | * Need to research what happened, and if there's a way to speed this up. |
| 428 | 428 | * |
| 429 | | * @since bbPress (r4303) |
| | 429 | * @since 2.2.0 bbPress (r4303) |
| 430 | 430 | * |
| 431 | 431 | * @param array $all_roles All registered roles |
| 432 | 432 | * @return array |
| … |
… |
function bbp_filter_blog_editable_roles( $all_roles = array() ) { |
| 452 | 452 | /** |
| 453 | 453 | * The keymaster role for bbPress users |
| 454 | 454 | * |
| 455 | | * @since bbPress (r4284) |
| | 455 | * @since 2.2.0 bbPress (r4284) |
| 456 | 456 | * |
| 457 | 457 | * @uses apply_filters() Allow override of hardcoded keymaster role |
| 458 | 458 | * @return string |
| … |
… |
function bbp_get_keymaster_role() { |
| 464 | 464 | /** |
| 465 | 465 | * The moderator role for bbPress users |
| 466 | 466 | * |
| 467 | | * @since bbPress (r3410) |
| | 467 | * @since 2.0.0 bbPress (r3410) |
| 468 | 468 | * |
| 469 | 469 | * @uses apply_filters() Allow override of hardcoded moderator role |
| 470 | 470 | * @return string |
| … |
… |
function bbp_get_moderator_role() { |
| 476 | 476 | /** |
| 477 | 477 | * The participant role for registered user that can participate in forums |
| 478 | 478 | * |
| 479 | | * @since bbPress (r3410) |
| | 479 | * @since 2.0.0 bbPress (r3410) |
| 480 | 480 | * |
| 481 | 481 | * @uses apply_filters() Allow override of hardcoded participant role |
| 482 | 482 | * @return string |
| … |
… |
function bbp_get_participant_role() { |
| 488 | 488 | /** |
| 489 | 489 | * The spectator role is for registered users without any capabilities |
| 490 | 490 | * |
| 491 | | * @since bbPress (r3860) |
| | 491 | * @since 2.1.0 bbPress (r3860) |
| 492 | 492 | * |
| 493 | 493 | * @uses apply_filters() Allow override of hardcoded spectator role |
| 494 | 494 | * @return string |
| … |
… |
function bbp_get_spectator_role() { |
| 500 | 500 | /** |
| 501 | 501 | * The blocked role is for registered users that cannot spectate or participate |
| 502 | 502 | * |
| 503 | | * @since bbPress (r4284) |
| | 503 | * @since 2.2.0 bbPress (r4284) |
| 504 | 504 | * |
| 505 | 505 | * @uses apply_filters() Allow override of hardcoded blocked role |
| 506 | 506 | * @return string |
| … |
… |
function bbp_get_blocked_role() { |
| 512 | 512 | /** |
| 513 | 513 | * Adds bbPress-specific user roles. |
| 514 | 514 | * |
| 515 | | * @since bbPress (r2741) |
| 516 | | * @deprecated since version 2.2 |
| | 515 | * @since 2.0.0 bbPress (r2741) |
| | 516 | * |
| | 517 | * @deprecated 2.2.0 bbPress (r4164) |
| 517 | 518 | */ |
| 518 | 519 | function bbp_add_roles() { |
| 519 | 520 | _doing_it_wrong( 'bbp_add_roles', __( 'Editable forum roles no longer exist.', 'bbpress' ), '2.2' ); |
| … |
… |
function bbp_add_roles() { |
| 528 | 529 | * @see bbp_do_uninstall() |
| 529 | 530 | * @see bbp_version_updater() |
| 530 | 531 | * |
| 531 | | * @since bbPress (r2741) |
| | 532 | * @since 2.0.0 bbPress (r2741) |
| 532 | 533 | */ |
| 533 | 534 | function bbp_remove_roles() { |
| 534 | 535 | |
-
diff --git src/includes/core/extend.php src/includes/core/extend.php
index f19d0b1..bf94800 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 16 | 16 | /** |
| 17 | 17 | * Loads Akismet inside the bbPress global class |
| 18 | 18 | * |
| 19 | | * @since bbPress (r3277) |
| | 19 | * @since 2.0.0 bbPress (r3277) |
| 20 | 20 | * |
| 21 | 21 | * @return If bbPress is not active |
| 22 | 22 | */ |
| … |
… |
function bbp_setup_akismet() { |
| 43 | 43 | * Requires and creates the BuddyPress extension, and adds component creation |
| 44 | 44 | * action to bp_init hook. @see bbp_setup_buddypress_component() |
| 45 | 45 | * |
| 46 | | * @since bbPress (r3395) |
| | 46 | * @since 2.0.0 bbPress (r3395) |
| | 47 | * |
| 47 | 48 | * @return If BuddyPress is not active |
| 48 | 49 | */ |
| 49 | 50 | function bbp_setup_buddypress() { |
| … |
… |
function bbp_setup_buddypress() { |
| 53 | 54 | /** |
| 54 | 55 | * Helper for BuddyPress 1.6 and earlier |
| 55 | 56 | * |
| 56 | | * @since bbPress (r4395) |
| | 57 | * @since 2.2.0 bbPress (r4395) |
| | 58 | * |
| 57 | 59 | * @return BuddyPress |
| 58 | 60 | */ |
| 59 | 61 | function buddypress() { |
-
diff --git src/includes/core/filters.php src/includes/core/filters.php
index 28b2dcd..1289968 100644
|
|
|
add_filter( 'bbp_map_meta_caps', 'bbp_map_reply_meta_caps', 10, 4 ); // Repl |
| 273 | 273 | /** |
| 274 | 274 | * Deprecated locale filter |
| 275 | 275 | * |
| 276 | | * @since bbPress (r4213) |
| | 276 | * @since 2.2.0 bbPress (r4213) |
| 277 | 277 | * |
| 278 | 278 | * @param string $locale |
| 279 | 279 | * @return string $domain |
| … |
… |
add_filter( 'bbp_plugin_locale', '_bbp_filter_locale', 10, 1 ); |
| 292 | 292 | /** |
| 293 | 293 | * Deprecated forums query filter |
| 294 | 294 | * |
| 295 | | * @since bbPress (r3961) |
| | 295 | * @since 2.1.0 bbPress (r3961) |
| | 296 | * |
| 296 | 297 | * @param array $args |
| 297 | 298 | * @return array |
| 298 | 299 | */ |
| … |
… |
add_filter( 'bbp_after_has_forums_parse_args', '_bbp_has_forums_query' ); |
| 304 | 305 | /** |
| 305 | 306 | * Deprecated topics query filter |
| 306 | 307 | * |
| 307 | | * @since bbPress (r3961) |
| | 308 | * @since 2.1.0 bbPress (r3961) |
| | 309 | * |
| 308 | 310 | * @param array $args |
| 309 | 311 | * @return array |
| 310 | 312 | */ |
| … |
… |
add_filter( 'bbp_after_has_topics_parse_args', '_bbp_has_topics_query' ); |
| 316 | 318 | /** |
| 317 | 319 | * Deprecated replies query filter |
| 318 | 320 | * |
| 319 | | * @since bbPress (r3961) |
| | 321 | * @since 2.1.0 bbPress (r3961) |
| | 322 | * |
| 320 | 323 | * @param array $args |
| 321 | 324 | * @return array |
| 322 | 325 | */ |
-
diff --git src/includes/core/functions.php src/includes/core/functions.php
index b871317..585a9fa 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Output the bbPress version |
| 17 | 17 | * |
| 18 | | * @since bbPress (r3468) |
| | 18 | * @since 2.0.0 bbPress (r3468) |
| | 19 | * |
| 19 | 20 | * @uses bbp_get_version() To get the bbPress version |
| 20 | 21 | */ |
| 21 | 22 | function bbp_version() { |
| … |
… |
function bbp_version() { |
| 24 | 25 | /** |
| 25 | 26 | * Return the bbPress version |
| 26 | 27 | * |
| 27 | | * @since bbPress (r3468) |
| | 28 | * @since 2.0.0 bbPress (r3468) |
| | 29 | * |
| 28 | 30 | * @retrun string The bbPress version |
| 29 | 31 | */ |
| 30 | 32 | function bbp_get_version() { |
| … |
… |
function bbp_version() { |
| 34 | 36 | /** |
| 35 | 37 | * Output the bbPress database version |
| 36 | 38 | * |
| 37 | | * @since bbPress (r3468) |
| | 39 | * @since 2.0.0 bbPress (r3468) |
| | 40 | * |
| 38 | 41 | * @uses bbp_get_version() To get the bbPress version |
| 39 | 42 | */ |
| 40 | 43 | function bbp_db_version() { |
| … |
… |
function bbp_db_version() { |
| 43 | 46 | /** |
| 44 | 47 | * Return the bbPress database version |
| 45 | 48 | * |
| 46 | | * @since bbPress (r3468) |
| | 49 | * @since 2.0.0 bbPress (r3468) |
| | 50 | * |
| 47 | 51 | * @retrun string The bbPress version |
| 48 | 52 | */ |
| 49 | 53 | function bbp_get_db_version() { |
| … |
… |
function bbp_db_version() { |
| 53 | 57 | /** |
| 54 | 58 | * Output the bbPress database version directly from the database |
| 55 | 59 | * |
| 56 | | * @since bbPress (r3468) |
| | 60 | * @since 2.0.0 bbPress (r3468) |
| | 61 | * |
| 57 | 62 | * @uses bbp_get_version() To get the current bbPress version |
| 58 | 63 | */ |
| 59 | 64 | function bbp_db_version_raw() { |
| … |
… |
function bbp_db_version_raw() { |
| 62 | 67 | /** |
| 63 | 68 | * Return the bbPress database version directly from the database |
| 64 | 69 | * |
| 65 | | * @since bbPress (r3468) |
| | 70 | * @since 2.0.0 bbPress (r3468) |
| | 71 | * |
| 66 | 72 | * @retrun string The current bbPress version |
| 67 | 73 | */ |
| 68 | 74 | function bbp_get_db_version_raw() { |
| … |
… |
function bbp_db_version_raw() { |
| 74 | 80 | /** |
| 75 | 81 | * Update a posts' forum meta ID |
| 76 | 82 | * |
| 77 | | * @since bbPress (r3181) |
| | 83 | * @since 2.0.0 bbPress (r3181) |
| 78 | 84 | * |
| 79 | 85 | * @param int $post_id The post to update |
| 80 | 86 | * @param int $forum_id The forum |
| … |
… |
function bbp_update_forum_id( $post_id, $forum_id ) { |
| 93 | 99 | /** |
| 94 | 100 | * Update a posts' topic meta ID |
| 95 | 101 | * |
| 96 | | * @since bbPress (r3181) |
| | 102 | * @since 2.0.0 bbPress (r3181) |
| 97 | 103 | * |
| 98 | 104 | * @param int $post_id The post to update |
| 99 | 105 | * @param int $topic_id The topic |
| … |
… |
function bbp_update_topic_id( $post_id, $topic_id ) { |
| 112 | 118 | /** |
| 113 | 119 | * Update a posts' reply meta ID |
| 114 | 120 | * |
| 115 | | * @since bbPress (r3181) |
| | 121 | * @since 2.0.0 bbPress (r3181) |
| 116 | 122 | * |
| 117 | 123 | * @param int $post_id The post to update |
| 118 | 124 | * @param int $reply_id The reply |
| … |
… |
function bbp_update_reply_id( $post_id, $reply_id ) { |
| 131 | 137 | /** |
| 132 | 138 | * Update a posts' reply-to meta ID |
| 133 | 139 | * |
| 134 | | * @since bbPress (r5735) |
| | 140 | * @since 2.6.0 bbPress (r5735) |
| 135 | 141 | * |
| 136 | 142 | * @param int $post_id The post to update |
| 137 | 143 | * @param int $reply_id The reply ID |
| … |
… |
function bbp_update_reply_to_id( $post_id, $reply_id ) { |
| 154 | 160 | * |
| 155 | 161 | * Does nothing much other than return the {@link $bbp->views} variable |
| 156 | 162 | * |
| 157 | | * @since bbPress (r2789) |
| | 163 | * @since 2.0.0 bbPress (r2789) |
| 158 | 164 | * |
| 159 | 165 | * @return array Views |
| 160 | 166 | */ |
| … |
… |
function bbp_get_views() { |
| 165 | 171 | /** |
| 166 | 172 | * Register a bbPress view |
| 167 | 173 | * |
| 168 | | * @since bbPress (r2789) |
| | 174 | * @since 2.0.0 bbPress (r2789) |
| 169 | 175 | * |
| 170 | 176 | * @param string $view View name |
| 171 | 177 | * @param string $title View title |
| … |
… |
function bbp_register_view( $view, $title, $query_args = '', $feed = true, $capa |
| 211 | 217 | /** |
| 212 | 218 | * Deregister a bbPress view |
| 213 | 219 | * |
| 214 | | * @since bbPress (r2789) |
| | 220 | * @since 2.0.0 bbPress (r2789) |
| 215 | 221 | * |
| 216 | 222 | * @param string $view View name |
| 217 | 223 | * @uses sanitize_title() To sanitize the view name |
| … |
… |
function bbp_deregister_view( $view ) { |
| 233 | 239 | /** |
| 234 | 240 | * Run the view's query |
| 235 | 241 | * |
| 236 | | * @since bbPress (r2789) |
| | 242 | * @since 2.0.0 bbPress (r2789) |
| 237 | 243 | * |
| 238 | 244 | * @param string $view Optional. View id |
| 239 | 245 | * @param mixed $new_args New arguments. See {@link bbp_has_topics()} |
| … |
… |
function bbp_view_query( $view = '', $new_args = '' ) { |
| 263 | 269 | /** |
| 264 | 270 | * Return the view's query arguments |
| 265 | 271 | * |
| 266 | | * @since bbPress (r2789) |
| | 272 | * @since 2.0.0 bbPress (r2789) |
| 267 | 273 | * |
| 268 | 274 | * @param string $view View name |
| 269 | 275 | * @uses bbp_get_view_id() To get the view id |
| … |
… |
function bbp_get_view_query_args( $view ) { |
| 283 | 289 | /** |
| 284 | 290 | * Adds an error message to later be output in the theme |
| 285 | 291 | * |
| 286 | | * @since bbPress (r3381) |
| | 292 | * @since 2.0.0 bbPress (r3381) |
| 287 | 293 | * |
| 288 | 294 | * @see WP_Error() |
| 289 | 295 | * @uses WP_Error::add(); |
| … |
… |
function bbp_add_error( $code = '', $message = '', $data = '' ) { |
| 299 | 305 | /** |
| 300 | 306 | * Check if error messages exist in queue |
| 301 | 307 | * |
| 302 | | * @since bbPress (r3381) |
| | 308 | * @since 2.0.0 bbPress (r3381) |
| 303 | 309 | * |
| 304 | 310 | * @see WP_Error() |
| 305 | 311 | * |
| … |
… |
function bbp_has_errors() { |
| 320 | 326 | * Moved into its own function to allow filtering of the regex pattern |
| 321 | 327 | * anywhere mentions might be used. |
| 322 | 328 | * |
| 323 | | * @since bbPress (r4997) |
| | 329 | * @since 2.4.0 bbPress (r4997) |
| | 330 | * |
| 324 | 331 | * @return string Pattern to match usernames with |
| 325 | 332 | */ |
| 326 | 333 | function bbp_find_mentions_pattern() { |
| … |
… |
function bbp_find_mentions_pattern() { |
| 330 | 337 | /** |
| 331 | 338 | * Searches through the content to locate usernames, designated by an @ sign. |
| 332 | 339 | * |
| 333 | | * @since bbPress (r4323) |
| | 340 | * @since 2.2.0 bbPress (r4323) |
| 334 | 341 | * |
| 335 | 342 | * @param string $content The content |
| 336 | 343 | * @return bool|array $usernames Existing usernames. False if no matches. |
| … |
… |
function bbp_find_mentions( $content = '' ) { |
| 351 | 358 | /** |
| 352 | 359 | * Finds and links @-mentioned users in the content |
| 353 | 360 | * |
| 354 | | * @since bbPress (r4323) |
| | 361 | * @since 2.2.0 bbPress (r4323) |
| 355 | 362 | * |
| 356 | 363 | * @uses bbp_find_mentions() To get usernames in content areas |
| 357 | 364 | * @return string $content Content filtered for mentions |
| … |
… |
function bbp_mention_filter( $content = '' ) { |
| 386 | 393 | /** |
| 387 | 394 | * Return the public post status ID |
| 388 | 395 | * |
| 389 | | * @since bbPress (r3504) |
| | 396 | * @since 2.0.0 bbPress (r3504) |
| 390 | 397 | * |
| 391 | 398 | * @return string |
| 392 | 399 | */ |
| … |
… |
function bbp_get_public_status_id() { |
| 397 | 404 | /** |
| 398 | 405 | * Return the pending post status ID |
| 399 | 406 | * |
| 400 | | * @since bbPress (r3581) |
| | 407 | * @since 2.1.0 bbPress (r3581) |
| 401 | 408 | * |
| 402 | 409 | * @return string |
| 403 | 410 | */ |
| … |
… |
function bbp_get_pending_status_id() { |
| 408 | 415 | /** |
| 409 | 416 | * Return the private post status ID |
| 410 | 417 | * |
| 411 | | * @since bbPress (r3504) |
| | 418 | * @since 2.0.0 bbPress (r3504) |
| 412 | 419 | * |
| 413 | 420 | * @return string |
| 414 | 421 | */ |
| … |
… |
function bbp_get_private_status_id() { |
| 419 | 426 | /** |
| 420 | 427 | * Return the hidden post status ID |
| 421 | 428 | * |
| 422 | | * @since bbPress (r3504) |
| | 429 | * @since 2.0.0 bbPress (r3504) |
| 423 | 430 | * |
| 424 | 431 | * @return string |
| 425 | 432 | */ |
| … |
… |
function bbp_get_hidden_status_id() { |
| 430 | 437 | /** |
| 431 | 438 | * Return the closed post status ID |
| 432 | 439 | * |
| 433 | | * @since bbPress (r3504) |
| | 440 | * @since 2.0.0 bbPress (r3504) |
| 434 | 441 | * |
| 435 | 442 | * @return string |
| 436 | 443 | */ |
| … |
… |
function bbp_get_closed_status_id() { |
| 441 | 448 | /** |
| 442 | 449 | * Return the spam post status ID |
| 443 | 450 | * |
| 444 | | * @since bbPress (r3504) |
| | 451 | * @since 2.0.0 bbPress (r3504) |
| 445 | 452 | * |
| 446 | 453 | * @return string |
| 447 | 454 | */ |
| … |
… |
function bbp_get_spam_status_id() { |
| 452 | 459 | /** |
| 453 | 460 | * Return the trash post status ID |
| 454 | 461 | * |
| 455 | | * @since bbPress (r3504) |
| | 462 | * @since 2.0.0 bbPress (r3504) |
| 456 | 463 | * |
| 457 | 464 | * @return string |
| 458 | 465 | */ |
| … |
… |
function bbp_get_trash_status_id() { |
| 463 | 470 | /** |
| 464 | 471 | * Return the orphan post status ID |
| 465 | 472 | * |
| 466 | | * @since bbPress (r3504) |
| | 473 | * @since 2.0.0 bbPress (r3504) |
| 467 | 474 | * |
| 468 | 475 | * @return string |
| 469 | 476 | */ |
| … |
… |
function bbp_get_orphan_status_id() { |
| 476 | 483 | /** |
| 477 | 484 | * Return the unique ID for user profile rewrite rules |
| 478 | 485 | * |
| 479 | | * @since bbPress (r3762) |
| | 486 | * @since 2.1.0 bbPress (r3762) |
| | 487 | * |
| 480 | 488 | * @return string |
| 481 | 489 | */ |
| 482 | 490 | function bbp_get_user_rewrite_id() { |
| … |
… |
function bbp_get_user_rewrite_id() { |
| 486 | 494 | /** |
| 487 | 495 | * Return the unique ID for all edit rewrite rules (forum|topic|reply|tag|user) |
| 488 | 496 | * |
| 489 | | * @since bbPress (r3762) |
| | 497 | * @since 2.1.0 bbPress (r3762) |
| | 498 | * |
| 490 | 499 | * @return string |
| 491 | 500 | */ |
| 492 | 501 | function bbp_get_edit_rewrite_id() { |
| … |
… |
function bbp_get_edit_rewrite_id() { |
| 496 | 505 | /** |
| 497 | 506 | * Return the unique ID for all search rewrite rules |
| 498 | 507 | * |
| 499 | | * @since bbPress (r4579) |
| | 508 | * @since 2.3.0 bbPress (r4579) |
| 500 | 509 | * |
| 501 | 510 | * @return string |
| 502 | 511 | */ |
| … |
… |
function bbp_get_search_rewrite_id() { |
| 507 | 516 | /** |
| 508 | 517 | * Return the unique ID for user topics rewrite rules |
| 509 | 518 | * |
| 510 | | * @since bbPress (r4321) |
| | 519 | * @since 2.2.0 bbPress (r4321) |
| | 520 | * |
| 511 | 521 | * @return string |
| 512 | 522 | */ |
| 513 | 523 | function bbp_get_user_topics_rewrite_id() { |
| … |
… |
function bbp_get_user_topics_rewrite_id() { |
| 517 | 527 | /** |
| 518 | 528 | * Return the unique ID for user replies rewrite rules |
| 519 | 529 | * |
| 520 | | * @since bbPress (r4321) |
| | 530 | * @since 2.2.0 bbPress (r4321) |
| | 531 | * |
| 521 | 532 | * @return string |
| 522 | 533 | */ |
| 523 | 534 | function bbp_get_user_replies_rewrite_id() { |
| … |
… |
function bbp_get_user_replies_rewrite_id() { |
| 527 | 538 | /** |
| 528 | 539 | * Return the unique ID for user caps rewrite rules |
| 529 | 540 | * |
| 530 | | * @since bbPress (r4181) |
| | 541 | * @since 2.2.0 bbPress (r4181) |
| | 542 | * |
| 531 | 543 | * @return string |
| 532 | 544 | */ |
| 533 | 545 | function bbp_get_user_favorites_rewrite_id() { |
| … |
… |
function bbp_get_user_favorites_rewrite_id() { |
| 537 | 549 | /** |
| 538 | 550 | * Return the unique ID for user caps rewrite rules |
| 539 | 551 | * |
| 540 | | * @since bbPress (r4181) |
| | 552 | * @since 2.2.0 bbPress (r4181) |
| | 553 | * |
| 541 | 554 | * @return string |
| 542 | 555 | */ |
| 543 | 556 | function bbp_get_user_subscriptions_rewrite_id() { |
| … |
… |
function bbp_get_user_subscriptions_rewrite_id() { |
| 547 | 560 | /** |
| 548 | 561 | * Return the unique ID for topic view rewrite rules |
| 549 | 562 | * |
| 550 | | * @since bbPress (r3762) |
| | 563 | * @since 2.1.0 bbPress (r3762) |
| | 564 | * |
| 551 | 565 | * @return string |
| 552 | 566 | */ |
| 553 | 567 | function bbp_get_view_rewrite_id() { |
| … |
… |
function bbp_get_view_rewrite_id() { |
| 559 | 573 | /** |
| 560 | 574 | * Get the id used for paginated requests |
| 561 | 575 | * |
| 562 | | * @since bbPress (r4926) |
| | 576 | * @since 2.4.0 bbPress (r4926) |
| | 577 | * |
| 563 | 578 | * @return string |
| 564 | 579 | */ |
| 565 | 580 | function bbp_get_paged_rewrite_id() { |
| … |
… |
function bbp_get_paged_rewrite_id() { |
| 570 | 585 | * Delete a blogs rewrite rules, so that they are automatically rebuilt on |
| 571 | 586 | * the subsequent page load. |
| 572 | 587 | * |
| 573 | | * @since bbPress (r4198) |
| | 588 | * @since 2.2.0 bbPress (r4198) |
| 574 | 589 | */ |
| 575 | 590 | function bbp_delete_rewrite_rules() { |
| 576 | 591 | delete_option( 'rewrite_rules' ); |
| … |
… |
function bbp_delete_rewrite_rules() { |
| 581 | 596 | /** |
| 582 | 597 | * Return true|false if this is a POST request |
| 583 | 598 | * |
| 584 | | * @since bbPress (r4790) |
| | 599 | * @since 2.3.0 bbPress (r4790) |
| | 600 | * |
| 585 | 601 | * @return bool |
| 586 | 602 | */ |
| 587 | 603 | function bbp_is_post_request() { |
| … |
… |
function bbp_is_post_request() { |
| 591 | 607 | /** |
| 592 | 608 | * Return true|false if this is a GET request |
| 593 | 609 | * |
| 594 | | * @since bbPress (r4790) |
| | 610 | * @since 2.3.0 bbPress (r4790) |
| | 611 | * |
| 595 | 612 | * @return bool |
| 596 | 613 | */ |
| 597 | 614 | function bbp_is_get_request() { |
| … |
… |
function bbp_is_get_request() { |
| 608 | 625 | * is empty, we can safely redirect back to the forum root. This might change |
| 609 | 626 | * in a future version, possibly to the site root. |
| 610 | 627 | * |
| 611 | | * @since bbPress (r5658) |
| | 628 | * @since 2.6.0 bbPress (r5658) |
| 612 | 629 | * |
| 613 | 630 | * @uses wp_safe_redirect() |
| 614 | 631 | * @uses bbp_get_forums_url() |
-
diff --git src/includes/core/options.php src/includes/core/options.php
index 9cb9a0c..01c6562 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | * |
| 16 | 16 | * These option |
| 17 | 17 | * |
| 18 | | * @since bbPress (r3421) |
| | 18 | * @since 2.0.0 bbPress (r3421) |
| | 19 | * |
| 19 | 20 | * @return array Filtered option names and values |
| 20 | 21 | */ |
| 21 | 22 | function bbp_get_default_options() { |
| … |
… |
function bbp_get_default_options() { |
| 117 | 118 | * Hooked to bbp_activate, it is only called once when bbPress is activated. |
| 118 | 119 | * This is non-destructive, so existing settings will not be overridden. |
| 119 | 120 | * |
| 120 | | * @since bbPress (r3421) |
| | 121 | * @since 2.0.0 bbPress (r3421) |
| | 122 | * |
| 121 | 123 | * @uses bbp_get_default_options() To get default options |
| 122 | 124 | * @uses add_option() Adds default options |
| 123 | 125 | * @uses do_action() Calls 'bbp_add_options' |
| … |
… |
function bbp_add_options() { |
| 139 | 141 | * Hooked to bbp_uninstall, it is only called once when bbPress is uninstalled. |
| 140 | 142 | * This is destructive, so existing settings will be destroyed. |
| 141 | 143 | * |
| 142 | | * @since bbPress (r3421) |
| | 144 | * @since 2.0.0 bbPress (r3421) |
| | 145 | * |
| 143 | 146 | * @uses bbp_get_default_options() To get default options |
| 144 | 147 | * @uses delete_option() Removes default options |
| 145 | 148 | * @uses do_action() Calls 'bbp_delete_options' |
| … |
… |
function bbp_delete_options() { |
| 159 | 162 | * Add filters to each bbPress option and allow them to be overloaded from |
| 160 | 163 | * inside the $bbp->options array. |
| 161 | 164 | * |
| 162 | | * @since bbPress (r3451) |
| | 165 | * @since 2.0.0 bbPress (r3451) |
| | 166 | * |
| 163 | 167 | * @uses bbp_get_default_options() To get default options |
| 164 | 168 | * @uses add_filter() To add filters to 'pre_option_{$key}' |
| 165 | 169 | * @uses do_action() Calls 'bbp_add_option_filters' |
| … |
… |
function bbp_setup_option_filters() { |
| 179 | 183 | * Filter default options and allow them to be overloaded from inside the |
| 180 | 184 | * $bbp->options array. |
| 181 | 185 | * |
| 182 | | * @since bbPress (r3451) |
| | 186 | * @since 2.0.0 bbPress (r3451) |
| | 187 | * |
| 183 | 188 | * @param bool $value Optional. Default value false |
| 184 | 189 | * @return mixed false if not overloaded, mixed if set |
| 185 | 190 | */ |
| … |
… |
function bbp_pre_get_option( $value = '' ) { |
| 202 | 207 | /** |
| 203 | 208 | * Checks if favorites feature is enabled. |
| 204 | 209 | * |
| 205 | | * @since bbPress (r2658) |
| | 210 | * @since 2.0.0 bbPress (r2658) |
| | 211 | * |
| 206 | 212 | * @param $default bool Optional.Default value true |
| 207 | 213 | * @uses get_option() To get the favorites option |
| 208 | 214 | * @return bool Is favorites enabled or not |
| … |
… |
function bbp_is_favorites_active( $default = 1 ) { |
| 214 | 220 | /** |
| 215 | 221 | * Checks if subscription feature is enabled. |
| 216 | 222 | * |
| 217 | | * @since bbPress (r2658) |
| | 223 | * @since 2.0.0 bbPress (r2658) |
| | 224 | * |
| 218 | 225 | * @param $default bool Optional.Default value true |
| 219 | 226 | * @uses get_option() To get the subscriptions option |
| 220 | 227 | * @return bool Is subscription enabled or not |
| … |
… |
function bbp_is_subscriptions_active( $default = 1 ) { |
| 226 | 233 | /** |
| 227 | 234 | * Are topic tags allowed |
| 228 | 235 | * |
| 229 | | * @since bbPress (r4097) |
| | 236 | * @since 2.2.0 bbPress (r4097) |
| | 237 | * |
| 230 | 238 | * @param $default bool Optional. Default value true |
| 231 | 239 | * @uses get_option() To get the allow tags |
| 232 | 240 | * @return bool Are tags allowed? |
| … |
… |
function bbp_allow_topic_tags( $default = 1 ) { |
| 238 | 246 | /** |
| 239 | 247 | * Are per-forum moderators allowed |
| 240 | 248 | * |
| 241 | | * @since bbPress (r5834) |
| | 249 | * @since 2.6.0 bbPress (r5834) |
| 242 | 250 | * |
| 243 | 251 | * @param bool $default Optional. Default value true. |
| 244 | 252 | * @uses get_option() To get the allow per-forum moderators |
| … |
… |
function bbp_allow_forum_mods( $default = 1 ) { |
| 252 | 260 | /** |
| 253 | 261 | * Is forum-wide searching allowed |
| 254 | 262 | * |
| 255 | | * @since bbPress (r4970) |
| | 263 | * @since 2.4.0 bbPress (r4970) |
| | 264 | * |
| 256 | 265 | * @param $default bool Optional. Default value true |
| 257 | 266 | * @uses get_option() To get the forum-wide search setting |
| 258 | 267 | * @return bool Is forum-wide searching allowed? |
| … |
… |
function bbp_allow_search( $default = 1 ) { |
| 264 | 273 | /** |
| 265 | 274 | * Are replies threaded |
| 266 | 275 | * |
| 267 | | * @since bbPress (r4944) |
| | 276 | * @since 2.4.0 bbPress (r4944) |
| 268 | 277 | * |
| 269 | 278 | * @param bool $default Optional. Default value true |
| 270 | 279 | * @uses apply_filters() Calls 'bbp_thread_replies' with the calculated value and |
| … |
… |
function bbp_thread_replies() { |
| 283 | 292 | /** |
| 284 | 293 | * Are threaded replies allowed |
| 285 | 294 | * |
| 286 | | * @since bbPress (r4964) |
| | 295 | * @since 2.4.0 bbPress (r4964) |
| | 296 | * |
| 287 | 297 | * @param $default bool Optional. Default value false |
| 288 | 298 | * @uses get_option() To get the threaded replies setting |
| 289 | 299 | * @return bool Are threaded replies allowed? |
| … |
… |
function bbp_allow_threaded_replies( $default = 0 ) { |
| 295 | 305 | /** |
| 296 | 306 | * Maximum reply thread depth |
| 297 | 307 | * |
| 298 | | * @since bbPress (r4944) |
| | 308 | * @since 2.4.0 bbPress (r4944) |
| 299 | 309 | * |
| 300 | 310 | * @param int $default Thread replies depth |
| 301 | 311 | * @uses apply_filters() Calls 'bbp_thread_replies_depth' with the option value and |
| … |
… |
function bbp_thread_replies_depth( $default = 2 ) { |
| 310 | 320 | /** |
| 311 | 321 | * Are topic and reply revisions allowed |
| 312 | 322 | * |
| 313 | | * @since bbPress (r3412) |
| | 323 | * @since 2.0.0 bbPress (r3412) |
| | 324 | * |
| 314 | 325 | * @param $default bool Optional. Default value true |
| 315 | 326 | * @uses get_option() To get the allow revisions |
| 316 | 327 | * @return bool Are revisions allowed? |
| … |
… |
function bbp_allow_revisions( $default = 1 ) { |
| 322 | 333 | /** |
| 323 | 334 | * Is the anonymous posting allowed? |
| 324 | 335 | * |
| 325 | | * @since bbPress (r2659) |
| | 336 | * @since 2.0.0 bbPress (r2659) |
| | 337 | * |
| 326 | 338 | * @param $default bool Optional. Default value |
| 327 | 339 | * @uses get_option() To get the allow anonymous option |
| 328 | 340 | * @return bool Is anonymous posting allowed? |
| … |
… |
function bbp_allow_anonymous( $default = 0 ) { |
| 334 | 346 | /** |
| 335 | 347 | * Is this forum available to all users on all sites in this installation? |
| 336 | 348 | * |
| 337 | | * @since bbPress (r3378) |
| | 349 | * @since 2.0.0 bbPress (r3378) |
| | 350 | * |
| 338 | 351 | * @param $default bool Optional. Default value false |
| 339 | 352 | * @uses get_option() To get the global access option |
| 340 | 353 | * @return bool Is global access allowed? |
| … |
… |
function bbp_allow_global_access( $default = 1 ) { |
| 346 | 359 | /** |
| 347 | 360 | * Is this forum available to all users on all sites in this installation? |
| 348 | 361 | * |
| 349 | | * @since bbPress (r4294) |
| | 362 | * @since 2.2.0 bbPress (r4294) |
| | 363 | * |
| 350 | 364 | * @param $default string Optional. Default value empty |
| 351 | 365 | * @uses get_option() To get the default forums role option |
| 352 | 366 | * @return string The default forums user role |
| … |
… |
function bbp_get_default_role( $default = 'bbp_participant' ) { |
| 358 | 372 | /** |
| 359 | 373 | * Use the WordPress editor if available |
| 360 | 374 | * |
| 361 | | * @since bbPress (r3386) |
| | 375 | * @since 2.0.0 bbPress (r3386) |
| | 376 | * |
| 362 | 377 | * @param $default bool Optional. Default value true |
| 363 | 378 | * @uses get_option() To get the WP editor option |
| 364 | 379 | * @return bool Use WP editor? |
| … |
… |
function bbp_use_wp_editor( $default = 1 ) { |
| 370 | 385 | /** |
| 371 | 386 | * Use WordPress's oEmbed API |
| 372 | 387 | * |
| 373 | | * @since bbPress (r3752) |
| | 388 | * @since 2.1.0 bbPress (r3752) |
| | 389 | * |
| 374 | 390 | * @param $default bool Optional. Default value true |
| 375 | 391 | * @uses get_option() To get the oEmbed option |
| 376 | 392 | * @return bool Use oEmbed? |
| … |
… |
function bbp_use_autoembed( $default = 1 ) { |
| 382 | 398 | /** |
| 383 | 399 | * Get the current theme package ID |
| 384 | 400 | * |
| 385 | | * @since bbPress (r3829) |
| | 401 | * @since 2.1.0 bbPress (r3829) |
| | 402 | * |
| 386 | 403 | * @param $default string Optional. Default value 'default' |
| 387 | 404 | * @uses get_option() To get the subtheme option |
| 388 | 405 | * @return string ID of the subtheme |
| … |
… |
function bbp_get_theme_package_id( $default = 'default' ) { |
| 394 | 411 | /** |
| 395 | 412 | * Output the maximum length of a title |
| 396 | 413 | * |
| 397 | | * @since bbPress (r3246) |
| | 414 | * @since 2.0.0 bbPress (r3246) |
| | 415 | * |
| 398 | 416 | * @param $default bool Optional. Default value 80 |
| 399 | 417 | */ |
| 400 | 418 | function bbp_title_max_length( $default = 80 ) { |
| … |
… |
function bbp_title_max_length( $default = 80 ) { |
| 403 | 421 | /** |
| 404 | 422 | * Return the maximum length of a title |
| 405 | 423 | * |
| 406 | | * @since bbPress (r3246) |
| | 424 | * @since 2.0.0 bbPress (r3246) |
| | 425 | * |
| 407 | 426 | * @param $default bool Optional. Default value 80 |
| 408 | 427 | * @uses get_option() To get the maximum title length |
| 409 | 428 | * @return int Is anonymous posting allowed? |
| … |
… |
function bbp_title_max_length( $default = 80 ) { |
| 415 | 434 | /** |
| 416 | 435 | * Output the grop forums root parent forum id |
| 417 | 436 | * |
| 418 | | * @since bbPress (r3575) |
| | 437 | * @since 2.1.0 bbPress (r3575) |
| | 438 | * |
| 419 | 439 | * @param $default int Optional. Default value |
| 420 | 440 | */ |
| 421 | 441 | function bbp_group_forums_root_id( $default = 0 ) { |
| … |
… |
function bbp_group_forums_root_id( $default = 0 ) { |
| 424 | 444 | /** |
| 425 | 445 | * Return the grop forums root parent forum id |
| 426 | 446 | * |
| 427 | | * @since bbPress (r3575) |
| | 447 | * @since 2.1.0 bbPress (r3575) |
| | 448 | * |
| 428 | 449 | * @param $default bool Optional. Default value 0 |
| 429 | 450 | * @uses get_option() To get the root group forum ID |
| 430 | 451 | * @return int The post ID for the root forum |
| … |
… |
function bbp_group_forums_root_id( $default = 0 ) { |
| 436 | 457 | /** |
| 437 | 458 | * Checks if BuddyPress Group Forums are enabled |
| 438 | 459 | * |
| 439 | | * @since bbPress (r3575) |
| | 460 | * @since 2.1.0 bbPress (r3575) |
| | 461 | * |
| 440 | 462 | * @param $default bool Optional. Default value true |
| 441 | 463 | * @uses get_option() To get the group forums option |
| 442 | 464 | * @return bool Is group forums enabled or not |
| … |
… |
function bbp_is_group_forums_active( $default = 1 ) { |
| 448 | 470 | /** |
| 449 | 471 | * Checks if Akismet is enabled |
| 450 | 472 | * |
| 451 | | * @since bbPress (r3575) |
| | 473 | * @since 2.1.0 bbPress (r3575) |
| | 474 | * |
| 452 | 475 | * @param $default bool Optional. Default value true |
| 453 | 476 | * @uses get_option() To get the Akismet option |
| 454 | 477 | * @return bool Is Akismet enabled or not |
| … |
… |
function bbp_is_akismet_active( $default = 1 ) { |
| 460 | 483 | /** |
| 461 | 484 | * Integrate settings into existing WordPress pages |
| 462 | 485 | * |
| 463 | | * @since bbPress (r4932) |
| | 486 | * @since 2.4.0 bbPress (r4932) |
| | 487 | * |
| 464 | 488 | * @param $default bool Optional. Default value false |
| 465 | 489 | * @uses get_option() To get the admin integration setting |
| 466 | 490 | * @return bool To deeply integrate settings, or not |
| … |
… |
function bbp_settings_integration( $default = 0 ) { |
| 474 | 498 | /** |
| 475 | 499 | * Return the root slug |
| 476 | 500 | * |
| 477 | | * @since bbPress (r3759) |
| | 501 | * @since 2.1.0 bbPress (r3759) |
| | 502 | * |
| 478 | 503 | * @return string |
| 479 | 504 | */ |
| 480 | 505 | function bbp_get_root_slug( $default = 'forums' ) { |
| … |
… |
function bbp_get_root_slug( $default = 'forums' ) { |
| 484 | 509 | /** |
| 485 | 510 | * Are we including the root slug in front of forum pages? |
| 486 | 511 | * |
| 487 | | * @since bbPress (r3759) |
| | 512 | * @since 2.1.0 bbPress (r3759) |
| | 513 | * |
| 488 | 514 | * @return bool |
| 489 | 515 | */ |
| 490 | 516 | function bbp_include_root_slug( $default = 1 ) { |
| … |
… |
function bbp_include_root_slug( $default = 1 ) { |
| 494 | 520 | /** |
| 495 | 521 | * Return the search slug |
| 496 | 522 | * |
| 497 | | * @since bbPress (r4932) |
| | 523 | * @since 2.4.0 bbPress (r4932) |
| 498 | 524 | * |
| 499 | 525 | * @return string |
| 500 | 526 | */ |
| … |
… |
function bbp_show_on_root( $default = 'forums' ) { |
| 505 | 531 | /** |
| 506 | 532 | * Maybe return the root slug, based on whether or not it's included in the url |
| 507 | 533 | * |
| 508 | | * @since bbPress (r3759) |
| | 534 | * @since 2.1.0 bbPress (r3759) |
| | 535 | * |
| 509 | 536 | * @return string |
| 510 | 537 | */ |
| 511 | 538 | function bbp_maybe_get_root_slug() { |
| … |
… |
function bbp_maybe_get_root_slug() { |
| 521 | 548 | /** |
| 522 | 549 | * Return the single forum slug |
| 523 | 550 | * |
| 524 | | * @since bbPress (r3759) |
| | 551 | * @since 2.1.0 bbPress (r3759) |
| | 552 | * |
| 525 | 553 | * @return string |
| 526 | 554 | */ |
| 527 | 555 | function bbp_get_forum_slug( $default = 'forum' ) { |
| … |
… |
function bbp_get_forum_slug( $default = 'forum' ) { |
| 531 | 559 | /** |
| 532 | 560 | * Return the topic archive slug |
| 533 | 561 | * |
| 534 | | * @since bbPress (r3759) |
| | 562 | * @since 2.1.0 bbPress (r3759) |
| | 563 | * |
| 535 | 564 | * @return string |
| 536 | 565 | */ |
| 537 | 566 | function bbp_get_topic_archive_slug( $default = 'topics' ) { |
| … |
… |
function bbp_get_topic_archive_slug( $default = 'topics' ) { |
| 541 | 570 | /** |
| 542 | 571 | * Return the reply archive slug |
| 543 | 572 | * |
| 544 | | * @since bbPress (r4925) |
| | 573 | * @since 2.4.0 bbPress (r4925) |
| | 574 | * |
| 545 | 575 | * @return string |
| 546 | 576 | */ |
| 547 | 577 | function bbp_get_reply_archive_slug( $default = 'replies' ) { |
| … |
… |
function bbp_get_reply_archive_slug( $default = 'replies' ) { |
| 551 | 581 | /** |
| 552 | 582 | * Return the single topic slug |
| 553 | 583 | * |
| 554 | | * @since bbPress (r3759) |
| | 584 | * @since 2.1.0 bbPress (r3759) |
| | 585 | * |
| 555 | 586 | * @return string |
| 556 | 587 | */ |
| 557 | 588 | function bbp_get_topic_slug( $default = 'topic' ) { |
| … |
… |
function bbp_get_topic_slug( $default = 'topic' ) { |
| 561 | 592 | /** |
| 562 | 593 | * Return the topic-tag taxonomy slug |
| 563 | 594 | * |
| 564 | | * @since bbPress (r3759) |
| | 595 | * @since 2.1.0 bbPress (r3759) |
| | 596 | * |
| 565 | 597 | * @return string |
| 566 | 598 | */ |
| 567 | 599 | function bbp_get_topic_tag_tax_slug( $default = 'topic-tag' ) { |
| … |
… |
function bbp_get_topic_tag_tax_slug( $default = 'topic-tag' ) { |
| 571 | 603 | /** |
| 572 | 604 | * Return the single reply slug (used mostly for editing) |
| 573 | 605 | * |
| 574 | | * @since bbPress (r3759) |
| | 606 | * @since 2.1.0 bbPress (r3759) |
| | 607 | * |
| 575 | 608 | * @return string |
| 576 | 609 | */ |
| 577 | 610 | function bbp_get_reply_slug( $default = 'reply' ) { |
| … |
… |
function bbp_get_reply_slug( $default = 'reply' ) { |
| 581 | 614 | /** |
| 582 | 615 | * Return the single user slug |
| 583 | 616 | * |
| 584 | | * @since bbPress (r3759) |
| | 617 | * @since 2.1.0 bbPress (r3759) |
| | 618 | * |
| 585 | 619 | * @return string |
| 586 | 620 | */ |
| 587 | 621 | function bbp_get_user_slug( $default = 'user' ) { |
| … |
… |
function bbp_get_user_slug( $default = 'user' ) { |
| 591 | 625 | /** |
| 592 | 626 | * Return the single user favorites slug |
| 593 | 627 | * |
| 594 | | * @since bbPress (r4187) |
| | 628 | * @since 2.2.0 bbPress (r4187) |
| | 629 | * |
| 595 | 630 | * @return string |
| 596 | 631 | */ |
| 597 | 632 | function bbp_get_user_favorites_slug( $default = 'favorites' ) { |
| … |
… |
function bbp_get_user_favorites_slug( $default = 'favorites' ) { |
| 601 | 636 | /** |
| 602 | 637 | * Return the single user subscriptions slug |
| 603 | 638 | * |
| 604 | | * @since bbPress (r4187) |
| | 639 | * @since 2.2.0 bbPress (r4187) |
| | 640 | * |
| 605 | 641 | * @return string |
| 606 | 642 | */ |
| 607 | 643 | function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) { |
| … |
… |
function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) { |
| 611 | 647 | /** |
| 612 | 648 | * Return the topic view slug |
| 613 | 649 | * |
| 614 | | * @since bbPress (r3759) |
| | 650 | * @since 2.1.0 bbPress (r3759) |
| | 651 | * |
| 615 | 652 | * @return string |
| 616 | 653 | */ |
| 617 | 654 | function bbp_get_view_slug( $default = 'view' ) { |
| … |
… |
function bbp_get_view_slug( $default = 'view' ) { |
| 621 | 658 | /** |
| 622 | 659 | * Return the search slug |
| 623 | 660 | * |
| 624 | | * @since bbPress (r4579) |
| | 661 | * @since 2.3.0 bbPress (r4579) |
| 625 | 662 | * |
| 626 | 663 | * @return string |
| 627 | 664 | */ |
| … |
… |
function bbp_get_search_slug( $default = 'search' ) { |
| 634 | 671 | /** |
| 635 | 672 | * Checks if there is a previous BuddyPress Forum configuration |
| 636 | 673 | * |
| 637 | | * @since bbPress (r3790) |
| | 674 | * @since 2.1.0 bbPress (r3790) |
| | 675 | * |
| 638 | 676 | * @param $default string Optional. Default empty string |
| 639 | 677 | * @uses get_option() To get the old bb-config.php location |
| 640 | 678 | * @return string The location of the bb-config.php file, if any |
-
diff --git src/includes/core/sub-actions.php src/includes/core/sub-actions.php
index f87bdb5..a50d70a 100644
|
|
|
|
| 25 | 25 | /** |
| 26 | 26 | * Runs on bbPress activation |
| 27 | 27 | * |
| 28 | | * @since bbPress (r2509) |
| | 28 | * @since 2.0.0 bbPress (r2509) |
| | 29 | * |
| 29 | 30 | * @uses register_uninstall_hook() To register our own uninstall hook |
| 30 | 31 | * @uses do_action() Calls 'bbp_activation' hook |
| 31 | 32 | */ |
| … |
… |
function bbp_activation() { |
| 36 | 37 | /** |
| 37 | 38 | * Runs on bbPress deactivation |
| 38 | 39 | * |
| 39 | | * @since bbPress (r2509) |
| | 40 | * @since 2.0.0 bbPress (r2509) |
| | 41 | * |
| 40 | 42 | * @uses do_action() Calls 'bbp_deactivation' hook |
| 41 | 43 | */ |
| 42 | 44 | function bbp_deactivation() { |
| … |
… |
function bbp_deactivation() { |
| 46 | 48 | /** |
| 47 | 49 | * Runs when uninstalling bbPress |
| 48 | 50 | * |
| 49 | | * @since bbPress (r2509) |
| | 51 | * @since 2.0.0 bbPress (r2509) |
| | 52 | * |
| 50 | 53 | * @uses do_action() Calls 'bbp_uninstall' hook |
| 51 | 54 | */ |
| 52 | 55 | function bbp_uninstall() { |
| … |
… |
function bbp_uninstall() { |
| 58 | 61 | /** |
| 59 | 62 | * Main action responsible for constants, globals, and includes |
| 60 | 63 | * |
| 61 | | * @since bbPress (r2599) |
| | 64 | * @since 2.0.0 bbPress (r2599) |
| | 65 | * |
| 62 | 66 | * @uses do_action() Calls 'bbp_loaded' |
| 63 | 67 | */ |
| 64 | 68 | function bbp_loaded() { |
| … |
… |
function bbp_loaded() { |
| 68 | 72 | /** |
| 69 | 73 | * Setup constants |
| 70 | 74 | * |
| 71 | | * @since bbPress (r2599) |
| | 75 | * @since 2.0.0 bbPress (r2599) |
| | 76 | * |
| 72 | 77 | * @uses do_action() Calls 'bbp_constants' |
| 73 | 78 | */ |
| 74 | 79 | function bbp_constants() { |
| … |
… |
function bbp_constants() { |
| 78 | 83 | /** |
| 79 | 84 | * Setup globals BEFORE includes |
| 80 | 85 | * |
| 81 | | * @since bbPress (r2599) |
| | 86 | * @since 2.0.0 bbPress (r2599) |
| | 87 | * |
| 82 | 88 | * @uses do_action() Calls 'bbp_boot_strap_globals' |
| 83 | 89 | */ |
| 84 | 90 | function bbp_boot_strap_globals() { |
| … |
… |
function bbp_boot_strap_globals() { |
| 88 | 94 | /** |
| 89 | 95 | * Include files |
| 90 | 96 | * |
| 91 | | * @since bbPress (r2599) |
| | 97 | * @since 2.0.0 bbPress (r2599) |
| | 98 | * |
| 92 | 99 | * @uses do_action() Calls 'bbp_includes' |
| 93 | 100 | */ |
| 94 | 101 | function bbp_includes() { |
| … |
… |
function bbp_includes() { |
| 98 | 105 | /** |
| 99 | 106 | * Setup globals AFTER includes |
| 100 | 107 | * |
| 101 | | * @since bbPress (r2599) |
| | 108 | * @since 2.0.0 bbPress (r2599) |
| | 109 | * |
| 102 | 110 | * @uses do_action() Calls 'bbp_setup_globals' |
| 103 | 111 | */ |
| 104 | 112 | function bbp_setup_globals() { |
| … |
… |
function bbp_setup_globals() { |
| 108 | 116 | /** |
| 109 | 117 | * Register any objects before anything is initialized |
| 110 | 118 | * |
| 111 | | * @since bbPress (r4180) |
| | 119 | * @since 2.2.0 bbPress (r4180) |
| | 120 | * |
| 112 | 121 | * @uses do_action() Calls 'bbp_register' |
| 113 | 122 | */ |
| 114 | 123 | function bbp_register() { |
| … |
… |
function bbp_register() { |
| 118 | 127 | /** |
| 119 | 128 | * Initialize any code after everything has been loaded |
| 120 | 129 | * |
| 121 | | * @since bbPress (r2599) |
| | 130 | * @since 2.0.0 bbPress (r2599) |
| | 131 | * |
| 122 | 132 | * @uses do_action() Calls 'bbp_init' |
| 123 | 133 | */ |
| 124 | 134 | function bbp_init() { |
| … |
… |
function bbp_init() { |
| 128 | 138 | /** |
| 129 | 139 | * Initialize widgets |
| 130 | 140 | * |
| 131 | | * @since bbPress (r3389) |
| | 141 | * @since 2.0.0 bbPress (r3389) |
| | 142 | * |
| 132 | 143 | * @uses do_action() Calls 'bbp_widgets_init' |
| 133 | 144 | */ |
| 134 | 145 | function bbp_widgets_init() { |
| … |
… |
function bbp_widgets_init() { |
| 143 | 154 | * @link https://bbpress.trac.wordpress.org/ticket/2309 |
| 144 | 155 | * @link https://core.trac.wordpress.org/ticket/24169 |
| 145 | 156 | * |
| 146 | | * @since bbPress (r2695) |
| | 157 | * @since 2.0.0 bbPress (r2695) |
| | 158 | * |
| 147 | 159 | * @uses did_action() To make sure the user isn't loaded out of order |
| 148 | 160 | * @uses do_action() Calls 'bbp_setup_current_user' |
| 149 | 161 | */ |
| … |
… |
function bbp_setup_current_user() { |
| 163 | 175 | /** |
| 164 | 176 | * Load translations for current language |
| 165 | 177 | * |
| 166 | | * @since bbPress (r2599) |
| | 178 | * @since 2.0.0 bbPress (r2599) |
| | 179 | * |
| 167 | 180 | * @uses do_action() Calls 'bbp_load_textdomain' |
| 168 | 181 | */ |
| 169 | 182 | function bbp_load_textdomain() { |
| … |
… |
function bbp_load_textdomain() { |
| 173 | 186 | /** |
| 174 | 187 | * Setup the post types |
| 175 | 188 | * |
| 176 | | * @since bbPress (r2464) |
| | 189 | * @since 2.0.0 bbPress (r2464) |
| | 190 | * |
| 177 | 191 | * @uses do_action() Calls 'bbp_register_post_type' |
| 178 | 192 | */ |
| 179 | 193 | function bbp_register_post_types() { |
| … |
… |
function bbp_register_post_types() { |
| 183 | 197 | /** |
| 184 | 198 | * Setup the post statuses |
| 185 | 199 | * |
| 186 | | * @since bbPress (r2727) |
| | 200 | * @since 2.0.0 bbPress (r2727) |
| | 201 | * |
| 187 | 202 | * @uses do_action() Calls 'bbp_register_post_statuses' |
| 188 | 203 | */ |
| 189 | 204 | function bbp_register_post_statuses() { |
| … |
… |
function bbp_register_post_statuses() { |
| 193 | 208 | /** |
| 194 | 209 | * Register the built in bbPress taxonomies |
| 195 | 210 | * |
| 196 | | * @since bbPress (r2464) |
| | 211 | * @since 2.0.0 bbPress (r2464) |
| | 212 | * |
| 197 | 213 | * @uses do_action() Calls 'bbp_register_taxonomies' |
| 198 | 214 | */ |
| 199 | 215 | function bbp_register_taxonomies() { |
| … |
… |
function bbp_register_taxonomies() { |
| 203 | 219 | /** |
| 204 | 220 | * Register the default bbPress views |
| 205 | 221 | * |
| 206 | | * @since bbPress (r2789) |
| | 222 | * @since 2.0.0 bbPress (r2789) |
| | 223 | * |
| 207 | 224 | * @uses do_action() Calls 'bbp_register_views' |
| 208 | 225 | */ |
| 209 | 226 | function bbp_register_views() { |
| … |
… |
function bbp_register_views() { |
| 213 | 230 | /** |
| 214 | 231 | * Register the default bbPress shortcodes |
| 215 | 232 | * |
| 216 | | * @since bbPress (r4211) |
| | 233 | * @since 2.2.0 bbPress (r4211) |
| | 234 | * |
| 217 | 235 | * @uses do_action() Calls 'bbp_register_shortcodes' |
| 218 | 236 | */ |
| 219 | 237 | function bbp_register_shortcodes() { |
| … |
… |
function bbp_register_shortcodes() { |
| 223 | 241 | /** |
| 224 | 242 | * Enqueue bbPress specific CSS and JS |
| 225 | 243 | * |
| 226 | | * @since bbPress (r3373) |
| | 244 | * @since 2.0.0 bbPress (r3373) |
| | 245 | * |
| 227 | 246 | * @uses do_action() Calls 'bbp_enqueue_scripts' |
| 228 | 247 | */ |
| 229 | 248 | function bbp_enqueue_scripts() { |
| … |
… |
function bbp_enqueue_scripts() { |
| 233 | 252 | /** |
| 234 | 253 | * Add the bbPress-specific rewrite tags |
| 235 | 254 | * |
| 236 | | * @since bbPress (r2753) |
| | 255 | * @since 2.0.0 bbPress (r2753) |
| | 256 | * |
| 237 | 257 | * @uses do_action() Calls 'bbp_add_rewrite_tags' |
| 238 | 258 | */ |
| 239 | 259 | function bbp_add_rewrite_tags() { |
| … |
… |
function bbp_add_rewrite_tags() { |
| 243 | 263 | /** |
| 244 | 264 | * Add the bbPress-specific rewrite rules |
| 245 | 265 | * |
| 246 | | * @since bbPress (r4918) |
| | 266 | * @since 2.4.0 bbPress (r4918) |
| | 267 | * |
| 247 | 268 | * @uses do_action() Calls 'bbp_add_rewrite_rules' |
| 248 | 269 | */ |
| 249 | 270 | function bbp_add_rewrite_rules() { |
| … |
… |
function bbp_add_rewrite_rules() { |
| 253 | 274 | /** |
| 254 | 275 | * Add the bbPress-specific permalink structures |
| 255 | 276 | * |
| 256 | | * @since bbPress (r4918) |
| | 277 | * @since 2.4.0 bbPress (r4918) |
| | 278 | * |
| 257 | 279 | * @uses do_action() Calls 'bbp_add_permastructs' |
| 258 | 280 | */ |
| 259 | 281 | function bbp_add_permastructs() { |
| … |
… |
function bbp_add_permastructs() { |
| 263 | 285 | /** |
| 264 | 286 | * Add the bbPress-specific login forum action |
| 265 | 287 | * |
| 266 | | * @since bbPress (r2753) |
| | 288 | * @since 2.0.0 bbPress (r2753) |
| | 289 | * |
| 267 | 290 | * @uses do_action() Calls 'bbp_login_form_login' |
| 268 | 291 | */ |
| 269 | 292 | function bbp_login_form_login() { |
| … |
… |
function bbp_login_form_login() { |
| 275 | 298 | /** |
| 276 | 299 | * The main action for hooking into when a user account is updated |
| 277 | 300 | * |
| 278 | | * @since bbPress (r4304) |
| | 301 | * @since 2.2.0 bbPress (r4304) |
| 279 | 302 | * |
| 280 | 303 | * @param int $user_id ID of user being edited |
| 281 | 304 | * @param array $old_user_data The old, unmodified user data |
| … |
… |
function bbp_profile_update( $user_id = 0, $old_user_data = array() ) { |
| 288 | 311 | /** |
| 289 | 312 | * The main action for hooking into a user being registered |
| 290 | 313 | * |
| 291 | | * @since bbPress (r4304) |
| | 314 | * @since 2.2.0 bbPress (r4304) |
| | 315 | * |
| 292 | 316 | * @param int $user_id ID of user being edited |
| 293 | 317 | * @uses do_action() Calls 'bbp_user_register' |
| 294 | 318 | */ |
| … |
… |
function bbp_user_register( $user_id = 0 ) { |
| 301 | 325 | /** |
| 302 | 326 | * bbPress has loaded and initialized everything, and is okay to go |
| 303 | 327 | * |
| 304 | | * @since bbPress (r2618) |
| | 328 | * @since 2.0.0 bbPress (r2618) |
| | 329 | * |
| 305 | 330 | * @uses do_action() Calls 'bbp_ready' |
| 306 | 331 | */ |
| 307 | 332 | function bbp_ready() { |
| … |
… |
function bbp_ready() { |
| 314 | 339 | * The main action used for redirecting bbPress theme actions that are not |
| 315 | 340 | * permitted by the current_user |
| 316 | 341 | * |
| 317 | | * @since bbPress (r3605) |
| | 342 | * @since 2.1.0 bbPress (r3605) |
| | 343 | * |
| 318 | 344 | * @uses do_action() |
| 319 | 345 | */ |
| 320 | 346 | function bbp_template_redirect() { |
| … |
… |
function bbp_template_redirect() { |
| 326 | 352 | /** |
| 327 | 353 | * The main action used for executing code before the theme has been setup |
| 328 | 354 | * |
| 329 | | * @since bbPress (r3829) |
| | 355 | * @since 2.1.0 bbPress (r3829) |
| | 356 | * |
| 330 | 357 | * @uses do_action() |
| 331 | 358 | */ |
| 332 | 359 | function bbp_register_theme_packages() { |
| … |
… |
function bbp_register_theme_packages() { |
| 336 | 363 | /** |
| 337 | 364 | * The main action used for executing code before the theme has been setup |
| 338 | 365 | * |
| 339 | | * @since bbPress (r3732) |
| | 366 | * @since 2.1.0 bbPress (r3732) |
| | 367 | * |
| 340 | 368 | * @uses do_action() |
| 341 | 369 | */ |
| 342 | 370 | function bbp_setup_theme() { |
| … |
… |
function bbp_setup_theme() { |
| 346 | 374 | /** |
| 347 | 375 | * The main action used for executing code after the theme has been setup |
| 348 | 376 | * |
| 349 | | * @since bbPress (r3732) |
| | 377 | * @since 2.1.0 bbPress (r3732) |
| | 378 | * |
| 350 | 379 | * @uses do_action() |
| 351 | 380 | */ |
| 352 | 381 | function bbp_after_setup_theme() { |
| … |
… |
function bbp_after_setup_theme() { |
| 356 | 385 | /** |
| 357 | 386 | * The main action used for handling theme-side POST requests |
| 358 | 387 | * |
| 359 | | * @since bbPress (r4550) |
| | 388 | * @since 2.3.0 bbPress (r4550) |
| | 389 | * |
| 360 | 390 | * @uses do_action() |
| 361 | 391 | */ |
| 362 | 392 | function bbp_post_request() { |
| … |
… |
function bbp_post_request() { |
| 385 | 415 | /** |
| 386 | 416 | * The main action used for handling theme-side GET requests |
| 387 | 417 | * |
| 388 | | * @since bbPress (r4550) |
| | 418 | * @since 2.3.0 bbPress (r4550) |
| | 419 | * |
| 389 | 420 | * @uses do_action() |
| 390 | 421 | */ |
| 391 | 422 | function bbp_get_request() { |
| … |
… |
function bbp_get_request() { |
| 416 | 447 | /** |
| 417 | 448 | * Filter the plugin locale and domain. |
| 418 | 449 | * |
| 419 | | * @since bbPress (r4213) |
| | 450 | * @since 2.2.0 bbPress (r4213) |
| 420 | 451 | * |
| 421 | 452 | * @param string $locale |
| 422 | 453 | * @param string $domain |
| … |
… |
function bbp_plugin_locale( $locale = '', $domain = '' ) { |
| 428 | 459 | /** |
| 429 | 460 | * Piggy back filter for WordPress's 'request' filter |
| 430 | 461 | * |
| 431 | | * @since bbPress (r3758) |
| | 462 | * @since 2.1.0 bbPress (r3758) |
| | 463 | * |
| 432 | 464 | * @param array $query_vars |
| 433 | 465 | * @return array |
| 434 | 466 | */ |
| … |
… |
function bbp_request( $query_vars = array() ) { |
| 440 | 472 | * The main filter used for theme compatibility and displaying custom bbPress |
| 441 | 473 | * theme files. |
| 442 | 474 | * |
| 443 | | * @since bbPress (r3311) |
| | 475 | * @since 2.0.0 bbPress (r3311) |
| | 476 | * |
| 444 | 477 | * @uses apply_filters() |
| 445 | 478 | * @param string $template |
| 446 | 479 | * @return string Template file to use |
| … |
… |
function bbp_template_include( $template = '' ) { |
| 452 | 485 | /** |
| 453 | 486 | * Generate bbPress-specific rewrite rules |
| 454 | 487 | * |
| 455 | | * @since bbPress (r2688) |
| 456 | | * @deprecated since bbPress (r4918) |
| | 488 | * @since 2.0.0 bbPress (r2688) |
| | 489 | * |
| | 490 | * @deprecated 2.4.0 bbPress (r4918) |
| | 491 | * |
| 457 | 492 | * @param WP_Rewrite $wp_rewrite |
| 458 | 493 | * @uses do_action() Calls 'bbp_generate_rewrite_rules' with {@link WP_Rewrite} |
| 459 | 494 | */ |
| … |
… |
function bbp_generate_rewrite_rules( $wp_rewrite ) { |
| 464 | 499 | /** |
| 465 | 500 | * Filter the allowed themes list for bbPress specific themes |
| 466 | 501 | * |
| 467 | | * @since bbPress (r2944) |
| | 502 | * @since 2.0.0 bbPress (r2944) |
| | 503 | * |
| 468 | 504 | * @uses apply_filters() Calls 'bbp_allowed_themes' with the allowed themes list |
| 469 | 505 | */ |
| 470 | 506 | function bbp_allowed_themes( $themes ) { |
| … |
… |
function bbp_allowed_themes( $themes ) { |
| 474 | 510 | /** |
| 475 | 511 | * Maps forum/topic/reply caps to built in WordPress caps |
| 476 | 512 | * |
| 477 | | * @since bbPress (r2593) |
| | 513 | * @since 2.0.0 bbPress (r2593) |
| 478 | 514 | * |
| 479 | 515 | * @param array $caps Capabilities for meta capability |
| 480 | 516 | * @param string $cap Capability name |
-
diff --git src/includes/core/template-functions.php src/includes/core/template-functions.php
index f295f67..1b46c40 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 17 | 17 | /** |
| 18 | 18 | * Adds bbPress theme support to any active WordPress theme |
| 19 | 19 | * |
| 20 | | * @since bbPress (r3032) |
| | 20 | * @since 2.0.0 bbPress (r3032) |
| 21 | 21 | * |
| 22 | 22 | * @param string $slug |
| 23 | 23 | * @param string $name Optional. Default null |
| … |
… |
function bbp_get_template_part( $slug, $name = null ) { |
| 51 | 51 | * inherit from a parent theme can just overload one file. If the template is |
| 52 | 52 | * not found in either of those, it looks in the theme-compat folder last. |
| 53 | 53 | * |
| 54 | | * @since bbPress (r3618) |
| | 54 | * @since 2.1.0 bbPress (r3618) |
| 55 | 55 | * |
| 56 | 56 | * @param string|array $template_names Template file(s) to search for, in order. |
| 57 | 57 | * @param bool $load If true the template file will be loaded if it is found. |
| … |
… |
function bbp_locate_template( $template_names, $load = false, $require_once = tr |
| 114 | 114 | * |
| 115 | 115 | * Registers the style if file provided (does NOT overwrite) and enqueues. |
| 116 | 116 | * |
| 117 | | * @since bbPress (r5180) |
| | 117 | * @since 2.5.0 bbPress (r5180) |
| 118 | 118 | * |
| 119 | 119 | * @param string $handle Name of the stylesheet. |
| 120 | 120 | * @param string|bool $file Relative path to stylesheet. Example: '/css/mystyle.css'. |
| … |
… |
function bbp_enqueue_style( $handle = '', $file = '', $deps = array(), $ver = fa |
| 183 | 183 | * |
| 184 | 184 | * Registers the style if file provided (does NOT overwrite) and enqueues. |
| 185 | 185 | * |
| 186 | | * @since bbPress (r5180) |
| | 186 | * @since 2.5.0 bbPress (r5180) |
| 187 | 187 | * |
| 188 | 188 | * @param string $handle Name of the script. |
| 189 | 189 | * @param string|bool $file Relative path to the script. Example: '/js/myscript.js'. |
| … |
… |
function bbp_enqueue_script( $handle = '', $file = '', $deps = array(), $ver = f |
| 254 | 254 | * relationship, to allow for custom template locations. Used in conjunction |
| 255 | 255 | * with bbp_locate_template(), this allows for easy template overrides. |
| 256 | 256 | * |
| 257 | | * @since bbPress (r4323) |
| | 257 | * @since 2.2.0 bbPress (r4323) |
| 258 | 258 | * |
| 259 | 259 | * @param string $location_callback Callback function that returns the |
| 260 | 260 | * @param int $priority |
| … |
… |
function bbp_register_template_stack( $location_callback = '', $priority = 10 ) |
| 273 | 273 | /** |
| 274 | 274 | * Deregisters a previously registered template stack location. |
| 275 | 275 | * |
| 276 | | * @since bbPress (r4652) |
| | 276 | * @since 2.3.0 bbPress (r4652) |
| 277 | 277 | * |
| 278 | 278 | * @param string $location_callback Callback function that returns the |
| 279 | 279 | * @param int $priority |
| … |
… |
function bbp_deregister_template_stack( $location_callback = '', $priority = 10 |
| 296 | 296 | * |
| 297 | 297 | * @see bbp_register_template_stack() |
| 298 | 298 | * |
| 299 | | * @since bbPress (r4323) |
| | 299 | * @since 2.2.0 bbPress (r4323) |
| 300 | 300 | * |
| 301 | 301 | * @global array $wp_filter Stores all of the filters |
| 302 | 302 | * @global array $merged_filters Merges the filter hooks using this function. |
| … |
… |
function bbp_get_template_stack() { |
| 350 | 350 | /** |
| 351 | 351 | * Get a template part in an output buffer, and return it |
| 352 | 352 | * |
| 353 | | * @since bbPress (r5043) |
| | 353 | * @since 2.4.0 bbPress (r5043) |
| 354 | 354 | * |
| 355 | 355 | * @param string $slug |
| 356 | 356 | * @param string $name |
| … |
… |
function bbp_buffer_template_part( $slug, $name = null, $echo = true ) { |
| 380 | 380 | * the use of {@link bbp_locate_template()}. Allows for more generic template |
| 381 | 381 | * locations without the use of the other get_*_template() functions. |
| 382 | 382 | * |
| 383 | | * @since bbPress (r3629) |
| | 383 | * @since 2.1.0 bbPress (r3629) |
| 384 | 384 | * |
| 385 | 385 | * @param string $type Filename without extension. |
| 386 | 386 | * @param array $templates An optional list of template candidates |
| … |
… |
function bbp_get_query_template( $type, $templates = array() ) { |
| 409 | 409 | /** |
| 410 | 410 | * Get the possible subdirectories to check for templates in |
| 411 | 411 | * |
| 412 | | * @since bbPress (r3738) |
| | 412 | * @since 2.1.0 bbPress (r3738) |
| | 413 | * |
| 413 | 414 | * @param array $templates Templates we are looking for |
| 414 | 415 | * @return array Possible subfolders to look in |
| 415 | 416 | */ |
| … |
… |
function bbp_get_template_locations( $templates = array() ) { |
| 425 | 426 | /** |
| 426 | 427 | * Add template locations to template files being searched for |
| 427 | 428 | * |
| 428 | | * @since bbPress (r3738) |
| | 429 | * @since 2.1.0 bbPress (r3738) |
| 429 | 430 | * |
| 430 | 431 | * @param array $stacks |
| 431 | 432 | * @return array() |
| … |
… |
function bbp_add_template_stack_locations( $stacks = array() ) { |
| 463 | 464 | * If it's a view page, WP_Query::bbp_is_view is set to true |
| 464 | 465 | * If it's a search page, WP_Query::bbp_is_search is set to true |
| 465 | 466 | * |
| 466 | | * @since bbPress (r2688) |
| | 467 | * @since 2.0.0 bbPress (r2688) |
| 467 | 468 | * |
| 468 | 469 | * @param WP_Query $posts_query |
| 469 | 470 | * |
-
diff --git src/includes/core/template-loader.php src/includes/core/template-loader.php
index 12b8ce6..7dedb2e 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 20 | 20 | * Note that the _edit() checks are ahead of their counterparts, to prevent them |
| 21 | 21 | * from being stomped on accident. |
| 22 | 22 | * |
| 23 | | * @since bbPress (r3032) |
| | 23 | * @since 2.0.0 bbPress (r3032) |
| 24 | 24 | * |
| 25 | 25 | * @param string $template |
| 26 | 26 | * |
| … |
… |
function bbp_template_include_theme_supports( $template = '' ) { |
| 120 | 120 | /** |
| 121 | 121 | * Set the included template |
| 122 | 122 | * |
| 123 | | * @since bbPress (r4975) |
| | 123 | * @since 2.4.0 bbPress (r4975) |
| | 124 | * |
| 124 | 125 | * @param mixed $template Default false |
| 125 | 126 | * @return mixed False if empty. Template name if template included |
| 126 | 127 | */ |
| … |
… |
function bbp_set_template_included( $template = false ) { |
| 133 | 134 | /** |
| 134 | 135 | * Is a bbPress template being included? |
| 135 | 136 | * |
| 136 | | * @since bbPress (r4975) |
| | 137 | * @since 2.4.0 bbPress (r4975) |
| | 138 | * |
| 137 | 139 | * @return bool True if yes, false if no |
| 138 | 140 | */ |
| 139 | 141 | function bbp_is_template_included() { |
| … |
… |
function bbp_is_template_included() { |
| 146 | 148 | * Attempt to load a custom bbPress functions file, similar to each themes |
| 147 | 149 | * functions.php file. |
| 148 | 150 | * |
| 149 | | * @since bbPress (r3732) |
| | 151 | * @since 2.1.0 bbPress (r3732) |
| 150 | 152 | * |
| 151 | 153 | * @global string $pagenow |
| 152 | 154 | * @uses bbp_locate_template() |
| … |
… |
function bbp_load_theme_functions() { |
| 169 | 171 | /** |
| 170 | 172 | * Get the user profile template |
| 171 | 173 | * |
| 172 | | * @since bbPress (r3311) |
| | 174 | * @since 2.0.0 bbPress (r3311) |
| 173 | 175 | * |
| 174 | 176 | * @uses bbp_get_displayed_user_id() |
| 175 | 177 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_user_template() { |
| 190 | 192 | /** |
| 191 | 193 | * Get the user profile edit template |
| 192 | 194 | * |
| 193 | | * @since bbPress (r3311) |
| | 195 | * @since 2.0.0 bbPress (r3311) |
| 194 | 196 | * |
| 195 | 197 | * @uses bbp_get_displayed_user_id() |
| 196 | 198 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_user_edit_template() { |
| 212 | 214 | /** |
| 213 | 215 | * Get the user favorites template |
| 214 | 216 | * |
| 215 | | * @since bbPress (r4225) |
| | 217 | * @since 2.2.0 bbPress (r4225) |
| 216 | 218 | * |
| 217 | 219 | * @uses bbp_get_displayed_user_id() |
| 218 | 220 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_favorites_template() { |
| 235 | 237 | /** |
| 236 | 238 | * Get the user subscriptions template |
| 237 | 239 | * |
| 238 | | * @since bbPress (r4225) |
| | 240 | * @since 2.2.0 bbPress (r4225) |
| 239 | 241 | * |
| 240 | 242 | * @uses bbp_get_displayed_user_id() |
| 241 | 243 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_subscriptions_template() { |
| 258 | 260 | /** |
| 259 | 261 | * Get the view template |
| 260 | 262 | * |
| 261 | | * @since bbPress (r3311) |
| | 263 | * @since 2.0.0 bbPress (r3311) |
| 262 | 264 | * |
| 263 | 265 | * @uses bbp_get_view_id() |
| 264 | 266 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_view_template() { |
| 278 | 280 | /** |
| 279 | 281 | * Get the search template |
| 280 | 282 | * |
| 281 | | * @since bbPress (r4579) |
| | 283 | * @since 2.3.0 bbPress (r4579) |
| 282 | 284 | * |
| 283 | 285 | * @uses bbp_get_query_template() |
| 284 | 286 | * @return string Path to template file |
| … |
… |
function bbp_get_search_template() { |
| 294 | 296 | /** |
| 295 | 297 | * Get the single forum template |
| 296 | 298 | * |
| 297 | | * @since bbPress (r3922) |
| | 299 | * @since 2.1.0 bbPress (r3922) |
| 298 | 300 | * |
| 299 | 301 | * @uses bbp_get_forum_post_type() |
| 300 | 302 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_forum_template() { |
| 310 | 312 | /** |
| 311 | 313 | * Get the forum archive template |
| 312 | 314 | * |
| 313 | | * @since bbPress (r3922) |
| | 315 | * @since 2.1.0 bbPress (r3922) |
| 314 | 316 | * |
| 315 | 317 | * @uses bbp_get_forum_post_type() |
| 316 | 318 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_forum_archive_template() { |
| 326 | 328 | /** |
| 327 | 329 | * Get the forum edit template |
| 328 | 330 | * |
| 329 | | * @since bbPress (r3566) |
| | 331 | * @since 2.1.0 bbPress (r3566) |
| 330 | 332 | * |
| 331 | 333 | * @uses bbp_get_topic_post_type() |
| 332 | 334 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_forum_edit_template() { |
| 342 | 344 | /** |
| 343 | 345 | * Get the single topic template |
| 344 | 346 | * |
| 345 | | * @since bbPress (r3922) |
| | 347 | * @since 2.1.0 bbPress (r3922) |
| 346 | 348 | * |
| 347 | 349 | * @uses bbp_get_topic_post_type() |
| 348 | 350 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_topic_template() { |
| 358 | 360 | /** |
| 359 | 361 | * Get the topic archive template |
| 360 | 362 | * |
| 361 | | * @since bbPress (r3922) |
| | 363 | * @since 2.1.0 bbPress (r3922) |
| 362 | 364 | * |
| 363 | 365 | * @uses bbp_get_topic_post_type() |
| 364 | 366 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_archive_template() { |
| 374 | 376 | /** |
| 375 | 377 | * Get the topic edit template |
| 376 | 378 | * |
| 377 | | * @since bbPress (r3311) |
| | 379 | * @since 2.0.0 bbPress (r3311) |
| 378 | 380 | * |
| 379 | 381 | * @uses bbp_get_topic_post_type() |
| 380 | 382 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_edit_template() { |
| 390 | 392 | /** |
| 391 | 393 | * Get the topic split template |
| 392 | 394 | * |
| 393 | | * @since bbPress (r3311) |
| | 395 | * @since 2.0.0 bbPress (r3311) |
| 394 | 396 | * |
| 395 | 397 | * @uses bbp_get_topic_post_type() |
| 396 | 398 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_split_template() { |
| 406 | 408 | /** |
| 407 | 409 | * Get the topic merge template |
| 408 | 410 | * |
| 409 | | * @since bbPress (r3311) |
| | 411 | * @since 2.0.0 bbPress (r3311) |
| 410 | 412 | * |
| 411 | 413 | * @uses bbp_get_topic_post_type() |
| 412 | 414 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_merge_template() { |
| 422 | 424 | /** |
| 423 | 425 | * Get the single reply template |
| 424 | 426 | * |
| 425 | | * @since bbPress (r3922) |
| | 427 | * @since 2.1.0 bbPress (r3922) |
| 426 | 428 | * |
| 427 | 429 | * @uses bbp_get_reply_post_type() |
| 428 | 430 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_single_reply_template() { |
| 438 | 440 | /** |
| 439 | 441 | * Get the reply edit template |
| 440 | 442 | * |
| 441 | | * @since bbPress (r3311) |
| | 443 | * @since 2.0.0 bbPress (r3311) |
| 442 | 444 | * |
| 443 | 445 | * @uses bbp_get_reply_post_type() |
| 444 | 446 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_reply_edit_template() { |
| 454 | 456 | /** |
| 455 | 457 | * Get the reply move template |
| 456 | 458 | * |
| 457 | | * @since bbPress (r4521) |
| | 459 | * @since 2.3.0 bbPress (r4521) |
| 458 | 460 | * |
| 459 | 461 | * @uses bbp_get_reply_post_type() |
| 460 | 462 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_reply_move_template() { |
| 470 | 472 | /** |
| 471 | 473 | * Get the topic template |
| 472 | 474 | * |
| 473 | | * @since bbPress (r3311) |
| | 475 | * @since 2.0.0 bbPress (r3311) |
| 474 | 476 | * |
| 475 | 477 | * @uses bbp_get_topic_tag_tax_id() |
| 476 | 478 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_tag_template() { |
| 489 | 491 | /** |
| 490 | 492 | * Get the topic edit template |
| 491 | 493 | * |
| 492 | | * @since bbPress (r3311) |
| | 494 | * @since 2.0.0 bbPress (r3311) |
| 493 | 495 | * |
| 494 | 496 | * @uses bbp_get_topic_tag_tax_id() |
| 495 | 497 | * @uses bbp_get_query_template() |
| … |
… |
function bbp_get_topic_tag_edit_template() { |
| 508 | 510 | /** |
| 509 | 511 | * Get the templates to use as the endpoint for bbPress template parts |
| 510 | 512 | * |
| 511 | | * @since bbPress (r3311) |
| | 513 | * @since 2.0.0 bbPress (r3311) |
| 512 | 514 | * |
| 513 | 515 | * @uses apply_filters() |
| 514 | 516 | * @uses bbp_set_theme_compat_templates() |
-
diff --git src/includes/core/theme-compat.php src/includes/core/theme-compat.php
index fdeca34..e5ee3ae 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 31 | 31 | * for future Theme Packs to use. @link BBP_Twenty_Ten is a good example of |
| 32 | 32 | * extending this class, as is @link bbp_setup_theme_compat() |
| 33 | 33 | * |
| 34 | | * @since bbPress (r3506) |
| | 34 | * @since 2.0.0 bbPress (r3506) |
| 35 | 35 | */ |
| 36 | 36 | class BBP_Theme_Compat { |
| 37 | 37 | |
| … |
… |
class BBP_Theme_Compat { |
| 52 | 52 | /** |
| 53 | 53 | * Pass the $properties to the object on creation. |
| 54 | 54 | * |
| 55 | | * @since bbPress (r3926) |
| | 55 | * @since 2.1.0 bbPress (r3926) |
| | 56 | * |
| 56 | 57 | * @param array $properties |
| 57 | 58 | */ |
| 58 | 59 | public function __construct( Array $properties = array() ) { |
| … |
… |
class BBP_Theme_Compat { |
| 62 | 63 | /** |
| 63 | 64 | * Set a theme's property. |
| 64 | 65 | * |
| 65 | | * @since bbPress (r3926) |
| | 66 | * @since 2.1.0 bbPress (r3926) |
| | 67 | * |
| 66 | 68 | * @param string $property |
| 67 | 69 | * @param mixed $value |
| 68 | 70 | * @return mixed |
| … |
… |
class BBP_Theme_Compat { |
| 74 | 76 | /** |
| 75 | 77 | * Get a theme's property. |
| 76 | 78 | * |
| 77 | | * @since bbPress (r3926) |
| | 79 | * @since 2.1.0 bbPress (r3926) |
| | 80 | * |
| 78 | 81 | * @param string $property |
| 79 | 82 | * @param mixed $value |
| 80 | 83 | * @return mixed |
| … |
… |
class BBP_Theme_Compat { |
| 91 | 94 | /** |
| 92 | 95 | * Setup the default theme compat theme |
| 93 | 96 | * |
| 94 | | * @since bbPress (r3311) |
| | 97 | * @since 2.0.0 bbPress (r3311) |
| | 98 | * |
| 95 | 99 | * @param BBP_Theme_Compat $theme |
| 96 | 100 | */ |
| 97 | 101 | function bbp_setup_theme_compat( $theme = '' ) { |
| … |
… |
function bbp_setup_theme_compat( $theme = '' ) { |
| 115 | 119 | * This can be filtered or set manually. Tricky theme authors can override the |
| 116 | 120 | * default and include their own bbPress compatibility layers for their themes. |
| 117 | 121 | * |
| 118 | | * @since bbPress (r3506) |
| | 122 | * @since 2.0.0 bbPress (r3506) |
| | 123 | * |
| 119 | 124 | * @uses apply_filters() |
| 120 | 125 | * @return string |
| 121 | 126 | */ |
| … |
… |
function bbp_get_theme_compat_id() { |
| 129 | 134 | * This can be filtered or set manually. Tricky theme authors can override the |
| 130 | 135 | * default and include their own bbPress compatibility layers for their themes. |
| 131 | 136 | * |
| 132 | | * @since bbPress (r3506) |
| | 137 | * @since 2.0.0 bbPress (r3506) |
| | 138 | * |
| 133 | 139 | * @uses apply_filters() |
| 134 | 140 | * @return string |
| 135 | 141 | */ |
| … |
… |
function bbp_get_theme_compat_name() { |
| 143 | 149 | * This can be filtered or set manually. Tricky theme authors can override the |
| 144 | 150 | * default and include their own bbPress compatibility layers for their themes. |
| 145 | 151 | * |
| 146 | | * @since bbPress (r3506) |
| | 152 | * @since 2.0.0 bbPress (r3506) |
| | 153 | * |
| 147 | 154 | * @uses apply_filters() |
| 148 | 155 | * @return string |
| 149 | 156 | */ |
| … |
… |
function bbp_get_theme_compat_version() { |
| 157 | 164 | * or set manually. Tricky theme authors can override the default and include |
| 158 | 165 | * their own bbPress compatibility layers for their themes. |
| 159 | 166 | * |
| 160 | | * @since bbPress (r3032) |
| | 167 | * @since 2.0.0 bbPress (r3032) |
| | 168 | * |
| 161 | 169 | * @uses apply_filters() |
| 162 | 170 | * @return string |
| 163 | 171 | */ |
| … |
… |
function bbp_get_theme_compat_dir() { |
| 171 | 179 | * or set manually. Tricky theme authors can override the default and include |
| 172 | 180 | * their own bbPress compatibility layers for their themes. |
| 173 | 181 | * |
| 174 | | * @since bbPress (r3032) |
| | 182 | * @since 2.0.0 bbPress (r3032) |
| | 183 | * |
| 175 | 184 | * @uses apply_filters() |
| 176 | 185 | * @return string |
| 177 | 186 | */ |
| … |
… |
function bbp_get_theme_compat_url() { |
| 182 | 191 | /** |
| 183 | 192 | * Gets true/false if page is currently inside theme compatibility |
| 184 | 193 | * |
| 185 | | * @since bbPress (r3265) |
| | 194 | * @since 2.0.0 bbPress (r3265) |
| | 195 | * |
| 186 | 196 | * @return bool |
| 187 | 197 | */ |
| 188 | 198 | function bbp_is_theme_compat_active() { |
| … |
… |
function bbp_is_theme_compat_active() { |
| 198 | 208 | /** |
| 199 | 209 | * Sets true/false if page is currently inside theme compatibility |
| 200 | 210 | * |
| 201 | | * @since bbPress (r3265) |
| | 211 | * @since 2.0.0 bbPress (r3265) |
| | 212 | * |
| 202 | 213 | * @param bool $set |
| 203 | 214 | * @return bool |
| 204 | 215 | */ |
| … |
… |
function bbp_set_theme_compat_active( $set = true ) { |
| 214 | 225 | * Stash possible template files for the current query. Useful if plugins want |
| 215 | 226 | * to override them, or see what files are being scanned for inclusion. |
| 216 | 227 | * |
| 217 | | * @since bbPress (r3311) |
| | 228 | * @since 2.0.0 bbPress (r3311) |
| 218 | 229 | */ |
| 219 | 230 | function bbp_set_theme_compat_templates( $templates = array() ) { |
| 220 | 231 | bbpress()->theme_compat->templates = $templates; |
| … |
… |
function bbp_set_theme_compat_templates( $templates = array() ) { |
| 228 | 239 | * Stash the template file for the current query. Useful if plugins want |
| 229 | 240 | * to override it, or see what file is being included. |
| 230 | 241 | * |
| 231 | | * @since bbPress (r3311) |
| | 242 | * @since 2.0.0 bbPress (r3311) |
| 232 | 243 | */ |
| 233 | 244 | function bbp_set_theme_compat_template( $template = '' ) { |
| 234 | 245 | bbpress()->theme_compat->template = $template; |
| … |
… |
function bbp_set_theme_compat_template( $template = '' ) { |
| 242 | 253 | * Stash the original template file for the current query. Useful for checking |
| 243 | 254 | * if bbPress was able to find a more appropriate template. |
| 244 | 255 | * |
| 245 | | * @since bbPress (r3926) |
| | 256 | * @since 2.1.0 bbPress (r3926) |
| 246 | 257 | */ |
| 247 | 258 | function bbp_set_theme_compat_original_template( $template = '' ) { |
| 248 | 259 | bbpress()->theme_compat->original_template = $template; |
| … |
… |
function bbp_set_theme_compat_original_template( $template = '' ) { |
| 256 | 267 | * Stash the original template file for the current query. Useful for checking |
| 257 | 268 | * if bbPress was able to find a more appropriate template. |
| 258 | 269 | * |
| 259 | | * @since bbPress (r3926) |
| | 270 | * @since 2.1.0 bbPress (r3926) |
| 260 | 271 | */ |
| 261 | 272 | function bbp_is_theme_compat_original_template( $template = '' ) { |
| 262 | 273 | $bbp = bbpress(); |
| … |
… |
function bbp_is_theme_compat_original_template( $template = '' ) { |
| 271 | 282 | /** |
| 272 | 283 | * Register a new bbPress theme package to the active theme packages array |
| 273 | 284 | * |
| 274 | | * @since bbPress (r3829) |
| | 285 | * @since 2.1.0 bbPress (r3829) |
| | 286 | * |
| 275 | 287 | * @param array $theme |
| 276 | 288 | */ |
| 277 | 289 | function bbp_register_theme_package( $theme = array(), $override = true ) { |
| … |
… |
function bbp_register_theme_package( $theme = array(), $override = true ) { |
| 298 | 310 | * This fun little function fills up some WordPress globals with dummy data to |
| 299 | 311 | * stop your average page template from complaining about it missing. |
| 300 | 312 | * |
| 301 | | * @since bbPress (r3108) |
| | 313 | * @since 2.0.0 bbPress (r3108) |
| | 314 | * |
| 302 | 315 | * @global WP_Query $wp_query |
| 303 | 316 | * @global object $post |
| 304 | 317 | * @param array $args |
| … |
… |
function bbp_theme_compat_reset_post( $args = array() ) { |
| 419 | 432 | * Reset main query vars and filter 'the_content' to output a bbPress |
| 420 | 433 | * template part as needed. |
| 421 | 434 | * |
| 422 | | * @since bbPress (r3032) |
| | 435 | * @since 2.0.0 bbPress (r3032) |
| | 436 | * |
| 423 | 437 | * @param string $template |
| 424 | 438 | * @uses bbp_is_single_user() To check if page is single user |
| 425 | 439 | * @uses bbp_get_single_user_template() To get user template |
| … |
… |
function bbp_template_include_theme_compat( $template = '' ) { |
| 804 | 818 | /** |
| 805 | 819 | * Remove the canonical redirect to allow pretty pagination |
| 806 | 820 | * |
| 807 | | * @since bbPress (r2628) |
| | 821 | * @since 2.0.0 bbPress (r2628) |
| 808 | 822 | * |
| 809 | 823 | * @param string $redirect_url Redirect url |
| 810 | 824 | * @uses bbp_use_pretty_urls() To check if the blog is using permalinks |
| … |
… |
function bbp_redirect_canonical( $redirect_url ) { |
| 862 | 876 | * Removes all filters from a WordPress filter, and stashes them in the $bbp |
| 863 | 877 | * global in the event they need to be restored later. |
| 864 | 878 | * |
| 865 | | * @since bbPress (r3251) |
| | 879 | * @since 2.0.0 bbPress (r3251) |
| | 880 | * |
| 866 | 881 | * @global WP_filter $wp_filter |
| 867 | 882 | * @global array $merged_filters |
| 868 | 883 | * @param string $tag |
| … |
… |
function bbp_remove_all_filters( $tag, $priority = false ) { |
| 914 | 929 | * Restores filters from the $bbp global that were removed using |
| 915 | 930 | * bbp_remove_all_filters() |
| 916 | 931 | * |
| 917 | | * @since bbPress (r3251) |
| | 932 | * @since 2.0.0 bbPress (r3251) |
| | 933 | * |
| 918 | 934 | * @global WP_filter $wp_filter |
| 919 | 935 | * @global array $merged_filters |
| 920 | 936 | * @param string $tag |
| … |
… |
function bbp_restore_all_filters( $tag, $priority = false ) { |
| 965 | 981 | /** |
| 966 | 982 | * Force comments_status to 'closed' for bbPress post types |
| 967 | 983 | * |
| 968 | | * @since bbPress (r3589) |
| | 984 | * @since 2.1.0 bbPress (r3589) |
| | 985 | * |
| 969 | 986 | * @param bool $open True if open, false if closed |
| 970 | 987 | * @param int $post_id ID of the post to check |
| 971 | 988 | * @return bool True if open, false if closed |
-
diff --git src/includes/core/update.php src/includes/core/update.php
index 37ee580..efd274a 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 13 | 13 | /** |
| 14 | 14 | * If there is no raw DB version, this is the first installation |
| 15 | 15 | * |
| 16 | | * @since bbPress (r3764) |
| | 16 | * @since 2.1.0 bbPress (r3764) |
| 17 | 17 | * |
| 18 | 18 | * @uses get_option() |
| 19 | 19 | * @uses bbp_get_db_version() To get bbPress's database version |
| … |
… |
function bbp_is_install() { |
| 26 | 26 | /** |
| 27 | 27 | * Compare the bbPress version to the DB version to determine if updating |
| 28 | 28 | * |
| 29 | | * @since bbPress (r3421) |
| | 29 | * @since 2.0.0 bbPress (r3421) |
| 30 | 30 | * |
| 31 | 31 | * @uses get_option() |
| 32 | 32 | * @uses bbp_get_db_version() To get bbPress's database version |
| … |
… |
function bbp_is_update() { |
| 45 | 45 | * Note that this function currently is not used in bbPress core and is here |
| 46 | 46 | * for third party plugins to use to check for bbPress activation. |
| 47 | 47 | * |
| 48 | | * @since bbPress (r3421) |
| | 48 | * @since 2.0.0 bbPress (r3421) |
| 49 | 49 | * |
| 50 | 50 | * @return bool True if activating bbPress, false if not |
| 51 | 51 | */ |
| … |
… |
function bbp_is_activation( $basename = '' ) { |
| 95 | 95 | /** |
| 96 | 96 | * Determine if bbPress is being deactivated |
| 97 | 97 | * |
| 98 | | * @since bbPress (r3421) |
| | 98 | * @since 2.0.0 bbPress (r3421) |
| | 99 | * |
| 99 | 100 | * @return bool True if deactivating bbPress, false if not |
| 100 | 101 | */ |
| 101 | 102 | function bbp_is_deactivation( $basename = '' ) { |
| … |
… |
function bbp_is_deactivation( $basename = '' ) { |
| 144 | 145 | /** |
| 145 | 146 | * Update the DB to the latest version |
| 146 | 147 | * |
| 147 | | * @since bbPress (r3421) |
| | 148 | * @since 2.0.0 bbPress (r3421) |
| | 149 | * |
| 148 | 150 | * @uses update_option() |
| 149 | 151 | * @uses bbp_get_db_version() To get bbPress's database version |
| 150 | 152 | */ |
| … |
… |
function bbp_version_bump() { |
| 155 | 157 | /** |
| 156 | 158 | * Setup the bbPress updater |
| 157 | 159 | * |
| 158 | | * @since bbPress (r3419) |
| | 160 | * @since 2.0.0 bbPress (r3419) |
| 159 | 161 | * |
| 160 | 162 | * @uses bbp_version_updater() |
| 161 | 163 | * @uses bbp_version_bump() |
| … |
… |
function bbp_setup_updater() { |
| 175 | 177 | /** |
| 176 | 178 | * Create a default forum, topic, and reply |
| 177 | 179 | * |
| 178 | | * @since bbPress (r3767) |
| | 180 | * @since 2.1.0 bbPress (r3767) |
| | 181 | * |
| 179 | 182 | * @param array $args Array of arguments to override default values |
| 180 | 183 | */ |
| 181 | 184 | function bbp_create_initial_content( $args = array() ) { |
| … |
… |
function bbp_create_initial_content( $args = array() ) { |
| 246 | 249 | * This is most-often used when the data schema changes, but should also be used |
| 247 | 250 | * to correct issues with bbPress meta-data silently on software update. |
| 248 | 251 | * |
| 249 | | * @since bbPress (r4104) |
| | 252 | * @since 2.2.0 bbPress (r4104) |
| 250 | 253 | */ |
| 251 | 254 | function bbp_version_updater() { |
| 252 | 255 | |
| … |
… |
function bbp_version_updater() { |
| 308 | 311 | /** |
| 309 | 312 | * Redirect user to bbPress's What's New page on activation |
| 310 | 313 | * |
| 311 | | * @since bbPress (r4389) |
| | 314 | * @since 2.2.0 bbPress (r4389) |
| 312 | 315 | * |
| 313 | 316 | * @internal Used internally to redirect bbPress to the about page on activation |
| 314 | 317 | * |
| … |
… |
function bbp_add_activation_redirect() { |
| 333 | 336 | * the current user a Key Master in the forums if they just activated bbPress, |
| 334 | 337 | * regardless of the bbp_allow_global_access() setting. |
| 335 | 338 | * |
| 336 | | * @since bbPress (r4910) |
| | 339 | * @since 2.4.0 bbPress (r4910) |
| 337 | 340 | * |
| 338 | 341 | * @internal Used to internally make the current user a keymaster on activation |
| 339 | 342 | * |
-
diff --git src/includes/extend/akismet.php src/includes/extend/akismet.php
index b284918..5192e23 100644
|
|
|
if ( !class_exists( 'BBP_Akismet' ) ) : |
| 14 | 14 | /** |
| 15 | 15 | * Loads Akismet extension |
| 16 | 16 | * |
| 17 | | * @since bbPress (r3277) |
| | 17 | * @since 2.0.0 bbPress (r3277) |
| 18 | 18 | * |
| 19 | 19 | * @package bbPress |
| 20 | 20 | * @subpackage Akismet |
| … |
… |
class BBP_Akismet { |
| 24 | 24 | /** |
| 25 | 25 | * The main bbPress Akismet loader |
| 26 | 26 | * |
| 27 | | * @since bbPress (r3277) |
| | 27 | * @since 2.0.0 bbPress (r3277) |
| 28 | 28 | * |
| 29 | 29 | * @uses add_filter() |
| 30 | 30 | */ |
| … |
… |
class BBP_Akismet { |
| 35 | 35 | /** |
| 36 | 36 | * Setup the admin hooks |
| 37 | 37 | * |
| 38 | | * @since bbPress (r3277) |
| | 38 | * @since 2.0.0 bbPress (r3277) |
| | 39 | * |
| 39 | 40 | * @access private |
| 40 | 41 | * |
| 41 | 42 | * @uses add_filter() To add various filters |
| … |
… |
class BBP_Akismet { |
| 81 | 82 | /** |
| 82 | 83 | * Converts topic/reply data into Akismet comment checking format |
| 83 | 84 | * |
| 84 | | * @since bbPress (r3277) |
| | 85 | * @since 2.0.0 bbPress (r3277) |
| 85 | 86 | * |
| 86 | 87 | * @param string $post_data |
| 87 | 88 | * |
| … |
… |
class BBP_Akismet { |
| 220 | 221 | /** |
| 221 | 222 | * Submit a post for spamming or hamming |
| 222 | 223 | * |
| 223 | | * @since bbPress (r3277) |
| | 224 | * @since 2.0.0 bbPress (r3277) |
| 224 | 225 | * |
| 225 | 226 | * @param int $post_id |
| 226 | 227 | * |
| … |
… |
class BBP_Akismet { |
| 362 | 363 | /** |
| 363 | 364 | * Ping Akismet service and check for spam/ham response |
| 364 | 365 | * |
| 365 | | * @since bbPress (r3277) |
| | 366 | * @since 2.0.0 bbPress (r3277) |
| 366 | 367 | * |
| 367 | 368 | * @param array $post_data |
| 368 | 369 | * @param string $check Accepts check|submit |
| … |
… |
class BBP_Akismet { |
| 441 | 442 | /** |
| 442 | 443 | * Update post meta after a spam check |
| 443 | 444 | * |
| 444 | | * @since bbPress (r3308) |
| | 445 | * @since 2.0.0 bbPress (r3308) |
| 445 | 446 | * |
| 446 | 447 | * @param int $post_id |
| 447 | 448 | * @param object $_post |
| … |
… |
class BBP_Akismet { |
| 531 | 532 | /** |
| 532 | 533 | * Update a post's Akismet history |
| 533 | 534 | * |
| 534 | | * @since bbPress (r3308) |
| | 535 | * @since 2.0.0 bbPress (r3308) |
| 535 | 536 | * |
| 536 | 537 | * @param int $post_id |
| 537 | 538 | * @param string $message |
| … |
… |
class BBP_Akismet { |
| 572 | 573 | /** |
| 573 | 574 | * Get a post's Akismet history |
| 574 | 575 | * |
| 575 | | * @since bbPress (r3308) |
| | 576 | * @since 2.0.0 bbPress (r3308) |
| 576 | 577 | * |
| 577 | 578 | * @param int $post_id |
| 578 | 579 | * |
| … |
… |
class BBP_Akismet { |
| 595 | 596 | /** |
| 596 | 597 | * Handle any terms submitted with a post flagged as spam |
| 597 | 598 | * |
| 598 | | * @since bbPress (r3308) |
| | 599 | * @since 2.0.0 bbPress (r3308) |
| 599 | 600 | * |
| 600 | 601 | * @param string $terms Comma-separated list of terms |
| 601 | 602 | * @param int $topic_id |
| … |
… |
class BBP_Akismet { |
| 632 | 633 | * This code is directly taken from the akismet_http_post() function and |
| 633 | 634 | * documented to bbPress 2.0 standard. |
| 634 | 635 | * |
| 635 | | * @since bbPress (r3466) |
| | 636 | * @since 2.0.0 bbPress (r3466) |
| 636 | 637 | * |
| 637 | 638 | * @param string $request The request we are sending |
| 638 | 639 | * @param string $host The host to send our request to |
| … |
… |
class BBP_Akismet { |
| 689 | 690 | /** |
| 690 | 691 | * Return a user's roles on this site (including super_admin) |
| 691 | 692 | * |
| 692 | | * @since bbPress (r4812) |
| | 693 | * @since 2.3.0 bbPress (r4812) |
| 693 | 694 | * |
| 694 | 695 | * @param type $user_id |
| 695 | 696 | * @return boolean |
| … |
… |
class BBP_Akismet { |
| 723 | 724 | /** |
| 724 | 725 | * Add Aksimet History metaboxes to topics and replies |
| 725 | 726 | * |
| 726 | | * @since bbPress (r5049) |
| | 727 | * @since 2.4.0 bbPress (r5049) |
| 727 | 728 | */ |
| 728 | 729 | public function add_metaboxes() { |
| 729 | 730 | |
| … |
… |
class BBP_Akismet { |
| 751 | 752 | /** |
| 752 | 753 | * Output for Akismet History metabox |
| 753 | 754 | * |
| 754 | | * @since bbPress (r5049) |
| | 755 | * @since 2.4.0 bbPress (r5049) |
| 755 | 756 | * |
| 756 | 757 | * @uses get_post_history() To get the Akismet history for the post |
| 757 | 758 | * @uses get_the_ID() To get the post ID |
-
diff --git src/includes/extend/buddypress/activity.php src/includes/extend/buddypress/activity.php
index 9366f30..20bff29 100644
|
|
|
if ( !class_exists( 'BBP_BuddyPress_Activity' ) ) : |
| 14 | 14 | /** |
| 15 | 15 | * Loads BuddyPress Activity extension |
| 16 | 16 | * |
| 17 | | * @since bbPress (r3395) |
| | 17 | * @since 2.0.0 bbPress (r3395) |
| 18 | 18 | * |
| 19 | 19 | * @package bbPress |
| 20 | 20 | * @subpackage BuddyPress |
| … |
… |
class BBP_BuddyPress_Activity { |
| 84 | 84 | /** |
| 85 | 85 | * The bbPress BuddyPress Activity loader |
| 86 | 86 | * |
| 87 | | * @since bbPress (r3395) |
| | 87 | * @since 2.0.0 bbPress (r3395) |
| 88 | 88 | */ |
| 89 | 89 | public function __construct() { |
| 90 | 90 | $this->setup_globals(); |
| … |
… |
class BBP_BuddyPress_Activity { |
| 96 | 96 | /** |
| 97 | 97 | * Extension variables |
| 98 | 98 | * |
| 99 | | * @since bbPress (r3395) |
| | 99 | * @since 2.0.0 bbPress (r3395) |
| | 100 | * |
| 100 | 101 | * @access private |
| 101 | 102 | * @uses apply_filters() Calls various filters |
| 102 | 103 | */ |
| … |
… |
class BBP_BuddyPress_Activity { |
| 122 | 123 | /** |
| 123 | 124 | * Setup the actions |
| 124 | 125 | * |
| 125 | | * @since bbPress (r3395) |
| | 126 | * @since 2.0.0 bbPress (r3395) |
| | 127 | * |
| 126 | 128 | * @access private |
| 127 | 129 | * @uses add_filter() To add various filters |
| 128 | 130 | * @uses add_action() To add various actions |
| … |
… |
class BBP_BuddyPress_Activity { |
| 157 | 159 | /** |
| 158 | 160 | * Setup the filters |
| 159 | 161 | * |
| 160 | | * @since bbPress (r3395) |
| | 162 | * @since 2.0.0 bbPress (r3395) |
| | 163 | * |
| 161 | 164 | * @access private |
| 162 | 165 | * @uses add_filter() To add various filters |
| 163 | 166 | * @uses add_action() To add various actions |
| … |
… |
class BBP_BuddyPress_Activity { |
| 175 | 178 | * Allow the variables, actions, and filters to be modified by third party |
| 176 | 179 | * plugins and themes. |
| 177 | 180 | * |
| 178 | | * @since bbPress (r3902) |
| | 181 | * @since 2.1.0 bbPress (r3902) |
| 179 | 182 | */ |
| 180 | 183 | private function fully_loaded() { |
| 181 | 184 | do_action_ref_array( 'bbp_buddypress_activity_loaded', array( $this ) ); |
| … |
… |
class BBP_BuddyPress_Activity { |
| 186 | 189 | /** |
| 187 | 190 | * Register our activity actions with BuddyPress |
| 188 | 191 | * |
| 189 | | * @since bbPress (r3395) |
| | 192 | * @since 2.0.0 bbPress (r3395) |
| | 193 | * |
| 190 | 194 | * @uses bp_activity_set_action() |
| 191 | 195 | */ |
| 192 | 196 | public function register_activity_actions() { |
| … |
… |
class BBP_BuddyPress_Activity { |
| 199 | 203 | /** |
| 200 | 204 | * Wrapper for recoding bbPress actions to the BuddyPress activity stream |
| 201 | 205 | * |
| 202 | | * @since bbPress (r3395) |
| | 206 | * @since 2.0.0 bbPress (r3395) |
| | 207 | * |
| 203 | 208 | * @param type $args Array of arguments for bp_activity_add() |
| 204 | 209 | * @uses bbp_get_current_user_id() |
| 205 | 210 | * @uses bp_core_current_time() |
| … |
… |
class BBP_BuddyPress_Activity { |
| 232 | 237 | /** |
| 233 | 238 | * Wrapper for deleting bbPress actions from BuddyPress activity stream |
| 234 | 239 | * |
| 235 | | * @since bbPress (r3395) |
| | 240 | * @since 2.0.0 bbPress (r3395) |
| | 241 | * |
| 236 | 242 | * @param type $args Array of arguments for bp_activity_add() |
| 237 | 243 | * @uses bbp_get_current_user_id() |
| 238 | 244 | * @uses bp_core_current_time() |
| … |
… |
class BBP_BuddyPress_Activity { |
| 287 | 293 | /** |
| 288 | 294 | * Maybe disable activity stream comments on select actions |
| 289 | 295 | * |
| 290 | | * @since bbPress (r3399) |
| | 296 | * @since 2.0.0 bbPress (r3399) |
| | 297 | * |
| 291 | 298 | * @global BP_Activity_Template $activities_template |
| 292 | 299 | * @param boolean $can_comment |
| 293 | 300 | * @uses bp_get_activity_action_name() |
| … |
… |
class BBP_BuddyPress_Activity { |
| 325 | 332 | /** |
| 326 | 333 | * Maybe link directly to topics and replies in activity stream entries |
| 327 | 334 | * |
| 328 | | * @since bbPress (r3399) |
| | 335 | * @since 2.0.0 bbPress (r3399) |
| | 336 | * |
| 329 | 337 | * @param string $link |
| 330 | 338 | * @param mixed $activity_object |
| 331 | 339 | * @return string The link to the activity stream item |
| … |
… |
class BBP_BuddyPress_Activity { |
| 349 | 357 | /** |
| 350 | 358 | * Append forum options to activity filter select box |
| 351 | 359 | * |
| 352 | | * @since bbPress (r3653) |
| | 360 | * @since 2.1.0 bbPress (r3653) |
| 353 | 361 | */ |
| 354 | 362 | function activity_filter_options() { |
| 355 | 363 | ?> |
| … |
… |
class BBP_BuddyPress_Activity { |
| 365 | 373 | /** |
| 366 | 374 | * Record an activity stream entry when a topic is created or updated |
| 367 | 375 | * |
| 368 | | * @since bbPress (r3395) |
| | 376 | * @since 2.0.0 bbPress (r3395) |
| | 377 | * |
| 369 | 378 | * @param int $topic_id |
| 370 | 379 | * @param int $forum_id |
| 371 | 380 | * @param array $anonymous_data |
| … |
… |
class BBP_BuddyPress_Activity { |
| 512 | 521 | /** |
| 513 | 522 | * Record an activity stream entry when a reply is created |
| 514 | 523 | * |
| 515 | | * @since bbPress (r3395) |
| | 524 | * @since 2.0.0 bbPress (r3395) |
| | 525 | * |
| 516 | 526 | * @param int $topic_id |
| 517 | 527 | * @param int $forum_id |
| 518 | 528 | * @param array $anonymous_data |
-
diff --git src/includes/extend/buddypress/functions.php src/includes/extend/buddypress/functions.php
index 14c0fec..07a2979 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 18 | 18 | * |
| 19 | 19 | * This is used primarily for Notifications integration. |
| 20 | 20 | * |
| 21 | | * @since bbPress (r5232) |
| | 21 | * @since 2.6.0 bbPress (r5232) |
| | 22 | * |
| 22 | 23 | * @return string |
| 23 | 24 | */ |
| 24 | 25 | function bbp_get_component_name() { |
| … |
… |
function bbp_get_component_name() { |
| 38 | 39 | /** |
| 39 | 40 | * Filter the current bbPress user ID with the current BuddyPress user ID |
| 40 | 41 | * |
| 41 | | * @since bbPress (r3552) |
| | 42 | * @since 2.1.0 bbPress (r3552) |
| 42 | 43 | * |
| 43 | 44 | * @param int $user_id |
| 44 | 45 | * @param bool $displayed_user_fallback |
| … |
… |
add_filter( 'bbp_get_user_id', 'bbp_filter_user_id', 10, 3 ); |
| 77 | 78 | /** |
| 78 | 79 | * Filter the bbPress is_single_user function with BuddyPress eqivalent |
| 79 | 80 | * |
| 80 | | * @since bbPress (r3552) |
| | 81 | * @since 2.1.0 bbPress (r3552) |
| 81 | 82 | * |
| 82 | 83 | * @param bool $is Optional. Default false |
| 83 | 84 | * @return bool True if viewing single user, false if not |
| … |
… |
add_filter( 'bbp_is_single_user', 'bbp_filter_is_single_user', 10, 1 ); |
| 94 | 95 | /** |
| 95 | 96 | * Filter the bbPress is_user_home function with BuddyPress eqivalent |
| 96 | 97 | * |
| 97 | | * @since bbPress (r3552) |
| | 98 | * @since 2.1.0 bbPress (r3552) |
| 98 | 99 | * |
| 99 | 100 | * @param bool $is Optional. Default false |
| 100 | 101 | * @return bool True if viewing single user, false if not |
| … |
… |
add_filter( 'bbp_is_user_home', 'bbp_filter_is_user_home', 10, 1 ); |
| 111 | 112 | /** |
| 112 | 113 | * Add the topic title to the <title> if viewing a single group forum topic |
| 113 | 114 | * |
| 114 | | * @since bbPress (r5161) |
| | 115 | * @since 2.5.0 bbPress (r5161) |
| 115 | 116 | * |
| 116 | 117 | * @param string $new_title The title to filter |
| 117 | 118 | * @param string $old_title (Not used) |
| … |
… |
add_action( 'bp_modify_page_title', 'bbp_filter_modify_page_title', 10, 3 ); |
| 149 | 150 | /** |
| 150 | 151 | * Hook bbPress topics template into plugins template |
| 151 | 152 | * |
| 152 | | * @since bbPress (r3552) |
| | 153 | * @since 2.1.0 bbPress (r3552) |
| 153 | 154 | * |
| 154 | 155 | * @uses add_action() To add the content hook |
| 155 | 156 | * @uses bp_core_load_template() To load the plugins template |
| … |
… |
function bbp_member_forums_screen_topics() { |
| 162 | 163 | /** |
| 163 | 164 | * Hook bbPress replies template into plugins template |
| 164 | 165 | * |
| 165 | | * @since bbPress (r3552) |
| | 166 | * @since 2.1.0 bbPress (r3552) |
| 166 | 167 | * |
| 167 | 168 | * @uses add_action() To add the content hook |
| 168 | 169 | * @uses bp_core_load_template() To load the plugins template |
| … |
… |
function bbp_member_forums_screen_replies() { |
| 175 | 176 | /** |
| 176 | 177 | * Hook bbPress favorites template into plugins template |
| 177 | 178 | * |
| 178 | | * @since bbPress (r3552) |
| | 179 | * @since 2.1.0 bbPress (r3552) |
| 179 | 180 | * |
| 180 | 181 | * @uses add_action() To add the content hook |
| 181 | 182 | * @uses bp_core_load_template() To load the plugins template |
| … |
… |
function bbp_member_forums_screen_favorites() { |
| 188 | 189 | /** |
| 189 | 190 | * Hook bbPress subscriptions template into plugins template |
| 190 | 191 | * |
| 191 | | * @since bbPress (r3552) |
| | 192 | * @since 2.1.0 bbPress (r3552) |
| 192 | 193 | * |
| 193 | 194 | * @uses add_action() To add the content hook |
| 194 | 195 | * @uses bp_core_load_template() To load the plugins template |
| … |
… |
function bbp_member_forums_screen_subscriptions() { |
| 203 | 204 | /** |
| 204 | 205 | * Get the topics created template part |
| 205 | 206 | * |
| 206 | | * @since bbPress (r3552) |
| | 207 | * @since 2.1.0 bbPress (r3552) |
| 207 | 208 | * |
| 208 | 209 | * @uses bbp_get_template_part()s |
| 209 | 210 | */ |
| … |
… |
function bbp_member_forums_topics_content() { |
| 222 | 223 | /** |
| 223 | 224 | * Get the topics replied to template part |
| 224 | 225 | * |
| 225 | | * @since bbPress (r3552) |
| | 226 | * @since 2.1.0 bbPress (r3552) |
| 226 | 227 | * |
| 227 | 228 | * @uses bbp_get_template_part() |
| 228 | 229 | */ |
| … |
… |
function bbp_member_forums_replies_content() { |
| 241 | 242 | /** |
| 242 | 243 | * Get the topics favorited template part |
| 243 | 244 | * |
| 244 | | * @since bbPress (r3552) |
| | 245 | * @since 2.1.0 bbPress (r3552) |
| 245 | 246 | * |
| 246 | 247 | * @uses bbp_get_template_part() |
| 247 | 248 | */ |
| … |
… |
function bbp_member_forums_favorites_content() { |
| 260 | 261 | /** |
| 261 | 262 | * Get the topics subscribed template part |
| 262 | 263 | * |
| 263 | | * @since bbPress (r3552) |
| | 264 | * @since 2.1.0 bbPress (r3552) |
| 264 | 265 | * |
| 265 | 266 | * @uses bbp_get_template_part() |
| 266 | 267 | */ |
| … |
… |
function bbp_member_forums_subscriptions_content() { |
| 289 | 290 | * Get forum ID's for a group |
| 290 | 291 | * |
| 291 | 292 | * @param type $group_id |
| 292 | | * @since bbPress (r3653) |
| | 293 | * @since 2.1.0 bbPress (r3653) |
| 293 | 294 | */ |
| 294 | 295 | function bbp_get_group_forum_ids( $group_id = 0 ) { |
| 295 | 296 | |
| … |
… |
function bbp_get_group_forum_ids( $group_id = 0 ) { |
| 321 | 322 | * Get group ID's for a forum |
| 322 | 323 | * |
| 323 | 324 | * @param type $forum_id |
| 324 | | * @since bbPress (r3653) |
| | 325 | * @since 2.1.0 bbPress (r3653) |
| 325 | 326 | */ |
| 326 | 327 | function bbp_get_forum_group_ids( $forum_id = 0 ) { |
| 327 | 328 | |
| … |
… |
function bbp_get_forum_group_ids( $forum_id = 0 ) { |
| 353 | 354 | * Get forum ID's for a group |
| 354 | 355 | * |
| 355 | 356 | * @param type $group_id |
| 356 | | * @since bbPress (r3653) |
| | 357 | * @since 2.1.0 bbPress (r3653) |
| 357 | 358 | */ |
| 358 | 359 | function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) { |
| 359 | 360 | |
| … |
… |
function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) { |
| 373 | 374 | * Update group ID's for a forum |
| 374 | 375 | * |
| 375 | 376 | * @param type $forum_id |
| 376 | | * @since bbPress (r3653) |
| | 377 | * @since 2.1.0 bbPress (r3653) |
| 377 | 378 | */ |
| 378 | 379 | function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) { |
| 379 | 380 | $forum_id = bbp_get_forum_id( $forum_id ); |
| … |
… |
function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) { |
| 389 | 390 | * Add a group to a forum |
| 390 | 391 | * |
| 391 | 392 | * @param type $group_id |
| 392 | | * @since bbPress (r3653) |
| | 393 | * @since 2.1.0 bbPress (r3653) |
| 393 | 394 | */ |
| 394 | 395 | function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) { |
| 395 | 396 | |
| … |
… |
function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) { |
| 415 | 416 | * Remove a forum from a group |
| 416 | 417 | * |
| 417 | 418 | * @param type $group_id |
| 418 | | * @since bbPress (r3653) |
| | 419 | * @since 2.1.0 bbPress (r3653) |
| 419 | 420 | */ |
| 420 | 421 | function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) { |
| 421 | 422 | |
| … |
… |
function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) { |
| 441 | 442 | * Remove a group from a forum |
| 442 | 443 | * |
| 443 | 444 | * @param type $group_id |
| 444 | | * @since bbPress (r3653) |
| | 445 | * @since 2.1.0 bbPress (r3653) |
| 445 | 446 | */ |
| 446 | 447 | function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) { |
| 447 | 448 | |
| … |
… |
function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) { |
| 467 | 468 | * Remove a forum from a group |
| 468 | 469 | * |
| 469 | 470 | * @param type $group_id |
| 470 | | * @since bbPress (r3653) |
| | 471 | * @since 2.1.0 bbPress (r3653) |
| 471 | 472 | */ |
| 472 | 473 | function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) { |
| 473 | 474 | |
| … |
… |
function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) { |
| 493 | 494 | * Remove a group from aall forums |
| 494 | 495 | * |
| 495 | 496 | * @param type $group_id |
| 496 | | * @since bbPress (r3653) |
| | 497 | * @since 2.1.0 bbPress (r3653) |
| 497 | 498 | */ |
| 498 | 499 | function bbp_remove_group_id_from_all_forums( $group_id = 0 ) { |
| 499 | 500 | |
| … |
… |
function bbp_remove_group_id_from_all_forums( $group_id = 0 ) { |
| 515 | 516 | * Remove a forum from all groups |
| 516 | 517 | * |
| 517 | 518 | * @param type $forum_id |
| 518 | | * @since bbPress (r3653) |
| | 519 | * @since 2.1.0 bbPress (r3653) |
| 519 | 520 | */ |
| 520 | 521 | function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) { |
| 521 | 522 | |
| … |
… |
function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) { |
| 532 | 533 | /** |
| 533 | 534 | * Return true if a forum is a group forum |
| 534 | 535 | * |
| 535 | | * @since bbPress (r4571) |
| | 536 | * @since 2.3.0 bbPress (r4571) |
| 536 | 537 | * |
| 537 | 538 | * @param int $forum_id |
| 538 | 539 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_is_forum_group_forum( $forum_id = 0 ) { |
| 559 | 560 | /** |
| 560 | 561 | * Is the current user an admin of the current group |
| 561 | 562 | * |
| 562 | | * @since bbPress (r4632) |
| | 563 | * @since 2.3.0 bbPress (r4632) |
| 563 | 564 | * |
| 564 | 565 | * @uses is_user_logged_in() |
| 565 | 566 | * @uses bp_is_group() |
| … |
… |
function bbp_group_is_admin() { |
| 590 | 591 | /** |
| 591 | 592 | * Is the current user a moderator of the current group |
| 592 | 593 | * |
| 593 | | * @since bbPress (r4632) |
| | 594 | * @since 2.3.0 bbPress (r4632) |
| 594 | 595 | * |
| 595 | 596 | * @uses is_user_logged_in() |
| 596 | 597 | * @uses bp_is_group() |
| … |
… |
function bbp_group_is_mod() { |
| 621 | 622 | /** |
| 622 | 623 | * Is the current user a member of the current group |
| 623 | 624 | * |
| 624 | | * @since bbPress (r4632) |
| | 625 | * @since 2.3.0 bbPress (r4632) |
| 625 | 626 | * |
| 626 | 627 | * @uses is_user_logged_in() |
| 627 | 628 | * @uses bp_is_group() |
| … |
… |
function bbp_group_is_member() { |
| 652 | 653 | /** |
| 653 | 654 | * Is the current user banned from the current group |
| 654 | 655 | * |
| 655 | | * @since bbPress (r4632) |
| | 656 | * @since 2.3.0 bbPress (r4632) |
| 656 | 657 | * |
| 657 | 658 | * @uses is_user_logged_in() |
| 658 | 659 | * @uses bp_is_group() |
| … |
… |
function bbp_group_is_banned() { |
| 683 | 684 | /** |
| 684 | 685 | * Is the current user the creator of the current group |
| 685 | 686 | * |
| 686 | | * @since bbPress (r4632) |
| | 687 | * @since 2.3.0 bbPress (r4632) |
| 687 | 688 | * |
| 688 | 689 | * @uses is_user_logged_in() |
| 689 | 690 | * @uses bp_is_group() |
-
diff --git src/includes/extend/buddypress/groups.php src/includes/extend/buddypress/groups.php
index c7b5167..408bf1e 100644
|
|
|
if ( !class_exists( 'BBP_Forums_Group_Extension' ) && class_exists( 'BP_Group_Ex |
| 18 | 18 | /** |
| 19 | 19 | * Loads Group Extension for Forums Component |
| 20 | 20 | * |
| 21 | | * @since bbPress (r3552) |
| | 21 | * @since 2.1.0 bbPress (r3552) |
| 22 | 22 | * |
| 23 | 23 | * @package bbPress |
| 24 | 24 | * @subpackage BuddyPress |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 30 | 30 | /** |
| 31 | 31 | * Setup bbPress group extension variables |
| 32 | 32 | * |
| 33 | | * @since bbPress (r3552) |
| | 33 | * @since 2.1.0 bbPress (r3552) |
| 34 | 34 | */ |
| 35 | 35 | public function __construct() { |
| 36 | 36 | $this->setup_variables(); |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 42 | 42 | /** |
| 43 | 43 | * Setup the group forums class variables |
| 44 | 44 | * |
| 45 | | * @since bbPress (r3552) |
| | 45 | * @since 2.1.0 bbPress (r3552) |
| 46 | 46 | */ |
| 47 | 47 | private function setup_variables() { |
| 48 | 48 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 75 | 75 | /** |
| 76 | 76 | * Setup the group forums class actions |
| 77 | 77 | * |
| 78 | | * @since bbPress (r4552) |
| | 78 | * @since 2.3.0 bbPress (r4552) |
| 79 | 79 | */ |
| 80 | 80 | private function setup_actions() { |
| 81 | 81 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 104 | 104 | /** |
| 105 | 105 | * Setup the group forums class filters |
| 106 | 106 | * |
| 107 | | * @since bbPress (r4552) |
| | 107 | * @since 2.3.0 bbPress (r4552) |
| 108 | 108 | */ |
| 109 | 109 | private function setup_filters() { |
| 110 | 110 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 149 | 149 | /** |
| 150 | 150 | * The primary display function for group forums |
| 151 | 151 | * |
| 152 | | * @since bbPress (r3746) |
| | 152 | * @since 2.1.0 bbPress (r3746) |
| 153 | 153 | * |
| 154 | 154 | * @param int $group_id ID of the current group. Available only on BP 2.2+. |
| 155 | 155 | */ |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 174 | 174 | /** |
| 175 | 175 | * Maybe unset the group forum nav item if group does not have a forum |
| 176 | 176 | * |
| 177 | | * @since bbPress (r4552) |
| | 177 | * @since 2.3.0 bbPress (r4552) |
| 178 | 178 | * |
| 179 | 179 | * @return If not viewing a single group |
| 180 | 180 | */ |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 195 | 195 | /** |
| 196 | 196 | * Allow group members to have advanced priviledges in group forum topics. |
| 197 | 197 | * |
| 198 | | * @since bbPress (r4434) |
| | 198 | * @since 2.2.0 bbPress (r4434) |
| 199 | 199 | * |
| 200 | 200 | * @param array $caps |
| 201 | 201 | * @param string $cap |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 245 | 245 | /** |
| 246 | 246 | * Remove the topic meta cap map, so it doesn't interfere with sidebars. |
| 247 | 247 | * |
| 248 | | * @since bbPress (r4434) |
| | 248 | * @since 2.2.0 bbPress (r4434) |
| 249 | 249 | */ |
| 250 | 250 | public function remove_group_forum_meta_cap_map() { |
| 251 | 251 | remove_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 99, 4 ); |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 256 | 256 | /** |
| 257 | 257 | * Show forums and new forum form when editing a group |
| 258 | 258 | * |
| 259 | | * @since bbPress (r3563) |
| | 259 | * @since 2.1.0 bbPress (r3563) |
| 260 | 260 | * |
| 261 | 261 | * @param object $group (the group to edit if in Group Admin UI) |
| 262 | 262 | * @uses is_admin() To check if we're in the Group Admin UI |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 322 | 322 | /** |
| 323 | 323 | * Save the Group Forum data on edit |
| 324 | 324 | * |
| 325 | | * @since bbPress (r3465) |
| | 325 | * @since 2.0.0 bbPress (r3465) |
| 326 | 326 | * |
| 327 | 327 | * @param int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after ) |
| 328 | 328 | * @uses bbp_new_forum_handler() To check for forum creation |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 433 | 433 | /** |
| 434 | 434 | * Adds a metabox to BuddyPress Group Admin UI |
| 435 | 435 | * |
| 436 | | * @since bbPress (r4814) |
| | 436 | * @since 2.3.0 bbPress (r4814) |
| 437 | 437 | * |
| 438 | 438 | * @uses add_meta_box |
| 439 | 439 | * @uses BBP_Forums_Group_Extension::group_admin_ui_display_metabox() To display the edit screen |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 452 | 452 | /** |
| 453 | 453 | * Displays the bbPress metabox in BuddyPress Group Admin UI |
| 454 | 454 | * |
| 455 | | * @since bbPress (r4814) |
| | 455 | * @since 2.3.0 bbPress (r4814) |
| 456 | 456 | * |
| 457 | 457 | * @param object $item (group object) |
| 458 | 458 | * @uses add_meta_box |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 467 | 467 | /** |
| 468 | 468 | * Show forums and new forum form when creating a group |
| 469 | 469 | * |
| 470 | | * @since bbPress (r3465) |
| | 470 | * @since 2.0.0 bbPress (r3465) |
| 471 | 471 | */ |
| 472 | 472 | public function create_screen( $group_id = 0 ) { |
| 473 | 473 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 497 | 497 | /** |
| 498 | 498 | * Save the Group Forum data on create |
| 499 | 499 | * |
| 500 | | * @since bbPress (r3465) |
| | 500 | * @since 2.0.0 bbPress (r3465) |
| 501 | 501 | */ |
| 502 | 502 | public function create_screen_save( $group_id = 0 ) { |
| 503 | 503 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 584 | 584 | /** |
| 585 | 585 | * Used to start an output buffer |
| 586 | 586 | * |
| 587 | | * @since bbPress (r3746) |
| | 587 | * @since 2.1.0 bbPress (r3746) |
| 588 | 588 | */ |
| 589 | 589 | public function ob_start() { |
| 590 | 590 | ob_start(); |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 593 | 593 | /** |
| 594 | 594 | * Used to end an output buffer |
| 595 | 595 | * |
| 596 | | * @since bbPress (r3746) |
| | 596 | * @since 2.1.0 bbPress (r3746) |
| 597 | 597 | */ |
| 598 | 598 | public function ob_end_clean() { |
| 599 | 599 | ob_end_clean(); |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 602 | 602 | /** |
| 603 | 603 | * Creating a group forum or category (including root for group) |
| 604 | 604 | * |
| 605 | | * @since bbPress (r3653) |
| | 605 | * @since 2.1.0 bbPress (r3653) |
| 606 | 606 | * |
| 607 | 607 | * @param type $forum_args |
| 608 | 608 | * @uses bbp_get_forum_id() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 629 | 629 | /** |
| 630 | 630 | * Removing a group forum or category (including root for group) |
| 631 | 631 | * |
| 632 | | * @since bbPress (r3653) |
| | 632 | * @since 2.1.0 bbPress (r3653) |
| 633 | 633 | * |
| 634 | 634 | * @param type $forum_args |
| 635 | 635 | * @uses bbp_get_forum_id() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 656 | 656 | /** |
| 657 | 657 | * Listening to BuddyPress Group deletion to remove the forum |
| 658 | 658 | * |
| 659 | | * @since bbPress (r4815) |
| | 659 | * @since 2.3.0 bbPress (r4815) |
| 660 | 660 | * |
| 661 | 661 | * @param int $group_id The group ID |
| 662 | 662 | * @uses bbp_get_group_forum_ids() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 735 | 735 | /** |
| 736 | 736 | * Toggle the enable_forum group setting on or off |
| 737 | 737 | * |
| 738 | | * @since bbPress (r4612) |
| | 738 | * @since 2.3.0 bbPress (r4612) |
| 739 | 739 | * |
| 740 | 740 | * @param int $group_id The group to toggle |
| 741 | 741 | * @param bool $enabled True for on, false for off |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 778 | 778 | * As of right now, bbPress only supports 1-to-1 group forum relationships. |
| 779 | 779 | * In the future, many-to-many should be allowed. |
| 780 | 780 | * |
| 781 | | * @since bbPress (r3653) |
| | 781 | * @since 2.1.0 bbPress (r3653) |
| 782 | 782 | * |
| 783 | 783 | * @uses bp_get_current_group_id() |
| 784 | 784 | * @uses bbp_get_group_forum_ids() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 977 | 977 | /** |
| 978 | 978 | * Strip super stickies from the topic query |
| 979 | 979 | * |
| 980 | | * @since bbPress (r4810) |
| | 980 | * @since 2.3.0 bbPress (r4810) |
| 981 | 981 | * |
| 982 | 982 | * @access private |
| 983 | 983 | * @param array $super the super sticky post ID's |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 991 | 991 | /** |
| 992 | 992 | * Unset the type super sticky from topic type |
| 993 | 993 | * |
| 994 | | * @since bbPress (r4810) |
| | 994 | * @since 2.3.0 bbPress (r4810) |
| 995 | 995 | * |
| 996 | 996 | * @access private |
| 997 | 997 | * @param array $args |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1007 | 1007 | /** |
| 1008 | 1008 | * Ugly preg_replace to hide the to front admin link |
| 1009 | 1009 | * |
| 1010 | | * @since bbPress (r4810) |
| | 1010 | * @since 2.3.0 bbPress (r4810) |
| 1011 | 1011 | * |
| 1012 | 1012 | * @access private |
| 1013 | 1013 | * @param string $retval |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1027 | 1027 | /** |
| 1028 | 1028 | * Redirect to the group forum screen |
| 1029 | 1029 | * |
| 1030 | | * @since bbPress (r3653) |
| | 1030 | * @since 2.1.0 bbPress (r3653) |
| 1031 | 1031 | * |
| 1032 | 1032 | * @param str $redirect_url |
| 1033 | 1033 | * @param str $redirect_to |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1045 | 1045 | /** |
| 1046 | 1046 | * Redirect to the group forum screen |
| 1047 | 1047 | * |
| 1048 | | * @since bbPress (r3653) |
| | 1048 | * @since 2.1.0 bbPress (r3653) |
| 1049 | 1049 | */ |
| 1050 | 1050 | public function new_reply_redirect_to( $redirect_url = '', $redirect_to = '', $reply_id = 0 ) { |
| 1051 | 1051 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1078 | 1078 | /** |
| 1079 | 1079 | * Redirect to the group admin forum edit screen |
| 1080 | 1080 | * |
| 1081 | | * @since bbPress (r3653) |
| | 1081 | * @since 2.1.0 bbPress (r3653) |
| 1082 | 1082 | * |
| 1083 | 1083 | * @uses groups_get_current_group() |
| 1084 | 1084 | * @uses bp_is_group_admin_screen() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1104 | 1104 | /** |
| 1105 | 1105 | * Prevent Forum Parent from appearing |
| 1106 | 1106 | * |
| 1107 | | * @since bbPress (r3746) |
| | 1107 | * @since 2.1.0 bbPress (r3746) |
| 1108 | 1108 | */ |
| 1109 | 1109 | |
| 1110 | 1110 | public function forum_parent() { |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1118 | 1118 | /** |
| 1119 | 1119 | * Prevent Topic Parent from appearing |
| 1120 | 1120 | * |
| 1121 | | * @since bbPress (r3746) |
| | 1121 | * @since 2.1.0 bbPress (r3746) |
| 1122 | 1122 | * |
| 1123 | 1123 | * @uses bbp_get_group_forum_ids() to get BuddyPress group forums |
| 1124 | 1124 | * @uses bbp_dropdown() To show a dropdown of the forums for forum parent |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1139 | 1139 | /** |
| 1140 | 1140 | * Permissions to view the 'New Topic'/'Reply To' form in a BuddyPress group. |
| 1141 | 1141 | * |
| 1142 | | * @since bbPress (r4608) |
| | 1142 | * @since 2.3.0 bbPress (r4608) |
| 1143 | 1143 | * |
| 1144 | 1144 | * @param bool $retval Are we allowed to view the reply form? |
| 1145 | 1145 | * @uses bp_is_group() To determine if we're on a group page |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1184 | 1184 | * Due to the way BuddyPress' group admin settings page saves its settings, |
| 1185 | 1185 | * we need to let BP know that bbPress added a forum. |
| 1186 | 1186 | * |
| 1187 | | * @since bbPress (r5026) |
| | 1187 | * @since 2.4.0 bbPress (r5026) |
| 1188 | 1188 | * |
| 1189 | 1189 | * @link https://bbpress.trac.wordpress.org/ticket/2339/ |
| 1190 | 1190 | * @see groups_screen_group_admin_settings() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1206 | 1206 | /** |
| 1207 | 1207 | * Maybe map a bbPress forum/topic/reply permalink to the corresponding group |
| 1208 | 1208 | * |
| 1209 | | * @since bbPress (r4266) |
| | 1209 | * @since 2.2.0 bbPress (r4266) |
| 1210 | 1210 | * |
| 1211 | 1211 | * @param int $post_id |
| 1212 | 1212 | * @uses get_post() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1277 | 1277 | /** |
| 1278 | 1278 | * Map a forum permalink to its corresponding group |
| 1279 | 1279 | * |
| 1280 | | * @since bbPress (r3802) |
| | 1280 | * @since 2.1.0 bbPress (r3802) |
| 1281 | 1281 | * |
| 1282 | 1282 | * @param string $url |
| 1283 | 1283 | * @param int $forum_id |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1291 | 1291 | /** |
| 1292 | 1292 | * Map a topic permalink to its group forum |
| 1293 | 1293 | * |
| 1294 | | * @since bbPress (r3802) |
| | 1294 | * @since 2.1.0 bbPress (r3802) |
| 1295 | 1295 | * |
| 1296 | 1296 | * @param string $url |
| 1297 | 1297 | * @param int $topic_id |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1305 | 1305 | /** |
| 1306 | 1306 | * Map a reply permalink to its group forum |
| 1307 | 1307 | * |
| 1308 | | * @since bbPress (r3802) |
| | 1308 | * @since 2.1.0 bbPress (r3802) |
| 1309 | 1309 | * |
| 1310 | 1310 | * @param string $url |
| 1311 | 1311 | * @param int $reply_id |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1319 | 1319 | /** |
| 1320 | 1320 | * Map a reply edit link to its group forum |
| 1321 | 1321 | * |
| 1322 | | * @since bbPress (r4266) |
| | 1322 | * @since 2.2.0 bbPress (r4266) |
| 1323 | 1323 | * |
| 1324 | 1324 | * @param string $url |
| 1325 | 1325 | * @param int $reply_id |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1339 | 1339 | /** |
| 1340 | 1340 | * Map a post link to its group forum |
| 1341 | 1341 | * |
| 1342 | | * @since bbPress (r4266) |
| | 1342 | * @since 2.2.0 bbPress (r4266) |
| 1343 | 1343 | * |
| 1344 | 1344 | * @param string $url |
| 1345 | 1345 | * @param obj $post |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1354 | 1354 | /** |
| 1355 | 1355 | * Map a page link to its group forum |
| 1356 | 1356 | * |
| 1357 | | * @since bbPress (r4266) |
| | 1357 | * @since 2.2.0 bbPress (r4266) |
| 1358 | 1358 | * |
| 1359 | 1359 | * @param string $url |
| 1360 | 1360 | * @param int $post_id |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1369 | 1369 | /** |
| 1370 | 1370 | * Map a custom post type link to its group forum |
| 1371 | 1371 | * |
| 1372 | | * @since bbPress (r4266) |
| | 1372 | * @since 2.2.0 bbPress (r4266) |
| 1373 | 1373 | * |
| 1374 | 1374 | * @param string $url |
| 1375 | 1375 | * @param obj $post |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1385 | 1385 | /** |
| 1386 | 1386 | * Fix pagination of topics on forum view |
| 1387 | 1387 | * |
| 1388 | | * @since bbPress (r4266) |
| | 1388 | * @since 2.2.0 bbPress (r4266) |
| 1389 | 1389 | * |
| 1390 | 1390 | * @param array $args |
| 1391 | 1391 | * @uses bbp_get_forum_id() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1407 | 1407 | /** |
| 1408 | 1408 | * Fix pagination of replies on topic view |
| 1409 | 1409 | * |
| 1410 | | * @since bbPress (r4266) |
| | 1410 | * @since 2.2.0 bbPress (r4266) |
| 1411 | 1411 | * |
| 1412 | 1412 | * @param array $args |
| 1413 | 1413 | * @uses bbp_get_topic_id() |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1429 | 1429 | * Ensure that forum content associated with a BuddyPress group can only be |
| 1430 | 1430 | * viewed via the group URL. |
| 1431 | 1431 | * |
| 1432 | | * @since bbPress (r3802) |
| | 1432 | * @since 2.1.0 bbPress (r3802) |
| 1433 | 1433 | */ |
| 1434 | 1434 | public function redirect_canonical() { |
| 1435 | 1435 | |
| … |
… |
class BBP_Forums_Group_Extension extends BP_Group_Extension { |
| 1474 | 1474 | /** |
| 1475 | 1475 | * Map a forum post to its corresponding group in the group activity stream. |
| 1476 | 1476 | * |
| 1477 | | * @since bbPress (r4396) |
| | 1477 | * @since 2.2.0 bbPress (r4396) |
| 1478 | 1478 | * |
| 1479 | 1479 | * @param array $args Arguments from BBP_BuddyPress_Activity::record_activity() |
| 1480 | 1480 | * @uses groups_get_current_group() To see if we're posting from a BP group |
-
diff --git src/includes/extend/buddypress/loader.php src/includes/extend/buddypress/loader.php
index 01f4b5c..5dde500 100644
|
|
|
if ( !class_exists( 'BBP_Forums_Component' ) ) : |
| 24 | 24 | /** |
| 25 | 25 | * Loads Forums Component |
| 26 | 26 | * |
| 27 | | * @since bbPress (r3552) |
| | 27 | * @since 2.1.0 bbPress (r3552) |
| 28 | 28 | * |
| 29 | 29 | * @package bbPress |
| 30 | 30 | * @subpackage BuddyPress |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 34 | 34 | /** |
| 35 | 35 | * Start the forums component creation process |
| 36 | 36 | * |
| 37 | | * @since bbPress (r3552) |
| | 37 | * @since 2.1.0 bbPress (r3552) |
| 38 | 38 | */ |
| 39 | 39 | public function __construct() { |
| 40 | 40 | parent::start( |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 83 | 83 | * The BP_FORUMS_SLUG constant is deprecated, and only used here for |
| 84 | 84 | * backwards compatibility. |
| 85 | 85 | * |
| 86 | | * @since bbPress (r3552) |
| | 86 | * @since 2.1.0 bbPress (r3552) |
| 87 | 87 | */ |
| 88 | 88 | public function setup_globals( $args = array() ) { |
| 89 | 89 | $bp = buddypress(); |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 113 | 113 | /** |
| 114 | 114 | * Setup the actions |
| 115 | 115 | * |
| 116 | | * @since bbPress (r3395) |
| | 116 | * @since 2.0.0 bbPress (r3395) |
| | 117 | * |
| 117 | 118 | * @access private |
| 118 | 119 | * @uses add_filter() To add various filters |
| 119 | 120 | * @uses add_action() To add various actions |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 130 | 131 | /** |
| 131 | 132 | * Instantiate classes for BuddyPress integration |
| 132 | 133 | * |
| 133 | | * @since bbPress (r3395) |
| | 134 | * @since 2.0.0 bbPress (r3395) |
| 134 | 135 | */ |
| 135 | 136 | public function setup_components() { |
| 136 | 137 | |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 152 | 153 | * Allow the variables, actions, and filters to be modified by third party |
| 153 | 154 | * plugins and themes. |
| 154 | 155 | * |
| 155 | | * @since bbPress (r3902) |
| | 156 | * @since 2.1.0 bbPress (r3902) |
| 156 | 157 | */ |
| 157 | 158 | private function fully_loaded() { |
| 158 | 159 | do_action_ref_array( 'bbp_buddypress_loaded', array( $this ) ); |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 161 | 162 | /** |
| 162 | 163 | * Setup BuddyBar navigation |
| 163 | 164 | * |
| 164 | | * @since bbPress (r3552) |
| | 165 | * @since 2.1.0 bbPress (r3552) |
| 165 | 166 | */ |
| 166 | 167 | public function setup_nav( $main_nav = array(), $sub_nav = array() ) { |
| 167 | 168 | |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 249 | 250 | /** |
| 250 | 251 | * Set up the admin bar |
| 251 | 252 | * |
| 252 | | * @since bbPress (r3552) |
| | 253 | * @since 2.1.0 bbPress (r3552) |
| 253 | 254 | */ |
| 254 | 255 | public function setup_admin_bar( $wp_admin_nav = array() ) { |
| 255 | 256 | |
| … |
… |
class BBP_Forums_Component extends BP_Component { |
| 325 | 326 | /** |
| 326 | 327 | * Sets up the title for pages and <title> |
| 327 | 328 | * |
| 328 | | * @since bbPress (r3552) |
| | 329 | * @since 2.1.0 bbPress (r3552) |
| 329 | 330 | */ |
| 330 | 331 | public function setup_title() { |
| 331 | 332 | $bp = buddypress(); |
-
diff --git src/includes/extend/buddypress/members.php src/includes/extend/buddypress/members.php
index 054c630..26d90ec 100644
|
|
|
if ( !class_exists( 'BBP_Forums_Members' ) ) : |
| 14 | 14 | /** |
| 15 | 15 | * Member profile modifications |
| 16 | 16 | * |
| 17 | | * @since bbPress (r4395) |
| | 17 | * @since 2.2.0 bbPress (r4395) |
| 18 | 18 | * |
| 19 | 19 | * @package bbPress |
| 20 | 20 | * @subpackage BuddyPress |
| … |
… |
class BBP_BuddyPress_Members { |
| 24 | 24 | /** |
| 25 | 25 | * Main constructor for modifying bbPress profile links |
| 26 | 26 | * |
| 27 | | * @since bbPress (r4395) |
| | 27 | * @since 2.2.0 bbPress (r4395) |
| 28 | 28 | */ |
| 29 | 29 | public function __construct() { |
| 30 | 30 | $this->setup_actions(); |
| … |
… |
class BBP_BuddyPress_Members { |
| 34 | 34 | /** |
| 35 | 35 | * Setup the actions |
| 36 | 36 | * |
| 37 | | * @since bbPress (r4395) |
| | 37 | * @since 2.2.0 bbPress (r4395) |
| 38 | 38 | * |
| 39 | 39 | * @access private |
| 40 | 40 | * @uses add_filter() To add various filters |
| … |
… |
class BBP_BuddyPress_Members { |
| 61 | 61 | /** |
| 62 | 62 | * Setup the filters |
| 63 | 63 | * |
| 64 | | * @since bbPress (r4395) |
| | 64 | * @since 2.2.0 bbPress (r4395) |
| 65 | 65 | * |
| 66 | 66 | * @access private |
| 67 | 67 | * @uses add_filter() To add various filters |
| … |
… |
class BBP_BuddyPress_Members { |
| 78 | 78 | /** |
| 79 | 79 | * Override bbPress profile URL with BuddyPress profile URL |
| 80 | 80 | * |
| 81 | | * @since bbPress (r3401) |
| | 81 | * @since 2.0.0 bbPress (r3401) |
| | 82 | * |
| 82 | 83 | * @param string $url |
| 83 | 84 | * @param int $user_id |
| 84 | 85 | * @param string $user_nicename |
| … |
… |
class BBP_BuddyPress_Members { |
| 126 | 127 | /** |
| 127 | 128 | * Override bbPress favorites URL with BuddyPress profile URL |
| 128 | 129 | * |
| 129 | | * @since bbPress (r3721) |
| | 130 | * @since 2.1.0 bbPress (r3721) |
| | 131 | * |
| 130 | 132 | * @param string $url |
| 131 | 133 | * @param int $user_id |
| 132 | 134 | * @return string |
| … |
… |
class BBP_BuddyPress_Members { |
| 146 | 148 | /** |
| 147 | 149 | * Override bbPress subscriptions URL with BuddyPress profile URL |
| 148 | 150 | * |
| 149 | | * @since bbPress (r3721) |
| | 151 | * @since 2.1.0 bbPress (r3721) |
| | 152 | * |
| 150 | 153 | * @param string $url |
| 151 | 154 | * @param int $user_id |
| 152 | 155 | * @return string |
| … |
… |
class BBP_BuddyPress_Members { |
| 167 | 170 | * Set favorites and subscriptions query variables if viewing member profile |
| 168 | 171 | * pages. |
| 169 | 172 | * |
| 170 | | * @since bbPress (r4615) |
| | 173 | * @since 2.3.0 bbPress (r4615) |
| 171 | 174 | * |
| 172 | 175 | * @global WP_Query $wp_query |
| 173 | 176 | * @return If not viewing your own profile |
-
diff --git src/includes/extend/buddypress/notifications.php src/includes/extend/buddypress/notifications.php
index d15b83d..42c3ef6 100644
|
|
|
|
| 4 | 4 | * Filter registered notifications components, and add 'forums' to the queried |
| 5 | 5 | * 'component_name' array. |
| 6 | 6 | * |
| 7 | | * @since bbPress (r5232) |
| | 7 | * @since 2.6.0 bbPress (r5232) |
| 8 | 8 | * |
| 9 | 9 | * @see BP_Notifications_Notification::get() |
| 10 | 10 | * @param array $component_names |
| … |
… |
add_filter( 'bp_notifications_get_registered_components', 'bbp_filter_notificati |
| 28 | 28 | /** |
| 29 | 29 | * Format the BuddyBar/Toolbar notifications |
| 30 | 30 | * |
| 31 | | * @since bbPress (r5155) |
| | 31 | * @since 2.5.0 bbPress (r5155) |
| 32 | 32 | * |
| 33 | 33 | * @package bbPress |
| 34 | 34 | * |
| … |
… |
add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypres |
| 85 | 85 | * Hooked into the new reply function, this notification action is responsible |
| 86 | 86 | * for notifying topic and hierarchical reply authors of topic replies. |
| 87 | 87 | * |
| 88 | | * @since bbPress (r5156) |
| | 88 | * @since 2.5.0 bbPress (r5156) |
| 89 | 89 | * |
| 90 | 90 | * @param int $reply_id |
| 91 | 91 | * @param int $topic_id |
| … |
… |
add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10, 7 ); |
| 139 | 139 | /** |
| 140 | 140 | * Mark notifications as read when reading a topic |
| 141 | 141 | * |
| 142 | | * @since bbPress (r5155) |
| | 142 | * @since 2.5.0 bbPress (r5155) |
| 143 | 143 | * |
| 144 | 144 | * @return If not trying to mark a notification as read |
| 145 | 145 | */ |
-
diff --git src/includes/forums/capabilities.php src/includes/forums/capabilities.php
index aa57030..972316c 100644
|
|
|
|
| 12 | 12 | /** |
| 13 | 13 | * Return forum capabilities |
| 14 | 14 | * |
| 15 | | * @since bbPress (r2593) |
| | 15 | * @since 2.0.0 bbPress (r2593) |
| 16 | 16 | * |
| 17 | 17 | * @uses apply_filters() Calls 'bbp_get_forum_caps' with the capabilities |
| 18 | 18 | * @return array Forum capabilities |
| … |
… |
function bbp_get_forum_caps() { |
| 32 | 32 | /** |
| 33 | 33 | * Maps forum capabilities |
| 34 | 34 | * |
| 35 | | * @since bbPress (r4242) |
| | 35 | * @since 2.2.0 bbPress (r4242) |
| 36 | 36 | * |
| 37 | 37 | * @param array $caps Capabilities for meta capability |
| 38 | 38 | * @param string $cap Capability name |
| … |
… |
function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg |
| 196 | 196 | /** |
| 197 | 197 | * Return forum moderator capabilities |
| 198 | 198 | * |
| 199 | | * @since bbPress (r5834) |
| | 199 | * @since 2.6.0 bbPress (r5834) |
| 200 | 200 | * |
| 201 | 201 | * @uses apply_filters() Calls 'bbp_get_forum_mod_caps' with the capabilities |
| 202 | 202 | * |
| … |
… |
function bbp_get_forum_mod_caps() { |
| 214 | 214 | /** |
| 215 | 215 | * Maps forum moderator capabilities |
| 216 | 216 | * |
| 217 | | * @since bbPress (r5834) |
| | 217 | * @since 2.6.0 bbPress (r5834) |
| 218 | 218 | * |
| 219 | 219 | * @param array $caps Capabilities for meta capability. |
| 220 | 220 | * @param string $cap Capability name. |
| … |
… |
function bbp_map_forum_mod_meta_caps( $caps, $cap, $user_id, $args ) { |
| 246 | 246 | /** |
| 247 | 247 | * Get moderators of a forum |
| 248 | 248 | * |
| 249 | | * @since bbPress (r5834) |
| | 249 | * @since 2.6.0 bbPress (r5834) |
| 250 | 250 | * |
| 251 | 251 | * @param int $forum_id Forum id. |
| 252 | 252 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_get_forum_moderator_ids( $forum_id = 0 ) { |
| 298 | 298 | /** |
| 299 | 299 | * Get forums of a moderator |
| 300 | 300 | * |
| 301 | | * @since bbPress (r5834) |
| | 301 | * @since 2.6.0 bbPress (r5834) |
| 302 | 302 | * |
| 303 | 303 | * @param int $user_id User id. |
| 304 | 304 | * @uses get_userdata() To get the user object |
| … |
… |
function bbp_get_moderator_forum_ids( $user_id = 0 ) { |
| 355 | 355 | /** |
| 356 | 356 | * Can a user moderate a forum? |
| 357 | 357 | * |
| 358 | | * @since bbPress (r5834) |
| | 358 | * @since 2.6.0 bbPress (r5834) |
| 359 | 359 | * |
| 360 | 360 | * @param int $user_id User id. |
| 361 | 361 | * @param int $forum_id Forum id. |
-
diff --git src/includes/forums/functions.php src/includes/forums/functions.php
index 517f0f9..f89788f 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 16 | 16 | * A wrapper for wp_insert_post() that also includes the necessary meta values |
| 17 | 17 | * for the forum to function properly. |
| 18 | 18 | * |
| 19 | | * @since bbPress (r3349) |
| | 19 | * @since 2.0.0 bbPress (r3349) |
| 20 | 20 | * |
| 21 | 21 | * @uses bbp_parse_args() |
| 22 | 22 | * @uses bbp_get_forum_post_type() |
| … |
… |
function bbp_edit_forum_handler( $action = '' ) { |
| 642 | 642 | /** |
| 643 | 643 | * Handle the saving of core forum metadata (Status, Visibility, and Type) |
| 644 | 644 | * |
| 645 | | * @since bbPress (r3678) |
| | 645 | * @since 2.1.0 bbPress (r3678) |
| | 646 | * |
| 646 | 647 | * @param int $forum_id |
| 647 | 648 | * @uses bbp_is_forum_closed() To check if forum is closed |
| 648 | 649 | * @uses bbp_close_forum() To close forum |
| … |
… |
function bbp_save_forum_extras( $forum_id = 0 ) { |
| 726 | 727 | /** |
| 727 | 728 | * Allow custom forum visibility save actions |
| 728 | 729 | * |
| 729 | | * @since bbPress (r5855) |
| | 730 | * @since 2.6.0 bbPress (r5855) |
| 730 | 731 | * |
| 731 | 732 | * @param int $forum_id The forum ID |
| 732 | 733 | * @param string $old_visibility The current forum visibility |
| … |
… |
function bbp_save_forum_extras( $forum_id = 0 ) { |
| 741 | 742 | /** |
| 742 | 743 | * Closes a forum |
| 743 | 744 | * |
| 744 | | * @since bbPress (r2746) |
| | 745 | * @since 2.0.0 bbPress (r2746) |
| 745 | 746 | * |
| 746 | 747 | * @param int $forum_id forum id |
| 747 | 748 | * @uses do_action() Calls 'bbp_close_forum' with the forum id |
| … |
… |
function bbp_close_forum( $forum_id = 0 ) { |
| 765 | 766 | /** |
| 766 | 767 | * Opens a forum |
| 767 | 768 | * |
| 768 | | * @since bbPress (r2746) |
| | 769 | * @since 2.0.0 bbPress (r2746) |
| 769 | 770 | * |
| 770 | 771 | * @param int $forum_id forum id |
| 771 | 772 | * @uses do_action() Calls 'bbp_open_forum' with the forum id |
| … |
… |
function bbp_open_forum( $forum_id = 0 ) { |
| 792 | 793 | /** |
| 793 | 794 | * Make the forum a category |
| 794 | 795 | * |
| 795 | | * @since bbPress (r2746) |
| | 796 | * @since 2.0.0 bbPress (r2746) |
| 796 | 797 | * |
| 797 | 798 | * @param int $forum_id Optional. Forum id |
| 798 | 799 | * @uses update_post_meta() To update the forum category meta |
| … |
… |
function bbp_categorize_forum( $forum_id = 0 ) { |
| 814 | 815 | /** |
| 815 | 816 | * Remove the category status from a forum |
| 816 | 817 | * |
| 817 | | * @since bbPress (r2746) |
| | 818 | * @since 2.0.0 bbPress (r2746) |
| 818 | 819 | * |
| 819 | 820 | * @param int $forum_id Optional. Forum id |
| 820 | 821 | * @uses delete_post_meta() To delete the forum category meta |
| … |
… |
function bbp_normalize_forum( $forum_id = 0 ) { |
| 838 | 839 | /** |
| 839 | 840 | * Mark the forum as public |
| 840 | 841 | * |
| 841 | | * @since bbPress (r2746) |
| | 842 | * @since 2.0.0 bbPress (r2746) |
| 842 | 843 | * |
| 843 | 844 | * @param int $forum_id Optional. Forum id |
| 844 | 845 | * @uses update_post_meta() To update the forum private meta |
| … |
… |
function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) { |
| 896 | 897 | /** |
| 897 | 898 | * Mark the forum as private |
| 898 | 899 | * |
| 899 | | * @since bbPress (r2746) |
| | 900 | * @since 2.0.0 bbPress (r2746) |
| 900 | 901 | * |
| 901 | 902 | * @param int $forum_id Optional. Forum id |
| 902 | 903 | * @uses update_post_meta() To update the forum private meta |
| … |
… |
function bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) { |
| 946 | 947 | /** |
| 947 | 948 | * Mark the forum as hidden |
| 948 | 949 | * |
| 949 | | * @since bbPress (r2996) |
| | 950 | * @since 2.0.0 bbPress (r2996) |
| 950 | 951 | * |
| 951 | 952 | * @param int $forum_id Optional. Forum id |
| 952 | 953 | * @uses update_post_meta() To update the forum private meta |
| … |
… |
function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) { |
| 996 | 997 | /** |
| 997 | 998 | * Recaches the private and hidden forums |
| 998 | 999 | * |
| 999 | | * @since bbPress (r5017) |
| | 1000 | * @since 2.4.0 bbPress (r5017) |
| 1000 | 1001 | * |
| 1001 | 1002 | * @uses delete_option() to delete private and hidden forum pointers |
| 1002 | 1003 | * @uses WP_Query() To query post IDs |
| … |
… |
function bbp_repair_forum_visibility() { |
| 1059 | 1060 | /** |
| 1060 | 1061 | * Remove a deleted forum from all users' subscriptions |
| 1061 | 1062 | * |
| 1062 | | * @since bbPress (r5156) |
| | 1063 | * @since 2.5.0 bbPress (r5156) |
| 1063 | 1064 | * |
| 1064 | 1065 | * @param int $forum_id Get the forum ID to remove |
| 1065 | 1066 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| … |
… |
function bbp_remove_forum_from_all_subscriptions( $forum_id = 0 ) { |
| 1101 | 1102 | /** |
| 1102 | 1103 | * Bump the total topic count of a forum |
| 1103 | 1104 | * |
| 1104 | | * @since bbPress (r3825) |
| | 1105 | * @since 2.1.0 bbPress (r3825) |
| 1105 | 1106 | * |
| 1106 | 1107 | * @param int $forum_id Optional. Forum id. |
| 1107 | 1108 | * @param int $difference Optional. Default 1 |
| … |
… |
function bbp_bump_forum_topic_count( $forum_id = 0, $difference = 1, $update_anc |
| 1159 | 1160 | /** |
| 1160 | 1161 | * Bump the total hidden topic count of a forum |
| 1161 | 1162 | * |
| 1162 | | * @since bbPress (r3825) |
| | 1163 | * @since 2.1.0 bbPress (r3825) |
| 1163 | 1164 | * |
| 1164 | 1165 | * @param int $forum_id Optional. Forum id. |
| 1165 | 1166 | * @param int $difference Optional. Default 1 |
| … |
… |
function bbp_bump_forum_topic_count_hidden( $forum_id = 0, $difference = 1 ) { |
| 1192 | 1193 | /** |
| 1193 | 1194 | * Bump the total topic count of a forum |
| 1194 | 1195 | * |
| 1195 | | * @since bbPress (r3825) |
| | 1196 | * @since 2.1.0 bbPress (r3825) |
| 1196 | 1197 | * |
| 1197 | 1198 | * @param int $forum_id Optional. Forum id. |
| 1198 | 1199 | * @param int $difference Optional. Default 1 |
| … |
… |
function bbp_update_forum_last_active_time( $forum_id = 0, $new_time = '' ) { |
| 1485 | 1486 | /** |
| 1486 | 1487 | * Update the forum sub-forum count |
| 1487 | 1488 | * |
| 1488 | | * @since bbPress (r2625) |
| | 1489 | * @since 2.0.0 bbPress (r2625) |
| 1489 | 1490 | * |
| 1490 | 1491 | * @param int $forum_id Optional. Forum id |
| 1491 | 1492 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_update_forum_subforum_count( $forum_id = 0, $subforums = 0 ) { |
| 1508 | 1509 | /** |
| 1509 | 1510 | * Adjust the total topic count of a forum |
| 1510 | 1511 | * |
| 1511 | | * @since bbPress (r2464) |
| | 1512 | * @since 2.0.0 bbPress (r2464) |
| 1512 | 1513 | * |
| 1513 | 1514 | * @param int $forum_id Optional. Forum id or topic id. It is checked whether it |
| 1514 | 1515 | * is a topic or a forum. If it's a topic, its parent, |
| … |
… |
function bbp_update_forum_topic_count( $forum_id = 0 ) { |
| 1553 | 1554 | * Adjust the total hidden topic count of a forum (hidden includes trashed, |
| 1554 | 1555 | * spammed and pending topics) |
| 1555 | 1556 | * |
| 1556 | | * @since bbPress (r2888) |
| | 1557 | * @since 2.0.0 bbPress (r2888) |
| 1557 | 1558 | * |
| 1558 | 1559 | * @param int $forum_id Optional. Topic id to update |
| 1559 | 1560 | * @param int $topic_count Optional. Set the topic count manually |
| … |
… |
function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 ) |
| 1606 | 1607 | /** |
| 1607 | 1608 | * Adjust the total reply count of a forum |
| 1608 | 1609 | * |
| 1609 | | * @since bbPress (r2464) |
| | 1610 | * @since 2.0.0 bbPress (r2464) |
| 1610 | 1611 | * |
| 1611 | 1612 | * @param int $forum_id Optional. Forum id or topic id. It is checked whether it |
| 1612 | 1613 | * is a topic or a forum. If it's a topic, its parent, |
| … |
… |
function bbp_update_forum_reply_count( $forum_id = 0 ) { |
| 1663 | 1664 | * database to get their results. As such, this function can be costly to run |
| 1664 | 1665 | * but is necessary to keep everything accurate. |
| 1665 | 1666 | * |
| 1666 | | * @since bbPress (r2908) |
| | 1667 | * @since 2.0.0 bbPress (r2908) |
| 1667 | 1668 | * |
| 1668 | 1669 | * @param array $args Supports these arguments: |
| 1669 | 1670 | * - forum_id: Forum id |
| … |
… |
function bbp_update_forum( $args = array() ) { |
| 1730 | 1731 | /** |
| 1731 | 1732 | * Get forum mods for a specific forum ID |
| 1732 | 1733 | * |
| 1733 | | * @since bbPress (r5836) |
| | 1734 | * @since 2.6.0 bbPress (r5836) |
| 1734 | 1735 | * |
| 1735 | 1736 | * @param int $forum_id |
| 1736 | 1737 | * |
| … |
… |
function bbp_get_forum_mods( $forum_id = 0 ) { |
| 1747 | 1748 | /** |
| 1748 | 1749 | * Get forum mods for a specific forum ID |
| 1749 | 1750 | * |
| 1750 | | * @since bbPress (r4165) |
| | 1751 | * @since 2.2.0 bbPress (r4165) |
| 1751 | 1752 | * |
| 1752 | 1753 | * @param int $forum_id |
| 1753 | 1754 | * @param string $sep |
| … |
… |
function bbp_get_forum_mod_names( $forum_id = 0, $sep = ', ' ) { |
| 1767 | 1768 | /** |
| 1768 | 1769 | * Return an associative array of available topic statuses |
| 1769 | 1770 | * |
| 1770 | | * @since bbPress (r5059) |
| | 1771 | * @since 2.4.0 bbPress (r5059) |
| 1771 | 1772 | * |
| 1772 | 1773 | * @return array |
| 1773 | 1774 | */ |
| … |
… |
function bbp_get_forum_statuses() { |
| 1781 | 1782 | /** |
| 1782 | 1783 | * Return an associative array of forum types |
| 1783 | 1784 | * |
| 1784 | | * @since bbPress (r5059) |
| | 1785 | * @since 2.4.0 bbPress (r5059) |
| 1785 | 1786 | * |
| 1786 | 1787 | * @return array |
| 1787 | 1788 | */ |
| … |
… |
function bbp_get_forum_types() { |
| 1795 | 1796 | /** |
| 1796 | 1797 | * Return an associative array of forum visibility |
| 1797 | 1798 | * |
| 1798 | | * @since bbPress (r5059) |
| | 1799 | * @since 2.4.0 bbPress (r5059) |
| 1799 | 1800 | * |
| 1800 | 1801 | * @return array |
| 1801 | 1802 | */ |
| … |
… |
function bbp_get_forum_visibilities() { |
| 1814 | 1815 | * |
| 1815 | 1816 | * Only hidden forum ids are returned. Public and private ids are not. |
| 1816 | 1817 | * |
| 1817 | | * @since bbPress (r3007) |
| | 1818 | * @since 2.0.0 bbPress (r3007) |
| 1818 | 1819 | * |
| 1819 | 1820 | * @uses get_option() Returns the unserialized array of hidden forum ids |
| 1820 | 1821 | * @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids |
| … |
… |
function bbp_get_hidden_forum_ids() { |
| 1831 | 1832 | * |
| 1832 | 1833 | * Only private forum ids are returned. Public and hidden ids are not. |
| 1833 | 1834 | * |
| 1834 | | * @since bbPress (r3007) |
| | 1835 | * @since 2.0.0 bbPress (r3007) |
| 1835 | 1836 | * |
| 1836 | 1837 | * @uses get_option() Returns the unserialized array of private forum ids |
| 1837 | 1838 | * @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids |
| … |
… |
function bbp_get_private_forum_ids() { |
| 1847 | 1848 | * Returns a meta_query that either includes or excludes hidden forum IDs |
| 1848 | 1849 | * from a query. |
| 1849 | 1850 | * |
| 1850 | | * @since bbPress (r3291) |
| | 1851 | * @since 2.0.0 bbPress (r3291) |
| 1851 | 1852 | * |
| 1852 | 1853 | * @param string Optional. The type of value to return. (string|array|meta_query) |
| 1853 | 1854 | * |
| … |
… |
function bbp_exclude_forum_ids( $type = 'string' ) { |
| 1933 | 1934 | * to hardcode this logic into each query. It also protects forum content for |
| 1934 | 1935 | * plugins that might be doing their own queries. |
| 1935 | 1936 | * |
| 1936 | | * @since bbPress (r3291) |
| | 1937 | * @since 2.0.0 bbPress (r3291) |
| 1937 | 1938 | * |
| 1938 | 1939 | * @param WP_Query $posts_query |
| 1939 | 1940 | * |
| … |
… |
function bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) { |
| 2038 | 2039 | * |
| 2039 | 2040 | * Only topics with published and closed statuses are returned |
| 2040 | 2041 | * |
| 2041 | | * @since bbPress (r2908) |
| | 2042 | * @since 2.0.0 bbPress (r2908) |
| 2042 | 2043 | * |
| 2043 | 2044 | * @param int $forum_id Forum id |
| 2044 | 2045 | * @uses bbp_get_topic_post_type() To get the topic post type |
| … |
… |
function bbp_forum_query_topic_ids( $forum_id ) { |
| 2057 | 2058 | * |
| 2058 | 2059 | * Only forums with published status are returned |
| 2059 | 2060 | * |
| 2060 | | * @since bbPress (r2908) |
| | 2061 | * @since 2.0.0 bbPress (r2908) |
| 2061 | 2062 | * |
| 2062 | 2063 | * @param int $forum_id Forum id |
| 2063 | 2064 | * @uses bbp_get_forum_post_type() To get the forum post type |
| … |
… |
function bbp_forum_query_subforum_ids( $forum_id ) { |
| 2075 | 2076 | /** |
| 2076 | 2077 | * Callback to sort forum ID's based on last active time |
| 2077 | 2078 | * |
| 2078 | | * @since bbPress (r3789) |
| | 2079 | * @since 2.1.0 bbPress (r3789) |
| | 2080 | * |
| 2079 | 2081 | * @param int $a First forum ID to compare |
| 2080 | 2082 | * @param int $b Second forum ID to compare |
| 2081 | 2083 | * @return Position change based on sort |
| … |
… |
function _bbp_forum_query_usort_subforum_ids( $a = 0, $b = 0 ) { |
| 2089 | 2091 | /** |
| 2090 | 2092 | * Returns the forum's last reply id |
| 2091 | 2093 | * |
| 2092 | | * @since bbPress (r2908) |
| | 2094 | * @since 2.0.0 bbPress (r2908) |
| 2093 | 2095 | * |
| 2094 | 2096 | * @param int $forum_id Forum id |
| 2095 | 2097 | * @param int $topic_ids Optional. Topic ids |
| … |
… |
function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) { |
| 2135 | 2137 | * Check if it's a hidden forum or a topic or reply of a hidden forum and if |
| 2136 | 2138 | * the user can't view it, then sets a 404 |
| 2137 | 2139 | * |
| 2138 | | * @since bbPress (r2996) |
| | 2140 | * @since 2.0.0 bbPress (r2996) |
| 2139 | 2141 | * |
| 2140 | 2142 | * @uses current_user_can() To check if the current user can read private forums |
| 2141 | 2143 | * @uses is_singular() To check if it's a singular page |
| … |
… |
function bbp_forum_enforce_hidden() { |
| 2190 | 2192 | * Check if it's a private forum or a topic or reply of a private forum and if |
| 2191 | 2193 | * the user can't view it, then sets a 404 |
| 2192 | 2194 | * |
| 2193 | | * @since bbPress (r2996) |
| | 2195 | * @since 2.0.0 bbPress (r2996) |
| 2194 | 2196 | * |
| 2195 | 2197 | * @uses current_user_can() To check if the current user can read private forums |
| 2196 | 2198 | * @uses is_singular() To check if it's a singular page |
| … |
… |
function bbp_forum_enforce_private() { |
| 2246 | 2248 | /** |
| 2247 | 2249 | * Redirect if unathorized user is attempting to edit a forum |
| 2248 | 2250 | * |
| 2249 | | * @since bbPress (r3607) |
| | 2251 | * @since 2.1.0 bbPress (r3607) |
| 2250 | 2252 | * |
| 2251 | 2253 | * @uses bbp_is_forum_edit() |
| 2252 | 2254 | * @uses current_user_can() |
| … |
… |
function bbp_check_forum_edit() { |
| 2270 | 2272 | /** |
| 2271 | 2273 | * Delete all topics (and their replies) for a specific forum ID |
| 2272 | 2274 | * |
| 2273 | | * @since bbPress (r3668) |
| | 2275 | * @since 2.1.0 bbPress (r3668) |
| 2274 | 2276 | * |
| 2275 | 2277 | * @param int $forum_id |
| 2276 | 2278 | * @uses bbp_get_forum_id() To validate the forum ID |
| … |
… |
function bbp_delete_forum_topics( $forum_id = 0 ) { |
| 2319 | 2321 | /** |
| 2320 | 2322 | * Trash all topics inside a forum |
| 2321 | 2323 | * |
| 2322 | | * @since bbPress (r3668) |
| | 2324 | * @since 2.1.0 bbPress (r3668) |
| 2323 | 2325 | * |
| 2324 | 2326 | * @param int $forum_id |
| 2325 | 2327 | * @uses bbp_get_forum_id() To validate the forum ID |
| … |
… |
function bbp_trash_forum_topics( $forum_id = 0 ) { |
| 2387 | 2389 | /** |
| 2388 | 2390 | * Trash all topics inside a forum |
| 2389 | 2391 | * |
| 2390 | | * @since bbPress (r3668) |
| | 2392 | * @since 2.1.0 bbPress (r3668) |
| 2391 | 2393 | * |
| 2392 | 2394 | * @param int $forum_id |
| 2393 | 2395 | * @uses bbp_get_forum_id() To validate the forum ID |
| … |
… |
function bbp_untrash_forum_topics( $forum_id = 0 ) { |
| 2432 | 2434 | * handled by WordPress core API functions. It is used to clean up after |
| 2433 | 2435 | * a forum that is being deleted. |
| 2434 | 2436 | * |
| 2435 | | * @since bbPress (r3668) |
| | 2437 | * @since 2.1.0 bbPress (r3668) |
| | 2438 | * |
| 2436 | 2439 | * @uses bbp_get_forum_id() To get the forum id |
| 2437 | 2440 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2438 | 2441 | * @uses do_action() Calls 'bbp_delete_forum' with the forum id |
| … |
… |
function bbp_delete_forum( $forum_id = 0 ) { |
| 2454 | 2457 | * handled by WordPress core API functions. It is used to clean up after |
| 2455 | 2458 | * a forum that is being trashed. |
| 2456 | 2459 | * |
| 2457 | | * @since bbPress (r3668) |
| | 2460 | * @since 2.1.0 bbPress (r3668) |
| | 2461 | * |
| 2458 | 2462 | * @uses bbp_get_forum_id() To get the forum id |
| 2459 | 2463 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2460 | 2464 | * @uses do_action() Calls 'bbp_trash_forum' with the forum id |
| … |
… |
function bbp_trash_forum( $forum_id = 0 ) { |
| 2472 | 2476 | /** |
| 2473 | 2477 | * Called before untrashing a forum |
| 2474 | 2478 | * |
| 2475 | | * @since bbPress (r3668) |
| | 2479 | * @since 2.1.0 bbPress (r3668) |
| | 2480 | * |
| 2476 | 2481 | * @uses bbp_get_forum_id() To get the forum id |
| 2477 | 2482 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2478 | 2483 | * @uses do_action() Calls 'bbp_untrash_forum' with the forum id |
| … |
… |
function bbp_untrash_forum( $forum_id = 0 ) { |
| 2492 | 2497 | /** |
| 2493 | 2498 | * Called after deleting a forum |
| 2494 | 2499 | * |
| 2495 | | * @since bbPress (r3668) |
| | 2500 | * @since 2.1.0 bbPress (r3668) |
| | 2501 | * |
| 2496 | 2502 | * @uses bbp_get_forum_id() To get the forum id |
| 2497 | 2503 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2498 | 2504 | * @uses do_action() Calls 'bbp_deleted_forum' with the forum id |
| … |
… |
function bbp_deleted_forum( $forum_id = 0 ) { |
| 2510 | 2516 | /** |
| 2511 | 2517 | * Called after trashing a forum |
| 2512 | 2518 | * |
| 2513 | | * @since bbPress (r3668) |
| | 2519 | * @since 2.1.0 bbPress (r3668) |
| | 2520 | * |
| 2514 | 2521 | * @uses bbp_get_forum_id() To get the forum id |
| 2515 | 2522 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2516 | 2523 | * @uses do_action() Calls 'bbp_trashed_forum' with the forum id |
| … |
… |
function bbp_trashed_forum( $forum_id = 0 ) { |
| 2528 | 2535 | /** |
| 2529 | 2536 | * Called after untrashing a forum |
| 2530 | 2537 | * |
| 2531 | | * @since bbPress (r3668) |
| | 2538 | * @since 2.1.0 bbPress (r3668) |
| | 2539 | * |
| 2532 | 2540 | * @uses bbp_get_forum_id() To get the forum id |
| 2533 | 2541 | * @uses bbp_is_forum() To check if the passed id is a forum |
| 2534 | 2542 | * @uses do_action() Calls 'bbp_untrashed_forum' with the forum id |
-
diff --git src/includes/forums/template.php src/includes/forums/template.php
index 6b8ab3d..aed3bab 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Output the unique id of the custom post type for forums |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2857) |
| | 18 | * @since 2.0.0 bbPress (r2857) |
| 19 | 19 | * |
| 20 | 20 | * @uses bbp_get_forum_post_type() To get the forum post type |
| 21 | 21 | */ |
| … |
… |
function bbp_forum_post_type() { |
| 25 | 25 | /** |
| 26 | 26 | * Return the unique id of the custom post type for forums |
| 27 | 27 | * |
| 28 | | * @since bbPress (r2857) |
| | 28 | * @since 2.0.0 bbPress (r2857) |
| 29 | 29 | * |
| 30 | 30 | * @uses apply_filters() Calls 'bbp_get_forum_post_type' with the forum |
| 31 | 31 | * post type id |
| … |
… |
function bbp_forum_post_type() { |
| 39 | 39 | /** |
| 40 | 40 | * Return array of labels used by the forum post type |
| 41 | 41 | * |
| 42 | | * @since bbPress (r5129) |
| | 42 | * @since 2.5.0 bbPress (r5129) |
| 43 | 43 | * |
| 44 | 44 | * @return array |
| 45 | 45 | */ |
| … |
… |
function bbp_get_forum_post_type_labels() { |
| 66 | 66 | /** |
| 67 | 67 | * Return array of forum post type rewrite settings |
| 68 | 68 | * |
| 69 | | * @since bbPress (r5129) |
| | 69 | * @since 2.5.0 bbPress (r5129) |
| 70 | 70 | * |
| 71 | 71 | * @return array |
| 72 | 72 | */ |
| … |
… |
function bbp_get_forum_post_type_rewrite() { |
| 80 | 80 | /** |
| 81 | 81 | * Return array of features the forum post type supports |
| 82 | 82 | * |
| 83 | | * @since bbPress (r5129) |
| | 83 | * @since 2.5.0 bbPress (r5129) |
| 84 | 84 | * |
| 85 | 85 | * @return array |
| 86 | 86 | */ |
| … |
… |
function bbp_get_forum_post_type_supports() { |
| 99 | 99 | * |
| 100 | 100 | * WordPress makes this easy for us. |
| 101 | 101 | * |
| 102 | | * @since bbPress (r2464) |
| | 102 | * @since 2.0.0 bbPress (r2464) |
| 103 | 103 | * |
| 104 | 104 | * @param array $args All the arguments supported by {@link WP_Query} |
| 105 | 105 | * @uses WP_Query To make query and get the forums |
| … |
… |
function bbp_has_forums( $args = array() ) { |
| 149 | 149 | /** |
| 150 | 150 | * Whether there are more forums available in the loop |
| 151 | 151 | * |
| 152 | | * @since bbPress (r2464) |
| | 152 | * @since 2.0.0 bbPress (r2464) |
| 153 | 153 | * |
| 154 | 154 | * @uses bbPress:forum_query::have_posts() To check if there are more forums |
| 155 | 155 | * available |
| … |
… |
function bbp_forums() { |
| 171 | 171 | /** |
| 172 | 172 | * Loads up the current forum in the loop |
| 173 | 173 | * |
| 174 | | * @since bbPress (r2464) |
| | 174 | * @since 2.0.0 bbPress (r2464) |
| 175 | 175 | * |
| 176 | 176 | * @uses bbPress:forum_query::the_post() To get the current forum |
| 177 | 177 | * @return object Forum information |
| … |
… |
function bbp_the_forum() { |
| 185 | 185 | /** |
| 186 | 186 | * Output forum id |
| 187 | 187 | * |
| 188 | | * @since bbPress (r2464) |
| | 188 | * @since 2.0.0 bbPress (r2464) |
| 189 | 189 | * |
| 190 | 190 | * @param $forum_id Optional. Used to check emptiness |
| 191 | 191 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_id( $forum_id = 0 ) { |
| 196 | 196 | /** |
| 197 | 197 | * Return the forum id |
| 198 | 198 | * |
| 199 | | * @since bbPress (r2464) |
| | 199 | * @since 2.0.0 bbPress (r2464) |
| 200 | 200 | * |
| 201 | 201 | * @param $forum_id Optional. Used to check emptiness |
| 202 | 202 | * @uses bbPress::forum_query::in_the_loop To check if we're in the loop |
| … |
… |
function bbp_forum_id( $forum_id = 0 ) { |
| 251 | 251 | /** |
| 252 | 252 | * Gets a forum |
| 253 | 253 | * |
| 254 | | * @since bbPress (r2787) |
| | 254 | * @since 2.0.0 bbPress (r2787) |
| 255 | 255 | * |
| 256 | 256 | * @param int|object $forum forum id or forum object |
| 257 | 257 | * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. Default = OBJECT |
| … |
… |
function bbp_get_forum( $forum, $output = OBJECT, $filter = 'raw' ) { |
| 299 | 299 | /** |
| 300 | 300 | * Output the link to the forum |
| 301 | 301 | * |
| 302 | | * @since bbPress (r2464) |
| | 302 | * @since 2.0.0 bbPress (r2464) |
| 303 | 303 | * |
| 304 | 304 | * @param int $forum_id Optional. Forum id |
| 305 | 305 | * @param string $redirect_to Optional. Pass a redirect value for use with |
| … |
… |
function bbp_forum_permalink( $forum_id = 0, $redirect_to = '' ) { |
| 312 | 312 | /** |
| 313 | 313 | * Return the link to the forum |
| 314 | 314 | * |
| 315 | | * @since bbPress (r2464) |
| | 315 | * @since 2.0.0 bbPress (r2464) |
| 316 | 316 | * |
| 317 | 317 | * @param int $forum_id Optional. Forum id |
| 318 | 318 | * @param string $redirect_to Optional. Pass a redirect value for use with |
| … |
… |
function bbp_forum_permalink( $forum_id = 0, $redirect_to = '' ) { |
| 341 | 341 | /** |
| 342 | 342 | * Output the title of the forum |
| 343 | 343 | * |
| 344 | | * @since bbPress (r2464) |
| | 344 | * @since 2.0.0 bbPress (r2464) |
| 345 | 345 | * |
| 346 | 346 | * @param int $forum_id Optional. Forum id |
| 347 | 347 | * @uses bbp_get_forum_title() To get the forum title |
| … |
… |
function bbp_forum_title( $forum_id = 0 ) { |
| 352 | 352 | /** |
| 353 | 353 | * Return the title of the forum |
| 354 | 354 | * |
| 355 | | * @since bbPress (r2464) |
| | 355 | * @since 2.0.0 bbPress (r2464) |
| 356 | 356 | * |
| 357 | 357 | * @param int $forum_id Optional. Forum id |
| 358 | 358 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_title( $forum_id = 0 ) { |
| 370 | 370 | /** |
| 371 | 371 | * Output the forum archive title |
| 372 | 372 | * |
| 373 | | * @since bbPress (r3249) |
| | 373 | * @since 2.0.0 bbPress (r3249) |
| 374 | 374 | * |
| 375 | 375 | * @param string $title Default text to use as title |
| 376 | 376 | */ |
| … |
… |
function bbp_forum_archive_title( $title = '' ) { |
| 380 | 380 | /** |
| 381 | 381 | * Return the forum archive title |
| 382 | 382 | * |
| 383 | | * @since bbPress (r3249) |
| | 383 | * @since 2.0.0 bbPress (r3249) |
| 384 | 384 | * |
| 385 | 385 | * @param string $title Default text to use as title |
| 386 | 386 | * |
| … |
… |
function bbp_forum_archive_title( $title = '' ) { |
| 416 | 416 | /** |
| 417 | 417 | * Output the content of the forum |
| 418 | 418 | * |
| 419 | | * @since bbPress (r2780) |
| | 419 | * @since 2.0.0 bbPress (r2780) |
| 420 | 420 | * |
| 421 | 421 | * @param int $forum_id Optional. Topic id |
| 422 | 422 | * @uses bbp_get_forum_content() To get the forum content |
| … |
… |
function bbp_forum_content( $forum_id = 0 ) { |
| 427 | 427 | /** |
| 428 | 428 | * Return the content of the forum |
| 429 | 429 | * |
| 430 | | * @since bbPress (r2780) |
| | 430 | * @since 2.0.0 bbPress (r2780) |
| 431 | 431 | * |
| 432 | 432 | * @param int $forum_id Optional. Topic id |
| 433 | 433 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_content( $forum_id = 0 ) { |
| 454 | 454 | /** |
| 455 | 455 | * Allow forum rows to have adminstrative actions |
| 456 | 456 | * |
| 457 | | * @since bbPress (r3653) |
| | 457 | * @since 2.1.0 bbPress (r3653) |
| 458 | 458 | * |
| 459 | 459 | * @uses do_action() |
| 460 | 460 | * @todo Links and filter |
| … |
… |
function bbp_forum_row_actions() { |
| 466 | 466 | /** |
| 467 | 467 | * Output value of forum mods field |
| 468 | 468 | * |
| 469 | | * @since bbPress (r5837) |
| | 469 | * @since 2.6.0 bbPress (r5837) |
| | 470 | * |
| 470 | 471 | * @uses bbp_get_form_forum_mods() To get the value of forum mods field |
| 471 | 472 | */ |
| 472 | 473 | function bbp_form_forum_mods() { |
| … |
… |
function bbp_form_forum_mods() { |
| 475 | 476 | /** |
| 476 | 477 | * Return value of forum mods field |
| 477 | 478 | * |
| 478 | | * @since bbPress (r5837) |
| | 479 | * @since 2.6.0 bbPress (r5837) |
| 479 | 480 | * |
| 480 | 481 | * @uses bbp_is_forum_edit() To check if it's the forum edit page |
| 481 | 482 | * @uses apply_filters() Calls 'bbp_get_form_forum_mods' with the mods |
| … |
… |
function bbp_form_forum_mods() { |
| 510 | 511 | /** |
| 511 | 512 | * Output the forums last active ID |
| 512 | 513 | * |
| 513 | | * @since bbPress (r2860) |
| | 514 | * @since 2.0.0 bbPress (r2860) |
| 514 | 515 | * |
| 515 | 516 | * @uses bbp_get_forum_last_active_id() To get the forum's last active id |
| 516 | 517 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_forum_last_active_id( $forum_id = 0 ) { |
| 521 | 522 | /** |
| 522 | 523 | * Return the forums last active ID |
| 523 | 524 | * |
| 524 | | * @since bbPress (r2860) |
| | 525 | * @since 2.0.0 bbPress (r2860) |
| 525 | 526 | * |
| 526 | 527 | * @param int $forum_id Optional. Forum id |
| 527 | 528 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_active_id( $forum_id = 0 ) { |
| 540 | 541 | /** |
| 541 | 542 | * Output the forums last update date/time (aka freshness) |
| 542 | 543 | * |
| 543 | | * @since bbPress (r2464) |
| | 544 | * @since 2.0.0 bbPress (r2464) |
| 544 | 545 | * |
| 545 | 546 | * @uses bbp_get_forum_last_active_time() To get the forum freshness |
| 546 | 547 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_forum_last_active_time( $forum_id = 0 ) { |
| 551 | 552 | /** |
| 552 | 553 | * Return the forums last update date/time (aka freshness) |
| 553 | 554 | * |
| 554 | | * @since bbPress (r2464) |
| | 555 | * @since 2.0.0 bbPress (r2464) |
| 555 | 556 | * |
| 556 | 557 | * @param int $forum_id Optional. Forum id |
| 557 | 558 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_active_time( $forum_id = 0 ) { |
| 595 | 596 | * |
| 596 | 597 | * Outputs a complete link with attributes and content. |
| 597 | 598 | * |
| 598 | | * @since bbPress (r2625) |
| | 599 | * @since 2.0.0 bbPress (r2625) |
| 599 | 600 | * |
| 600 | 601 | * @param int $forum_id Optional. Forum id |
| 601 | 602 | * @uses bbp_get_forum_freshness_link() To get the forum freshness link |
| … |
… |
function bbp_forum_freshness_link( $forum_id = 0) { |
| 608 | 609 | * |
| 609 | 610 | * Returns a complete link with attributes and content. |
| 610 | 611 | * |
| 611 | | * @since bbPress (r2625) |
| | 612 | * @since 2.0.0 bbPress (r2625) |
| 612 | 613 | * |
| 613 | 614 | * @param int $forum_id Optional. Forum id |
| 614 | 615 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_freshness_link( $forum_id = 0) { |
| 662 | 663 | /** |
| 663 | 664 | * Output parent ID of a forum, if exists |
| 664 | 665 | * |
| 665 | | * @since bbPress (r3675) |
| | 666 | * @since 2.1.0 bbPress (r3675) |
| 666 | 667 | * |
| 667 | 668 | * @param int $forum_id Forum ID |
| 668 | 669 | * @uses bbp_get_forum_parent_id() To get the forum's parent ID |
| … |
… |
function bbp_forum_parent_id( $forum_id = 0 ) { |
| 673 | 674 | /** |
| 674 | 675 | * Return ID of forum parent, if exists |
| 675 | 676 | * |
| 676 | | * @since bbPress (r3675) |
| | 677 | * @since 2.1.0 bbPress (r3675) |
| 677 | 678 | * |
| 678 | 679 | * @param int $forum_id Optional. Forum id |
| 679 | 680 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_parent_id( $forum_id = 0 ) { |
| 691 | 692 | /** |
| 692 | 693 | * Return array of parent forums |
| 693 | 694 | * |
| 694 | | * @since bbPress (r2625) |
| | 695 | * @since 2.0.0 bbPress (r2625) |
| 695 | 696 | * |
| 696 | 697 | * @param int $forum_id Optional. Forum id |
| 697 | 698 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_get_forum_ancestors( $forum_id = 0 ) { |
| 718 | 719 | /** |
| 719 | 720 | * Return subforums of given forum |
| 720 | 721 | * |
| 721 | | * @since bbPress (r2747) |
| | 722 | * @since 2.0.0 bbPress (r2747) |
| 722 | 723 | * |
| 723 | 724 | * @param array $args All the arguments supported by {@link WP_Query} |
| 724 | 725 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_list_forums( $args = array() ) { |
| 864 | 865 | /** |
| 865 | 866 | * Output the forum subscription link |
| 866 | 867 | * |
| 867 | | * @since bbPress (r5156) |
| | 868 | * @since 2.5.0 bbPress (r5156) |
| 868 | 869 | * |
| 869 | 870 | * @uses bbp_get_forum_subscription_link() |
| 870 | 871 | */ |
| … |
… |
function bbp_forum_subscription_link( $args = array() ) { |
| 877 | 878 | * |
| 878 | 879 | * A custom wrapper for bbp_get_user_subscribe_link() |
| 879 | 880 | * |
| 880 | | * @since bbPress (r5156) |
| | 881 | * @since 2.5.0 bbPress (r5156) |
| 881 | 882 | * |
| 882 | 883 | * @uses bbp_parse_args() |
| 883 | 884 | * @uses bbp_get_user_subscribe_link() |
| … |
… |
function bbp_forum_subscription_link( $args = array() ) { |
| 912 | 913 | /** |
| 913 | 914 | * Output the forum's last topic id |
| 914 | 915 | * |
| 915 | | * @since bbPress (r2464) |
| | 916 | * @since 2.0.0 bbPress (r2464) |
| 916 | 917 | * |
| 917 | 918 | * @uses bbp_get_forum_last_topic_id() To get the forum's last topic id |
| 918 | 919 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_forum_last_topic_id( $forum_id = 0 ) { |
| 923 | 924 | /** |
| 924 | 925 | * Return the forum's last topic id |
| 925 | 926 | * |
| 926 | | * @since bbPress (r2464) |
| | 927 | * @since 2.0.0 bbPress (r2464) |
| 927 | 928 | * |
| 928 | 929 | * @param int $forum_id Optional. Forum id |
| 929 | 930 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_topic_id( $forum_id = 0 ) { |
| 942 | 943 | /** |
| 943 | 944 | * Output the title of the last topic inside a forum |
| 944 | 945 | * |
| 945 | | * @since bbPress (r2625) |
| | 946 | * @since 2.0.0 bbPress (r2625) |
| 946 | 947 | * |
| 947 | 948 | * @param int $forum_id Optional. Forum id |
| 948 | 949 | * @uses bbp_get_forum_last_topic_title() To get the forum's last topic's title |
| … |
… |
function bbp_forum_last_topic_title( $forum_id = 0 ) { |
| 953 | 954 | /** |
| 954 | 955 | * Return the title of the last topic inside a forum |
| 955 | 956 | * |
| 956 | | * @since bbPress (r2625) |
| | 957 | * @since 2.0.0 bbPress (r2625) |
| 957 | 958 | * |
| 958 | 959 | * @param int $forum_id Optional. Forum id |
| 959 | 960 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_topic_title( $forum_id = 0 ) { |
| 974 | 975 | /** |
| 975 | 976 | * Output the link to the last topic in a forum |
| 976 | 977 | * |
| 977 | | * @since bbPress (r2464) |
| | 978 | * @since 2.0.0 bbPress (r2464) |
| 978 | 979 | * |
| 979 | 980 | * @param int $forum_id Optional. Forum id |
| 980 | 981 | * @uses bbp_get_forum_last_topic_permalink() To get the forum's last topic's |
| … |
… |
function bbp_forum_last_topic_permalink( $forum_id = 0 ) { |
| 986 | 987 | /** |
| 987 | 988 | * Return the link to the last topic in a forum |
| 988 | 989 | * |
| 989 | | * @since bbPress (r2464) |
| | 990 | * @since 2.0.0 bbPress (r2464) |
| 990 | 991 | * |
| 991 | 992 | * @param int $forum_id Optional. Forum id |
| 992 | 993 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_topic_permalink( $forum_id = 0 ) { |
| 1007 | 1008 | /** |
| 1008 | 1009 | * Return the author ID of the last topic of a forum |
| 1009 | 1010 | * |
| 1010 | | * @since bbPress (r2625) |
| | 1011 | * @since 2.0.0 bbPress (r2625) |
| 1011 | 1012 | * |
| 1012 | 1013 | * @param int $forum_id Optional. Forum id |
| 1013 | 1014 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_get_forum_last_topic_author_id( $forum_id = 0 ) { |
| 1028 | 1029 | /** |
| 1029 | 1030 | * Output link to author of last topic of forum |
| 1030 | 1031 | * |
| 1031 | | * @since bbPress (r2625) |
| | 1032 | * @since 2.0.0 bbPress (r2625) |
| 1032 | 1033 | * |
| 1033 | 1034 | * @param int $forum_id Optional. Forum id |
| 1034 | 1035 | * @uses bbp_get_forum_last_topic_author_link() To get the forum's last topic's |
| … |
… |
function bbp_forum_last_topic_author_link( $forum_id = 0 ) { |
| 1040 | 1041 | /** |
| 1041 | 1042 | * Return link to author of last topic of forum |
| 1042 | 1043 | * |
| 1043 | | * @since bbPress (r2625) |
| | 1044 | * @since 2.0.0 bbPress (r2625) |
| 1044 | 1045 | * |
| 1045 | 1046 | * @param int $forum_id Optional. Forum id |
| 1046 | 1047 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_topic_author_link( $forum_id = 0 ) { |
| 1064 | 1065 | /** |
| 1065 | 1066 | * Output the forums last reply id |
| 1066 | 1067 | * |
| 1067 | | * @since bbPress (r2464) |
| | 1068 | * @since 2.0.0 bbPress (r2464) |
| 1068 | 1069 | * |
| 1069 | 1070 | * @uses bbp_get_forum_last_reply_id() To get the forum's last reply id |
| 1070 | 1071 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_forum_last_reply_id( $forum_id = 0 ) { |
| 1075 | 1076 | /** |
| 1076 | 1077 | * Return the forums last reply id |
| 1077 | 1078 | * |
| 1078 | | * @since bbPress (r2464) |
| | 1079 | * @since 2.0.0 bbPress (r2464) |
| 1079 | 1080 | * |
| 1080 | 1081 | * @param int $forum_id Optional. Forum id |
| 1081 | 1082 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_reply_title( $forum_id = 0 ) { |
| 1123 | 1124 | /** |
| 1124 | 1125 | * Output the link to the last reply in a forum |
| 1125 | 1126 | * |
| 1126 | | * @since bbPress (r2464) |
| | 1127 | * @since 2.0.0 bbPress (r2464) |
| 1127 | 1128 | * |
| 1128 | 1129 | * @param int $forum_id Optional. Forum id |
| 1129 | 1130 | * @uses bbp_get_forum_last_reply_permalink() To get the forum last reply link |
| … |
… |
function bbp_forum_last_reply_permalink( $forum_id = 0 ) { |
| 1134 | 1135 | /** |
| 1135 | 1136 | * Return the link to the last reply in a forum |
| 1136 | 1137 | * |
| 1137 | | * @since bbPress (r2464) |
| | 1138 | * @since 2.0.0 bbPress (r2464) |
| 1138 | 1139 | * |
| 1139 | 1140 | * @param int $forum_id Optional. Forum id |
| 1140 | 1141 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_reply_permalink( $forum_id = 0 ) { |
| 1155 | 1156 | /** |
| 1156 | 1157 | * Output the url to the last reply in a forum |
| 1157 | 1158 | * |
| 1158 | | * @since bbPress (r2683) |
| | 1159 | * @since 2.0.0 bbPress (r2683) |
| 1159 | 1160 | * |
| 1160 | 1161 | * @param int $forum_id Optional. Forum id |
| 1161 | 1162 | * @uses bbp_get_forum_last_reply_url() To get the forum last reply url |
| … |
… |
function bbp_forum_last_reply_url( $forum_id = 0 ) { |
| 1166 | 1167 | /** |
| 1167 | 1168 | * Return the url to the last reply in a forum |
| 1168 | 1169 | * |
| 1169 | | * @since bbPress (r2683) |
| | 1170 | * @since 2.0.0 bbPress (r2683) |
| 1170 | 1171 | * |
| 1171 | 1172 | * @param int $forum_id Optional. Forum id |
| 1172 | 1173 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_reply_url( $forum_id = 0 ) { |
| 1203 | 1204 | /** |
| 1204 | 1205 | * Output author ID of last reply of forum |
| 1205 | 1206 | * |
| 1206 | | * @since bbPress (r2625) |
| | 1207 | * @since 2.0.0 bbPress (r2625) |
| 1207 | 1208 | * |
| 1208 | 1209 | * @param int $forum_id Optional. Forum id |
| 1209 | 1210 | * @uses bbp_get_forum_last_reply_author_id() To get the forum's last reply |
| … |
… |
function bbp_forum_last_reply_author_id( $forum_id = 0 ) { |
| 1215 | 1216 | /** |
| 1216 | 1217 | * Return author ID of last reply of forum |
| 1217 | 1218 | * |
| 1218 | | * @since bbPress (r2625) |
| | 1219 | * @since 2.0.0 bbPress (r2625) |
| 1219 | 1220 | * |
| 1220 | 1221 | * @param int $forum_id Optional. Forum id |
| 1221 | 1222 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_reply_author_id( $forum_id = 0 ) { |
| 1237 | 1238 | /** |
| 1238 | 1239 | * Output link to author of last reply of forum |
| 1239 | 1240 | * |
| 1240 | | * @since bbPress (r2625) |
| | 1241 | * @since 2.0.0 bbPress (r2625) |
| 1241 | 1242 | * |
| 1242 | 1243 | * @param int $forum_id Optional. Forum id |
| 1243 | 1244 | * @uses bbp_get_forum_last_reply_author_link() To get the forum's last reply's |
| … |
… |
function bbp_forum_last_reply_author_link( $forum_id = 0 ) { |
| 1249 | 1250 | /** |
| 1250 | 1251 | * Return link to author of last reply of forum |
| 1251 | 1252 | * |
| 1252 | | * @since bbPress (r2625) |
| | 1253 | * @since 2.0.0 bbPress (r2625) |
| 1253 | 1254 | * |
| 1254 | 1255 | * @param int $forum_id Optional. Forum id |
| 1255 | 1256 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_last_reply_author_link( $forum_id = 0 ) { |
| 1274 | 1275 | /** |
| 1275 | 1276 | * Output the topics link of the forum |
| 1276 | 1277 | * |
| 1277 | | * @since bbPress (r2883) |
| | 1278 | * @since 2.0.0 bbPress (r2883) |
| 1278 | 1279 | * |
| 1279 | 1280 | * @param int $forum_id Optional. Topic id |
| 1280 | 1281 | * @uses bbp_get_forum_topics_link() To get the forum topics link |
| … |
… |
function bbp_forum_topics_link( $forum_id = 0 ) { |
| 1286 | 1287 | /** |
| 1287 | 1288 | * Return the topics link of the forum |
| 1288 | 1289 | * |
| 1289 | | * @since bbPress (r2883) |
| | 1290 | * @since 2.0.0 bbPress (r2883) |
| 1290 | 1291 | * |
| 1291 | 1292 | * @param int $forum_id Optional. Topic id |
| 1292 | 1293 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_topics_link( $forum_id = 0 ) { |
| 1338 | 1339 | /** |
| 1339 | 1340 | * Output total sub-forum count of a forum |
| 1340 | 1341 | * |
| 1341 | | * @since bbPress (r2464) |
| | 1342 | * @since 2.0.0 bbPress (r2464) |
| 1342 | 1343 | * |
| 1343 | 1344 | * @param int $forum_id Optional. Forum id to check |
| 1344 | 1345 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_forum_subforum_count( $forum_id = 0, $integer = false ) { |
| 1350 | 1351 | /** |
| 1351 | 1352 | * Return total subforum count of a forum |
| 1352 | 1353 | * |
| 1353 | | * @since bbPress (r2464) |
| | 1354 | * @since 2.0.0 bbPress (r2464) |
| 1354 | 1355 | * |
| 1355 | 1356 | * @param int $forum_id Optional. Forum id |
| 1356 | 1357 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_forum_subforum_count( $forum_id = 0, $integer = false ) { |
| 1371 | 1372 | /** |
| 1372 | 1373 | * Output total topic count of a forum |
| 1373 | 1374 | * |
| 1374 | | * @since bbPress (r2464) |
| | 1375 | * @since 2.0.0 bbPress (r2464) |
| 1375 | 1376 | * |
| 1376 | 1377 | * @param int $forum_id Optional. Forum id |
| 1377 | 1378 | * @param bool $total_count Optional. To get the total count or normal count? |
| … |
… |
function bbp_forum_topic_count( $forum_id = 0, $total_count = true, $integer = f |
| 1384 | 1385 | /** |
| 1385 | 1386 | * Return total topic count of a forum |
| 1386 | 1387 | * |
| 1387 | | * @since bbPress (r2464) |
| | 1388 | * @since 2.0.0 bbPress (r2464) |
| 1388 | 1389 | * |
| 1389 | 1390 | * @param int $forum_id Optional. Forum id |
| 1390 | 1391 | * @param bool $total_count Optional. To get the total count or normal |
| … |
… |
function bbp_forum_topic_count( $forum_id = 0, $total_count = true, $integer = f |
| 1408 | 1409 | /** |
| 1409 | 1410 | * Output total reply count of a forum |
| 1410 | 1411 | * |
| 1411 | | * @since bbPress (r2464) |
| | 1412 | * @since 2.0.0 bbPress (r2464) |
| 1412 | 1413 | * |
| 1413 | 1414 | * @param int $forum_id Optional. Forum id |
| 1414 | 1415 | * @param bool $total_count Optional. To get the total count or normal count? |
| … |
… |
function bbp_forum_reply_count( $forum_id = 0, $total_count = true, $integer = f |
| 1421 | 1422 | /** |
| 1422 | 1423 | * Return total post count of a forum |
| 1423 | 1424 | * |
| 1424 | | * @since bbPress (r2464) |
| | 1425 | * @since 2.0.0 bbPress (r2464) |
| 1425 | 1426 | * |
| 1426 | 1427 | * @param int $forum_id Optional. Forum id |
| 1427 | 1428 | * @param bool $total_count Optional. To get the total count or normal |
| … |
… |
function bbp_forum_reply_count( $forum_id = 0, $total_count = true, $integer = f |
| 1445 | 1446 | /** |
| 1446 | 1447 | * Output total post count of a forum |
| 1447 | 1448 | * |
| 1448 | | * @since bbPress (r2954) |
| | 1449 | * @since 2.0.0 bbPress (r2954) |
| 1449 | 1450 | * |
| 1450 | 1451 | * @param int $forum_id Optional. Forum id |
| 1451 | 1452 | * @param bool $total_count Optional. To get the total count or normal count? |
| … |
… |
function bbp_forum_post_count( $forum_id = 0, $total_count = true, $integer = fa |
| 1458 | 1459 | /** |
| 1459 | 1460 | * Return total post count of a forum |
| 1460 | 1461 | * |
| 1461 | | * @since bbPress (r2954) |
| | 1462 | * @since 2.0.0 bbPress (r2954) |
| 1462 | 1463 | * |
| 1463 | 1464 | * @param int $forum_id Optional. Forum id |
| 1464 | 1465 | * @param bool $total_count Optional. To get the total count or normal |
| … |
… |
function bbp_forum_post_count( $forum_id = 0, $total_count = true, $integer = fa |
| 1485 | 1486 | * Output total hidden topic count of a forum (hidden includes trashed, spammed, |
| 1486 | 1487 | * and pending topics) |
| 1487 | 1488 | * |
| 1488 | | * @since bbPress (r2883) |
| | 1489 | * @since 2.0.0 bbPress (r2883) |
| 1489 | 1490 | * |
| 1490 | 1491 | * @param int $forum_id Optional. Topic id |
| 1491 | 1492 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_forum_topic_count_hidden( $forum_id = 0, $integer = false ) { |
| 1498 | 1499 | * Return total hidden topic count of a forum (hidden includes trashed, |
| 1499 | 1500 | * spammed and pending topics) |
| 1500 | 1501 | * |
| 1501 | | * @since bbPress (r2883) |
| | 1502 | * @since 2.0.0 bbPress (r2883) |
| 1502 | 1503 | * |
| 1503 | 1504 | * @param int $forum_id Optional. Topic id |
| 1504 | 1505 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_forum_topic_count_hidden( $forum_id = 0, $integer = false ) { |
| 1519 | 1520 | /** |
| 1520 | 1521 | * Output the status of the forum |
| 1521 | 1522 | * |
| 1522 | | * @since bbPress (r2667) |
| | 1523 | * @since 2.0.0 bbPress (r2667) |
| 1523 | 1524 | * |
| 1524 | 1525 | * @param int $forum_id Optional. Forum id |
| 1525 | 1526 | * @uses bbp_get_forum_status() To get the forum status |
| … |
… |
function bbp_forum_status( $forum_id = 0 ) { |
| 1530 | 1531 | /** |
| 1531 | 1532 | * Return the status of the forum |
| 1532 | 1533 | * |
| 1533 | | * @since bbPress (r2667) |
| | 1534 | * @since 2.0.0 bbPress (r2667) |
| 1534 | 1535 | * |
| 1535 | 1536 | * @param int $forum_id Optional. Forum id |
| 1536 | 1537 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_status( $forum_id = 0 ) { |
| 1553 | 1554 | /** |
| 1554 | 1555 | * Output the visibility of the forum |
| 1555 | 1556 | * |
| 1556 | | * @since bbPress (r2997) |
| | 1557 | * @since 2.0.0 bbPress (r2997) |
| 1557 | 1558 | * |
| 1558 | 1559 | * @param int $forum_id Optional. Forum id |
| 1559 | 1560 | * @uses bbp_get_forum_visibility() To get the forum visibility |
| … |
… |
function bbp_forum_visibility( $forum_id = 0 ) { |
| 1564 | 1565 | /** |
| 1565 | 1566 | * Return the visibility of the forum |
| 1566 | 1567 | * |
| 1567 | | * @since bbPress (r2997) |
| | 1568 | * @since 2.0.0 bbPress (r2997) |
| 1568 | 1569 | * |
| 1569 | 1570 | * @param int $forum_id Optional. Forum id |
| 1570 | 1571 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_visibility( $forum_id = 0 ) { |
| 1583 | 1584 | /** |
| 1584 | 1585 | * Output the type of the forum |
| 1585 | 1586 | * |
| 1586 | | * @since bbPress (r3563) |
| | 1587 | * @since 2.1.0 bbPress (r3563) |
| 1587 | 1588 | * |
| 1588 | 1589 | * @param int $forum_id Optional. Forum id |
| 1589 | 1590 | * @uses bbp_get_forum_type() To get the forum type |
| … |
… |
function bbp_forum_type( $forum_id = 0 ) { |
| 1594 | 1595 | /** |
| 1595 | 1596 | * Return the type of forum (category/forum/etc...) |
| 1596 | 1597 | * |
| 1597 | | * @since bbPress (r3563) |
| | 1598 | * @since 2.1.0 bbPress (r3563) |
| 1598 | 1599 | * |
| 1599 | 1600 | * @param int $forum_id Optional. Forum id |
| 1600 | 1601 | * @uses get_post_meta() To get the forum category meta |
| … |
… |
function bbp_forum_type( $forum_id = 0 ) { |
| 1614 | 1615 | /** |
| 1615 | 1616 | * Is the forum a category? |
| 1616 | 1617 | * |
| 1617 | | * @since bbPress (r2746) |
| | 1618 | * @since 2.0.0 bbPress (r2746) |
| 1618 | 1619 | * |
| 1619 | 1620 | * @param int $forum_id Optional. Forum id |
| 1620 | 1621 | * @uses bbp_get_forum_type() To get the forum type |
| … |
… |
function bbp_is_forum_category( $forum_id = 0 ) { |
| 1631 | 1632 | /** |
| 1632 | 1633 | * Is the forum open? |
| 1633 | 1634 | * |
| 1634 | | * @since bbPress (r2746) |
| | 1635 | * @since 2.0.0 bbPress (r2746) |
| 1635 | 1636 | * |
| 1636 | 1637 | * @param int $forum_id Optional. Forum id |
| 1637 | 1638 | * @param bool $check_ancestors Check if the ancestors are open (only |
| … |
… |
function bbp_is_forum_open( $forum_id = 0, $check_ancestors = true ) { |
| 1646 | 1647 | /** |
| 1647 | 1648 | * Is the forum closed? |
| 1648 | 1649 | * |
| 1649 | | * @since bbPress (r2746) |
| | 1650 | * @since 2.0.0 bbPress (r2746) |
| 1650 | 1651 | * |
| 1651 | 1652 | * @param int $forum_id Optional. Forum id |
| 1652 | 1653 | * @param bool $check_ancestors Check if the ancestors are closed (only |
| … |
… |
function bbp_is_forum_closed( $forum_id = 0, $check_ancestors = true ) { |
| 1669 | 1670 | /** |
| 1670 | 1671 | * Check if the forum status is a specific one, also maybe checking ancestors |
| 1671 | 1672 | * |
| 1672 | | * @since bbPress (r5499) |
| | 1673 | * @since 2.6.0 bbPress (r5499) |
| 1673 | 1674 | * |
| 1674 | 1675 | * @param bool $status_name The forum status name to check |
| 1675 | 1676 | * @param bool $check_ancestors Check the forum ancestors |
| … |
… |
function bbp_is_forum_status( $forum_id, $status_name, $check_ancestors = true, |
| 1743 | 1744 | /** |
| 1744 | 1745 | * Is the forum public? |
| 1745 | 1746 | * |
| 1746 | | * @since bbPress (r2997) |
| | 1747 | * @since 2.0.0 bbPress (r2997) |
| 1747 | 1748 | * |
| 1748 | 1749 | * @param int $forum_id Optional. Forum id |
| 1749 | 1750 | * @param bool $check_ancestors Check if the ancestors are public |
| … |
… |
function bbp_is_forum_public( $forum_id = 0, $check_ancestors = true ) { |
| 1765 | 1766 | /** |
| 1766 | 1767 | * Is the forum private? |
| 1767 | 1768 | * |
| 1768 | | * @since bbPress (r2746) |
| | 1769 | * @since 2.0.0 bbPress (r2746) |
| 1769 | 1770 | * |
| 1770 | 1771 | * @param int $forum_id Optional. Forum id |
| 1771 | 1772 | * @param bool $check_ancestors Check if the ancestors are private |
| … |
… |
function bbp_is_forum_private( $forum_id = 0, $check_ancestors = true ) { |
| 1787 | 1788 | /** |
| 1788 | 1789 | * Is the forum hidden? |
| 1789 | 1790 | * |
| 1790 | | * @since bbPress (r2997) |
| | 1791 | * @since 2.0.0 bbPress (r2997) |
| 1791 | 1792 | * |
| 1792 | 1793 | * @param int $forum_id Optional. Forum id |
| 1793 | 1794 | * @param bool $check_ancestors Check if the ancestors are private (only if |
| … |
… |
function bbp_is_forum_hidden( $forum_id = 0, $check_ancestors = true ) { |
| 1810 | 1811 | /** |
| 1811 | 1812 | * Check the forum visibility ID |
| 1812 | 1813 | * |
| 1813 | | * @since bbPress (r5499) |
| | 1814 | * @since 2.6.0 bbPress (r5499) |
| 1814 | 1815 | * |
| 1815 | 1816 | * @param int $forum_id Optional. Forum id |
| 1816 | 1817 | * @param bool $status_name The post status name to check |
| … |
… |
function bbp_is_forum_visibility( $forum_id, $status_name, $check_ancestors = tr |
| 1887 | 1888 | /** |
| 1888 | 1889 | * Output the author ID of the forum |
| 1889 | 1890 | * |
| 1890 | | * @since bbPress (r3675) |
| | 1891 | * @since 2.1.0 bbPress (r3675) |
| 1891 | 1892 | * |
| 1892 | 1893 | * @param int $forum_id Optional. Forum id |
| 1893 | 1894 | * @uses bbp_get_forum_author_id() To get the forum author id |
| … |
… |
function bbp_forum_author_id( $forum_id = 0 ) { |
| 1898 | 1899 | /** |
| 1899 | 1900 | * Return the author ID of the forum |
| 1900 | 1901 | * |
| 1901 | | * @since bbPress (r3675) |
| | 1902 | * @since 2.1.0 bbPress (r3675) |
| 1902 | 1903 | * |
| 1903 | 1904 | * @param int $forum_id Optional. Forum id |
| 1904 | 1905 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_author_id( $forum_id = 0 ) { |
| 1917 | 1918 | /** |
| 1918 | 1919 | * Output the author of the forum |
| 1919 | 1920 | * |
| 1920 | | * @since bbPress (r3675) |
| | 1921 | * @since 2.1.0 bbPress (r3675) |
| 1921 | 1922 | * |
| 1922 | 1923 | * @param int $forum_id Optional. Forum id |
| 1923 | 1924 | * @uses bbp_get_forum_author() To get the forum author |
| … |
… |
function bbp_forum_author_display_name( $forum_id = 0 ) { |
| 1928 | 1929 | /** |
| 1929 | 1930 | * Return the author of the forum |
| 1930 | 1931 | * |
| 1931 | | * @since bbPress (r3675) |
| | 1932 | * @since 2.1.0 bbPress (r3675) |
| 1932 | 1933 | * |
| 1933 | 1934 | * @param int $forum_id Optional. Forum id |
| 1934 | 1935 | * @uses bbp_get_forum_id() To get the forum id |
| … |
… |
function bbp_forum_author_display_name( $forum_id = 0 ) { |
| 1949 | 1950 | /** |
| 1950 | 1951 | * Replace forum meta details for users that cannot view them. |
| 1951 | 1952 | * |
| 1952 | | * @since bbPress (r3162) |
| | 1953 | * @since 2.0.0 bbPress (r3162) |
| 1953 | 1954 | * |
| 1954 | 1955 | * @param string $retval |
| 1955 | 1956 | * @param int $forum_id |
| … |
… |
function bbp_suppress_private_forum_meta( $retval, $forum_id ) { |
| 1970 | 1971 | /** |
| 1971 | 1972 | * Replace forum author details for users that cannot view them. |
| 1972 | 1973 | * |
| 1973 | | * @since bbPress (r3162) |
| | 1974 | * @since 2.0.0 bbPress (r3162) |
| 1974 | 1975 | * |
| 1975 | 1976 | * @param string $author_link |
| 1976 | 1977 | * @param array $args |
| … |
… |
function bbp_suppress_private_author_link( $author_link = '', $args = array() ) |
| 2030 | 2031 | /** |
| 2031 | 2032 | * Output the row class of a forum |
| 2032 | 2033 | * |
| 2033 | | * @since bbPress (r2667) |
| | 2034 | * @since 2.0.0 bbPress (r2667) |
| 2034 | 2035 | * |
| 2035 | 2036 | * @param int $forum_id Optional. Forum ID. |
| 2036 | 2037 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_forum_class( $forum_id = 0, $classes = array() ) { |
| 2042 | 2043 | /** |
| 2043 | 2044 | * Return the row class of a forum |
| 2044 | 2045 | * |
| 2045 | | * @since bbPress (r2667) |
| | 2046 | * @since 2.0.0 bbPress (r2667) |
| 2046 | 2047 | * |
| 2047 | 2048 | * @param int $forum_id Optional. Forum ID |
| 2048 | 2049 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_forum_class( $forum_id = 0, $classes = array() ) { |
| 2087 | 2088 | * Output a fancy description of the current forum, including total topics, |
| 2088 | 2089 | * total replies, and last activity. |
| 2089 | 2090 | * |
| 2090 | | * @since bbPress (r2860) |
| | 2091 | * @since 2.0.0 bbPress (r2860) |
| 2091 | 2092 | * |
| 2092 | 2093 | * @param array $args Arguments passed to alter output |
| 2093 | 2094 | * @uses bbp_get_single_forum_description() Return the eventual output |
| … |
… |
function bbp_single_forum_description( $args = array() ) { |
| 2099 | 2100 | * Return a fancy description of the current forum, including total |
| 2100 | 2101 | * topics, total replies, and last activity. |
| 2101 | 2102 | * |
| 2102 | | * @since bbPress (r2860) |
| | 2103 | * @since 2.0.0 bbPress (r2860) |
| 2103 | 2104 | * |
| 2104 | 2105 | * @param array $args This function supports these arguments: |
| 2105 | 2106 | * - forum_id: Forum id |
| … |
… |
function bbp_single_forum_description( $args = array() ) { |
| 2222 | 2223 | /** |
| 2223 | 2224 | * Output the unique id of the forum moderators taxonomy |
| 2224 | 2225 | * |
| 2225 | | * @since bbPress (r5834) |
| | 2226 | * @since 2.6.0 bbPress (r5834) |
| 2226 | 2227 | * |
| 2227 | 2228 | * @uses bbp_get_forum_mod_tax_id() To get the forum modorator taxonomy ID |
| 2228 | 2229 | */ |
| … |
… |
function bbp_forum_mod_tax_id() { |
| 2232 | 2233 | /** |
| 2233 | 2234 | * Return the unique id of the forum moderators taxonomy |
| 2234 | 2235 | * |
| 2235 | | * @since bbPress (r5834) |
| | 2236 | * @since 2.6.0 bbPress (r5834) |
| 2236 | 2237 | * |
| 2237 | 2238 | * @uses apply_filters() Calls 'bbp_get_forum_mod_tax_id' with the forum |
| 2238 | 2239 | * moderator taxonomy id |
| … |
… |
function bbp_forum_mod_tax_id() { |
| 2245 | 2246 | /** |
| 2246 | 2247 | * Return array of labels used by the forum-mod taxonomy |
| 2247 | 2248 | * |
| 2248 | | * @since bbPress (r5834) |
| | 2249 | * @since 2.6.0 bbPress (r5834) |
| 2249 | 2250 | * |
| 2250 | 2251 | * @uses apply_filters() Calls 'bbp_get_forum_mod_tax_id' with the forum |
| 2251 | 2252 | * moderator taxonomy labels |
| … |
… |
function bbp_get_forum_mod_tax_labels() { |
| 2270 | 2271 | /** |
| 2271 | 2272 | * Output a the moderators of a forum |
| 2272 | 2273 | * |
| 2273 | | * @since bbPress (r5834) |
| | 2274 | * @since 2.6.0 bbPress (r5834) |
| 2274 | 2275 | * |
| 2275 | 2276 | * @param int $forum_id Optional. Topic id |
| 2276 | 2277 | * @param array $args See {@link bbp_get_forum_mod_list()} |
| … |
… |
function bbp_forum_mod_list( $forum_id = 0, $args = array() ) { |
| 2282 | 2283 | /** |
| 2283 | 2284 | * Return the moderators of a forum |
| 2284 | 2285 | * |
| 2285 | | * @since bbPress (r5834) |
| | 2286 | * @since 2.6.0 bbPress (r5834) |
| 2286 | 2287 | * |
| 2287 | 2288 | * @param int $forum_id Optional. Forum id |
| 2288 | 2289 | * @param array $args This function supports these arguments: |
| … |
… |
function bbp_forum_mod_list( $forum_id = 0, $args = array() ) { |
| 2350 | 2351 | /** |
| 2351 | 2352 | * Output the value of forum title field |
| 2352 | 2353 | * |
| 2353 | | * @since bbPress (r3551) |
| | 2354 | * @since 2.1.0 bbPress (r3551) |
| 2354 | 2355 | * |
| 2355 | 2356 | * @uses bbp_get_form_forum_title() To get the value of forum title field |
| 2356 | 2357 | */ |
| … |
… |
function bbp_form_forum_title() { |
| 2360 | 2361 | /** |
| 2361 | 2362 | * Return the value of forum title field |
| 2362 | 2363 | * |
| 2363 | | * @since bbPress (r3551) |
| | 2364 | * @since 2.1.0 bbPress (r3551) |
| 2364 | 2365 | * |
| 2365 | 2366 | * @uses bbp_is_forum_edit() To check if it's forum edit page |
| 2366 | 2367 | * @uses apply_filters() Calls 'bbp_get_form_forum_title' with the title |
| … |
… |
function bbp_form_forum_title() { |
| 2387 | 2388 | /** |
| 2388 | 2389 | * Output the value of forum content field |
| 2389 | 2390 | * |
| 2390 | | * @since bbPress (r3551) |
| | 2391 | * @since 2.1.0 bbPress (r3551) |
| 2391 | 2392 | * |
| 2392 | 2393 | * @uses bbp_get_form_forum_content() To get value of forum content field |
| 2393 | 2394 | */ |
| … |
… |
function bbp_form_forum_content() { |
| 2397 | 2398 | /** |
| 2398 | 2399 | * Return the value of forum content field |
| 2399 | 2400 | * |
| 2400 | | * @since bbPress (r3551) |
| | 2401 | * @since 2.1.0 bbPress (r3551) |
| 2401 | 2402 | * |
| 2402 | 2403 | * @uses bbp_is_forum_edit() To check if it's the forum edit page |
| 2403 | 2404 | * @uses apply_filters() Calls 'bbp_get_form_forum_content' with the content |
| … |
… |
function bbp_form_forum_content() { |
| 2424 | 2425 | /** |
| 2425 | 2426 | * Output value of forum parent |
| 2426 | 2427 | * |
| 2427 | | * @since bbPress (r3551) |
| | 2428 | * @since 2.1.0 bbPress (r3551) |
| 2428 | 2429 | * |
| 2429 | 2430 | * @uses bbp_get_form_forum_parent() To get the topic's forum id |
| 2430 | 2431 | */ |
| … |
… |
function bbp_form_forum_parent() { |
| 2434 | 2435 | /** |
| 2435 | 2436 | * Return value of forum parent |
| 2436 | 2437 | * |
| 2437 | | * @since bbPress (r3551) |
| | 2438 | * @since 2.1.0 bbPress (r3551) |
| 2438 | 2439 | * |
| 2439 | 2440 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 2440 | 2441 | * @uses bbp_get_forum_parent_id() To get the topic forum id |
| … |
… |
function bbp_form_forum_parent() { |
| 2462 | 2463 | /** |
| 2463 | 2464 | * Output value of forum type |
| 2464 | 2465 | * |
| 2465 | | * @since bbPress (r3563) |
| | 2466 | * @since 2.1.0 bbPress (r3563) |
| 2466 | 2467 | * |
| 2467 | 2468 | * @uses bbp_get_form_forum_type() To get the topic's forum id |
| 2468 | 2469 | */ |
| … |
… |
function bbp_form_forum_type() { |
| 2472 | 2473 | /** |
| 2473 | 2474 | * Return value of forum type |
| 2474 | 2475 | * |
| 2475 | | * @since bbPress (r3563) |
| | 2476 | * @since 2.1.0 bbPress (r3563) |
| 2476 | 2477 | * |
| 2477 | 2478 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 2478 | 2479 | * @uses bbp_get_forum_type_id() To get the topic forum id |
| … |
… |
function bbp_form_forum_type() { |
| 2500 | 2501 | /** |
| 2501 | 2502 | * Output value of forum visibility |
| 2502 | 2503 | * |
| 2503 | | * @since bbPress (r3563) |
| | 2504 | * @since 2.1.0 bbPress (r3563) |
| 2504 | 2505 | * |
| 2505 | 2506 | * @uses bbp_get_form_forum_visibility() To get the topic's forum id |
| 2506 | 2507 | */ |
| … |
… |
function bbp_form_forum_visibility() { |
| 2510 | 2511 | /** |
| 2511 | 2512 | * Return value of forum visibility |
| 2512 | 2513 | * |
| 2513 | | * @since bbPress (r3563) |
| | 2514 | * @since 2.1.0 bbPress (r3563) |
| 2514 | 2515 | * |
| 2515 | 2516 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 2516 | 2517 | * @uses bbp_get_forum_visibility_id() To get the topic forum id |
| … |
… |
function bbp_form_forum_visibility() { |
| 2538 | 2539 | /** |
| 2539 | 2540 | * Output checked value of forum subscription |
| 2540 | 2541 | * |
| 2541 | | * @since bbPress (r5156) |
| | 2542 | * @since 2.5.0 bbPress (r5156) |
| 2542 | 2543 | * |
| 2543 | 2544 | * @uses bbp_get_form_forum_subscribed() To get the subscribed checkbox value |
| 2544 | 2545 | */ |
| … |
… |
function bbp_form_forum_subscribed() { |
| 2548 | 2549 | /** |
| 2549 | 2550 | * Return checked value of forum subscription |
| 2550 | 2551 | * |
| 2551 | | * @since bbPress (r5156) |
| | 2552 | * @since 2.5.0 bbPress (r5156) |
| 2552 | 2553 | * |
| 2553 | 2554 | * @uses bbp_is_forum_edit() To check if it's the forum edit page |
| 2554 | 2555 | * @uses bbp_get_global_post_field() To get current post author |
| … |
… |
function bbp_form_forum_subscribed() { |
| 2600 | 2601 | /** |
| 2601 | 2602 | * Output value forum type dropdown |
| 2602 | 2603 | * |
| 2603 | | * @since bbPress (r3563) |
| | 2604 | * @since 2.1.0 bbPress (r3563) |
| 2604 | 2605 | * |
| 2605 | 2606 | * @param $args This function supports these arguments: |
| 2606 | 2607 | * - select_id: Select id. Defaults to bbp_forum_type |
| … |
… |
function bbp_form_forum_type_dropdown( $args = array() ) { |
| 2615 | 2616 | /** |
| 2616 | 2617 | * Return the forum type dropdown |
| 2617 | 2618 | * |
| 2618 | | * @since bbPress (r3563) |
| | 2619 | * @since 2.1.0 bbPress (r3563) |
| 2619 | 2620 | * |
| 2620 | 2621 | * @param $args This function supports these arguments: |
| 2621 | 2622 | * - select_id: Select id. Defaults to bbp_forum_type |
| … |
… |
function bbp_form_forum_type_dropdown( $args = array() ) { |
| 2692 | 2693 | /** |
| 2693 | 2694 | * Output value forum status dropdown |
| 2694 | 2695 | * |
| 2695 | | * @since bbPress (r3563) |
| | 2696 | * @since 2.1.0 bbPress (r3563) |
| 2696 | 2697 | * |
| 2697 | 2698 | * @param $args This function supports these arguments: |
| 2698 | 2699 | * - select_id: Select id. Defaults to bbp_forum_status |
| … |
… |
function bbp_form_forum_status_dropdown( $args = array() ) { |
| 2707 | 2708 | /** |
| 2708 | 2709 | * Return the forum status dropdown |
| 2709 | 2710 | * |
| 2710 | | * @since bbPress (r3563) |
| | 2711 | * @since 2.1.0 bbPress (r3563) |
| 2711 | 2712 | * |
| 2712 | 2713 | * @param $args This function supports these arguments: |
| 2713 | 2714 | * - select_id: Select id. Defaults to bbp_forum_status |
| … |
… |
function bbp_form_forum_status_dropdown( $args = array() ) { |
| 2784 | 2785 | /** |
| 2785 | 2786 | * Output value forum visibility dropdown |
| 2786 | 2787 | * |
| 2787 | | * @since bbPress (r3563) |
| | 2788 | * @since 2.1.0 bbPress (r3563) |
| 2788 | 2789 | * |
| 2789 | 2790 | * @param $args This function supports these arguments: |
| 2790 | 2791 | * - select_id: Select id. Defaults to bbp_forum_visibility |
| … |
… |
function bbp_form_forum_visibility_dropdown( $args = array() ) { |
| 2799 | 2800 | /** |
| 2800 | 2801 | * Return the forum visibility dropdown |
| 2801 | 2802 | * |
| 2802 | | * @since bbPress (r3563) |
| | 2803 | * @since 2.1.0 bbPress (r3563) |
| 2803 | 2804 | * |
| 2804 | 2805 | * @param $args This function supports these arguments: |
| 2805 | 2806 | * - select_id: Select id. Defaults to bbp_forum_visibility |
| … |
… |
function bbp_form_forum_visibility_dropdown( $args = array() ) { |
| 2881 | 2882 | * |
| 2882 | 2883 | * @see bbp_forum_form_fields() |
| 2883 | 2884 | * |
| 2884 | | * @since bbPress (r5558) |
| | 2885 | * @since 2.6.0 bbPress (r5558) |
| | 2886 | * |
| 2885 | 2887 | * @return boolean True if is a post request with valid nonce |
| 2886 | 2888 | */ |
| 2887 | 2889 | function bbp_is_forum_form_post_request() { |
| … |
… |
function bbp_is_forum_form_post_request() { |
| 2909 | 2911 | /** |
| 2910 | 2912 | * Output the link for the forum feed |
| 2911 | 2913 | * |
| 2912 | | * @since bbPress (r3172) |
| | 2914 | * @since 2.0.0 bbPress (r3172) |
| 2913 | 2915 | * |
| 2914 | 2916 | * @param type $forum_id Optional. Forum ID. |
| 2915 | 2917 | * |
| … |
… |
function bbp_forum_topics_feed_link( $forum_id = 0 ) { |
| 2921 | 2923 | /** |
| 2922 | 2924 | * Retrieve the link for the forum feed |
| 2923 | 2925 | * |
| 2924 | | * @since bbPress (r3172) |
| | 2926 | * @since 2.0.0 bbPress (r3172) |
| 2925 | 2927 | * |
| 2926 | 2928 | * @param int $forum_id Optional. Forum ID. |
| 2927 | 2929 | * |
| … |
… |
function bbp_forum_topics_feed_link( $forum_id = 0 ) { |
| 2971 | 2973 | /** |
| 2972 | 2974 | * Output the link for the forum replies feed |
| 2973 | 2975 | * |
| 2974 | | * @since bbPress (r3172) |
| | 2976 | * @since 2.0.0 bbPress (r3172) |
| 2975 | 2977 | * |
| 2976 | 2978 | * @param type $forum_id Optional. Forum ID. |
| 2977 | 2979 | * |
| … |
… |
function bbp_forum_replies_feed_link( $forum_id = 0 ) { |
| 2983 | 2985 | /** |
| 2984 | 2986 | * Retrieve the link for the forum replies feed |
| 2985 | 2987 | * |
| 2986 | | * @since bbPress (r3172) |
| | 2988 | * @since 2.0.0 bbPress (r3172) |
| 2987 | 2989 | * |
| 2988 | 2990 | * @param int $forum_id Optional. Forum ID. |
| 2989 | 2991 | * |
-
diff --git src/includes/replies/capabilities.php src/includes/replies/capabilities.php
index 1f1c3a9..ed22cbe 100644
|
|
|
|
| 12 | 12 | /** |
| 13 | 13 | * Return reply capabilities |
| 14 | 14 | * |
| 15 | | * @since bbPress (r2593) |
| | 15 | * @since 2.0.0 bbPress (r2593) |
| 16 | 16 | * |
| 17 | 17 | * @uses apply_filters() Calls 'bbp_get_reply_caps' with the capabilities |
| 18 | 18 | * @return array Reply capabilities |
| … |
… |
function bbp_get_reply_caps() { |
| 31 | 31 | /** |
| 32 | 32 | * Maps topic capabilities |
| 33 | 33 | * |
| 34 | | * @since bbPress (r4242) |
| | 34 | * @since 2.2.0 bbPress (r4242) |
| 35 | 35 | * |
| 36 | 36 | * @param array $caps Capabilities for meta capability |
| 37 | 37 | * @param string $cap Capability name |
-
diff --git src/includes/replies/functions.php src/includes/replies/functions.php
index 36b49bf..a6ebae6 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 16 | 16 | * A wrapper for wp_insert_post() that also includes the necessary meta values |
| 17 | 17 | * for the reply to function properly. |
| 18 | 18 | * |
| 19 | | * @since bbPress (r3349) |
| | 19 | * @since 2.0.0 bbPress (r3349) |
| 20 | 20 | * |
| 21 | 21 | * @uses bbp_parse_args() |
| 22 | 22 | * @uses bbp_get_reply_post_type() |
| … |
… |
function bbp_insert_reply( $reply_data = array(), $reply_meta = array() ) { |
| 74 | 74 | /** |
| 75 | 75 | * Handles the front end reply submission |
| 76 | 76 | * |
| 77 | | * @since bbPress (r2574) |
| | 77 | * @since 2.0.0 bbPress (r2574) |
| 78 | 78 | * |
| 79 | 79 | * @param string $action The requested action to compare this function to |
| 80 | 80 | * @uses bbp_add_error() To add an error message |
| … |
… |
function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo |
| 884 | 884 | /** |
| 885 | 885 | * Walk up the ancestor tree from the current reply, and update all the counts |
| 886 | 886 | * |
| 887 | | * @since bbPress (r2884) |
| | 887 | * @since 2.0.0 bbPress (r2884) |
| 888 | 888 | * |
| 889 | 889 | * @param int $reply_id Optional. Reply id |
| 890 | 890 | * @param string $last_active_time Optional. Last active time |
| … |
… |
function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id = |
| 1014 | 1014 | /** |
| 1015 | 1015 | * Update the reply with its forum id it is in |
| 1016 | 1016 | * |
| 1017 | | * @since bbPress (r2855) |
| | 1017 | * @since 2.0.0 bbPress (r2855) |
| 1018 | 1018 | * |
| 1019 | 1019 | * @param int $reply_id Optional. Reply id to update |
| 1020 | 1020 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_update_reply_forum_id( $reply_id = 0, $forum_id = 0 ) { |
| 1063 | 1063 | /** |
| 1064 | 1064 | * Update the reply with its topic id it is in |
| 1065 | 1065 | * |
| 1066 | | * @since bbPress (r2855) |
| | 1066 | * @since 2.0.0 bbPress (r2855) |
| 1067 | 1067 | * |
| 1068 | 1068 | * @param int $reply_id Optional. Reply id to update |
| 1069 | 1069 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_update_reply_topic_id( $reply_id = 0, $topic_id = 0 ) { |
| 1112 | 1112 | /* |
| 1113 | 1113 | * Update the reply's meta data with its reply to id |
| 1114 | 1114 | * |
| 1115 | | * @since bbPress (r4944) |
| | 1115 | * @since 2.4.0 bbPress (r4944) |
| 1116 | 1116 | * |
| 1117 | 1117 | * @param int $reply_id Reply id to update |
| 1118 | 1118 | * @param int $reply_to Optional. Reply to id |
| … |
… |
function bbp_update_reply_to( $reply_id = 0, $reply_to = 0 ) { |
| 1150 | 1150 | * Because settings can be changed, this function does not care if hierarchical |
| 1151 | 1151 | * replies are active or to what depth. |
| 1152 | 1152 | * |
| 1153 | | * @since bbPress (r5390) |
| | 1153 | * @since 2.6.0 bbPress (r5390) |
| 1154 | 1154 | * |
| 1155 | 1155 | * @param int $reply_id |
| 1156 | 1156 | * @return array |
| … |
… |
function bbp_get_reply_ancestors( $reply_id = 0 ) { |
| 1196 | 1196 | /** |
| 1197 | 1197 | * Update the revision log of the reply |
| 1198 | 1198 | * |
| 1199 | | * @since bbPress (r2782) |
| | 1199 | * @since 2.0.0 bbPress (r2782) |
| 1200 | 1200 | * |
| 1201 | 1201 | * @param array $args Supports these args: |
| 1202 | 1202 | * - reply_id: reply id |
| … |
… |
function bbp_update_reply_revision_log( $args = array() ) { |
| 1240 | 1240 | * |
| 1241 | 1241 | * Handles the front end move reply submission |
| 1242 | 1242 | * |
| 1243 | | * @since bbPress (r4521) |
| | 1243 | * @since 2.3.0 bbPress (r4521) |
| 1244 | 1244 | * |
| 1245 | 1245 | * @param string $action The requested action to compare this function to |
| 1246 | 1246 | * @uses bbp_add_error() To add an error message |
| … |
… |
function bbp_move_reply_handler( $action = '' ) { |
| 1496 | 1496 | * When a reply is moved, update the counts of source and destination topic |
| 1497 | 1497 | * and their forums. |
| 1498 | 1498 | * |
| 1499 | | * @since bbPress (r4521) |
| | 1499 | * @since 2.3.0 bbPress (r4521) |
| 1500 | 1500 | * |
| 1501 | 1501 | * @param int $move_reply_id Move reply id |
| 1502 | 1502 | * @param int $source_topic_id Source topic id |
| … |
… |
function bbp_move_reply_count( $move_reply_id, $source_topic_id, $destination_to |
| 1539 | 1539 | * Handles the front end spamming/unspamming and trashing/untrashing/deleting of |
| 1540 | 1540 | * replies |
| 1541 | 1541 | * |
| 1542 | | * @since bbPress (r2740) |
| | 1542 | * @since 2.0.0 bbPress (r2740) |
| 1543 | 1543 | * |
| 1544 | 1544 | * @param string $action The requested action to compare this function to |
| 1545 | 1545 | * @uses bbp_get_reply() To get the reply |
| … |
… |
function bbp_toggle_reply_handler( $action = '' ) { |
| 1693 | 1693 | /** |
| 1694 | 1694 | * Return an associative array of available reply statuses |
| 1695 | 1695 | * |
| 1696 | | * @since bbPress (r5399) |
| | 1696 | * @since 2.6.0 bbPress (r5399) |
| 1697 | 1697 | * |
| 1698 | 1698 | * @return array |
| 1699 | 1699 | */ |
| … |
… |
function bbp_get_reply_statuses() { |
| 1711 | 1711 | /** |
| 1712 | 1712 | * Marks a reply as spam |
| 1713 | 1713 | * |
| 1714 | | * @since bbPress (r2740) |
| | 1714 | * @since 2.0.0 bbPress (r2740) |
| 1715 | 1715 | * |
| 1716 | 1716 | * @param int $reply_id Reply id |
| 1717 | 1717 | * @uses bbp_get_reply() To get the reply |
| … |
… |
function bbp_spam_reply( $reply_id = 0 ) { |
| 1759 | 1759 | /** |
| 1760 | 1760 | * Unspams a reply |
| 1761 | 1761 | * |
| 1762 | | * @since bbPress (r2740) |
| | 1762 | * @since 2.0.0 bbPress (r2740) |
| 1763 | 1763 | * |
| 1764 | 1764 | * @param int $reply_id Reply id |
| 1765 | 1765 | * @uses bbp_get_reply() To get the reply |
| … |
… |
function bbp_unspam_reply( $reply_id = 0 ) { |
| 1813 | 1813 | /** |
| 1814 | 1814 | * Approves a reply |
| 1815 | 1815 | * |
| 1816 | | * @since bbPress (r5506) |
| | 1816 | * @since 2.6.0 bbPress (r5506) |
| 1817 | 1817 | * |
| 1818 | 1818 | * @param int $reply_id Reply id |
| 1819 | 1819 | * @uses bbp_get_reply() To get the reply |
| … |
… |
function bbp_approve_reply( $reply_id = 0 ) { |
| 1860 | 1860 | /** |
| 1861 | 1861 | * Unapproves a reply |
| 1862 | 1862 | * |
| 1863 | | * @since bbPress (r5506) |
| | 1863 | * @since 2.6.0 bbPress (r5506) |
| 1864 | 1864 | * |
| 1865 | 1865 | * @param int $reply_id Reply id |
| 1866 | 1866 | * @uses bbp_get_reply() To get the reply |
| … |
… |
function bbp_untrashed_reply( $reply_id = 0 ) { |
| 2014 | 2014 | /** |
| 2015 | 2015 | * Return the replies per page setting |
| 2016 | 2016 | * |
| 2017 | | * @since bbPress (r3540) |
| | 2017 | * @since 2.0.0 bbPress (r3540) |
| 2018 | 2018 | * |
| 2019 | 2019 | * @param int $default Default replies per page (15) |
| 2020 | 2020 | * @uses get_option() To get the setting |
| … |
… |
function bbp_get_replies_per_page( $default = 15 ) { |
| 2038 | 2038 | /** |
| 2039 | 2039 | * Return the replies per RSS page setting |
| 2040 | 2040 | * |
| 2041 | | * @since bbPress (r3540) |
| | 2041 | * @since 2.0.0 bbPress (r3540) |
| 2042 | 2042 | * |
| 2043 | 2043 | * @param int $default Default replies per page (25) |
| 2044 | 2044 | * @uses get_option() To get the setting |
| … |
… |
function bbp_get_replies_per_rss_page( $default = 25 ) { |
| 2064 | 2064 | /** |
| 2065 | 2065 | * Check if autoembeds are enabled and hook them in if so |
| 2066 | 2066 | * |
| 2067 | | * @since bbPress (r3752) |
| | 2067 | * @since 2.1.0 bbPress (r3752) |
| | 2068 | * |
| 2068 | 2069 | * @global WP_Embed $wp_embed |
| 2069 | 2070 | */ |
| 2070 | 2071 | function bbp_reply_content_autoembed() { |
| … |
… |
function bbp_reply_content_autoembed() { |
| 2083 | 2084 | * This function filters the 'post_where' of the WP_Query, and changes the query |
| 2084 | 2085 | * to include both the topic AND its children in the same loop. |
| 2085 | 2086 | * |
| 2086 | | * @since bbPress (r4058) |
| | 2087 | * @since 2.1.0 bbPress (r4058) |
| 2087 | 2088 | * |
| 2088 | 2089 | * @param string $where |
| 2089 | 2090 | * @return string |
| … |
… |
function _bbp_has_replies_where( $where = '', $query = false ) { |
| 2148 | 2149 | /** |
| 2149 | 2150 | * Output an RSS2 feed of replies, based on the query passed. |
| 2150 | 2151 | * |
| 2151 | | * @since bbPress (r3171) |
| | 2152 | * @since 2.0.0 bbPress (r3171) |
| 2152 | 2153 | * |
| 2153 | 2154 | * @uses bbp_version() |
| 2154 | 2155 | * @uses bbp_is_single_topic() |
| … |
… |
function bbp_display_replies_feed_rss2( $replies_query = array() ) { |
| 2287 | 2288 | /** |
| 2288 | 2289 | * Redirect if unathorized user is attempting to edit a reply |
| 2289 | 2290 | * |
| 2290 | | * @since bbPress (r3605) |
| | 2291 | * @since 2.1.0 bbPress (r3605) |
| 2291 | 2292 | * |
| 2292 | 2293 | * @uses bbp_is_reply_edit() |
| 2293 | 2294 | * @uses current_user_can() |
| … |
… |
function bbp_check_reply_edit() { |
| 2318 | 2319 | * freshness order. By updating the menu_order accordingly, we're able to |
| 2319 | 2320 | * leverage core WordPress query ordering much more effectively. |
| 2320 | 2321 | * |
| 2321 | | * @since bbPress (r3933) |
| | 2322 | * @since 2.1.0 bbPress (r3933) |
| 2322 | 2323 | * |
| 2323 | 2324 | * @param int $reply_id |
| 2324 | 2325 | * @param int $reply_position |
| … |
… |
function bbp_update_reply_position( $reply_id = 0, $reply_position = 0 ) { |
| 2363 | 2364 | * Get the position of a reply by querying the DB directly for the replies |
| 2364 | 2365 | * of a given topic. |
| 2365 | 2366 | * |
| 2366 | | * @since bbPress (r3933) |
| | 2367 | * @since 2.1.0 bbPress (r3933) |
| 2367 | 2368 | * |
| 2368 | 2369 | * @param int $reply_id |
| 2369 | 2370 | * @param int $topic_id |
| … |
… |
function bbp_get_reply_position_raw( $reply_id = 0, $topic_id = 0 ) { |
| 2404 | 2405 | /** |
| 2405 | 2406 | * List replies |
| 2406 | 2407 | * |
| 2407 | | * @since bbPress (r4944) |
| | 2408 | * @since 2.4.0 bbPress (r4944) |
| 2408 | 2409 | */ |
| 2409 | 2410 | function bbp_list_replies( $args = array() ) { |
| 2410 | 2411 | |
| … |
… |
function bbp_list_replies( $args = array() ) { |
| 2442 | 2443 | * @see https://bbpress.trac.wordpress.org/ticket/2588 |
| 2443 | 2444 | * @see https://bbpress.trac.wordpress.org/ticket/2586 |
| 2444 | 2445 | * |
| 2445 | | * @since bbPress (r5377) |
| | 2446 | * @since 2.5.4 bbPress (r5377) |
| 2446 | 2447 | * |
| 2447 | 2448 | * @param int $reply_to |
| 2448 | 2449 | * @param int $reply_id |
-
diff --git src/includes/replies/template.php src/includes/replies/template.php
index 754706f..925ff91 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Return the unique id of the custom post type for replies |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2857) |
| | 18 | * @since 2.0.0 bbPress (r2857) |
| 19 | 19 | * |
| 20 | 20 | * @uses bbp_get_reply_post_type() To get the reply post type |
| 21 | 21 | */ |
| … |
… |
function bbp_reply_post_type() { |
| 25 | 25 | /** |
| 26 | 26 | * Return the unique id of the custom post type for replies |
| 27 | 27 | * |
| 28 | | * @since bbPress (r2857) |
| | 28 | * @since 2.0.0 bbPress (r2857) |
| 29 | 29 | * |
| 30 | 30 | * @uses apply_filters() Calls 'bbp_get_forum_post_type' with the forum |
| 31 | 31 | * post type id |
| … |
… |
function bbp_reply_post_type() { |
| 38 | 38 | /** |
| 39 | 39 | * Return array of labels used by the reply post type |
| 40 | 40 | * |
| 41 | | * @since bbPress (r5129) |
| | 41 | * @since 2.5.0 bbPress (r5129) |
| 42 | 42 | * |
| 43 | 43 | * @return array |
| 44 | 44 | */ |
| … |
… |
function bbp_get_reply_post_type_labels() { |
| 65 | 65 | /** |
| 66 | 66 | * Return array of reply post type rewrite settings |
| 67 | 67 | * |
| 68 | | * @since bbPress (r5129) |
| | 68 | * @since 2.5.0 bbPress (r5129) |
| 69 | 69 | * |
| 70 | 70 | * @return array |
| 71 | 71 | */ |
| … |
… |
function bbp_get_reply_post_type_rewrite() { |
| 79 | 79 | /** |
| 80 | 80 | * Return array of features the reply post type supports |
| 81 | 81 | * |
| 82 | | * @since bbPress (rx5129) |
| | 82 | * @since 2.5.0 bbPress (r5129) |
| 83 | 83 | * |
| 84 | 84 | * @return array |
| 85 | 85 | */ |
| … |
… |
function bbp_get_reply_post_type_supports() { |
| 96 | 96 | /** |
| 97 | 97 | * The main reply loop. WordPress makes this easy for us |
| 98 | 98 | * |
| 99 | | * @since bbPress (r2553) |
| | 99 | * @since 2.0.0 bbPress (r2553) |
| 100 | 100 | * |
| 101 | 101 | * @param array $args All the arguments supported by {@link WP_Query} |
| 102 | 102 | * @uses bbp_show_lead_topic() Are we showing the topic as a lead? |
| … |
… |
function bbp_has_replies( $args = array() ) { |
| 285 | 285 | /** |
| 286 | 286 | * Whether there are more replies available in the loop |
| 287 | 287 | * |
| 288 | | * @since bbPress (r2553) |
| | 288 | * @since 2.0.0 bbPress (r2553) |
| 289 | 289 | * |
| 290 | 290 | * @uses WP_Query bbPress::reply_query::have_posts() To check if there are more |
| 291 | 291 | * replies available |
| … |
… |
function bbp_replies() { |
| 307 | 307 | /** |
| 308 | 308 | * Loads up the current reply in the loop |
| 309 | 309 | * |
| 310 | | * @since bbPress (r2553) |
| | 310 | * @since 2.0.0 bbPress (r2553) |
| 311 | 311 | * |
| 312 | 312 | * @uses WP_Query bbPress::reply_query::the_post() To get the current reply |
| 313 | 313 | * @return object Reply information |
| … |
… |
function bbp_the_reply() { |
| 319 | 319 | /** |
| 320 | 320 | * Output reply id |
| 321 | 321 | * |
| 322 | | * @since bbPress (r2553) |
| | 322 | * @since 2.0.0 bbPress (r2553) |
| 323 | 323 | * |
| 324 | 324 | * @param $reply_id Optional. Used to check emptiness |
| 325 | 325 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_id( $reply_id = 0 ) { |
| 330 | 330 | /** |
| 331 | 331 | * Return the id of the reply in a replies loop |
| 332 | 332 | * |
| 333 | | * @since bbPress (r2553) |
| | 333 | * @since 2.0.0 bbPress (r2553) |
| 334 | 334 | * |
| 335 | 335 | * @param $reply_id Optional. Used to check emptiness |
| 336 | 336 | * @uses bbPress::reply_query::post::ID To get the reply id |
| … |
… |
function bbp_reply_id( $reply_id = 0 ) { |
| 380 | 380 | /** |
| 381 | 381 | * Gets a reply |
| 382 | 382 | * |
| 383 | | * @since bbPress (r2787) |
| | 383 | * @since 2.0.0 bbPress (r2787) |
| 384 | 384 | * |
| 385 | 385 | * @param int|object $reply reply id or reply object |
| 386 | 386 | * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. Default = OBJECT |
| … |
… |
function bbp_get_reply( $reply, $output = OBJECT, $filter = 'raw' ) { |
| 423 | 423 | /** |
| 424 | 424 | * Output the link to the reply in the reply loop |
| 425 | 425 | * |
| 426 | | * @since bbPress (r2553) |
| | 426 | * @since 2.0.0 bbPress (r2553) |
| 427 | 427 | * |
| 428 | 428 | * @param int $reply_id Optional. Reply id |
| 429 | 429 | * @uses bbp_get_reply_permalink() To get the reply permalink |
| … |
… |
function bbp_reply_permalink( $reply_id = 0 ) { |
| 434 | 434 | /** |
| 435 | 435 | * Return the link to the reply |
| 436 | 436 | * |
| 437 | | * @since bbPress (r2553) |
| | 437 | * @since 2.0.0 bbPress (r2553) |
| 438 | 438 | * |
| 439 | 439 | * @param int $reply_id Optional. Reply id |
| 440 | 440 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_permalink( $reply_id = 0 ) { |
| 451 | 451 | /** |
| 452 | 452 | * Output the paginated url to the reply in the reply loop |
| 453 | 453 | * |
| 454 | | * @since bbPress (r2679) |
| | 454 | * @since 2.0.0 bbPress (r2679) |
| 455 | 455 | * |
| 456 | 456 | * @param int $reply_id Optional. Reply id |
| 457 | 457 | * @uses bbp_get_reply_url() To get the reply url |
| … |
… |
function bbp_reply_url( $reply_id = 0 ) { |
| 462 | 462 | /** |
| 463 | 463 | * Return the paginated url to the reply in the reply loop |
| 464 | 464 | * |
| 465 | | * @since bbPress (r2679) |
| | 465 | * @since 2.0.0 bbPress (r2679) |
| 466 | 466 | * |
| 467 | 467 | * @param int $reply_id Optional. Reply id |
| 468 | 468 | * @param string $redirect_to Optional. Pass a redirect value for use with |
| … |
… |
function bbp_reply_url( $reply_id = 0 ) { |
| 525 | 525 | /** |
| 526 | 526 | * Output the title of the reply |
| 527 | 527 | * |
| 528 | | * @since bbPress (r2553) |
| | 528 | * @since 2.0.0 bbPress (r2553) |
| 529 | 529 | * |
| 530 | 530 | * @param int $reply_id Optional. Reply id |
| 531 | 531 | * @uses bbp_get_reply_title() To get the reply title |
| … |
… |
function bbp_reply_title( $reply_id = 0 ) { |
| 537 | 537 | /** |
| 538 | 538 | * Return the title of the reply |
| 539 | 539 | * |
| 540 | | * @since bbPress (r2553) |
| | 540 | * @since 2.0.0 bbPress (r2553) |
| 541 | 541 | * |
| 542 | 542 | * @param int $reply_id Optional. Reply id |
| 543 | 543 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_title( $reply_id = 0 ) { |
| 555 | 555 | /** |
| 556 | 556 | * Get empty reply title fallback. |
| 557 | 557 | * |
| 558 | | * @since bbPress (r5177) |
| | 558 | * @since 2.5.0 bbPress (r5177) |
| 559 | 559 | * |
| 560 | 560 | * @param string $post_title Required. Reply Title |
| 561 | 561 | * @param int $post_id Required. Reply ID |
| … |
… |
function bbp_reply_title( $reply_id = 0 ) { |
| 582 | 582 | /** |
| 583 | 583 | * Output the content of the reply |
| 584 | 584 | * |
| 585 | | * @since bbPress (r2553) |
| | 585 | * @since 2.0.0 bbPress (r2553) |
| 586 | 586 | * |
| 587 | 587 | * @param int $reply_id Optional. reply id |
| 588 | 588 | * @uses bbp_get_reply_content() To get the reply content |
| … |
… |
function bbp_reply_content( $reply_id = 0 ) { |
| 593 | 593 | /** |
| 594 | 594 | * Return the content of the reply |
| 595 | 595 | * |
| 596 | | * @since bbPress (r2780) |
| | 596 | * @since 2.0.0 bbPress (r2780) |
| 597 | 597 | * |
| 598 | 598 | * @param int $reply_id Optional. reply id |
| 599 | 599 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_content( $reply_id = 0 ) { |
| 620 | 620 | /** |
| 621 | 621 | * Output the excerpt of the reply |
| 622 | 622 | * |
| 623 | | * @since bbPress (r2751) |
| | 623 | * @since 2.0.0 bbPress (r2751) |
| 624 | 624 | * |
| 625 | 625 | * @param int $reply_id Optional. Reply id |
| 626 | 626 | * @param int $length Optional. Length of the excerpt. Defaults to 100 letters |
| … |
… |
function bbp_reply_excerpt( $reply_id = 0, $length = 100 ) { |
| 632 | 632 | /** |
| 633 | 633 | * Return the excerpt of the reply |
| 634 | 634 | * |
| 635 | | * @since bbPress (r2751) |
| | 635 | * @since 2.0.0 bbPress (r2751) |
| 636 | 636 | * |
| 637 | 637 | * @param int $reply_id Optional. Reply id |
| 638 | 638 | * @param int $length Optional. Length of the excerpt. Defaults to 100 |
| … |
… |
function bbp_reply_excerpt( $reply_id = 0, $length = 100 ) { |
| 673 | 673 | /** |
| 674 | 674 | * Output the post date and time of a reply |
| 675 | 675 | * |
| 676 | | * @since bbPress (r4155) |
| | 676 | * @since 2.2.0 bbPress (r4155) |
| 677 | 677 | * |
| 678 | 678 | * @param int $reply_id Optional. Reply id. |
| 679 | 679 | * @param bool $humanize Optional. Humanize output using time_since |
| … |
… |
function bbp_reply_post_date( $reply_id = 0, $humanize = false, $gmt = false ) { |
| 686 | 686 | /** |
| 687 | 687 | * Return the post date and time of a reply |
| 688 | 688 | * |
| 689 | | * @since bbPress (r4155) |
| | 689 | * @since 2.2.0 bbPress (r4155) |
| 690 | 690 | * |
| 691 | 691 | * @param int $reply_id Optional. Reply id. |
| 692 | 692 | * @param bool $humanize Optional. Humanize output using time_since |
| … |
… |
function bbp_reply_post_date( $reply_id = 0, $humanize = false, $gmt = false ) { |
| 719 | 719 | /** |
| 720 | 720 | * Append revisions to the reply content |
| 721 | 721 | * |
| 722 | | * @since bbPress (r2782) |
| | 722 | * @since 2.0.0 bbPress (r2782) |
| 723 | 723 | * |
| 724 | 724 | * @param string $content Optional. Content to which we need to append the revisions to |
| 725 | 725 | * @param int $reply_id Optional. Reply id |
| … |
… |
function bbp_reply_content_append_revisions( $content = '', $reply_id = 0 ) { |
| 744 | 744 | /** |
| 745 | 745 | * Output the revision log of the reply |
| 746 | 746 | * |
| 747 | | * @since bbPress (r2782) |
| | 747 | * @since 2.0.0 bbPress (r2782) |
| 748 | 748 | * |
| 749 | 749 | * @param int $reply_id Optional. Reply id |
| 750 | 750 | * @uses bbp_get_reply_revision_log() To get the reply revision log |
| … |
… |
function bbp_reply_revision_log( $reply_id = 0 ) { |
| 755 | 755 | /** |
| 756 | 756 | * Return the formatted revision log of the reply |
| 757 | 757 | * |
| 758 | | * @since bbPress (r2782) |
| | 758 | * @since 2.0.0 bbPress (r2782) |
| 759 | 759 | * |
| 760 | 760 | * @param int $reply_id Optional. Reply id |
| 761 | 761 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_revision_log( $reply_id = 0 ) { |
| 826 | 826 | /** |
| 827 | 827 | * Return the raw revision log of the reply |
| 828 | 828 | * |
| 829 | | * @since bbPress (r2782) |
| | 829 | * @since 2.0.0 bbPress (r2782) |
| 830 | 830 | * |
| 831 | 831 | * @param int $reply_id Optional. Reply id |
| 832 | 832 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_revision_log( $reply_id = 0 ) { |
| 846 | 846 | /** |
| 847 | 847 | * Return the revisions of the reply |
| 848 | 848 | * |
| 849 | | * @since bbPress (r2782) |
| | 849 | * @since 2.0.0 bbPress (r2782) |
| 850 | 850 | * |
| 851 | 851 | * @param int $reply_id Optional. Reply id |
| 852 | 852 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_get_reply_revisions( $reply_id = 0 ) { |
| 865 | 865 | /** |
| 866 | 866 | * Return the revision count of the reply |
| 867 | 867 | * |
| 868 | | * @since bbPress (r2782) |
| | 868 | * @since 2.0.0 bbPress (r2782) |
| 869 | 869 | * |
| 870 | 870 | * @param int $reply_id Optional. Reply id |
| 871 | 871 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_get_reply_revision_count( $reply_id = 0, $integer = false ) { |
| 884 | 884 | /** |
| 885 | 885 | * Output the status of the reply |
| 886 | 886 | * |
| 887 | | * @since bbPress (r2667) |
| | 887 | * @since 2.0.0 bbPress (r2667) |
| 888 | 888 | * |
| 889 | 889 | * @param int $reply_id Optional. Reply id |
| 890 | 890 | * @uses bbp_get_reply_status() To get the reply status |
| … |
… |
function bbp_reply_status( $reply_id = 0 ) { |
| 895 | 895 | /** |
| 896 | 896 | * Return the status of the reply |
| 897 | 897 | * |
| 898 | | * @since bbPress (r2667) |
| | 898 | * @since 2.0.0 bbPress (r2667) |
| 899 | 899 | * |
| 900 | 900 | * @param int $reply_id Optional. Reply id |
| 901 | 901 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_status( $reply_id = 0 ) { |
| 911 | 911 | /** |
| 912 | 912 | * Is the reply not spam or deleted? |
| 913 | 913 | * |
| 914 | | * @since bbPress (r3496) |
| | 914 | * @since 2.0.0 bbPress (r3496) |
| 915 | 915 | * |
| 916 | 916 | * @param int $reply_id Optional. Topic id |
| 917 | 917 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_published( $reply_id = 0 ) { |
| 926 | 926 | /** |
| 927 | 927 | * Is the reply marked as spam? |
| 928 | 928 | * |
| 929 | | * @since bbPress (r2740) |
| | 929 | * @since 2.0.0 bbPress (r2740) |
| 930 | 930 | * |
| 931 | 931 | * @param int $reply_id Optional. Reply id |
| 932 | 932 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_spam( $reply_id = 0 ) { |
| 941 | 941 | /** |
| 942 | 942 | * Is the reply trashed? |
| 943 | 943 | * |
| 944 | | * @since bbPress (r2884) |
| | 944 | * @since 2.0.0 bbPress (r2884) |
| 945 | 945 | * |
| 946 | 946 | * @param int $reply_id Optional. Topic id |
| 947 | 947 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_trash( $reply_id = 0 ) { |
| 956 | 956 | /** |
| 957 | 957 | * Is the reply pending? |
| 958 | 958 | * |
| 959 | | * @since bbPress (r5507) |
| | 959 | * @since 2.6.0 bbPress (r5507) |
| 960 | 960 | * |
| 961 | 961 | * @param int $reply_id Optional. Topic id |
| 962 | 962 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_pending( $reply_id = 0 ) { |
| 972 | 972 | /** |
| 973 | 973 | * Is the reply private? |
| 974 | 974 | * |
| 975 | | * @since bbPress (r5507) |
| | 975 | * @since 2.6.0 bbPress (r5507) |
| 976 | 976 | * |
| 977 | 977 | * @param int $reply_id Optional. Topic id |
| 978 | 978 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_private( $reply_id = 0 ) { |
| 988 | 988 | /** |
| 989 | 989 | * Is the reply by an anonymous user? |
| 990 | 990 | * |
| 991 | | * @since bbPress (r2753) |
| | 991 | * @since 2.0.0 bbPress (r2753) |
| 992 | 992 | * |
| 993 | 993 | * @param int $reply_id Optional. Reply id |
| 994 | 994 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_is_reply_anonymous( $reply_id = 0 ) { |
| 1018 | 1018 | * |
| 1019 | 1019 | * Output the author of the reply |
| 1020 | 1020 | * |
| 1021 | | * @since bbPress (r2667) |
| 1022 | | * @deprecated bbPress (r5119) |
| | 1021 | * @since 2.0.0 bbPress (r2667) |
| | 1022 | * |
| | 1023 | * @deprecated 2.5.0 bbPress (r5119) |
| 1023 | 1024 | * |
| 1024 | 1025 | * @param int $reply_id Optional. Reply id |
| 1025 | 1026 | * @uses bbp_get_reply_author() To get the reply author |
| … |
… |
function bbp_reply_author( $reply_id = 0 ) { |
| 1032 | 1033 | * |
| 1033 | 1034 | * Return the author of the reply |
| 1034 | 1035 | * |
| 1035 | | * @since bbPress (r2667) |
| 1036 | | * @deprecated bbPress (r5119) |
| | 1036 | * @since 2.0.0 bbPress (r2667) |
| | 1037 | * |
| | 1038 | * @deprecated 2.5.0 bbPress (r5119) |
| 1037 | 1039 | * |
| 1038 | 1040 | * @param int $reply_id Optional. Reply id |
| 1039 | 1041 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author( $reply_id = 0 ) { |
| 1060 | 1062 | /** |
| 1061 | 1063 | * Output the author ID of the reply |
| 1062 | 1064 | * |
| 1063 | | * @since bbPress (r2667) |
| | 1065 | * @since 2.0.0 bbPress (r2667) |
| 1064 | 1066 | * |
| 1065 | 1067 | * @param int $reply_id Optional. Reply id |
| 1066 | 1068 | * @uses bbp_get_reply_author_id() To get the reply author id |
| … |
… |
function bbp_reply_author_id( $reply_id = 0 ) { |
| 1071 | 1073 | /** |
| 1072 | 1074 | * Return the author ID of the reply |
| 1073 | 1075 | * |
| 1074 | | * @since bbPress (r2667) |
| | 1076 | * @since 2.0.0 bbPress (r2667) |
| 1075 | 1077 | * |
| 1076 | 1078 | * @param int $reply_id Optional. Reply id |
| 1077 | 1079 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_id( $reply_id = 0 ) { |
| 1090 | 1092 | /** |
| 1091 | 1093 | * Output the author display_name of the reply |
| 1092 | 1094 | * |
| 1093 | | * @since bbPress (r2667) |
| | 1095 | * @since 2.0.0 bbPress (r2667) |
| 1094 | 1096 | * |
| 1095 | 1097 | * @param int $reply_id Optional. Reply id |
| 1096 | 1098 | * @uses bbp_get_reply_author_display_name() |
| … |
… |
function bbp_reply_author_display_name( $reply_id = 0 ) { |
| 1101 | 1103 | /** |
| 1102 | 1104 | * Return the author display_name of the reply |
| 1103 | 1105 | * |
| 1104 | | * @since bbPress (r2667) |
| | 1106 | * @since 2.0.0 bbPress (r2667) |
| 1105 | 1107 | * |
| 1106 | 1108 | * @param int $reply_id Optional. Reply id |
| 1107 | 1109 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_display_name( $reply_id = 0 ) { |
| 1152 | 1154 | /** |
| 1153 | 1155 | * Output the author avatar of the reply |
| 1154 | 1156 | * |
| 1155 | | * @since bbPress (r2667) |
| | 1157 | * @since 2.0.0 bbPress (r2667) |
| 1156 | 1158 | * |
| 1157 | 1159 | * @param int $reply_id Optional. Reply id |
| 1158 | 1160 | * @param int $size Optional. Size of the avatar. Defaults to 40 |
| … |
… |
function bbp_reply_author_avatar( $reply_id = 0, $size = 40 ) { |
| 1164 | 1166 | /** |
| 1165 | 1167 | * Return the author avatar of the reply |
| 1166 | 1168 | * |
| 1167 | | * @since bbPress (r2667) |
| | 1169 | * @since 2.0.0 bbPress (r2667) |
| 1168 | 1170 | * |
| 1169 | 1171 | * @param int $reply_id Optional. Reply id |
| 1170 | 1172 | * @param int $size Optional. Size of the avatar. Defaults to 40 |
| … |
… |
function bbp_reply_author_avatar( $reply_id = 0, $size = 40 ) { |
| 1197 | 1199 | /** |
| 1198 | 1200 | * Output the author link of the reply |
| 1199 | 1201 | * |
| 1200 | | * @since bbPress (r2717) |
| | 1202 | * @since 2.0.0 bbPress (r2717) |
| 1201 | 1203 | * |
| 1202 | 1204 | * @param array $args Optional. If it is an integer, it is used as reply id. |
| 1203 | 1205 | * @uses bbp_get_reply_author_link() To get the reply author link |
| … |
… |
function bbp_reply_author_link( $args = array() ) { |
| 1208 | 1210 | /** |
| 1209 | 1211 | * Return the author link of the reply |
| 1210 | 1212 | * |
| 1211 | | * @since bbPress (r2717) |
| | 1213 | * @since 2.0.0 bbPress (r2717) |
| 1212 | 1214 | * |
| 1213 | 1215 | * @param array $args Optional. If an integer, it is used as reply id. |
| 1214 | 1216 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_link( $args = array() ) { |
| 1307 | 1309 | /** |
| 1308 | 1310 | * Output the author url of the reply |
| 1309 | 1311 | * |
| 1310 | | * @since bbPress (r2667) |
| | 1312 | * @since 2.0.0 bbPress (r2667) |
| 1311 | 1313 | * |
| 1312 | 1314 | * @param int $reply_id Optional. Reply id |
| 1313 | 1315 | * @uses bbp_get_reply_author_url() To get the reply author url |
| … |
… |
function bbp_reply_author_url( $reply_id = 0 ) { |
| 1318 | 1320 | /** |
| 1319 | 1321 | * Return the author url of the reply |
| 1320 | 1322 | * |
| 1321 | | * @since bbPress (r2667) |
| | 1323 | * @since 2.0.0 bbPress (r2667) |
| 1322 | 1324 | * |
| 1323 | 1325 | * @param int $reply_id Optional. Reply id |
| 1324 | 1326 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_url( $reply_id = 0 ) { |
| 1351 | 1353 | /** |
| 1352 | 1354 | * Output the reply author email address |
| 1353 | 1355 | * |
| 1354 | | * @since bbPress (r3445) |
| | 1356 | * @since 2.0.0 bbPress (r3445) |
| 1355 | 1357 | * |
| 1356 | 1358 | * @param int $reply_id Optional. Reply id |
| 1357 | 1359 | * @uses bbp_get_reply_author_email() To get the reply author email |
| … |
… |
function bbp_reply_author_email( $reply_id = 0 ) { |
| 1362 | 1364 | /** |
| 1363 | 1365 | * Return the reply author email address |
| 1364 | 1366 | * |
| 1365 | | * @since bbPress (r3445) |
| | 1367 | * @since 2.0.0 bbPress (r3445) |
| 1366 | 1368 | * |
| 1367 | 1369 | * @param int $reply_id Optional. Reply id |
| 1368 | 1370 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_email( $reply_id = 0 ) { |
| 1404 | 1406 | /** |
| 1405 | 1407 | * Output the reply author role |
| 1406 | 1408 | * |
| 1407 | | * @since bbPress (r3860) |
| | 1409 | * @since 2.1.0 bbPress (r3860) |
| 1408 | 1410 | * |
| 1409 | 1411 | * @param array $args Optional. |
| 1410 | 1412 | * @uses bbp_get_reply_author_role() To get the reply author role |
| … |
… |
function bbp_reply_author_role( $args = array() ) { |
| 1415 | 1417 | /** |
| 1416 | 1418 | * Return the reply author role |
| 1417 | 1419 | * |
| 1418 | | * @since bbPress (r3860) |
| | 1420 | * @since 2.1.0 bbPress (r3860) |
| 1419 | 1421 | * |
| 1420 | 1422 | * @param array $args Optional. |
| 1421 | 1423 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_author_role( $args = array() ) { |
| 1454 | 1456 | /** |
| 1455 | 1457 | * Output the topic title a reply belongs to |
| 1456 | 1458 | * |
| 1457 | | * @since bbPress (r2553) |
| | 1459 | * @since 2.0.0 bbPress (r2553) |
| 1458 | 1460 | * |
| 1459 | 1461 | * @param int $reply_id Optional. Reply id |
| 1460 | 1462 | * @uses bbp_get_reply_topic_title() To get the reply topic title |
| … |
… |
function bbp_reply_topic_title( $reply_id = 0 ) { |
| 1465 | 1467 | /** |
| 1466 | 1468 | * Return the topic title a reply belongs to |
| 1467 | 1469 | * |
| 1468 | | * @since bbPress (r2553) |
| | 1470 | * @since 2.0.0 bbPress (r2553) |
| 1469 | 1471 | * |
| 1470 | 1472 | * @param int $reply_id Optional. Reply id |
| 1471 | 1473 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_topic_title( $reply_id = 0 ) { |
| 1485 | 1487 | /** |
| 1486 | 1488 | * Output the topic id a reply belongs to |
| 1487 | 1489 | * |
| 1488 | | * @since bbPress (r2553) |
| | 1490 | * @since 2.0.0 bbPress (r2553) |
| 1489 | 1491 | * |
| 1490 | 1492 | * @param int $reply_id Optional. Reply id |
| 1491 | 1493 | * @uses bbp_get_reply_topic_id() To get the reply topic id |
| … |
… |
function bbp_reply_topic_id( $reply_id = 0 ) { |
| 1496 | 1498 | /** |
| 1497 | 1499 | * Return the topic id a reply belongs to |
| 1498 | 1500 | * |
| 1499 | | * @since bbPress (r2553) |
| | 1501 | * @since 2.0.0 bbPress (r2553) |
| 1500 | 1502 | * |
| 1501 | 1503 | * @param int $reply_id Optional. Reply id |
| 1502 | 1504 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_topic_id( $reply_id = 0 ) { |
| 1526 | 1528 | /** |
| 1527 | 1529 | * Output the forum id a reply belongs to |
| 1528 | 1530 | * |
| 1529 | | * @since bbPress (r2679) |
| | 1531 | * @since 2.0.0 bbPress (r2679) |
| 1530 | 1532 | * |
| 1531 | 1533 | * @param int $reply_id Optional. Reply id |
| 1532 | 1534 | * @uses bbp_get_reply_forum_id() To get the reply forum id |
| … |
… |
function bbp_reply_forum_id( $reply_id = 0 ) { |
| 1537 | 1539 | /** |
| 1538 | 1540 | * Return the forum id a reply belongs to |
| 1539 | 1541 | * |
| 1540 | | * @since bbPress (r2679) |
| | 1542 | * @since 2.0.0 bbPress (r2679) |
| 1541 | 1543 | * |
| 1542 | 1544 | * @param int $reply_id Optional. Reply id |
| 1543 | 1545 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_forum_id( $reply_id = 0 ) { |
| 1566 | 1568 | /** |
| 1567 | 1569 | * Output the reply's ancestor reply id |
| 1568 | 1570 | * |
| 1569 | | * @since bbPress (r4944) |
| | 1571 | * @since 2.4.0 bbPress (r4944) |
| 1570 | 1572 | * |
| 1571 | 1573 | * @param int $reply_id Optional. Reply id |
| 1572 | 1574 | * @uses bbp_get_reply_ancestor_id() To get the reply's ancestor id |
| … |
… |
function bbp_reply_ancestor_id( $reply_id = 0 ) { |
| 1577 | 1579 | /** |
| 1578 | 1580 | * Return the reply's ancestor reply id |
| 1579 | 1581 | * |
| 1580 | | * @since bbPress (r4944) |
| | 1582 | * @since 2.4.0 bbPress (r4944) |
| 1581 | 1583 | * |
| 1582 | 1584 | * @param in $reply_id Reply id |
| 1583 | 1585 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_ancestor_id( $reply_id = 0 ) { |
| 1605 | 1607 | /** |
| 1606 | 1608 | * Output the reply to id of a reply |
| 1607 | 1609 | * |
| 1608 | | * @since bbPress (r4944) |
| | 1610 | * @since 2.4.0 bbPress (r4944) |
| 1609 | 1611 | * |
| 1610 | 1612 | * @param int $reply_id Optional. Reply id |
| 1611 | 1613 | * @uses bbp_get_reply_to() To get the reply to id |
| … |
… |
function bbp_reply_to( $reply_id = 0 ) { |
| 1616 | 1618 | /** |
| 1617 | 1619 | * Return the reply to id of a reply |
| 1618 | 1620 | * |
| 1619 | | * @since bbPress (r4944) |
| | 1621 | * @since 2.4.0 bbPress (r4944) |
| 1620 | 1622 | * |
| 1621 | 1623 | * @param int $reply_id Optional. Reply id |
| 1622 | 1624 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_to( $reply_id = 0 ) { |
| 1644 | 1646 | /** |
| 1645 | 1647 | * Output the link for the reply to |
| 1646 | 1648 | * |
| 1647 | | * @since bbPress (r4944) |
| | 1649 | * @since 2.4.0 bbPress (r4944) |
| 1648 | 1650 | * |
| 1649 | 1651 | * @param array $args |
| 1650 | 1652 | * @uses bbp_get_reply_to_link() To get the reply to link |
| … |
… |
function bbp_reply_to_link( $args = array() ) { |
| 1656 | 1658 | /** |
| 1657 | 1659 | * Return the link for a reply to a reply |
| 1658 | 1660 | * |
| 1659 | | * @since bbPress (r4944) |
| | 1661 | * @since 2.4.0 bbPress (r4944) |
| 1660 | 1662 | * |
| 1661 | 1663 | * @param array $args Arguments |
| 1662 | 1664 | * @uses bbp_current_user_can_access_create_reply_form() To check permissions |
| … |
… |
function bbp_reply_to_link( $args = array() ) { |
| 1722 | 1724 | /** |
| 1723 | 1725 | * Output the reply to a reply cancellation link |
| 1724 | 1726 | * |
| 1725 | | * @since bbPress (r4944) |
| | 1727 | * @since 2.4.0 bbPress (r4944) |
| 1726 | 1728 | * |
| 1727 | 1729 | * @uses bbp_get_cancel_reply_to_link() To get the reply cancellation link |
| 1728 | 1730 | */ |
| … |
… |
function bbp_cancel_reply_to_link( $text = '' ) { |
| 1732 | 1734 | /** |
| 1733 | 1735 | * Return the cancellation link for a reply to a reply |
| 1734 | 1736 | * |
| 1735 | | * @since bbPress (r4944) |
| | 1737 | * @since 2.4.0 bbPress (r4944) |
| 1736 | 1738 | * |
| 1737 | 1739 | * @param string $text The cancel text |
| 1738 | 1740 | * @uses apply_filters() Calls 'bbp_get_cancel_reply_to_link' with the cancellation |
| … |
… |
function bbp_cancel_reply_to_link( $text = '' ) { |
| 1764 | 1766 | /** |
| 1765 | 1767 | * Output the numeric position of a reply within a topic |
| 1766 | 1768 | * |
| 1767 | | * @since bbPress (r2984) |
| | 1769 | * @since 2.0.0 bbPress (r2984) |
| 1768 | 1770 | * |
| 1769 | 1771 | * @param int $reply_id Optional. Reply id |
| 1770 | 1772 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_reply_position( $reply_id = 0, $topic_id = 0 ) { |
| 1776 | 1778 | /** |
| 1777 | 1779 | * Return the numeric position of a reply within a topic |
| 1778 | 1780 | * |
| 1779 | | * @since bbPress (r2984) |
| | 1781 | * @since 2.0.0 bbPress (r2984) |
| 1780 | 1782 | * |
| 1781 | 1783 | * @param int $reply_id Optional. Reply id |
| 1782 | 1784 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_reply_position( $reply_id = 0, $topic_id = 0 ) { |
| 1830 | 1832 | /** |
| 1831 | 1833 | * Output admin links for reply |
| 1832 | 1834 | * |
| 1833 | | * @since bbPress (r2667) |
| | 1835 | * @since 2.0.0 bbPress (r2667) |
| 1834 | 1836 | * |
| 1835 | 1837 | * @param array $args See {@link bbp_get_reply_admin_links()} |
| 1836 | 1838 | * @uses bbp_get_reply_admin_links() To get the reply admin links |
| … |
… |
function bbp_reply_admin_links( $args = array() ) { |
| 1841 | 1843 | /** |
| 1842 | 1844 | * Return admin links for reply |
| 1843 | 1845 | * |
| 1844 | | * @since bbPress (r2667) |
| | 1846 | * @since 2.0.0 bbPress (r2667) |
| 1845 | 1847 | * |
| 1846 | 1848 | * @param array $args This function supports these arguments: |
| 1847 | 1849 | * - id: Optional. Reply id |
| … |
… |
function bbp_reply_admin_links( $args = array() ) { |
| 1930 | 1932 | /** |
| 1931 | 1933 | * Output the edit link of the reply |
| 1932 | 1934 | * |
| 1933 | | * @since bbPress (r2740) |
| | 1935 | * @since 2.0.0 bbPress (r2740) |
| 1934 | 1936 | * |
| 1935 | 1937 | * @param array $args See {@link bbp_get_reply_edit_link()} |
| 1936 | 1938 | * @uses bbp_get_reply_edit_link() To get the reply edit link |
| … |
… |
function bbp_reply_edit_link( $args = array() ) { |
| 1942 | 1944 | /** |
| 1943 | 1945 | * Return the edit link of the reply |
| 1944 | 1946 | * |
| 1945 | | * @since bbPress (r2740) |
| | 1947 | * @since 2.0.0 bbPress (r2740) |
| 1946 | 1948 | * |
| 1947 | 1949 | * @param array $args This function supports these arguments: |
| 1948 | 1950 | * - id: Reply id |
| … |
… |
function bbp_reply_edit_link( $args = array() ) { |
| 1995 | 1997 | /** |
| 1996 | 1998 | * Output URL to the reply edit page |
| 1997 | 1999 | * |
| 1998 | | * @since bbPress (r2753) |
| | 2000 | * @since 2.0.0 bbPress (r2753) |
| 1999 | 2001 | * |
| 2000 | 2002 | * @param int $reply_id Optional. Reply id |
| 2001 | 2003 | * @uses bbp_get_reply_edit_url() To get the reply edit url |
| … |
… |
function bbp_reply_edit_url( $reply_id = 0 ) { |
| 2006 | 2008 | /** |
| 2007 | 2009 | * Return URL to the reply edit page |
| 2008 | 2010 | * |
| 2009 | | * @since bbPress (r2753) |
| | 2011 | * @since 2.0.0 bbPress (r2753) |
| 2010 | 2012 | * |
| 2011 | 2013 | * @param int $reply_id Optional. Reply id |
| 2012 | 2014 | * @uses bbp_get_reply_id() To get the reply id |
| … |
… |
function bbp_reply_edit_url( $reply_id = 0 ) { |
| 2048 | 2050 | /** |
| 2049 | 2051 | * Output the trash link of the reply |
| 2050 | 2052 | * |
| 2051 | | * @since bbPress (r2740) |
| | 2053 | * @since 2.0.0 bbPress (r2740) |
| 2052 | 2054 | * |
| 2053 | 2055 | * @param array $args See {@link bbp_get_reply_trash_link()} |
| 2054 | 2056 | * @uses bbp_get_reply_trash_link() To get the reply trash link |
| … |
… |
function bbp_reply_trash_link( $args = array() ) { |
| 2060 | 2062 | /** |
| 2061 | 2063 | * Return the trash link of the reply |
| 2062 | 2064 | * |
| 2063 | | * @since bbPress (r2740) |
| | 2065 | * @since 2.0.0 bbPress (r2740) |
| 2064 | 2066 | * |
| 2065 | 2067 | * @param array $args This function supports these arguments: |
| 2066 | 2068 | * - id: Reply id |
| … |
… |
function bbp_reply_trash_link( $args = array() ) { |
| 2124 | 2126 | /** |
| 2125 | 2127 | * Output the spam link of the reply |
| 2126 | 2128 | * |
| 2127 | | * @since bbPress (r2740) |
| | 2129 | * @since 2.0.0 bbPress (r2740) |
| 2128 | 2130 | * |
| 2129 | 2131 | * @param array $args See {@link bbp_get_reply_spam_link()} |
| 2130 | 2132 | * @uses bbp_get_reply_spam_link() To get the reply spam link |
| … |
… |
function bbp_reply_spam_link( $args = array() ) { |
| 2136 | 2138 | /** |
| 2137 | 2139 | * Return the spam link of the reply |
| 2138 | 2140 | * |
| 2139 | | * @since bbPress (r2740) |
| | 2141 | * @since 2.0.0 bbPress (r2740) |
| 2140 | 2142 | * |
| 2141 | 2143 | * @param array $args This function supports these arguments: |
| 2142 | 2144 | * - id: Reply id |
| … |
… |
function bbp_reply_spam_link( $args = array() ) { |
| 2187 | 2189 | * |
| 2188 | 2190 | * Output the move link of the reply |
| 2189 | 2191 | * |
| 2190 | | * @since bbPress (r4521) |
| | 2192 | * @since 2.3.0 bbPress (r4521) |
| 2191 | 2193 | * |
| 2192 | 2194 | * @param array $args See {@link bbp_get_reply_move_link()} |
| 2193 | 2195 | * @uses bbp_get_reply_move_link() To get the reply move link |
| … |
… |
function bbp_reply_move_link( $args = array() ) { |
| 2201 | 2203 | * |
| 2202 | 2204 | * Return the move link of the reply |
| 2203 | 2205 | * |
| 2204 | | * @since bbPress (r4521) |
| | 2206 | * @since 2.3.0 bbPress (r4521) |
| 2205 | 2207 | * |
| 2206 | 2208 | * @param array $args This function supports these arguments: |
| 2207 | 2209 | * - id: Reply id |
| … |
… |
function bbp_reply_move_link( $args = array() ) { |
| 2255 | 2257 | * |
| 2256 | 2258 | * Output the split link of the topic (but is bundled with each reply) |
| 2257 | 2259 | * |
| 2258 | | * @since bbPress (r2756) |
| | 2260 | * @since 2.0.0 bbPress (r2756) |
| 2259 | 2261 | * |
| 2260 | 2262 | * @param array $args See {@link bbp_get_topic_split_link()} |
| 2261 | 2263 | * @uses bbp_get_topic_split_link() To get the topic split link |
| … |
… |
function bbp_topic_split_link( $args = array() ) { |
| 2269 | 2271 | * |
| 2270 | 2272 | * Return the split link of the topic (but is bundled with each reply) |
| 2271 | 2273 | * |
| 2272 | | * @since bbPress (r2756) |
| | 2274 | * @since 2.0.0 bbPress (r2756) |
| 2273 | 2275 | * |
| 2274 | 2276 | * @param array $args This function supports these arguments: |
| 2275 | 2277 | * - id: Reply id |
| … |
… |
function bbp_topic_split_link( $args = array() ) { |
| 2321 | 2323 | /** |
| 2322 | 2324 | * Output the approve link of the reply |
| 2323 | 2325 | * |
| 2324 | | * @since bbPress (r5507) |
| | 2326 | * @since 2.6.0 bbPress (r5507) |
| 2325 | 2327 | * |
| 2326 | 2328 | * @param array $args See {@link bbp_get_reply_approve_link()} |
| 2327 | 2329 | * @uses bbp_get_reply_approve_link() To get the reply approve link |
| … |
… |
function bbp_reply_approve_link( $args = array() ) { |
| 2333 | 2335 | /** |
| 2334 | 2336 | * Return the approve link of the reply |
| 2335 | 2337 | * |
| 2336 | | * @since bbPress (r5507) |
| | 2338 | * @since 2.6.0 bbPress (r5507) |
| 2337 | 2339 | * |
| 2338 | 2340 | * @param array $args This function supports these args: |
| 2339 | 2341 | * - id: Optional. Reply id |
| … |
… |
function bbp_reply_approve_link( $args = array() ) { |
| 2382 | 2384 | /** |
| 2383 | 2385 | * Output the row class of a reply |
| 2384 | 2386 | * |
| 2385 | | * @since bbPress (r2678) |
| | 2387 | * @since 2.0.0 bbPress (r2678) |
| 2386 | 2388 | * |
| 2387 | 2389 | * @param int $reply_id Optional. Reply ID |
| 2388 | 2390 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_reply_class( $reply_id = 0, $classes = array() ) { |
| 2394 | 2396 | /** |
| 2395 | 2397 | * Return the row class of a reply |
| 2396 | 2398 | * |
| 2397 | | * @since bbPress (r2678) |
| | 2399 | * @since 2.0.0 bbPress (r2678) |
| 2398 | 2400 | * |
| 2399 | 2401 | * @param int $reply_id Optional. Reply ID |
| 2400 | 2402 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_reply_class( $reply_id = 0, $classes = array() ) { |
| 2427 | 2429 | /** |
| 2428 | 2430 | * Output the topic pagination count |
| 2429 | 2431 | * |
| 2430 | | * @since bbPress (r2519) |
| | 2432 | * @since 2.0.0 bbPress (r2519) |
| 2431 | 2433 | * |
| 2432 | 2434 | * @uses bbp_get_topic_pagination_count() To get the topic pagination count |
| 2433 | 2435 | */ |
| … |
… |
function bbp_topic_pagination_count() { |
| 2437 | 2439 | /** |
| 2438 | 2440 | * Return the topic pagination count |
| 2439 | 2441 | * |
| 2440 | | * @since bbPress (r2519) |
| | 2442 | * @since 2.0.0 bbPress (r2519) |
| 2441 | 2443 | * |
| 2442 | 2444 | * @uses bbp_number_format() To format the number value |
| 2443 | 2445 | * @uses bbp_show_lead_topic() Are we showing the topic as a lead? |
| … |
… |
function bbp_topic_pagination_count() { |
| 2500 | 2502 | /** |
| 2501 | 2503 | * Output topic pagination links |
| 2502 | 2504 | * |
| 2503 | | * @since bbPress (r2519) |
| | 2505 | * @since 2.0.0 bbPress (r2519) |
| 2504 | 2506 | * |
| 2505 | 2507 | * @uses bbp_get_topic_pagination_links() To get the topic pagination links |
| 2506 | 2508 | */ |
| … |
… |
function bbp_topic_pagination_links() { |
| 2510 | 2512 | /** |
| 2511 | 2513 | * Return topic pagination links |
| 2512 | 2514 | * |
| 2513 | | * @since bbPress (r2519) |
| | 2515 | * @since 2.0.0 bbPress (r2519) |
| 2514 | 2516 | * |
| 2515 | 2517 | * @uses apply_filters() Calls 'bbp_get_topic_pagination_links' with the |
| 2516 | 2518 | * pagination links |
| … |
… |
function bbp_topic_pagination_links() { |
| 2531 | 2533 | /** |
| 2532 | 2534 | * Output the value of reply content field |
| 2533 | 2535 | * |
| 2534 | | * @since bbPress (r31301) |
| | 2536 | * @since 2.0.0 bbPress (r3130) |
| 2535 | 2537 | * |
| 2536 | 2538 | * @uses bbp_get_form_reply_content() To get value of reply content field |
| 2537 | 2539 | */ |
| … |
… |
function bbp_form_reply_content() { |
| 2541 | 2543 | /** |
| 2542 | 2544 | * Return the value of reply content field |
| 2543 | 2545 | * |
| 2544 | | * @since bbPress (r31301) |
| | 2546 | * @since 2.0.0 bbPress (r3130) |
| 2545 | 2547 | * |
| 2546 | 2548 | * @uses bbp_is_reply_edit() To check if it's the reply edit page |
| 2547 | 2549 | * @uses apply_filters() Calls 'bbp_get_form_reply_content' with the content |
| … |
… |
function bbp_form_reply_content() { |
| 2568 | 2570 | /** |
| 2569 | 2571 | * Output the value of the reply to field |
| 2570 | 2572 | * |
| 2571 | | * @since bbPress (r4944) |
| | 2573 | * @since 2.4.0 bbPress (r4944) |
| 2572 | 2574 | * |
| 2573 | 2575 | * @uses bbp_get_form_reply_to() To get value of the reply to field |
| 2574 | 2576 | */ |
| … |
… |
function bbp_form_reply_to() { |
| 2579 | 2581 | /** |
| 2580 | 2582 | * Return the value of reply to field |
| 2581 | 2583 | * |
| 2582 | | * @since bbPress (r4944) |
| | 2584 | * @since 2.4.0 bbPress (r4944) |
| 2583 | 2585 | * |
| 2584 | 2586 | * @uses bbp_get_reply_id() To validate the reply to |
| 2585 | 2587 | * @uses apply_filters() Calls 'bbp_get_form_reply_to' with the reply to |
| … |
… |
function bbp_form_reply_to() { |
| 2607 | 2609 | * Output a select box allowing to pick which reply an existing hierarchical |
| 2608 | 2610 | * reply belongs to. |
| 2609 | 2611 | * |
| 2610 | | * @since bbPress (r5387) |
| | 2612 | * @since 2.6.0 bbPress (r5387) |
| 2611 | 2613 | * |
| 2612 | 2614 | * @param int $reply_id |
| 2613 | 2615 | */ |
| … |
… |
function bbp_reply_to_dropdown( $reply_id = 0 ) { |
| 2617 | 2619 | /** |
| 2618 | 2620 | * Return a select box allowing to pick which topic/reply a reply belongs. |
| 2619 | 2621 | * |
| 2620 | | * @since bbPress (r5387) |
| | 2622 | * @since 2.6.0 bbPress (r5387) |
| 2621 | 2623 | * |
| 2622 | 2624 | * @param int $reply_id |
| 2623 | 2625 | * |
| … |
… |
function bbp_reply_to_dropdown( $reply_id = 0 ) { |
| 2691 | 2693 | /** |
| 2692 | 2694 | * Output checked value of reply log edit field |
| 2693 | 2695 | * |
| 2694 | | * @since bbPress (r31301) |
| | 2696 | * @since 2.0.0 bbPress (r3130) |
| 2695 | 2697 | * |
| 2696 | 2698 | * @uses bbp_get_form_reply_log_edit() To get the reply log edit value |
| 2697 | 2699 | */ |
| … |
… |
function bbp_form_reply_log_edit() { |
| 2701 | 2703 | /** |
| 2702 | 2704 | * Return checked value of reply log edit field |
| 2703 | 2705 | * |
| 2704 | | * @since bbPress (r31301) |
| | 2706 | * @since 2.0.0 bbPress (r3130) |
| 2705 | 2707 | * |
| 2706 | 2708 | * @uses apply_filters() Calls 'bbp_get_form_reply_log_edit' with the |
| 2707 | 2709 | * log edit value |
| … |
… |
function bbp_form_reply_log_edit() { |
| 2727 | 2729 | /** |
| 2728 | 2730 | * Output the value of the reply edit reason |
| 2729 | 2731 | * |
| 2730 | | * @since bbPress (r31301) |
| | 2732 | * @since 2.0.0 bbPress (r3130) |
| 2731 | 2733 | * |
| 2732 | 2734 | * @uses bbp_get_form_reply_edit_reason() To get the reply edit reason value |
| 2733 | 2735 | */ |
| … |
… |
function bbp_form_reply_edit_reason() { |
| 2737 | 2739 | /** |
| 2738 | 2740 | * Return the value of the reply edit reason |
| 2739 | 2741 | * |
| 2740 | | * @since bbPress (r31301) |
| | 2742 | * @since 2.0.0 bbPress (r3130) |
| 2741 | 2743 | * |
| 2742 | 2744 | * @uses apply_filters() Calls 'bbp_get_form_reply_edit_reason' with the |
| 2743 | 2745 | * reply edit reason value |
| … |
… |
function bbp_form_reply_edit_reason() { |
| 2760 | 2762 | /** |
| 2761 | 2763 | * Output value reply status dropdown |
| 2762 | 2764 | * |
| 2763 | | * @since bbPress (r5399) |
| | 2765 | * @since 2.6.0 bbPress (r5399) |
| 2764 | 2766 | * |
| 2765 | 2767 | * @param $args This function supports these arguments: |
| 2766 | 2768 | * - select_id: Select id. Defaults to bbp_reply_status |
| … |
… |
function bbp_form_reply_status_dropdown( $args = array() ) { |
| 2778 | 2780 | * capability. Because of this, no additional capablitiy checks are performed |
| 2779 | 2781 | * within this function to check available reply statuses. |
| 2780 | 2782 | * |
| 2781 | | * @since bbPress (r5399) |
| | 2783 | * @since 2.6.0 bbPress (r5399) |
| 2782 | 2784 | * |
| 2783 | 2785 | * @param $args This function supports these arguments: |
| 2784 | 2786 | * - select_id: Select id. Defaults to bbp_reply_status |
| … |
… |
function bbp_form_reply_status_dropdown( $args = array() ) { |
| 2849 | 2851 | * |
| 2850 | 2852 | * @see bbp_reply_form_fields() |
| 2851 | 2853 | * |
| 2852 | | * @since bbPress (r5558) |
| | 2854 | * @since 2.6.0 bbPress (r5558) |
| | 2855 | * |
| 2853 | 2856 | * @return boolean True if is a post request with valid nonce |
| 2854 | 2857 | */ |
| 2855 | 2858 | function bbp_is_reply_form_post_request() { |
-
diff --git src/includes/search/functions.php src/includes/search/functions.php
index 0187a11..760fa9f 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Run the search query |
| 17 | 17 | * |
| 18 | | * @since bbPress (r4579) |
| | 18 | * @since 2.3.0 bbPress (r4579) |
| 19 | 19 | * |
| 20 | 20 | * @param mixed $new_args New arguments |
| 21 | 21 | * @uses bbp_get_search_query_args() To get the search query args |
| … |
… |
function bbp_search_query( $new_args = array() ) { |
| 40 | 40 | /** |
| 41 | 41 | * Return the search's query args |
| 42 | 42 | * |
| 43 | | * @since bbPress (r4579) |
| | 43 | * @since 2.3.0 bbPress (r4579) |
| 44 | 44 | * |
| 45 | 45 | * @uses bbp_get_search_terms() To get the search terms |
| 46 | 46 | * @return array Query arguments |
| … |
… |
function bbp_get_search_query_args() { |
| 57 | 57 | /** |
| 58 | 58 | * Redirect to search results page if needed |
| 59 | 59 | * |
| 60 | | * @since bbPress (r4928) |
| | 60 | * @since 2.4.0 bbPress (r4928) |
| 61 | 61 | * |
| 62 | 62 | * @return If a redirect is not needed |
| 63 | 63 | */ |
-
diff --git src/includes/search/template.php src/includes/search/template.php
index 02c3cb1..25e4de3 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * The main search loop. WordPress does the heavy lifting. |
| 17 | 17 | * |
| 18 | | * @since bbPress (r4579) |
| | 18 | * @since 2.3.0 bbPress (r4579) |
| 19 | 19 | * |
| 20 | 20 | * @param array $args All the arguments supported by {@link WP_Query} |
| 21 | 21 | * @uses bbp_get_view_all() Are we showing all results? |
| … |
… |
function bbp_has_search_results( $args = array() ) { |
| 166 | 166 | /** |
| 167 | 167 | * Whether there are more search results available in the loop |
| 168 | 168 | * |
| 169 | | * @since bbPress (r4579) |
| | 169 | * @since 2.3.0 bbPress (r4579) |
| 170 | 170 | * |
| 171 | 171 | * @uses WP_Query bbPress::search_query::have_posts() To check if there are more |
| 172 | 172 | * search results available |
| … |
… |
function bbp_search_results() { |
| 188 | 188 | /** |
| 189 | 189 | * Loads up the current search result in the loop |
| 190 | 190 | * |
| 191 | | * @since bbPress (r4579) |
| | 191 | * @since 2.3.0 bbPress (r4579) |
| 192 | 192 | * |
| 193 | 193 | * @uses WP_Query bbPress::search_query::the_post() To get the current search result |
| 194 | 194 | * @return object Search information |
| … |
… |
function bbp_the_search_result() { |
| 207 | 207 | /** |
| 208 | 208 | * Output the search page title |
| 209 | 209 | * |
| 210 | | * @since bbPress (r4579) |
| | 210 | * @since 2.3.0 bbPress (r4579) |
| 211 | 211 | * |
| 212 | 212 | * @uses bbp_get_search_title() |
| 213 | 213 | */ |
| … |
… |
function bbp_search_title() { |
| 218 | 218 | /** |
| 219 | 219 | * Get the search page title |
| 220 | 220 | * |
| 221 | | * @since bbPress (r4579) |
| | 221 | * @since 2.3.0 bbPress (r4579) |
| 222 | 222 | * |
| 223 | 223 | * @uses bbp_get_search_terms() |
| 224 | 224 | */ |
| … |
… |
function bbp_search_title() { |
| 242 | 242 | /** |
| 243 | 243 | * Output the search url |
| 244 | 244 | * |
| 245 | | * @since bbPress (r4579) |
| | 245 | * @since 2.3.0 bbPress (r4579) |
| 246 | 246 | * |
| 247 | 247 | * @uses bbp_get_search_url() To get the search url |
| 248 | 248 | */ |
| … |
… |
function bbp_search_url() { |
| 252 | 252 | /** |
| 253 | 253 | * Return the search url |
| 254 | 254 | * |
| 255 | | * @since bbPress (r4579) |
| | 255 | * @since 2.3.0 bbPress (r4579) |
| 256 | 256 | * |
| 257 | 257 | * @uses user_trailingslashit() To fix slashes |
| 258 | 258 | * @uses trailingslashit() To fix slashes |
| … |
… |
function bbp_search_url() { |
| 282 | 282 | /** |
| 283 | 283 | * Output the search results url |
| 284 | 284 | * |
| 285 | | * @since bbPress (r4928) |
| | 285 | * @since 2.4.0 bbPress (r4928) |
| 286 | 286 | * |
| 287 | 287 | * @uses bbp_get_search_url() To get the search url |
| 288 | 288 | */ |
| … |
… |
function bbp_search_results_url() { |
| 292 | 292 | /** |
| 293 | 293 | * Return the search url |
| 294 | 294 | * |
| 295 | | * @since bbPress (r4928) |
| | 295 | * @since 2.4.0 bbPress (r4928) |
| 296 | 296 | * |
| 297 | 297 | * @uses user_trailingslashit() To fix slashes |
| 298 | 298 | * @uses trailingslashit() To fix slashes |
| … |
… |
function bbp_search_results_url() { |
| 334 | 334 | /** |
| 335 | 335 | * Output the search terms |
| 336 | 336 | * |
| 337 | | * @since bbPress (r4579) |
| | 337 | * @since 2.3.0 bbPress (r4579) |
| 338 | 338 | * |
| 339 | 339 | * @param string $search_terms Optional. Search terms |
| 340 | 340 | * @uses bbp_get_search_terms() To get the search terms |
| … |
… |
function bbp_search_terms( $search_terms = '' ) { |
| 346 | 346 | /** |
| 347 | 347 | * Get the search terms |
| 348 | 348 | * |
| 349 | | * @since bbPress (r4579) |
| | 349 | * @since 2.3.0 bbPress (r4579) |
| 350 | 350 | * |
| 351 | 351 | * If search terms are supplied, those are used. Otherwise check the |
| 352 | 352 | * search rewrite id query var. |
| … |
… |
function bbp_search_terms( $search_terms = '' ) { |
| 376 | 376 | /** |
| 377 | 377 | * Output the search result pagination count |
| 378 | 378 | * |
| 379 | | * @since bbPress (r4579) |
| | 379 | * @since 2.3.0 bbPress (r4579) |
| 380 | 380 | * |
| 381 | 381 | * @uses bbp_get_search_pagination_count() To get the search result pagination count |
| 382 | 382 | */ |
| … |
… |
function bbp_search_pagination_count() { |
| 387 | 387 | /** |
| 388 | 388 | * Return the search results pagination count |
| 389 | 389 | * |
| 390 | | * @since bbPress (r4579) |
| | 390 | * @since 2.3.0 bbPress (r4579) |
| 391 | 391 | * |
| 392 | 392 | * @uses bbp_number_format() To format the number value |
| 393 | 393 | * @uses apply_filters() Calls 'bbp_get_search_pagination_count' with the |
| … |
… |
function bbp_search_pagination_count() { |
| 424 | 424 | /** |
| 425 | 425 | * Output search pagination links |
| 426 | 426 | * |
| 427 | | * @since bbPress (r4579) |
| | 427 | * @since 2.3.0 bbPress (r4579) |
| 428 | 428 | * |
| 429 | 429 | * @uses bbp_get_search_pagination_links() To get the search pagination links |
| 430 | 430 | */ |
| … |
… |
function bbp_search_pagination_links() { |
| 435 | 435 | /** |
| 436 | 436 | * Return search pagination links |
| 437 | 437 | * |
| 438 | | * @since bbPress (r4579) |
| | 438 | * @since 2.3.0 bbPress (r4579) |
| 439 | 439 | * |
| 440 | 440 | * @uses apply_filters() Calls 'bbp_get_search_pagination_links' with the |
| 441 | 441 | * pagination links |
-
diff --git src/includes/topics/capabilities.php src/includes/topics/capabilities.php
index e3c5022..99d949d 100644
|
|
|
|
| 12 | 12 | /** |
| 13 | 13 | * Return topic capabilities |
| 14 | 14 | * |
| 15 | | * @since bbPress (r2593) |
| | 15 | * @since 2.0.0 bbPress (r2593) |
| 16 | 16 | * |
| 17 | 17 | * @uses apply_filters() Calls 'bbp_get_topic_caps' with the capabilities |
| 18 | 18 | * @return array Topic capabilities |
| … |
… |
function bbp_get_topic_caps() { |
| 32 | 32 | /** |
| 33 | 33 | * Return topic tag capabilities |
| 34 | 34 | * |
| 35 | | * @since bbPress (r2593) |
| | 35 | * @since 2.0.0 bbPress (r2593) |
| 36 | 36 | * |
| 37 | 37 | * @uses apply_filters() Calls 'bbp_get_topic_tag_caps' with the capabilities |
| 38 | 38 | * @return array Topic tag capabilities |
| … |
… |
function bbp_get_topic_tag_caps() { |
| 49 | 49 | /** |
| 50 | 50 | * Maps topic capabilities |
| 51 | 51 | * |
| 52 | | * @since bbPress (r4242) |
| | 52 | * @since 2.2.0 bbPress (r4242) |
| 53 | 53 | * |
| 54 | 54 | * @param array $caps Capabilities for meta capability |
| 55 | 55 | * @param string $cap Capability name |
| … |
… |
function bbp_map_topic_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg |
| 223 | 223 | /** |
| 224 | 224 | * Maps topic tag capabilities |
| 225 | 225 | * |
| 226 | | * @since bbPress (r4242) |
| | 226 | * @since 2.2.0 bbPress (r4242) |
| 227 | 227 | * |
| 228 | 228 | * @param array $caps Capabilities for meta capability |
| 229 | 229 | * @param string $cap Capability name |
-
diff --git src/includes/topics/functions.php src/includes/topics/functions.php
index 75f79b5..d5eca39 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 16 | 16 | * A wrapper for wp_insert_post() that also includes the necessary meta values |
| 17 | 17 | * for the topic to function properly. |
| 18 | 18 | * |
| 19 | | * @since bbPress (r3349) |
| | 19 | * @since 2.0.0 bbPress (r3349) |
| 20 | 20 | * |
| 21 | 21 | * @uses bbp_parse_args() |
| 22 | 22 | * @uses bbp_get_topic_post_type() |
| … |
… |
function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = false |
| 935 | 935 | * manual queries against the database to get their results. As such, this |
| 936 | 936 | * function can be costly to run but is necessary to keep everything accurate. |
| 937 | 937 | * |
| 938 | | * @since bbPress (r2800) |
| | 938 | * @since 2.0.0 bbPress (r2800) |
| | 939 | * |
| 939 | 940 | * @param int $topic_id Topic id |
| 940 | 941 | * @param string $last_active_time Optional. Last active time |
| 941 | 942 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) { |
| 1139 | 1140 | * |
| 1140 | 1141 | * Handles the front end merge topic submission |
| 1141 | 1142 | * |
| 1142 | | * @since bbPress (r2756) |
| | 1143 | * @since 2.0.0 bbPress (r2756) |
| 1143 | 1144 | * |
| 1144 | 1145 | * @param string $action The requested action to compare this function to |
| 1145 | 1146 | * @uses bbp_add_error() To add an error message |
| … |
… |
function bbp_merge_topic_handler( $action = '' ) { |
| 1393 | 1394 | * When a topic is merged, update the counts of source and destination topic |
| 1394 | 1395 | * and their forums. |
| 1395 | 1396 | * |
| 1396 | | * @since bbPress (r2756) |
| | 1397 | * @since 2.0.0 bbPress (r2756) |
| 1397 | 1398 | * |
| 1398 | 1399 | * @param int $destination_topic_id Destination topic id |
| 1399 | 1400 | * @param int $source_topic_id Source topic id |
| … |
… |
function bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source |
| 1436 | 1437 | * |
| 1437 | 1438 | * Handles the front end split topic submission |
| 1438 | 1439 | * |
| 1439 | | * @since bbPress (r2756) |
| | 1440 | * @since 2.0.0 bbPress (r2756) |
| 1440 | 1441 | * |
| 1441 | 1442 | * @param string $action The requested action to compare this function to |
| 1442 | 1443 | * @uses bbp_add_error() To add an error message |
| … |
… |
function bbp_split_topic_handler( $action = '' ) { |
| 1773 | 1774 | * When a topic is split, update the counts of source and destination topic |
| 1774 | 1775 | * and their forums. |
| 1775 | 1776 | * |
| 1776 | | * @since bbPress (r2756) |
| | 1777 | * @since 2.0.0 bbPress (r2756) |
| 1777 | 1778 | * |
| 1778 | 1779 | * @param int $from_reply_id From reply id |
| 1779 | 1780 | * @param int $source_topic_id Source topic id |
| … |
… |
function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_t |
| 1813 | 1814 | /** |
| 1814 | 1815 | * Handles the front end tag management (renaming, merging, destroying) |
| 1815 | 1816 | * |
| 1816 | | * @since bbPress (r2768) |
| | 1817 | * @since 2.0.0 bbPress (r2768) |
| 1817 | 1818 | * |
| 1818 | 1819 | * @param string $action The requested action to compare this function to |
| 1819 | 1820 | * @uses bbp_verify_nonce_request() To verify the nonce and check the request |
| … |
… |
function bbp_edit_topic_tag_handler( $action = '' ) { |
| 2004 | 2005 | /** |
| 2005 | 2006 | * Return an associative array of available topic statuses |
| 2006 | 2007 | * |
| 2007 | | * @since bbPress (r5059) |
| | 2008 | * @since 2.4.0 bbPress (r5059) |
| 2008 | 2009 | * |
| 2009 | 2010 | * @return array |
| 2010 | 2011 | */ |
| … |
… |
function bbp_get_topic_statuses() { |
| 2021 | 2022 | /** |
| 2022 | 2023 | * Return an associative array of topic sticky types |
| 2023 | 2024 | * |
| 2024 | | * @since bbPress (r5059) |
| | 2025 | * @since 2.4.0 bbPress (r5059) |
| 2025 | 2026 | * |
| 2026 | 2027 | * @return array |
| 2027 | 2028 | */ |
| … |
… |
function bbp_get_topic_types() { |
| 2038 | 2039 | /** |
| 2039 | 2040 | * Return sticky topics of a forum |
| 2040 | 2041 | * |
| 2041 | | * @since bbPress (r2592) |
| | 2042 | * @since 2.0.0 bbPress (r2592) |
| 2042 | 2043 | * |
| 2043 | 2044 | * @param int $forum_id Optional. If not passed, super stickies are returned. |
| 2044 | 2045 | * @uses bbp_get_super_stickies() To get the super stickies |
| … |
… |
function bbp_get_stickies( $forum_id = 0 ) { |
| 2056 | 2057 | /** |
| 2057 | 2058 | * Return topics stuck to front page of the forums |
| 2058 | 2059 | * |
| 2059 | | * @since bbPress (r2592) |
| | 2060 | * @since 2.0.0 bbPress (r2592) |
| 2060 | 2061 | * |
| 2061 | 2062 | * @uses get_option() To get super sticky topics |
| 2062 | 2063 | * @uses apply_filters() Calls 'bbp_get_super_stickies' with the stickies |
| … |
… |
function bbp_get_super_stickies() { |
| 2075 | 2076 | * Handles the front end opening/closing, spamming/unspamming, |
| 2076 | 2077 | * sticking/unsticking and trashing/untrashing/deleting of topics |
| 2077 | 2078 | * |
| 2078 | | * @since bbPress (r2727) |
| | 2079 | * @since 2.0.0 bbPress (r2727) |
| 2079 | 2080 | * |
| 2080 | 2081 | * @param string $action The requested action to compare this function to |
| 2081 | 2082 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_toggle_topic_handler( $action = '' ) { |
| 2257 | 2258 | /** |
| 2258 | 2259 | * Remove a deleted topic from all users' favorites |
| 2259 | 2260 | * |
| 2260 | | * @since bbPress (r2652) |
| | 2261 | * @since 2.0.0 bbPress (r2652) |
| 2261 | 2262 | * |
| 2262 | 2263 | * @param int $topic_id Get the topic id to remove |
| 2263 | 2264 | * @uses bbp_get_topic_id To get the topic id |
| … |
… |
function bbp_remove_topic_from_all_favorites( $topic_id = 0 ) { |
| 2290 | 2291 | /** |
| 2291 | 2292 | * Remove a deleted topic from all users' subscriptions |
| 2292 | 2293 | * |
| 2293 | | * @since bbPress (r2652) |
| | 2294 | * @since 2.0.0 bbPress (r2652) |
| 2294 | 2295 | * |
| 2295 | 2296 | * @param int $topic_id Get the topic id to remove |
| 2296 | 2297 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| … |
… |
function bbp_remove_topic_from_all_subscriptions( $topic_id = 0 ) { |
| 2332 | 2333 | /** |
| 2333 | 2334 | * Bump the total reply count of a topic |
| 2334 | 2335 | * |
| 2335 | | * @since bbPress (r3825) |
| | 2336 | * @since 2.1.0 bbPress (r3825) |
| 2336 | 2337 | * |
| 2337 | 2338 | * @param int $topic_id Optional. Topic id. |
| 2338 | 2339 | * @param int $difference Optional. Default 1 |
| … |
… |
function bbp_bump_topic_reply_count( $topic_id = 0, $difference = 1 ) { |
| 2365 | 2366 | /** |
| 2366 | 2367 | * Bump the total hidden reply count of a topic |
| 2367 | 2368 | * |
| 2368 | | * @since bbPress (r3825) |
| | 2369 | * @since 2.1.0 bbPress (r3825) |
| 2369 | 2370 | * |
| 2370 | 2371 | * @param int $topic_id Optional. Topic id. |
| 2371 | 2372 | * @param int $difference Optional. Default 1 |
| … |
… |
function bbp_bump_topic_reply_count_hidden( $topic_id = 0, $difference = 1 ) { |
| 2400 | 2401 | /** |
| 2401 | 2402 | * Update the topic's forum id |
| 2402 | 2403 | * |
| 2403 | | * @since bbPress (r2855) |
| | 2404 | * @since 2.0.0 bbPress (r2855) |
| 2404 | 2405 | * |
| 2405 | 2406 | * @param int $topic_id Optional. Topic id to update |
| 2406 | 2407 | * @param int $forum_id Optional. Forum id |
| … |
… |
function bbp_update_topic_forum_id( $topic_id = 0, $forum_id = 0 ) { |
| 2437 | 2438 | /** |
| 2438 | 2439 | * Update the topic's topic id |
| 2439 | 2440 | * |
| 2440 | | * @since bbPress (r2954) |
| | 2441 | * @since 2.0.0 bbPress (r2954) |
| 2441 | 2442 | * |
| 2442 | 2443 | * @param int $topic_id Optional. Topic id to update |
| 2443 | 2444 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_update_topic_topic_id( $topic_id = 0 ) { |
| 2456 | 2457 | /** |
| 2457 | 2458 | * Adjust the total reply count of a topic |
| 2458 | 2459 | * |
| 2459 | | * @since bbPress (r2467) |
| | 2460 | * @since 2.0.0 bbPress (r2467) |
| 2460 | 2461 | * |
| 2461 | 2462 | * @param int $topic_id Optional. Topic id to update |
| 2462 | 2463 | * @param int $reply_count Optional. Set the reply count manually. |
| … |
… |
function bbp_update_topic_reply_count( $topic_id = 0, $reply_count = 0 ) { |
| 2495 | 2496 | * Adjust the total hidden reply count of a topic (hidden includes trashed, |
| 2496 | 2497 | * spammed and pending replies) |
| 2497 | 2498 | * |
| 2498 | | * @since bbPress (r2740) |
| | 2499 | * @since 2.0.0 bbPress (r2740) |
| 2499 | 2500 | * |
| 2500 | 2501 | * @param int $topic_id Optional. Topic id to update |
| 2501 | 2502 | * @param int $reply_count Optional. Set the reply count manually |
| … |
… |
function bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = 0 ) |
| 2541 | 2542 | /** |
| 2542 | 2543 | * Update the topic with the last active post ID |
| 2543 | 2544 | * |
| 2544 | | * @since bbPress (r2888) |
| | 2545 | * @since 2.0.0 bbPress (r2888) |
| 2545 | 2546 | * |
| 2546 | 2547 | * @param int $topic_id Optional. Topic id to update |
| 2547 | 2548 | * @param int $active_id Optional. active id |
| … |
… |
function bbp_update_topic_last_active_time( $topic_id = 0, $new_time = '' ) { |
| 2625 | 2626 | /** |
| 2626 | 2627 | * Update the topic with the most recent reply ID |
| 2627 | 2628 | * |
| 2628 | | * @since bbPress (r2625) |
| | 2629 | * @since 2.0.0 bbPress (r2625) |
| 2629 | 2630 | * |
| 2630 | 2631 | * @param int $topic_id Optional. Topic id to update |
| 2631 | 2632 | * @param int $reply_id Optional. Reply id |
| … |
… |
function bbp_update_topic_last_reply_id( $topic_id = 0, $reply_id = 0 ) { |
| 2673 | 2674 | /** |
| 2674 | 2675 | * Adjust the total voice count of a topic |
| 2675 | 2676 | * |
| 2676 | | * @since bbPress (r2567) |
| | 2677 | * @since 2.0.0 bbPress (r2567) |
| 2677 | 2678 | * |
| 2678 | 2679 | * @param int $topic_id Optional. Topic id to update |
| 2679 | 2680 | * @uses bbp_is_reply() To check if the passed topic id is a reply |
| … |
… |
function bbp_update_topic_voice_count( $topic_id = 0 ) { |
| 2714 | 2715 | /** |
| 2715 | 2716 | * Adjust the total anonymous reply count of a topic |
| 2716 | 2717 | * |
| 2717 | | * @since bbPress (r2567) |
| | 2718 | * @since 2.0.0 bbPress (r2567) |
| 2718 | 2719 | * |
| 2719 | 2720 | * @param int $topic_id Optional. Topic id to update |
| 2720 | 2721 | * @uses bbp_is_reply() To check if the passed topic id is a reply |
| … |
… |
function bbp_update_topic_anonymous_reply_count( $topic_id = 0 ) { |
| 2754 | 2755 | /** |
| 2755 | 2756 | * Update the revision log of the topic |
| 2756 | 2757 | * |
| 2757 | | * @since bbPress (r2782) |
| | 2758 | * @since 2.0.0 bbPress (r2782) |
| 2758 | 2759 | * |
| 2759 | 2760 | * @param array $args Supports these args: |
| 2760 | 2761 | * - topic_id: Topic id |
| … |
… |
function bbp_update_topic_revision_log( $args = array() ) { |
| 2796 | 2797 | /** |
| 2797 | 2798 | * Closes a topic |
| 2798 | 2799 | * |
| 2799 | | * @since bbPress (r2740) |
| | 2800 | * @since 2.0.0 bbPress (r2740) |
| 2800 | 2801 | * |
| 2801 | 2802 | * @param int $topic_id Topic id |
| 2802 | 2803 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_close_topic( $topic_id = 0 ) { |
| 2866 | 2867 | /** |
| 2867 | 2868 | * Opens a topic |
| 2868 | 2869 | * |
| 2869 | | * @since bbPress (r2740) |
| | 2870 | * @since 2.0.0 bbPress (r2740) |
| 2870 | 2871 | * |
| 2871 | 2872 | * @param int $topic_id Topic id |
| 2872 | 2873 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_open_topic( $topic_id = 0 ) { |
| 2936 | 2937 | /** |
| 2937 | 2938 | * Marks a topic as spam |
| 2938 | 2939 | * |
| 2939 | | * @since bbPress (r2740) |
| | 2940 | * @since 2.0.0 bbPress (r2740) |
| 2940 | 2941 | * |
| 2941 | 2942 | * @param int $topic_id Topic id |
| 2942 | 2943 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_spam_topic( $topic_id = 0 ) { |
| 2989 | 2990 | * |
| 2990 | 2991 | * Usually you'll want to do this before the topic itself is marked as spam. |
| 2991 | 2992 | * |
| 2992 | | * @since bbPress (r5405) |
| | 2993 | * @since 2.6.0 bbPress (r5405) |
| 2993 | 2994 | * |
| 2994 | 2995 | * @param int $topic_id |
| 2995 | 2996 | */ |
| … |
… |
function bbp_spam_topic_replies( $topic_id = 0 ) { |
| 3036 | 3037 | * |
| 3037 | 3038 | * Usually you'll want to do this before the topic itself is marked as spam. |
| 3038 | 3039 | * |
| 3039 | | * @since bbPress (r5405) |
| | 3040 | * @since 2.6.0 bbPress (r5405) |
| 3040 | 3041 | * |
| 3041 | 3042 | * @param int $topic_id |
| 3042 | 3043 | */ |
| … |
… |
function bbp_spam_topic_tags( $topic_id = 0 ) { |
| 3073 | 3074 | /** |
| 3074 | 3075 | * Unspams a topic |
| 3075 | 3076 | * |
| 3076 | | * @since bbPress (r2740) |
| | 3077 | * @since 2.0.0 bbPress (r2740) |
| 3077 | 3078 | * |
| 3078 | 3079 | * @param int $topic_id Topic id |
| 3079 | 3080 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_unspam_topic( $topic_id = 0 ) { |
| 3133 | 3134 | * |
| 3134 | 3135 | * Usually you'll want to do this after the topic is unspammed. |
| 3135 | 3136 | * |
| 3136 | | * @since bbPress (r5405) |
| | 3137 | * @since 2.6.0 bbPress (r5405) |
| 3137 | 3138 | * |
| 3138 | 3139 | * @param int $topic_id |
| 3139 | 3140 | */ |
| … |
… |
function bbp_unspam_topic_replies( $topic_id = 0 ) { |
| 3168 | 3169 | * |
| 3169 | 3170 | * Usually you'll want to do this before the topic itself is unmarked as spam. |
| 3170 | 3171 | * |
| 3171 | | * @since bbPress (r5405) |
| | 3172 | * @since 2.6.0 bbPress (r5405) |
| 3172 | 3173 | * |
| 3173 | 3174 | * @param int $topic_id |
| 3174 | 3175 | */ |
| … |
… |
function bbp_unspam_topic_tags( $topic_id = 0 ) { |
| 3191 | 3192 | /** |
| 3192 | 3193 | * Sticks a topic to a forum or front |
| 3193 | 3194 | * |
| 3194 | | * @since bbPress (r2754) |
| | 3195 | * @since 2.0.0 bbPress (r2754) |
| 3195 | 3196 | * |
| 3196 | 3197 | * @param int $topic_id Optional. Topic id |
| 3197 | 3198 | * @param int $super Should we make the topic a super sticky? |
| … |
… |
function bbp_stick_topic( $topic_id = 0, $super = false ) { |
| 3253 | 3254 | /** |
| 3254 | 3255 | * Approves a pending topic |
| 3255 | 3256 | * |
| 3256 | | * @since bbPress (r5503) |
| | 3257 | * @since 2.6.0 bbPress (r5503) |
| 3257 | 3258 | * |
| 3258 | 3259 | * @param int $topic_id Topic id |
| 3259 | 3260 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_approve_topic( $topic_id = 0 ) { |
| 3300 | 3301 | /** |
| 3301 | 3302 | * Unapproves a topic |
| 3302 | 3303 | * |
| 3303 | | * @since bbPress (r5503) |
| | 3304 | * @since 2.6.0 bbPress (r5503) |
| 3304 | 3305 | * |
| 3305 | 3306 | * @param int $topic_id Topic id |
| 3306 | 3307 | * @uses bbp_get_topic() To get the topic |
| … |
… |
function bbp_unapprove_topic( $topic_id = 0 ) { |
| 3346 | 3347 | /** |
| 3347 | 3348 | * Unsticks a topic both from front and it's forum |
| 3348 | 3349 | * |
| 3349 | | * @since bbPress (r2754) |
| | 3350 | * @since 2.0.0 bbPress (r2754) |
| 3350 | 3351 | * |
| 3351 | 3352 | * @param int $topic_id Optional. Topic id |
| 3352 | 3353 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_delete_topic( $topic_id = 0 ) { |
| 3425 | 3426 | * |
| 3426 | 3427 | * Usually you'll want to do this before the topic itself is deleted. |
| 3427 | 3428 | * |
| 3428 | | * @since bbPress (r5405) |
| | 3429 | * @since 2.6.0 bbPress (r5405) |
| 3429 | 3430 | * |
| 3430 | 3431 | * @param int $topic_id |
| 3431 | 3432 | */ |
| … |
… |
function bbp_trash_topic( $topic_id = 0 ) { |
| 3487 | 3488 | * |
| 3488 | 3489 | * Usually you'll want to do this before the topic itself is marked as spam. |
| 3489 | 3490 | * |
| 3490 | | * @since bbPress (r5405) |
| | 3491 | * @since 2.6.0 bbPress (r5405) |
| 3491 | 3492 | * |
| 3492 | 3493 | * @param int $topic_id |
| 3493 | 3494 | */ |
| … |
… |
function bbp_untrash_topic( $topic_id = 0 ) { |
| 3553 | 3554 | * |
| 3554 | 3555 | * Usually you'll want to do this after the topic is unspammed. |
| 3555 | 3556 | * |
| 3556 | | * @since bbPress (r5405) |
| | 3557 | * @since 2.6.0 bbPress (r5405) |
| 3557 | 3558 | * |
| 3558 | 3559 | * @param int $topic_id |
| 3559 | 3560 | */ |
| … |
… |
function bbp_untrashed_topic( $topic_id = 0 ) { |
| 3641 | 3642 | /** |
| 3642 | 3643 | * Return the topics per page setting |
| 3643 | 3644 | * |
| 3644 | | * @since bbPress (r3540) |
| | 3645 | * @since 2.0.0 bbPress (r3540) |
| 3645 | 3646 | * |
| 3646 | 3647 | * @param int $default Default replies per page (15) |
| 3647 | 3648 | * @uses get_option() To get the setting |
| … |
… |
function bbp_get_topics_per_page( $default = 15 ) { |
| 3665 | 3666 | /** |
| 3666 | 3667 | * Return the topics per RSS page setting |
| 3667 | 3668 | * |
| 3668 | | * @since bbPress (r3540) |
| | 3669 | * @since 2.0.0 bbPress (r3540) |
| 3669 | 3670 | * |
| 3670 | 3671 | * @param int $default Default replies per page (25) |
| 3671 | 3672 | * @uses get_option() To get the setting |
| … |
… |
function bbp_get_topics_per_rss_page( $default = 25 ) { |
| 3691 | 3692 | /** |
| 3692 | 3693 | * Get topic tags for a specific topic ID |
| 3693 | 3694 | * |
| 3694 | | * @since bbPress (r5836) |
| | 3695 | * @since 2.6.0 bbPress (r5836) |
| 3695 | 3696 | * |
| 3696 | 3697 | * @param int $topic_id |
| 3697 | 3698 | * |
| … |
… |
function bbp_get_topic_tags( $topic_id = 0 ) { |
| 3708 | 3709 | /** |
| 3709 | 3710 | * Get topic tags for a specific topic ID |
| 3710 | 3711 | * |
| 3711 | | * @since bbPress (r4165) |
| | 3712 | * @since 2.2.0 bbPress (r4165) |
| 3712 | 3713 | * |
| 3713 | 3714 | * @param int $topic_id |
| 3714 | 3715 | * @param string $sep |
| … |
… |
function bbp_get_topic_tag_names( $topic_id = 0, $sep = ', ' ) { |
| 3728 | 3729 | /** |
| 3729 | 3730 | * Check if autoembeds are enabled and hook them in if so |
| 3730 | 3731 | * |
| 3731 | | * @since bbPress (r3752) |
| | 3732 | * @since 2.1.0 bbPress (r3752) |
| | 3733 | * |
| 3732 | 3734 | * @global WP_Embed $wp_embed |
| 3733 | 3735 | */ |
| 3734 | 3736 | function bbp_topic_content_autoembed() { |
| … |
… |
function bbp_topic_content_autoembed() { |
| 3744 | 3746 | /** |
| 3745 | 3747 | * Output an RSS2 feed of topics, based on the query passed. |
| 3746 | 3748 | * |
| 3747 | | * @since bbPress (r3171) |
| | 3749 | * @since 2.0.0 bbPress (r3171) |
| 3748 | 3750 | * |
| 3749 | 3751 | * @uses bbp_version() |
| 3750 | 3752 | * @uses bbp_is_single_topic() |
| … |
… |
function bbp_display_topics_feed_rss2( $topics_query = array() ) { |
| 3848 | 3850 | /** |
| 3849 | 3851 | * Redirect if unathorized user is attempting to edit a topic |
| 3850 | 3852 | * |
| 3851 | | * @since bbPress (r3605) |
| | 3853 | * @since 2.1.0 bbPress (r3605) |
| 3852 | 3854 | * |
| 3853 | 3855 | * @uses bbp_is_topic_edit() |
| 3854 | 3856 | * @uses current_user_can() |
| … |
… |
function bbp_check_topic_edit() { |
| 3872 | 3874 | /** |
| 3873 | 3875 | * Redirect if unathorized user is attempting to edit a topic tag |
| 3874 | 3876 | * |
| 3875 | | * @since bbPress (r3605) |
| | 3877 | * @since 2.1.0 bbPress (r3605) |
| 3876 | 3878 | * |
| 3877 | 3879 | * @uses bbp_is_topic_tag_edit() |
| 3878 | 3880 | * @uses current_user_can() |
-
diff --git src/includes/topics/template.php src/includes/topics/template.php
index 8973f66..ea5d512 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Output the unique id of the custom post type for topics |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2857) |
| | 18 | * @since 2.0.0 bbPress (r2857) |
| 19 | 19 | * |
| 20 | 20 | * @uses bbp_get_topic_post_type() To get the topic post type |
| 21 | 21 | */ |
| … |
… |
function bbp_topic_post_type() { |
| 25 | 25 | /** |
| 26 | 26 | * Return the unique id of the custom post type for topics |
| 27 | 27 | * |
| 28 | | * @since bbPress (r2857) |
| | 28 | * @since 2.0.0 bbPress (r2857) |
| 29 | 29 | * |
| 30 | 30 | * @uses apply_filters() Calls 'bbp_get_topic_post_type' with the topic |
| 31 | 31 | * post type id |
| … |
… |
function bbp_topic_post_type() { |
| 38 | 38 | /** |
| 39 | 39 | * Return array of labels used by the topic post type |
| 40 | 40 | * |
| 41 | | * @since bbPress (r5129) |
| | 41 | * @since 2.5.0 bbPress (r5129) |
| 42 | 42 | * |
| 43 | 43 | * @return array |
| 44 | 44 | */ |
| … |
… |
function bbp_get_topic_post_type_labels() { |
| 65 | 65 | /** |
| 66 | 66 | * Return array of topic post type rewrite settings |
| 67 | 67 | * |
| 68 | | * @since bbPress (r5129) |
| | 68 | * @since 2.5.0 bbPress (r5129) |
| 69 | 69 | * |
| 70 | 70 | * @return array |
| 71 | 71 | */ |
| … |
… |
function bbp_get_topic_post_type_rewrite() { |
| 79 | 79 | /** |
| 80 | 80 | * Return array of features the topic post type supports |
| 81 | 81 | * |
| 82 | | * @since bbPress (r5129) |
| | 82 | * @since 2.5.0 bbPress (r5129) |
| 83 | 83 | * |
| 84 | 84 | * @return array |
| 85 | 85 | */ |
| … |
… |
function bbp_get_topic_post_type_supports() { |
| 96 | 96 | * - Traditional: Topics are included in the reply loop (default) |
| 97 | 97 | * - New Style: Topics appear as "lead" posts, ahead of replies |
| 98 | 98 | * |
| 99 | | * @since bbPress (r2954) |
| | 99 | * @since 2.0.0 bbPress (r2954) |
| | 100 | * |
| 100 | 101 | * @param $show_lead Optional. Default false |
| 101 | 102 | * @return bool Yes if the topic appears as a lead, otherwise false |
| 102 | 103 | */ |
| … |
… |
function bbp_show_lead_topic( $show_lead = false ) { |
| 115 | 116 | /** |
| 116 | 117 | * The main topic loop. WordPress makes this easy for us |
| 117 | 118 | * |
| 118 | | * @since bbPress (r2485) |
| | 119 | * @since 2.0.0 bbPress (r2485) |
| 119 | 120 | * |
| 120 | 121 | * @param array $args All the arguments supported by {@link WP_Query} |
| 121 | 122 | * @uses current_user_can() To check if the current user can edit other's topics |
| … |
… |
function bbp_has_topics( $args = array() ) { |
| 427 | 428 | /** |
| 428 | 429 | * Whether there are more topics available in the loop |
| 429 | 430 | * |
| 430 | | * @since bbPress (r2485) |
| | 431 | * @since 2.0.0 bbPress (r2485) |
| 431 | 432 | * |
| 432 | 433 | * @uses WP_Query bbPress::topic_query::have_posts() |
| 433 | 434 | * @return object Topic information |
| … |
… |
function bbp_topics() { |
| 448 | 449 | /** |
| 449 | 450 | * Loads up the current topic in the loop |
| 450 | 451 | * |
| 451 | | * @since bbPress (r2485) |
| | 452 | * @since 2.0.0 bbPress (r2485) |
| 452 | 453 | * |
| 453 | 454 | * @uses WP_Query bbPress::topic_query::the_post() |
| 454 | 455 | * @return object Topic information |
| … |
… |
function bbp_the_topic() { |
| 460 | 461 | /** |
| 461 | 462 | * Output the topic id |
| 462 | 463 | * |
| 463 | | * @since bbPress (r2485) |
| | 464 | * @since 2.0.0 bbPress (r2485) |
| 464 | 465 | * |
| 465 | 466 | * @uses bbp_get_topic_id() To get the topic id |
| 466 | 467 | */ |
| … |
… |
function bbp_topic_id( $topic_id = 0) { |
| 470 | 471 | /** |
| 471 | 472 | * Return the topic id |
| 472 | 473 | * |
| 473 | | * @since bbPress (r2485) |
| | 474 | * @since 2.0.0 bbPress (r2485) |
| 474 | 475 | * |
| 475 | 476 | * @param $topic_id Optional. Used to check emptiness |
| 476 | 477 | * @uses bbPress::topic_query::post::ID To get the topic id |
| … |
… |
function bbp_topic_id( $topic_id = 0) { |
| 527 | 528 | /** |
| 528 | 529 | * Gets a topic |
| 529 | 530 | * |
| 530 | | * @since bbPress (r2787) |
| | 531 | * @since 2.0.0 bbPress (r2787) |
| 531 | 532 | * |
| 532 | 533 | * @param int|object $topic Topic id or topic object |
| 533 | 534 | * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. Default = OBJECT |
| … |
… |
function bbp_get_topic( $topic, $output = OBJECT, $filter = 'raw' ) { |
| 574 | 575 | /** |
| 575 | 576 | * Output the link to the topic in the topic loop |
| 576 | 577 | * |
| 577 | | * @since bbPress (r2485) |
| | 578 | * @since 2.0.0 bbPress (r2485) |
| 578 | 579 | * |
| 579 | 580 | * @param int $topic_id Optional. Topic id |
| 580 | 581 | * @param string $redirect_to Optional. Pass a redirect value for use with |
| … |
… |
function bbp_topic_permalink( $topic_id = 0, $redirect_to = '' ) { |
| 587 | 588 | /** |
| 588 | 589 | * Return the link to the topic |
| 589 | 590 | * |
| 590 | | * @since bbPress (r2485) |
| | 591 | * @since 2.0.0 bbPress (r2485) |
| 591 | 592 | * |
| 592 | 593 | * @param int $topic_id Optional. Topic id |
| 593 | 594 | * @param string $redirect_to Optional. Pass a redirect value for use with |
| … |
… |
function bbp_topic_permalink( $topic_id = 0, $redirect_to = '' ) { |
| 617 | 618 | /** |
| 618 | 619 | * Output the title of the topic |
| 619 | 620 | * |
| 620 | | * @since bbPress (r2485) |
| | 621 | * @since 2.0.0 bbPress (r2485) |
| 621 | 622 | * |
| 622 | 623 | * @param int $topic_id Optional. Topic id |
| 623 | 624 | * @uses bbp_get_topic_title() To get the topic title |
| … |
… |
function bbp_topic_title( $topic_id = 0 ) { |
| 628 | 629 | /** |
| 629 | 630 | * Return the title of the topic |
| 630 | 631 | * |
| 631 | | * @since bbPress (r2485) |
| | 632 | * @since 2.0.0 bbPress (r2485) |
| 632 | 633 | * |
| 633 | 634 | * @param int $topic_id Optional. Topic id |
| 634 | 635 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_title( $topic_id = 0 ) { |
| 647 | 648 | /** |
| 648 | 649 | * Output the topic archive title |
| 649 | 650 | * |
| 650 | | * @since bbPress (r3249) |
| | 651 | * @since 2.0.0 bbPress (r3249) |
| 651 | 652 | * |
| 652 | 653 | * @param string $title Default text to use as title |
| 653 | 654 | */ |
| … |
… |
function bbp_topic_archive_title( $title = '' ) { |
| 657 | 658 | /** |
| 658 | 659 | * Return the topic archive title |
| 659 | 660 | * |
| 660 | | * @since bbPress (r3249) |
| | 661 | * @since 2.0.0 bbPress (r3249) |
| 661 | 662 | * |
| 662 | 663 | * @param string $title Default text to use as title |
| 663 | 664 | * |
| … |
… |
function bbp_topic_archive_title( $title = '' ) { |
| 693 | 694 | /** |
| 694 | 695 | * Output the content of the topic |
| 695 | 696 | * |
| 696 | | * @since bbPress (r2780) |
| | 697 | * @since 2.0.0 bbPress (r2780) |
| 697 | 698 | * |
| 698 | 699 | * @param int $topic_id Optional. Topic id |
| 699 | 700 | * @uses bbp_get_topic_content() To get the topic content |
| … |
… |
function bbp_topic_content( $topic_id = 0 ) { |
| 704 | 705 | /** |
| 705 | 706 | * Return the content of the topic |
| 706 | 707 | * |
| 707 | | * @since bbPress (r2780) |
| | 708 | * @since 2.0.0 bbPress (r2780) |
| 708 | 709 | * |
| 709 | 710 | * @param int $topic_id Optional. Topic id |
| 710 | 711 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_content( $topic_id = 0 ) { |
| 731 | 732 | /** |
| 732 | 733 | * Output the excerpt of the topic |
| 733 | 734 | * |
| 734 | | * @since bbPress (r2780) |
| | 735 | * @since 2.0.0 bbPress (r2780) |
| 735 | 736 | * |
| 736 | 737 | * @param int $topic_id Optional. Topic id |
| 737 | 738 | * @param int $length Optional. Length of the excerpt. Defaults to 100 letters |
| … |
… |
function bbp_topic_excerpt( $topic_id = 0, $length = 100 ) { |
| 743 | 744 | /** |
| 744 | 745 | * Return the excerpt of the topic |
| 745 | 746 | * |
| 746 | | * @since bbPress (r2780) |
| | 747 | * @since 2.0.0 bbPress (r2780) |
| 747 | 748 | * |
| 748 | 749 | * @param int $topic_id Optional. topic id |
| 749 | 750 | * @param int $length Optional. Length of the excerpt. Defaults to 100 |
| … |
… |
function bbp_topic_excerpt( $topic_id = 0, $length = 100 ) { |
| 784 | 785 | /** |
| 785 | 786 | * Output the post date and time of a topic |
| 786 | 787 | * |
| 787 | | * @since bbPress (r4155) |
| | 788 | * @since 2.2.0 bbPress (r4155) |
| 788 | 789 | * |
| 789 | 790 | * @param int $topic_id Optional. Topic id. |
| 790 | 791 | * @param bool $humanize Optional. Humanize output using time_since |
| … |
… |
function bbp_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) { |
| 797 | 798 | /** |
| 798 | 799 | * Return the post date and time of a topic |
| 799 | 800 | * |
| 800 | | * @since bbPress (r4155) |
| | 801 | * @since 2.2.0 bbPress (r4155) |
| 801 | 802 | * |
| 802 | 803 | * @param int $topic_id Optional. Topic id. |
| 803 | 804 | * @param bool $humanize Optional. Humanize output using time_since |
| … |
… |
function bbp_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) { |
| 830 | 831 | /** |
| 831 | 832 | * Output pagination links of a topic within the topic loop |
| 832 | 833 | * |
| 833 | | * @since bbPress (r2966) |
| | 834 | * @since 2.0.0 bbPress (r2966) |
| 834 | 835 | * |
| 835 | 836 | * @param array $args See {@link bbp_get_topic_pagination()} |
| 836 | 837 | * @uses bbp_get_topic_pagination() To get the topic pagination links |
| … |
… |
function bbp_topic_pagination( $args = array() ) { |
| 841 | 842 | /** |
| 842 | 843 | * Returns pagination links of a topic within the topic loop |
| 843 | 844 | * |
| 844 | | * @since bbPress (r2966) |
| | 845 | * @since 2.0.0 bbPress (r2966) |
| 845 | 846 | * |
| 846 | 847 | * @param array $args This function supports these arguments: |
| 847 | 848 | * - topic_id: Topic id |
| … |
… |
function bbp_topic_pagination( $args = array() ) { |
| 921 | 922 | /** |
| 922 | 923 | * Append revisions to the topic content |
| 923 | 924 | * |
| 924 | | * @since bbPress (r2782) |
| | 925 | * @since 2.0.0 bbPress (r2782) |
| 925 | 926 | * |
| 926 | 927 | * @param string $content Optional. Content to which we need to append the revisions to |
| 927 | 928 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_topic_content_append_revisions( $content = '', $topic_id = 0 ) { |
| 946 | 947 | /** |
| 947 | 948 | * Output the revision log of the topic |
| 948 | 949 | * |
| 949 | | * @since bbPress (r2782) |
| | 950 | * @since 2.0.0 bbPress (r2782) |
| 950 | 951 | * |
| 951 | 952 | * @param int $topic_id Optional. Topic id |
| 952 | 953 | * @uses bbp_get_topic_revision_log() To get the topic revision log |
| … |
… |
function bbp_topic_revision_log( $topic_id = 0 ) { |
| 957 | 958 | /** |
| 958 | 959 | * Return the formatted revision log of the topic |
| 959 | 960 | * |
| 960 | | * @since bbPress (r2782) |
| | 961 | * @since 2.0.0 bbPress (r2782) |
| 961 | 962 | * |
| 962 | 963 | * @param int $topic_id Optional. Topic id |
| 963 | 964 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_revision_log( $topic_id = 0 ) { |
| 1018 | 1019 | /** |
| 1019 | 1020 | * Return the raw revision log of the topic |
| 1020 | 1021 | * |
| 1021 | | * @since bbPress (r2782) |
| | 1022 | * @since 2.0.0 bbPress (r2782) |
| 1022 | 1023 | * |
| 1023 | 1024 | * @param int $topic_id Optional. Topic id |
| 1024 | 1025 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_revision_log( $topic_id = 0 ) { |
| 1039 | 1040 | /** |
| 1040 | 1041 | * Return the revisions of the topic |
| 1041 | 1042 | * |
| 1042 | | * @since bbPress (r2782) |
| | 1043 | * @since 2.0.0 bbPress (r2782) |
| 1043 | 1044 | * |
| 1044 | 1045 | * @param int $topic_id Optional. Topic id |
| 1045 | 1046 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_get_topic_revisions( $topic_id = 0 ) { |
| 1058 | 1059 | /** |
| 1059 | 1060 | * Return the revision count of the topic |
| 1060 | 1061 | * |
| 1061 | | * @since bbPress (r2782) |
| | 1062 | * @since 2.0.0 bbPress (r2782) |
| 1062 | 1063 | * |
| 1063 | 1064 | * @param int $topic_id Optional. Topic id |
| 1064 | 1065 | * @uses bbp_get_topic_revisions() To get the topic revisions |
| … |
… |
function bbp_get_topic_revision_count( $topic_id = 0, $integer = false ) { |
| 1076 | 1077 | /** |
| 1077 | 1078 | * Is the topic a sticky or super sticky? |
| 1078 | 1079 | * |
| 1079 | | * @since bbPress (r2754) |
| | 1080 | * @since 2.0.0 bbPress (r2754) |
| 1080 | 1081 | * |
| 1081 | 1082 | * @param int $topic_id Optional. Topic id |
| 1082 | 1083 | * @param int $check_super Optional. If set to true and if the topic is not a |
| … |
… |
function bbp_is_topic_sticky( $topic_id = 0, $check_super = true ) { |
| 1105 | 1106 | /** |
| 1106 | 1107 | * Is the topic a super sticky? |
| 1107 | 1108 | * |
| 1108 | | * @since bbPress (r2754) |
| | 1109 | * @since 2.0.0 bbPress (r2754) |
| 1109 | 1110 | * |
| 1110 | 1111 | * @param int $topic_id Optional. Topic id |
| 1111 | 1112 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_super_sticky( $topic_id = 0 ) { |
| 1123 | 1124 | /** |
| 1124 | 1125 | * Output the status of the topic |
| 1125 | 1126 | * |
| 1126 | | * @since bbPress (r2667) |
| | 1127 | * @since 2.0.0 bbPress (r2667) |
| 1127 | 1128 | * |
| 1128 | 1129 | * @param int $topic_id Optional. Topic id |
| 1129 | 1130 | * @uses bbp_get_topic_status() To get the topic status |
| … |
… |
function bbp_topic_status( $topic_id = 0 ) { |
| 1134 | 1135 | /** |
| 1135 | 1136 | * Return the status of the topic |
| 1136 | 1137 | * |
| 1137 | | * @since bbPress (r2667) |
| | 1138 | * @since 2.0.0 bbPress (r2667) |
| 1138 | 1139 | * |
| 1139 | 1140 | * @param int $topic_id Optional. Topic id |
| 1140 | 1141 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_status( $topic_id = 0 ) { |
| 1152 | 1153 | /** |
| 1153 | 1154 | * Is the topic closed to new replies? |
| 1154 | 1155 | * |
| 1155 | | * @since bbPress (r2746) |
| | 1156 | * @since 2.0.0 bbPress (r2746) |
| 1156 | 1157 | * |
| 1157 | 1158 | * @param int $topic_id Optional. Topic id |
| 1158 | 1159 | * @uses bbp_get_topic_status() To get the topic status |
| … |
… |
function bbp_is_topic_closed( $topic_id = 0 ) { |
| 1171 | 1172 | /** |
| 1172 | 1173 | * Is the topic open to new replies? |
| 1173 | 1174 | * |
| 1174 | | * @since bbPress (r2727) |
| | 1175 | * @since 2.0.0 bbPress (r2727) |
| 1175 | 1176 | * |
| 1176 | 1177 | * @uses bbp_get_topic_status() |
| 1177 | 1178 | * |
| … |
… |
function bbp_is_topic_open( $topic_id = 0 ) { |
| 1186 | 1187 | /** |
| 1187 | 1188 | * Is the topic not spam or deleted? |
| 1188 | 1189 | * |
| 1189 | | * @since bbPress (r3496) |
| | 1190 | * @since 2.0.0 bbPress (r3496) |
| 1190 | 1191 | * |
| 1191 | 1192 | * @param int $topic_id Optional. Topic id |
| 1192 | 1193 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_published( $topic_id = 0 ) { |
| 1205 | 1206 | /** |
| 1206 | 1207 | * Is the topic marked as spam? |
| 1207 | 1208 | * |
| 1208 | | * @since bbPress (r2727) |
| | 1209 | * @since 2.0.0 bbPress (r2727) |
| 1209 | 1210 | * |
| 1210 | 1211 | * @param int $topic_id Optional. Topic id |
| 1211 | 1212 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_spam( $topic_id = 0 ) { |
| 1224 | 1225 | /** |
| 1225 | 1226 | * Is the topic trashed? |
| 1226 | 1227 | * |
| 1227 | | * @since bbPress (r2888) |
| | 1228 | * @since 2.0.0 bbPress (r2888) |
| 1228 | 1229 | * |
| 1229 | 1230 | * @param int $topic_id Optional. Topic id |
| 1230 | 1231 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_trash( $topic_id = 0 ) { |
| 1243 | 1244 | /** |
| 1244 | 1245 | * Is the topic pending? |
| 1245 | 1246 | * |
| 1246 | | * @since bbPress (r5504) |
| | 1247 | * @since 2.6.0 bbPress (r5504) |
| 1247 | 1248 | * |
| 1248 | 1249 | * @param int $topic_id Optional. Topic id |
| 1249 | 1250 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_pending( $topic_id = 0 ) { |
| 1262 | 1263 | /** |
| 1263 | 1264 | * Is the topic private? |
| 1264 | 1265 | * |
| 1265 | | * @since bbPress (r5504) |
| | 1266 | * @since 2.6.0 bbPress (r5504) |
| 1266 | 1267 | * |
| 1267 | 1268 | * @param int $topic_id Optional. Topic id |
| 1268 | 1269 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_private( $topic_id = 0 ) { |
| 1281 | 1282 | /** |
| 1282 | 1283 | * Is the posted by an anonymous user? |
| 1283 | 1284 | * |
| 1284 | | * @since bbPress (r2753) |
| | 1285 | * @since 2.0.0 bbPress (r2753) |
| 1285 | 1286 | * |
| 1286 | 1287 | * @param int $topic_id Optional. Topic id |
| 1287 | 1288 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_is_topic_anonymous( $topic_id = 0 ) { |
| 1313 | 1314 | * |
| 1314 | 1315 | * Output the author of the topic. |
| 1315 | 1316 | * |
| 1316 | | * @since bbPress (r2590) |
| 1317 | | * @deprecated bbPress (r5119) |
| | 1317 | * @since 2.0.0 bbPress (r2590) |
| | 1318 | * |
| | 1319 | * @deprecated 2.5.0 bbPress (r5119) |
| 1318 | 1320 | * |
| 1319 | 1321 | * @param int $topic_id Optional. Topic id |
| 1320 | 1322 | * @uses bbp_get_topic_author() To get the topic author |
| … |
… |
function bbp_topic_author( $topic_id = 0 ) { |
| 1327 | 1329 | * |
| 1328 | 1330 | * Return the author of the topic |
| 1329 | 1331 | * |
| 1330 | | * @since bbPress (r2590) |
| 1331 | | * @deprecated bbPress (r5119) |
| | 1332 | * @since 2.0.0 bbPress (r2590) |
| | 1333 | * |
| | 1334 | * @deprecated 2.5.0 bbPress (r5119) |
| 1332 | 1335 | * |
| 1333 | 1336 | * @param int $topic_id Optional. Topic id |
| 1334 | 1337 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author( $topic_id = 0 ) { |
| 1356 | 1359 | /** |
| 1357 | 1360 | * Output the author ID of the topic |
| 1358 | 1361 | * |
| 1359 | | * @since bbPress (r2590) |
| | 1362 | * @since 2.0.0 bbPress (r2590) |
| 1360 | 1363 | * |
| 1361 | 1364 | * @param int $topic_id Optional. Topic id |
| 1362 | 1365 | * @uses bbp_get_topic_author_id() To get the topic author id |
| … |
… |
function bbp_topic_author_id( $topic_id = 0 ) { |
| 1367 | 1370 | /** |
| 1368 | 1371 | * Return the author ID of the topic |
| 1369 | 1372 | * |
| 1370 | | * @since bbPress (r2590) |
| | 1373 | * @since 2.0.0 bbPress (r2590) |
| 1371 | 1374 | * |
| 1372 | 1375 | * @param int $topic_id Optional. Topic id |
| 1373 | 1376 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author_id( $topic_id = 0 ) { |
| 1386 | 1389 | /** |
| 1387 | 1390 | * Output the author display_name of the topic |
| 1388 | 1391 | * |
| 1389 | | * @since bbPress (r2590) |
| | 1392 | * @since 2.0.0 bbPress (r2590) |
| 1390 | 1393 | * |
| 1391 | 1394 | * @param int $topic_id Optional. Topic id |
| 1392 | 1395 | * @uses bbp_get_topic_author_display_name() To get the topic author's display |
| … |
… |
function bbp_topic_author_display_name( $topic_id = 0 ) { |
| 1398 | 1401 | /** |
| 1399 | 1402 | * Return the author display_name of the topic |
| 1400 | 1403 | * |
| 1401 | | * @since bbPress (r2485) |
| | 1404 | * @since 2.0.0 bbPress (r2485) |
| 1402 | 1405 | * |
| 1403 | 1406 | * @param int $topic_id Optional. Topic id |
| 1404 | 1407 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author_display_name( $topic_id = 0 ) { |
| 1449 | 1452 | /** |
| 1450 | 1453 | * Output the author avatar of the topic |
| 1451 | 1454 | * |
| 1452 | | * @since bbPress (r2590) |
| | 1455 | * @since 2.0.0 bbPress (r2590) |
| 1453 | 1456 | * |
| 1454 | 1457 | * @param int $topic_id Optional. Topic id |
| 1455 | 1458 | * @param int $size Optional. Avatar size. Defaults to 40 |
| … |
… |
function bbp_topic_author_avatar( $topic_id = 0, $size = 40 ) { |
| 1461 | 1464 | /** |
| 1462 | 1465 | * Return the author avatar of the topic |
| 1463 | 1466 | * |
| 1464 | | * @since bbPress (r2590) |
| | 1467 | * @since 2.0.0 bbPress (r2590) |
| 1465 | 1468 | * |
| 1466 | 1469 | * @param int $topic_id Optional. Topic id |
| 1467 | 1470 | * @param int $size Optional. Avatar size. Defaults to 40 |
| … |
… |
function bbp_topic_author_avatar( $topic_id = 0, $size = 40 ) { |
| 1493 | 1496 | /** |
| 1494 | 1497 | * Output the author link of the topic |
| 1495 | 1498 | * |
| 1496 | | * @since bbPress (r2717) |
| | 1499 | * @since 2.0.0 bbPress (r2717) |
| 1497 | 1500 | * |
| 1498 | 1501 | * @param mixed|int $args If it is an integer, it is used as topic_id. Optional. |
| 1499 | 1502 | * @uses bbp_get_topic_author_link() To get the topic author link |
| … |
… |
function bbp_topic_author_link( $args = array() ) { |
| 1504 | 1507 | /** |
| 1505 | 1508 | * Return the author link of the topic |
| 1506 | 1509 | * |
| 1507 | | * @since bbPress (r2717) |
| | 1510 | * @since 2.0.0 bbPress (r2717) |
| 1508 | 1511 | * |
| 1509 | 1512 | * @param mixed|int $args If it is an integer, it is used as topic id. |
| 1510 | 1513 | * Optional. |
| … |
… |
function bbp_topic_author_link( $args = array() ) { |
| 1606 | 1609 | /** |
| 1607 | 1610 | * Output the author url of the topic |
| 1608 | 1611 | * |
| 1609 | | * @since bbPress (r2590) |
| | 1612 | * @since 2.0.0 bbPress (r2590) |
| 1610 | 1613 | * |
| 1611 | 1614 | * @param int $topic_id Optional. Topic id |
| 1612 | 1615 | * @uses bbp_get_topic_author_url() To get the topic author url |
| … |
… |
function bbp_topic_author_url( $topic_id = 0 ) { |
| 1618 | 1621 | /** |
| 1619 | 1622 | * Return the author url of the topic |
| 1620 | 1623 | * |
| 1621 | | * @since bbPress (r2590) |
| | 1624 | * @since 2.0.0 bbPress (r2590) |
| 1622 | 1625 | * |
| 1623 | 1626 | * @param int $topic_id Optional. Topic id |
| 1624 | 1627 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author_url( $topic_id = 0 ) { |
| 1653 | 1656 | /** |
| 1654 | 1657 | * Output the topic author email address |
| 1655 | 1658 | * |
| 1656 | | * @since bbPress (r3445) |
| | 1659 | * @since 2.0.0 bbPress (r3445) |
| 1657 | 1660 | * |
| 1658 | 1661 | * @param int $topic_id Optional. Reply id |
| 1659 | 1662 | * @uses bbp_get_topic_author_email() To get the topic author email |
| … |
… |
function bbp_topic_author_email( $topic_id = 0 ) { |
| 1664 | 1667 | /** |
| 1665 | 1668 | * Return the topic author email address |
| 1666 | 1669 | * |
| 1667 | | * @since bbPress (r3445) |
| | 1670 | * @since 2.0.0 bbPress (r3445) |
| 1668 | 1671 | * |
| 1669 | 1672 | * @param int $topic_id Optional. Reply id |
| 1670 | 1673 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author_email( $topic_id = 0 ) { |
| 1706 | 1709 | /** |
| 1707 | 1710 | * Output the topic author role |
| 1708 | 1711 | * |
| 1709 | | * @since bbPress (r3860) |
| | 1712 | * @since 2.1.0 bbPress (r3860) |
| 1710 | 1713 | * |
| 1711 | 1714 | * @param array $args Optional. |
| 1712 | 1715 | * @uses bbp_get_topic_author_role() To get the topic author role |
| … |
… |
function bbp_topic_author_role( $args = array() ) { |
| 1717 | 1720 | /** |
| 1718 | 1721 | * Return the topic author role |
| 1719 | 1722 | * |
| 1720 | | * @since bbPress (r3860) |
| | 1723 | * @since 2.1.0 bbPress (r3860) |
| 1721 | 1724 | * |
| 1722 | 1725 | * @param array $args Optional. |
| 1723 | 1726 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_author_role( $args = array() ) { |
| 1757 | 1760 | /** |
| 1758 | 1761 | * Output the title of the forum a topic belongs to |
| 1759 | 1762 | * |
| 1760 | | * @since bbPress (r2485) |
| | 1763 | * @since 2.0.0 bbPress (r2485) |
| 1761 | 1764 | * |
| 1762 | 1765 | * @param int $topic_id Optional. Topic id |
| 1763 | 1766 | * @uses bbp_get_topic_forum_title() To get the topic's forum title |
| … |
… |
function bbp_topic_forum_title( $topic_id = 0 ) { |
| 1768 | 1771 | /** |
| 1769 | 1772 | * Return the title of the forum a topic belongs to |
| 1770 | 1773 | * |
| 1771 | | * @since bbPress (r2485) |
| | 1774 | * @since 2.0.0 bbPress (r2485) |
| 1772 | 1775 | * |
| 1773 | 1776 | * @param int $topic_id Optional. Topic id |
| 1774 | 1777 | * @uses bbp_get_topic_id() To get topic id |
| … |
… |
function bbp_topic_forum_title( $topic_id = 0 ) { |
| 1787 | 1790 | /** |
| 1788 | 1791 | * Output the forum id a topic belongs to |
| 1789 | 1792 | * |
| 1790 | | * @since bbPress (r2491) |
| | 1793 | * @since 2.0.0 bbPress (r2491) |
| 1791 | 1794 | * |
| 1792 | 1795 | * @param int $topic_id Optional. Topic id |
| 1793 | 1796 | * @uses bbp_get_topic_forum_id() |
| … |
… |
function bbp_topic_forum_id( $topic_id = 0 ) { |
| 1798 | 1801 | /** |
| 1799 | 1802 | * Return the forum id a topic belongs to |
| 1800 | 1803 | * |
| 1801 | | * @since bbPress (r2491) |
| | 1804 | * @since 2.0.0 bbPress (r2491) |
| 1802 | 1805 | * |
| 1803 | 1806 | * @param int $topic_id Optional. Topic id |
| 1804 | 1807 | * @uses bbp_get_topic_id() To get topic id |
| … |
… |
function bbp_topic_forum_id( $topic_id = 0 ) { |
| 1817 | 1820 | /** |
| 1818 | 1821 | * Output the topics last active ID |
| 1819 | 1822 | * |
| 1820 | | * @since bbPress (r2860) |
| | 1823 | * @since 2.0.0 bbPress (r2860) |
| 1821 | 1824 | * |
| 1822 | 1825 | * @param int $topic_id Optional. Forum id |
| 1823 | 1826 | * @uses bbp_get_topic_last_active_id() To get the topic's last active id |
| … |
… |
function bbp_topic_last_active_id( $topic_id = 0 ) { |
| 1828 | 1831 | /** |
| 1829 | 1832 | * Return the topics last active ID |
| 1830 | 1833 | * |
| 1831 | | * @since bbPress (r2860) |
| | 1834 | * @since 2.0.0 bbPress (r2860) |
| 1832 | 1835 | * |
| 1833 | 1836 | * @param int $topic_id Optional. Forum id |
| 1834 | 1837 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_last_active_id( $topic_id = 0 ) { |
| 1847 | 1850 | /** |
| 1848 | 1851 | * Output the topics last update date/time (aka freshness) |
| 1849 | 1852 | * |
| 1850 | | * @since bbPress (r2625) |
| | 1853 | * @since 2.0.0 bbPress (r2625) |
| 1851 | 1854 | * |
| 1852 | 1855 | * @param int $topic_id Optional. Topic id |
| 1853 | 1856 | * @uses bbp_get_topic_last_active_time() To get topic freshness |
| … |
… |
function bbp_topic_last_active_time( $topic_id = 0 ) { |
| 1858 | 1861 | /** |
| 1859 | 1862 | * Return the topics last update date/time (aka freshness) |
| 1860 | 1863 | * |
| 1861 | | * @since bbPress (r2625) |
| | 1864 | * @since 2.0.0 bbPress (r2625) |
| 1862 | 1865 | * |
| 1863 | 1866 | * @param int $topic_id Optional. Topic id |
| 1864 | 1867 | * @uses bbp_get_topic_id() To get topic id |
| … |
… |
function bbp_topic_last_active_time( $topic_id = 0 ) { |
| 1896 | 1899 | /** |
| 1897 | 1900 | * Output the topic subscription link |
| 1898 | 1901 | * |
| 1899 | | * @since bbPress (r5156) |
| | 1902 | * @since 2.5.0 bbPress (r5156) |
| 1900 | 1903 | * |
| 1901 | 1904 | * @uses bbp_get_topic_subscription_link() |
| 1902 | 1905 | */ |
| … |
… |
function bbp_topic_subscription_link( $args = array() ) { |
| 1909 | 1912 | * |
| 1910 | 1913 | * A custom wrapper for bbp_get_user_subscribe_link() |
| 1911 | 1914 | * |
| 1912 | | * @since bbPress (r5156) |
| | 1915 | * @since 2.5.0 bbPress (r5156) |
| 1913 | 1916 | * |
| 1914 | 1917 | * @uses bbp_parse_args() |
| 1915 | 1918 | * @uses bbp_get_user_subscribe_link() |
| … |
… |
function bbp_topic_subscription_link( $args = array() ) { |
| 1941 | 1944 | /** |
| 1942 | 1945 | * Output the topic favorite link |
| 1943 | 1946 | * |
| 1944 | | * @since bbPress (r5156) |
| | 1947 | * @since 2.5.0 bbPress (r5156) |
| 1945 | 1948 | * |
| 1946 | 1949 | * @uses bbp_get_topic_favorite_link() |
| 1947 | 1950 | */ |
| … |
… |
function bbp_topic_favorite_link( $args = array() ) { |
| 1954 | 1957 | * |
| 1955 | 1958 | * A custom wrapper for bbp_get_user_favorite_link() |
| 1956 | 1959 | * |
| 1957 | | * @since bbPress (r5156) |
| | 1960 | * @since 2.5.0 bbPress (r5156) |
| 1958 | 1961 | * |
| 1959 | 1962 | * @uses bbp_parse_args() |
| 1960 | 1963 | * @uses bbp_get_user_favorites_link() |
| … |
… |
function bbp_topic_favorite_link( $args = array() ) { |
| 1986 | 1989 | /** |
| 1987 | 1990 | * Output the id of the topics last reply |
| 1988 | 1991 | * |
| 1989 | | * @since bbPress (r2625) |
| | 1992 | * @since 2.0.0 bbPress (r2625) |
| 1990 | 1993 | * |
| 1991 | 1994 | * @param int $topic_id Optional. Topic id |
| 1992 | 1995 | * @uses bbp_get_topic_last_reply_id() To get the topic last reply id |
| … |
… |
function bbp_topic_last_reply_id( $topic_id = 0 ) { |
| 1997 | 2000 | /** |
| 1998 | 2001 | * Return the topics last update date/time (aka freshness) |
| 1999 | 2002 | * |
| 2000 | | * @since bbPress (r2625) |
| | 2003 | * @since 2.0.0 bbPress (r2625) |
| 2001 | 2004 | * |
| 2002 | 2005 | * @param int $topic_id Optional. Topic id |
| 2003 | 2006 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_last_reply_title( $topic_id = 0 ) { |
| 2044 | 2047 | /** |
| 2045 | 2048 | * Output the link to the last reply in a topic |
| 2046 | 2049 | * |
| 2047 | | * @since bbPress (r2464) |
| | 2050 | * @since 2.0.0 bbPress (r2464) |
| 2048 | 2051 | * |
| 2049 | 2052 | * @param int $topic_id Optional. Topic id |
| 2050 | 2053 | * @uses bbp_get_topic_last_reply_permalink() To get the topic's last reply link |
| … |
… |
function bbp_topic_last_reply_permalink( $topic_id = 0 ) { |
| 2055 | 2058 | /** |
| 2056 | 2059 | * Return the link to the last reply in a topic |
| 2057 | 2060 | * |
| 2058 | | * @since bbPress (r2464) |
| | 2061 | * @since 2.0.0 bbPress (r2464) |
| 2059 | 2062 | * |
| 2060 | 2063 | * @param int $topic_id Optional. Topic id |
| 2061 | 2064 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_last_reply_permalink( $topic_id = 0 ) { |
| 2076 | 2079 | /** |
| 2077 | 2080 | * Output the link to the last reply in a topic |
| 2078 | 2081 | * |
| 2079 | | * @since bbPress (r2683) |
| | 2082 | * @since 2.0.0 bbPress (r2683) |
| 2080 | 2083 | * |
| 2081 | 2084 | * @param int $topic_id Optional. Topic id |
| 2082 | 2085 | * @uses bbp_get_topic_last_reply_url() To get the topic last reply url |
| … |
… |
function bbp_topic_last_reply_url( $topic_id = 0 ) { |
| 2087 | 2090 | /** |
| 2088 | 2091 | * Return the link to the last reply in a topic |
| 2089 | 2092 | * |
| 2090 | | * @since bbPress (r2683) |
| | 2093 | * @since 2.0.0 bbPress (r2683) |
| 2091 | 2094 | * |
| 2092 | 2095 | * @param int $topic_id Optional. Topic id |
| 2093 | 2096 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_last_reply_url( $topic_id = 0 ) { |
| 2115 | 2118 | * Output link to the most recent activity inside a topic, complete with link |
| 2116 | 2119 | * attributes and content. |
| 2117 | 2120 | * |
| 2118 | | * @since bbPress (r2625) |
| | 2121 | * @since 2.0.0 bbPress (r2625) |
| 2119 | 2122 | * |
| 2120 | 2123 | * @param int $topic_id Optional. Topic id |
| 2121 | 2124 | * @uses bbp_get_topic_freshness_link() To get the topic freshness link |
| … |
… |
function bbp_topic_freshness_link( $topic_id = 0 ) { |
| 2127 | 2130 | * Returns link to the most recent activity inside a topic, complete |
| 2128 | 2131 | * with link attributes and content. |
| 2129 | 2132 | * |
| 2130 | | * @since bbPress (r2625) |
| | 2133 | * @since 2.0.0 bbPress (r2625) |
| 2131 | 2134 | * |
| 2132 | 2135 | * @param int $topic_id Optional. Topic id |
| 2133 | 2136 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_freshness_link( $topic_id = 0 ) { |
| 2156 | 2159 | /** |
| 2157 | 2160 | * Output the replies link of the topic |
| 2158 | 2161 | * |
| 2159 | | * @since bbPress (r2740) |
| | 2162 | * @since 2.0.0 bbPress (r2740) |
| 2160 | 2163 | * |
| 2161 | 2164 | * @param int $topic_id Optional. Topic id |
| 2162 | 2165 | * @uses bbp_get_topic_replies_link() To get the topic replies link |
| … |
… |
function bbp_topic_replies_link( $topic_id = 0 ) { |
| 2168 | 2171 | /** |
| 2169 | 2172 | * Return the replies link of the topic |
| 2170 | 2173 | * |
| 2171 | | * @since bbPress (r2740) |
| | 2174 | * @since 2.0.0 bbPress (r2740) |
| 2172 | 2175 | * |
| 2173 | 2176 | * @param int $topic_id Optional. Topic id |
| 2174 | 2177 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_replies_link( $topic_id = 0 ) { |
| 2221 | 2224 | /** |
| 2222 | 2225 | * Output total reply count of a topic |
| 2223 | 2226 | * |
| 2224 | | * @since bbPress (r2485) |
| | 2227 | * @since 2.0.0 bbPress (r2485) |
| 2225 | 2228 | * |
| 2226 | 2229 | * @param int $topic_id Optional. Topic id |
| 2227 | 2230 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_reply_count( $topic_id = 0, $integer = false ) { |
| 2233 | 2236 | /** |
| 2234 | 2237 | * Return total reply count of a topic |
| 2235 | 2238 | * |
| 2236 | | * @since bbPress (r2485) |
| | 2239 | * @since 2.0.0 bbPress (r2485) |
| 2237 | 2240 | * |
| 2238 | 2241 | * @param int $topic_id Optional. Topic id |
| 2239 | 2242 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_reply_count( $topic_id = 0, $integer = false ) { |
| 2254 | 2257 | /** |
| 2255 | 2258 | * Output total post count of a topic |
| 2256 | 2259 | * |
| 2257 | | * @since bbPress (r2954) |
| | 2260 | * @since 2.0.0 bbPress (r2954) |
| 2258 | 2261 | * |
| 2259 | 2262 | * @param int $topic_id Optional. Topic id |
| 2260 | 2263 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_post_count( $topic_id = 0, $integer = false ) { |
| 2266 | 2269 | /** |
| 2267 | 2270 | * Return total post count of a topic |
| 2268 | 2271 | * |
| 2269 | | * @since bbPress (r2954) |
| | 2272 | * @since 2.0.0 bbPress (r2954) |
| 2270 | 2273 | * |
| 2271 | 2274 | * @param int $topic_id Optional. Topic id |
| 2272 | 2275 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_post_count( $topic_id = 0, $integer = false ) { |
| 2288 | 2291 | * Output total hidden reply count of a topic (hidden includes trashed and |
| 2289 | 2292 | * spammed replies) |
| 2290 | 2293 | * |
| 2291 | | * @since bbPress (r2740) |
| | 2294 | * @since 2.0.0 bbPress (r2740) |
| 2292 | 2295 | * |
| 2293 | 2296 | * @param int $topic_id Optional. Topic id |
| 2294 | 2297 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_reply_count_hidden( $topic_id = 0, $integer = false ) { |
| 2301 | 2304 | * Return total hidden reply count of a topic (hidden includes trashed |
| 2302 | 2305 | * and spammed replies) |
| 2303 | 2306 | * |
| 2304 | | * @since bbPress (r2740) |
| | 2307 | * @since 2.0.0 bbPress (r2740) |
| 2305 | 2308 | * |
| 2306 | 2309 | * @param int $topic_id Optional. Topic id |
| 2307 | 2310 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_topic_reply_count_hidden( $topic_id = 0, $integer = false ) { |
| 2322 | 2325 | /** |
| 2323 | 2326 | * Output total voice count of a topic |
| 2324 | 2327 | * |
| 2325 | | * @since bbPress (r2567) |
| | 2328 | * @since 2.0.0 bbPress (r2567) |
| 2326 | 2329 | * |
| 2327 | 2330 | * @param int $topic_id Optional. Topic id |
| 2328 | 2331 | * @uses bbp_get_topic_voice_count() To get the topic voice count |
| … |
… |
function bbp_topic_voice_count( $topic_id = 0, $integer = false ) { |
| 2333 | 2336 | /** |
| 2334 | 2337 | * Return total voice count of a topic |
| 2335 | 2338 | * |
| 2336 | | * @since bbPress (r2567) |
| | 2339 | * @since 2.0.0 bbPress (r2567) |
| 2337 | 2340 | * |
| 2338 | 2341 | * @param int $topic_id Optional. Topic id |
| 2339 | 2342 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_voice_count( $topic_id = 0, $integer = false ) { |
| 2353 | 2356 | /** |
| 2354 | 2357 | * Output a the tags of a topic |
| 2355 | 2358 | * |
| 2356 | | * @since bbPress (r2688) |
| | 2359 | * @since 2.0.0 bbPress (r2688) |
| 2357 | 2360 | * |
| 2358 | 2361 | * @param int $topic_id Optional. Topic id |
| 2359 | 2362 | * @param array $args See {@link bbp_get_topic_tag_list()} |
| … |
… |
function bbp_topic_tag_list( $topic_id = 0, $args = array() ) { |
| 2365 | 2368 | /** |
| 2366 | 2369 | * Return the tags of a topic |
| 2367 | 2370 | * |
| 2368 | | * @since bbPress (r2688) |
| | 2371 | * @since 2.0.0 bbPress (r2688) |
| 2369 | 2372 | * |
| 2370 | 2373 | * @param int $topic_id Optional. Topic id |
| 2371 | 2374 | * @param array $args This function supports these arguments: |
| … |
… |
function bbp_topic_tag_list( $topic_id = 0, $args = array() ) { |
| 2422 | 2425 | /** |
| 2423 | 2426 | * Output the row class of a topic |
| 2424 | 2427 | * |
| 2425 | | * @since bbPress (r2667) |
| | 2428 | * @since 2.0.0 bbPress (r2667) |
| 2426 | 2429 | * |
| 2427 | 2430 | * @param int $topic_id Optional. Topic id |
| 2428 | 2431 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_topic_class( $topic_id = 0, $classes = array() ) { |
| 2434 | 2437 | /** |
| 2435 | 2438 | * Return the row class of a topic |
| 2436 | 2439 | * |
| 2437 | | * @since bbPress (r2667) |
| | 2440 | * @since 2.0.0 bbPress (r2667) |
| 2438 | 2441 | * |
| 2439 | 2442 | * @param int $topic_id Optional. Topic id |
| 2440 | 2443 | * @param array Extra classes you can pass when calling this function |
| … |
… |
function bbp_topic_admin_links( $args = array() ) { |
| 2550 | 2553 | /** |
| 2551 | 2554 | * Output the edit link of the topic |
| 2552 | 2555 | * |
| 2553 | | * @since bbPress (r2727) |
| | 2556 | * @since 2.0.0 bbPress (r2727) |
| 2554 | 2557 | * |
| 2555 | 2558 | * @param array $args See {@link bbp_get_topic_edit_link()} |
| 2556 | 2559 | * @uses bbp_get_topic_edit_link() To get the topic edit link |
| … |
… |
function bbp_topic_edit_link( $args = array() ) { |
| 2562 | 2565 | /** |
| 2563 | 2566 | * Return the edit link of the topic |
| 2564 | 2567 | * |
| 2565 | | * @since bbPress (r2727) |
| | 2568 | * @since 2.0.0 bbPress (r2727) |
| 2566 | 2569 | * |
| 2567 | 2570 | * @param array $args This function supports these args: |
| 2568 | 2571 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_edit_link( $args = array() ) { |
| 2616 | 2619 | /** |
| 2617 | 2620 | * Output URL to the topic edit page |
| 2618 | 2621 | * |
| 2619 | | * @since bbPress (r2753) |
| | 2622 | * @since 2.0.0 bbPress (r2753) |
| 2620 | 2623 | * |
| 2621 | 2624 | * @param int $topic_id Optional. Topic id |
| 2622 | 2625 | * @uses bbp_get_topic_edit_url() To get the topic edit url |
| … |
… |
function bbp_topic_edit_url( $topic_id = 0 ) { |
| 2627 | 2630 | /** |
| 2628 | 2631 | * Return URL to the topic edit page |
| 2629 | 2632 | * |
| 2630 | | * @since bbPress (r2753) |
| | 2633 | * @since 2.0.0 bbPress (r2753) |
| 2631 | 2634 | * |
| 2632 | 2635 | * @param int $topic_id Optional. Topic id |
| 2633 | 2636 | * @uses bbp_get_topic_id() To get the topic id |
| … |
… |
function bbp_topic_edit_url( $topic_id = 0 ) { |
| 2669 | 2672 | /** |
| 2670 | 2673 | * Output the trash link of the topic |
| 2671 | 2674 | * |
| 2672 | | * @since bbPress (r2727) |
| | 2675 | * @since 2.0.0 bbPress (r2727) |
| 2673 | 2676 | * |
| 2674 | 2677 | * @param array $args See {@link bbp_get_topic_trash_link()} |
| 2675 | 2678 | * @uses bbp_get_topic_trash_link() To get the topic trash link |
| … |
… |
function bbp_topic_trash_link( $args = array() ) { |
| 2681 | 2684 | /** |
| 2682 | 2685 | * Return the trash link of the topic |
| 2683 | 2686 | * |
| 2684 | | * @since bbPress (r2727) |
| | 2687 | * @since 2.0.0 bbPress (r2727) |
| 2685 | 2688 | * |
| 2686 | 2689 | * @param array $args This function supports these args: |
| 2687 | 2690 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_trash_link( $args = array() ) { |
| 2744 | 2747 | /** |
| 2745 | 2748 | * Output the close link of the topic |
| 2746 | 2749 | * |
| 2747 | | * @since bbPress (r2727) |
| | 2750 | * @since 2.0.0 bbPress (r2727) |
| 2748 | 2751 | * |
| 2749 | 2752 | * @param array $args See {@link bbp_get_topic_close_link()} |
| 2750 | 2753 | * @uses bbp_get_topic_close_link() To get the topic close link |
| … |
… |
function bbp_topic_close_link( $args = array() ) { |
| 2756 | 2759 | /** |
| 2757 | 2760 | * Return the close link of the topic |
| 2758 | 2761 | * |
| 2759 | | * @since bbPress (r2727) |
| | 2762 | * @since 2.0.0 bbPress (r2727) |
| 2760 | 2763 | * |
| 2761 | 2764 | * @param array $args This function supports these args: |
| 2762 | 2765 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_close_link( $args = array() ) { |
| 2804 | 2807 | /** |
| 2805 | 2808 | * Output the approve link of the topic |
| 2806 | 2809 | * |
| 2807 | | * @since bbPress (r5504) |
| | 2810 | * @since 2.6.0 bbPress (r5504) |
| 2808 | 2811 | * |
| 2809 | 2812 | * @param array $args See {@link bbp_get_topic_approve_link()} |
| 2810 | 2813 | * @uses bbp_get_topic_approve_link() To get the topic approve link |
| … |
… |
function bbp_topic_approve_link( $args = array() ) { |
| 2816 | 2819 | /** |
| 2817 | 2820 | * Return the approve link of the topic |
| 2818 | 2821 | * |
| 2819 | | * @since bbPress (r5504) |
| | 2822 | * @since 2.6.0 bbPress (r5504) |
| 2820 | 2823 | * |
| 2821 | 2824 | * @param array $args This function supports these args: |
| 2822 | 2825 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_approve_link( $args = array() ) { |
| 2865 | 2868 | /** |
| 2866 | 2869 | * Output the stick link of the topic |
| 2867 | 2870 | * |
| 2868 | | * @since bbPress (r2754) |
| | 2871 | * @since 2.0.0 bbPress (r2754) |
| 2869 | 2872 | * |
| 2870 | 2873 | * @param array $args See {@link bbp_get_topic_stick_link()} |
| 2871 | 2874 | * @uses bbp_get_topic_stick_link() To get the topic stick link |
| … |
… |
function bbp_topic_stick_link( $args = array() ) { |
| 2877 | 2880 | /** |
| 2878 | 2881 | * Return the stick link of the topic |
| 2879 | 2882 | * |
| 2880 | | * @since bbPress (r2754) |
| | 2883 | * @since 2.0.0 bbPress (r2754) |
| 2881 | 2884 | * |
| 2882 | 2885 | * @param array $args This function supports these args: |
| 2883 | 2886 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_stick_link( $args = array() ) { |
| 2942 | 2945 | /** |
| 2943 | 2946 | * Output the merge link of the topic |
| 2944 | 2947 | * |
| 2945 | | * @since bbPress (r2756) |
| | 2948 | * @since 2.0.0 bbPress (r2756) |
| 2946 | 2949 | * |
| 2947 | 2950 | * @param array $args |
| 2948 | 2951 | * @uses bbp_get_topic_merge_link() To get the topic merge link |
| … |
… |
function bbp_topic_merge_link( $args = array() ) { |
| 2954 | 2957 | /** |
| 2955 | 2958 | * Return the merge link of the topic |
| 2956 | 2959 | * |
| 2957 | | * @since bbPress (r2756) |
| | 2960 | * @since 2.0.0 bbPress (r2756) |
| 2958 | 2961 | * |
| 2959 | 2962 | * @param array $args This function supports these args: |
| 2960 | 2963 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_merge_link( $args = array() ) { |
| 2995 | 2998 | /** |
| 2996 | 2999 | * Output the spam link of the topic |
| 2997 | 3000 | * |
| 2998 | | * @since bbPress (r2727) |
| | 3001 | * @since 2.0.0 bbPress (r2727) |
| 2999 | 3002 | * |
| 3000 | 3003 | * @param array $args See {@link bbp_get_topic_spam_link()} |
| 3001 | 3004 | * @uses bbp_get_topic_spam_link() Topic spam link |
| … |
… |
function bbp_topic_spam_link( $args = array() ) { |
| 3007 | 3010 | /** |
| 3008 | 3011 | * Return the spam link of the topic |
| 3009 | 3012 | * |
| 3010 | | * @since bbPress (r2727) |
| | 3013 | * @since 2.0.0 bbPress (r2727) |
| 3011 | 3014 | * |
| 3012 | 3015 | * @param array $args This function supports these args: |
| 3013 | 3016 | * - id: Optional. Topic id |
| … |
… |
function bbp_topic_spam_link( $args = array() ) { |
| 3055 | 3058 | /** |
| 3056 | 3059 | * Output the link to go directly to the reply form |
| 3057 | 3060 | * |
| 3058 | | * @since bbPress (r4966) |
| | 3061 | * @since 2.4.0 bbPress (r4966) |
| 3059 | 3062 | * |
| 3060 | 3063 | * @param array $args |
| 3061 | 3064 | * @uses bbp_get_reply_to_link() To get the reply to link |
| … |
… |
function bbp_topic_reply_link( $args = array() ) { |
| 3067 | 3070 | /** |
| 3068 | 3071 | * Return the link to go directly to the reply form |
| 3069 | 3072 | * |
| 3070 | | * @since bbPress (r4966) |
| | 3073 | * @since 2.4.0 bbPress (r4966) |
| 3071 | 3074 | * |
| 3072 | 3075 | * @param array $args Arguments |
| 3073 | 3076 | * @uses bbp_current_user_can_access_create_reply_form() To check permissions |
| … |
… |
function bbp_topic_reply_link( $args = array() ) { |
| 3109 | 3112 | /** |
| 3110 | 3113 | * Output the pagination count |
| 3111 | 3114 | * |
| 3112 | | * @since bbPress (r2519) |
| | 3115 | * @since 2.0.0 bbPress (r2519) |
| 3113 | 3116 | * |
| 3114 | 3117 | * @uses bbp_get_forum_pagination_count() To get the forum pagination count |
| 3115 | 3118 | */ |
| … |
… |
function bbp_forum_pagination_count() { |
| 3119 | 3122 | /** |
| 3120 | 3123 | * Return the pagination count |
| 3121 | 3124 | * |
| 3122 | | * @since bbPress (r2519) |
| | 3125 | * @since 2.0.0 bbPress (r2519) |
| 3123 | 3126 | * |
| 3124 | 3127 | * @uses bbp_number_format() To format the number value |
| 3125 | 3128 | * @uses apply_filters() Calls 'bbp_get_forum_pagination_count' with the |
| … |
… |
function bbp_forum_pagination_count() { |
| 3156 | 3159 | /** |
| 3157 | 3160 | * Output pagination links |
| 3158 | 3161 | * |
| 3159 | | * @since bbPress (r2519) |
| | 3162 | * @since 2.0.0 bbPress (r2519) |
| 3160 | 3163 | * |
| 3161 | 3164 | * @uses bbp_get_forum_pagination_links() To get the pagination links |
| 3162 | 3165 | */ |
| … |
… |
function bbp_forum_pagination_links() { |
| 3166 | 3169 | /** |
| 3167 | 3170 | * Return pagination links |
| 3168 | 3171 | * |
| 3169 | | * @since bbPress (r2519) |
| | 3172 | * @since 2.0.0 bbPress (r2519) |
| 3170 | 3173 | * |
| 3171 | 3174 | * @uses bbPress::topic_query::pagination_links To get the links |
| 3172 | 3175 | * @return string Pagination links |
| … |
… |
function bbp_forum_pagination_links() { |
| 3184 | 3187 | /** |
| 3185 | 3188 | * Displays topic notices |
| 3186 | 3189 | * |
| 3187 | | * @since bbPress (r2744) |
| | 3190 | * @since 2.0.0 bbPress (r2744) |
| 3188 | 3191 | * |
| 3189 | 3192 | * @uses bbp_is_single_topic() To check if it's a topic page |
| 3190 | 3193 | * @uses bbp_get_topic_status() To get the topic status |
| … |
… |
function bbp_topic_notices() { |
| 3234 | 3237 | /** |
| 3235 | 3238 | * Displays topic type select box (normal/sticky/super sticky) |
| 3236 | 3239 | * |
| 3237 | | * @since bbPress (r5059) |
| 3238 | | * @deprecated since bbPress (r5059) |
| | 3240 | * @since 2.0.0 bbPress (r2784) |
| | 3241 | * |
| | 3242 | * @deprecated 2.4.0 bbPress (r5059) |
| 3239 | 3243 | * |
| 3240 | 3244 | * @param $args This function supports these arguments: |
| 3241 | 3245 | * - select_id: Select id. Defaults to bbp_stick_topic |
| … |
… |
function bbp_topic_type_select( $args = array() ) { |
| 3250 | 3254 | /** |
| 3251 | 3255 | * Displays topic type select box (normal/sticky/super sticky) |
| 3252 | 3256 | * |
| 3253 | | * @since bbPress (r5059) |
| | 3257 | * @since 2.4.0 bbPress (r5059) |
| 3254 | 3258 | * |
| 3255 | 3259 | * @param $args This function supports these arguments: |
| 3256 | 3260 | * - select_id: Select id. Defaults to bbp_stick_topic |
| … |
… |
function bbp_form_topic_type_dropdown( $args = array() ) { |
| 3264 | 3268 | /** |
| 3265 | 3269 | * Returns topic type select box (normal/sticky/super sticky) |
| 3266 | 3270 | * |
| 3267 | | * @since bbPress (r5059) |
| | 3271 | * @since 2.4.0 bbPress (r5059) |
| 3268 | 3272 | * |
| 3269 | 3273 | * @param $args This function supports these arguments: |
| 3270 | 3274 | * - select_id: Select id. Defaults to bbp_stick_topic |
| … |
… |
function bbp_form_topic_type_dropdown( $args = array() ) { |
| 3341 | 3345 | /** |
| 3342 | 3346 | * Output value topic status dropdown |
| 3343 | 3347 | * |
| 3344 | | * @since bbPress (r5059) |
| | 3348 | * @since 2.4.0 bbPress (r5059) |
| 3345 | 3349 | * |
| 3346 | 3350 | * @param $args This function supports these arguments: |
| 3347 | 3351 | * - select_id: Select id. Defaults to bbp_topic_status |
| … |
… |
function bbp_form_topic_status_dropdown( $args = array() ) { |
| 3359 | 3363 | * capability. Because of this, no additional capablitiy checks are performed |
| 3360 | 3364 | * within this function to check available topic statuses. |
| 3361 | 3365 | * |
| 3362 | | * @since bbPress (r5059) |
| | 3366 | * @since 2.4.0 bbPress (r5059) |
| 3363 | 3367 | * |
| 3364 | 3368 | * @param $args This function supports these arguments: |
| 3365 | 3369 | * - select_id: Select id. Defaults to bbp_topic_status |
| … |
… |
function bbp_form_topic_status_dropdown( $args = array() ) { |
| 3428 | 3432 | * Output a fancy description of the current topic, including total topics, |
| 3429 | 3433 | * total replies, and last activity. |
| 3430 | 3434 | * |
| 3431 | | * @since bbPress (r2860) |
| | 3435 | * @since 2.0.0 bbPress (r2860) |
| 3432 | 3436 | * |
| 3433 | 3437 | * @param array $args See {@link bbp_get_single_topic_description()} |
| 3434 | 3438 | * @uses bbp_get_single_topic_description() Return the eventual output |
| … |
… |
function bbp_single_topic_description( $args = array() ) { |
| 3440 | 3444 | * Return a fancy description of the current topic, including total topics, |
| 3441 | 3445 | * total replies, and last activity. |
| 3442 | 3446 | * |
| 3443 | | * @since bbPress (r2860) |
| | 3447 | * @since 2.0.0 bbPress (r2860) |
| 3444 | 3448 | * |
| 3445 | 3449 | * @param array $args This function supports these arguments: |
| 3446 | 3450 | * - topic_id: Topic id |
| … |
… |
function bbp_single_topic_description( $args = array() ) { |
| 3512 | 3516 | /** |
| 3513 | 3517 | * Output the unique id of the topic tag taxonomy |
| 3514 | 3518 | * |
| 3515 | | * @since bbPress (r3348) |
| | 3519 | * @since 2.0.0 bbPress (r3348) |
| 3516 | 3520 | * |
| 3517 | 3521 | * @uses bbp_get_topic_post_type() To get the topic post type |
| 3518 | 3522 | */ |
| … |
… |
function bbp_topic_tag_tax_id() { |
| 3522 | 3526 | /** |
| 3523 | 3527 | * Return the unique id of the topic tag taxonomy |
| 3524 | 3528 | * |
| 3525 | | * @since bbPress (r3348) |
| | 3529 | * @since 2.0.0 bbPress (r3348) |
| 3526 | 3530 | * |
| 3527 | 3531 | * @uses apply_filters() Calls 'bbp_get_topic_tag_tax_id' with the topic tax id |
| 3528 | 3532 | * @return string The unique topic tag taxonomy |
| … |
… |
function bbp_topic_tag_tax_id() { |
| 3534 | 3538 | /** |
| 3535 | 3539 | * Return array of labels used by the topic-tag taxonomy |
| 3536 | 3540 | * |
| 3537 | | * @since bbPress (r5129) |
| | 3541 | * @since 2.5.0 bbPress (r5129) |
| 3538 | 3542 | * |
| 3539 | 3543 | * @return array |
| 3540 | 3544 | */ |
| … |
… |
function bbp_get_topic_tag_tax_labels() { |
| 3557 | 3561 | /** |
| 3558 | 3562 | * Return an array of topic-tag taxonomy rewrite settings |
| 3559 | 3563 | * |
| 3560 | | * @since bbPress (r5129) |
| | 3564 | * @since 2.5.0 bbPress (r5129) |
| 3561 | 3565 | * |
| 3562 | 3566 | * @return array |
| 3563 | 3567 | */ |
| … |
… |
function bbp_get_topic_tag_tax_rewrite() { |
| 3571 | 3575 | /** |
| 3572 | 3576 | * Output the id of the current tag |
| 3573 | 3577 | * |
| 3574 | | * @since bbPress (r3109) |
| | 3578 | * @since 2.0.0 bbPress (r3109) |
| 3575 | 3579 | * |
| 3576 | 3580 | * @uses bbp_get_topic_tag_id() |
| 3577 | 3581 | */ |
| … |
… |
function bbp_topic_tag_id( $tag = '' ) { |
| 3581 | 3585 | /** |
| 3582 | 3586 | * Return the id of the current tag |
| 3583 | 3587 | * |
| 3584 | | * @since bbPress (r3109) |
| | 3588 | * @since 2.0.0 bbPress (r3109) |
| 3585 | 3589 | * |
| 3586 | 3590 | * @uses get_term_by() |
| 3587 | 3591 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_id( $tag = '' ) { |
| 3615 | 3619 | /** |
| 3616 | 3620 | * Output the name of the current tag |
| 3617 | 3621 | * |
| 3618 | | * @since bbPress (r3109) |
| | 3622 | * @since 2.0.0 bbPress (r3109) |
| 3619 | 3623 | * |
| 3620 | 3624 | * @uses bbp_get_topic_tag_name() |
| 3621 | 3625 | */ |
| … |
… |
function bbp_topic_tag_name( $tag = '' ) { |
| 3625 | 3629 | /** |
| 3626 | 3630 | * Return the name of the current tag |
| 3627 | 3631 | * |
| 3628 | | * @since bbPress (r3109) |
| | 3632 | * @since 2.0.0 bbPress (r3109) |
| 3629 | 3633 | * |
| 3630 | 3634 | * @uses get_term_by() |
| 3631 | 3635 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_name( $tag = '' ) { |
| 3659 | 3663 | /** |
| 3660 | 3664 | * Output the slug of the current tag |
| 3661 | 3665 | * |
| 3662 | | * @since bbPress (r3109) |
| | 3666 | * @since 2.0.0 bbPress (r3109) |
| 3663 | 3667 | * |
| 3664 | 3668 | * @uses bbp_get_topic_tag_slug() |
| 3665 | 3669 | */ |
| … |
… |
function bbp_topic_tag_slug( $tag = '' ) { |
| 3669 | 3673 | /** |
| 3670 | 3674 | * Return the slug of the current tag |
| 3671 | 3675 | * |
| 3672 | | * @since bbPress (r3109) |
| | 3676 | * @since 2.0.0 bbPress (r3109) |
| 3673 | 3677 | * |
| 3674 | 3678 | * @uses get_term_by() |
| 3675 | 3679 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_slug( $tag = '' ) { |
| 3703 | 3707 | /** |
| 3704 | 3708 | * Output the link of the current tag |
| 3705 | 3709 | * |
| 3706 | | * @since bbPress (r3348) |
| | 3710 | * @since 2.0.0 bbPress (r3348) |
| 3707 | 3711 | * |
| 3708 | 3712 | * @uses bbp_get_topic_tag_link() |
| 3709 | 3713 | */ |
| … |
… |
function bbp_topic_tag_link( $tag = '' ) { |
| 3713 | 3717 | /** |
| 3714 | 3718 | * Return the link of the current tag |
| 3715 | 3719 | * |
| 3716 | | * @since bbPress (r3348) |
| | 3720 | * @since 2.0.0 bbPress (r3348) |
| 3717 | 3721 | * |
| 3718 | 3722 | * @uses get_term_by() |
| 3719 | 3723 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_link( $tag = '' ) { |
| 3747 | 3751 | /** |
| 3748 | 3752 | * Output the link of the current tag |
| 3749 | 3753 | * |
| 3750 | | * @since bbPress (r3348) |
| | 3754 | * @since 2.0.0 bbPress (r3348) |
| 3751 | 3755 | * |
| 3752 | 3756 | * @uses bbp_get_topic_tag_edit_link() |
| 3753 | 3757 | */ |
| … |
… |
function bbp_topic_tag_edit_link( $tag = '' ) { |
| 3757 | 3761 | /** |
| 3758 | 3762 | * Return the link of the current tag |
| 3759 | 3763 | * |
| 3760 | | * @since bbPress (r3348) |
| | 3764 | * @since 2.0.0 bbPress (r3348) |
| 3761 | 3765 | * |
| 3762 | 3766 | * @uses get_term_by() |
| 3763 | 3767 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_edit_link( $tag = '' ) { |
| 3799 | 3803 | /** |
| 3800 | 3804 | * Output the description of the current tag |
| 3801 | 3805 | * |
| 3802 | | * @since bbPress (r3109) |
| | 3806 | * @since 2.0.0 bbPress (r3109) |
| 3803 | 3807 | * |
| 3804 | 3808 | * @uses bbp_get_topic_tag_description() |
| 3805 | 3809 | */ |
| … |
… |
function bbp_topic_tag_description( $args = array() ) { |
| 3809 | 3813 | /** |
| 3810 | 3814 | * Return the description of the current tag |
| 3811 | 3815 | * |
| 3812 | | * @since bbPress (r3109) |
| | 3816 | * @since 2.0.0 bbPress (r3109) |
| 3813 | 3817 | * |
| 3814 | 3818 | * @uses get_term_by() |
| 3815 | 3819 | * @uses get_queried_object() |
| … |
… |
function bbp_topic_tag_description( $args = array() ) { |
| 3854 | 3858 | /** |
| 3855 | 3859 | * Output the value of topic title field |
| 3856 | 3860 | * |
| 3857 | | * @since bbPress (r2976) |
| | 3861 | * @since 2.0.0 bbPress (r2976) |
| 3858 | 3862 | * |
| 3859 | 3863 | * @uses bbp_get_form_topic_title() To get the value of topic title field |
| 3860 | 3864 | */ |
| … |
… |
function bbp_form_topic_title() { |
| 3864 | 3868 | /** |
| 3865 | 3869 | * Return the value of topic title field |
| 3866 | 3870 | * |
| 3867 | | * @since bbPress (r2976) |
| | 3871 | * @since 2.0.0 bbPress (r2976) |
| 3868 | 3872 | * |
| 3869 | 3873 | * @uses bbp_is_topic_edit() To check if it's topic edit page |
| 3870 | 3874 | * @uses apply_filters() Calls 'bbp_get_form_topic_title' with the title |
| … |
… |
function bbp_form_topic_title() { |
| 3891 | 3895 | /** |
| 3892 | 3896 | * Output the value of topic content field |
| 3893 | 3897 | * |
| 3894 | | * @since bbPress (r2976) |
| | 3898 | * @since 2.0.0 bbPress (r2976) |
| 3895 | 3899 | * |
| 3896 | 3900 | * @uses bbp_get_form_topic_content() To get value of topic content field |
| 3897 | 3901 | */ |
| … |
… |
function bbp_form_topic_content() { |
| 3901 | 3905 | /** |
| 3902 | 3906 | * Return the value of topic content field |
| 3903 | 3907 | * |
| 3904 | | * @since bbPress (r2976) |
| | 3908 | * @since 2.0.0 bbPress (r2976) |
| 3905 | 3909 | * |
| 3906 | 3910 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 3907 | 3911 | * @uses apply_filters() Calls 'bbp_get_form_topic_content' with the content |
| … |
… |
function bbp_form_topic_content() { |
| 3928 | 3932 | /** |
| 3929 | 3933 | * Allow topic rows to have adminstrative actions |
| 3930 | 3934 | * |
| 3931 | | * @since bbPress (r3653) |
| | 3935 | * @since 2.1.0 bbPress (r3653) |
| | 3936 | * |
| 3932 | 3937 | * @uses do_action() |
| 3933 | 3938 | * @todo Links and filter |
| 3934 | 3939 | */ |
| … |
… |
function bbp_topic_row_actions() { |
| 3939 | 3944 | /** |
| 3940 | 3945 | * Output value of topic tags field |
| 3941 | 3946 | * |
| 3942 | | * @since bbPress (r2976) |
| | 3947 | * @since 2.0.0 bbPress (r2976) |
| | 3948 | * |
| 3943 | 3949 | * @uses bbp_get_form_topic_tags() To get the value of topic tags field |
| 3944 | 3950 | */ |
| 3945 | 3951 | function bbp_form_topic_tags() { |
| … |
… |
function bbp_form_topic_tags() { |
| 3948 | 3954 | /** |
| 3949 | 3955 | * Return value of topic tags field |
| 3950 | 3956 | * |
| 3951 | | * @since bbPress (r2976) |
| | 3957 | * @since 2.0.0 bbPress (r2976) |
| 3952 | 3958 | * |
| 3953 | 3959 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 3954 | 3960 | * @uses apply_filters() Calls 'bbp_get_form_topic_tags' with the tags |
| … |
… |
function bbp_form_topic_tags() { |
| 4003 | 4009 | /** |
| 4004 | 4010 | * Output value of topic forum |
| 4005 | 4011 | * |
| 4006 | | * @since bbPress (r2976) |
| | 4012 | * @since 2.0.0 bbPress (r2976) |
| 4007 | 4013 | * |
| 4008 | 4014 | * @uses bbp_get_form_topic_forum() To get the topic's forum id |
| 4009 | 4015 | */ |
| … |
… |
function bbp_form_topic_forum() { |
| 4013 | 4019 | /** |
| 4014 | 4020 | * Return value of topic forum |
| 4015 | 4021 | * |
| 4016 | | * @since bbPress (r2976) |
| | 4022 | * @since 2.0.0 bbPress (r2976) |
| 4017 | 4023 | * |
| 4018 | 4024 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 4019 | 4025 | * @uses bbp_get_topic_forum_id() To get the topic forum id |
| … |
… |
function bbp_form_topic_forum() { |
| 4041 | 4047 | /** |
| 4042 | 4048 | * Output checked value of topic subscription |
| 4043 | 4049 | * |
| 4044 | | * @since bbPress (r2976) |
| | 4050 | * @since 2.0.0 bbPress (r2976) |
| 4045 | 4051 | * |
| 4046 | 4052 | * @uses bbp_get_form_topic_subscribed() To get the subscribed checkbox value |
| 4047 | 4053 | */ |
| … |
… |
function bbp_form_topic_subscribed() { |
| 4051 | 4057 | /** |
| 4052 | 4058 | * Return checked value of topic subscription |
| 4053 | 4059 | * |
| 4054 | | * @since bbPress (r2976) |
| | 4060 | * @since 2.0.0 bbPress (r2976) |
| 4055 | 4061 | * |
| 4056 | 4062 | * @uses bbp_is_topic_edit() To check if it's the topic edit page |
| 4057 | 4063 | * @uses bbp_is_user_subscribed_to_topic() To check if the user is |
| … |
… |
function bbp_form_topic_subscribed() { |
| 4099 | 4105 | /** |
| 4100 | 4106 | * Output checked value of topic log edit field |
| 4101 | 4107 | * |
| 4102 | | * @since bbPress (r2976) |
| | 4108 | * @since 2.0.0 bbPress (r2976) |
| 4103 | 4109 | * |
| 4104 | 4110 | * @uses bbp_get_form_topic_log_edit() To get the topic log edit value |
| 4105 | 4111 | */ |
| … |
… |
function bbp_form_topic_log_edit() { |
| 4109 | 4115 | /** |
| 4110 | 4116 | * Return checked value of topic log edit field |
| 4111 | 4117 | * |
| 4112 | | * @since bbPress (r2976) |
| | 4118 | * @since 2.0.0 bbPress (r2976) |
| 4113 | 4119 | * |
| 4114 | 4120 | * @uses apply_filters() Calls 'bbp_get_form_topic_log_edit' with the |
| 4115 | 4121 | * log edit value |
| … |
… |
function bbp_form_topic_log_edit() { |
| 4135 | 4141 | /** |
| 4136 | 4142 | * Output the value of the topic edit reason |
| 4137 | 4143 | * |
| 4138 | | * @since bbPress (r2976) |
| | 4144 | * @since 2.0.0 bbPress (r2976) |
| 4139 | 4145 | * |
| 4140 | 4146 | * @uses bbp_get_form_topic_edit_reason() To get the topic edit reason value |
| 4141 | 4147 | */ |
| … |
… |
function bbp_form_topic_edit_reason() { |
| 4145 | 4151 | /** |
| 4146 | 4152 | * Return the value of the topic edit reason |
| 4147 | 4153 | * |
| 4148 | | * @since bbPress (r2976) |
| | 4154 | * @since 2.0.0 bbPress (r2976) |
| 4149 | 4155 | * |
| 4150 | 4156 | * @uses apply_filters() Calls 'bbp_get_form_topic_edit_reason' with the |
| 4151 | 4157 | * topic edit reason value |
| … |
… |
function bbp_form_topic_edit_reason() { |
| 4173 | 4179 | * |
| 4174 | 4180 | * @see bbp_topic_form_fields() |
| 4175 | 4181 | * |
| 4176 | | * @since bbPress (r5558) |
| | 4182 | * @since 2.6.0 bbPress (r5558) |
| | 4183 | * |
| 4177 | 4184 | * @return boolean True if is a post request with valid nonce |
| 4178 | 4185 | */ |
| 4179 | 4186 | function bbp_is_topic_form_post_request() { |
-
diff --git src/includes/users/capabilities.php src/includes/users/capabilities.php
index 8e1cca4..d3157ac 100644
|
|
|
|
| 12 | 12 | /** |
| 13 | 13 | * Maps primary capabilities |
| 14 | 14 | * |
| 15 | | * @since bbPress (r4242) |
| | 15 | * @since 2.2.0 bbPress (r4242) |
| 16 | 16 | * |
| 17 | 17 | * @param array $caps Capabilities for meta capability. |
| 18 | 18 | * @param string $cap Capability name. |
| … |
… |
function bbp_map_primary_meta_caps( $caps = array(), $cap = '', $user_id = 0, $a |
| 123 | 123 | /** |
| 124 | 124 | * Return a user's main role |
| 125 | 125 | * |
| 126 | | * @since bbPress (r3860) |
| | 126 | * @since 2.1.0 bbPress (r3860) |
| 127 | 127 | * |
| 128 | 128 | * @param int $user_id |
| 129 | 129 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_set_user_role( $user_id = 0, $new_role = '' ) { |
| 176 | 176 | /** |
| 177 | 177 | * Return a user's forums role |
| 178 | 178 | * |
| 179 | | * @since bbPress (r3860) |
| | 179 | * @since 2.1.0 bbPress (r3860) |
| 180 | 180 | * |
| 181 | 181 | * @param int $user_id |
| 182 | 182 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_get_user_role( $user_id = 0 ) { |
| 214 | 214 | /** |
| 215 | 215 | * Return a user's blog role |
| 216 | 216 | * |
| 217 | | * @since bbPress (r4446) |
| | 217 | * @since 2.3.0 bbPress (r4446) |
| 218 | 218 | * |
| 219 | 219 | * @param int $user_id |
| 220 | 220 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_get_user_blog_role( $user_id = 0 ) { |
| 256 | 256 | * Helper function hooked to 'bbp_profile_update' action to save or |
| 257 | 257 | * update user roles and capabilities. |
| 258 | 258 | * |
| 259 | | * @since bbPress (r4235) |
| | 259 | * @since 2.2.0 bbPress (r4235) |
| 260 | 260 | * |
| 261 | 261 | * @param int $user_id |
| 262 | 262 | * @uses bbp_reset_user_caps() to reset caps |
| … |
… |
function bbp_profile_update_role( $user_id = 0 ) { |
| 303 | 303 | * This function will bail if the forum is not global in a multisite |
| 304 | 304 | * installation of WordPress, or if the user is marked as spam or deleted. |
| 305 | 305 | * |
| 306 | | * @since bbPress (r3380) |
| | 306 | * @since 2.0.0 bbPress (r3380) |
| 307 | 307 | * |
| 308 | 308 | * @uses is_user_logged_in() To bail if user is not logged in |
| 309 | 309 | * @uses bbp_get_user_role() To bail if user already has a role |
| … |
… |
function bbp_set_current_user_default_role() { |
| 394 | 394 | * appropriate bbPress roles to WordPress users that wouldn't already have a |
| 395 | 395 | * role in the forums. Also guarantees WordPress admins get the Keymaster role. |
| 396 | 396 | * |
| 397 | | * @since bbPress (r4334) |
| | 397 | * @since 2.2.0 bbPress (r4334) |
| 398 | 398 | * |
| 399 | 399 | * @return array Filtered array of WordPress roles to bbPress roles |
| 400 | 400 | */ |
| … |
… |
function bbp_get_user_role_map() { |
| 418 | 418 | /** |
| 419 | 419 | * Checks if the user has been marked as a spammer. |
| 420 | 420 | * |
| 421 | | * @since bbPress (r3355) |
| | 421 | * @since 2.0.0 bbPress (r3355) |
| 422 | 422 | * |
| 423 | 423 | * @param int $user_id int The ID for the user. |
| 424 | 424 | * @return bool True if spammer, False if not. |
| … |
… |
function bbp_is_user_spammer( $user_id = 0 ) { |
| 456 | 456 | /** |
| 457 | 457 | * Mark a users topics and replies as spam when the user is marked as spam |
| 458 | 458 | * |
| 459 | | * @since bbPress (r3405) |
| | 459 | * @since 2.0.0 bbPress (r3405) |
| 460 | 460 | * |
| 461 | 461 | * @param int $user_id Optional. User ID to spam. Defaults to displayed user. |
| 462 | 462 | |
| … |
… |
function bbp_make_spam_user( $user_id = 0 ) { |
| 548 | 548 | /** |
| 549 | 549 | * Mark a users topics and replies as spam when the user is marked as spam |
| 550 | 550 | * |
| 551 | | * @since bbPress (r3405) |
| | 551 | * @since 2.0.0 bbPress (r3405) |
| 552 | 552 | * |
| 553 | 553 | * @param int $user_id Optional. User ID to unspam. Defaults to displayed user. |
| 554 | 554 | * |
| … |
… |
function bbp_make_ham_user( $user_id = 0 ) { |
| 639 | 639 | /** |
| 640 | 640 | * Checks if the user has been marked as deleted. |
| 641 | 641 | * |
| 642 | | * @since bbPress (r3355) |
| | 642 | * @since 2.0.0 bbPress (r3355) |
| 643 | 643 | * |
| 644 | 644 | * @param int $user_id int The ID for the user. |
| 645 | 645 | * @return bool True if deleted, False if not. |
| … |
… |
function bbp_is_user_deleted( $user_id = 0 ) { |
| 677 | 677 | /** |
| 678 | 678 | * Checks if user is active |
| 679 | 679 | * |
| 680 | | * @since bbPress (r3502) |
| | 680 | * @since 2.0.0 bbPress (r3502) |
| 681 | 681 | * |
| 682 | 682 | * @uses is_user_logged_in() To check if user is logged in |
| 683 | 683 | * @uses bbp_get_displayed_user_id() To get current user ID |
| … |
… |
function bbp_is_user_active( $user_id = 0 ) { |
| 716 | 716 | /** |
| 717 | 717 | * Checks if user is not active. |
| 718 | 718 | * |
| 719 | | * @since bbPress (r3502) |
| | 719 | * @since 2.0.0 bbPress (r3502) |
| 720 | 720 | * |
| 721 | 721 | * @uses is_user_logged_in() To check if user is logged in |
| 722 | 722 | * @uses bbp_get_displayed_user_id() To get current user ID |
| … |
… |
function bbp_is_user_inactive( $user_id = 0 ) { |
| 744 | 744 | /** |
| 745 | 745 | * Checks if user is a keymaster |
| 746 | 746 | * |
| 747 | | * @since bbPress (r4783) |
| | 747 | * @since 2.3.0 bbPress (r4783) |
| 748 | 748 | * |
| 749 | 749 | * @param int $user_id |
| 750 | 750 | * @return bool True if keymaster, false if not |
| … |
… |
function bbp_is_user_keymaster( $user_id = 0 ) { |
| 761 | 761 | /** |
| 762 | 762 | * Does a user have a profile for the current site |
| 763 | 763 | * |
| 764 | | * @since bbPress (r4362) |
| | 764 | * @since 2.2.0 bbPress (r4362) |
| 765 | 765 | * |
| 766 | 766 | * @param int $user_id User ID to check |
| 767 | 767 | * @param int $blog_id Blog ID to check |
-
diff --git src/includes/users/functions.php src/includes/users/functions.php
index 569970b..310f825 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 13 | 13 | /** |
| 14 | 14 | * Redirect back to $url when attempting to use the login page |
| 15 | 15 | * |
| 16 | | * @since bbPress (r2815) |
| | 16 | * @since 2.0.0 bbPress (r2815) |
| 17 | 17 | * |
| 18 | 18 | * @param string $url The url |
| 19 | 19 | * @param string $raw_url Raw url |
| … |
… |
function bbp_redirect_login( $url = '', $raw_url = '', $user = '' ) { |
| 45 | 45 | /** |
| 46 | 46 | * Is an anonymous topic/reply being made? |
| 47 | 47 | * |
| 48 | | * @since bbPress (r2688) |
| | 48 | * @since 2.0.0 bbPress (r2688) |
| 49 | 49 | * |
| 50 | 50 | * @uses is_user_logged_in() Is the user logged in? |
| 51 | 51 | * @uses bbp_allow_anonymous() Is anonymous posting allowed? |
| … |
… |
function bbp_is_anonymous() { |
| 66 | 66 | /** |
| 67 | 67 | * Echoes the values for current poster (uses WP comment cookies) |
| 68 | 68 | * |
| 69 | | * @since bbPress (r2734) |
| | 69 | * @since 2.0.0 bbPress (r2734) |
| 70 | 70 | * |
| 71 | 71 | * @param string $key Which value to echo? |
| 72 | 72 | * @uses bbp_get_current_anonymous_user_data() To get the current anonymous user |
| … |
… |
function bbp_current_anonymous_user_data( $key = '' ) { |
| 79 | 79 | /** |
| 80 | 80 | * Get the cookies for current poster (uses WP comment cookies). |
| 81 | 81 | * |
| 82 | | * @since bbPress (r2734) |
| | 82 | * @since 2.0.0 bbPress (r2734) |
| 83 | 83 | * |
| 84 | 84 | * @param string $key Optional. Which value to get? If not given, then |
| 85 | 85 | * an array is returned. |
| … |
… |
function bbp_current_anonymous_user_data( $key = '' ) { |
| 113 | 113 | /** |
| 114 | 114 | * Set the cookies for current poster (uses WP comment cookies) |
| 115 | 115 | * |
| 116 | | * @since bbPress (r2734) |
| | 116 | * @since 2.0.0 bbPress (r2734) |
| 117 | 117 | * |
| 118 | 118 | * @param array $anonymous_data With keys 'bbp_anonymous_name', |
| 119 | 119 | * 'bbp_anonymous_email', 'bbp_anonymous_website'. |
| … |
… |
function bbp_set_current_anonymous_user_data( $anonymous_data = array() ) { |
| 138 | 138 | /** |
| 139 | 139 | * Get the poster IP address |
| 140 | 140 | * |
| 141 | | * @since bbPress (r3120) |
| | 141 | * @since 2.0.0 bbPress (r3120) |
| 142 | 142 | * |
| 143 | 143 | * @return string |
| 144 | 144 | */ |
| … |
… |
function bbp_current_author_ip() { |
| 158 | 158 | /** |
| 159 | 159 | * Get the poster user agent |
| 160 | 160 | * |
| 161 | | * @since bbPress (r3446) |
| | 161 | * @since 2.0.0 bbPress (r3446) |
| 162 | 162 | * |
| 163 | 163 | * @return string |
| 164 | 164 | */ |
| … |
… |
function bbp_current_author_ua() { |
| 173 | 173 | /** |
| 174 | 174 | * Get the users who have made the topic favorite |
| 175 | 175 | * |
| 176 | | * @since bbPress (r2658) |
| | 176 | * @since 2.0.0 bbPress (r2658) |
| 177 | 177 | * |
| 178 | 178 | * @param int $topic_id Optional. Topic id |
| 179 | 179 | * @uses wpdb::get_col() To execute our query and get the column back |
| … |
… |
function bbp_get_topic_favoriters( $topic_id = 0 ) { |
| 201 | 201 | /** |
| 202 | 202 | * Get a user's favorite topics |
| 203 | 203 | * |
| 204 | | * @since bbPress (r2652) |
| | 204 | * @since 2.0.0 bbPress (r2652) |
| 205 | 205 | * |
| 206 | 206 | * @param int $user_id Optional. User id |
| 207 | 207 | * @uses bbp_get_user_favorites_topic_ids() To get the user's favorites |
| … |
… |
function bbp_get_user_favorites( $user_id = 0 ) { |
| 230 | 230 | /** |
| 231 | 231 | * Get a user's favorite topics' ids |
| 232 | 232 | * |
| 233 | | * @since bbPress (r2652) |
| | 233 | * @since 2.0.0 bbPress (r2652) |
| 234 | 234 | * |
| 235 | 235 | * @param int $user_id Optional. User id |
| 236 | 236 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_get_user_favorites_topic_ids( $user_id = 0 ) { |
| 254 | 254 | /** |
| 255 | 255 | * Check if a topic is in user's favorites or not |
| 256 | 256 | * |
| 257 | | * @since bbPress (r2652) |
| | 257 | * @since 2.0.0 bbPress (r2652) |
| 258 | 258 | * |
| 259 | 259 | * @param int $user_id Optional. User id |
| 260 | 260 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_is_user_favorite( $user_id = 0, $topic_id = 0 ) { |
| 304 | 304 | /** |
| 305 | 305 | * Add a topic to user's favorites |
| 306 | 306 | * |
| 307 | | * @since bbPress (r2652) |
| | 307 | * @since 2.0.0 bbPress (r2652) |
| 308 | 308 | * |
| 309 | 309 | * @param int $user_id Optional. User id |
| 310 | 310 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_add_user_favorite( $user_id = 0, $topic_id = 0 ) { |
| 341 | 341 | /** |
| 342 | 342 | * Remove a topic from user's favorites |
| 343 | 343 | * |
| 344 | | * @since bbPress (r2652) |
| | 344 | * @since 2.0.0 bbPress (r2652) |
| 345 | 345 | * |
| 346 | 346 | * @param int $user_id Optional. User id |
| 347 | 347 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_favorites_handler( $action = '' ) { |
| 490 | 490 | /** |
| 491 | 491 | * Get the users who have subscribed to the forum |
| 492 | 492 | * |
| 493 | | * @since bbPress (r5156) |
| | 493 | * @since 2.5.0 bbPress (r5156) |
| 494 | 494 | * |
| 495 | 495 | * @param int $forum_id Optional. forum id |
| 496 | 496 | * @uses wpdb::get_col() To execute our query and get the column back |
| … |
… |
function bbp_get_forum_subscribers( $forum_id = 0 ) { |
| 517 | 517 | /** |
| 518 | 518 | * Get the users who have subscribed to the topic |
| 519 | 519 | * |
| 520 | | * @since bbPress (r2668) |
| | 520 | * @since 2.0.0 bbPress (r2668) |
| 521 | 521 | * |
| 522 | 522 | * @param int $topic_id Optional. Topic id |
| 523 | 523 | * @uses wpdb::get_col() To execute our query and get the column back |
| … |
… |
function bbp_get_topic_subscribers( $topic_id = 0 ) { |
| 544 | 544 | /** |
| 545 | 545 | * Get a user's subscribed topics |
| 546 | 546 | * |
| 547 | | * @since bbPress (r2668) |
| | 547 | * @since 2.0.0 bbPress (r2668) |
| 548 | 548 | * |
| 549 | | * @deprecated since bbPress (r5156) |
| | 549 | * @deprecated 2.5.0 bbPress (r5156) |
| 550 | 550 | * |
| 551 | 551 | * @param int $user_id Optional. User id |
| 552 | 552 | * @uses bbp_get_user_topic_subscriptions() To get the user's subscriptions |
| … |
… |
function bbp_get_user_subscriptions( $user_id = 0 ) { |
| 561 | 561 | /** |
| 562 | 562 | * Get a user's subscribed topics |
| 563 | 563 | * |
| 564 | | * @since bbPress (r2668) |
| | 564 | * @since 2.0.0 bbPress (r2668) |
| 565 | 565 | * |
| 566 | 566 | * @param int $user_id Optional. User id |
| 567 | 567 | * @uses bbp_get_user_subscribed_topic_ids() To get the user's subscriptions |
| … |
… |
function bbp_get_user_topic_subscriptions( $user_id = 0 ) { |
| 592 | 592 | /** |
| 593 | 593 | * Get a user's subscribed forums |
| 594 | 594 | * |
| 595 | | * @since bbPress (r5156) |
| | 595 | * @since 2.5.0 bbPress (r5156) |
| 596 | 596 | * |
| 597 | 597 | * @param int $user_id Optional. User id |
| 598 | 598 | * @uses bbp_get_user_subscribed_forum_ids() To get the user's subscriptions |
| … |
… |
function bbp_get_user_forum_subscriptions( $user_id = 0 ) { |
| 623 | 623 | /** |
| 624 | 624 | * Get a user's subscribed forum ids |
| 625 | 625 | * |
| 626 | | * @since bbPress (r5156) |
| | 626 | * @since 2.5.0 bbPress (r5156) |
| 627 | 627 | * |
| 628 | 628 | * @param int $user_id Optional. User id |
| 629 | 629 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_get_user_subscribed_forum_ids( $user_id = 0 ) { |
| 647 | 647 | /** |
| 648 | 648 | * Get a user's subscribed topics' ids |
| 649 | 649 | * |
| 650 | | * @since bbPress (r2668) |
| | 650 | * @since 2.0.0 bbPress (r2668) |
| 651 | 651 | * |
| 652 | 652 | * @param int $user_id Optional. User id |
| 653 | 653 | * @uses bbp_get_user_id() To get the user id |
| … |
… |
function bbp_get_user_subscribed_topic_ids( $user_id = 0 ) { |
| 671 | 671 | /** |
| 672 | 672 | * Check if a topic or forum is in user's subscription list or not |
| 673 | 673 | * |
| 674 | | * @since bbPress (r5156) |
| | 674 | * @since 2.5.0 bbPress (r5156) |
| 675 | 675 | * |
| 676 | 676 | * @param int $user_id Optional. User id |
| 677 | 677 | * @param int $object_id Optional. Topic id |
| … |
… |
function bbp_is_user_subscribed( $user_id = 0, $object_id = 0 ) { |
| 725 | 725 | /** |
| 726 | 726 | * Check if a forum is in user's subscription list or not |
| 727 | 727 | * |
| 728 | | * @since bbPress (r5156) |
| | 728 | * @since 2.5.0 bbPress (r5156) |
| 729 | 729 | * |
| 730 | 730 | * @param int $user_id Optional. User id |
| 731 | 731 | * @param int $forum_id Optional. Topic id |
| … |
… |
function bbp_is_user_subscribed_to_forum( $user_id = 0, $forum_id = 0, $subscrib |
| 782 | 782 | /** |
| 783 | 783 | * Check if a topic is in user's subscription list or not |
| 784 | 784 | * |
| 785 | | * @since bbPress (r5156) |
| | 785 | * @since 2.5.0 bbPress (r5156) |
| 786 | 786 | * |
| 787 | 787 | * @param int $user_id Optional. User id |
| 788 | 788 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_is_user_subscribed_to_topic( $user_id = 0, $topic_id = 0, $subscrib |
| 839 | 839 | /** |
| 840 | 840 | * Add a topic to user's subscriptions |
| 841 | 841 | * |
| 842 | | * @since bbPress (r5156) |
| | 842 | * @since 2.5.0 bbPress (r5156) |
| 843 | 843 | * |
| 844 | 844 | * @param int $user_id Optional. User id |
| 845 | 845 | * @param int $object_id Optional. Topic id |
| … |
… |
function bbp_add_user_subscription( $user_id = 0, $object_id = 0 ) { |
| 885 | 885 | /** |
| 886 | 886 | * Add a forum to user's subscriptions |
| 887 | 887 | * |
| 888 | | * @since bbPress (r5156) |
| | 888 | * @since 2.5.0 bbPress (r5156) |
| 889 | 889 | * |
| 890 | 890 | * @param int $user_id Optional. User id |
| 891 | 891 | * @param int $forum_id Optional. forum id |
| … |
… |
function bbp_add_user_forum_subscription( $user_id = 0, $forum_id = 0 ) { |
| 922 | 922 | /** |
| 923 | 923 | * Add a topic to user's subscriptions |
| 924 | 924 | * |
| 925 | | * @since bbPress (r2668) |
| | 925 | * @since 2.0.0 bbPress (r2668) |
| 926 | 926 | * |
| 927 | 927 | * @param int $user_id Optional. User id |
| 928 | 928 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_add_user_topic_subscription( $user_id = 0, $topic_id = 0 ) { |
| 959 | 959 | /** |
| 960 | 960 | * Remove a topic from user's subscriptions |
| 961 | 961 | * |
| 962 | | * @since bbPress (r2668) |
| | 962 | * @since 2.0.0 bbPress (r2668) |
| 963 | 963 | * |
| 964 | 964 | * @param int $user_id Optional. User id |
| 965 | 965 | * @param int $object_id Optional. Topic id |
| … |
… |
function bbp_remove_user_subscription( $user_id = 0, $object_id = 0 ) { |
| 1005 | 1005 | /** |
| 1006 | 1006 | * Remove a forum from user's subscriptions |
| 1007 | 1007 | * |
| 1008 | | * @since bbPress (r5156) |
| | 1008 | * @since 2.5.0 bbPress (r5156) |
| 1009 | 1009 | * |
| 1010 | 1010 | * @param int $user_id Optional. User id |
| 1011 | 1011 | * @param int $forum_id Optional. forum id |
| … |
… |
function bbp_remove_user_forum_subscription( $user_id, $forum_id ) { |
| 1052 | 1052 | /** |
| 1053 | 1053 | * Remove a topic from user's subscriptions |
| 1054 | 1054 | * |
| 1055 | | * @since bbPress (r5156) |
| | 1055 | * @since 2.5.0 bbPress (r5156) |
| 1056 | 1056 | * |
| 1057 | 1057 | * @param int $user_id Optional. User id |
| 1058 | 1058 | * @param int $topic_id Optional. Topic id |
| … |
… |
function bbp_remove_user_topic_subscription( $user_id, $topic_id ) { |
| 1099 | 1099 | /** |
| 1100 | 1100 | * Handles the front end subscribing and unsubscribing forums |
| 1101 | 1101 | * |
| 1102 | | * @since bbPress (r5156) |
| | 1102 | * @since 2.5.0 bbPress (r5156) |
| 1103 | 1103 | * |
| 1104 | 1104 | * @param string $action The requested action to compare this function to |
| 1105 | 1105 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| … |
… |
function bbp_forum_subscriptions_handler( $action = '' ) { |
| 1204 | 1204 | /** |
| 1205 | 1205 | * Handles the front end subscribing and unsubscribing topics |
| 1206 | 1206 | * |
| 1207 | | * @since bbPress (r2790) |
| | 1207 | * @since 2.0.0 bbPress (r2790) |
| 1208 | 1208 | * |
| 1209 | 1209 | * @param string $action The requested action to compare this function to |
| 1210 | 1210 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| … |
… |
function bbp_subscriptions_handler( $action = '' ) { |
| 1311 | 1311 | /** |
| 1312 | 1312 | * Handles the front end user editing from POST requests |
| 1313 | 1313 | * |
| 1314 | | * @since bbPress (r2790) |
| | 1314 | * @since 2.0.0 bbPress (r2790) |
| 1315 | 1315 | * |
| 1316 | 1316 | * @param string $action The requested action to compare this function to |
| 1317 | 1317 | * @uses is_multisite() To check if it's a multisite |
| … |
… |
function bbp_edit_user_handler( $action = '' ) { |
| 1445 | 1445 | /** |
| 1446 | 1446 | * Handles user email address updating from GET requests |
| 1447 | 1447 | * |
| 1448 | | * @since bbPress (r5660) |
| | 1448 | * @since 2.6.0 bbPress (r5660) |
| 1449 | 1449 | * |
| 1450 | 1450 | * @param string $action |
| 1451 | 1451 | * |
| … |
… |
function bbp_user_email_change_handler( $action = '' ) { |
| 1555 | 1555 | /** |
| 1556 | 1556 | * Sends an email when an email address change occurs on POST requests |
| 1557 | 1557 | * |
| 1558 | | * @since bbPress (r5660) |
| | 1558 | * @since 2.6.0 bbPress (r5660) |
| 1559 | 1559 | * |
| 1560 | 1560 | * @see send_confirmation_on_profile_email() |
| 1561 | 1561 | * |
| … |
… |
The %4$s Team |
| 1637 | 1637 | * output actions if they don't want any unexpected junk to appear there, and |
| 1638 | 1638 | * also avoids needing to pollute the templates with additional logic and actions. |
| 1639 | 1639 | * |
| 1640 | | * @since bbPress (r4273) |
| | 1640 | * @since 2.2.0 bbPress (r4273) |
| 1641 | 1641 | * |
| 1642 | 1642 | * @uses bbp_is_user_home_edit() To switch the action fired |
| 1643 | 1643 | * @uses get_userdata() To get the current user's data |
| … |
… |
function bbp_user_edit_after() { |
| 1654 | 1654 | /** |
| 1655 | 1655 | * Get the topics that a user created |
| 1656 | 1656 | * |
| 1657 | | * @since bbPress (r2660) |
| | 1657 | * @since 2.0.0 bbPress (r2660) |
| 1658 | 1658 | * |
| 1659 | 1659 | * @param int $user_id Optional. User id |
| 1660 | 1660 | * @uses bbp_get_user_id() To get the topic id |
| … |
… |
function bbp_get_user_topics_started( $user_id = 0 ) { |
| 1680 | 1680 | /** |
| 1681 | 1681 | * Get the replies that a user created |
| 1682 | 1682 | * |
| 1683 | | * @since bbPress (r4225) |
| | 1683 | * @since 2.2.0 bbPress (r4225) |
| 1684 | 1684 | * |
| 1685 | 1685 | * @param int $user_id Optional. User id |
| 1686 | 1686 | * @uses bbp_get_user_id() To get the topic id |
| … |
… |
function bbp_get_user_replies_created( $user_id = 0 ) { |
| 1708 | 1708 | /** |
| 1709 | 1709 | * Get the total number of users on the forums |
| 1710 | 1710 | * |
| 1711 | | * @since bbPress (r2769) |
| | 1711 | * @since 2.0.0 bbPress (r2769) |
| | 1712 | * |
| 1712 | 1713 | * @uses count_users() To execute our query and get the var back |
| 1713 | 1714 | * @uses apply_filters() Calls 'bbp_get_total_users' with number of users |
| 1714 | 1715 | * @return int Total number of users |
| … |
… |
function bbp_get_total_users() { |
| 1723 | 1724 | /** |
| 1724 | 1725 | * Return the raw database count of topics by a user |
| 1725 | 1726 | * |
| 1726 | | * @since bbPress (r3633) |
| | 1727 | * @since 2.1.0 bbPress (r3633) |
| 1727 | 1728 | * |
| 1728 | 1729 | * @param int $user_id User ID to get count for |
| 1729 | 1730 | * |
| … |
… |
function bbp_get_user_topic_count_raw( $user_id = 0 ) { |
| 1750 | 1751 | /** |
| 1751 | 1752 | * Return the raw database count of replies by a user |
| 1752 | 1753 | * |
| 1753 | | * @since bbPress (r3633) |
| | 1754 | * @since 2.1.0 bbPress (r3633) |
| 1754 | 1755 | * |
| 1755 | 1756 | * @param int $user_id User ID to get count for |
| 1756 | 1757 | * |
| … |
… |
function bbp_get_user_reply_count_raw( $user_id = 0 ) { |
| 1777 | 1778 | /** |
| 1778 | 1779 | * Bump the topic count for a user by a certain amount. |
| 1779 | 1780 | * |
| 1780 | | * @since bbPress (r5309) |
| | 1781 | * @since 2.6.0 bbPress (r5309) |
| 1781 | 1782 | * |
| 1782 | 1783 | * @param int $user_id |
| 1783 | 1784 | * @param int $difference |
| … |
… |
function bbp_bump_user_topic_count( $user_id = 0, $difference = 1 ) { |
| 1815 | 1816 | /** |
| 1816 | 1817 | * Bump the reply count for a user by a certain amount. |
| 1817 | 1818 | * |
| 1818 | | * @since bbPress (r5309) |
| | 1819 | * @since 2.6.0 bbPress (r5309) |
| 1819 | 1820 | * |
| 1820 | 1821 | * @param int $user_id |
| 1821 | 1822 | * @param int $difference |
| … |
… |
function bbp_bump_user_reply_count( $user_id = 0, $difference = 1 ) { |
| 1854 | 1855 | * Helper function used to increase (by one) the count of topics for a user when |
| 1855 | 1856 | * a topic is published. |
| 1856 | 1857 | * |
| 1857 | | * @since bbPress (r5309) |
| | 1858 | * @since 2.6.0 bbPress (r5309) |
| 1858 | 1859 | * |
| 1859 | 1860 | * @access |
| 1860 | 1861 | * @param $topic_id |
| … |
… |
function bbp_increase_user_topic_count( $topic_id = 0 ) { |
| 1873 | 1874 | * |
| 1874 | 1875 | * This is a helper function, hooked to `bbp_new_reply` |
| 1875 | 1876 | * |
| 1876 | | * @since bbPress (r5309) |
| | 1877 | * @since 2.6.0 bbPress (r5309) |
| 1877 | 1878 | * |
| 1878 | 1879 | * @param $topic_id |
| 1879 | 1880 | * @param $forum_id |
| … |
… |
function bbp_increase_user_reply_count( $reply_id = 0 ) { |
| 1889 | 1890 | * Helper function used to decrease (by one) the count of topics for a user when |
| 1890 | 1891 | * a topic is unpublished. |
| 1891 | 1892 | * |
| 1892 | | * @since bbPress (r5309) |
| | 1893 | * @since 2.6.0 bbPress (r5309) |
| 1893 | 1894 | * |
| 1894 | 1895 | * @param $topic_id |
| 1895 | 1896 | */ |
| … |
… |
function bbp_decrease_user_topic_count( $topic_id = 0 ) { |
| 1902 | 1903 | * Helper function used to increase (by one) the count of replies for a user when |
| 1903 | 1904 | * a topic is unpublished. |
| 1904 | 1905 | * |
| 1905 | | * @since bbPress (r5309) |
| | 1906 | * @since 2.6.0 bbPress (r5309) |
| 1906 | 1907 | * |
| 1907 | 1908 | * @param $reply_id |
| 1908 | 1909 | */ |
| … |
… |
function bbp_decrease_user_reply_count( $reply_id = 0 ) { |
| 1916 | 1917 | /** |
| 1917 | 1918 | * Return the term id for a given user id and taxonomy |
| 1918 | 1919 | * |
| 1919 | | * @since bbPress (r5834) |
| | 1920 | * @since 2.6.0 bbPress (r5834) |
| 1920 | 1921 | * |
| 1921 | 1922 | * @param int $user_id User id. |
| 1922 | 1923 | * @param string $taxonomy Taxonomy. |
| … |
… |
function bbp_get_user_taxonomy_term_id( $user_id = 0, $taxonomy = '' ) { |
| 1956 | 1957 | /** |
| 1957 | 1958 | * Return the user id for a given term id and taxonomy |
| 1958 | 1959 | * |
| 1959 | | * @since bbPress (r5834) |
| | 1960 | * @since 2.6.0 bbPress (r5834) |
| 1960 | 1961 | * |
| 1961 | 1962 | * @param int $term_id Term id. |
| 1962 | 1963 | * @param string $taxonomy Taxonomy. |
| … |
… |
function bbp_filter_forum_mod_term_link( $termlink = '', $term = '', $taxonomy = |
| 2042 | 2043 | * met, we assume a user cannot perform this task, and look for ways they can |
| 2043 | 2044 | * earn the ability to access this template. |
| 2044 | 2045 | * |
| 2045 | | * @since bbPress (r3605) |
| | 2046 | * @since 2.1.0 bbPress (r3605) |
| 2046 | 2047 | * |
| 2047 | 2048 | * @uses bbp_is_single_user_edit() |
| 2048 | 2049 | * @uses current_user_can() |
| … |
… |
function bbp_check_user_edit() { |
| 2093 | 2094 | /** |
| 2094 | 2095 | * Check if a user is blocked, or cannot spectate the forums. |
| 2095 | 2096 | * |
| 2096 | | * @since bbPress (r2996) |
| | 2097 | * @since 2.0.0 bbPress (r2996) |
| 2097 | 2098 | * |
| 2098 | 2099 | * @uses is_user_logged_in() To check if user is logged in |
| 2099 | 2100 | * @uses bbp_is_user_keymaster() To check if user is a keymaster |
| … |
… |
function bbp_forum_enforce_blocked() { |
| 2131 | 2132 | * a backwards compatible approach like this one was necessary to protect |
| 2132 | 2133 | * existing installations that may have custom template parts. |
| 2133 | 2134 | * |
| 2134 | | * @since bbPress (r5368) |
| | 2135 | * @since 2.6.0 bbPress (r5368) |
| 2135 | 2136 | * |
| 2136 | 2137 | * @param string $value |
| 2137 | 2138 | * @param string $field |
| … |
… |
function bbp_sanitize_displayed_user_field( $value = '', $field = '', $context = |
| 2188 | 2189 | /** |
| 2189 | 2190 | * Convert passwords from previous platfrom encryption to WordPress encryption. |
| 2190 | 2191 | * |
| 2191 | | * @since bbPress (r3813) |
| | 2192 | * @since 2.1.0 bbPress (r3813) |
| 2192 | 2193 | */ |
| 2193 | 2194 | function bbp_user_maybe_convert_pass() { |
| 2194 | 2195 | |
-
diff --git src/includes/users/options.php src/includes/users/options.php
index e420113..794cebb 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 13 | 13 | /** |
| 14 | 14 | * Get the default user options and their values |
| 15 | 15 | * |
| 16 | | * @since bbPress (r3910) |
| | 16 | * @since 2.1.0 bbPress (r3910) |
| | 17 | * |
| 17 | 18 | * @return array Filtered user option names and values |
| 18 | 19 | */ |
| 19 | 20 | function bbp_get_default_user_options() { |
| … |
… |
function bbp_get_default_user_options() { |
| 33 | 34 | * |
| 34 | 35 | * This is destructive, so existing bbPress user options will be overridden. |
| 35 | 36 | * |
| 36 | | * @since bbPress (r3910) |
| | 37 | * @since 2.1.0 bbPress (r3910) |
| | 38 | * |
| 37 | 39 | * @uses bbp_get_default_user_options() To get default options |
| 38 | 40 | * @uses update_user_option() Adds default options |
| 39 | 41 | * @uses do_action() Calls 'bbp_add_user_options' |
| … |
… |
function bbp_add_user_options( $user_id = 0 ) { |
| 61 | 63 | * Hooked to bbp_uninstall, it is only called once when bbPress is uninstalled. |
| 62 | 64 | * This is destructive, so existing bbPress user options will be destroyed. |
| 63 | 65 | * |
| 64 | | * @since bbPress (r3910) |
| | 66 | * @since 2.1.0 bbPress (r3910) |
| | 67 | * |
| 65 | 68 | * @uses bbp_get_default_user_options() To get default options |
| 66 | 69 | * @uses delete_user_option() Removes default options |
| 67 | 70 | * @uses do_action() Calls 'bbp_delete_options' |
| … |
… |
function bbp_delete_user_options( $user_id = 0 ) { |
| 87 | 90 | * Add filters to each bbPress option and allow them to be overloaded from |
| 88 | 91 | * inside the $bbp->options array. |
| 89 | 92 | * |
| 90 | | * @since bbPress (r3910) |
| | 93 | * @since 2.1.0 bbPress (r3910) |
| | 94 | * |
| 91 | 95 | * @uses bbp_get_default_user_options() To get default options |
| 92 | 96 | * @uses add_filter() To add filters to 'pre_option_{$key}' |
| 93 | 97 | * @uses do_action() Calls 'bbp_add_option_filters' |
| … |
… |
function bbp_setup_user_option_filters() { |
| 107 | 111 | * Filter default options and allow them to be overloaded from inside the |
| 108 | 112 | * $bbp->user_options array. |
| 109 | 113 | * |
| 110 | | * @since bbPress (r3910) |
| | 114 | * @since 2.1.0 bbPress (r3910) |
| | 115 | * |
| 111 | 116 | * @param bool $value Optional. Default value false |
| 112 | 117 | * @return mixed false if not overloaded, mixed if set |
| 113 | 118 | */ |
| … |
… |
function bbp_filter_get_user_option( $value = false, $option = '', $user = 0 ) { |
| 128 | 133 | /** |
| 129 | 134 | * Update the topic count for a user |
| 130 | 135 | * |
| 131 | | * @since bbPress (r5309) |
| | 136 | * @since 2.6.0 bbPress (r5309) |
| 132 | 137 | * |
| 133 | 138 | * @param int $user_id |
| 134 | 139 | * @param mixed $count |
| … |
… |
function bbp_update_user_topic_count( $user_id = 0, $count = false ) { |
| 157 | 162 | /** |
| 158 | 163 | * Update the reply count for a user |
| 159 | 164 | * |
| 160 | | * @since bbPress (r5309) |
| | 165 | * @since 2.6.0 bbPress (r5309) |
| 161 | 166 | * |
| 162 | 167 | * @param int $user_id |
| 163 | 168 | * @param mixed $count |
| … |
… |
function bbp_update_user_reply_count( $user_id = 0, $count = false ) { |
| 186 | 191 | /** |
| 187 | 192 | * Output a users topic count |
| 188 | 193 | * |
| 189 | | * @since bbPress (r3632) |
| | 194 | * @since 2.1.0 bbPress (r3632) |
| 190 | 195 | * |
| 191 | 196 | * @param int $user_id |
| 192 | 197 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_topic_count( $user_id = 0, $integer = false ) { |
| 199 | 204 | /** |
| 200 | 205 | * Return a users reply count |
| 201 | 206 | * |
| 202 | | * @since bbPress (r3632) |
| | 207 | * @since 2.1.0 bbPress (r3632) |
| 203 | 208 | * |
| 204 | 209 | * @param int $user_id |
| 205 | 210 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_topic_count( $user_id = 0, $integer = false ) { |
| 225 | 230 | /** |
| 226 | 231 | * Output a users reply count |
| 227 | 232 | * |
| 228 | | * @since bbPress (r3632) |
| | 233 | * @since 2.1.0 bbPress (r3632) |
| 229 | 234 | * |
| 230 | 235 | * @param int $user_id |
| 231 | 236 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_reply_count( $user_id = 0, $integer = false ) { |
| 238 | 243 | /** |
| 239 | 244 | * Return a users reply count |
| 240 | 245 | * |
| 241 | | * @since bbPress (r3632) |
| | 246 | * @since 2.1.0 bbPress (r3632) |
| 242 | 247 | * |
| 243 | 248 | * @param int $user_id |
| 244 | 249 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_reply_count( $user_id = 0, $integer = false ) { |
| 264 | 269 | /** |
| 265 | 270 | * Output a users total post count |
| 266 | 271 | * |
| 267 | | * @since bbPress (r3632) |
| | 272 | * @since 2.1.0 bbPress (r3632) |
| 268 | 273 | * |
| 269 | 274 | * @param int $user_id |
| 270 | 275 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_post_count( $user_id = 0, $integer = false ) { |
| 277 | 282 | /** |
| 278 | 283 | * Return a users total post count |
| 279 | 284 | * |
| 280 | | * @since bbPress (r3632) |
| | 285 | * @since 2.1.0 bbPress (r3632) |
| 281 | 286 | * |
| 282 | 287 | * @param int $user_id |
| 283 | 288 | * @param boolean $integer Optional. Whether or not to format the result |
| … |
… |
function bbp_user_post_count( $user_id = 0, $integer = false ) { |
| 307 | 312 | /** |
| 308 | 313 | * Update a users last posted time, for use with post throttling |
| 309 | 314 | * |
| 310 | | * @since bbPress (r3910) |
| | 315 | * @since 2.1.0 bbPress (r3910) |
| | 316 | * |
| 311 | 317 | * @param int $user_id User ID to update |
| 312 | 318 | * @param int $time Time in time() format |
| 313 | 319 | * @return bool False if no user or failure, true if successful |
| … |
… |
function bbp_update_user_last_posted( $user_id = 0, $time = 0 ) { |
| 331 | 337 | /** |
| 332 | 338 | * Output the raw value of the last posted time. |
| 333 | 339 | * |
| 334 | | * @since bbPress (r3910) |
| | 340 | * @since 2.1.0 bbPress (r3910) |
| | 341 | * |
| 335 | 342 | * @param int $user_id User ID to retrieve value for |
| 336 | 343 | * @uses bbp_get_user_last_posted() To output the last posted time |
| 337 | 344 | */ |
| … |
… |
function bbp_user_last_posted( $user_id = 0 ) { |
| 342 | 349 | /** |
| 343 | 350 | * Return the raw value of teh last posted time. |
| 344 | 351 | * |
| 345 | | * @since bbPress (r3910) |
| | 352 | * @since 2.1.0 bbPress (r3910) |
| | 353 | * |
| 346 | 354 | * @param int $user_id User ID to retrieve value for |
| 347 | 355 | * @return mixed False if no user, time() format if exists |
| 348 | 356 | */ |
-
diff --git src/includes/users/template.php src/includes/users/template.php
index fd76f4a..6191d3c 100644
|
|
|
defined( 'ABSPATH' ) || exit; |
| 15 | 15 | /** |
| 16 | 16 | * Output a validated user id |
| 17 | 17 | * |
| 18 | | * @since bbPress (r2729) |
| | 18 | * @since 2.0.0 bbPress (r2729) |
| 19 | 19 | * |
| 20 | 20 | * @param int $user_id Optional. User id |
| 21 | 21 | * @param bool $displayed_user_fallback Fallback on displayed user? |
| … |
… |
function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_us |
| 28 | 28 | /** |
| 29 | 29 | * Return a validated user id |
| 30 | 30 | * |
| 31 | | * @since bbPress (r2729) |
| | 31 | * @since 2.0.0 bbPress (r2729) |
| 32 | 32 | * |
| 33 | 33 | * @param int $user_id Optional. User id |
| 34 | 34 | * @param bool $displayed_user_fallback Fallback on displayed user? |
| … |
… |
function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_us |
| 63 | 63 | /** |
| 64 | 64 | * Output ID of current user |
| 65 | 65 | * |
| 66 | | * @since bbPress (r2574) |
| | 66 | * @since 2.0.0 bbPress (r2574) |
| 67 | 67 | * |
| 68 | 68 | * @uses bbp_get_current_user_id() To get the current user id |
| 69 | 69 | */ |
| … |
… |
function bbp_current_user_id() { |
| 73 | 73 | /** |
| 74 | 74 | * Return ID of current user |
| 75 | 75 | * |
| 76 | | * @since bbPress (r2574) |
| | 76 | * @since 2.0.0 bbPress (r2574) |
| 77 | 77 | * |
| 78 | 78 | * @uses bbp_get_user_id() To get the current user id |
| 79 | 79 | * @uses apply_filters() Calls 'bbp_get_current_user_id' with the id |
| … |
… |
function bbp_current_user_id() { |
| 86 | 86 | /** |
| 87 | 87 | * Output ID of displayed user |
| 88 | 88 | * |
| 89 | | * @since bbPress (r2688) |
| | 89 | * @since 2.0.0 bbPress (r2688) |
| 90 | 90 | * |
| 91 | 91 | * @uses bbp_get_displayed_user_id() To get the displayed user id |
| 92 | 92 | */ |
| … |
… |
function bbp_displayed_user_id() { |
| 96 | 96 | /** |
| 97 | 97 | * Return ID of displayed user |
| 98 | 98 | * |
| 99 | | * @since bbPress (r2688) |
| | 99 | * @since 2.0.0 bbPress (r2688) |
| 100 | 100 | * |
| 101 | 101 | * @uses bbp_get_user_id() To get the displayed user id |
| 102 | 102 | * @uses apply_filters() Calls 'bbp_get_displayed_user_id' with the id |
| … |
… |
function bbp_displayed_user_id() { |
| 113 | 113 | * the field value that it finds. Since it uses the WP_User object's magic |
| 114 | 114 | * __get() method, it can also be used to get user_meta values. |
| 115 | 115 | * |
| 116 | | * @since bbPress (r2688) |
| | 116 | * @since 2.0.0 bbPress (r2688) |
| 117 | 117 | * |
| 118 | 118 | * @param string $field Field to get |
| 119 | 119 | * @param string $filter How to filter the field value (null|raw|db|display|edit) |
| … |
… |
function bbp_displayed_user_field( $field = '', $filter = 'display' ) { |
| 129 | 129 | * the field value that it finds. Since it uses the WP_User object's magic |
| 130 | 130 | * __get() method, it can also be used to get user_meta values. |
| 131 | 131 | * |
| 132 | | * @since bbPress (r2688) |
| | 132 | * @since 2.0.0 bbPress (r2688) |
| 133 | 133 | * |
| 134 | 134 | * @param string $field Field to get |
| 135 | 135 | * @param string $filter How to filter the field value (null|raw|db|display|edit) |
| … |
… |
function bbp_displayed_user_field( $field = '', $filter = 'display' ) { |
| 162 | 162 | /** |
| 163 | 163 | * Output name of current user |
| 164 | 164 | * |
| 165 | | * @since bbPress (r2574) |
| | 165 | * @since 2.0.0 bbPress (r2574) |
| 166 | 166 | * |
| 167 | 167 | * @uses bbp_get_current_user_name() To get the current user name |
| 168 | 168 | */ |
| … |
… |
function bbp_current_user_name() { |
| 172 | 172 | /** |
| 173 | 173 | * Return name of current user |
| 174 | 174 | * |
| 175 | | * @since bbPress (r2574) |
| | 175 | * @since 2.0.0 bbPress (r2574) |
| 176 | 176 | * |
| 177 | 177 | * @uses apply_filters() Calls 'bbp_get_current_user_name' with the |
| 178 | 178 | * current user name |
| … |
… |
function bbp_current_user_name() { |
| 189 | 189 | /** |
| 190 | 190 | * Output avatar of current user |
| 191 | 191 | * |
| 192 | | * @since bbPress (r2574) |
| | 192 | * @since 2.0.0 bbPress (r2574) |
| 193 | 193 | * |
| 194 | 194 | * @param int $size Size of the avatar. Defaults to 40 |
| 195 | 195 | * @uses bbp_get_current_user_avatar() To get the current user avatar |
| … |
… |
function bbp_current_user_avatar( $size = 40 ) { |
| 201 | 201 | /** |
| 202 | 202 | * Return avatar of current user |
| 203 | 203 | * |
| 204 | | * @since bbPress (r2574) |
| | 204 | * @since 2.0.0 bbPress (r2574) |
| 205 | 205 | * |
| 206 | 206 | * @param int $size Size of the avatar. Defaults to 40 |
| 207 | 207 | * @uses bbp_get_current_user_id() To get the current user id |
| … |
… |
function bbp_current_user_avatar( $size = 40 ) { |
| 227 | 227 | /** |
| 228 | 228 | * Output link to the profile page of a user |
| 229 | 229 | * |
| 230 | | * @since bbPress (r2688) |
| | 230 | * @since 2.0.0 bbPress (r2688) |
| 231 | 231 | * |
| 232 | 232 | * @param int $user_id Optional. User id |
| 233 | 233 | * @uses bbp_get_user_profile_link() To get user profile link |
| … |
… |
function bbp_user_profile_link( $user_id = 0 ) { |
| 238 | 238 | /** |
| 239 | 239 | * Return link to the profile page of a user |
| 240 | 240 | * |
| 241 | | * @since bbPress (r2688) |
| | 241 | * @since 2.0.0 bbPress (r2688) |
| 242 | 242 | * |
| 243 | 243 | * @param int $user_id Optional. User id |
| 244 | 244 | * @uses bbp_get_user_id() To get user id |
| … |
… |
function bbp_user_profile_link( $user_id = 0 ) { |
| 265 | 265 | /** |
| 266 | 266 | * Output a users nicename to the screen |
| 267 | 267 | * |
| 268 | | * @since bbPress (r4671) |
| | 268 | * @since 2.3.0 bbPress (r4671) |
| 269 | 269 | * |
| 270 | 270 | * @param int $user_id User ID whose nicename to get |
| 271 | 271 | * @param array $args before|after|user_id|force |
| … |
… |
function bbp_user_nicename( $user_id = 0, $args = array() ) { |
| 276 | 276 | /** |
| 277 | 277 | * Return a users nicename to the screen |
| 278 | 278 | * |
| 279 | | * @since bbPress (r4671) |
| | 279 | * @since 2.3.0 bbPress (r4671) |
| 280 | 280 | * |
| 281 | 281 | * @param int $user_id User ID whose nicename to get |
| 282 | 282 | * @param array $args before|after|user_id|force |
| … |
… |
function bbp_user_nicename( $user_id = 0, $args = array() ) { |
| 318 | 318 | /** |
| 319 | 319 | * Output URL to the profile page of a user |
| 320 | 320 | * |
| 321 | | * @since bbPress (r2688) |
| | 321 | * @since 2.0.0 bbPress (r2688) |
| 322 | 322 | * |
| 323 | 323 | * @param int $user_id Optional. User id |
| 324 | 324 | * @param string $user_nicename Optional. User nicename |
| … |
… |
function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) { |
| 330 | 330 | /** |
| 331 | 331 | * Return URL to the profile page of a user |
| 332 | 332 | * |
| 333 | | * @since bbPress (r2688) |
| | 333 | * @since 2.0.0 bbPress (r2688) |
| 334 | 334 | * |
| 335 | 335 | * @param int $user_id Optional. User id |
| 336 | 336 | * @param string $user_nicename Optional. User nicename |
| … |
… |
function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) { |
| 381 | 381 | /** |
| 382 | 382 | * Output link to the profile edit page of a user |
| 383 | 383 | * |
| 384 | | * @since bbPress (r2688) |
| | 384 | * @since 2.0.0 bbPress (r2688) |
| 385 | 385 | * |
| 386 | 386 | * @param int $user_id Optional. User id |
| 387 | 387 | * @uses bbp_get_user_profile_edit_link() To get user profile edit link |
| … |
… |
function bbp_user_profile_edit_link( $user_id = 0 ) { |
| 392 | 392 | /** |
| 393 | 393 | * Return link to the profile edit page of a user |
| 394 | 394 | * |
| 395 | | * @since bbPress (r2688) |
| | 395 | * @since 2.0.0 bbPress (r2688) |
| 396 | 396 | * |
| 397 | 397 | * @param int $user_id Optional. User id |
| 398 | 398 | * @uses bbp_get_user_id() To get user id |
| … |
… |
function bbp_user_profile_edit_link( $user_id = 0 ) { |
| 418 | 418 | /** |
| 419 | 419 | * Output URL to the profile edit page of a user |
| 420 | 420 | * |
| 421 | | * @since bbPress (r2688) |
| | 421 | * @since 2.0.0 bbPress (r2688) |
| 422 | 422 | * |
| 423 | 423 | * @param int $user_id Optional. User id |
| 424 | 424 | * @param string $user_nicename Optional. User nicename |
| … |
… |
function bbp_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) { |
| 430 | 430 | /** |
| 431 | 431 | * Return URL to the profile edit page of a user |
| 432 | 432 | * |
| 433 | | * @since bbPress (r2688) |
| | 433 | * @since 2.0.0 bbPress (r2688) |
| 434 | 434 | * |
| 435 | 435 | * @param int $user_id Optional. User id |
| 436 | 436 | * @param string $user_nicename Optional. User nicename |
| … |
… |
function bbp_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) { |
| 478 | 478 | /** |
| 479 | 479 | * Output a user's main role for display |
| 480 | 480 | * |
| 481 | | * @since bbPress (r3860) |
| | 481 | * @since 2.1.0 bbPress (r3860) |
| 482 | 482 | * |
| 483 | 483 | * @param int $user_id |
| 484 | 484 | * @uses bbp_get_user_display_role To get the user display role |
| … |
… |
function bbp_user_display_role( $user_id = 0 ) { |
| 489 | 489 | /** |
| 490 | 490 | * Return a user's main role for display |
| 491 | 491 | * |
| 492 | | * @since bbPress (r3860) |
| | 492 | * @since 2.1.0 bbPress (r3860) |
| 493 | 493 | * |
| 494 | 494 | * @param int $user_id |
| 495 | 495 | * @uses bbp_get_user_id() to verify the user ID |
| … |
… |
function bbp_user_display_role( $user_id = 0 ) { |
| 529 | 529 | /** |
| 530 | 530 | * Output the link to the admin section |
| 531 | 531 | * |
| 532 | | * @since bbPress (r2827) |
| | 532 | * @since 2.0.0 bbPress (r2827) |
| 533 | 533 | * |
| 534 | 534 | * @param array $args Optional. See {@link bbp_get_admin_link()} |
| 535 | 535 | * @uses bbp_get_admin_link() To get the admin link |
| … |
… |
function bbp_admin_link( $args = array() ) { |
| 540 | 540 | /** |
| 541 | 541 | * Return the link to the admin section |
| 542 | 542 | * |
| 543 | | * @since bbPress (r2827) |
| | 543 | * @since 2.0.0 bbPress (r2827) |
| 544 | 544 | * |
| 545 | 545 | * @param array $args Optional. This function supports these arguments: |
| 546 | 546 | * - text: The text |
| … |
… |
function bbp_admin_link( $args = array() ) { |
| 577 | 577 | /** |
| 578 | 578 | * Output the author IP address of a post |
| 579 | 579 | * |
| 580 | | * @since bbPress (r3120) |
| | 580 | * @since 2.0.0 bbPress (r3120) |
| 581 | 581 | * |
| 582 | 582 | * @param array $args Optional. If it is an integer, it is used as post id. |
| 583 | 583 | * @uses bbp_get_author_ip() To get the post author link |
| … |
… |
function bbp_author_ip( $args = array() ) { |
| 588 | 588 | /** |
| 589 | 589 | * Return the author IP address of a post |
| 590 | 590 | * |
| 591 | | * @since bbPress (r3120) |
| | 591 | * @since 2.0.0 bbPress (r3120) |
| 592 | 592 | * |
| 593 | 593 | * @param array $args Optional. If an integer, it is used as reply id. |
| 594 | 594 | * @uses get_post_meta() To check if it's a topic page |
| … |
… |
function bbp_author_ip( $args = array() ) { |
| 628 | 628 | * and correct filters are executed. Used primarily to display topic |
| 629 | 629 | * and reply author information in the anonymous form template-part. |
| 630 | 630 | * |
| 631 | | * @since bbPress (r5119) |
| | 631 | * @since 2.5.0 bbPress (r5119) |
| 632 | 632 | * |
| 633 | 633 | * @param int $post_id |
| 634 | 634 | * @uses bbp_get_author_display_name() to get the author name |
| … |
… |
function bbp_author_display_name( $post_id = 0 ) { |
| 644 | 644 | * and correct filters are executed. Used primarily to display topic |
| 645 | 645 | * and reply author information in the anonymous form template-part. |
| 646 | 646 | * |
| 647 | | * @since bbPress (r5119) |
| | 647 | * @since 2.5.0 bbPress (r5119) |
| 648 | 648 | * |
| 649 | 649 | * @param int $post_id |
| 650 | 650 | * |
| … |
… |
function bbp_author_display_name( $post_id = 0 ) { |
| 684 | 684 | * and correct filters are executed. Used primarily to display topic |
| 685 | 685 | * and reply author information in the anonymous user form template-part. |
| 686 | 686 | * |
| 687 | | * @since bbPress (r5119) |
| | 687 | * @since 2.5.0 bbPress (r5119) |
| 688 | 688 | * |
| 689 | 689 | * @param int $post_id |
| 690 | 690 | * @uses bbp_get_author_email() to get the author email |
| … |
… |
function bbp_author_email( $post_id = 0 ) { |
| 700 | 700 | * and correct filters are executed. Used primarily to display topic |
| 701 | 701 | * and reply author information in the anonymous user form template-part. |
| 702 | 702 | * |
| 703 | | * @since bbPress (r5119) |
| | 703 | * @since 2.5.0 bbPress (r5119) |
| 704 | 704 | * |
| 705 | 705 | * @param int $post_id |
| 706 | 706 | * |
| … |
… |
function bbp_author_email( $post_id = 0 ) { |
| 740 | 740 | * and correct filters are executed. Used primarily to display topic |
| 741 | 741 | * and reply author information in the anonymous user form template-part. |
| 742 | 742 | * |
| 743 | | * @since bbPress (r5119) |
| | 743 | * @since 2.5.0 bbPress (r5119) |
| 744 | 744 | * |
| 745 | 745 | * @param int $post_id |
| 746 | 746 | * @uses bbp_get_author_url() to get the author url |
| … |
… |
function bbp_author_url( $post_id = 0 ) { |
| 756 | 756 | * and correct filters are executed. Used primarily to display topic |
| 757 | 757 | * and reply author information in the anonymous user form template-part. |
| 758 | 758 | * |
| 759 | | * @since bbPress (r5119) |
| | 759 | * @since 2.5.0 bbPress (r5119) |
| 760 | 760 | * |
| 761 | 761 | * @param int $post_id |
| 762 | 762 | * |
| … |
… |
function bbp_author_url( $post_id = 0 ) { |
| 794 | 794 | /** |
| 795 | 795 | * Output the link to the user's favorites page (profile page) |
| 796 | 796 | * |
| 797 | | * @since bbPress (r2652) |
| | 797 | * @since 2.0.0 bbPress (r2652) |
| 798 | 798 | * |
| 799 | 799 | * @param int $user_id Optional. User id |
| 800 | 800 | * @uses bbp_get_favorites_permalink() To get the favorites permalink |
| … |
… |
function bbp_favorites_permalink( $user_id = 0 ) { |
| 805 | 805 | /** |
| 806 | 806 | * Return the link to the user's favorites page (profile page) |
| 807 | 807 | * |
| 808 | | * @since bbPress (r2652) |
| | 808 | * @since 2.0.0 bbPress (r2652) |
| 809 | 809 | * |
| 810 | 810 | * @param int $user_id Optional. User id |
| 811 | 811 | * @uses bbp_get_user_profile_url() To get the user profile url |
| … |
… |
function bbp_favorites_permalink( $user_id = 0 ) { |
| 848 | 848 | /** |
| 849 | 849 | * Output the link to make a topic favorite/remove a topic from favorites |
| 850 | 850 | * |
| 851 | | * @since bbPress (r2652) |
| | 851 | * @since 2.0.0 bbPress (r2652) |
| 852 | 852 | * |
| 853 | 853 | * @param array $args See {@link bbp_get_user_favorites_link()} |
| 854 | 854 | * @param int $user_id Optional. User id |
| … |
… |
function bbp_user_favorites_link( $args = array(), $user_id = 0, $wrap = true ) |
| 864 | 864 | * Return the link to make a topic favorite/remove a topic from |
| 865 | 865 | * favorites |
| 866 | 866 | * |
| 867 | | * @since bbPress (r2652) |
| | 867 | * @since 2.0.0 bbPress (r2652) |
| 868 | 868 | * |
| 869 | 869 | * @param array $args This function supports these arguments: |
| 870 | 870 | * - subscribe: Favorite text |
| … |
… |
function bbp_user_favorites_link( $args = array(), $user_id = 0, $wrap = true ) |
| 952 | 952 | /** |
| 953 | 953 | * Output the link to the user's subscriptions page (profile page) |
| 954 | 954 | * |
| 955 | | * @since bbPress (r2688) |
| | 955 | * @since 2.0.0 bbPress (r2688) |
| 956 | 956 | * |
| 957 | 957 | * @param int $user_id Optional. User id |
| 958 | 958 | * @uses bbp_get_subscriptions_permalink() To get the subscriptions link |
| … |
… |
function bbp_subscriptions_permalink( $user_id = 0 ) { |
| 963 | 963 | /** |
| 964 | 964 | * Return the link to the user's subscriptions page (profile page) |
| 965 | 965 | * |
| 966 | | * @since bbPress (r2688) |
| | 966 | * @since 2.0.0 bbPress (r2688) |
| 967 | 967 | * |
| 968 | 968 | * @param int $user_id Optional. User id |
| 969 | 969 | * @uses bbp_get_user_profile_url() To get the user profile url |
| … |
… |
function bbp_subscriptions_permalink( $user_id = 0 ) { |
| 1006 | 1006 | /** |
| 1007 | 1007 | * Output the link to subscribe/unsubscribe from a topic |
| 1008 | 1008 | * |
| 1009 | | * @since bbPress (r2668) |
| | 1009 | * @since 2.0.0 bbPress (r2668) |
| 1010 | 1010 | * |
| 1011 | 1011 | * @param array $args See {@link bbp_get_user_subscribe_link()} |
| 1012 | 1012 | * @param int $user_id Optional. User id |
| … |
… |
function bbp_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) |
| 1019 | 1019 | /** |
| 1020 | 1020 | * Return the link to subscribe/unsubscribe from a forum or topic |
| 1021 | 1021 | * |
| 1022 | | * @since bbPress (r2668) |
| | 1022 | * @since 2.0.0 bbPress (r2668) |
| 1023 | 1023 | * |
| 1024 | 1024 | * @param array $args This function supports these arguments: |
| 1025 | 1025 | * - subscribe: Subscribe text |
| … |
… |
function bbp_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) |
| 1149 | 1149 | /** |
| 1150 | 1150 | * Display profile edit success notice on user edit page |
| 1151 | 1151 | * |
| 1152 | | * @since bbPress (r2688) |
| | 1152 | * @since 2.0.0 bbPress (r2688) |
| 1153 | 1153 | * |
| 1154 | 1154 | * @uses bbp_is_single_user() To check if it's the profile page |
| 1155 | 1155 | * @uses bbp_is_single_user_edit() To check if it's the profile edit page |
| … |
… |
function bbp_notice_edit_user_success() { |
| 1178 | 1178 | /** |
| 1179 | 1179 | * Display pending email change notice on user edit page |
| 1180 | 1180 | * |
| 1181 | | * @since bbPress (r5660) |
| | 1181 | * @since 2.6.0 bbPress (r5660) |
| 1182 | 1182 | * |
| 1183 | 1183 | * @uses bbp_get_displayed_user_id() To get the displayed user ID |
| 1184 | 1184 | * @uses bbp_is_single_user_edit() To check if it's the profile edit page |
| … |
… |
function bbp_notice_edit_user_pending_email() { |
| 1228 | 1228 | /** |
| 1229 | 1229 | * Super admin privileges notice |
| 1230 | 1230 | * |
| 1231 | | * @since bbPress (r2688) |
| | 1231 | * @since 2.0.0 bbPress (r2688) |
| 1232 | 1232 | * |
| 1233 | 1233 | * @uses is_multisite() To check if the blog is multisite |
| 1234 | 1234 | * @uses bbp_is_single_user() To check if it's the profile page |
| … |
… |
function bbp_notice_edit_user_is_super_admin() { |
| 1255 | 1255 | /** |
| 1256 | 1256 | * Drop down for selecting the user's display name |
| 1257 | 1257 | * |
| 1258 | | * @since bbPress (r2688) |
| | 1258 | * @since 2.0.0 bbPress (r2688) |
| 1259 | 1259 | */ |
| 1260 | 1260 | function bbp_edit_user_display_name() { |
| 1261 | 1261 | $bbp = bbpress(); |
| … |
… |
function bbp_edit_user_display_name() { |
| 1303 | 1303 | /** |
| 1304 | 1304 | * Output blog role selector (for user edit) |
| 1305 | 1305 | * |
| 1306 | | * @since bbPress (r2688) |
| | 1306 | * @since 2.0.0 bbPress (r2688) |
| 1307 | 1307 | */ |
| 1308 | 1308 | function bbp_edit_user_blog_role() { |
| 1309 | 1309 | |
| … |
… |
function bbp_edit_user_blog_role() { |
| 1335 | 1335 | /** |
| 1336 | 1336 | * Output forum role selector (for user edit) |
| 1337 | 1337 | * |
| 1338 | | * @since bbPress (r4284) |
| | 1338 | * @since 2.2.0 bbPress (r4284) |
| 1339 | 1339 | */ |
| 1340 | 1340 | function bbp_edit_user_forums_role() { |
| 1341 | 1341 | |
| … |
… |
function bbp_edit_user_forums_role() { |
| 1372 | 1372 | /** |
| 1373 | 1373 | * Return user contact methods Selectbox |
| 1374 | 1374 | * |
| 1375 | | * @since bbPress (r2688) |
| | 1375 | * @since 2.0.0 bbPress (r2688) |
| 1376 | 1376 | * |
| 1377 | 1377 | * @uses _wp_get_user_contactmethods() To get the contact methods |
| 1378 | 1378 | * @uses apply_filters() Calls 'bbp_edit_user_contact_methods' with the methods |
| … |
… |
function bbp_edit_user_contact_methods() { |
| 1391 | 1391 | /** |
| 1392 | 1392 | * Output the link to the user's topics |
| 1393 | 1393 | * |
| 1394 | | * @since bbPress (r4225) |
| | 1394 | * @since 2.2.0 bbPress (r4225) |
| 1395 | 1395 | * |
| 1396 | 1396 | * @param int $user_id Optional. User id |
| 1397 | 1397 | * @uses bbp_get_favorites_permalink() To get the favorites permalink |
| … |
… |
function bbp_user_topics_created_url( $user_id = 0 ) { |
| 1402 | 1402 | /** |
| 1403 | 1403 | * Return the link to the user's topics |
| 1404 | 1404 | * |
| 1405 | | * @since bbPress (r4225) |
| | 1405 | * @since 2.2.0 bbPress (r4225) |
| 1406 | 1406 | * |
| 1407 | 1407 | * @param int $user_id Optional. User id |
| 1408 | 1408 | * @uses bbp_get_user_profile_url() To get the user profile url |
| … |
… |
function bbp_user_topics_created_url( $user_id = 0 ) { |
| 1447 | 1447 | /** |
| 1448 | 1448 | * Output the link to the user's replies |
| 1449 | 1449 | * |
| 1450 | | * @since bbPress (r4225) |
| | 1450 | * @since 2.2.0 bbPress (r4225) |
| 1451 | 1451 | * |
| 1452 | 1452 | * @param int $user_id Optional. User id |
| 1453 | 1453 | * @uses bbp_get_favorites_permalink() To get the favorites permalink |
| … |
… |
function bbp_user_replies_created_url( $user_id = 0 ) { |
| 1458 | 1458 | /** |
| 1459 | 1459 | * Return the link to the user's replies |
| 1460 | 1460 | * |
| 1461 | | * @since bbPress (r4225) |
| | 1461 | * @since 2.2.0 bbPress (r4225) |
| 1462 | 1462 | * |
| 1463 | 1463 | * @param int $user_id Optional. User id |
| 1464 | 1464 | * @uses bbp_get_user_profile_url() To get the user profile url |
| … |
… |
function bbp_user_replies_created_url( $user_id = 0 ) { |
| 1503 | 1503 | /** |
| 1504 | 1504 | * Handle the login and registration template notices |
| 1505 | 1505 | * |
| 1506 | | * @since bbPress (r2970) |
| | 1506 | * @since 2.0.0 bbPress (r2970) |
| 1507 | 1507 | * |
| 1508 | 1508 | * @uses WP_Error bbPress::errors::add() To add an error or message |
| 1509 | 1509 | */ |
| … |
… |
function bbp_login_notices() { |
| 1546 | 1546 | * This should be used before {@link get_header()} is called in template files |
| 1547 | 1547 | * where the user should never have access to the contents of that file. |
| 1548 | 1548 | * |
| 1549 | | * @since bbPress (r2815) |
| | 1549 | * @since 2.0.0 bbPress (r2815) |
| 1550 | 1550 | * |
| 1551 | 1551 | * @param string $url The URL to redirect to |
| 1552 | 1552 | * @uses is_user_logged_in() Check if user is logged in |
| … |
… |
function bbp_logged_in_redirect( $url = '' ) { |
| 1571 | 1571 | /** |
| 1572 | 1572 | * Output the required hidden fields when logging in |
| 1573 | 1573 | * |
| 1574 | | * @since bbPress (r2815) |
| | 1574 | * @since 2.0.0 bbPress (r2815) |
| 1575 | 1575 | * |
| 1576 | 1576 | * @uses apply_filters() To allow custom redirection |
| 1577 | 1577 | * @uses bbp_redirect_to_field() To output the hidden request url field |
| … |
… |
function bbp_user_login_fields() { |
| 1597 | 1597 | /** |
| 1598 | 1598 | * Output the required hidden fields when registering |
| 1599 | 1599 | * |
| 1600 | | * @since bbPress (r2815) |
| | 1600 | * @since 2.0.0 bbPress (r2815) |
| 1601 | 1601 | * |
| 1602 | 1602 | * @uses add_query_arg() To add query args |
| 1603 | 1603 | * @uses bbp_login_url() To get the login url |
| … |
… |
function bbp_user_register_fields() { |
| 1626 | 1626 | /** |
| 1627 | 1627 | * Output the required hidden fields when user lost password |
| 1628 | 1628 | * |
| 1629 | | * @since bbPress (r2815) |
| | 1629 | * @since 2.0.0 bbPress (r2815) |
| 1630 | 1630 | * |
| 1631 | 1631 | * @uses apply_filters() To allow custom redirection |
| 1632 | 1632 | * @uses bbp_redirect_to_field() Set referer |
| … |
… |
function bbp_user_lost_pass_fields() { |
| 1652 | 1652 | /** |
| 1653 | 1653 | * Output the author link of a post |
| 1654 | 1654 | * |
| 1655 | | * @since bbPress (r2875) |
| | 1655 | * @since 2.0.0 bbPress (r2875) |
| 1656 | 1656 | * |
| 1657 | 1657 | * @param array $args Optional. If it is an integer, it is used as post id. |
| 1658 | 1658 | * @uses bbp_get_author_link() To get the post author link |
| … |
… |
function bbp_author_link( $args = array() ) { |
| 1663 | 1663 | /** |
| 1664 | 1664 | * Return the author link of the post |
| 1665 | 1665 | * |
| 1666 | | * @since bbPress (r2875) |
| | 1666 | * @since 2.0.0 bbPress (r2875) |
| 1667 | 1667 | * |
| 1668 | 1668 | * @param array $args Optional. If an integer, it is used as reply id. |
| 1669 | 1669 | * @uses bbp_is_topic() To check if it's a topic page |
| … |
… |
function bbp_author_link( $args = array() ) { |
| 1752 | 1752 | /** |
| 1753 | 1753 | * Check if the user can access a specific forum |
| 1754 | 1754 | * |
| 1755 | | * @since bbPress (r3127) |
| | 1755 | * @since 2.0.0 bbPress (r3127) |
| 1756 | 1756 | * |
| 1757 | 1757 | * @uses bbp_get_current_user_id() |
| 1758 | 1758 | * @uses bbp_get_forum_id() |
| … |
… |
function bbp_user_can_view_forum( $args = array() ) { |
| 1806 | 1806 | /** |
| 1807 | 1807 | * Check if the current user can publish topics |
| 1808 | 1808 | * |
| 1809 | | * @since bbPress (r3127) |
| | 1809 | * @since 2.0.0 bbPress (r3127) |
| 1810 | 1810 | * |
| 1811 | 1811 | * @uses bbp_is_user_keymaster() |
| 1812 | 1812 | * @uses is_user_logged_in() |
| … |
… |
function bbp_current_user_can_publish_topics() { |
| 1842 | 1842 | /** |
| 1843 | 1843 | * Check if the current user can publish forums |
| 1844 | 1844 | * |
| 1845 | | * @since bbPress (r3549) |
| | 1845 | * @since 2.1.0 bbPress (r3549) |
| 1846 | 1846 | * |
| 1847 | 1847 | * @uses bbp_is_user_keymaster() |
| 1848 | 1848 | * @uses bbp_is_user_active() |
| … |
… |
function bbp_current_user_can_publish_forums() { |
| 1872 | 1872 | /** |
| 1873 | 1873 | * Check if the current user can publish replies |
| 1874 | 1874 | * |
| 1875 | | * @since bbPress (r3127) |
| | 1875 | * @since 2.0.0 bbPress (r3127) |
| 1876 | 1876 | * |
| 1877 | 1877 | * @uses bbp_is_user_keymaster() |
| 1878 | 1878 | * @uses is_user_logged_in() |
| … |
… |
function bbp_current_user_can_publish_replies() { |
| 1916 | 1916 | /** |
| 1917 | 1917 | * Get the forums the current user has the ability to see and post to |
| 1918 | 1918 | * |
| 1919 | | * @since bbPress (r3127) |
| | 1919 | * @since 2.0.0 bbPress (r3127) |
| 1920 | 1920 | * |
| 1921 | 1921 | * @uses bbp_get_forum_post_type() |
| 1922 | 1922 | * @uses get_posts() |
| … |
… |
function bbp_get_forums_for_current_user( $args = array() ) { |
| 1969 | 1969 | /** |
| 1970 | 1970 | * Performs a series of checks to ensure the current user can create forums. |
| 1971 | 1971 | * |
| 1972 | | * @since bbPress (r3549) |
| | 1972 | * @since 2.1.0 bbPress (r3549) |
| 1973 | 1973 | * |
| 1974 | 1974 | * @uses bbp_is_user_keymaster() |
| 1975 | 1975 | * @uses bbp_is_forum_edit() |
| … |
… |
function bbp_current_user_can_access_create_forum_form() { |
| 2003 | 2003 | /** |
| 2004 | 2004 | * Performs a series of checks to ensure the current user can create topics. |
| 2005 | 2005 | * |
| 2006 | | * @since bbPress (r3127) |
| | 2006 | * @since 2.0.0 bbPress (r3127) |
| 2007 | 2007 | * |
| 2008 | 2008 | * @uses bbp_is_user_keymaster() |
| 2009 | 2009 | * @uses bbp_is_topic_edit() |
| … |
… |
function bbp_current_user_can_access_create_topic_form() { |
| 2039 | 2039 | /** |
| 2040 | 2040 | * Performs a series of checks to ensure the current user can create replies. |
| 2041 | 2041 | * |
| 2042 | | * @since bbPress (r3127) |
| | 2042 | * @since 2.0.0 bbPress (r3127) |
| 2043 | 2043 | * |
| 2044 | 2044 | * @uses bbp_is_user_keymaster() |
| 2045 | 2045 | * @uses bbp_is_topic_edit() |
| … |
… |
function bbp_current_user_can_access_create_reply_form() { |
| 2076 | 2076 | * Performs a series of checks to ensure the current user should see the |
| 2077 | 2077 | * anonymous user form fields. |
| 2078 | 2078 | * |
| 2079 | | * @since bbPress (r5119) |
| | 2079 | * @since 2.5.0 bbPress (r5119) |
| 2080 | 2080 | * |
| 2081 | 2081 | * @uses bbp_is_anonymous() |
| 2082 | 2082 | * @uses bbp_is_topic_edit() |
-
diff --git src/templates/default/bbpress-functions.php src/templates/default/bbpress-functions.php
index 1a00f46..833e54e 100644
|
|
|
|
| 5 | 5 | * |
| 6 | 6 | * @package bbPress |
| 7 | 7 | * @subpackage BBP_Theme_Compat |
| 8 | | * @since bbPress (r3732) |
| | 8 | * @since 2.1.0 bbPress (r3732) |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | // Exit if accessed directly |
| … |
… |
if ( !class_exists( 'BBP_Default' ) ) : |
| 27 | 27 | * |
| 28 | 28 | * See @link BBP_Theme_Compat() for more. |
| 29 | 29 | * |
| 30 | | * @since bbPress (r3732) |
| | 30 | * @since 2.1.0 bbPress (r3732) |
| 31 | 31 | * |
| 32 | 32 | * @package bbPress |
| 33 | 33 | * @subpackage BBP_Theme_Compat |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 39 | 39 | /** |
| 40 | 40 | * The main bbPress (Default) Loader |
| 41 | 41 | * |
| 42 | | * @since bbPress (r3732) |
| | 42 | * @since 2.1.0 bbPress (r3732) |
| 43 | 43 | * |
| 44 | 44 | * @uses BBP_Default::setup_globals() |
| 45 | 45 | * @uses BBP_Default::setup_actions() |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 60 | 60 | /** |
| 61 | 61 | * Setup the theme hooks |
| 62 | 62 | * |
| 63 | | * @since bbPress (r3732) |
| | 63 | * @since 2.1.0 bbPress (r3732) |
| | 64 | * |
| 64 | 65 | * @access private |
| 65 | 66 | * |
| 66 | 67 | * @uses add_filter() To add various filters |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 91 | 92 | * Inserts HTML at the top of the main content area to be compatible with |
| 92 | 93 | * the Twenty Twelve theme. |
| 93 | 94 | * |
| 94 | | * @since bbPress (r3732) |
| | 95 | * @since 2.1.0 bbPress (r3732) |
| 95 | 96 | */ |
| 96 | 97 | public function before_main_content() { |
| 97 | 98 | ?> |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 106 | 107 | * Inserts HTML at the bottom of the main content area to be compatible with |
| 107 | 108 | * the Twenty Twelve theme. |
| 108 | 109 | * |
| 109 | | * @since bbPress (r3732) |
| | 110 | * @since 2.1.0 bbPress (r3732) |
| 110 | 111 | */ |
| 111 | 112 | public function after_main_content() { |
| 112 | 113 | ?> |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 120 | 121 | /** |
| 121 | 122 | * Load the theme CSS |
| 122 | 123 | * |
| 123 | | * @since bbPress (r3732) |
| | 124 | * @since 2.1.0 bbPress (r3732) |
| 124 | 125 | * |
| 125 | 126 | * @uses wp_enqueue_style() To enqueue the styles |
| 126 | 127 | */ |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 147 | 148 | /** |
| 148 | 149 | * Enqueue the required Javascript files |
| 149 | 150 | * |
| 150 | | * @since bbPress (r3732) |
| | 151 | * @since 2.1.0 bbPress (r3732) |
| 151 | 152 | * |
| 152 | 153 | * @uses bbp_is_single_forum() To check if it's the forum page |
| 153 | 154 | * @uses bbp_is_single_topic() To check if it's the topic page |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 219 | 220 | * |
| 220 | 221 | * These localizations require information that may not be loaded even by init. |
| 221 | 222 | * |
| 222 | | * @since bbPress (r3732) |
| | 223 | * @since 2.1.0 bbPress (r3732) |
| 223 | 224 | * |
| 224 | 225 | * @uses bbp_is_single_forum() To check if it's the forum page |
| 225 | 226 | * @uses bbp_is_single_topic() To check if it's the topic page |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 260 | 261 | /** |
| 261 | 262 | * AJAX handler to Subscribe/Unsubscribe a user from a forum |
| 262 | 263 | * |
| 263 | | * @since bbPress (r5155) |
| | 264 | * @since 2.5.0 bbPress (r5155) |
| 264 | 265 | * |
| 265 | 266 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| 266 | 267 | * @uses bbp_is_user_logged_in() To check if user is logged in |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 328 | 329 | /** |
| 329 | 330 | * AJAX handler to add or remove a topic from a user's favorites |
| 330 | 331 | * |
| 331 | | * @since bbPress (r3732) |
| | 332 | * @since 2.1.0 bbPress (r3732) |
| 332 | 333 | * |
| 333 | 334 | * @uses bbp_is_favorites_active() To check if favorites are active |
| 334 | 335 | * @uses bbp_is_user_logged_in() To check if user is logged in |
| … |
… |
class BBP_Default extends BBP_Theme_Compat { |
| 396 | 397 | /** |
| 397 | 398 | * AJAX handler to Subscribe/Unsubscribe a user from a topic |
| 398 | 399 | * |
| 399 | | * @since bbPress (r3732) |
| | 400 | * @since 2.1.0 bbPress (r3732) |
| 400 | 401 | * |
| 401 | 402 | * @uses bbp_is_subscriptions_active() To check if the subscriptions are active |
| 402 | 403 | * @uses bbp_is_user_logged_in() To check if user is logged in |