Changeset 3105226
- Timestamp:
- 06/20/2024 03:15:18 PM (22 months ago)
- Location:
- block-editor-colors/trunk
- Files:
-
- 3 edited
-
includes/CustomColorsService.php (modified) (1 diff)
-
plugin.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
block-editor-colors/trunk/includes/CustomColorsService.php
r2633637 r3105226 59 59 ); 60 60 61 $ query = new \WP_Query( $args );61 $posts = get_posts( $args ); 62 62 $colors = []; 63 63 $disabled_colors = []; 64 64 65 if ( $query->have_posts() ) { 66 while ( $query->have_posts() ) { 67 $query->the_post(); 68 69 if ( get_post_status() === 'publish' ) { 70 $colors[ get_the_ID() ] = [ 71 'name' => get_the_title(), 72 'slug' => get_post_meta( get_the_ID(), 'slug', true ), 73 'color' => get_post_meta( get_the_ID(), 'color', true ), 74 ]; 75 } else { 76 $disabled_colors[ get_the_ID() ] = [ 77 'name' => get_the_title(), 78 'slug' => get_post_meta( get_the_ID(), 'slug', true ), 79 'color' => get_post_meta( get_the_ID(), 'color', true ), 80 ]; 81 } 82 83 } 84 } 85 86 wp_reset_postdata(); 65 foreach ( $posts as $post ) { 66 if ( $post->post_status === 'publish' ) { 67 $colors[ $post->ID ] = [ 68 'name' => $post->post_title, 69 'slug' => get_post_meta( $post->ID, 'slug', true ), 70 'color' => get_post_meta( $post->ID, 'color', true ), 71 ]; 72 } else { 73 $disabled_colors[ $post->ID ] = [ 74 'name' => $post->post_title, 75 'slug' => get_post_meta( $post->ID, 'slug', true ), 76 'color' => get_post_meta( $post->ID, 'color', true ), 77 ]; 78 } 79 } 87 80 88 81 $this->custom_colors = $colors; -
block-editor-colors/trunk/plugin.php
r2726853 r3105226 4 4 * Plugin URI: https://motopress.com/products/block-editor-colors/ 5 5 * Description: Change Gutenberg block editor colors or create new ones. 6 * Version: 1.2. 46 * Version: 1.2.5 7 7 * Author: MotoPress 8 8 * Author URI: https://motopress.com … … 15 15 if ( ! defined( 'BEC_PLUGIN_FILE' ) ) { 16 16 define( 'BEC_PLUGIN_FILE', __FILE__ ); 17 define( 'BEC_PLUGIN_VERSION', '1.2. 4' );17 define( 'BEC_PLUGIN_VERSION', '1.2.5' ); 18 18 } 19 19 -
block-editor-colors/trunk/readme.txt
r2895252 r3105226 4 4 Tags: gutenberg, gutenberg colors, color palette, editor color palette, customize, palette, gutenberg blocks, wordpress blocks 5 5 Requires at least: 5.0 6 Tested up to: 6. 26 Tested up to: 6.5 7 7 Requires PHP: 5.6 8 Stable tag: 1.2. 48 Stable tag: 1.2.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 47 47 == Changelog == 48 48 49 = 1.2.5, Jun 20 2024 = 50 * Minor bugfixes and improvements. 51 49 52 = 1.2.4, May 19 2022 = 50 53 * Improved compatibility with Gutenberg plugin.
Note: See TracChangeset
for help on using the changeset viewer.