From ba7fcb4b2730b79305b5d746d8b5e2ae671bc700 Mon Sep 17 00:00:00 2001 From: Andrzej Misiewicz <andrzej.misiewicz@wpdesk.eu> Date: Tue, 19 Sep 2023 10:14:07 +0200 Subject: [PATCH] feat: add upgrade_to_pro_url property --- src/Plugin/AbstractPlugin.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Plugin/AbstractPlugin.php b/src/Plugin/AbstractPlugin.php index 61c1569..79be1b3 100644 --- a/src/Plugin/AbstractPlugin.php +++ b/src/Plugin/AbstractPlugin.php @@ -56,6 +56,13 @@ abstract class AbstractPlugin extends SlimPlugin { */ protected $support_url; + /** + * Upgrade to pro URL. + * + * @var string + */ + protected $upgrade_to_pro_url; + /** * AbstractPlugin constructor. * @@ -216,6 +223,13 @@ abstract class AbstractPlugin extends SlimPlugin { $links = array_merge( $plugin_links, $links ); } + if ( $this->upgrade_to_pro_url ) { + $plugin_links = [ + '<a href="' . $this->upgrade_to_pro_url . '">' . __( 'Upgrade to PRO', $this->get_text_domain() ) . '</a>', + ]; + $links = array_merge( $plugin_links, $links ); + } + return $links; } -- GitLab