Skip to content
Snippets Groups Projects

feat: add upgrade_to_pro_url property

Closed Andrzej Misiewicz requested to merge feat/upgrade_to_pro_url into master
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
+ 14
0
@@ -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;
}
Loading