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
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
- Scaling
- Constant
- Instructions
- 26–124
- Plugin surface
- 1 hook
- Called by
- 0
Touches nothing outside its own arguments.
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 124.
Third-party callbacks on 'wp_privacy_personal_data_erasers' run inside this call, and their cost is not bounded by anything here.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- hookthird-party callbacks
apply_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.
| When | Instructions | Calls it makes |
|---|---|---|
$status === "request-confirmed" && $status === "request-completed" | 26–28 | esc_url(), ->row_actions(), sprintf() |
$status === "request-confirmed" && $status !== "request-completed" | 67–69 | admin_url(), complete(), add_query_arg(), __(), sprintf(), esc_attr(), __(), esc_url(), ->row_actions(), sprintf() |
$status !== "request-confirmed" && $status === "request-completed" | 81–83 | apply_filters(), wp_create_nonce(), esc_attr(), esc_attr(), esc_attr(), __(), __(), __(), __(), __(), esc_url(), ->row_actions(), sprintf() |
$status !== "request-confirmed" && $status !== "request-completed" | 122–124 | apply_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
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 124 | 26–124 | 3 | |
| 8.5 | 124 | 26–124 | 3 | |
| 8.4 | 124 | 26–124 | 3 | 1 more instruction than PHP 8.3 |
| 8.3 | 123 | 26–123 | 3 | |
| 8.2 | 123 | 26–123 | 3 | |
| 8.1 | 123 | 26–123 | 3 | |
| 7.4 | 123 | 26–123 | 3 |
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:
- 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 “%s” 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.
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.