Plugin Directory

Changeset 3105226


Ignore:
Timestamp:
06/20/2024 03:15:18 PM (22 months ago)
Author:
endzevich
Message:

Version: 1.2.5

Location:
block-editor-colors/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • block-editor-colors/trunk/includes/CustomColorsService.php

    r2633637 r3105226  
    5959        );
    6060
    61         $query           = new \WP_Query( $args );
     61        $posts           = get_posts( $args );
    6262        $colors          = [];
    6363        $disabled_colors = [];
    6464
    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        }
    8780
    8881        $this->custom_colors          = $colors;
  • block-editor-colors/trunk/plugin.php

    r2726853 r3105226  
    44 * Plugin URI: https://motopress.com/products/block-editor-colors/
    55 * Description: Change Gutenberg block editor colors or create new ones.
    6  * Version: 1.2.4
     6 * Version: 1.2.5
    77 * Author: MotoPress
    88 * Author URI: https://motopress.com
     
    1515if ( ! defined( 'BEC_PLUGIN_FILE' ) ) {
    1616    define( 'BEC_PLUGIN_FILE', __FILE__ );
    17     define( 'BEC_PLUGIN_VERSION', '1.2.4' );
     17    define( 'BEC_PLUGIN_VERSION', '1.2.5' );
    1818}
    1919
  • block-editor-colors/trunk/readme.txt

    r2895252 r3105226  
    44Tags: gutenberg, gutenberg colors, color palette, editor color palette, customize, palette, gutenberg blocks, wordpress blocks
    55Requires at least: 5.0
    6 Tested up to: 6.2
     6Tested up to: 6.5
    77Requires PHP: 5.6
    8 Stable tag: 1.2.4
     8Stable tag: 1.2.5
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
     49= 1.2.5, Jun 20 2024 =
     50* Minor bugfixes and improvements.
     51
    4952= 1.2.4, May 19 2022 =
    5053* Improved compatibility with Gutenberg plugin.
Note: See TracChangeset for help on using the changeset viewer.