WP_Plugins_List_Table::get_view_details_link
Returns a 'View details' link for the plugin.
Method of the class: WP_Plugins_List_Table{}
No Hooks.
Returns
String. A 'View details' link for the plugin.
Usage
// protected - for code of main (parent) or child class $result = $this->get_view_details_link( $name, $slug );
- $name(string) (required)
- The plugin's name.
- $slug(string) (required)
- The plugin's slug.
Changelog
| Since 6.5.0 | Introduced. |
WP_Plugins_List_Table::get_view_details_link() WP Plugins List Table::get view details link code WP 6.9.1
protected function get_view_details_link( $name, $slug ) {
$url = add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => $slug,
'TB_iframe' => 'true',
'width' => '600',
'height' => '550',
),
network_admin_url( 'plugin-install.php' )
);
$name_attr = esc_attr( $name );
return sprintf(
"<a href='%s' class='thickbox open-plugin-details-modal' aria-label='%s' data-title='%s'>%s</a>",
esc_url( $url ),
/* translators: %s: Plugin name. */
sprintf( __( 'More information about %s' ), $name_attr ),
$name_attr,
esc_html( $name )
);
}