WP_Privacy_Requests_Table::get_admin_url()protectedWP 5.3.0

Normalizes the admin URL to the current page (by request_type).

Method of the class: WP_Privacy_Requests_Table{}

No Hooks.

Return

String. URL to the current admin page.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_admin_url();

Changelog

Since 5.3.0 Introduced.

WP_Privacy_Requests_Table::get_admin_url() code WP 6.5.4

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' );
}