'; private $client = null; public $notices = []; public $limit = 50; private $plan_limit_aiautotool ; public $name_plan ; public $config = array(); public $notice ; public function __construct() { $this->name_plan = __('Webstories','ai-auto-tool'); $this->setting = get_option($this->namesetting,array()); if(!isset($this->setting['logo'])){ $this->setting['logo'] = 'https://aiautotool.com/96logo.png'; } $this->active = get_option($this->active_option_name, false); if ($this->active=='true') { $this->init(); } add_action('wp_ajax_update_active_option_canonical_'.$this->active_option_name, array($this, 'update_active_option_callback')); add_action('wp_ajax_nopriv_update_active_option_canonical_'.$this->active_option_name, array($this, 'update_active_option_callback')); } public function update_active_option_callback() { check_ajax_referer('aiautotool_nonce', 'security'); if (isset($_POST['active'])) { $active = sanitize_text_field($_POST['active']); update_option($this->active_option_name, $active,null, 'no'); print_r($active); } wp_die(); } public function init(){ // Hook into WordPress to register the custom URL add_action('init', array($this, 'add_custom_rewrite_rule')); // Hook into WordPress to add custom rewrite rules add_filter('query_vars', array($this, 'custom_rewrite_query_vars')); // Hook into WordPress to handle the custom template add_filter('template_include', array($this, 'custom_rewrite_rule_template')); register_setting('aiautotool_webstories_config_group', $this->namesetting); // add_action('do_feed_aiwebstories_feed', array($this, 'custom_feed_template')); } public function render_setting() { ?>
active=='true') { echo ''; } } public function render_feature(){ $autoToolBox = new AutoToolBox($this->icon." Active Webstorie", __('If active it, webstories has domain.com/aiwebstories/','ai-auto-tool'), "https://aiautotool.com", $this->active_option_name, $this->active,plugins_url('../images/logo.svg', __FILE__)); echo ($autoToolBox->generateHTML()); ?>' . esc_html(bloginfo('title')) . ''; ?>