Changeset 3726634 for custom-css-js/trunk/custom-css-js.php
- Timestamp:
- 10/03/2026 07:09:18 PM (3 weeks ago)
- File:
-
- 1 edited
-
custom-css-js/trunk/custom-css-js.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-css-js/trunk/custom-css-js.php
r3656511 r3726634 4 4 * Plugin URI: https://wordpress.org/plugins/custom-css-js/ 5 5 * Description: Easily add Custom CSS or JS to your website with an awesome editor. 6 * Version: 3.54 6 * Version: 3.54.1 7 7 * Author: SilkyPress.com 8 8 * Author URI: https://www.silkypress.com … … 49 49 */ 50 50 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' ); 52 52 } 53 53 … … 56 56 */ 57 57 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' ); 59 59 } 60 60 … … 194 194 $custom_code = str_replace( array( ' type="text/javascript"', ' type="text/css"' ), '', $custom_code ); 195 195 } 196 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 196 197 echo $custom_code; 197 198 } else { 199 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 198 200 echo @file_get_contents( CCJ_UPLOAD_DIR . '/' . $_filename ); 199 201 } 200 202 } 201 203 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 ) : 207 208 $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; 210 211 211 212 if ( 'html' === $type ) { 212 213 $post = get_post( intval( $_filename ) ); 213 214 if ( isset( $post->post_content ) && ! empty( $post->post_content ) ) { 215 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 214 216 echo $post->post_content; 215 217 } … … 282 284 $dir = wp_upload_dir(); 283 285 $constants = array( 284 'CCJ_VERSION' => '3.54 ',286 'CCJ_VERSION' => '3.54.1', 285 287 'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js', 286 288 'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)