Changeset 7374
- Timestamp:
- 11/18/2025 02:56:26 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 43 edited
-
phpcs.xml.dist (modified) (1 diff)
-
src/includes/admin/classes/class-bbp-admin.php (modified) (3 diffs)
-
src/includes/admin/converters/AEF.php (modified) (1 diff)
-
src/includes/admin/converters/Drupal7.php (modified) (1 diff)
-
src/includes/admin/converters/Example.php (modified) (1 diff)
-
src/includes/admin/converters/FluxBB.php (modified) (1 diff)
-
src/includes/admin/converters/Invision.php (modified) (1 diff)
-
src/includes/admin/converters/Kunena3.php (modified) (1 diff)
-
src/includes/admin/converters/MyBB.php (modified) (1 diff)
-
src/includes/admin/converters/PHPFox3.php (modified) (1 diff)
-
src/includes/admin/converters/PHPWind.php (modified) (1 diff)
-
src/includes/admin/converters/Phorum.php (modified) (1 diff)
-
src/includes/admin/converters/PunBB.php (modified) (1 diff)
-
src/includes/admin/converters/SMF.php (modified) (1 diff)
-
src/includes/admin/converters/XMB.php (modified) (1 diff)
-
src/includes/admin/converters/XenForo.php (modified) (1 diff)
-
src/includes/admin/converters/e107v1.php (modified) (1 diff)
-
src/includes/admin/converters/vBulletin.php (modified) (1 diff)
-
src/includes/admin/converters/vBulletin3.php (modified) (1 diff)
-
src/includes/admin/forums.php (modified) (1 diff)
-
src/includes/admin/metaboxes.php (modified) (5 diffs)
-
src/includes/admin/replies.php (modified) (2 diffs)
-
src/includes/admin/settings.php (modified) (1 diff)
-
src/includes/admin/tools/repair.php (modified) (3 diffs)
-
src/includes/admin/topics.php (modified) (4 diffs)
-
src/includes/common/functions.php (modified) (1 diff)
-
src/includes/common/widgets.php (modified) (2 diffs)
-
src/includes/forums/template.php (modified) (1 diff)
-
src/includes/replies/functions.php (modified) (1 diff)
-
src/includes/replies/template.php (modified) (4 diffs)
-
src/includes/topics/functions.php (modified) (1 diff)
-
src/includes/topics/template.php (modified) (7 diffs)
-
src/templates/default/bbpress/content-archive-topic.php (modified) (1 diff)
-
src/templates/default/bbpress/content-topic-tag-edit.php (modified) (1 diff)
-
src/templates/default/bbpress/form-reply-move.php (modified) (1 diff)
-
src/templates/default/bbpress/form-topic-merge.php (modified) (1 diff)
-
src/templates/default/bbpress/form-topic-split.php (modified) (1 diff)
-
src/templates/default/bbpress/form-topic-tag.php (modified) (1 diff)
-
src/templates/default/bbpress/form-user-lost-pass.php (modified) (2 diffs)
-
src/templates/default/bbpress/loop-single-forum.php (modified) (2 diffs)
-
src/templates/default/bbpress/loop-single-topic.php (modified) (3 diffs)
-
src/templates/default/extras/page-topic-tags.php (modified) (1 diff)
-
src/templates/default/extras/page-topics-no-replies.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpcs.xml.dist
r7373 r7374 476 476 </rule> 477 477 478 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine">479 <exclude-pattern>/src/*</exclude-pattern>480 </rule>481 482 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound">483 <exclude-pattern>/src/*</exclude-pattern>484 </rule>485 486 478 <rule ref="WordPress.Arrays.ArrayIndentation.ItemNotAligned"> 487 479 <exclude-pattern>/src/*</exclude-pattern> -
trunk/src/includes/admin/classes/class-bbp-admin.php
r7361 r7374 255 255 256 256 // Link to upgrade page 257 $upgrade_url = add_query_arg( array( 'page' => 'bbp-upgrade', 'status' => 'pending' ), admin_url( 'tools.php' ) ); 257 $args = array( 258 'page' => 'bbp-upgrade', 259 'status' => 'pending' 260 ); 261 $upgrade_url = add_query_arg( $args, admin_url( 'tools.php' ) ); 258 262 $dismiss_url = wp_nonce_url( add_query_arg( array( 'bbp-hide-notice' => 'bbp-skip-upgrades' ) ), 'bbp-hide-notice' ); 259 263 $upgrade_link = '<a href="' . esc_url( $upgrade_url ) . '">' . esc_html__( 'Learn More', 'bbpress' ) . '</a>'; … … 870 874 $this->styles_url . 'mint/colors' . $suffix . '.css', 871 875 array( '#4f6d59', '#33834e', '#5FB37C', '#81c498' ), 872 array( 'base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff' ) 876 array( 877 'base' => '#f1f3f2', 878 'focus' => '#fff', 879 'current' => '#fff' 880 ) 873 881 ); 874 882 … … 879 887 $this->styles_url . 'evergreen/colors' . $suffix . '.css', 880 888 array( '#324d3a', '#446950', '#56b274', '#324d3a' ), 881 array( 'base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff' ) 889 array( 890 'base' => '#f1f3f2', 891 'focus' => '#fff', 892 'current' => '#fff' 893 ) 882 894 ); 883 895 } -
trunk/src/includes/admin/converters/AEF.php
r7352 r7374 578 578 */ 579 579 public function callback_savepass( $field, $row ) { 580 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 580 $pass_array = array( 581 'hash' => $field, 582 'salt' => $row['salt'] 583 ); 584 581 585 return $pass_array; 582 586 } -
trunk/src/includes/admin/converters/Drupal7.php
r7372 r7374 576 576 */ 577 577 public function callback_savepass( $field, $row ) { 578 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 578 $pass_array = array( 579 'hash' => $field, 580 'salt' => $row['salt'] 581 ); 582 579 583 return $pass_array; 580 584 } -
trunk/src/includes/admin/converters/Example.php
r7372 r7374 697 697 */ 698 698 public function callback_savepass( $field, $row ) { 699 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 699 $pass_array = array( 700 'hash' => $field, 701 'salt' => $row['salt'] 702 ); 703 700 704 return $pass_array; 701 705 } -
trunk/src/includes/admin/converters/FluxBB.php
r7372 r7374 601 601 */ 602 602 public function callback_savepass( $field, $row ) { 603 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 603 $pass_array = array( 604 'hash' => $field, 605 'salt' => $row['salt'] 606 ); 607 604 608 return $pass_array; 605 609 } -
trunk/src/includes/admin/converters/Invision.php
r7352 r7374 528 528 */ 529 529 public function callback_savepass( $field, $row ) { 530 return array( 'hash' => $field, 'salt' => $row['members_pass_salt'] ); 530 return array( 531 'hash' => $field, 532 'salt' => $row['members_pass_salt'] 533 ); 531 534 } 532 535 -
trunk/src/includes/admin/converters/Kunena3.php
r7372 r7374 711 711 */ 712 712 public function callback_savepass( $field, $row ) { 713 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 713 $pass_array = array( 714 'hash' => $field, 715 'salt' => $row['salt'] 716 ); 717 714 718 return $pass_array; 715 719 } -
trunk/src/includes/admin/converters/MyBB.php
r7352 r7374 525 525 */ 526 526 public function callback_savepass( $field, $row ) { 527 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 527 $pass_array = array( 528 'hash' => $field, 529 'salt' => $row['salt'] 530 ); 531 528 532 return $pass_array; 529 533 } -
trunk/src/includes/admin/converters/PHPFox3.php
r7352 r7374 515 515 */ 516 516 public function callback_savepass( $field, $row ) { 517 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 517 $pass_array = array( 518 'hash' => $field, 519 'salt' => $row['salt'] 520 ); 521 518 522 return $pass_array; 519 523 } -
trunk/src/includes/admin/converters/PHPWind.php
r7372 r7374 497 497 */ 498 498 public function callback_savepass( $field, $row ) { 499 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 499 $pass_array = array( 500 'hash' => $field, 501 'salt' => $row['salt'] 502 ); 503 500 504 return $pass_array; 501 505 } -
trunk/src/includes/admin/converters/Phorum.php
r7372 r7374 527 527 */ 528 528 public function callback_savepass( $field, $row ) { 529 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 529 $pass_array = array( 530 'hash' => $field, 531 'salt' => $row['salt'] 532 ); 533 530 534 return $pass_array; 531 535 } -
trunk/src/includes/admin/converters/PunBB.php
r7352 r7374 672 672 */ 673 673 public function callback_savepass( $field, $row ) { 674 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 674 $pass_array = array( 675 'hash' => $field, 676 'salt' => $row['salt'] 677 ); 678 675 679 return $pass_array; 676 680 } -
trunk/src/includes/admin/converters/SMF.php
r7352 r7374 667 667 */ 668 668 public function callback_savepass( $field, $row ) { 669 $pass_array = array( 'hash' => $field, 'username' => $row['member_name'] ); 669 $pass_array = array( 670 'hash' => $field, 671 'username' => $row['member_name'] 672 ); 673 670 674 return $pass_array; 671 675 } -
trunk/src/includes/admin/converters/XMB.php
r7372 r7374 634 634 */ 635 635 public function callback_savepass( $field, $row ) { 636 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 636 $pass_array = array( 637 'hash' => $field, 638 'salt' => $row['salt'] 639 ); 640 637 641 return $pass_array; 638 642 } -
trunk/src/includes/admin/converters/XenForo.php
r7372 r7374 690 690 */ 691 691 public function translate_savepass( $field, $row ) { 692 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 692 $pass_array = array( 693 'hash' => $field, 694 'salt' => $row['salt'] 695 ); 696 693 697 return $pass_array; 694 698 } -
trunk/src/includes/admin/converters/e107v1.php
r7352 r7374 480 480 */ 481 481 public function callback_savepass( $field, $row ) { 482 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 482 $pass_array = array( 483 'hash' => $field, 484 'salt' => $row['salt'] 485 ); 486 483 487 return $pass_array; 484 488 } -
trunk/src/includes/admin/converters/vBulletin.php
r7372 r7374 641 641 */ 642 642 public function callback_savepass( $field, $row ) { 643 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 643 $pass_array = array( 644 'hash' => $field, 645 'salt' => $row['salt'] 646 ); 647 644 648 return $pass_array; 645 649 } -
trunk/src/includes/admin/converters/vBulletin3.php
r7372 r7374 641 641 */ 642 642 public function callback_savepass( $field, $row ) { 643 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 643 $pass_array = array( 644 'hash' => $field, 645 'salt' => $row['salt'] 646 ); 647 644 648 return $pass_array; 645 649 } -
trunk/src/includes/admin/forums.php
r7372 r7374 655 655 // Show the 'close' and 'open' link on published, private, hidden and closed posts only 656 656 if ( in_array( $forum->post_status, array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id(), bbp_get_closed_status_id() ), true ) ) { 657 $close_uri = wp_nonce_url( add_query_arg( array( 'forum_id' => $forum->ID, 'action' => 'bbp_toggle_forum_close' ), remove_query_arg( array( 'bbp_forum_toggle_notice', 'forum_id', 'failed', 'super' ) ) ), 'close-forum_' . $forum->ID ); 657 $args = array( 658 'forum_id' => $forum->ID, 659 'action' => 'bbp_toggle_forum_close' 660 ); 661 $close_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_forum_toggle_notice', 'forum_id', 'failed', 'super' ) ) ), 'close-forum_' . $forum->ID ); 658 662 if ( bbp_is_forum_open( $forum->ID ) ) { 659 663 $actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this forum', 'bbpress' ) . '">' . _x( 'Close', 'Close a Forum', 'bbpress' ) . '</a>'; -
trunk/src/includes/admin/metaboxes.php
r7361 r7374 80 80 // Topic Tags 81 81 if ( bbp_allow_topic_tags() && isset( $r['topic_tag_count'] ) ) { 82 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) ); 82 $args = array( 83 'taxonomy' => bbp_get_topic_tag_tax_id(), 84 'post_type' => bbp_get_topic_post_type() 85 ); 86 $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); 83 87 /* translators: %s: Number of topic tags */ 84 $text = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count_int'], 'bbpress' ), $r['topic_tag_count'] ); 88 $text = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count_int'], 'bbpress' ), $r['topic_tag_count'] ); 89 85 90 $elements[] = current_user_can( 'manage_topic_tags' ) 86 91 ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>' … … 178 183 $text = _n( 'Topic Tag', 'Topic Tags', $r['topic_tag_count_int'], 'bbpress' ); 179 184 if ( current_user_can( 'manage_topic_tags' ) ) { 180 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) ); 185 $args = array( 186 'taxonomy' => bbp_get_topic_tag_tax_id(), 187 'post_type' => bbp_get_topic_post_type() 188 ); 189 $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); 181 190 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 182 191 $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>'; … … 272 281 $num = $r['empty_topic_tag_count']; 273 282 $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $r['empty_topic_tag_count_int'], 'bbpress' ); 274 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) ); 283 $args = array( 284 'taxonomy' => bbp_get_topic_tag_tax_id(), 285 'post_type' => bbp_get_topic_post_type() 286 ); 287 $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); 275 288 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 276 289 $text = '<a class="waiting" href="' . esc_url( $link ) . '">' . $text . '</a>'; … … 438 451 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' === $post->post_status ) ? 'draft' : $post->post_status ); ?>" /> 439 452 <label class="screen-reader-text" for="bbp_open_close_topic"><?php esc_html_e( 'Select whether to open or close the topic.', 'bbpress' ); ?></label> 440 <?php bbp_form_topic_status_dropdown( array( 'select_id' => 'post_status', 'topic_id' => $post->ID ) ); ?> 453 <?php bbp_form_topic_status_dropdown( 454 array( 455 'select_id' => 'post_status', 456 'topic_id' => $post->ID 457 ) 458 ); ?> 441 459 </p> 442 460 … … 505 523 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' === $post->post_status ) ? 'draft' : $post->post_status ); ?>" /> 506 524 <label class="screen-reader-text" for="post_status"><?php esc_html_e( 'Select what status to give the reply.', 'bbpress' ); ?></label> 507 <?php bbp_form_reply_status_dropdown( array( 'select_id' => 'post_status', 'reply_id' => $post->ID ) ); ?> 525 <?php bbp_form_reply_status_dropdown( 526 array( 527 'select_id' => 'post_status', 528 'reply_id' => $post->ID 529 ) 530 ); ?> 508 531 </p> 509 532 -
trunk/src/includes/admin/replies.php
r7372 r7374 850 850 851 851 // Show the 'approve' link on non-published posts only and 'unapprove' on published posts only 852 $approve_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_approve' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'approve-reply_' . $reply->ID ); 852 $args = array( 853 'reply_id' => $reply->ID, 854 'action' => 'bbp_toggle_reply_approve' 855 ); 856 $approve_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'approve-reply_' . $reply->ID ); 853 857 if ( bbp_is_reply_public( $reply->ID ) ) { 854 858 $actions['unapproved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Unapprove this reply', 'bbpress' ) . '">' . _x( 'Unapprove', 'Unapprove reply', 'bbpress' ) . '</a>'; … … 859 863 // Show the 'spam' link on published and pending replies and 'not spam' on spammed replies 860 864 if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_trash_status_id(), bbp_get_pending_status_id(), bbp_get_spam_status_id() ), true ) ) { 861 $spam_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ); 865 $args = array( 866 'reply_id' => $reply->ID, 867 'action' => 'bbp_toggle_reply_spam' 868 ); 869 $spam_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ); 862 870 if ( ! bbp_is_reply_spam( $reply->ID ) ) { 863 871 $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this reply as spam', 'bbpress' ) . '">' . esc_html__( 'Spam', 'bbpress' ) . '</a>'; -
trunk/src/includes/admin/settings.php
r7373 r7374 2100 2100 $core_slugs = apply_filters( 'bbp_slug_conflict_check', array( 2101 2101 2102 /** WordPress Core ************************************************ ****/2102 /** WordPress Core ************************************************/ 2103 2103 2104 2104 // Core Post Types 2105 'post_base' => array( 'name' => esc_html__( 'Posts', 'bbpress' ), 'default' => 'post', 'context' => 'WordPress' ), 2106 'page_base' => array( 'name' => esc_html__( 'Pages', 'bbpress' ), 'default' => 'page', 'context' => 'WordPress' ), 2107 'revision_base' => array( 'name' => esc_html__( 'Revisions', 'bbpress' ), 'default' => 'revision', 'context' => 'WordPress' ), 2108 'attachment_base' => array( 'name' => esc_html__( 'Attachments', 'bbpress' ), 'default' => 'attachment', 'context' => 'WordPress' ), 2109 'nav_menu_base' => array( 'name' => esc_html__( 'Menus', 'bbpress' ), 'default' => 'nav_menu_item', 'context' => 'WordPress' ), 2105 'post_base' => array( 2106 'name' => esc_html__( 'Posts', 'bbpress' ), 2107 'default' => 'post', 2108 'context' => 'WordPress' 2109 ), 2110 'page_base' => array( 2111 'name' => esc_html__( 'Pages', 'bbpress' ), 2112 'default' => 'page', 2113 'context' => 'WordPress' 2114 ), 2115 'revision_base' => array( 2116 'name' => esc_html__( 'Revisions', 'bbpress' ), 2117 'default' => 'revision', 2118 'context' => 'WordPress' 2119 ), 2120 'attachment_base' => array( 2121 'name' => esc_html__( 'Attachments', 'bbpress' ), 2122 'default' => 'attachment', 2123 'context' => 'WordPress' 2124 ), 2125 'nav_menu_base' => array( 2126 'name' => esc_html__( 'Menus', 'bbpress' ), 2127 'default' => 'nav_menu_item', 2128 'context' => 'WordPress' 2129 ), 2110 2130 2111 2131 // Post Tags 2112 'tag_base' => array( 'name' => esc_html__( 'Tag base', 'bbpress' ), 'default' => 'tag', 'context' => 'WordPress' ), 2132 'tag_base' => array( 2133 'name' => esc_html__( 'Tag base', 'bbpress' ), 2134 'default' => 'tag', 2135 'context' => 'WordPress' 2136 ), 2113 2137 2114 2138 // Post Categories 2115 'category_base' => array( 'name' => esc_html__( 'Category base', 'bbpress' ), 'default' => 'category', 'context' => 'WordPress' ), 2116 2117 /** bbPress Core ******************************************************/ 2139 'category_base' => array( 2140 'name' => esc_html__( 'Category base', 'bbpress' ), 2141 'default' => 'category', 2142 'context' => 'WordPress' 2143 ), 2144 2145 /** bbPress Core **************************************************/ 2118 2146 2119 2147 // Forum archive slug 2120 '_bbp_root_slug' => array( 'name' => esc_html__( 'Forums base', 'bbpress' ), 'default' => 'forums', 'context' => 'bbPress' ), 2148 '_bbp_root_slug' => array( 2149 'name' => esc_html__( 'Forums base', 'bbpress' ), 2150 'default' => 'forums', 2151 'context' => 'bbPress' 2152 ), 2121 2153 2122 2154 // Topic archive slug 2123 '_bbp_topic_archive_slug' => array( 'name' => esc_html__( 'Topics base', 'bbpress' ), 'default' => 'topics', 'context' => 'bbPress' ), 2155 '_bbp_topic_archive_slug' => array( 2156 'name' => esc_html__( 'Topics base', 'bbpress' ), 2157 'default' => 'topics', 2158 'context' => 'bbPress' 2159 ), 2124 2160 2125 2161 // Forum slug 2126 '_bbp_forum_slug' => array( 'name' => esc_html__( 'Forum slug', 'bbpress' ), 'default' => 'forum', 'context' => 'bbPress' ), 2162 '_bbp_forum_slug' => array( 2163 'name' => esc_html__( 'Forum slug', 'bbpress' ), 2164 'default' => 'forum', 2165 'context' => 'bbPress' 2166 ), 2127 2167 2128 2168 // Topic slug 2129 '_bbp_topic_slug' => array( 'name' => esc_html__( 'Topic slug', 'bbpress' ), 'default' => 'topic', 'context' => 'bbPress' ), 2169 '_bbp_topic_slug' => array( 2170 'name' => esc_html__( 'Topic slug', 'bbpress' ), 2171 'default' => 'topic', 2172 'context' => 'bbPress' 2173 ), 2130 2174 2131 2175 // Reply slug 2132 '_bbp_reply_slug' => array( 'name' => esc_html__( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ), 2176 '_bbp_reply_slug' => array( 2177 'name' => esc_html__( 'Reply slug', 'bbpress' ), 2178 'default' => 'reply', 2179 'context' => 'bbPress' 2180 ), 2133 2181 2134 2182 // Edit slug 2135 '_bbp_edit_slug' => array( 'name' => esc_html__( 'Edit slug', 'bbpress' ), 'default' => 'edit', 'context' => 'bbPress' ), 2183 '_bbp_edit_slug' => array( 2184 'name' => esc_html__( 'Edit slug', 'bbpress' ), 2185 'default' => 'edit', 2186 'context' => 'bbPress' 2187 ), 2136 2188 2137 2189 // User profile slug 2138 '_bbp_user_slug' => array( 'name' => esc_html__( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ), 2190 '_bbp_user_slug' => array( 2191 'name' => esc_html__( 'User base', 'bbpress' ), 2192 'default' => 'users', 2193 'context' => 'bbPress' 2194 ), 2139 2195 2140 2196 // View slug 2141 '_bbp_view_slug' => array( 'name' => esc_html__( 'View base', 'bbpress' ), 'default' => 'view', 'context' => 'bbPress' ), 2197 '_bbp_view_slug' => array( 2198 'name' => esc_html__( 'View base', 'bbpress' ), 2199 'default' => 'view', 2200 'context' => 'bbPress' 2201 ), 2142 2202 2143 2203 // Topic tag slug 2144 '_bbp_topic_tag_slug' => array( 'name' => esc_html__( 'Topic tag slug', 'bbpress' ), 'default' => 'topic-tag', 'context' => 'bbPress' ), 2204 '_bbp_topic_tag_slug' => array( 2205 'name' => esc_html__( 'Topic tag slug', 'bbpress' ), 2206 'default' => 'topic-tag', 2207 'context' => 'bbPress' 2208 ), 2145 2209 ) ); 2146 2210 2147 /** BuddyPress Core *************************************************** ****/2211 /** BuddyPress Core ***************************************************/ 2148 2212 2149 2213 if ( defined( 'BP_VERSION' ) ) { -
trunk/src/includes/admin/tools/repair.php
r7360 r7374 385 385 } 386 386 387 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 387 $forums = get_posts( array( 388 'post_type' => bbp_get_forum_post_type(), 389 'numberposts' => -1 390 ) ); 391 388 392 if ( ! empty( $forums ) ) { 389 393 foreach ( $forums as $forum ) { … … 473 477 474 478 // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum 475 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 479 $forums = get_posts( array( 480 'post_type' => bbp_get_forum_post_type(), 481 'numberposts' => -1 482 ) ); 483 476 484 if ( ! empty( $forums ) ) { 477 485 foreach ( $forums as $forum ) { … … 516 524 517 525 // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum 518 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 526 $forums = get_posts( array( 527 'post_type' => bbp_get_forum_post_type(), 528 'numberposts' => -1 529 ) ); 530 519 531 if ( ! empty( $forums ) ) { 520 532 foreach ( $forums as $forum ) { -
trunk/src/includes/admin/topics.php
r7372 r7374 1002 1002 // Pending 1003 1003 // Show the 'approve' and 'view' link on pending posts only and 'unapprove' on published posts only 1004 $approve_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_approve' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'approve-topic_' . $topic->ID ); 1004 $args = array( 1005 'topic_id' => $topic->ID, 1006 'action' => 'bbp_toggle_topic_approve' 1007 ); 1008 $approve_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'approve-topic_' . $topic->ID ); 1005 1009 if ( bbp_is_topic_public( $topic->ID ) ) { 1006 1010 $actions['unapproved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Unapprove this topic', 'bbpress' ) . '">' . _x( 'Unapprove', 'Unapprove Topic', 'bbpress' ) . '</a>'; … … 1020 1024 // Show the 'close' and 'open' link on published and closed posts only 1021 1025 if ( bbp_is_topic_public( $topic->ID ) ) { 1022 $close_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ); 1026 $args = array( 1027 'topic_id' => $topic->ID, 1028 'action' => 'bbp_toggle_topic_close' 1029 ); 1030 $close_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ); 1023 1031 if ( bbp_is_topic_open( $topic->ID ) ) { 1024 1032 $actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . _x( 'Close', 'Close a Topic', 'bbpress' ) . '</a>'; … … 1031 1039 // Dont show sticky if topic is spam, trash or pending 1032 1040 if ( ! bbp_is_topic_spam( $topic->ID ) && ! bbp_is_topic_trash( $topic->ID ) && ! bbp_is_topic_pending( $topic->ID ) ) { 1033 $stick_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_stick' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_' . $topic->ID ); 1041 $args = array( 1042 'topic_id' => $topic->ID, 1043 'action' => 'bbp_toggle_topic_stick' 1044 ); 1045 $stick_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_' . $topic->ID ); 1034 1046 if ( bbp_is_topic_sticky( $topic->ID ) ) { 1035 1047 $actions['stick'] = '<a href="' . esc_url( $stick_uri ) . '" title="' . esc_attr__( 'Unstick this topic', 'bbpress' ) . '">' . esc_html__( 'Unstick', 'bbpress' ) . '</a>'; 1036 1048 } else { 1037 $super_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_stick', 'super' => '1' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_' . $topic->ID ); 1049 $args = array( 1050 'topic_id' => $topic->ID, 1051 'action' => 'bbp_toggle_topic_stick', 1052 'super' => '1' 1053 ); 1054 $super_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_' . $topic->ID ); 1038 1055 $actions['stick'] = '<a href="' . esc_url( $stick_uri ) . '" title="' . esc_attr__( 'Stick this topic to its forum', 'bbpress' ) . '">' . esc_html__( 'Stick', 'bbpress' ) . '</a> <a href="' . esc_url( $super_uri ) . '" title="' . esc_attr__( 'Stick this topic to front', 'bbpress' ) . '">' . esc_html__( '(to front)', 'bbpress' ) . '</a>'; 1039 1056 } … … 1041 1058 1042 1059 // Spam 1043 $spam_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_spam' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'spam-topic_' . $topic->ID ); 1060 $args = array( 1061 'topic_id' => $topic->ID, 1062 'action' => 'bbp_toggle_topic_spam' 1063 ); 1064 $spam_uri = wp_nonce_url( add_query_arg( $args, remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'spam-topic_' . $topic->ID ); 1044 1065 if ( ! bbp_is_topic_spam( $topic->ID ) ) { 1045 1066 $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this topic as spam', 'bbpress' ) . '">' . esc_html__( 'Spam', 'bbpress' ) . '</a>'; -
trunk/src/includes/common/functions.php
r7373 r7374 1789 1789 // Create cache key 1790 1790 $parent_id = absint( $parent_id ); 1791 $key = md5( serialize( array( 'parent_id' => $parent_id, 'post_type' => bbp_get_post_types() ) ) ); 1791 $key = md5( serialize( array( 1792 'parent_id' => $parent_id, 1793 'post_type' => bbp_get_post_types() 1794 ) ) ); 1792 1795 $last_changed = wp_cache_get_last_changed( 'bbpress_posts' ); 1793 1796 $cache_key = "bbp_child_counts:{$key}:{$last_changed}"; -
trunk/src/includes/common/widgets.php
r7360 r7374 795 795 // Maybe get the topic author 796 796 if ( ! empty( $settings['show_user'] ) ) : 797 $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) ); 797 $author_link = bbp_get_topic_author_link( array( 798 'post_id' => $topic_id, 799 'type' => 'both', 800 'size' => 14 801 ) ); 798 802 endif; ?> 799 803 … … 1144 1148 // Only query user if showing them 1145 1149 if ( ! empty( $settings['show_user'] ) ) : 1146 $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) ); 1150 $author_link = bbp_get_reply_author_link( array( 1151 'post_id' => $reply_id, 1152 'type' => 'both', 1153 'size' => 14 1154 ) ); 1147 1155 else : 1148 1156 $author_link = false; -
trunk/src/includes/forums/template.php
r7369 r7374 2080 2080 $topic_text = bbp_get_forum_topics_link( $forum_id ); 2081 2081 $time_since = bbp_get_forum_freshness_link( $forum_id ); 2082 $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_active, 'size' => $r['size'] ) ); 2082 $last_updated_by = bbp_get_author_link( array( 2083 'post_id' => $last_active, 2084 'size' => $r['size'] 2085 ) ); 2083 2086 2084 2087 // Forum has no last active data -
trunk/src/includes/replies/functions.php
r7360 r7374 1247 1247 // Get the logs and append the new one to those 1248 1248 $revision_log = bbp_get_reply_raw_revision_log( $r['reply_id'] ); 1249 $revision_log[ $r['revision_id'] ] = array( 'author' => $r['author_id'], 'reason' => $r['reason'] ); 1249 $revision_log[ $r['revision_id'] ] = array( 1250 'author' => $r['author_id'], 1251 'reason' => $r['reason'] 1252 ); 1250 1253 1251 1254 // Finally, update -
trunk/src/includes/replies/template.php
r7366 r7374 771 771 } 772 772 773 $author = bbp_get_author_link( array( 'size' => 14, 'link_text' => bbp_get_reply_author_display_name( $revision->ID ), 'post_id' => $revision->ID ) );774 773 $since = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) ); 774 $author = bbp_get_author_link( array( 775 'size' => 14, 776 'link_text' => bbp_get_reply_author_display_name( $revision->ID ), 777 'post_id' => $revision->ID 778 ) ); 775 779 776 780 $r .= "\t" . '<li id="bbp-reply-revision-log-' . esc_attr( $reply_id ) . '-item-' . esc_attr( $revision->ID ) . '" class="bbp-reply-revision-log-item">' . "\n"; … … 2021 2025 // Trashed 2022 2026 if ( bbp_is_reply_trash( $reply->ID ) ) { 2023 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-restore-link">' . $r['restore_text'] . '</a>'; 2027 $query = array( 2028 'action' => 'bbp_toggle_reply_trash', 2029 'sub_action' => 'untrash', 2030 'reply_id' => $reply->ID 2031 ); 2032 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( $query ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-restore-link">' . $r['restore_text'] . '</a>'; 2024 2033 2025 2034 // Trash 2026 2035 } elseif ( ! empty( $trash_days ) ) { 2027 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash', 'reply_id' => $reply->ID ) ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-trash-link">' . $r['trash_text'] . '</a>'; 2036 $query = array( 2037 'action' => 'bbp_toggle_reply_trash', 2038 'sub_action' => 'trash', 2039 'reply_id' => $reply->ID 2040 ); 2041 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( $query ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-trash-link">' . $r['trash_text'] . '</a>'; 2028 2042 } 2029 2043 2030 2044 // No trash 2031 2045 if ( bbp_is_reply_trash( $reply->ID ) || empty( $trash_days ) ) { 2032 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete', 'reply_id' => $reply->ID ) ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-reply-delete-link">' . $r['delete_text'] . '</a>'; 2046 $query = array( 2047 'action' => 'bbp_toggle_reply_trash', 2048 'sub_action' => 'delete', 2049 'reply_id' => $reply->ID 2050 ); 2051 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( $query ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-reply-delete-link">' . $r['delete_text'] . '</a>'; 2033 2052 } 2034 2053 … … 2083 2102 } 2084 2103 2085 $display = bbp_is_reply_spam( $reply->ID ) ? $r['unspam_text'] : $r['spam_text']; 2086 $uri = add_query_arg( array( 'action' => 'bbp_toggle_reply_spam', 'reply_id' => $reply->ID ) ); 2087 $uri = wp_nonce_url( $uri, 'spam-reply_' . $reply->ID ); 2088 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-reply-spam-link">' . $display . '</a>' . $r['link_after']; 2104 $display = bbp_is_reply_spam( $reply->ID ) 2105 ? $r['unspam_text'] 2106 : $r['spam_text']; 2107 2108 $query = array( 2109 'action' => 'bbp_toggle_reply_spam', 2110 'reply_id' => $reply->ID 2111 ); 2112 2113 $uri = add_query_arg( $query ); 2114 $uri = wp_nonce_url( $uri, 'spam-reply_' . $reply->ID ); 2115 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-reply-spam-link">' . $display . '</a>' . $r['link_after']; 2089 2116 2090 2117 // Filter & return … … 2255 2282 } 2256 2283 2257 $display = bbp_is_reply_pending( $reply->ID ) ? $r['approve_text'] : $r['unapprove_text']; 2258 $uri = add_query_arg( array( 'action' => 'bbp_toggle_reply_approve', 'reply_id' => $reply->ID ) ); 2259 $uri = wp_nonce_url( $uri, 'approve-reply_' . $reply->ID ); 2260 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-reply-approve-link">' . $display . '</a>' . $r['link_after']; 2284 $display = bbp_is_reply_pending( $reply->ID ) 2285 ? $r['approve_text'] 2286 : $r['unapprove_text']; 2287 2288 $query = array( 2289 'action' => 'bbp_toggle_reply_approve', 2290 'reply_id' => $reply->ID 2291 ); 2292 2293 $uri = add_query_arg( $query ); 2294 $uri = wp_nonce_url( $uri, 'approve-reply_' . $reply->ID ); 2295 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-reply-approve-link">' . $display . '</a>' . $r['link_after']; 2261 2296 2262 2297 // Filter & return -
trunk/src/includes/topics/functions.php
r7360 r7374 2836 2836 // Get the logs and append the new one to those 2837 2837 $revision_log = bbp_get_topic_raw_revision_log( $r['topic_id'] ); 2838 $revision_log[ $r['revision_id'] ] = array( 'author' => $r['author_id'], 'reason' => $r['reason'] ); 2838 $revision_log[ $r['revision_id'] ] = array( 2839 'author' => $r['author_id'], 2840 'reason' => $r['reason'] 2841 ); 2839 2842 2840 2843 // Finally, update -
trunk/src/includes/topics/template.php
r7366 r7374 926 926 } 927 927 928 $author = bbp_get_author_link( array( 'size' => 14, 'link_text' => bbp_get_topic_author_display_name( $revision->ID ), 'post_id' => $revision->ID ) );929 928 $since = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) ); 929 $author = bbp_get_author_link( array( 930 'size' => 14, 931 'link_text' => bbp_get_topic_author_display_name( $revision->ID ), 932 'post_id' => $revision->ID 933 ) ); 930 934 931 935 $retval .= "\t" . '<li id="bbp-topic-revision-log-' . esc_attr( $topic_id ) . '-item-' . esc_attr( $revision->ID ) . '" class="bbp-topic-revision-log-item">' . "\n"; … … 2542 2546 2543 2547 if ( bbp_is_topic_trash( $topic->ID ) ) { 2544 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-restore-link">' . $r['restore_text'] . '</a>'; 2548 $action_url = add_query_arg( array( 2549 'action' => 'bbp_toggle_topic_trash', 2550 'sub_action' => 'untrash', 2551 'topic_id' => $topic->ID 2552 ) ); 2553 $action = 'untrash-' . $topic->post_type . '_' . $topic->ID; 2554 $nonce_url = wp_nonce_url( $action_url, $action ); 2555 2556 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( $nonce_url ) . '" class="bbp-topic-restore-link">' . $r['restore_text'] . '</a>'; 2545 2557 } elseif ( ! empty( $trash_days ) ) { 2546 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-trash-link">' . $r['trash_text'] . '</a>'; 2558 $action_url = add_query_arg( array( 2559 'action' => 'bbp_toggle_topic_trash', 2560 'sub_action' => 'trash', 2561 'topic_id' => $topic->ID 2562 ) ); 2563 $action = 'trash-' . $topic->post_type . '_' . $topic->ID; 2564 $nonce_url = wp_nonce_url( $action_url, $action ); 2565 2566 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( $nonce_url ) . '" class="bbp-topic-trash-link">' . $r['trash_text'] . '</a>'; 2547 2567 } 2548 2568 2549 2569 if ( bbp_is_topic_trash( $topic->ID ) || empty( $trash_days ) ) { 2550 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( esc_html__( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-topic-delete-link">' . $r['delete_text'] . '</a>'; 2570 $action_url = add_query_arg( array( 2571 'action' => 'bbp_toggle_topic_trash', 2572 'sub_action' => 'delete', 2573 'topic_id' => $topic->ID 2574 ) ); 2575 $action = 'delete-' . $topic->post_type . '_' . $topic->ID; 2576 $nonce_url = wp_nonce_url( $action_url, $action ); 2577 2578 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( $nonce_url ) . '" onclick="return confirm(\'' . esc_js( esc_html__( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-topic-delete-link">' . $r['delete_text'] . '</a>'; 2551 2579 } 2552 2580 … … 2603 2631 2604 2632 $display = bbp_is_topic_open( $topic->ID ) ? $r['close_text'] : $r['open_text']; 2605 $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_close', 'topic_id' => $topic->ID ) ); 2633 $uri = add_query_arg( array( 2634 'action' => 'bbp_toggle_topic_close', 2635 'topic_id' => $topic->ID 2636 ) ); 2606 2637 $uri = wp_nonce_url( $uri, 'close-topic_' . $topic->ID ); 2607 2638 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-close-link">' . $display . '</a>' . $r['link_after']; … … 2657 2688 2658 2689 $display = bbp_is_topic_pending( $topic->ID ) ? $r['approve_text'] : $r['unapprove_text']; 2659 $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_approve', 'topic_id' => $topic->ID ) ); 2690 $uri = add_query_arg( array( 2691 'action' => 'bbp_toggle_topic_approve', 2692 'topic_id' => $topic->ID 2693 ) ); 2660 2694 $uri = wp_nonce_url( $uri, 'approve-topic_' . $topic->ID ); 2661 2695 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-approve-link">' . $display . '</a>' . $r['link_after']; … … 2713 2747 $is_sticky = bbp_is_topic_sticky( $topic->ID ); 2714 2748 2715 $stick_uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_stick', 'topic_id' => $topic->ID ) ); 2749 $stick_uri = add_query_arg( array( 2750 'action' => 'bbp_toggle_topic_stick', 2751 'topic_id' => $topic->ID 2752 ) ); 2716 2753 $stick_uri = wp_nonce_url( $stick_uri, 'stick-topic_' . $topic->ID ); 2717 2754 2718 $stick_display = ( true === $is_sticky ) ? $r['unstick_text'] : $r['stick_text']; 2755 $stick_display = ( true === $is_sticky ) 2756 ? $r['unstick_text'] 2757 : $r['stick_text']; 2719 2758 $stick_display = '<a href="' . esc_url( $stick_uri ) . '" class="bbp-topic-sticky-link">' . $stick_display . '</a>'; 2720 2759 2721 2760 if ( empty( $is_sticky ) ) { 2722 $super_uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_stick', 'topic_id' => $topic->ID, 'super' => 1 ) ); 2761 $super_uri = add_query_arg( array( 2762 'action' => 'bbp_toggle_topic_stick', 2763 'topic_id' => $topic->ID, 2764 'super' => 1 2765 ) ); 2723 2766 $super_uri = wp_nonce_url( $super_uri, 'stick-topic_' . $topic->ID ); 2724 2767 … … 2777 2820 } 2778 2821 2779 $uri = add_query_arg( array( 'action' => 'merge' ), bbp_get_topic_edit_url( $topic->ID ) ); 2822 $query = array( 'action' => 'merge' ); 2823 $uri = add_query_arg( $query, bbp_get_topic_edit_url( $topic->ID ) ); 2780 2824 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-merge-link">' . $r['merge_text'] . '</a>' . $r['link_after']; 2781 2825 … … 2827 2871 } 2828 2872 2829 $display = bbp_is_topic_spam( $topic->ID ) ? $r['unspam_text'] : $r['spam_text']; 2830 $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_spam', 'topic_id' => $topic->ID ) ); 2831 $uri = wp_nonce_url( $uri, 'spam-topic_' . $topic->ID ); 2832 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-spam-link">' . $display . '</a>' . $r['link_after']; 2873 $display = bbp_is_topic_spam( $topic->ID ) 2874 ? $r['unspam_text'] 2875 : $r['spam_text']; 2876 2877 $uri = add_query_arg( array( 2878 'action' => 'bbp_toggle_topic_spam', 2879 'topic_id' => $topic->ID 2880 ) ); 2881 2882 $uri = wp_nonce_url( $uri, 'spam-topic_' . $topic->ID ); 2883 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-spam-link">' . $display . '</a>' . $r['link_after']; 2833 2884 2834 2885 // Filter & return -
trunk/src/templates/default/bbpress/content-archive-topic.php
r7268 r7374 23 23 <?php if ( bbp_is_topic_tag() ) : ?> 24 24 25 <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?> 25 <?php bbp_topic_tag_description( 26 array( 27 'before' => '<div class="bbp-template-notice info"><ul><li>', 28 'after' => '</li></ul></div>' 29 ) 30 ); ?> 26 31 27 32 <?php endif; ?> -
trunk/src/templates/default/bbpress/content-topic-tag-edit.php
r6258 r7374 19 19 <?php do_action( 'bbp_template_before_topic_tag_description' ); ?> 20 20 21 <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?> 21 <?php bbp_topic_tag_description( 22 array( 23 'before' => '<div class="bbp-template-notice info"><ul><li>', 24 'after' => '</li></ul></div>' 25 ) 26 ); ?> 22 27 23 28 <?php do_action( 'bbp_template_after_topic_tag_description' ); ?> -
trunk/src/templates/default/bbpress/form-reply-move.php
r7360 r7374 70 70 </div> 71 71 72 <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) ) ) ) : ?> 72 <?php if ( bbp_has_topics( 73 array( 74 'show_stickies' => false, 75 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 76 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) 77 ) 78 ) ) : ?> 73 79 74 80 <div> -
trunk/src/templates/default/bbpress/form-topic-merge.php
r7360 r7374 53 53 <legend><?php esc_html_e( 'Destination', 'bbpress' ); ?></legend> 54 54 <div> 55 <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?> 55 <?php if ( bbp_has_topics( 56 array( 57 'show_stickies' => false, 58 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 59 'post__not_in' => array( bbp_get_topic_id() ) 60 ) 61 ) ) : ?> 56 62 57 63 <label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'bbpress' ); ?></label> -
trunk/src/templates/default/bbpress/form-topic-split.php
r7360 r7374 71 71 </div> 72 72 73 <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?> 73 <?php if ( bbp_has_topics( 74 array( 75 'show_stickies' => false, 76 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 77 'post__not_in' => array( bbp_get_topic_id() ) 78 ) 79 ) ) : ?> 74 80 75 81 <div> -
trunk/src/templates/default/bbpress/form-topic-tag.php
r7360 r7374 57 57 <div> 58 58 <label for="tag-description"><?php esc_html_e( 'Description:', 'bbpress' ); ?></label> 59 <input type="text" id="tag-description" name="tag-description" size="20" value="<?php echo esc_attr( bbp_get_topic_tag_description( array( 'before' => '', 'after' => '' ) ) ); ?>" /> 59 <input type="text" id="tag-description" name="tag-description" size="20" value="<?php echo esc_attr( bbp_get_topic_tag_description( 60 array( 61 'before' => '', 62 'after' => '' 63 ) 64 ) ); ?>" /> 60 65 </div> 61 66 -
trunk/src/templates/default/bbpress/form-user-lost-pass.php
r6557 r7374 13 13 ?> 14 14 15 <form method="post" action="<?php bbp_wp_login_action( array( 'action' => 'lostpassword', 'context' => 'login_post' ) ); ?>" class="bbp-login-form"> 15 <form class="bbp-login-form" method="post" action="<?php bbp_wp_login_action( 16 array( 17 'action' => 'lostpassword', 18 'context' => 'login_post' 19 ) ); 20 ?>"> 21 16 22 <fieldset class="bbp-form"> 17 23 <legend><?php esc_html_e( 'Lost Password', 'bbpress' ); ?></legend> … … 34 40 </div> 35 41 </fieldset> 42 36 43 </form> -
trunk/src/templates/default/bbpress/loop-single-forum.php
r6258 r7374 22 22 <?php do_action( 'bbp_theme_before_forum_subscription_action' ); ?> 23 23 24 <?php bbp_forum_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '×' ) ); ?> 24 <?php bbp_forum_subscription_link( 25 array( 26 'before' => '', 27 'subscribe' => '+', 28 'unsubscribe' => '×' 29 ) 30 ); ?> 25 31 26 32 <?php do_action( 'bbp_theme_after_forum_subscription_action' ); ?> … … 68 74 <?php do_action( 'bbp_theme_before_topic_author' ); ?> 69 75 70 <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span> 76 <span class="bbp-topic-freshness-author"><?php bbp_author_link( 77 array( 78 'post_id' => bbp_get_forum_last_active_id(), 79 'size' => 14 80 ) 81 ); ?></span> 71 82 72 83 <?php do_action( 'bbp_theme_after_topic_author' ); ?> -
trunk/src/templates/default/bbpress/loop-single-topic.php
r7360 r7374 24 24 <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?> 25 25 26 <?php bbp_topic_favorite_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '×' ) ); ?> 26 <?php bbp_topic_favorite_link( 27 array( 28 'before' => '', 29 'favorite' => '+', 30 'favorited' => '×' 31 ) 32 ); ?> 27 33 28 34 <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?> … … 36 42 <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?> 37 43 38 <?php bbp_topic_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '×' ) ); ?> 44 <?php bbp_topic_subscription_link( 45 array( 46 'before' => '', 47 'subscribe' => '+', 48 'unsubscribe' => '×' 49 ) 50 ); ?> 39 51 40 52 <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?> … … 113 125 <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?> 114 126 115 <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span> 127 <span class="bbp-topic-freshness-author"><?php bbp_author_link( 128 array( 129 'post_id' => bbp_get_topic_last_active_id(), 130 'size' => 14 131 ) 132 ); ?></span> 116 133 117 134 <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?> -
trunk/src/templates/default/extras/page-topic-tags.php
r6371 r7374 28 28 <div id="bbp-topic-hot-tags"> 29 29 30 <?php wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?> 30 <?php wp_tag_cloud( 31 array( 32 'smallest' => 9, 33 'largest' => 38, 34 'number' => 80, 35 'taxonomy' => bbp_get_topic_tag_tax_id() 36 ) 37 ); ?> 31 38 32 39 </div> -
trunk/src/templates/default/extras/page-topics-no-replies.php
r6371 r7374 28 28 <?php bbp_set_query_name( 'bbp_no_replies' ); ?> 29 29 30 <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'meta_value' => '1', 'meta_type' => 'NUMERIC', 'meta_compare' => '<', 'orderby' => 'date', 'show_stickies' => false ) ) ) : ?> 30 <?php if ( bbp_has_topics( 31 array( 32 'meta_key' => '_bbp_reply_count', 33 'meta_value' => '1', 34 'meta_type' => 'NUMERIC', 35 'meta_compare' => '<', 36 'orderby' => 'date', 37 'show_stickies' => false 38 ) 39 ) ) : ?> 31 40 32 41 <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.