@@ -88,14 +88,15 @@ function bp_settings_sanitize_notification_settings( $settings = array() ) {
8888 * @return array
8989 */
9090function bp_settings_get_registered_notification_keys () {
91-
9291 ob_start ();
92+
9393 /**
9494 * Fires at the start of the building of the notification keys allowed list.
9595 *
9696 * @since 1.0.0
9797 */
9898 do_action ( 'bp_notification_settings ' );
99+
99100 $ screen = ob_get_clean ();
100101
101102 $ matched = preg_match_all ( '/<input[^>]+name="notifications\[([^\]]+)\]/ ' , $ screen , $ matches );
@@ -113,12 +114,12 @@ function bp_settings_get_registered_notification_keys() {
113114 * Finds and exports personal data associated with an email address from the Settings component.
114115 *
115116 * @since 4.0.0
117+ * @since 15.0.0 The `$page` parameter was removed since it was unused.
116118 *
117- * @param string $email_address The user's email address.
118- * @param int $page Batch number.
119+ * @param string $email_address The user's email address.
119120 * @return array An array of personal data.
120121 */
121- function bp_settings_personal_data_exporter ( $ email_address, $ page ) {
122+ function bp_settings_personal_data_exporter ( $ email_address ) {
122123 $ email_address = trim ( $ email_address );
123124
124125 $ data_to_export = array ();
@@ -238,20 +239,22 @@ function bp_settings_get_personal_data_request( $user_id = 0 ) {
238239 return false ;
239240 }
240241
241- $ query = new WP_Query ( array (
242- 'author ' => (int ) $ user_id ,
243- 'post_type ' => 'user_request ' ,
244- 'post_status ' => 'any ' ,
245- 'post_name__in ' => array (
246- 'export_personal_data ' ,
247- ),
248- ) );
242+ $ query = new WP_Query (
243+ array (
244+ 'author ' => (int ) $ user_id ,
245+ 'post_type ' => 'user_request ' ,
246+ 'post_status ' => 'any ' ,
247+ 'post_name__in ' => array (
248+ 'export_personal_data ' ,
249+ ),
250+ )
251+ );
249252
250253 if ( ! empty ( $ query ->post ) ) {
251254 return wp_get_user_request ( $ query ->post ->ID );
252- } else {
253- return false ;
254255 }
256+
257+ return false ;
255258}
256259
257260/**
@@ -327,15 +330,19 @@ function bp_settings_personal_data_export_exists( WP_User_Request $request ) {
327330function bp_settings_data_exporter_items () {
328331 /** This filter is documented in /wp-admin/includes/ajax-actions.php */
329332 $ exporters = apply_filters ( 'wp_privacy_personal_data_exporters ' , array () );
330- $ custom_friendly_names = apply_filters ( 'bp_settings_data_custom_friendly_names ' , array (
331- 'wordpress-comments ' => _x ( 'Comments ' , 'WP Comments data exporter friendly name ' , 'buddypress ' ),
332- 'wordpress-media ' => _x ( 'Media ' , 'WP Media data exporter friendly name ' , 'buddypress ' ),
333- 'wordpress-user ' => _x ( 'Personal information ' , 'WP Media data exporter friendly name ' , 'buddypress ' ),
334- ) );
333+ $ custom_friendly_names = apply_filters (
334+ 'bp_settings_data_custom_friendly_names ' ,
335+ array (
336+ 'wordpress-comments ' => _x ( 'Comments ' , 'WP Comments data exporter friendly name ' , 'buddypress ' ),
337+ 'wordpress-media ' => _x ( 'Media ' , 'WP Media data exporter friendly name ' , 'buddypress ' ),
338+ 'wordpress-user ' => _x ( 'Personal information ' , 'WP Media data exporter friendly name ' , 'buddypress ' ),
339+ )
340+ );
335341
336342?>
337343 <ul>
338- <?php foreach ( $ exporters as $ exporter => $ data ) :
344+ <?php
345+ foreach ( $ exporters as $ exporter => $ data ) :
339346 // Use the exporter friendly name by default.
340347 $ friendly_name = $ data ['exporter_friendly_name ' ];
341348
0 commit comments