WP_Plugins_List_Table::get_dependency_view_details_link()protectedWP 6.5.0

Returns a 'View details' like link for a dependency.

Method of the class: WP_Plugins_List_Table{}

No Hooks.

Return

String. A 'View details' link for the dependency.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_dependency_view_details_link( $name, $slug );
$name(string) (required)
The dependency's name.
$slug(string) (required)
The dependency's slug.

Changelog

Since 6.5.0 Introduced.

WP_Plugins_List_Table::get_dependency_view_details_link() code WP 6.5.4

protected function get_dependency_view_details_link( $name, $slug ) {
	$dependency_data = WP_Plugin_Dependencies::get_dependency_data( $slug );

	if ( false === $dependency_data
		|| $name === $slug
		|| $name !== $dependency_data['name']
		|| empty( $dependency_data['version'] )
	) {
		return $name;
	}

	return $this->get_view_details_link( $name, $slug );
}