wppaste
WordPress

WP_Privacy_Data_Export_Requests_List_Table::column_email( WP_User_Request $item ): string

Since
4.9.6
Source
wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php:46
Actions column.

Parameters

$itemWP_User_Request
Item being shown.

Return

string
Email column markup.

Hooks fired · 1

One hook fires while WP_Privacy_Data_Export_Requests_List_Table::column_email() runs, in this order:

  1. apply_filters( wp_privacy_personal_data_exporters )filterline 48 (+2 into the body)

    Filters the array of exporter callbacks.

Uses · 9

  • apply_filters()Calls the callback functions that have been added to a filter hook.
  • wp_create_nonce()Creates a cryptographic token tied to a specific action, user, user session, and window of time.
  • esc_attr()Escaping for HTML attributes.
  • __()Retrieves the translation of $text.
  • esc_url()Checks and cleans a URL.
  • wp_nonce_url()Retrieves URL with nonce added to URL query.
  • add_query_arg()Retrieves a modified URL query string.
  • admin_url()Retrieves the URL to the admin area for the current site.
  • WP_Privacy_Data_Export_Requests_List_Table::row_actions()

Source

	public function column_email( $item ) {		/** This filter is documented in wp-admin/includes/ajax-actions.php */		$exporters       = apply_filters( 'wp_privacy_personal_data_exporters', array() );		$exporters_count = count( $exporters );		$status          = $item->status;		$request_id      = $item->ID;		$nonce           = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id ); 		$download_data_markup = '<span class="export-personal-data" ' .			'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' .			'data-request-id="' . esc_attr( $request_id ) . '" ' .			'data-nonce="' . esc_attr( $nonce ) .			'">'; 		$download_data_markup .= '<span class="export-personal-data-idle"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download personal data' ) . '</button></span>' .			'<span class="export-personal-data-processing hidden">' . __( 'Downloading data...' ) . ' <span class="export-progress"></span></span>' .			'<span class="export-personal-data-success hidden"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download personal data again' ) . '</button></span>' .			'<span class="export-personal-data-failed hidden">' . __( 'Download failed.' ) . ' <button type="button" class="button-link export-personal-data-handle">' . __( 'Retry' ) . '</button></span>'; 		$download_data_markup .= '</span>'; 		$row_actions['download-data'] = $download_data_markup; 		if ( 'request-completed' !== $status ) {			$complete_request_markup  = '<span>';			$complete_request_markup .= sprintf(				'<a href="%s" class="complete-request" aria-label="%s">%s</a>',				esc_url(					wp_nonce_url(						add_query_arg(							array(								'action'     => 'complete',								'request_id' => array( $request_id ),							),							admin_url( 'export-personal-data.php' )						),						'bulk-privacy_requests'					)				),				esc_attr(					sprintf(						/* translators: %s: Request email. */						__( 'Mark export request for &#8220;%s&#8221; as completed.' ),						$item->email					)				),				__( 'Complete request' )			);			$complete_request_markup .= '</span>';		} 		if ( ! empty( $complete_request_markup ) ) {			$row_actions['complete-request'] = $complete_request_markup;		} 		return sprintf( '<a href="%1$s">%2$s</a> %3$s', esc_url( 'mailto:' . $item->email ), $item->email, $this->row_actions( $row_actions ) );	}

History

Introduced in 4.9.6. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.