WordPress at Your Fingertips
function is not described

WP_Posts_List_Table::get_edit_link() protected WP 4.4.0

Helper to create links to edit.php with params.

{} It's a method of the class: WP_Posts_List_Table{}

No Hooks.

Return

String. The formatted link string.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_edit_link( $args, $label, $class );
$args(string[]) (required)
Associative array of URL parameters for the link.
$label(string) (required)
Link text.
$class(string)
Class attribute.
Default: empty string

Changelog

Since 4.4.0 Introduced.

Code of WP_Posts_List_Table::get_edit_link() WP 5.8.2

protected function get_edit_link( $args, $label, $class = '' ) {
	$url = add_query_arg( $args, 'edit.php' );

	$class_html   = '';
	$aria_current = '';

	if ( ! empty( $class ) ) {
		$class_html = sprintf(
			' class="%s"',
			esc_attr( $class )
		);

		if ( 'current' === $class ) {
			$aria_current = ' aria-current="page"';
		}
	}

	return sprintf(
		'<a href="%s"%s%s>%s</a>',
		esc_url( $url ),
		$class_html,
		$aria_current,
		$label
	);
}