Changeset 2544357
- Timestamp:
- 06/08/2021 02:11:35 PM (5 years ago)
- Location:
- grayscale-body/trunk
- Files:
-
- 2 edited
-
grayscale-body.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grayscale-body/trunk/grayscale-body.php
r2508518 r2544357 4 4 Plugin URI: https://wordpress.org/plugins/grayscale-body/ 5 5 Description: Automatically turn the site to grayscale 6 Version: 1.2. 66 Version: 1.2.7 7 7 Author: Nathachai Thongniran 8 8 Author URI: http://jojoee.com/ … … 112 112 } 113 113 114 public function gsb_add_scripts( $is_enable_switcher = TRUE ) { 115 if ( $is_enable_switcher ) { 116 wp_enqueue_style( 'gsb-main-style', plugins_url( 'css/main.css', __FILE__ ) ); 117 wp_enqueue_script( 'gsb-main-script', plugins_url( 'js/main.js', __FILE__ ), array(), '120', TRUE ); 118 119 } else { 120 wp_enqueue_style( 'gsb-main-style-noswitcher', plugins_url( 'css/main-noswitcher.css', __FILE__ ) ); 121 } 122 } 123 114 124 public function gsb_enqueue_scripts() { 115 125 global $post; … … 122 132 $is_ignored_post = in_array( $post_id, $ignored_post_ids ); 123 133 124 if ( $is_enabled && ! $is_ignored_post ) { 125 if ( $is_enable_switcher ) { 126 wp_enqueue_style( 'gsb-main-style', plugins_url( 'css/main.css', __FILE__ ) ); 127 wp_enqueue_script( 'gsb-main-script', plugins_url( 'js/main.js', __FILE__ ), array(), '120', TRUE ); 128 134 if ( $is_enabled ) { 135 // some list-page or archive-page returns a post_id, so we need to address it first 136 if ( is_single() ) { 137 if ( ! $is_ignored_post ) { 138 $this->gsb_add_scripts( $is_enable_switcher ); 139 } 129 140 } else { 130 wp_enqueue_style( 'gsb-main-style-noswitcher', plugins_url( 'css/main-noswitcher.css', __FILE__ ));141 $this->gsb_add_scripts( $is_enable_switcher ); 131 142 } 132 143 } -
grayscale-body/trunk/readme.txt
r2508518 r2544357 5 5 Tags: grayscale, black, white, black and white, site, convert, conversion, CSS, CSS3, filter 6 6 Requires at least: 3.0.1 7 Tested up to: 5.7 7 Tested up to: 5.7.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 53 53 54 54 == Upgrade Notice == 55 56 = 1.2.7 = 57 * Fix bug, "ignored post ids" feature must ignore archive or listing page 55 58 56 59 = 1.2.6 =
Note: See TracChangeset
for help on using the changeset viewer.