Changeset 7357
- Timestamp:
- 11/16/2025 04:55:52 AM (5 months ago)
- Location:
- trunk/src
- Files:
-
- 28 edited
-
includes/admin/classes/class-bbp-admin.php (modified) (1 diff)
-
includes/admin/classes/class-bbp-converter.php (modified) (1 diff)
-
includes/admin/converters/phpBB.php (modified) (1 diff)
-
includes/admin/metaboxes.php (modified) (4 diffs)
-
includes/admin/replies.php (modified) (1 diff)
-
includes/admin/settings.php (modified) (28 diffs)
-
includes/admin/tools/repair.php (modified) (7 diffs)
-
includes/admin/tools/upgrade.php (modified) (1 diff)
-
includes/admin/topics.php (modified) (1 diff)
-
includes/common/classes.php (modified) (1 diff)
-
includes/common/engagements.php (modified) (4 diffs)
-
includes/common/formatting.php (modified) (1 diff)
-
includes/common/functions.php (modified) (3 diffs)
-
includes/common/locale.php (modified) (1 diff)
-
includes/common/locks.php (modified) (2 diffs)
-
includes/common/shortcodes.php (modified) (1 diff)
-
includes/common/widgets.php (modified) (2 diffs)
-
includes/core/template-loader.php (modified) (1 diff)
-
includes/extend/buddypress/groups.php (modified) (1 diff)
-
includes/extend/buddypress/loader.php (modified) (1 diff)
-
includes/forums/functions.php (modified) (5 diffs)
-
includes/replies/functions.php (modified) (1 diff)
-
includes/replies/template.php (modified) (1 diff)
-
includes/search/template.php (modified) (1 diff)
-
includes/topics/functions.php (modified) (3 diffs)
-
includes/topics/template.php (modified) (1 diff)
-
includes/users/engagements.php (modified) (1 diff)
-
templates/default/bbpress-functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/classes/class-bbp-admin.php
r7352 r7357 346 346 if ( is_string( $message ) ) { 347 347 $message = '<p>' . $this->esc_notice( $message ) . '</p>'; 348 $default_class = 'updated';348 $default_class = 'updated'; 349 349 350 350 // Messages as objects -
trunk/src/includes/admin/classes/class-bbp-converter.php
r6833 r7357 389 389 if ( $this->rows_in_step > 0 ) { 390 390 $total_mini_steps = ceil( $this->rows_in_step / $this->rows ); 391 $current_mini_step = ceil( $this->start / $this->rows );391 $current_mini_step = ceil( $this->start / $this->rows ); 392 392 $this->step_percentage = round( ( $current_mini_step / $total_mini_steps ) * 100, 2 ); 393 393 } else { -
trunk/src/includes/admin/converters/phpBB.php
r7006 r7357 810 810 $output .= $itoa64[ $value & 0x3f ]; 811 811 812 if ( $i < $count) {812 if ( $i < $count ) { 813 813 $value |= ord( $input[ $i ] ) << 8; 814 814 } -
trunk/src/includes/admin/metaboxes.php
r7006 r7357 355 355 <strong class="label"><?php esc_html_e( 'Parent:', 'bbpress' ); ?></strong> 356 356 <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum Parent', 'bbpress' ); ?></label> 357 <?php bbp_dropdown( array( 358 'post_type' => bbp_get_forum_post_type(), 359 'selected' => $post_parent, 360 'numberposts' => -1, 361 'orderby' => 'title', 362 'order' => 'ASC', 363 'walker' => '', 364 'exclude' => $post->ID, 365 366 // Output-related 367 'select_id' => 'parent_id', 368 'options_only' => false, 369 'show_none' => esc_html__( '— No parent —', 'bbpress' ), 370 'disable_categories' => false, 371 'disabled' => '' 372 ) ); ?> 357 <?php 358 bbp_dropdown( 359 array( 360 'post_type' => bbp_get_forum_post_type(), 361 'selected' => $post_parent, 362 'numberposts' => -1, 363 'orderby' => 'title', 364 'order' => 'ASC', 365 'walker' => '', 366 'exclude' => $post->ID, 367 368 // Output-related 369 'select_id' => 'parent_id', 370 'options_only' => false, 371 'show_none' => esc_html__( '— No parent —', 'bbpress' ), 372 'disable_categories' => false, 373 'disabled' => '' 374 ) 375 ); 376 ?> 373 377 </p> 374 378 … … 431 435 <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong> 432 436 <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label> 433 <?php bbp_dropdown( array( 434 'post_type' => bbp_get_forum_post_type(), 435 'selected' => bbp_get_topic_forum_id( $post->ID ), 436 'numberposts' => -1, 437 'orderby' => 'title', 438 'order' => 'ASC', 439 'walker' => '', 440 'exclude' => '', 437 <?php 438 bbp_dropdown( 439 array( 440 'post_type' => bbp_get_forum_post_type(), 441 'selected' => bbp_get_topic_forum_id( $post->ID ), 442 'numberposts' => -1, 443 'orderby' => 'title', 444 'order' => 'ASC', 445 'walker' => '', 446 'exclude' => '', 441 447 442 448 // Output-related … … 446 452 'disable_categories' => current_user_can( 'edit_forums' ), 447 453 'disabled' => '' 448 ) ); ?> 454 ) 455 ); 456 ?> 449 457 </p> 450 458 … … 495 503 <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong> 496 504 <label class="screen-reader-text" for="bbp_forum_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label> 497 <?php bbp_dropdown( array( 498 'post_type' => bbp_get_forum_post_type(), 499 'selected' => $reply_forum_id, 500 'numberposts' => -1, 501 'orderby' => 'title', 502 'order' => 'ASC', 503 'walker' => '', 504 'exclude' => '', 505 506 // Output-related 507 'select_id' => 'bbp_forum_id', 508 'options_only' => false, 509 'show_none' => esc_html__( '— No reply —', 'bbpress' ), 510 'disable_categories' => current_user_can( 'edit_forums' ), 511 'disabled' => '' 512 ) ); ?> 505 <?php 506 bbp_dropdown( 507 array( 508 'post_type' => bbp_get_forum_post_type(), 509 'selected' => $reply_forum_id, 510 'numberposts' => -1, 511 'orderby' => 'title', 512 'order' => 'ASC', 513 'walker' => '', 514 'exclude' => '', 515 516 // Output-related 517 'select_id' => 'bbp_forum_id', 518 'options_only' => false, 519 'show_none' => esc_html__( '— No reply —', 'bbpress' ), 520 'disable_categories' => current_user_can( 'edit_forums' ), 521 'disabled' => '' 522 ) 523 ); 524 ?> 513 525 </p> 514 526 -
trunk/src/includes/admin/replies.php
r7352 r7357 415 415 416 416 // Get the reply meta post values 417 $topic_id = ! empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;417 $topic_id = ! empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0; 418 418 $forum_id = ! empty( $_POST['bbp_forum_id'] ) ? (int) $_POST['bbp_forum_id'] : bbp_get_topic_forum_id( $topic_id ); 419 419 $reply_to = ! empty( $_POST['bbp_reply_to'] ) ? (int) $_POST['bbp_reply_to'] : 0; -
trunk/src/includes/admin/settings.php
r7179 r7357 340 340 'callback' => 'bbp_admin_setting_callback_show_on_root', 341 341 'sanitize_callback' => 'sanitize_text_field', 342 'args' => array( 'label_for' =>'_bbp_show_on_root' )342 'args' => array( 'label_for' => '_bbp_show_on_root' ) 343 343 ), 344 344 ), … … 353 353 'callback' => 'bbp_admin_setting_callback_forum_slug', 354 354 'sanitize_callback' => 'bbp_sanitize_slug', 355 'args' => array( 'label_for' =>'_bbp_forum_slug' )355 'args' => array( 'label_for' => '_bbp_forum_slug' ) 356 356 ), 357 357 … … 361 361 'callback' => 'bbp_admin_setting_callback_topic_slug', 362 362 'sanitize_callback' => 'bbp_sanitize_slug', 363 'args' => array( 'label_for' =>'_bbp_topic_slug' )363 'args' => array( 'label_for' => '_bbp_topic_slug' ) 364 364 ), 365 365 … … 369 369 'callback' => 'bbp_admin_setting_callback_topic_tag_slug', 370 370 'sanitize_callback' => 'bbp_sanitize_slug', 371 'args' => array( 'label_for' =>'_bbp_topic_tag_slug' )371 'args' => array( 'label_for' => '_bbp_topic_tag_slug' ) 372 372 ), 373 373 … … 377 377 'callback' => 'bbp_admin_setting_callback_view_slug', 378 378 'sanitize_callback' => 'bbp_sanitize_slug', 379 'args' => array( 'label_for' =>'_bbp_view_slug' )379 'args' => array( 'label_for' => '_bbp_view_slug' ) 380 380 ), 381 381 … … 385 385 'callback' => 'bbp_admin_setting_callback_reply_slug', 386 386 'sanitize_callback' => 'bbp_sanitize_slug', 387 'args' => array( 'label_for' =>'_bbp_reply_slug' )387 'args' => array( 'label_for' => '_bbp_reply_slug' ) 388 388 ), 389 389 … … 393 393 'callback' => 'bbp_admin_setting_callback_edit_slug', 394 394 'sanitize_callback' => 'bbp_sanitize_slug', 395 'args' => array( 'label_for' =>'_bbp_edit_slug' )395 'args' => array( 'label_for' => '_bbp_edit_slug' ) 396 396 ), 397 397 … … 401 401 'callback' => 'bbp_admin_setting_callback_search_slug', 402 402 'sanitize_callback' => 'bbp_sanitize_slug', 403 'args' => array( 'label_for' =>'_bbp_search_slug' )403 'args' => array( 'label_for' => '_bbp_search_slug' ) 404 404 ) 405 405 ), … … 414 414 'callback' => 'bbp_admin_setting_callback_user_slug', 415 415 'sanitize_callback' => 'bbp_sanitize_slug', 416 'args' => array( 'label_for' =>'_bbp_user_slug' )416 'args' => array( 'label_for' => '_bbp_user_slug' ) 417 417 ), 418 418 … … 422 422 'callback' => 'bbp_admin_setting_callback_topic_archive_slug', 423 423 'sanitize_callback' => 'bbp_sanitize_slug', 424 'args' => array( 'label_for' =>'_bbp_topic_archive_slug' )424 'args' => array( 'label_for' => '_bbp_topic_archive_slug' ) 425 425 ), 426 426 … … 430 430 'callback' => 'bbp_admin_setting_callback_reply_archive_slug', 431 431 'sanitize_callback' => 'bbp_sanitize_slug', 432 'args' => array( 'label_for' =>'_bbp_reply_archive_slug' )432 'args' => array( 'label_for' => '_bbp_reply_archive_slug' ) 433 433 ), 434 434 … … 438 438 'callback' => 'bbp_admin_setting_callback_user_favs_slug', 439 439 'sanitize_callback' => 'bbp_sanitize_slug', 440 'args' => array( 'label_for' =>'_bbp_user_favs_slug' )440 'args' => array( 'label_for' => '_bbp_user_favs_slug' ) 441 441 ), 442 442 … … 446 446 'callback' => 'bbp_admin_setting_callback_user_subs_slug', 447 447 'sanitize_callback' => 'bbp_sanitize_slug', 448 'args' => array( 'label_for' =>'_bbp_user_subs_slug' )448 'args' => array( 'label_for' => '_bbp_user_subs_slug' ) 449 449 ), 450 450 … … 454 454 'callback' => 'bbp_admin_setting_callback_user_engagements_slug', 455 455 'sanitize_callback' => 'bbp_sanitize_slug', 456 'args' => array( 'label_for' =>'_bbp_user_engs_slug' )456 'args' => array( 'label_for' => '_bbp_user_engs_slug' ) 457 457 ) 458 458 ), … … 475 475 'callback' => 'bbp_admin_setting_callback_group_forums_root_id', 476 476 'sanitize_callback' => 'intval', 477 'args' => array( 'label_for' =>'_bbp_group_forums_root_id' )477 'args' => array( 'label_for' => '_bbp_group_forums_root_id' ) 478 478 ) 479 479 ), … … 502 502 'callback' => 'bbp_converter_setting_callback_platform', 503 503 'sanitize_callback' => 'sanitize_text_field', 504 'args' => array( 'label_for' => '_bbp_converter_platform' )504 'args' => array( 'label_for' => '_bbp_converter_platform' ) 505 505 ), 506 506 … … 510 510 'callback' => 'bbp_converter_setting_callback_dbserver', 511 511 'sanitize_callback' => 'sanitize_text_field', 512 'args' => array( 'label_for' => '_bbp_converter_db_server' )512 'args' => array( 'label_for' => '_bbp_converter_db_server' ) 513 513 ), 514 514 … … 518 518 'callback' => 'bbp_converter_setting_callback_dbport', 519 519 'sanitize_callback' => 'intval', 520 'args' => array( 'label_for' => '_bbp_converter_db_port' )520 'args' => array( 'label_for' => '_bbp_converter_db_port' ) 521 521 ), 522 522 … … 526 526 'callback' => 'bbp_converter_setting_callback_dbname', 527 527 'sanitize_callback' => 'sanitize_text_field', 528 'args' => array( 'label_for' => '_bbp_converter_db_name' )528 'args' => array( 'label_for' => '_bbp_converter_db_name' ) 529 529 ), 530 530 … … 534 534 'callback' => 'bbp_converter_setting_callback_dbuser', 535 535 'sanitize_callback' => 'sanitize_text_field', 536 'args' => array( 'label_for' => '_bbp_converter_db_user' )536 'args' => array( 'label_for' => '_bbp_converter_db_user' ) 537 537 ), 538 538 … … 542 542 'callback' => 'bbp_converter_setting_callback_dbpass', 543 543 'sanitize_callback' => 'sanitize_text_field', 544 'args' => array( 'label_for' => '_bbp_converter_db_pass' )544 'args' => array( 'label_for' => '_bbp_converter_db_pass' ) 545 545 ), 546 546 … … 550 550 'callback' => 'bbp_converter_setting_callback_dbprefix', 551 551 'sanitize_callback' => 'sanitize_text_field', 552 'args' => array( 'label_for' => '_bbp_converter_db_prefix' )552 'args' => array( 'label_for' => '_bbp_converter_db_prefix' ) 553 553 ) 554 554 ), … … 562 562 'callback' => 'bbp_converter_setting_callback_rows', 563 563 'sanitize_callback' => 'intval', 564 'args' => array( 'label_for' => '_bbp_converter_rows' )564 'args' => array( 'label_for' => '_bbp_converter_rows' ) 565 565 ), 566 566 … … 570 570 'callback' => 'bbp_converter_setting_callback_delay_time', 571 571 'sanitize_callback' => 'intval', 572 'args' => array( 'label_for' => '_bbp_converter_delay_time' )572 'args' => array( 'label_for' => '_bbp_converter_delay_time' ) 573 573 ), 574 574 … … 578 578 'callback' => 'bbp_converter_setting_callback_convert_users', 579 579 'sanitize_callback' => 'intval', 580 'args' => array( 'label_for' => '_bbp_converter_convert_users' )580 'args' => array( 'label_for' => '_bbp_converter_convert_users' ) 581 581 ), 582 582 … … 586 586 'callback' => 'bbp_converter_setting_callback_halt', 587 587 'sanitize_callback' => 'intval', 588 'args' => array( 'label_for' => '_bbp_converter_halt' )588 'args' => array( 'label_for' => '_bbp_converter_halt' ) 589 589 ), 590 590 … … 594 594 'callback' => 'bbp_converter_setting_callback_restart', 595 595 'sanitize_callback' => 'intval', 596 'args' => array( 'label_for' => '_bbp_converter_restart' )596 'args' => array( 'label_for' => '_bbp_converter_restart' ) 597 597 ), 598 598 … … 602 602 'callback' => 'bbp_converter_setting_callback_clean', 603 603 'sanitize_callback' => 'intval', 604 'args' => array( 'label_for' => '_bbp_converter_clean' )604 'args' => array( 'label_for' => '_bbp_converter_clean' ) 605 605 ) 606 606 ) -
trunk/src/includes/admin/tools/repair.php
r7352 r7357 84 84 </td> 85 85 <th scope="col" id="description" class="manage-column column-primary column-description sortable <?php echo ( 'priority' === $orderby ) ? esc_attr( $order ) : 'asc'; ?>"> 86 <a href="<?php echo esc_url( bbp_get_admin_repair_tool_page_url( array( 87 'orderby' => 'priority', 88 'order' => $new_order 89 ) ) ); ?>"><span><?php esc_html_e( 'Description', 'bbpress' ); ?></span><span class="sorting-indicator"></span> 90 </a> 86 <a href=" 87 <?php 88 echo esc_url( 89 bbp_get_admin_repair_tool_page_url( 90 array( 91 'orderby' => 'priority', 92 'order' => $new_order 93 ) 94 ) 95 ); 96 ?>"> 97 <span> 98 <?php 99 esc_html_e( 'Description', 'bbpress' ); 100 ?> 101 </span> 102 <span class="sorting-indicator"></span> 91 103 </th> 92 104 <th scope="col" id="components" class="manage-column column-components"> … … 94 106 </th> 95 107 <th scope="col" id="overhead" class="manage-column column-overhead sortable <?php echo ( 'overhead' === $orderby ) ? esc_attr( $order ) : 'asc'; ?>"> 96 <a href="<?php echo esc_url( bbp_get_admin_repair_tool_page_url( array( 97 'orderby' => 'overhead', 98 'order' => $new_order 99 ) ) ); ?>"><span><?php esc_html_e( 'Overhead', 'bbpress' ); ?></span><span class="sorting-indicator"></span> 100 </a> 108 <a href=" 109 <?php 110 echo esc_url( 111 bbp_get_admin_repair_tool_page_url( 112 array( 113 'orderby' => 'overhead', 114 'order' => $new_order 115 ) 116 ) 117 ); 118 ?>"> 119 <span> 120 <?php 121 esc_html_e( 'Overhead', 'bbpress' ); 122 ?> 123 </span> 124 <span class="sorting-indicator"></span> 101 125 </th> 102 126 </tr> … … 513 537 } 514 538 515 if ( ! count( $insert_values ) ) {539 if ( ! count( $insert_values ) ) { 516 540 return array( 2, sprintf( $statement, $result ) ); 517 541 } … … 563 587 } 564 588 565 if ( ! count( $insert_values ) ) {589 if ( ! count( $insert_values ) ) { 566 590 return array( 2, sprintf( $statement, $result ) ); 567 591 } … … 633 657 } 634 658 635 if ( ! count( $values ) ) {659 if ( ! count( $values ) ) { 636 660 $result = esc_html__( 'Nothing to remove!', 'bbpress' ); 637 661 return array( 0, sprintf( $statement, $result ) ); … … 702 726 } 703 727 704 if ( ! count( $values ) ) {728 if ( ! count( $values ) ) { 705 729 $result = esc_html__( 'Nothing to remove!', 'bbpress' ); 706 730 return array( 0, sprintf( $statement, $result ) ); … … 771 795 } 772 796 773 if ( ! count( $values ) ) {797 if ( ! count( $values ) ) { 774 798 $result = esc_html__( 'Nothing to remove!', 'bbpress' ); 775 799 return array( 0, sprintf( $statement, $result ) ); -
trunk/src/includes/admin/tools/upgrade.php
r7150 r7357 83 83 </td> 84 84 <th scope="col" id="description" class="manage-column column-primary column-description sortable <?php echo ( 'priority' === $orderby ) ? esc_attr( $order ) : 'asc'; ?>"> 85 <a href="<?php echo esc_url( bbp_get_admin_repair_tool_page_url( array( 86 'orderby' => 'priority', 87 'order' => $new_order 88 ) ) ); ?>"><span><?php esc_html_e( 'Description', 'bbpress' ); ?></span><span class="sorting-indicator"></span> 85 <a href=" 86 <?php 87 echo esc_url( 88 bbp_get_admin_repair_tool_page_url( 89 array( 90 'orderby' => 'priority', 91 'order' => $new_order 92 ) 93 ) 94 ); 95 ?>"> 96 <span><?php esc_html_e( 'Description', 'bbpress' ); ?></span> 97 <span class="sorting-indicator"></span> 89 98 </a> 90 99 </th> 91 100 <th scope="col" id="version" class="manage-column column-version sortable <?php echo ( 'version' === $orderby ) ? esc_attr( $order ) : 'asc'; ?>"> 92 <a href="<?php echo esc_url( bbp_get_admin_repair_tool_page_url( array( 93 'orderby' => 'version', 94 'order' => $new_order 95 ) ) ); ?>"><span><?php esc_html_e( 'Version', 'bbpress' ); ?></span><span class="sorting-indicator"></span> 101 <a href=" 102 <?php 103 echo esc_url( 104 bbp_get_admin_repair_tool_page_url( 105 array( 106 'orderby' => 'version', 107 'order' => $new_order 108 ) 109 ) 110 ); 111 ?>"> 112 <span><?php esc_html_e( 'Version', 'bbpress' ); ?></span> 113 <span class="sorting-indicator"></span> 96 114 </a> 97 115 </th> 98 <th scope="col" id="components" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th> 116 <th scope="col" id="components" class="manage-column column-components"> 117 <?php esc_html_e( 'Components', 'bbpress' ); ?> 118 </th> 99 119 <th scope="col" id="overhead" class="manage-column column-overhead sortable <?php echo ( 'overhead' === $orderby ) ? esc_attr( $order ) : 'asc'; ?>"> 100 <a href="<?php echo esc_url( bbp_get_admin_repair_tool_page_url( array( 101 'orderby' => 'overhead', 102 'order' => $new_order 103 ) ) ); ?>"><span><?php esc_html_e( 'Overhead', 'bbpress' ); ?></span><span class="sorting-indicator"></span> 120 <a href=" 121 <?php 122 echo esc_url( 123 bbp_get_admin_repair_tool_page_url( 124 array( 125 'orderby' => 'overhead', 126 'order' => $new_order 127 ) 128 ) 129 ); 130 ?>"> 131 <span><?php esc_html_e( 'Overhead', 'bbpress' ); ?></span> 132 <span class="sorting-indicator"></span> 104 133 </a> 105 134 </th> -
trunk/src/includes/admin/topics.php
r7352 r7357 622 622 ? true 623 623 : false; 624 $message = ( true === $is_sticky )624 $message = ( true === $is_sticky ) 625 625 ? 'unstuck' 626 626 : 'stuck'; 627 $message = ( true === $is_super )627 $message = ( true === $is_super ) 628 628 ? 'super_sticky' 629 629 : $message; 630 $success = ( true === $is_sticky )630 $success = ( true === $is_sticky ) 631 631 ? bbp_unstick_topic( $topic_id ) 632 632 : bbp_stick_topic( $topic_id, $is_super ); -
trunk/src/includes/common/classes.php
r6573 r7357 223 223 // - the forum is a category 224 224 // - forum is closed 225 if ( ( true === $args['disable_categories'] )225 if ( ( true === $args['disable_categories'] ) 226 226 && ( bbp_get_forum_post_type() === $object->post_type ) 227 227 && ( bbp_is_forum_category( $object->ID ) -
trunk/src/includes/common/engagements.php
r7025 r7357 279 279 if ( is_numeric( $args ) ) { 280 280 $args = array( 281 'meta_query' => array( array( 282 'key' => $meta_key, 283 'value' => bbp_get_user_id( $args, false, false ), 284 'compare' => 'NUMERIC' 285 ) ) 281 'meta_query' => array( 282 array( 283 'key' => $meta_key, 284 'value' => bbp_get_user_id( $args, false, false ), 285 'compare' => 'NUMERIC' 286 ) 287 ) 286 288 ); 287 289 } … … 289 291 // Default arguments 290 292 $defaults = array( 291 'meta_query' => array( array( 292 'key' => $meta_key, 293 'value' => bbp_get_displayed_user_id(), 294 'compare' => 'NUMERIC' 295 ) ) 293 'meta_query' => array( 294 array( 295 'key' => $meta_key, 296 'value' => bbp_get_displayed_user_id(), 297 'compare' => 'NUMERIC' 298 ) 299 ) 296 300 ); 297 301 … … 503 507 if ( is_numeric( $args ) ) { 504 508 $args = array( 505 'tax_query' => array( array( 506 'taxonomy' => $tax_key, 507 'terms' => $user_key . bbp_get_user_id( $args, false, false ), 508 'field' => 'slug' 509 ) ) 509 'tax_query' => array( 510 array( 511 'taxonomy' => $tax_key, 512 'terms' => $user_key . bbp_get_user_id( $args, false, false ), 513 'field' => 'slug' 514 ) 515 ) 510 516 ); 511 517 } … … 513 519 // Default arguments 514 520 $defaults = array( 515 'tax_query' => array( array( 516 'taxonomy' => $tax_key, 517 'terms' => $user_key . bbp_get_displayed_user_id(), 518 'field' => 'slug' 519 ) ) 521 'tax_query' => array( 522 array( 523 'taxonomy' => $tax_key, 524 'terms' => $user_key . bbp_get_displayed_user_id(), 525 'field' => 'slug' 526 ) 527 ) 520 528 ); 521 529 -
trunk/src/includes/common/formatting.php
r7352 r7357 215 215 216 216 // Wrap blocks in pre tags 217 if ( '`' !== $matches[1] ) {217 if ( '`' !== $matches[1] ) { 218 218 $content = "\n<pre>" . $content . "</pre>\n"; 219 219 } -
trunk/src/includes/common/functions.php
r7315 r7357 591 591 // Parse arguments against default values 592 592 $r = bbp_parse_args( $args, array( 593 'bbp_anonymous_name' => ! empty( $_POST['bbp_anonymous_name'] ) ? $_POST['bbp_anonymous_name'] : false,594 'bbp_anonymous_email' => ! empty( $_POST['bbp_anonymous_email'] ) ? $_POST['bbp_anonymous_email'] : false,593 'bbp_anonymous_name' => ! empty( $_POST['bbp_anonymous_name'] ) ? $_POST['bbp_anonymous_name'] : false, 594 'bbp_anonymous_email' => ! empty( $_POST['bbp_anonymous_email'] ) ? $_POST['bbp_anonymous_email'] : false, 595 595 'bbp_anonymous_website' => ! empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false, 596 596 ), 'filter_anonymous_post_data' ); … … 742 742 743 743 // Get the meta SQL 744 $clauses = get_meta_sql( array( array( 745 'key' => '_bbp_anonymous_email', 746 'value' => $email, 747 ) ), 'post', $bbp_db->posts, 'ID' ); 744 $clauses = get_meta_sql( 745 array( 746 array( 747 'key' => '_bbp_anonymous_email', 748 'value' => $email, 749 ) 750 ), 751 'post', 752 $bbp_db->posts, 753 'ID' 754 ); 748 755 749 756 // Set clauses … … 2387 2394 2388 2395 // Restrict to specific forum ID 2389 $meta_query = array( array( 2390 'key' => '_bbp_forum_id', 2391 'value' => bbp_get_forum_id(), 2392 'type' => 'NUMERIC', 2393 'compare' => '=' 2394 ) ); 2396 $meta_query = array( 2397 array( 2398 'key' => '_bbp_forum_id', 2399 'value' => bbp_get_forum_id(), 2400 'type' => 'NUMERIC', 2401 'compare' => '=' 2402 ) 2403 ); 2395 2404 } 2396 2405 -
trunk/src/includes/common/locale.php
r6118 r7357 31 31 */ 32 32 function bbp_translate_user_role( $name ) { 33 return translate_with_gettext_context( before_last_bar( $name ), 'User role', 'bbpress' ); 33 // WordPress.WP.I18n.NoEmptyStrings 34 // -- empty string is intentional here as actual content comes from database 35 return _x( before_last_bar( $name ), 'User role', 'bbpress' ); // phpcs:ignore 34 36 } 35 37 -
trunk/src/includes/common/locks.php
r7352 r7357 24 24 25 25 // Bail if no post 26 if ( ! $post = get_post( $post_id ) ) {26 if ( ! $post = get_post( $post_id ) ) { 27 27 return false; 28 28 } 29 29 30 30 // Bail if no lock 31 if ( ! $lock = get_post_meta( $post->ID, '_edit_lock', true ) ) {31 if ( ! $lock = get_post_meta( $post->ID, '_edit_lock', true ) ) { 32 32 return false; 33 33 } … … 63 63 64 64 // Bail if no post 65 if ( ! $post = get_post( $post_id ) ) {65 if ( ! $post = get_post( $post_id ) ) { 66 66 return false; 67 67 } -
trunk/src/includes/common/shortcodes.php
r7076 r7357 847 847 */ 848 848 public function display_topics_of_tag_query( $args = array() ) { 849 $args['tax_query'] = array( array( 850 'taxonomy' => bbp_get_topic_tag_tax_id(), 851 'field' => 'id', 852 'terms' => bbpress()->current_topic_tag_id 853 ) ); 849 $args['tax_query'] = array( 850 array( 851 'taxonomy' => bbp_get_topic_tag_tax_id(), 852 'field' => 'id', 853 'terms' => bbpress()->current_topic_tag_id 854 ) 855 ); 854 856 855 857 return $args; -
trunk/src/includes/common/widgets.php
r7009 r7357 696 696 'post_parent' => $settings['parent_forum'], 697 697 'posts_per_page' => (int) $settings['max_shown'], 698 'meta_query' => array( array( 699 'key' => '_bbp_last_active_time', 700 'type' => 'DATETIME' 701 ) ), 698 'meta_query' => array( 699 array( 700 'key' => '_bbp_last_active_time', 701 'type' => 'DATETIME' 702 ) 703 ), 702 704 703 705 // Ordering … … 722 724 'post_parent' => $settings['parent_forum'], 723 725 'posts_per_page' => (int) $settings['max_shown'], 724 'meta_query' => array( array( 725 'key' => '_bbp_reply_count', 726 'type' => 'NUMERIC' 727 ) ), 726 'meta_query' => array( 727 array( 728 'key' => '_bbp_reply_count', 729 'type' => 'NUMERIC' 730 ) 731 ), 728 732 729 733 // Ordering -
trunk/src/includes/core/template-loader.php
r7343 r7357 33 33 34 34 // User favorites 35 elseif ( bbp_is_favorites() && ( $new_template = bbp_get_favorites_template() ) ) :35 elseif ( bbp_is_favorites() && ( $new_template = bbp_get_favorites_template() ) ) : 36 36 37 37 // User favorites 38 elseif ( bbp_is_subscriptions() && ( $new_template = bbp_get_subscriptions_template() ) ) :38 elseif ( bbp_is_subscriptions() && ( $new_template = bbp_get_subscriptions_template() ) ) : 39 39 40 40 // Viewing a user 41 elseif ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template() ) ) :41 elseif ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template() ) ) : 42 42 43 43 // Single View 44 elseif ( bbp_is_single_view() && ( $new_template = bbp_get_single_view_template() ) ) :44 elseif ( bbp_is_single_view() && ( $new_template = bbp_get_single_view_template() ) ) : 45 45 46 46 // Search 47 elseif ( bbp_is_search() && ( $new_template = bbp_get_search_template() ) ) :47 elseif ( bbp_is_search() && ( $new_template = bbp_get_search_template() ) ) : 48 48 49 49 // Forum edit 50 elseif ( bbp_is_forum_edit() && ( $new_template = bbp_get_forum_edit_template() ) ) :50 elseif ( bbp_is_forum_edit() && ( $new_template = bbp_get_forum_edit_template() ) ) : 51 51 52 52 // Single Forum 53 elseif ( bbp_is_single_forum() && ( $new_template = bbp_get_single_forum_template() ) ) :53 elseif ( bbp_is_single_forum() && ( $new_template = bbp_get_single_forum_template() ) ) : 54 54 55 55 // Forum Archive 56 elseif ( bbp_is_forum_archive() && ( $new_template = bbp_get_forum_archive_template() ) ) :56 elseif ( bbp_is_forum_archive() && ( $new_template = bbp_get_forum_archive_template() ) ) : 57 57 58 58 // Topic merge 59 elseif ( bbp_is_topic_merge() && ( $new_template = bbp_get_topic_merge_template() ) ) :59 elseif ( bbp_is_topic_merge() && ( $new_template = bbp_get_topic_merge_template() ) ) : 60 60 61 61 // Topic split 62 elseif ( bbp_is_topic_split() && ( $new_template = bbp_get_topic_split_template() ) ) :62 elseif ( bbp_is_topic_split() && ( $new_template = bbp_get_topic_split_template() ) ) : 63 63 64 64 // Topic edit 65 elseif ( bbp_is_topic_edit() && ( $new_template = bbp_get_topic_edit_template() ) ) :65 elseif ( bbp_is_topic_edit() && ( $new_template = bbp_get_topic_edit_template() ) ) : 66 66 67 67 // Single Topic 68 elseif ( bbp_is_single_topic() && ( $new_template = bbp_get_single_topic_template() ) ) :68 elseif ( bbp_is_single_topic() && ( $new_template = bbp_get_single_topic_template() ) ) : 69 69 70 70 // Topic Archive 71 elseif ( bbp_is_topic_archive() && ( $new_template = bbp_get_topic_archive_template() ) ) :71 elseif ( bbp_is_topic_archive() && ( $new_template = bbp_get_topic_archive_template() ) ) : 72 72 73 73 // Reply move 74 elseif ( bbp_is_reply_move() && ( $new_template = bbp_get_reply_move_template() ) ) :74 elseif ( bbp_is_reply_move() && ( $new_template = bbp_get_reply_move_template() ) ) : 75 75 76 76 // Editing a reply 77 elseif ( bbp_is_reply_edit() && ( $new_template = bbp_get_reply_edit_template() ) ) :77 elseif ( bbp_is_reply_edit() && ( $new_template = bbp_get_reply_edit_template() ) ) : 78 78 79 79 // Single Reply 80 elseif ( bbp_is_single_reply() && ( $new_template = bbp_get_single_reply_template() ) ) :80 elseif ( bbp_is_single_reply() && ( $new_template = bbp_get_single_reply_template() ) ) : 81 81 82 82 // Editing a topic tag 83 elseif ( bbp_is_topic_tag_edit() && ( $new_template = bbp_get_topic_tag_edit_template() ) ) :83 elseif ( bbp_is_topic_tag_edit() && ( $new_template = bbp_get_topic_tag_edit_template() ) ) : 84 84 85 85 // Viewing a topic tag 86 elseif ( bbp_is_topic_tag() && ( $new_template = bbp_get_topic_tag_template() ) ) :86 elseif ( bbp_is_topic_tag() && ( $new_template = bbp_get_topic_tag_template() ) ) : 87 87 endif; 88 88 -
trunk/src/includes/extend/buddypress/groups.php
r7336 r7357 656 656 657 657 // Bail if not looking at this screen 658 if ( ! bp_is_group_creation_step( $this->slug ) ) {658 if ( ! bp_is_group_creation_step( $this->slug ) ) { 659 659 return false; 660 660 } -
trunk/src/includes/extend/buddypress/loader.php
r7305 r7357 196 196 197 197 // Stop if there is no user displayed or logged in 198 if ( ! is_user_logged_in() && ! bp_displayed_user_id() ) {198 if ( ! is_user_logged_in() && ! bp_displayed_user_id() ) { 199 199 return; 200 200 } -
trunk/src/includes/forums/functions.php
r7352 r7357 602 602 } else { 603 603 $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : ''; 604 bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ));604 bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found with your forum: %s Please try again.', 'bbpress' ) ), $append_error ); 605 605 } 606 606 } … … 1092 1092 1093 1093 // Update this forum id 1094 update_post_meta( $forum_id, '_bbp_topic_count', (int) ( $topic_count + $difference ) );1094 update_post_meta( $forum_id, '_bbp_topic_count', (int) ( $topic_count + $difference ) ); 1095 1095 update_post_meta( $forum_id, '_bbp_total_topic_count', (int) ( $total_topic_count + $difference ) ); 1096 1096 … … 1214 1214 1215 1215 // Update this forum id 1216 update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) ( $reply_count + $difference ) );1216 update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) ( $reply_count + $difference ) ); 1217 1217 update_post_meta( $forum_id, '_bbp_total_topic_count_hidden', (int) ( $total_topic_count + $difference ) ); 1218 1218 … … 1337 1337 1338 1338 // Update this forum id 1339 update_post_meta( $forum_id, '_bbp_reply_count', (int) ( $reply_count + $difference ) );1339 update_post_meta( $forum_id, '_bbp_reply_count', (int) ( $reply_count + $difference ) ); 1340 1340 update_post_meta( $forum_id, '_bbp_total_reply_count', (int) ( $total_reply_count + $difference ) ); 1341 1341 … … 1396 1396 1397 1397 // Update this forum id 1398 update_post_meta( $forum_id, '_bbp_reply_count_hidden', (int) ( $reply_count + $difference ) );1398 update_post_meta( $forum_id, '_bbp_reply_count_hidden', (int) ( $reply_count + $difference ) ); 1399 1399 update_post_meta( $forum_id, '_bbp_total_reply_count_hidden', (int) ( $total_reply_count + $difference ) ); 1400 1400 -
trunk/src/includes/replies/functions.php
r7352 r7357 825 825 } else { 826 826 $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : ''; 827 bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ));827 bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found with your reply: %s. Please try again.', 'bbpress' ) ), $append_error ); 828 828 } 829 829 } -
trunk/src/includes/replies/template.php
r7352 r7357 2301 2301 2302 2302 // If pretty permalinks are enabled, make our pagination pretty 2303 if ( bbp_use_pretty_urls() && ! bbp_is_topic_pending( $topic_id ) ) {2303 if ( bbp_use_pretty_urls() && ! bbp_is_topic_pending( $topic_id ) ) { 2304 2304 2305 2305 // User's replies -
trunk/src/includes/search/template.php
r7280 r7357 298 298 299 299 // Searching globally 300 if ( ! is_null( $search_terms ) ) {300 if ( ! is_null( $search_terms ) ) { 301 301 $search_terms = wp_unslash( $search_terms ); 302 302 -
trunk/src/includes/topics/functions.php
r7352 r7357 760 760 } else { 761 761 $append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : ''; 762 bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ));762 bbp_add_error( 'bbp_topic_error', sprintf( esc_html_e( '<strong>Error</strong>: The following problem(s) have been found with your topic: %s. Please try again.', 'bbpress' ) ), $append_error ); 763 763 } 764 764 } … … 1775 1775 1776 1776 // Attempt to update the tag 1777 $slug = ! empty( $_POST['tag-slug'] ) ? $_POST['tag-slug'] : '';1777 $slug = ! empty( $_POST['tag-slug'] ) ? $_POST['tag-slug'] : ''; 1778 1778 $description = ! empty( $_POST['tag-description'] ) ? $_POST['tag-description'] : ''; 1779 1779 $tag = wp_update_term( $tag_id, bbp_get_topic_tag_tax_id(), array( … … 3852 3852 <dc:creator><?php the_author(); ?></dc:creator> 3853 3853 3854 <?php if ( ! post_password_required() ) : ?>3854 <?php if ( ! post_password_required() ) : ?> 3855 3855 3856 3856 <description> -
trunk/src/includes/topics/template.php
r7352 r7357 418 418 // Adjust loop and counts for new sticky positions 419 419 $query->found_posts = (int) $query->found_posts + (int) $sticky_count; 420 $query->post_count = (int) $query->post_count + (int) $sticky_count;420 $query->post_count = (int) $query->post_count + (int) $sticky_count; 421 421 } 422 422 } -
trunk/src/includes/users/engagements.php
r7098 r7357 957 957 'post_type' => $r['object_type'], 958 958 'posts_per_page' => -1, 959 'meta_query' => array( array( 960 'key' => $r['rel_key'], 961 'value' => $r['user_id'], 962 'compare' => 'NUMERIC' 963 ), 964 965 // Performance 966 'nopaging' => true, 967 'suppress_filters' => true, 968 'update_post_term_cache' => false, 969 'update_post_meta_cache' => false, 970 'ignore_sticky_posts' => true, 971 'no_found_rows' => true 972 ) ); 959 'meta_query' => array( 960 array( 961 'key' => $r['rel_key'], 962 'value' => $r['user_id'], 963 'compare' => 'NUMERIC' 964 ), 965 // Performance 966 'nopaging' => true, 967 'suppress_filters' => true, 968 'update_post_term_cache' => false, 969 'update_post_meta_cache' => false, 970 'ignore_sticky_posts' => true, 971 'no_found_rows' => true 972 ) 973 ); 973 974 } 974 975 -
trunk/src/templates/default/bbpress-functions.php
r7190 r7357 241 241 // Get user and topic data 242 242 $user_id = bbp_get_current_user_id(); 243 $id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;243 $id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0; 244 244 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post'; 245 245 … … 267 267 $status = bbp_is_user_favorite( $user_id, $object->ID ) 268 268 ? bbp_remove_user_favorite( $user_id, $object->ID ) 269 : bbp_add_user_favorite( $user_id, $object->ID );269 : bbp_add_user_favorite( $user_id, $object->ID ); 270 270 271 271 // Bail if action failed … … 304 304 // Get user and topic data 305 305 $user_id = bbp_get_current_user_id(); 306 $id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;306 $id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0; 307 307 $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post'; 308 308 … … 330 330 $status = bbp_is_user_subscribed( $user_id, $object->ID ) 331 331 ? bbp_remove_user_subscription( $user_id, $object->ID ) 332 : bbp_add_user_subscription( $user_id, $object->ID );332 : bbp_add_user_subscription( $user_id, $object->ID ); 333 333 334 334 // Bail if action failed … … 354 354 } 355 355 new BBP_Default(); 356 endif; 356 357 endif; // class_exists check
Note: See TracChangeset
for help on using the changeset viewer.