Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/19/2018 04:43:51 PM (9 years ago)
Author:
djpaul
Message:

Templates, Nouveau: code pass.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/ajax.php

    r11899 r11901  
    1212 * Load the template loop for the current object.
    1313 *
    14  * @return string Prints template loop for the specified object
    1514 * @since 3.0.0
     15 *
     16 * @return string Template loop for the specified object
    1617 */
    1718function bp_nouveau_ajax_object_template_loader() {
    … …  
    4142                $scope = '';
    4243                if ( ! empty( $_POST['scope'] ) ) {
    43                         $scope = $_POST['scope'];
     44                        $scope = sanitize_text_field( $_POST['scope'] );
    4445                }
    4546
    … …  
    7172                                break;
    7273                        default:
    73                                 $feed_url = home_url( bp_get_activity_root_slug() . '/feed/' );
     74                                $feed_url = bp_get_sitewide_activity_feed_link();
    7475                                break;
    7576                }
    7677
    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 );
    7879        }
    7980
    … …  
    113114
    114115        $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 );
    116117
    117118        load_template( $template_path );
    … …  
    129130 *
    130131 * @param array $ajax_actions {
    131  *      Multi-dimensional array. For example:
     132 *      Optional. Multi-dimensional array. For example:
    132133 *
    133134 *      $ajax_actions = array(
    … …  
    140141 *     - 'nopriv' indicates whether the AJAX action is allowed for logged-out users.
    141142 * }
     143 *
    142144 * @return array
    143145 */
Note: See TracChangeset for help on using the changeset viewer.