✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.224
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /var/softaculous/sitepad/editor/site-inc/customize//class-wp-customize-custom-css-setting.php
<?php
/**
 * Customize API: WP_Customize_Custom_CSS_Setting class
 *
 * This handles validation, sanitization and saving of the value.
 *
 * @package WordPress
 * @subpackage Customize
 * @since 4.7.0
 */

/**
 * Custom Setting to handle WP Custom CSS.
 *
 * @since 4.7.0
 *
 * @see WP_Customize_Setting
 */
final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {

	/**
	 * The setting type.
	 *
	 * @since 4.7.0
	 * @var string
	 */
	public $type = 'custom_css';

	/**
	 * Setting Transport
	 *
	 * @since 4.7.0
	 * @var string
	 */
	public $transport = 'postMessage';

	/**
	 * Capability required to edit this setting.
	 *
	 * @since 4.7.0
	 * @var string
	 */
	public $capability = 'edit_css';

	/**
	 * Stylesheet
	 *
	 * @since 4.7.0
	 * @var string
	 */
	public $stylesheet = '';

	/**
	 * WP_Customize_Custom_CSS_Setting constructor.
	 *
	 * @since 4.7.0
	 *
	 * @throws Exception If the setting ID does not match the pattern `custom_css[$stylesheet]`.
	 *
	 * @param WP_Customize_Manager $manager The Customize Manager class.
	 * @param string               $id      An specific ID of the setting. Can be a
	 *                                      theme mod or option name.
	 * @param array                $args    Setting arguments.
	 */
	public function __construct( $manager, $id, $args = array() ) {
		parent::__construct( $manager, $id, $args );
		if ( 'custom_css' !== $this->id_data['base'] ) {
			throw new Exception( 'Expected custom_css id_base.' );
		}
		if ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {
			throw new Exception( 'Expected single stylesheet key.' );
		}
		$this->stylesheet = $this->id_data['keys'][0];
	}

	/**
	 * Add filter to preview post value.
	 *
	 * @since 4.7.9
	 *
	 * @return bool False when preview short-circuits due no change needing to be previewed.
	 */
	public function preview() {
		if ( $this->is_previewed ) {
			return false;
		}
		$this->is_previewed = true;
		add_filter( 'wp_get_custom_css', array( $this, 'filter_previewed_wp_get_custom_css' ), 9, 2 );
		return true;
	}

	/**
	 * Filter `wp_get_custom_css` for applying the customized value.
	 *
	 * This is used in the preview when `wp_get_custom_css()` is called for rendering the styles.
	 *
	 * @since 4.7.0
	 * @see wp_get_custom_css()
	 *
	 * @param string $css        Original CSS.
	 * @param string $stylesheet Current stylesheet.
	 * @return string CSS.
	 */
	public function filter_previewed_wp_get_custom_css( $css, $stylesheet ) {
		if ( $stylesheet === $this->stylesheet ) {
			$customized_value = $this->post_value( null );
			if ( ! is_null( $customized_value ) ) {
				$css = $customized_value;
			}
		}
		return $css;
	}

	/**
	 * Fetch the value of the setting. Will return the previewed value when `preview()` is called.
	 *
	 * @since 4.7.0
	 * @see WP_Customize_Setting::value()
	 *
	 * @return string
	 */
	public function value() {
		if ( $this->is_previewed ) {
			$post_value = $this->post_value( null );
			if ( null !== $post_value ) {
				return $post_value;
			}
		}
		$id_base = $this->id_data['base'];
		$value   = '';
		$post    = wp_get_custom_css_post( $this->stylesheet );
		if ( $post ) {
			$value = $post->post_content;
		}
		if ( empty( $value ) ) {
			$value = $this->default;
		}

		/** This filter is documented in wp-includes/class-wp-customize-setting.php */
		$value = apply_filters( "customize_value_{$id_base}", $value, $this );

		return $value;
	}

	/**
	 * Validate CSS.
	 *
	 * Checks for imbalanced braces, brackets, and comments.
	 * Notifications are rendered when the customizer state is saved.
	 *
	 * @since 4.7.0
	 * @since 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor.
	 *
	 * @param string $css The input string.
	 * @return true|WP_Error True if the input was validated, otherwise WP_Error.
	 */
	public function validate( $css ) {
		$validity = new WP_Error();

		if ( preg_match( '#</?\w+#', $css ) ) {
			$validity->add( 'illegal_markup', __( 'Markup is not allowed in CSS.' ) );
		}

		if ( ! $validity->has_errors() ) {
			$validity = parent::validate( $css );
		}
		return $validity;
	}

	/**
	 * Store the CSS setting value in the custom_css custom post type for the stylesheet.
	 *
	 * @since 4.7.0
	 *
	 * @param string $css The input value.
	 * @return int|false The post ID or false if the value could not be saved.
	 */
	public function update( $css ) {
		if ( empty( $css ) ) {
			$css = '';
		}

		$r = wp_update_custom_css_post(
			$css,
			array(
				'stylesheet' => $this->stylesheet,
			)
		);

		if ( $r instanceof WP_Error ) {
			return false;
		}
		$post_id = $r->ID;

		// Cache post ID in theme mod for performance to avoid additional DB query.
		if ( $this->manager->get_stylesheet() === $this->stylesheet ) {
			set_theme_mod( 'custom_css_post_id', $post_id );
		}

		return $post_id;
	}
}


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
23 Apr 2026 9.56 AM
root / root
0755
class-wp-customize-background-image-control.php
1.18 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-background-image-setting.php
0.496 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-background-position-control.php
2.882 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-code-editor-control.php
2.259 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-color-control.php
2.813 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-cropped-image-control.php
1.426 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-custom-css-setting.php
4.775 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-date-time-control.php
8.416 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-filter-setting.php
0.574 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-header-image-control.php
7.714 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-header-image-setting.php
1.596 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-image-control.php
1.048 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-media-control.php
9.063 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-auto-add-control.php
1.096 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-control.php
1.987 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-item-control.php
6.323 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-item-setting.php
26.441 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-location-control.php
2.225 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-locations-control.php
2.787 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-name-control.php
1.104 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-section.php
0.703 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menu-setting.php
18.486 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-nav-menus-panel.php
3.014 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-new-menu-control.php
1.341 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-new-menu-section.php
1.634 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-partial.php
8.647 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-selective-refresh.php
14.789 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-sidebar-section.php
1.034 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-site-icon-control.php
3.186 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-theme-control.php
4.363 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-themes-panel.php
3.16 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-themes-section.php
6.457 KB
22 Apr 2026 7.17 AM
root / root
0644
class-wp-customize-upload-control.php
0.96 KB
22 Apr 2026 7.17 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF