Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_privacy_personal_data_exporters

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

This hook occurs 2 times in this file.

Line Code
39       * Actions column.
40       *
41       * @since 4.9.6
42       *
43       * @param WP_User_Request $item Item being shown.
44       * @return string Email column markup.
45       */
46      public function column_email( $item ) {
47           /** This filter is documented in wp-admin/includes/ajax-actions.php */
48           $exporters       = apply_filters( 'wp_privacy_personal_data_exporters', array() );
49           $exporters_count = count( $exporters );
50           $status          = $item->status;
51           $request_id      = $item->ID;
52           $nonce           = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id );
53
54           $download_data_markup = '<span class="export-personal-data" ' .
55                'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' .
56                'data-request-id="' . esc_attr( $request_id ) . '" ' .
57                'data-nonce="' . esc_attr( $nonce ) .
 
Line Code
111      public function column_next_steps( $item ) {
112           $status = $item->status;
113
114           switch ( $status ) {
115                case 'request-pending':
116                     esc_html_e( 'Waiting for confirmation' );
117                     break;
118                case 'request-confirmed':
119                     /** This filter is documented in wp-admin/includes/ajax-actions.php */
120                     $exporters       = apply_filters( 'wp_privacy_personal_data_exporters', array() );
121                     $exporters_count = count( $exporters );
122                     $request_id      = $item->ID;
123                     $nonce           = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id );
124
125                     echo '<div class="export-personal-data" ' .
126                          'data-send-as-email="1" ' .
127                          'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' .
128                          'data-request-id="' . esc_attr( $request_id ) . '" ' .
129                          'data-nonce="' . esc_attr( $nonce ) .