oxiid > 0) : $CLASS = '\OXI_ACCORDIONS_PLUGINS\Includes\Shortcode'; if (class_exists($CLASS)) : new $CLASS($this->oxiid, 'admin'); endif; endif; } /** * Outputs the simplified footer. */ public function template_footer() { ?> array( 'class' => array(), 'href' => array(), 'rel' => array(), 'title' => array(), ), 'abbr' => array( 'title' => array(), ), 'b' => array(), 'br' => array(), 'blockquote' => array( 'cite' => array(), ), 'cite' => array( 'title' => array(), ), 'code' => array(), 'del' => array( 'datetime' => array(), 'title' => array(), ), 'dd' => array(), 'div' => array( 'class' => array(), 'title' => array(), 'style' => array(), 'id' => array(), ), 'table' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'button' => array( 'class' => array(), 'type' => array(), 'value' => array(), ), 'thead' => array(), 'tbody' => array(), 'tr' => array(), 'td' => array(), 'dt' => array(), 'em' => array(), 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 'i' => array( 'class' => array(), ), 'img' => array( 'alt' => array(), 'class' => array(), 'height' => array(), 'src' => array(), 'width' => array(), ), 'li' => array( 'class' => array(), ), 'ol' => array( 'class' => array(), ), 'p' => array( 'class' => array(), ), 'q' => array( 'cite' => array(), 'title' => array(), ), 'span' => array( 'class' => array(), 'title' => array(), 'style' => array(), ), 'strike' => array(), 'strong' => array(), 'ul' => array( 'class' => array(), ), ); if (is_array($rawdata)) : return $rawdata = array_map(array($this, 'allowed_html'), $rawdata); else : return wp_kses($rawdata, $allowed_tags); endif; } /** * Template constructor. */ public function __construct() { $this->database = new \OXI_ACCORDIONS_PLUGINS\Helper\Database(); if (!function_exists('wp_print_media_templates')) { require_once ABSPATH . WPINC . '/media-template.php'; } add_action('admin_init', array($this, 'maybe_load_template')); add_action('admin_menu', array($this, 'add_dashboard_page')); add_action('network_admin_menu', array($this, 'add_dashboard_page')); } public function maybe_load_template() { $this->oxiid = (!empty($_GET['styleid']) ? (int) $_GET['styleid'] : ''); $page = (isset($_GET['page']) ? $this->validate_post($_GET['page']) : ''); if ('oxi-accordions-style-view' !== $page || $this->oxiid < 0) { return; } // Don't load the interface if doing an ajax call. if (defined('DOING_AJAX') && DOING_AJAX) { return; } set_current_screen(); // Remove an action in the Gutenberg plugin ( not core Gutenberg ) which throws an error. remove_action('admin_print_styles', 'gutenberg_block_editor_admin_print_styles'); $this->load_template(); } private function load_template() { $this->enqueue_scripts(); $this->template_header(); $this->template_content(); $this->template_footer(); exit; } /** * Register page through WordPress's hooks. */ public function add_dashboard_page() { add_dashboard_page('', '', 'read', 'oxi-accordions-style-view', ''); } public function template_header() { ?> > <?php esc_html_e('Accordions - Multiple Accordions or FAQs Builders', 'accordions-or-faqs'); ?> allowed_html($files); endif; return $rawdata; } }