admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('daio'), )); } /** * Render Admin Page */ public function render_settings_page() { echo '
'; $this->show_forms(); echo '
'; } /** * Show Forms */ public function show_forms() { $this->daio_get_settings = $this->get_enabled_settings(); echo '
'; $this->show_header(); echo '
'; $this->show_navigation(); require_once DIVI_AIO_DIR . 'includes/admin/extensions.php'; // require_once DIVI_AIO_DIR . 'includes/admin/modules.php'; echo '
'; echo '
'; } /** * Show Navigations */ public function show_navigation() { $html = '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; echo $html; } /** * Show Header */ public function show_header() { echo '
1.0.0
'; } public static function get_default_settings() { $default_keys = array_fill_keys( DAIO_Helper::get_extensions(), true ); return $default_keys; } public static function get_enabled_settings() { $enabled_keys = get_option( '_daio_enabled_extensions', self::get_default_settings() ); return $enabled_keys; } /** * Save Settings */ public function save_settings() { check_ajax_referer( 'daio', 'security' ); if( isset( $_POST['fields'] ) ) { parse_str( $_POST['fields'], $settings ); } else { return; } $this->daio_settings = array( 'header-sections' => intval( $settings['header-sections'] ? 1 : 0 ), 'blog-pro' => intval( $settings['blog-pro'] ? 1 : 0 ), 'svg-support' => intval( $settings['svg-support'] ? 1 : 0 ), 'advanced-footer' => intval( $settings['advanced-footer'] ? 1 : 0 ), 'advanced-headers' => intval( $settings['advanced-headers'] ? 1 : 0 ) ); update_option( '_daio_enabled_extensions', $this->daio_settings ); return true; die(); } /** * Footer Alert */ function footer_alert() { echo ''; } } endif; Daio_Admin::get_instance();