Changeset 11901
- Timestamp:
- 03/19/2018 04:43:51 PM (7 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress-functions.php
r11900 r11901 464 464 * @since 3.0.0 465 465 * 466 * @param array $templates Array of templates. 467 * @uses apply_filters() call 'bp_legacy_theme_compat_page_templates_directory_only' and return false 468 * to use the defined page template for component's directory and its single items 466 * @param array $templates Array of templates. 467 * 469 468 * @return array 470 469 */ … … 477 476 * @param bool $value Whether or not we are viewing a directory. 478 477 */ 479 if ( true === (bool) apply_filters( 'bp_ legacy_theme_compat_page_templates_directory_only', ! bp_is_directory() ) ) {478 if ( true === (bool) apply_filters( 'bp_nouveau_theme_compat_page_templates_directory_only', ! bp_is_directory() ) ) { 480 479 return $templates; 481 480 } -
trunk/src/bp-templates/bp-nouveau/buddypress/blogs/blogs-loop.php
r11899 r11901 2 2 /** 3 3 * BuddyPress - Blogs Loop 4 *5 * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter().6 4 * 7 5 * @since 3.0.0 -
trunk/src/bp-templates/bp-nouveau/buddypress/groups/groups-loop.php
r11899 r11901 2 2 /** 3 3 * BuddyPress - Groups Loop 4 *5 * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter().6 4 * 7 5 * @since 3.0.0 -
trunk/src/bp-templates/bp-nouveau/buddypress/members/members-loop.php
r11899 r11901 2 2 /** 3 3 * BuddyPress - Members Loop 4 *5 * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()6 4 * 7 5 * @since 3.0.0 -
trunk/src/bp-templates/bp-nouveau/includes/ajax.php
r11899 r11901 12 12 * Load the template loop for the current object. 13 13 * 14 * @return string Prints template loop for the specified object15 14 * @since 3.0.0 15 * 16 * @return string Template loop for the specified object 16 17 */ 17 18 function bp_nouveau_ajax_object_template_loader() { … … 41 42 $scope = ''; 42 43 if ( ! empty( $_POST['scope'] ) ) { 43 $scope = $_POST['scope'];44 $scope = sanitize_text_field( $_POST['scope'] ); 44 45 } 45 46 … … 71 72 break; 72 73 default: 73 $feed_url = home_url( bp_get_activity_root_slug() . '/feed/');74 $feed_url = bp_get_sitewide_activity_feed_link(); 74 75 break; 75 76 } 76 77 77 $result['feed_url'] = apply_filters( 'bp_ legacy_theme_activity_feed_url', $feed_url, $scope );78 $result['feed_url'] = apply_filters( 'bp_nouveau_ajax_object_template_loader', $feed_url, $scope ); 78 79 } 79 80 … … 113 114 114 115 $template_path = bp_locate_template( array( $template_part ), false ); 115 $template_path = apply_filters( 'bp_ legacy_object_template_path', $template_path );116 $template_path = apply_filters( 'bp_nouveau_object_template_path', $template_path ); 116 117 117 118 load_template( $template_path ); … … 129 130 * 130 131 * @param array $ajax_actions { 131 * Multi-dimensional array. For example:132 * Optional. Multi-dimensional array. For example: 132 133 * 133 134 * $ajax_actions = array( … … 140 141 * - 'nopriv' indicates whether the AJAX action is allowed for logged-out users. 141 142 * } 143 * 142 144 * @return array 143 145 */ -
trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r11899 r11901 376 376 377 377 foreach ( (array) $_POST['users'] as $user_id ) { 378 $invited[ $user_id ] = groups_invite_user(378 $invited[ (int) $user_id ] = groups_invite_user( 379 379 array( 380 380 'user_id' => $user_id, -
trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php
r11899 r11901 55 55 // Validate recipients 56 56 if ( empty( $_POST['send_to'] ) || ! is_array( $_POST['send_to'] ) ) { 57 $response['feedback'] = __( 'Your message was not sent. Please enter at least one @username.', 'buddypress' );57 $response['feedback'] = __( 'Your message was not sent. Please enter at least one username.', 'buddypress' ); 58 58 59 59 wp_send_json_error( $response ); … … 70 70 'subject' => $_POST['subject'], 71 71 'content' => $_POST['message_content'], 72 'error_type' => 'wp_error' 72 'error_type' => 'wp_error', 73 73 ) ); 74 74
Note: See TracChangeset
for help on using the changeset viewer.