Plugin Directory


Ignore:
Timestamp:
10/03/2026 07:09:18 PM (3 weeks ago)
Author:
diana_burduja
Message:

version 3.54.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • custom-css-js/trunk/custom-css-js.php

    r3656511 r3726634  
    44 * Plugin URI:  https://wordpress.org/plugins/custom-css-js/
    55 * Description: Easily add Custom CSS or JS to your website with an awesome editor.
    6  * Version:     3.54
     6 * Version:     3.54.1
    77 * Author:      SilkyPress.com
    88 * Author URI:  https://www.silkypress.com
    … …  
    4949                 */
    5050                public function __clone() {
    51                         _doing_it_wrong( __FUNCTION__, __( 'An error has occurred. Please reload the page and try again.' ), '1.0' );
     51                        _doing_it_wrong( __FUNCTION__, esc_html( 'An error has occurred. Please reload the page and try again.' ), '1.0' );
    5252                }
    5353
    … …  
    5656                 */
    5757                public function __wakeup() {
    58                         _doing_it_wrong( __FUNCTION__, __( 'An error has occurred. Please reload the page and try again.' ), '1.0' );
     58                        _doing_it_wrong( __FUNCTION__, esc_html( 'An error has occurred. Please reload the page and try again.' ), '1.0' );
    5959                }
    6060
    … …  
    194194                                                        $custom_code = str_replace( array( ' type="text/javascript"', ' type="text/css"' ), '', $custom_code );
    195195                                                }
     196                                                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    196197                                                echo $custom_code;
    197198                                        } else {
     199                                                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    198200                                                echo @file_get_contents( CCJ_UPLOAD_DIR . '/' . $_filename );
    199201                                        }
    200202                                }
    201203
    202                                 if ( 'external' === $where && 'js' === $type ) {
    203                                         echo PHP_EOL . "<script{$type_attr} src='{$upload_url}{$_filename}'></script>" . PHP_EOL;
    204                                 }
    205 
    206                                 if ( 'external' === $where && 'css' === $type ) {
     204                                if ( 'external' === $where && 'js' === $type ) : ?><script<?php echo esc_html( $type_attr ); ?> src="<?php echo esc_url( $upload_url . $_filename ); ?>"></script>
     205<?php endif;
     206
     207                                if ( 'external' === $where && 'css' === $type ) :
    207208                                        $shortfilename = preg_replace( '@\.css\?v=.*$@', '', $_filename );
    208                                         echo PHP_EOL . "<link rel='stylesheet' id='{$shortfilename}-css' href='{$upload_url}{$_filename}'{$type_attr} media='all' />" . PHP_EOL;
    209                                 }
     209                                        ?><link rel="stylesheet" id="<?php echo esc_attr( $shortfilename ); ?>-css" href="<?php echo esc_url( $upload_url . $_filename ); ?>"<?php echo esc_html( $type_attr ); ?> media="all" />
     210<?php endif;
    210211
    211212                                if ( 'html' === $type ) {
    212213                                        $post = get_post( intval( $_filename ) );
    213214                                        if ( isset( $post->post_content ) && ! empty( $post->post_content ) ) {
     215                                                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    214216                                                echo $post->post_content;
    215217                                        }
    … …  
    282284                        $dir       = wp_upload_dir();
    283285                        $constants = array(
    284                                 'CCJ_VERSION'     => '3.54',
     286                                'CCJ_VERSION'     => '3.54.1',
    285287                                'CCJ_UPLOAD_DIR'  => $dir['basedir'] . '/custom-css-js',
    286288                                'CCJ_UPLOAD_URL'  => $dir['baseurl'] . '/custom-css-js',
Note: See TracChangeset for help on using the changeset viewer.