Version Description
- 2022-12-08 =
- Fix name for adding form enctype to match with MB Term Meta extension
- Fix return type for RWMB_Helpers_Array::map()
- Fix required param type for RWMB_Helpers_Field::get_class()
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 5.6.13 |
Comparing to | |
See all releases |
Code changes from version 5.6.12 to 5.6.13
- inc/fields/file.php +2 -2
- inc/helpers/array.php +1 -1
- inc/helpers/field.php +2 -2
- inc/loader.php +2 -2
- meta-box.php +1 -1
- readme.txt +6 -1
inc/fields/file.php
CHANGED
@@ -16,11 +16,11 @@ class RWMB_File_Field extends RWMB_Field {
|
|
16 |
}
|
17 |
|
18 |
public static function add_actions() {
|
19 |
-
add_action( 'post_edit_form_tag', [ __CLASS__, '
|
20 |
add_action( 'wp_ajax_rwmb_delete_file', [ __CLASS__, 'ajax_delete_file' ] );
|
21 |
}
|
22 |
|
23 |
-
public static function
|
24 |
echo ' enctype="multipart/form-data"';
|
25 |
}
|
26 |
|
16 |
}
|
17 |
|
18 |
public static function add_actions() {
|
19 |
+
add_action( 'post_edit_form_tag', [ __CLASS__, 'post_edit_form_tag' ] );
|
20 |
add_action( 'wp_ajax_rwmb_delete_file', [ __CLASS__, 'ajax_delete_file' ] );
|
21 |
}
|
22 |
|
23 |
+
public static function post_edit_form_tag() {
|
24 |
echo ' enctype="multipart/form-data"';
|
25 |
}
|
26 |
|
inc/helpers/array.php
CHANGED
@@ -7,7 +7,7 @@ class RWMB_Helpers_Array {
|
|
7 |
* New array map function that accepts more params than just values.
|
8 |
* Params: array|item, callback, other params.
|
9 |
*/
|
10 |
-
public static function map()
|
11 |
$args = func_get_args();
|
12 |
$items = array_shift( $args );
|
13 |
$callback = array_shift( $args );
|
7 |
* New array map function that accepts more params than just values.
|
8 |
* Params: array|item, callback, other params.
|
9 |
*/
|
10 |
+
public static function map() {
|
11 |
$args = func_get_args();
|
12 |
$items = array_shift( $args );
|
13 |
$callback = array_shift( $args );
|
inc/helpers/field.php
CHANGED
@@ -19,13 +19,13 @@ class RWMB_Helpers_Field {
|
|
19 |
}
|
20 |
}
|
21 |
|
22 |
-
public static function get_class(
|
23 |
$type = self::get_type( $field );
|
24 |
$class = 'RWMB_' . RWMB_Helpers_String::title_case( $type ) . '_Field';
|
25 |
return class_exists( $class ) ? $class : 'RWMB_Input_Field';
|
26 |
}
|
27 |
|
28 |
-
private static function get_type(
|
29 |
$type = $field['type'] ?? 'text';
|
30 |
$map = array_merge(
|
31 |
[
|
19 |
}
|
20 |
}
|
21 |
|
22 |
+
public static function get_class( $field ) : string {
|
23 |
$type = self::get_type( $field );
|
24 |
$class = 'RWMB_' . RWMB_Helpers_String::title_case( $type ) . '_Field';
|
25 |
return class_exists( $class ) ? $class : 'RWMB_Input_Field';
|
26 |
}
|
27 |
|
28 |
+
private static function get_type( $field ) : string {
|
29 |
$type = $field['type'] ?? 'text';
|
30 |
$map = array_merge(
|
31 |
[
|
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.
|
11 |
|
12 |
list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
|
13 |
|
@@ -25,7 +25,7 @@ class RWMB_Loader {
|
|
25 |
* Get plugin base path and URL.
|
26 |
* The method is static and can be used in extensions.
|
27 |
*
|
28 |
-
* @link
|
29 |
* @param string $path Base folder path.
|
30 |
* @return array Path and URL.
|
31 |
*/
|
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.13' );
|
11 |
|
12 |
list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
|
13 |
|
25 |
* Get plugin base path and URL.
|
26 |
* The method is static and can be used in extensions.
|
27 |
*
|
28 |
+
* @link https://deluxeblogtips.com/get-url-of-php-file-in-wordpress/
|
29 |
* @param string $path Base folder path.
|
30 |
* @return array Path and URL.
|
31 |
*/
|
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.
|
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.13
|
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.
|
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.
|
@@ -177,6 +177,11 @@ To getting started with the plugin, please read the [Quick Start Guide](https://
|
|
177 |
|
178 |
== Changelog ==
|
179 |
|
|
|
|
|
|
|
|
|
|
|
180 |
= 5.6.12 - 2022-12-06 =
|
181 |
- Fix error getting license key
|
182 |
|
5 |
Requires at least: 4.8
|
6 |
Requires PHP: 7.0
|
7 |
Tested up to: 6.1.1
|
8 |
+
Stable tag: 5.6.13
|
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.
|
177 |
|
178 |
== Changelog ==
|
179 |
|
180 |
+
= 5.6.13 - 2022-12-08 =
|
181 |
+
- Fix name for adding form enctype to match with MB Term Meta extension
|
182 |
+
- Fix return type for RWMB_Helpers_Array::map()
|
183 |
+
- Fix required param type for RWMB_Helpers_Field::get_class()
|
184 |
+
|
185 |
= 5.6.12 - 2022-12-06 =
|
186 |
- Fix error getting license key
|
187 |
|