Changeset 4997
- Timestamp:
- 06/24/2013 03:57:07 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/actions.php
r4944 r4997 284 284 285 285 // Theme-side POST requests 286 add_action( 'bbp_post_request', 'bbp_do_ajax', 1 ); 287 add_action( 'bbp_post_request', 'bbp_edit_topic_tag_handler', 1 ); 288 add_action( 'bbp_post_request', 'bbp_edit_user_handler', 1 ); 289 add_action( 'bbp_post_request', 'bbp_edit_forum_handler', 1 ); 290 add_action( 'bbp_post_request', 'bbp_edit_reply_handler', 1 ); 291 add_action( 'bbp_post_request', 'bbp_edit_topic_handler', 1 ); 292 add_action( 'bbp_post_request', 'bbp_merge_topic_handler', 1 ); 293 add_action( 'bbp_post_request', 'bbp_split_topic_handler', 1 ); 294 add_action( 'bbp_post_request', 'bbp_move_reply_handler', 1 ); 295 add_action( 'bbp_post_request', 'bbp_new_forum_handler', 10 ); 296 add_action( 'bbp_post_request', 'bbp_new_reply_handler', 10 ); 297 add_action( 'bbp_post_request', 'bbp_new_topic_handler', 10 ); 286 add_action( 'bbp_post_request', 'bbp_do_ajax', 1 ); 287 add_action( 'bbp_post_request', 'bbp_edit_topic_tag_handler', 1 ); 288 add_action( 'bbp_post_request', 'bbp_edit_user_handler', 1 ); 289 add_action( 'bbp_post_request', 'bbp_edit_forum_handler', 1 ); 290 add_action( 'bbp_post_request', 'bbp_edit_reply_handler', 1 ); 291 add_action( 'bbp_post_request', 'bbp_edit_topic_handler', 1 ); 292 add_action( 'bbp_post_request', 'bbp_merge_topic_handler', 1 ); 293 add_action( 'bbp_post_request', 'bbp_split_topic_handler', 1 ); 294 add_action( 'bbp_post_request', 'bbp_move_reply_handler', 1 ); 295 add_action( 'bbp_post_request', 'bbp_new_forum_handler', 10 ); 296 add_action( 'bbp_post_request', 'bbp_new_reply_handler', 10 ); 297 add_action( 'bbp_post_request', 'bbp_new_topic_handler', 10 ); 298 add_action( 'bbp_post_request', 'bbp_search_results_redirect', 10 ); 298 299 299 300 // Theme-side GET requests -
trunk/includes/search/functions.php
r4928 r4997 50 50 // Get search terms 51 51 $search_terms = bbp_get_search_terms(); 52 $retval = !empty( $search_terms ) ? array( 's' => $search_terms ) : array();52 $retval = !empty( $search_terms ) ? array( 's' => $search_terms ) : array(); 53 53 54 54 return apply_filters( 'bbp_get_search_query_args', $retval ); … … 61 61 * @return If a redirect is not needed 62 62 */ 63 function bbp_search_template_redirect() { 64 65 // Bail if already on search results page 66 if ( bbp_is_search_results() ) 63 function bbp_search_results_redirect() { 64 global $wp_rewrite; 65 66 // Bail if not using pretty permalinks 67 if ( ! $wp_rewrite->using_permalinks() ) { 67 68 return; 68 69 // Bail if search terms are empty 70 if ( false === bbp_get_search_terms() ) 71 return; 69 } 72 70 73 71 // Get the redirect URL 74 72 $redirect_to = bbp_get_search_results_url(); 75 76 // Bail if no redirect URL or may cause infinite loop 77 if ( empty( $redirect_to ) || ( bbp_get_search_url() === $redirect_to ) ) 73 if ( empty( $redirect_to ) ) { 78 74 return; 75 } 79 76 80 77 // Redirect and bail -
trunk/templates/default/bbpress/form-search.php
r4768 r4997 10 10 ?> 11 11 12 <form role="search" method=" get" id="bbp-search-form" action="<?php bbp_search_url(); ?>">12 <form role="search" method="post" id="bbp-search-form" action="<?php bbp_search_url(); ?>"> 13 13 <div> 14 14 <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'bbpress' ); ?></label>
Note: See TracChangeset
for help on using the changeset viewer.