WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / code-snippets / php / [dxwrx-r--r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/code-snippets/php/editor.php (3.48 KB)
<?php
/**
 * Functions for using the built-in code editor library
 *
 * @package Code_Snippets
 */

namespace Code_Snippets;

use function Code_Snippets\Settings\get_setting;

/**
 * Register and load the CodeMirror library.
 *
 * @param string               $type       Type of code editor – either 'php', 'css', 'js', or 'html'.
 * @param array<string, mixed> $extra_atts Pass a list of attributes to override the saved ones.
 */
function enqueue_code_editor( string $type, array $extra_atts = [] ) {
	$plugin = code_snippets();

	$modes = [
		'css'  => 'text/css',
		'php'  => 'php-snippet',
		'js'   => 'javascript',
		'html' => 'application/x-httpd-php',
	];

	if ( ! isset( $modes[ $type ] ) ) {
		$type = 'php';
	}

	$default_atts = [
		'mode'          => $modes[ $type ],
		'inputStyle'    => 'textarea',
		'matchBrackets' => true,
		'extraKeys'     => [
			'Alt-F'      => 'findPersistent',
			'Ctrl-Space' => 'autocomplete',
			'Ctrl-/'     => 'toggleComment',
			'Cmd-/'      => 'toggleComment',
			'Alt-Up'     => 'swapLineUp',
			'Alt-Down'   => 'swapLineDown',
		],
		'gutters'       => [ 'CodeMirror-lint-markers', 'CodeMirror-foldgutter' ],
		'lint'          => 'css' === $type || 'php' === $type,
		'direction'     => 'ltr',
		'colorpicker'   => [ 'mode' => 'edit' ],
		'foldOptions'   => [ 'widget' => '...' ],
	];

	// Add relevant saved setting values to the default attributes.
	$plugin_settings = Settings\get_settings_values();
	$setting_fields = Settings\get_settings_fields();

	foreach ( $setting_fields['editor'] as $field_id => $field ) {
		// The 'codemirror' setting field specifies the name of the attribute.
		$default_atts[ $field['codemirror'] ] = $plugin_settings['editor'][ $field_id ];
	}

	// Merge the default attributes with the ones passed into the function.
	$atts = wp_parse_args( $default_atts, $extra_atts );
	$atts = apply_filters( 'code_snippets_codemirror_atts', $atts );

	// Ensure number values are not formatted as strings.
	foreach ( [ 'indentUnit', 'tabSize' ] as $number_att ) {
		$atts[ $number_att ] = intval( $atts[ $number_att ] );
	}

	// Remove fontSize from the options and add it as an inline style.
	if ( isset( $atts['fontSize'] ) ) {
		$font_size = intval( $atts['fontSize'] );
		unset( $atts['fontSize'] );
		wp_add_inline_style( 'code-editor', ".CodeMirror { font-size: {$font_size}px !important; }" );
	}

	wp_enqueue_code_editor(
		[
			'type'       => $modes[ $type ],
			'codemirror' => $atts,
		]
	);

	wp_enqueue_script( 'htmlhint' );
	wp_enqueue_script( 'csslint' );
	wp_enqueue_script( 'jshint' );

	wp_enqueue_script(
		'code-snippets-code-editor',
		plugins_url( 'dist/editor.js', $plugin->file ),
		[ 'code-editor' ],
		$plugin->version,
		true
	);

	// CodeMirror Theme.
	$theme = get_setting( 'editor', 'theme' );

	if ( 'default' !== $theme ) {
		wp_enqueue_style(
			'code-snippets-editor-theme-' . $theme,
			plugins_url( "dist/editor-themes/$theme.css", $plugin->file ),
			[ 'code-editor' ],
			$plugin->version
		);
	}
}

/**
 * Retrieve a list of the available CodeMirror themes.
 *
 * @return array<string> The available themes.
 */
function get_editor_themes(): array {
	static $themes = null;

	if ( ! is_null( $themes ) ) {
		return $themes;
	}

	$themes = array();
	$themes_dir = plugin_dir_path( PLUGIN_FILE ) . 'dist/editor-themes/';

	$theme_files = glob( $themes_dir . '*.css' );

	foreach ( $theme_files as $theme ) {
		$theme = str_replace( $themes_dir, '', $theme );
		$theme = str_replace( '.css', '', $theme );
		$themes[] = $theme;
	}

	return $themes;
}
namawaktuukuranownerpermaksi
..
admin-menus/ 2026-07-30 21:3728.18 KB 76129f60960:kundendxwrx-r--r
cloud/ 2026-07-30 21:3741.72 KB 76129f60960:kundendxwrx-r--r
evaluation/ 2026-07-30 21:379.05 KB 76129f60960:kundendxwrx-r--r
export/ 2026-07-30 21:3711.41 KB 76129f60960:kundendxwrx-r--r
flat-files/ 2026-07-30 21:3724.48 KB 76129f60960:kundendxwrx-r--r
front-end/ 2026-07-30 21:3715.83 KB 76129f60960:kundendxwrx-r--r
migration/ 2026-07-30 21:3725.78 KB 76129f60960:kundendxwrx-r--r
rest-api/ 2026-07-30 21:3722.67 KB 76129f60960:kundendxwrx-r--r
settings/ 2026-07-30 21:3741.32 KB 76129f60960:kundendxwrx-r--r
views/ 2026-07-30 21:3718.36 KB 76129f60960:kundendxwrx-r--r
class-admin.php 2026-07-30 21:3712 KB 76129f60960:kunden-xw-x-----
edt
class-contextual-help.php 2026-07-30 21:376.46 KB 76129f60960:kunden-xw-x-----
edt
class-data-item.php 2026-07-30 21:376.56 KB 76129f60960:kunden-xw-x-----
edt
class-db.php 2026-07-30 21:3710.12 KB 76129f60960:kunden-xw-x-----
edt
class-licensing.php 2026-07-30 21:37314 B 76129f60960:kunden-xw-x-----
edt
class-list-table.php 2026-07-30 21:3743.83 KB 76129f60960:kunden-xw-x-----
edt
class-plugin.php 2026-07-30 21:3711.08 KB 76129f60960:kunden-xw-x-----
edt
class-snippet.php 2026-07-30 21:3713.88 KB 76129f60960:kunden-xw-x-----
edt
class-upgrade.php 2026-07-30 21:376.55 KB 76129f60960:kunden-xw-x-----
edt
class-validator.php 2026-07-30 21:377.02 KB 76129f60960:kunden-xw-x-----
edt
class-welcome-api.php 2026-07-30 21:379.53 KB 76129f60960:kunden-xw-x-----
edt
deactivation-notice.php 2026-07-30 21:371.94 KB 76129f60960:kunden-xw-x-----
edt
editor.php 2026-07-30 21:373.48 KB 76129f60960:kunden-xw-x-----
edt
load.php 2026-07-30 21:372.16 KB 76129f60960:kunden-xw-x-----
edt
snippet-ops.php 2026-07-30 21:3720.99 KB 76129f60960:kunden-xw-x-----
edt
strings.php 2026-07-30 21:371.8 KB 76129f60960:kunden-xw-x-----
edt
uninstall.php 2026-07-30 21:372.54 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/plugins/code-snippets/php
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK