| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Description of PluginController |
| 5 |
* |
| 6 |
* @author Ali2Woo Team |
| 7 |
* |
| 8 |
* @autoload: a2wl_admin_init |
| 9 |
* |
| 10 |
* @ajax: true |
| 11 |
*/ |
| 12 |
// phpcs:ignoreFile WordPress.Security.EscapeOutput.OutputNotEscaped |
| 13 |
namespace AliNext_Lite;; |
| 14 |
|
| 15 |
use Pages; |
| 16 |
|
| 17 |
class PluginController extends AbstractController |
| 18 |
{ |
| 19 |
public function __construct() { |
| 20 |
parent::__construct(); |
| 21 |
|
| 22 |
add_filter('plugin_row_meta', [$this, 'addCustomPluginRowMeta'], 10, 2); |
| 23 |
} |
| 24 |
|
| 25 |
public function addCustomPluginRowMeta($plugin_meta, $plugin_file) |
| 26 |
{ |
| 27 |
if (plugin_basename($plugin_file) === A2WL()->plugin_name) { |
| 28 |
$custom_links[] = '<a href="' . admin_url('admin.php?page=' . Pages::SETTINGS) . '">' . |
| 29 |
__('Settings', 'ali2woo') . '</a>'; |
| 30 |
|
| 31 |
if (A2WL()->isAnPlugin() && A2WL()->isFreePlugin()) { |
| 32 |
$custom_links[] = |
| 33 |
'<a href="https://ali2woo.com/pricing/?utm_source=lite&utm_medium=plugin_row_meta&utm_campaign=alinext-lite" target="_blank">Get the Pro Version</a>'; |
| 34 |
} |
| 35 |
|
| 36 |
$plugin_meta = array_merge($custom_links, $plugin_meta); |
| 37 |
} |
| 38 |
|
| 39 |
return $plugin_meta; |
| 40 |
} |
| 41 |
} |
| 42 |
|