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 |
---|---|
998 | } |
999 |
|
1000 | $request = wp_get_user_request_data( $request_id ); |
1001 |
|
1002 | if ( ! $request || 'remove_personal_data' !== $request->action_name ) { |
1003 | wp_send_json_error( __( 'Invalid request ID when processing eraser data.' ) ); |
1004 | } |
1005 |
|
1006 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
1007 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
1008 | $is_last_eraser = count( $erasers ) === $eraser_index; |
1009 | $eraser_done = $response['done']; |
1010 |
|
1011 | if ( ! $is_last_eraser || ! $eraser_done ) { |
1012 | return $response; |
1013 | } |
1014 |
|
1015 | _wp_privacy_completed_request( $request_id ); |
1016 |
|
Line | Code |
1632 | * @return string Email column markup. |
1633 | */ |
1634 | public function column_email( $item ) { |
1635 | $row_actions = array(); |
1636 |
|
1637 | // Allow the administrator to "force remove" the personal data even if confirmation has not yet been received. |
1638 | $status = $item->status; |
1639 | if ( 'request-confirmed' !== $status ) { |
1640 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
1641 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
1642 | $erasers_count = count( $erasers ); |
1643 | $request_id = $item->ID; |
1644 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
1645 |
|
1646 | $remove_data_markup = '<div class="remove-personal-data force-remove-personal-data" ' . |
1647 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
1648 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
1649 | 'data-nonce="' . esc_attr( $nonce ) . |
1650 | '">'; |
Line | Code |
1673 | public function column_next_steps( $item ) { |
1674 | $status = $item->status; |
1675 |
|
1676 | switch ( $status ) { |
1677 | case 'request-pending': |
1678 | esc_html_e( 'Waiting for confirmation' ); |
1679 | break; |
1680 | case 'request-confirmed': |
1681 | /** This filter is documented in wp-admin/includes/ajax-actions.php */ |
1682 | $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); |
1683 | $erasers_count = count( $erasers ); |
1684 | $request_id = $item->ID; |
1685 | $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); |
1686 |
|
1687 | echo '<div class="remove-personal-data" ' . |
1688 | 'data-force-erase="1" ' . |
1689 | 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . |
1690 | 'data-request-id="' . esc_attr( $request_id ) . '" ' . |
1691 | 'data-nonce="' . esc_attr( $nonce ) . |