WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 3 times in this file.
| Line | Code |
|---|---|
| 925 | } |
| 926 | |
| 927 | $request = wp_get_user_request_data( $request_id ); |
| 928 | |
| 929 | if ( ! $request || 'remove_personal_data' !== $request->action_name ) { |
| 930 | wp_send_json_error( __( 'Invalid request ID when processing eraser data.' ) ); |
| 931 | } |
| 932 | |
| 933 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 934 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 935 | $is_last_eraser = count( $erasers ) === $eraser_index; |
| 936 | $eraser_done = $response['done']; |
| 937 | |
| 938 | if ( ! $is_last_eraser || ! $eraser_done ) { |
| 939 | return $response; |
| 940 | } |
| 941 | |
| 942 | _wp_privacy_completed_request( $request_id ); |
| 943 | |
| Line | Code |
| 1503 | * @return string Email column markup. |
| 1504 | */ |
| 1505 | public function column_email( $item ) { |
| 1506 | $row_actions = array(); |
| 1507 | |
| 1508 | // Allow the administrator to "force remove" the personal data even if confirmation has not yet been received. |
| 1509 | $status = $item->status; |
| 1510 | if ( 'request-confirmed' !== $status ) { |
| 1511 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 1512 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 1513 | $erasers_count = count( $erasers ); |
| 1514 | $request_id = $item->ID; |
| 1515 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
| 1516 | |
| 1517 | $remove_data_markup = '<div class="remove-personal-data force-remove-personal-data" ' . |
| 1518 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
| 1519 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
| 1520 | 'data-nonce="' . esc_attr( $nonce ) . |
| 1521 | '">'; |
| Line | Code |
| 1544 | public function column_next_steps( $item ) { |
| 1545 | $status = $item->status; |
| 1546 | |
| 1547 | switch ( $status ) { |
| 1548 | case 'request-pending': |
| 1549 | esc_html_e( 'Waiting for confirmation' ); |
| 1550 | break; |
| 1551 | case 'request-confirmed': |
| 1552 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 1553 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 1554 | $erasers_count = count( $erasers ); |
| 1555 | $request_id = $item->ID; |
| 1556 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
| 1557 | |
| 1558 | echo '<div class="remove-personal-data" ' . |
| 1559 | 'data-force-erase="1" ' . |
| 1560 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
| 1561 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
| 1562 | 'data-nonce="' . esc_attr( $nonce ) . |