Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_privacy_personal_data_erasers

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
788      }
789
790      $request = wp_get_user_request_data( $request_id );
791
792      if ( ! $request || 'remove_personal_data' !== $request->action_name ) {
793           wp_send_json_error( __( 'Invalid request ID when processing eraser data.' ) );
794      }
795
796      /** This filter is documented in wp-admin/includes/ajax-actions.php */
797      $erasers        = apply_filters( 'wp_privacy_personal_data_erasers', array() );
798      $is_last_eraser = count( $erasers ) === $eraser_index;
799      $eraser_done    = $response['done'];
800
801      if ( ! $is_last_eraser || ! $eraser_done ) {
802           return $response;
803      }
804
805      _wp_privacy_completed_request( $request_id );
806