Plugin Directory

Changeset 3451809


Ignore:
Timestamp:
02/02/2026 07:54:19 AM (2 weeks ago)
Author:
rilwis
Message:

Update to version 5.11.1 from GitHub

Location:
meta-box
Files:
10 added
4 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • meta-box/tags/5.11.1/inc/fields/block-editor.php

    r3440139 r3451809  
    22defined( 'ABSPATH' ) || die;
    33
    4 /**
    5  * Block editor field leveraging the isolated block editor package.
    6  *
    7  * @see https://github.com/Automattic/isolated-block-editor
    8  */
    94class RWMB_Block_Editor_Field extends RWMB_Field {
    10     /**
    11      * Enqueue scripts and styles for the field.
    12      * @see https://github.com/Automattic/isolated-block-editor/blob/trunk/examples/wordpress-php/iso-gutenberg.php
    13      */
    14     public static function admin_enqueue_scripts() {
    15         wp_register_script(
    16             'isolated-block-editor',
    17             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/isolated-block-editor.js',
    18             [ 'wp-block-library', 'wp-format-library', 'wp-editor' ],
    19             '2.29.0',
    20             true
     5    public static function admin_enqueue_scripts(): void {
     6        $asset_file = RWMB_DIR . 'js/block-editor/build/block-editor.asset.php';
     7        $asset      = require $asset_file;
     8
     9        wp_enqueue_style(
     10            'rwmb-block-editor',
     11            RWMB_URL . 'js/block-editor/build/style-block-editor.css',
     12            [
     13                'wp-block-editor',        // @wordpress/block-editor/build-style/style.css
     14                'wp-components',          // @wordpress/components/build-style/style.css
     15                'wp-edit-blocks',         // @wordpress/block-library/build-style/editor.css
     16                'wp-block-library',       // @wordpress/block-library/build-style/style.css
     17                'wp-block-library-theme', // @wordpress/block-library/build-style/theme.css
     18                'wp-format-library',
     19            ],
     20            $asset['version']
    2121        );
    2222
    2323        wp_enqueue_script(
    2424            'rwmb-block-editor',
    25             RWMB_JS_URL . 'block-editor.js',
    26             [ 'isolated-block-editor', 'jquery', 'rwmb' ],
    27             RWMB_VER,
     25            RWMB_URL . 'js/block-editor/build/block-editor.js',
     26            array_merge( $asset['dependencies'], [ 'rwmb' ] ),
     27            $asset['version'],
    2828            true
    2929        );
    3030
    31         wp_register_style(
    32             'isolated-block-editor-core',
    33             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/core.css',
    34             [],
    35             '2.29.0'
    36         );
    37 
    38         wp_register_style(
    39             'isolated-block-editor',
    40             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/isolated-block-editor.css',
    41             [ 'wp-edit-post', 'wp-format-library' ],
    42             '2.29.0'
    43         );
    44 
    45         wp_enqueue_style(
    46             'rwmb-block-editor',
    47             RWMB_CSS_URL . 'block-editor.css',
    48             [ 'isolated-block-editor-core', 'isolated-block-editor' ],
    49             RWMB_VER
    50         );
    51 
    52         wp_tinymce_inline_scripts();
    53         wp_enqueue_editor();
    54         wp_enqueue_media();
    55         add_action( 'wp_print_footer_scripts', array( '_WP_Editors', 'print_default_editor_scripts' ), 45 );
    56 
    57         do_action( 'enqueue_block_editor_assets' );
     31        $block_editor_context = new WP_Block_Editor_Context();
     32        $editor_settings      = get_block_editor_settings( [], $block_editor_context );
     33        RWMB_Helpers_Field::localize_script_once( 'rwmb-block-editor', 'rwmbBlockEditor', [
     34            'editor_settings' => $editor_settings,
     35        ] );
    5836    }
    5937
     
    6947        $field = wp_parse_args( $field, [
    7048            'allowed_blocks' => [],
     49            'height'         => '300px',
    7150        ] );
    7251
     
    11190
    11291    protected static function get_editor_settings( array $field ): array {
    113         return [
    114             'iso'    => [
    115                 'blocks' => [
    116                     'allowBlocks' => $field['allowed_blocks'],
    117                 ],
    118             ],
    119             'upload' => current_user_can( 'upload_files' ),
    120         ];
     92        $keys = [ 'allowed_blocks', 'height' ];
     93        return array_filter( array_intersect_key( $field, array_flip( $keys ) ) );
    12194    }
    12295}
  • meta-box/tags/5.11.1/inc/loader.php

    r3440139 r3451809  
    88    protected function constants() {
    99        // Script version, used to add version for scripts and styles.
    10         define( 'RWMB_VER', '5.11.0' );
     10        define( 'RWMB_VER', '5.11.1' );
    1111
    1212        list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
  • meta-box/tags/5.11.1/js/validation/validation.js

    r3328336 r3451809  
    291291        init() {
    292292            const submitButton = $( '#submit' );
     293            const validate = () => submitButton.prop( 'disabled', !this.$form.valid() );
    293294
    294295            this.$form.validate( {
    295296                ...this.settings,
    296297                invalidHandler: null,
    297                 onkeyup: () => {
    298                     submitButton.prop( 'disabled', !this.$form.valid() );
    299                 }
    300             } );
    301 
    302             submitButton.prop( 'disabled', !this.$form.valid() );
    303             $( '#tag-name' ).on( 'blur', () => {
    304                 submitButton.prop( 'disabled', !this.$form.valid() );
    305             } );
     298                onkeyup: validate
     299            } );
     300
     301            $( '#tag-name' ).on( 'blur', validate );
     302            this.$form.on( 'change input', rwmb.inputSelectors, validate );
     303            validate();
    306304        }
    307305    }
  • meta-box/tags/5.11.1/meta-box.php

    r3440139 r3451809  
    44 * Plugin URI:  https://metabox.io
    55 * Description: Create custom meta boxes and custom fields in WordPress.
    6  * Version:     5.11.0
     6 * Version:     5.11.1
    77 * Author:      MetaBox.io
    88 * Author URI:  https://metabox.io
  • meta-box/tags/5.11.1/readme.txt

    r3440139 r3451809  
    66Requires PHP: 7.1
    77Tested up to: 6.9
    8 Stable tag: 5.11.0
     8Stable tag: 5.11.1
    99License: GPLv2 or later
    1010
     
    149149== Changelog ==
    150150
     151= 5.11.1 - 2026-02-02 =
     152
     153**Improvements for the block editor field:**
     154
     155- Add block inspector sidebar
     156- Add structure panel to show the list view of blocks
     157- Add fullscreen mode
     158- Add `height` settings (default is `300px`) and allow resizing the editor
     159
     160**Fixes for the block editor field:**
     161
     162- Fix cannot upload images for the image block
     163- Fix blank site editor when using the block editor field
     164- Fix custom rich text formats not working
     165- Fix conflicts with `image_advanced` and `file_advanced` fields
     166
     167** Other changes:**
     168
     169- Fix cannot create new terms with required date/time fields
     170
    151171= 5.11.0 - 2026-01-15 =
    152172
  • meta-box/tags/5.11.1/src/Updater/Checker.php

    r3440139 r3451809  
    165165            'language'    => get_locale(),
    166166            'php_version' => PHP_VERSION,
     167            'product'     => defined( 'META_BOX_LITE_DIR' ) ? 'meta-box-lite' : ( defined( 'META_BOX_AIO_DIR' ) ? 'meta-box-aio' : 'meta-box' ),
    167168        ] );
    168169
  • meta-box/tags/5.11.1/vendor/composer/installed.php

    r3440139 r3451809  
    22    'root' => array(
    33        'name' => 'wpmetabox/meta-box',
    4         'pretty_version' => '5.11.0',
    5         'version' => '5.11.0.0',
    6         'reference' => '8a284b25b237b8b5b8addf36a99d4464168a162b',
     4        'pretty_version' => '5.11.1',
     5        'version' => '5.11.1.0',
     6        'reference' => '21cc88efff8892a93a8218ba1b00a142eabb0d86',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'wpmetabox/meta-box' => array(
    14             'pretty_version' => '5.11.0',
    15             'version' => '5.11.0.0',
    16             'reference' => '8a284b25b237b8b5b8addf36a99d4464168a162b',
     14            'pretty_version' => '5.11.1',
     15            'version' => '5.11.1.0',
     16            'reference' => '21cc88efff8892a93a8218ba1b00a142eabb0d86',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • meta-box/trunk/inc/fields/block-editor.php

    r3440139 r3451809  
    22defined( 'ABSPATH' ) || die;
    33
    4 /**
    5  * Block editor field leveraging the isolated block editor package.
    6  *
    7  * @see https://github.com/Automattic/isolated-block-editor
    8  */
    94class RWMB_Block_Editor_Field extends RWMB_Field {
    10     /**
    11      * Enqueue scripts and styles for the field.
    12      * @see https://github.com/Automattic/isolated-block-editor/blob/trunk/examples/wordpress-php/iso-gutenberg.php
    13      */
    14     public static function admin_enqueue_scripts() {
    15         wp_register_script(
    16             'isolated-block-editor',
    17             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/isolated-block-editor.js',
    18             [ 'wp-block-library', 'wp-format-library', 'wp-editor' ],
    19             '2.29.0',
    20             true
     5    public static function admin_enqueue_scripts(): void {
     6        $asset_file = RWMB_DIR . 'js/block-editor/build/block-editor.asset.php';
     7        $asset      = require $asset_file;
     8
     9        wp_enqueue_style(
     10            'rwmb-block-editor',
     11            RWMB_URL . 'js/block-editor/build/style-block-editor.css',
     12            [
     13                'wp-block-editor',        // @wordpress/block-editor/build-style/style.css
     14                'wp-components',          // @wordpress/components/build-style/style.css
     15                'wp-edit-blocks',         // @wordpress/block-library/build-style/editor.css
     16                'wp-block-library',       // @wordpress/block-library/build-style/style.css
     17                'wp-block-library-theme', // @wordpress/block-library/build-style/theme.css
     18                'wp-format-library',
     19            ],
     20            $asset['version']
    2121        );
    2222
    2323        wp_enqueue_script(
    2424            'rwmb-block-editor',
    25             RWMB_JS_URL . 'block-editor.js',
    26             [ 'isolated-block-editor', 'jquery', 'rwmb' ],
    27             RWMB_VER,
     25            RWMB_URL . 'js/block-editor/build/block-editor.js',
     26            array_merge( $asset['dependencies'], [ 'rwmb' ] ),
     27            $asset['version'],
    2828            true
    2929        );
    3030
    31         wp_register_style(
    32             'isolated-block-editor-core',
    33             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/core.css',
    34             [],
    35             '2.29.0'
    36         );
    37 
    38         wp_register_style(
    39             'isolated-block-editor',
    40             'https://cdn.jsdelivr.net/gh/Automattic/[email protected]/build-browser/isolated-block-editor.css',
    41             [ 'wp-edit-post', 'wp-format-library' ],
    42             '2.29.0'
    43         );
    44 
    45         wp_enqueue_style(
    46             'rwmb-block-editor',
    47             RWMB_CSS_URL . 'block-editor.css',
    48             [ 'isolated-block-editor-core', 'isolated-block-editor' ],
    49             RWMB_VER
    50         );
    51 
    52         wp_tinymce_inline_scripts();
    53         wp_enqueue_editor();
    54         wp_enqueue_media();
    55         add_action( 'wp_print_footer_scripts', array( '_WP_Editors', 'print_default_editor_scripts' ), 45 );
    56 
    57         do_action( 'enqueue_block_editor_assets' );
     31        $block_editor_context = new WP_Block_Editor_Context();
     32        $editor_settings      = get_block_editor_settings( [], $block_editor_context );
     33        RWMB_Helpers_Field::localize_script_once( 'rwmb-block-editor', 'rwmbBlockEditor', [
     34            'editor_settings' => $editor_settings,
     35        ] );
    5836    }
    5937
     
    6947        $field = wp_parse_args( $field, [
    7048            'allowed_blocks' => [],
     49            'height'         => '300px',
    7150        ] );
    7251
     
    11190
    11291    protected static function get_editor_settings( array $field ): array {
    113         return [
    114             'iso'    => [
    115                 'blocks' => [
    116                     'allowBlocks' => $field['allowed_blocks'],
    117                 ],
    118             ],
    119             'upload' => current_user_can( 'upload_files' ),
    120         ];
     92        $keys = [ 'allowed_blocks', 'height' ];
     93        return array_filter( array_intersect_key( $field, array_flip( $keys ) ) );
    12194    }
    12295}
  • meta-box/trunk/inc/loader.php

    r3440139 r3451809  
    88    protected function constants() {
    99        // Script version, used to add version for scripts and styles.
    10         define( 'RWMB_VER', '5.11.0' );
     10        define( 'RWMB_VER', '5.11.1' );
    1111
    1212        list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
  • meta-box/trunk/js/validation/validation.js

    r3328336 r3451809  
    291291        init() {
    292292            const submitButton = $( '#submit' );
     293            const validate = () => submitButton.prop( 'disabled', !this.$form.valid() );
    293294
    294295            this.$form.validate( {
    295296                ...this.settings,
    296297                invalidHandler: null,
    297                 onkeyup: () => {
    298                     submitButton.prop( 'disabled', !this.$form.valid() );
    299                 }
    300             } );
    301 
    302             submitButton.prop( 'disabled', !this.$form.valid() );
    303             $( '#tag-name' ).on( 'blur', () => {
    304                 submitButton.prop( 'disabled', !this.$form.valid() );
    305             } );
     298                onkeyup: validate
     299            } );
     300
     301            $( '#tag-name' ).on( 'blur', validate );
     302            this.$form.on( 'change input', rwmb.inputSelectors, validate );
     303            validate();
    306304        }
    307305    }
  • meta-box/trunk/meta-box.php

    r3440139 r3451809  
    44 * Plugin URI:  https://metabox.io
    55 * Description: Create custom meta boxes and custom fields in WordPress.
    6  * Version:     5.11.0
     6 * Version:     5.11.1
    77 * Author:      MetaBox.io
    88 * Author URI:  https://metabox.io
  • meta-box/trunk/readme.txt

    r3440139 r3451809  
    66Requires PHP: 7.1
    77Tested up to: 6.9
    8 Stable tag: 5.11.0
     8Stable tag: 5.11.1
    99License: GPLv2 or later
    1010
     
    149149== Changelog ==
    150150
     151= 5.11.1 - 2026-02-02 =
     152
     153**Improvements for the block editor field:**
     154
     155- Add block inspector sidebar
     156- Add structure panel to show the list view of blocks
     157- Add fullscreen mode
     158- Add `height` settings (default is `300px`) and allow resizing the editor
     159
     160**Fixes for the block editor field:**
     161
     162- Fix cannot upload images for the image block
     163- Fix blank site editor when using the block editor field
     164- Fix custom rich text formats not working
     165- Fix conflicts with `image_advanced` and `file_advanced` fields
     166
     167** Other changes:**
     168
     169- Fix cannot create new terms with required date/time fields
     170
    151171= 5.11.0 - 2026-01-15 =
    152172
  • meta-box/trunk/src/Updater/Checker.php

    r3440139 r3451809  
    165165            'language'    => get_locale(),
    166166            'php_version' => PHP_VERSION,
     167            'product'     => defined( 'META_BOX_LITE_DIR' ) ? 'meta-box-lite' : ( defined( 'META_BOX_AIO_DIR' ) ? 'meta-box-aio' : 'meta-box' ),
    167168        ] );
    168169
  • meta-box/trunk/vendor/composer/installed.php

    r3440139 r3451809  
    22    'root' => array(
    33        'name' => 'wpmetabox/meta-box',
    4         'pretty_version' => '5.11.0',
    5         'version' => '5.11.0.0',
    6         'reference' => '8a284b25b237b8b5b8addf36a99d4464168a162b',
     4        'pretty_version' => '5.11.1',
     5        'version' => '5.11.1.0',
     6        'reference' => '21cc88efff8892a93a8218ba1b00a142eabb0d86',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'wpmetabox/meta-box' => array(
    14             'pretty_version' => '5.11.0',
    15             'version' => '5.11.0.0',
    16             'reference' => '8a284b25b237b8b5b8addf36a99d4464168a162b',
     14            'pretty_version' => '5.11.1',
     15            'version' => '5.11.1.0',
     16            'reference' => '21cc88efff8892a93a8218ba1b00a142eabb0d86',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.