is_already_installed = isset($installed_plugins['metform/metform.php']) ? 1 : 0; $message = '
Boost Engagement with Custom Forms! 🚀

Struggling to grow your email list? Get FREE high-converting form templates designed to capture more leads, boost engagement, and turn visitors into loyal subscribers. 📩✨

MetForm requires! Clicking the button will download MetForm and unlock all form templates.
Try Free Templates
'; $dismissed_coutner = get_option('shopengine-metform_get_free_templates_banner_dismissed_' . get_current_user_id(), 0); $notice_showing_delay_time = (3600 * 24 * 15); if ($dismissed_coutner == 1) { $notice_showing_delay_time = (3600 * 24 * 30); } elseif ($dismissed_coutner == 2) { $notice_showing_delay_time = (3600 * 24 * 180); } elseif ($dismissed_coutner >= 3) { $notice_showing_delay_time = (3600 * 24 * 99999); } LibsNotice::instance('shopengine', 'metform_get_free_templates_banner') ->set_dismiss('user', $notice_showing_delay_time) ->set_message($message) ->call(); add_action('admin_head', [$this, 'metform_promotion_admin_head']); } public function metform_promotion_admin_head() { ?> get_plugin_slug($pluginName); return wp_nonce_url( add_query_arg( array( 'action' => $action, 'plugin' => $pluginSlug ), admin_url('update.php') ), $action . '_' . $pluginSlug ); } /** * Get plugin slug * * @access public * @param string * @return string */ public function get_plugin_slug($name) { $split = explode('/', $name); return isset($split[0]) ? $split[0] : null; } /** * Get plugin activation url * * @access public * @param string * @return string */ public function activation_url($pluginName) { return wp_nonce_url(add_query_arg( array( 'action' => 'activate', 'plugin' => $pluginName, 'plugin_status' => 'all', 'paged' => '1&s', ), admin_url('plugins.php') ), 'activate-plugin_' . $pluginName); } } }