Admin
2 months ago
Assets
2 weeks ago
CLI
2 years ago
Cache
2 weeks ago
Pages
10 months ago
PostTypes
2 months ago
Posts
1 year ago
Shortcodes
1 month ago
Taxonomies
1 year ago
Templates
1 year ago
Users
2 months ago
ActionsService.php
3 years ago
CompatibilityService.php
4 months ago
CurrencyService.php
4 months ago
GoogleMapApiService.php
2 months ago
HealthService.php
2 months ago
LineItemStateService.php
2 years ago
PluginActionLinksService.php
1 year ago
PluginService.php
1 year ago
PluginServiceProvider.php
1 year ago
RecaptchaValidationService.php
2 years ago
StateService.php
7 months ago
ThemeService.php
4 months ago
ThemeServiceProvider.php
7 months ago
TranslationsServiceProvider.php
3 months ago
UpgradeNoticeService.php
1 year ago
PluginActionLinksService.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\WordPress; |
| 4 | |
| 5 | use SureCartCore\Application\Application; |
| 6 | |
| 7 | /** |
| 8 | * Plugin Action Links service. |
| 9 | */ |
| 10 | class PluginActionLinksService { |
| 11 | /** |
| 12 | * Application instance. |
| 13 | * |
| 14 | * @var Application |
| 15 | */ |
| 16 | protected $app = null; |
| 17 | |
| 18 | /** |
| 19 | * Constructor. |
| 20 | * |
| 21 | * @param Application $app Application instance. |
| 22 | */ |
| 23 | public function __construct( $app ) { |
| 24 | $this->app = $app; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Bootstrap the plugin. |
| 29 | * |
| 30 | * @return void |
| 31 | */ |
| 32 | public function bootstrap() { |
| 33 | add_filter( 'network_admin_plugin_action_links_surecart/surecart.php', array( $this, 'addPluginActionLinks' ) ); |
| 34 | add_filter( 'plugin_action_links_surecart/surecart.php', array( $this, 'addPluginActionLinks' ) ); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Add plugin action links. |
| 39 | * |
| 40 | * @param array $actions Plugin actions. |
| 41 | * @return array |
| 42 | */ |
| 43 | public function addPluginActionLinks( $actions ) { |
| 44 | return array_merge( |
| 45 | array( |
| 46 | 'settings' => '<a href="' . esc_url( admin_url( 'admin.php?page=sc-settings' ) ) . '">' . esc_html__( 'Settings', 'surecart' ) . '</a>', |
| 47 | 'docs' => '<a href="https://surecart.com/docs" target="_blank">' . esc_html__( 'Documentation', 'surecart' ) . '</a>', |
| 48 | ), |
| 49 | $actions |
| 50 | ); |
| 51 | } |
| 52 | } |
| 53 |