wppaste
WordPress

WP_Privacy_Requests_Table

Since
4.9.6
Source
wp-admin/includes/class-wp-privacy-requests-table.php:10
List Table API: WP_Privacy_Requests_Table class

Compatibility

WordPress
since 4.9.6
  • 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).

Hooks and filters fired · 1

Every hook that fires from inside WP_Privacy_Requests_Table, in the order it appears in the class, grouped by the method that fires it.

Properties · 2

$request_typestringprotected
Action name for the requests this table will work with. Classes which inherit from WP_Privacy_Requests_Table should define this.
$post_typestringprotected
Post type to be used.

Methods · 18

Source code

abstract class WP_Privacy_Requests_Table extends WP_List_Table { 	/**	 * Action name for the requests this table will work with. Classes	 * which inherit from WP_Privacy_Requests_Table should define this.	 *	 * Example: 'export_personal_data'.	 *	 * @since 4.9.6	 *	 * @var string $request_type Name of action.	 */	protected $request_type = 'INVALID'; 	/**	 * Post type to be used.	 *	 * @since 4.9.6	 *	 * @var string $post_type The post type.	 */	protected $post_type = 'INVALID'; 	/**	 * Gets columns to show in the list table.	 *	 * @since 4.9.6	 *	 * @return string[] Array of column titles keyed by their column name.	 */	public function get_columns() {		$columns = array(			'cb'                => '<input type="checkbox" />',			'email'             => __( 'Requester' ),			'status'            => __( 'Status' ),			'created_timestamp' => __( 'Requested' ),			'next_steps'        => __( 'Next steps' ),		);		return $columns;	} 	/**	 * Normalizes the admin URL to the current page (by request_type).	 *	 * @since 5.3.0	 *	 * @return string URL to the current admin page.	 */	protected function get_admin_url() {		$pagenow = str_replace( '_', '-', $this->request_type ); 		if ( 'remove-personal-data' === $pagenow ) {			$pagenow = 'erase-personal-data';		} 		return admin_url( $pagenow . '.php' );	} 	/**	 * Gets a list of sortable columns.	 *	 * @since 4.9.6	 *	 * @return array Default sortable columns.	 */	protected function get_sortable_columns() {		/*		 * The initial sorting is by 'Requested' (post_date) and descending.		 * With initial sorting, the first click on 'Requested' should be ascending.		 * With 'Requester' sorting active, the next click on 'Requested' should be descending.		 */		$desc_first = isset( $_GET['orderby'] ); 		return array(			'email'             => 'requester',			'created_timestamp' => array( 'requested', $desc_first ),		);	} 	/**

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 6.7.7 tag, from src/wp-admin/includes/class-wp-privacy-requests-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.