Changeset 5691
- Timestamp:
- 04/20/2015 04:20:34 PM (11 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 12 edited
-
admin/admin.php (modified) (2 diffs)
-
admin/metaboxes.php (modified) (9 diffs)
-
admin/replies.php (modified) (2 diffs)
-
admin/topics.php (modified) (2 diffs)
-
common/functions.php (modified) (2 diffs)
-
common/template.php (modified) (2 diffs)
-
forums/template.php (modified) (1 diff)
-
replies/functions.php (modified) (1 diff)
-
replies/template.php (modified) (9 diffs)
-
topics/functions.php (modified) (1 diff)
-
topics/template.php (modified) (16 diffs)
-
users/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/admin.php
r5676 r5691 517 517 // Settings page link 518 518 if ( current_user_can( 'bbp_settings_page' ) ) { 519 $new_links['settings'] = '<a href="' . add_query_arg( array( 'page' => 'bbpress' ), admin_url( 'options-general.php') ) . '">' . esc_html__( 'Settings', 'bbpress' ) . '</a>';519 $new_links['settings'] = '<a href="' . esc_url( add_query_arg( array( 'page' => 'bbpress' ), admin_url( 'options-general.php' ) ) ) . '">' . esc_html__( 'Settings', 'bbpress' ) . '</a>'; 520 520 } 521 521 522 522 // About page link 523 523 if ( current_user_can( 'bbp_about_page' ) ) { 524 $new_links['about'] = '<a href="' . add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php') ) . '">' . esc_html__( 'About', 'bbpress' ) . '</a>';524 $new_links['about'] = '<a href="' . esc_url( add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php' ) ) ) . '">' . esc_html__( 'About', 'bbpress' ) . '</a>'; 525 525 } 526 526 … … 537 537 */ 538 538 public function admin_bar_about_link( $wp_admin_bar ) { 539 540 539 if ( is_user_logged_in() ) { 541 542 540 $wp_admin_bar->add_menu( array( 543 541 'parent' => 'wp-logo', -
trunk/src/includes/admin/metaboxes.php
r5566 r5691 97 97 if ( current_user_can( 'publish_forums' ) ) { 98 98 $link = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), get_admin_url( null, 'edit.php' ) ); 99 $num = '<a href="' . $link. '">' . $num . '</a>';100 $text = '<a href="' . $link. '">' . $text . '</a>';99 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 100 $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>'; 101 101 } 102 102 ?> … … 114 114 if ( current_user_can( 'publish_topics' ) ) { 115 115 $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) ); 116 $num = '<a href="' . $link. '">' . $num . '</a>';117 $text = '<a href="' . $link. '">' . $text . '</a>';116 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 117 $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>'; 118 118 } 119 119 ?> … … 131 131 if ( current_user_can( 'publish_replies' ) ) { 132 132 $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) ); 133 $num = '<a href="' . $link. '">' . $num . '</a>';134 $text = '<a href="' . $link. '">' . $text . '</a>';133 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 134 $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>'; 135 135 } 136 136 ?> … … 150 150 if ( current_user_can( 'manage_topic_tags' ) ) { 151 151 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) ); 152 $num = '<a href="' . $link. '">' . $num . '</a>';153 $text = '<a href="' . $link. '">' . $text . '</a>';152 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 153 $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>'; 154 154 } 155 155 ?> … … 203 203 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 204 204 } 205 $num = '<a href="' . $link. '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $num . '</a>';206 $text = '<a class="waiting" href="' . $link. '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $text . '</a>';205 $num = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $num . '</a>'; 206 $text = '<a class="waiting" href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $text . '</a>'; 207 207 ?> 208 208 … … 225 225 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 226 226 } 227 $num = '<a href="' . $link. '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $num . '</a>';228 $text = '<a class="waiting" href="' . $link. '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $text . '</a>';227 $num = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $num . '</a>'; 228 $text = '<a class="waiting" href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $text . '</a>'; 229 229 ?> 230 230 … … 244 244 $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $r['empty_topic_tag_count'], 'bbpress' ); 245 245 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) ); 246 $num = '<a href="' . $link. '">' . $num . '</a>';247 $text = '<a class="waiting" href="' . $link. '">' . $text . '</a>';246 $num = '<a href="' . esc_url( $link ) . '">' . $num . '</a>'; 247 $text = '<a class="waiting" href="' . esc_url( $link ) . '">' . $text . '</a>'; 248 248 ?> 249 249 … … 522 522 <strong class="label"><?php esc_html_e( 'Topic:', 'bbpress' ); ?></strong> 523 523 <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Topic', 'bbpress' ); ?></label> 524 <input name="parent_id" id="bbp_topic_id" type="text" value="<?php echo esc_attr( $reply_topic_id ); ?>" data-ajax-url="<?php echo wp_nonce_url( add_query_arg( array( 'action' => 'bbp_suggest_topic' ), admin_url( 'admin-ajax.php', 'relative' ) ), 'bbp_suggest_topic_nonce'); ?>" />524 <input name="parent_id" id="bbp_topic_id" type="text" value="<?php echo esc_attr( $reply_topic_id ); ?>" data-ajax-url="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_suggest_topic' ), admin_url( 'admin-ajax.php', 'relative' ) ), 'bbp_suggest_topic_nonce' ) ); ?>" /> 525 525 </p> 526 526 … … 587 587 <strong class="label"><?php esc_html_e( 'ID:', 'bbpress' ); ?></strong> 588 588 <label class="screen-reader-text" for="bbp_author_id"><?php esc_html_e( 'ID', 'bbpress' ); ?></label> 589 <input type="text" id="bbp_author_id" name="post_author_override" value="<?php echo esc_attr( bbp_get_global_post_field( 'post_author' ) ); ?>" data-ajax-url="<?php echo wp_nonce_url( add_query_arg( array( 'action' => 'bbp_suggest_user' ), admin_url( 'admin-ajax.php', 'relative' ) ), 'bbp_suggest_user_nonce'); ?>" />589 <input type="text" id="bbp_author_id" name="post_author_override" value="<?php echo esc_attr( bbp_get_global_post_field( 'post_author' ) ); ?>" data-ajax-url="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_suggest_user' ), admin_url( 'admin-ajax.php', 'relative' ) ), 'bbp_suggest_user_nonce' ) ); ?>" /> 590 590 </p> 591 591 -
trunk/src/includes/admin/replies.php
r5658 r5691 648 648 * @uses bbp_get_forum_permalink() To get the forum permalink 649 649 * @uses admin_url() To get the admin url of post.php 650 * @uses add_query_arg() To add custom args to the url651 650 * @uses apply_filters() Calls 'reply_topic_forum_row_actions' with an 652 651 * array of reply topic forum actions … … 816 815 if ( bbp_get_trash_status_id() === $reply->post_status ) { 817 816 $post_type_object = get_post_type_object( bbp_get_reply_post_type() ); 818 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>";817 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; 819 818 } elseif ( EMPTY_TRASH_DAYS ) { 820 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";819 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID ) ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; 821 820 } 822 821 823 822 if ( bbp_get_trash_status_id() === $reply->post_status || !EMPTY_TRASH_DAYS ) { 824 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";823 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; 825 824 } elseif ( bbp_get_spam_status_id() === $reply->post_status ) { 826 825 unset( $actions['trash'] ); -
trunk/src/includes/admin/topics.php
r5658 r5691 740 740 * @uses bbp_get_forum_permalink() To get the forum permalink 741 741 * @uses admin_url() To get the admin url of post.php 742 * @uses add_query_arg() To add custom args to the url743 742 * @uses bbp_topic_reply_count() To output the topic reply count 744 743 * @uses bbp_topic_voice_count() To output the topic voice count … … 918 917 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; 919 918 } elseif ( EMPTY_TRASH_DAYS ) { 920 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";919 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; 921 920 } 922 921 923 922 if ( bbp_get_trash_status_id() === $topic->post_status || !EMPTY_TRASH_DAYS ) { 924 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";923 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; 925 924 } elseif ( bbp_get_spam_status_id() === $topic->post_status ) { 926 925 unset( $actions['trash'] ); -
trunk/src/includes/common/functions.php
r5676 r5691 255 255 * @param bool $force Override bbp_get_view_all() check 256 256 * @uses current_user_can() To check if the current user can moderate 257 * @uses add_query_arg() To add argsto the url257 * @uses add_query_arg() To add 'view' arg to the url 258 258 * @uses apply_filters() Calls 'bbp_add_view_all' with the link and original link 259 259 * @return string The link with 'view=all' appended if necessary … … 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 280 * @uses add_query_arg() To add args tothe url280 * @uses remove_query_arg() To remove 'view' arg from the url 281 281 * @uses apply_filters() Calls 'bbp_add_view_all' with the link and original link 282 282 * @return string The link with 'view=all' appended if necessary 283 283 */ 284 284 function bbp_remove_view_all( $original_link = '' ) { 285 return apply_filters( 'bbp_ add_view_all', remove_query_arg( 'view', $original_link ), $original_link );285 return apply_filters( 'bbp_remove_view_all', remove_query_arg( 'view', $original_link ), $original_link ); 286 286 } 287 287 -
trunk/src/includes/common/template.php
r5685 r5691 1448 1448 // Output-related 1449 1449 'select_id' => 'bbp_forum_id', 1450 'select_class' => 'bbp_dropdown', 1450 1451 'tab' => false, 1451 1452 'options_only' => false, … … 1501 1502 1502 1503 // Open the select tag 1503 $retval .= '<select name="' . esc_attr( $r['select_id'] ) . '" id="' . esc_attr( $r['select_id'] ) . '" ' . $disabled . $tab . '>' . "\n";1504 $retval .= '<select name="' . esc_attr( $r['select_id'] ) . '" id="' . esc_attr( $r['select_id'] ) . '" class="' . esc_attr( $r['select_class'] ) . '"' . $disabled . $tab . '>' . "\n"; 1504 1505 } 1505 1506 -
trunk/src/includes/forums/template.php
r5686 r5691 1254 1254 * @uses bbp_get_forum_topic_count() To get the forum topic count 1255 1255 * @uses bbp_get_forum_permalink() To get the forum permalink 1256 * @uses remove_query_arg() To remove args from the url1257 1256 * @uses bbp_get_forum_topic_count_hidden() To get the forum hidden 1258 1257 * topic count 1259 1258 * @uses current_user_can() To check if the current user can edit others 1260 1259 * topics 1261 * @uses add_query_arg() To add custom args to the url1262 1260 * @uses apply_filters() Calls 'bbp_get_forum_topics_link' with the 1263 1261 * topics link and forum id -
trunk/src/includes/replies/functions.php
r5684 r5691 1556 1556 * and action 1557 1557 * @uses bbp_get_reply_url() To get the reply url 1558 * @uses add_query_arg() To add custom args to the reply url1559 1558 * @uses bbp_redirect() To redirect to the reply 1560 1559 * @uses bbPress::errors:add() To log the error messages -
trunk/src/includes/replies/template.php
r5676 r5691 1684 1684 1685 1685 // Get the reply to use it's ID and post_parent 1686 $reply = bbp_get_reply( bbp_get_reply_id( $r['id'] ));1686 $reply = bbp_get_reply( $r['id'] ); 1687 1687 1688 1688 // Bail if no reply or user cannot reply … … 1972 1972 ), 'get_reply_edit_link' ); 1973 1973 1974 $reply = bbp_get_reply( bbp_get_reply_id( $r['id'] ));1974 $reply = bbp_get_reply( $r['id'] ); 1975 1975 1976 1976 // Bypass check if user has caps … … 2024 2024 global $wp_rewrite; 2025 2025 2026 $reply = bbp_get_reply( bbp_get_reply_id( $reply_id ));2026 $reply = bbp_get_reply( $reply_id ); 2027 2027 if ( empty( $reply ) ) { 2028 2028 return; … … 2099 2099 ), 'get_reply_trash_link' ); 2100 2100 2101 $reply = bbp_get_reply( bbp_get_reply_id( $r['id'] ));2101 $reply = bbp_get_reply( $r['id'] ); 2102 2102 2103 2103 if ( empty( $reply ) || ! current_user_can( 'delete_reply', $reply->ID ) ) { … … 2170 2170 ), 'get_reply_spam_link' ); 2171 2171 2172 $reply = bbp_get_reply( bbp_get_reply_id( $r['id'] ));2172 $reply = bbp_get_reply( $r['id'] ); 2173 2173 2174 2174 if ( empty( $reply ) || ! current_user_can( 'moderate', $reply->ID ) ) { … … 2367 2367 ), 'get_reply_approve_link' ); 2368 2368 2369 $reply = bbp_get_reply( bbp_get_reply_id( $r['id'] ));2369 $reply = bbp_get_reply( $r['id'] ); 2370 2370 2371 2371 if ( empty( $reply ) || ! current_user_can( 'moderate', $reply->ID ) ) { … … 2674 2674 'show_none' => sprintf( esc_attr__( '%1$s - %2$s', 'bbpress' ), $topic_id, bbp_get_topic_title( $topic_id ) ), 2675 2675 'select_id' => 'bbp_reply_to', 2676 'select_class' => 'bbp_dropdown', 2676 2677 'exclude' => $reply_id, 2677 2678 'selected' => $reply_to, … … 2791 2792 // Parse arguments against default values 2792 2793 $r = bbp_parse_args( $args, array( 2793 'select_id' => 'bbp_reply_status', 2794 'tab' => false, 2795 'reply_id' => 0, 2796 'selected' => false 2794 'select_id' => 'bbp_reply_status', 2795 'select_class' => 'bbp_dropdown', 2796 'tab' => false, 2797 'reply_id' => 0, 2798 'selected' => false 2797 2799 ), 'reply_status_dropdown' ); 2798 2800 … … 2825 2827 ob_start(); ?> 2826 2828 2827 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" <?php echo $tab; ?>>2829 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>> 2828 2830 2829 2831 <?php foreach ( bbp_get_reply_statuses( $r['reply_id'] ) as $key => $label ) : ?> -
trunk/src/includes/topics/functions.php
r5684 r5691 2085 2085 * @uses bbp_get_forum_permalink() To get the forum link 2086 2086 * @uses bbp_get_topic_permalink() To get the topic link 2087 * @uses add_query_arg() To add args to the url2088 2087 * @uses bbp_redirect() To redirect to the topic 2089 2088 * @uses bbPress::errors:add() To log the error messages -
trunk/src/includes/topics/template.php
r5682 r5691 2184 2184 * @uses bbp_get_topic_reply_count() To get the topic reply count 2185 2185 * @uses bbp_get_topic_permalink() To get the topic permalink 2186 * @uses remove_query_arg() To remove args from the url2187 2186 * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden 2188 2187 * reply count 2189 2188 * @uses current_user_can() To check if the current user can edit others 2190 2189 * replies 2191 * @uses add_query_arg() To add custom args to the url2192 2190 * @uses apply_filters() Calls 'bbp_get_topic_replies_link' with the 2193 2191 * replies link and topic id … … 2195 2193 function bbp_get_topic_replies_link( $topic_id = 0 ) { 2196 2194 2197 $topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ));2195 $topic = bbp_get_topic( $topic_id ); 2198 2196 $topic_id = $topic->ID; 2199 2197 $replies = sprintf( _n( '%s reply', '%s replies', bbp_get_topic_reply_count( $topic_id, true ), 'bbpress' ), bbp_get_topic_reply_count( $topic_id ) ); … … 2517 2515 $r['links'] = apply_filters( 'bbp_topic_admin_links', array( 2518 2516 'edit' => bbp_get_topic_edit_link ( $r ), 2517 'merge' => bbp_get_topic_merge_link ( $r ), 2519 2518 'close' => bbp_get_topic_close_link ( $r ), 2520 2519 'stick' => bbp_get_topic_stick_link ( $r ), 2521 'merge' => bbp_get_topic_merge_link ( $r ),2522 2520 'trash' => bbp_get_topic_trash_link ( $r ), 2523 2521 'spam' => bbp_get_topic_spam_link ( $r ), … … 2593 2591 2594 2592 // Get the topic 2595 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2593 $topic = bbp_get_topic( $r['id'] ); 2596 2594 2597 2595 // Bypass check if user has caps … … 2644 2642 global $wp_rewrite; 2645 2643 2646 $topic = bbp_get_topic( bbp_get_topic_id( $topic_id ));2644 $topic = bbp_get_topic( $topic_id ); 2647 2645 if ( empty( $topic ) ) { 2648 2646 return; … … 2719 2717 ), 'get_topic_trash_link' ); 2720 2718 2721 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2719 $topic = bbp_get_topic( $r['id'] ); 2722 2720 2723 2721 if ( empty( $topic ) || ! current_user_can( 'delete_topic', $topic->ID ) ) { … … 2789 2787 ), 'get_topic_close_link' ); 2790 2788 2791 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2789 $topic = bbp_get_topic( $r['id'] ); 2792 2790 2793 2791 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2850 2848 ), 'get_topic_approve_link' ); 2851 2849 2852 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2850 $topic = bbp_get_topic( $r['id'] ); 2853 2851 2854 2852 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2912 2910 ), 'get_topic_stick_link' ); 2913 2911 2914 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2912 $topic = bbp_get_topic( $r['id'] ); 2915 2913 2916 2914 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2982 2980 ), 'get_topic_merge_link' ); 2983 2981 2984 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2982 $topic = bbp_get_topic( $r['id'] ); 2985 2983 2986 2984 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 3040 3038 ), 'get_topic_spam_link' ); 3041 3039 3042 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));3040 $topic = bbp_get_topic( $r['id'] ); 3043 3041 3044 3042 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 3090 3088 3091 3089 // Get the reply to use it's ID and post_parent 3092 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));3090 $topic = bbp_get_topic( $r['id'] ); 3093 3091 3094 3092 // Bail if no reply or user cannot reply … … 3284 3282 $r = bbp_parse_args( $args, array( 3285 3283 'select_id' => 'bbp_stick_topic', 3284 'select_class' => 'bbp_dropdown', 3286 3285 'tab' => false, 3287 3286 'topic_id' => 0, … … 3323 3322 ob_start(); ?> 3324 3323 3325 <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" <?php echo $tab; ?>>3324 <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>> 3326 3325 3327 3326 <?php foreach ( bbp_get_topic_types() as $key => $label ) : ?> … … 3372 3371 // Parse arguments against default values 3373 3372 $r = bbp_parse_args( $args, array( 3374 'select_id' => 'bbp_topic_status', 3375 'tab' => false, 3376 'topic_id' => 0, 3377 'selected' => false 3373 'select_id' => 'bbp_topic_status', 3374 'select_class' => 'bbp_dropdown', 3375 'tab' => false, 3376 'topic_id' => 0, 3377 'selected' => false 3378 3378 ), 'topic_open_close_select' ); 3379 3379 … … 3406 3406 ob_start(); ?> 3407 3407 3408 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" <?php echo $tab; ?>>3408 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>> 3409 3409 3410 3410 <?php foreach ( bbp_get_topic_statuses( $r['topic_id'] ) as $key => $label ) : ?> -
trunk/src/includes/users/template.php
r5676 r5691 1229 1229 // Build the variables to pass into printf() 1230 1230 $dismiss_url = wp_nonce_url( add_query_arg( $args, $user_url ), $nonce ); 1231 $dismiss_link = '<a href="' . $dismiss_url. '">' . esc_html_x( 'Cancel', 'Dismiss pending user email address change', 'bbpress' ) . '</a>';1231 $dismiss_link = '<a href="' . esc_url( $dismiss_url ) . '">' . esc_html_x( 'Cancel', 'Dismiss pending user email address change', 'bbpress' ) . '</a>'; 1232 1232 $coded_email = '<code>' . esc_html( $new_email['newemail'] ) . '</code>'; ?> 1233 1233
Note: See TracChangeset
for help on using the changeset viewer.