' . wp_unslash($global_settings['custom_css']) . ''; } if(!empty($global_settings['custom_code_in_head'])){ echo wp_kses(wp_unslash($global_settings['custom_code_in_head']), [ 'meta' => [ 'charset' => [], 'content' => [], 'http-equiv' => [], 'name' => [], ] ]); } } public function blockpress_show_footer_scripts() { $global_settings = get_option('blockpress_options'); if(!empty($global_settings['custom_js'])){ echo ''; } if(!empty($global_settings['custom_code_before_closed_body'])){ echo wp_kses_post($global_settings['custom_code_before_closed_body']); } } public function blockpress_admin_page() { $parent_slug = 'blockpress_dashboard'; add_submenu_page( $parent_slug, esc_html__('Settings', 'blockpress'), esc_html__('Settings', 'blockpress'), 'manage_options', 'blockpress_settings', array($this, 'settings_page') ); } public function settings_page() { if (!current_user_can('manage_options')) { wp_die('Unauthorized user'); } // Get the active tab from the $_GET param $default_tab = null; $tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : $default_tab; ?>