Skip to content
Snippets Groups Projects
Commit 8cb6a227 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

feature(popup): popup

parent d745e3cf
No related branches found
No related tags found
3 merge requests!6Feature/no dev,!5Feature/no dev,!3feature(popup): popup
Pipeline #11057 passed
......@@ -12,7 +12,7 @@ class Reminder {
}
public function enqueue_reminder_script() {
if ( get_option( 'api_plugin-dir_activated', '' ) !== 'Activated' ) {
if ( ! $this->is_plugin_activated() ) {
wp_register_script(
'wpdesk-activation-reminder',
plugins_url( 'popup-javascript-file' ),
......@@ -33,12 +33,18 @@ class Reminder {
}
public function display_html_element() {
if ( ! $this->is_plugin_activated() ) {
$logo_url = plugins_url( 'plugin-dir' . '/' . $this->logo_url );
$cookie_name = md5( site_url() );
$subscriptions_url = admin_url( 'admin.php?page=wpdesk-licenses' );
$read_more_url = 'https://flexibleshipping.com';
echo "<span class=\"wpdesk-activation-reminder\" data-plugin_title=\"plugin-title\" data-plugin_dir=\"plugin-dir\" data-logo_url=\"$logo_url\" data-cookie_name=\"$cookie_name\" data-subscriptions_url=\"$subscriptions_url\" data-buy_plugin_url=\"buy-plugin-url\" data-read_more_url=\"$read_more_url\"></span>";
}
}
private function is_plugin_activated() {
return get_option( 'api_plugin-dir_activated', '' ) === 'Activated';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment