Meta Box - Version 5.6.11

Version Description

  • 2022-12-06 =
  • Fix compatibility with other extensions
Download this release

Release Info

Developer rilwis
Plugin Icon 128x128 Meta Box
Version 5.6.11
Comparing to
See all releases

Code changes from version 5.6.10 to 5.6.11

Files changed (4) hide show
  1. inc/loader.php +1 -1
  2. inc/meta-box.php +5 -5
  3. meta-box.php +1 -1
  4. readme.txt +5 -2
inc/loader.php CHANGED
@@ -7,7 +7,7 @@
7
  class RWMB_Loader {
8
  protected function constants() {
9
  // Script version, used to add version for scripts and styles.
10
- define( 'RWMB_VER', '5.6.10' );
11
 
12
  list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
13
 
7
  class RWMB_Loader {
8
  protected function constants() {
9
  // Script version, used to add version for scripts and styles.
10
+ define( 'RWMB_VER', '5.6.11' );
11
 
12
  list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
13
 
inc/meta-box.php CHANGED
@@ -85,7 +85,7 @@ class RW_Meta_Box {
85
 
86
  /**
87
  * Specific hooks for meta box object. Default is 'post'.
88
- * This should be extended in sub-classes to support meta fields for terms, user, settings pages, etc.
89
  */
90
  protected function object_hooks() {
91
  // Add meta box.
@@ -267,7 +267,7 @@ class RW_Meta_Box {
267
  && wp_verify_nonce( $nonce, "rwmb-save-{$this->id}" );
268
  }
269
 
270
- public static function normalize( array $meta_box ) : array {
271
  $default_title = __( 'Meta Box Title', 'meta-box' );
272
  $meta_box = wp_parse_args( $meta_box, [
273
  'title' => $default_title,
@@ -313,7 +313,7 @@ class RW_Meta_Box {
313
 
314
  /**
315
  * Check if meta box is saved before.
316
- * This helps saving empty value in meta fields (text, check box, etc.) and set the correct default values.
317
  */
318
  public function is_saved() : bool {
319
  foreach ( $this->fields as $field ) {
@@ -347,7 +347,7 @@ class RW_Meta_Box {
347
  *
348
  * @param ?WP_Screen $screen Screen object.
349
  */
350
- public function is_edit_screen( $screen = null ) : bool {
351
  if ( ! ( $screen instanceof WP_Screen ) ) {
352
  $screen = get_current_screen();
353
  }
@@ -403,6 +403,6 @@ class RW_Meta_Box {
403
  }
404
  $parent = wp_is_post_revision( $object_id );
405
 
406
- return $parent ? $parent : $object_id;
407
  }
408
  }
85
 
86
  /**
87
  * Specific hooks for meta box object. Default is 'post'.
88
+ * This should be extended in subclasses to support meta fields for terms, user, settings pages, etc.
89
  */
90
  protected function object_hooks() {
91
  // Add meta box.
267
  && wp_verify_nonce( $nonce, "rwmb-save-{$this->id}" );
268
  }
269
 
270
+ public static function normalize( $meta_box ) {
271
  $default_title = __( 'Meta Box Title', 'meta-box' );
272
  $meta_box = wp_parse_args( $meta_box, [
273
  'title' => $default_title,
313
 
314
  /**
315
  * Check if meta box is saved before.
316
+ * This helps to save empty value in meta fields (text, check box, etc.) and set the correct default values.
317
  */
318
  public function is_saved() : bool {
319
  foreach ( $this->fields as $field ) {
347
  *
348
  * @param ?WP_Screen $screen Screen object.
349
  */
350
+ public function is_edit_screen( $screen = null ) {
351
  if ( ! ( $screen instanceof WP_Screen ) ) {
352
  $screen = get_current_screen();
353
  }
403
  }
404
  $parent = wp_is_post_revision( $object_id );
405
 
406
+ return $parent ?: $object_id;
407
  }
408
  }
meta-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields in WordPress.
6
- * Version: 5.6.10
7
  * Author: MetaBox.io
8
  * Author URI: https://metabox.io
9
  * License: GPL2+
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields in WordPress.
6
+ * Version: 5.6.11
7
  * Author: MetaBox.io
8
  * Author URI: https://metabox.io
9
  * License: GPL2+
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: meta box, custom fields, custom post types, custom taxonomies, cpt, meta b
5
  Requires at least: 4.8
6
  Requires PHP: 7.0
7
  Tested up to: 6.1.1
8
- Stable tag: 5.6.10
9
  License: GPLv2 or later
10
 
11
  Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for your custom post types in WordPress.
@@ -102,7 +102,7 @@ You'll have ultimate control to add whatever meta box and custom fields in WordP
102
 
103
  #### Premium Extensions
104
 
105
- - [MB Views](https://metabox.io/plugins/mb-views/): Outputing custom fields and build front-end templates for WordPress without touching theme files.
106
  - [MB Blocks](https://metabox.io/plugins/mb-blocks/): Create custom Gutenberg blocks with PHP, using the same syntax in Meta Box.
107
  - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/): Create custom meta boxes and custom fields in WordPress using a user-friendly drag-and-drop interface.
108
  - [Meta Box Group](https://metabox.io/plugins/meta-box-group/): Create repeatable groups of WordPress custom fields for better appearance and structure.
@@ -177,6 +177,9 @@ To getting started with the plugin, please read the [Quick Start Guide](https://
177
 
178
  == Changelog ==
179
 
 
 
 
180
  = 5.6.10 - 2022-12-06 =
181
  - Fix padding for images in custom blocks
182
  - Fix sidebar::query not compatible with object_choice::query
5
  Requires at least: 4.8
6
  Requires PHP: 7.0
7
  Tested up to: 6.1.1
8
+ Stable tag: 5.6.11
9
  License: GPLv2 or later
10
 
11
  Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for your custom post types in WordPress.
102
 
103
  #### Premium Extensions
104
 
105
+ - [MB Views](https://metabox.io/plugins/mb-views/): Outputting custom fields and build front-end templates for WordPress without touching theme files.
106
  - [MB Blocks](https://metabox.io/plugins/mb-blocks/): Create custom Gutenberg blocks with PHP, using the same syntax in Meta Box.
107
  - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/): Create custom meta boxes and custom fields in WordPress using a user-friendly drag-and-drop interface.
108
  - [Meta Box Group](https://metabox.io/plugins/meta-box-group/): Create repeatable groups of WordPress custom fields for better appearance and structure.
177
 
178
  == Changelog ==
179
 
180
+ = 5.6.11 - 2022-12-06 =
181
+ - Fix compatibility with other extensions
182
+
183
  = 5.6.10 - 2022-12-06 =
184
  - Fix padding for images in custom blocks
185
  - Fix sidebar::query not compatible with object_choice::query