WP_Privacy_Data_Removal_Requests_List_Table::column_next_steps( WP_User_Request $item )
- Since
- 4.9.6
- Source
wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php:117
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.
Performance profile
How much work a call to WP_Privacy_Data_Removal_Requests_List_Table::column_next_steps() 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
- 4–57
- 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 106.
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 · 5 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_next_steps() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
| always | 4–12 | none |
| always | 7–9 | esc_html_e() |
| always | 16–22 | __() |
| always | 30–38 | admin_url(), delete(), add_query_arg(), esc_html__() |
| always | 53–57 | apply_filters(), wp_create_nonce(), esc_attr(), esc_attr(), esc_attr(), _e(), _e(), _e(), _e(), _e() |
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 106 | 4–57 | 5 | |
| 8.5 | 106 | 4–57 | 5 | |
| 8.4 | 106 | 4–57 | 5 | |
| 8.3 | 106 | 4–57 | 5 | |
| 8.2 | 106 | 4–57 | 5 | |
| 8.1 | 106 | 4–57 | 5 | 1 more instruction than PHP 7.4 |
| 7.4 | 105 | 4–57 | 5 |
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_next_steps() runs, in this order:
- apply_filters( wp_privacy_personal_data_erasers )filterline 126 (+9 into the body)
Filters the array of personal data eraser callbacks.
Uses · 11
- esc_html_e()Displays translated text that has been escaped for safe use in HTML output.
- 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.
- _e()Displays translated text.
- __()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.
- esc_html__()Retrieves the translation of $text and escapes it for safe use in HTML output.
Source code
public function column_next_steps( $item ) { $status = $item->status; switch ( $status ) { case 'request-pending': esc_html_e( 'Waiting for confirmation' ); break; case 'request-confirmed': /** This filter is documented in wp-admin/includes/ajax-actions.php */ $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); $erasers_count = count( $erasers ); $request_id = $item->ID; $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); echo '<div class="remove-personal-data" ' . 'data-force-erase="1" ' . 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . 'data-request-id="' . esc_attr( $request_id ) . '" ' . 'data-nonce="' . esc_attr( $nonce ) . '">'; ?> <span class="remove-personal-data-idle"><button type="button" class="button-link remove-personal-data-handle"><?php _e( 'Erase personal data' ); ?></button></span> <span class="remove-personal-data-processing hidden"><?php _e( 'Erasing data...' ); ?> <span class="erasure-progress"></span></span> <span class="remove-personal-data-success success-message hidden" ><?php _e( 'Erasure completed.' ); ?></span> <span class="remove-personal-data-failed hidden"><?php _e( 'Data erasure has failed.' ); ?> <button type="button" class="button-link remove-personal-data-handle"><?php _e( 'Retry' ); ?></button></span> <?php echo '</div>'; break; case 'request-failed': echo '<button type="submit" class="button-link" name="privacy_action_email_retry[' . $item->ID . ']" id="privacy_action_email_retry[' . $item->ID . ']">' . __( 'Retry' ) . '</button>'; break; case 'request-completed': echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete', 'request_id' => array( $item->ID ), ), admin_url( 'erase-personal-data.php' ) ), 'bulk-privacy_requests' ) ) . '">' . esc_html__( 'Remove request' ) . '</a>'; break; } }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.