PluginProbe
QuadMenu – Mega Menu / 3.3.6
QuadMenu – Mega Menu v3.3.6
3.3.8 3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 88 releases
quadmenu / jetpack_vendor / quadlayers / wp-notice-plugin-promote / src / Traits / PluginActions.php

PluginActions.php in QuadMenu – Mega Menu 3.3.6, at jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/Traits/PluginActions.php

69 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * QuadLayers WP Notice Plugin Promote
4 *
5 * @package quadlayers/wp-notice-plugin-promote
6 * @author QuadLayers
7 * @link https://github.com/quadlayers/wp-notice-plugin-promote
8 * @copyright Copyright (c) 2023
9 * @license GPL-3.0
10 */
11
12 namespace QuadLayers\WP_Notice_Plugin_Promote\Traits;
13
14 /**
15 * Trait PluginActions
16 *
17 * @package QuadLayers\WP_Notice_Plugin_Promote\Traits\PluginActions
18 * @since 1.0.0
19 */
20 trait PluginActions {
21
22 use PluginActionsLinks;
23
24 /**
25 * Get plugin action label.
26 *
27 * @return string
28 */
29 public function get_action_label() {
30
31 if ( $this->is_activated() ) {
32 return '';
33 }
34
35 if ( $this->is_installed() ) {
36 return esc_html__( 'Activate', 'wp-notice-plugin-promote' );
37 }
38
39 if ( $this->plugin_install_label ) {
40 return $this->plugin_install_label;
41 }
42
43 return esc_html__( 'Install free', 'wp-notice-plugin-promote' );
44 }
45
46 /**
47 * Get plugin action link.
48 *
49 * @return string
50 */
51 public function get_action_link() {
52
53 if ( $this->is_activated() ) {
54 return '';
55 }
56
57 if ( $this->is_installed() ) {
58 return $this->get_activate_link();
59 }
60
61 if ( $this->plugin_install_link ) {
62 return $this->plugin_install_link;
63 }
64
65 return $this->get_install_link();
66 }
67
68 }
69