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 |
|---|---|
| 981 | } |
| 982 | |
| 983 | $request = wp_get_user_request_data( $request_id ); |
| 984 | |
| 985 | if ( ! $request || 'remove_personal_data' !== $request->action_name ) { |
| 986 | wp_send_json_error( __( 'Invalid request ID when processing eraser data.' ) ); |
| 987 | } |
| 988 | |
| 989 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 990 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 991 | $is_last_eraser = count( $erasers ) === $eraser_index; |
| 992 | $eraser_done = $response['done']; |
| 993 | |
| 994 | if ( ! $is_last_eraser || ! $eraser_done ) { |
| 995 | return $response; |
| 996 | } |
| 997 | |
| 998 | _wp_privacy_completed_request( $request_id ); |
| 999 | |
| Line | Code |
| 1615 | * @return string Email column markup. |
| 1616 | */ |
| 1617 | public function column_email( $item ) { |
| 1618 | $row_actions = array(); |
| 1619 | |
| 1620 | // Allow the administrator to "force remove" the personal data even if confirmation has not yet been received. |
| 1621 | $status = $item->status; |
| 1622 | if ( 'request-confirmed' !== $status ) { |
| 1623 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 1624 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 1625 | $erasers_count = count( $erasers ); |
| 1626 | $request_id = $item->ID; |
| 1627 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
| 1628 | |
| 1629 | $remove_data_markup = '<div class="remove-personal-data force-remove-personal-data" ' . |
| 1630 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
| 1631 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
| 1632 | 'data-nonce="' . esc_attr( $nonce ) . |
| 1633 | '">'; |
| Line | Code |
| 1656 | public function column_next_steps( $item ) { |
| 1657 | $status = $item->status; |
| 1658 | |
| 1659 | switch ( $status ) { |
| 1660 | case 'request-pending': |
| 1661 | esc_html_e( 'Waiting for confirmation' ); |
| 1662 | break; |
| 1663 | case 'request-confirmed': |
| 1664 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
| 1665 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
| 1666 | $erasers_count = count( $erasers ); |
| 1667 | $request_id = $item->ID; |
| 1668 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
| 1669 | |
| 1670 | echo '<div class="remove-personal-data" ' . |
| 1671 | 'data-force-erase="1" ' . |
| 1672 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
| 1673 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
| 1674 | 'data-nonce="' . esc_attr( $nonce ) . |