Skip to content
Snippets Groups Projects
Commit cfd1df73 authored by Lucas García's avatar Lucas García
Browse files

feat: plugin actions links

parent 694da2e3
No related branches found
No related tags found
1 merge request!1Update Wpct DC API
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -52,6 +52,23 @@ class Wpct_Http_Bridge extends Abstract\Plugin
],
];
public function __construct()
{
parent::__construct();
add_filter('plugin_action_links', function ($links, $file) {
if ($file !== plugin_basename(__FILE__)) {
return $links;
}
$url = admin_url('options-general.php?page=wpct-http-bridge');
$label = __('Settings', 'wpct-http');
$link = "<a href='{$url}'>{$label}</a>";
array_unshift($links, $link);
return $links;
}, 5, 2);
}
public static function activate()
{
$user = get_user_by('login', 'wpct_http_user');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment