<?php

use Dolphy\Plugin\Helpers\AdminPage;

defined('DOLPHY_PLUGIN') or die('Access Denied!');

add_filter("plugin_action_links", function ($links, $file) {
  if ($file === DOLPHY_PLUGIN_NAME) {
    $url = AdminPage::url('dolphy');
    array_unshift($links, __('<a href="'.$url.'"><strong style="color: #090; display: inline-block;">Settings</strong></a>', 'dolphy'));
    // $links[] = __('<a href="'.$url.'" class="dol-text-success">Settings</a>', 'dolphy');
  }

  return $links;
}, 10, 2);

add_filter('plugin_row_meta', function ($linkList, $file) {
  if ($file === DOLPHY_PLUGIN_NAME) {
    $linkList[] = __('<a target="_blank" href="'.DOLPHY_DONATE_URL.'" class="dol-text-success"><span class="dashicons dashicons-heart"></span> Donate</a>', 'dolphy');
    $linkList[] = __('<a target="_blank" href="'.DOLPHY_WIKI_URL.'" class="dol-text-info"><span class="dashicons dashicons-book-alt"></span> Wiki</a>', 'dolphy');
  }

  return $linkList;
}, 10, 2);
