Server IP : 192.64.118.117 / Your IP : 3.138.105.128 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/mobilecreationz.com/wp-content/plugins/simple-custom-css/includes/ |
Upload File : |
<?php // Prevent direct file access if( ! defined( 'SCCSS_FILE' ) ) { die(); } /** * Enqueue link to add CSS through PHP. * * This is a typical WP Enqueue statement, except that the URL of the stylesheet is simply a query var. * This query var is passed to the URL, and when it is detected by scss_maybe_print_css(), * it writes its PHP/CSS to the browser. */ function sccss_register_style() { $url = home_url(); if ( is_ssl() ) { $url = home_url( '/', 'https' ); } wp_register_style( 'sccss_style', add_query_arg( array( 'sccss' => 1 ), $url ) ); wp_enqueue_style( 'sccss_style' ); } add_action( 'wp_enqueue_scripts', 'sccss_register_style', 99 ); /** * If the query var is set, print the Simple Custom CSS rules. */ function sccss_maybe_print_css() { // Only print CSS if this is a stylesheet request if( ! isset( $_GET['sccss'] ) || intval( $_GET['sccss'] ) !== 1 ) { return; } ob_start(); header( 'Content-type: text/css' ); $options = get_option( 'sccss_settings' ); $raw_content = isset( $options['sccss-content'] ) ? $options['sccss-content'] : ''; $content = wp_kses( $raw_content, array( '\'', '\"' ) ); $content = str_replace( '>', '>', $content ); echo $content; //xss okay die(); } add_action( 'plugins_loaded', 'sccss_maybe_print_css' );