public function plugin_row_meta($links, $file)
{
$regex_pattern = '/<a href="(.*)">(.*)<\\/a>/';
$repo = dirname($file);
$slugs = $this->get_repo_slugs($repo);
$repo = !empty($slugs) ? $slugs['repo'] : null;
/*
* Sanity check for some commercial plugins.
*/
if (!isset($links[2])) {
return $links;
}
preg_match($regex_pattern, $links[2], $matches);
/*
* Remove 'Visit plugin site' link in favor or 'View details' link.
*/
if (array_key_exists($repo, $this->config)) {
if (!is_null($repo)) {
unset($links[2]);
$links[] = sprintf('<a href="%s" class="thickbox">%s</a>', esc_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => $repo, 'TB_iframe' => 'true', 'width' => 600, 'height' => 550), network_admin_url('plugin-install.php'))), esc_html__('View details', 'github-updater'));
}
}
return $links;
}