getInstallTime() > strtotime('-30 days') || true) { return []; } return [ 'muted_period' => 90, 'option_key' => '_elementor_editor_upgrade_notice_dismissed', 'message' => __('Love using Elementor? Learn how you can build better sites with Elementor Pro.'), 'action_title' => __('Get Pro'), 'action_url' => 'javascript:void("todo")', ]; } final public function getNotice() { if (!current_user_can('manage_options')) { return null; } $settings = $this->getSettings(); if (empty($settings['option_key'])) { return null; } $dismissed_time = get_option($settings['option_key']); if ($dismissed_time) { if ($dismissed_time > strtotime('-' . $settings['muted_period'] . ' days')) { return null; } $this->setNoticeDismissed(); } return $settings; } public function __construct() { add_action('elementor/ajax/register_actions', [$this, 'registerAjaxActions']); } public function setNoticeDismissed() { update_option($this->getSettings('option_key'), time()); } public function registerAjaxActions(Ajax $ajax) { $ajax->registerAjaxAction('notice_bar_dismiss', [$this, 'setNoticeDismissed']); } }