CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Sun, 12 Oct 2025 23:16:09 GMT
content-type: text/html;charset=utf-8
vary: Accept-Encoding
etag: W/"anonymous/Thu, 14 Aug 2025 10:21:41 GMT/b37c5d5f6246feb109f22e6ab2e2e4bf"
cache-control: must-revalidate
alt-svc: h3=":443"; ma=86400
x-nc: MISS
content-encoding: gzip
Changeset 3344559 for wp-add-custom-css – WordPress Plugin Repository
Skip to content
Changeset 3344559 for wp-add-custom-css
- Timestamp:
- 08/14/2025 10:21:41 AM (2 months ago)
- Author:
- danieledesantis
- Message:
-
Release version 1.2.1
- Location:
- wp-add-custom-css
- Files:
-
- 4 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
wp-add-custom-css/tags/1.2.1/readme.txt
r3340426 r3344559 4 4 Requires at least: 4.0 5 5 Tested up to: 6.8.2 6 Stable tag: 1.2. 06 Stable tag: 1.2.1 7 7 License: GPLv2 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 67 67 68 68 == Changelog == 69 70 = 1.2.1 = 71 * Moved custom css file to uploads 72 * Set higher priority for wp_head callbacks 69 73 70 74 = 1.2.0 = … … 132 136 == Upgrade Notice == 133 137 138 = 1.2.1 = 139 * Moved custom css file to uploads 140 * Set higher priority for wp_head callbacks 141 134 142 = 1.2.0 = 135 143 * Added output as pure CSS file or style tag to improve performance -
wp-add-custom-css/tags/1.2.1/uninstall.php
r2007599 r3344559 9 9 delete_site_option($option_name); 10 10 delete_post_meta_by_key('_single_add_custom_css'); 11 12 $upload_dir = wp_upload_dir(); 13 $custom_css_dir = trailingslashit($upload_dir['basedir']) . 'wp-add-custom-css'; 14 $custom_css_file = trailingslashit($custom_css_dir) . 'custom-css.css'; 15 if ( file_exists( $custom_css_file ) ) { 16 @unlink( $custom_css_file ); 17 } 18 if ( is_dir( $custom_css_dir ) ) { 19 @rmdir( $custom_css_dir ); 20 } 11 21 ?> -
wp-add-custom-css/tags/1.2.1/wordpress-add-custom-css.php
r3340426 r3344559 4 4 Plugin URI: https://www.danieledesantis.net 5 5 Description: Add custom css to the whole website and to specific posts, pages and custom post types. 6 Version: 1.2. 06 Version: 1.2.1 7 7 Author: Daniele De Santis 8 8 Author URI: https://www.danieledesantis.net … … 50 50 add_filter('query_vars', array($this, 'add_wp_var')); 51 51 add_action( 'wp_enqueue_scripts', array($this, 'add_custom_css'), 9999 ); 52 add_action('wp_head', array($this, 'main_custom_css'), 9 8 );53 add_action('wp_head', array($this, 'single_custom_css'), 99 );52 add_action('wp_head', array($this, 'main_custom_css'), 9998 ); 53 add_action('wp_head', array($this, 'single_custom_css'), 9999 ); 54 54 } 55 55 … … 304 304 // echo 'updated option ' . var_dump($value); 305 305 if(is_array($value) && !empty($value['main_custom_style'])) { 306 // echo $value['main_custom_style']; 307 file_put_contents(plugin_dir_path( __FILE__ ) . '/css/custom-css.css', $value['main_custom_style']); 306 $upload_dir = wp_upload_dir(); 307 $custom_css_dir = trailingslashit($upload_dir['basedir']) . 'wp-add-custom-css'; 308 if (!file_exists($custom_css_dir)) { 309 wp_mkdir_p($custom_css_dir); 310 } 311 $custom_css_path = trailingslashit($custom_css_dir) . 'custom-css.css'; 312 file_put_contents($custom_css_path, $value['main_custom_style']); 308 313 } 309 314 // exit(); … … 332 337 } 333 338 if ( isset($this->options['main_custom_style_output_method']) && $this->options['main_custom_style_output_method'] === 'css_file' ) { 334 $css_base_url = plugin_dir_url( __FILE__ ) . 'css/custom-css.css'; 339 $upload_dir = wp_upload_dir(); 340 $css_base_url = trailingslashit($upload_dir['baseurl']) . 'wp-add-custom-css/custom-css.css'; 335 341 } else { 336 342 if ( function_exists('icl_object_id') ) { … … 382 388 } 383 389 384 385 390 } 386 391 } -
wp-add-custom-css/trunk/readme.txt
r3340426 r3344559 4 4 Requires at least: 4.0 5 5 Tested up to: 6.8.2 6 Stable tag: 1.2. 06 Stable tag: 1.2.1 7 7 License: GPLv2 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 67 67 68 68 == Changelog == 69 70 = 1.2.1 = 71 * Moved custom css file to uploads 72 * Set higher priority for wp_head callbacks 69 73 70 74 = 1.2.0 = … … 132 136 == Upgrade Notice == 133 137 138 = 1.2.1 = 139 * Moved custom css file to uploads 140 * Set higher priority for wp_head callbacks 141 134 142 = 1.2.0 = 135 143 * Added output as pure CSS file or style tag to improve performance -
wp-add-custom-css/trunk/uninstall.php
r2007599 r3344559 9 9 delete_site_option($option_name); 10 10 delete_post_meta_by_key('_single_add_custom_css'); 11 12 $upload_dir = wp_upload_dir(); 13 $custom_css_dir = trailingslashit($upload_dir['basedir']) . 'wp-add-custom-css'; 14 $custom_css_file = trailingslashit($custom_css_dir) . 'custom-css.css'; 15 if ( file_exists( $custom_css_file ) ) { 16 @unlink( $custom_css_file ); 17 } 18 if ( is_dir( $custom_css_dir ) ) { 19 @rmdir( $custom_css_dir ); 20 } 11 21 ?> -
wp-add-custom-css/trunk/wordpress-add-custom-css.php
r3340426 r3344559 4 4 Plugin URI: https://www.danieledesantis.net 5 5 Description: Add custom css to the whole website and to specific posts, pages and custom post types. 6 Version: 1.2. 06 Version: 1.2.1 7 7 Author: Daniele De Santis 8 8 Author URI: https://www.danieledesantis.net … … 50 50 add_filter('query_vars', array($this, 'add_wp_var')); 51 51 add_action( 'wp_enqueue_scripts', array($this, 'add_custom_css'), 9999 ); 52 add_action('wp_head', array($this, 'main_custom_css'), 9 8 );53 add_action('wp_head', array($this, 'single_custom_css'), 99 );52 add_action('wp_head', array($this, 'main_custom_css'), 9998 ); 53 add_action('wp_head', array($this, 'single_custom_css'), 9999 ); 54 54 } 55 55 … … 304 304 // echo 'updated option ' . var_dump($value); 305 305 if(is_array($value) && !empty($value['main_custom_style'])) { 306 // echo $value['main_custom_style']; 307 file_put_contents(plugin_dir_path( __FILE__ ) . '/css/custom-css.css', $value['main_custom_style']); 306 $upload_dir = wp_upload_dir(); 307 $custom_css_dir = trailingslashit($upload_dir['basedir']) . 'wp-add-custom-css'; 308 if (!file_exists($custom_css_dir)) { 309 wp_mkdir_p($custom_css_dir); 310 } 311 $custom_css_path = trailingslashit($custom_css_dir) . 'custom-css.css'; 312 file_put_contents($custom_css_path, $value['main_custom_style']); 308 313 } 309 314 // exit(); … … 332 337 } 333 338 if ( isset($this->options['main_custom_style_output_method']) && $this->options['main_custom_style_output_method'] === 'css_file' ) { 334 $css_base_url = plugin_dir_url( __FILE__ ) . 'css/custom-css.css'; 339 $upload_dir = wp_upload_dir(); 340 $css_base_url = trailingslashit($upload_dir['baseurl']) . 'wp-add-custom-css/custom-css.css'; 335 341 } else { 336 342 if ( function_exists('icl_object_id') ) { … … 382 388 } 383 389 384 385 390 } 386 391 }
Note: See TracChangeset
for help on using the changeset viewer.