wppaste
WordPress

WP_Privacy_Data_Removal_Requests_List_Table::column_email( WP_User_Request $item ): string

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

Compatibility

WordPress
since 4.9.6
PHP
7.4–8.6-dev
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.

Parameters

$itemWP_User_Request
Item being shown.

Return value

string
Email column markup.

Performance profile

How much work a call to WP_Privacy_Data_Removal_Requests_List_Table::column_email() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.

Cost class
Trivial

Touches nothing outside its own arguments.

Scaling
Constant

No loop in the body: the same number of instructions runs whatever you pass in.

Instructions
26–124

Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 124.

Plugin surface
1 hook

Third-party callbacks on 'wp_privacy_personal_data_erasers' run inside this call, and their cost is not bounded by anything here.

Called by
0

Nothing in core calls this; the cost is only what you spend yourself.

What it touches

  • hookthird-party callbacksapply_filters()called directly

Further down the call graph this can also reach option, cache, serialize, transient and query. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.

What one call costs · 4 distinct outcomes

One number would be a lie: the work depends on which branch runs. These are every distinct cost WP_Privacy_Data_Removal_Requests_List_Table::column_email() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
$status === "request-confirmed" && $status === "request-completed"26–28esc_url(), ->row_actions(), sprintf()
$status === "request-confirmed" && $status !== "request-completed"67–69admin_url(), complete(), add_query_arg(), __(), sprintf(), esc_attr(), __(), esc_url(), ->row_actions(), sprintf()
$status !== "request-confirmed" && $status === "request-completed"81–83apply_filters(), wp_create_nonce(), esc_attr(), esc_attr(), esc_attr(), __(), __(), __(), __(), __(), esc_url(), ->row_actions(), sprintf()
$status !== "request-confirmed" && $status !== "request-completed"122–124apply_filters(), wp_create_nonce(), esc_attr(), esc_attr(), esc_attr(), __(), __(), __(), __(), __(), admin_url(), complete(), add_query_arg(), __(), sprintf(), esc_attr(), __(), esc_url(), ->row_actions(), sprintf()

Across PHP versions

PHPCompiledExecutedBranchesNotes
8.6-dev12426–1243
8.512426–1243
8.412426–12431 more instruction than PHP 8.3
8.312326–1233
8.212326–1233
8.112326–1233
7.412326–1233

An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.

Hooks and filters fired · 1

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

  1. apply_filters( wp_privacy_personal_data_erasers )filterline 55 (+9 into the body)

    Filters the array of personal data eraser 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_Removal_Requests_List_Table::row_actions()

Source code

	public function column_email( $item ) {		$row_actions = array(); 		// Allow the administrator to "force remove" the personal data even if confirmation has not yet been received.		$status      = $item->status;		$request_id  = $item->ID;		$row_actions = array();		if ( 'request-confirmed' !== $status ) {			/** This filter is documented in wp-admin/includes/ajax-actions.php */			$erasers       = apply_filters( 'wp_privacy_personal_data_erasers', array() );			$erasers_count = count( $erasers );			$nonce         = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); 			$remove_data_markup = '<span class="remove-personal-data force-remove-personal-data" ' .				'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' .				'data-request-id="' . esc_attr( $request_id ) . '" ' .				'data-nonce="' . esc_attr( $nonce ) .				'">'; 			$remove_data_markup .= '<span class="remove-personal-data-idle"><button type="button" class="button-link remove-personal-data-handle">' . __( 'Force erase personal data' ) . '</button></span>' .				'<span class="remove-personal-data-processing hidden">' . __( 'Erasing data...' ) . ' <span class="erasure-progress"></span></span>' .				'<span class="remove-personal-data-success hidden">' . __( 'Erasure completed.' ) . '</span>' .				'<span class="remove-personal-data-failed hidden">' . __( 'Force erasure has failed.' ) . ' <button type="button" class="button-link remove-personal-data-handle">' . __( 'Retry' ) . '</button></span>'; 			$remove_data_markup .= '</span>'; 			$row_actions['remove-data'] = $remove_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( 'erase-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 ) );	}

Changelog

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-removal-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.