Version Description
- Fix: select multiple value with post, user and taxonomy
- Fix: bug in oembed field
- Fix: fix JS/CSS compatibility with WooCommerce
- Fix: do not force field ID to lowercase, which can potentially breaks existing fields or fields with ID of CAPS characters.
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 4.8.1 |
Comparing to | |
See all releases |
Code changes from version 4.8.0 to 4.8.1
- inc/field.php +0 -3
- inc/fields/object-choice.php +2 -1
- inc/fields/oembed.php +0 -1
- inc/fields/select-advanced.php +7 -7
- inc/loader.php +1 -1
- meta-box.php +1 -1
- readme.txt +8 -1
inc/field.php
CHANGED
@@ -366,9 +366,6 @@ abstract class RWMB_Field
|
|
366 |
'attributes' => array(),
|
367 |
) );
|
368 |
|
369 |
-
//Make sure all letters are lower case for id
|
370 |
-
$field['id'] = strtolower( $field['id'] );
|
371 |
-
|
372 |
return $field;
|
373 |
}
|
374 |
|
366 |
'attributes' => array(),
|
367 |
) );
|
368 |
|
|
|
|
|
|
|
369 |
return $field;
|
370 |
}
|
371 |
|
inc/fields/object-choice.php
CHANGED
@@ -104,6 +104,7 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Field
|
|
104 |
$attributes['class'] .= " rwmb-choice";
|
105 |
$attributes['id'] = false;
|
106 |
$attributes['type'] = 'radio_list' === $field['field_type'] ? 'radio' : 'checkbox';
|
|
|
107 |
break;
|
108 |
case 'select_advanced':
|
109 |
$attributes = RWMB_Select_Advanced_Field::get_attributes( $field, $value );
|
@@ -122,7 +123,7 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Field
|
|
122 |
break;
|
123 |
}
|
124 |
|
125 |
-
|
126 |
|
127 |
return $attributes;
|
128 |
}
|
104 |
$attributes['class'] .= " rwmb-choice";
|
105 |
$attributes['id'] = false;
|
106 |
$attributes['type'] = 'radio_list' === $field['field_type'] ? 'radio' : 'checkbox';
|
107 |
+
$attributes['name'] .= ! $field['clone'] && $field['multiple'] ? '[]' : '';
|
108 |
break;
|
109 |
case 'select_advanced':
|
110 |
$attributes = RWMB_Select_Advanced_Field::get_attributes( $field, $value );
|
123 |
break;
|
124 |
}
|
125 |
|
126 |
+
|
127 |
|
128 |
return $attributes;
|
129 |
}
|
inc/fields/oembed.php
CHANGED
@@ -66,7 +66,6 @@ class RWMB_OEmbed_Field extends RWMB_URL_Field
|
|
66 |
<span class="spinner"></span>
|
67 |
<div class="embed-code">%s</div>',
|
68 |
self::render_attributes( $attributes ),
|
69 |
-
$field['size'],
|
70 |
__( 'Preview', 'meta-box' ),
|
71 |
$meta ? self::get_embed( $meta ) : ''
|
72 |
);
|
66 |
<span class="spinner"></span>
|
67 |
<div class="embed-code">%s</div>',
|
68 |
self::render_attributes( $attributes ),
|
|
|
69 |
__( 'Preview', 'meta-box' ),
|
70 |
$meta ? self::get_embed( $meta ) : ''
|
71 |
);
|
inc/fields/select-advanced.php
CHANGED
@@ -9,12 +9,12 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
|
9 |
*/
|
10 |
static function admin_enqueue_scripts()
|
11 |
{
|
12 |
-
wp_enqueue_style( 'select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
|
13 |
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
14 |
|
15 |
-
wp_register_script( 'select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '4.0.1', true );
|
16 |
wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array(), RWMB_VER, true );
|
17 |
-
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', array( 'select2', 'rwmb-select' ), RWMB_VER, true );
|
18 |
}
|
19 |
|
20 |
/**
|
@@ -27,7 +27,7 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
|
27 |
static function html( $meta, $field )
|
28 |
{
|
29 |
$attributes = self::get_attributes( $field, $meta );
|
30 |
-
$html
|
31 |
'<select %s>',
|
32 |
self::render_attributes( $attributes )
|
33 |
);
|
@@ -47,8 +47,8 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
|
47 |
static function normalize( $field )
|
48 |
{
|
49 |
$field = wp_parse_args( $field, array(
|
50 |
-
'js_options'
|
51 |
-
'placeholder' => 'Select an item'
|
52 |
) );
|
53 |
|
54 |
$field = parent::normalize( $field );
|
@@ -73,7 +73,7 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
|
73 |
{
|
74 |
$attributes = parent::get_attributes( $field, $value );
|
75 |
$attributes = wp_parse_args( $attributes, array(
|
76 |
-
'data-options'
|
77 |
) );
|
78 |
|
79 |
return $attributes;
|
9 |
*/
|
10 |
static function admin_enqueue_scripts()
|
11 |
{
|
12 |
+
wp_enqueue_style( 'rwmb-select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
|
13 |
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
14 |
|
15 |
+
wp_register_script( 'rwmb-select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '4.0.1', true );
|
16 |
wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array(), RWMB_VER, true );
|
17 |
+
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', array( 'rwmb-select2', 'rwmb-select' ), RWMB_VER, true );
|
18 |
}
|
19 |
|
20 |
/**
|
27 |
static function html( $meta, $field )
|
28 |
{
|
29 |
$attributes = self::get_attributes( $field, $meta );
|
30 |
+
$html = sprintf(
|
31 |
'<select %s>',
|
32 |
self::render_attributes( $attributes )
|
33 |
);
|
47 |
static function normalize( $field )
|
48 |
{
|
49 |
$field = wp_parse_args( $field, array(
|
50 |
+
'js_options' => array(),
|
51 |
+
'placeholder' => 'Select an item',
|
52 |
) );
|
53 |
|
54 |
$field = parent::normalize( $field );
|
73 |
{
|
74 |
$attributes = parent::get_attributes( $field, $value );
|
75 |
$attributes = wp_parse_args( $attributes, array(
|
76 |
+
'data-options' => wp_json_encode( $field['js_options'] ),
|
77 |
) );
|
78 |
|
79 |
return $attributes;
|
inc/loader.php
CHANGED
@@ -28,7 +28,7 @@ class RWMB_Loader
|
|
28 |
public function constants()
|
29 |
{
|
30 |
// Script version, used to add version for scripts and styles
|
31 |
-
define( 'RWMB_VER', '4.8.
|
32 |
|
33 |
list( $path, $url ) = self::get_path();
|
34 |
|
28 |
public function constants()
|
29 |
{
|
30 |
// Script version, used to add version for scripts and styles
|
31 |
+
define( 'RWMB_VER', '4.8.1' );
|
32 |
|
33 |
list( $path, $url ) = self::get_path();
|
34 |
|
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 for any post type in WordPress.
|
6 |
-
* Version: 4.8.
|
7 |
* Author: Rilwis
|
8 |
* Author URI: http://www.deluxeblogtips.com
|
9 |
* License: GPL2+
|
3 |
* Plugin Name: Meta Box
|
4 |
* Plugin URI: https://metabox.io
|
5 |
* Description: Create custom meta boxes and custom fields for any post type in WordPress.
|
6 |
+
* Version: 4.8.1
|
7 |
* Author: Rilwis
|
8 |
* Author URI: http://www.deluxeblogtips.com
|
9 |
* License: GPL2+
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.deluxeblogtips.com/donate
|
|
4 |
Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.4.2
|
7 |
-
Stable tag: 4.8.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
|
@@ -77,6 +77,13 @@ To getting started with the plugin API, please read [this tutorial](https://meta
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 4.8.0 =
|
81 |
|
82 |
* Improvement: rewrite the way the plugin loads file, which allows developers to include the plugin into themes/plugins simply by include the main file. The new loading mechanism also uses autoloading feature which prevents loading files twice and saves memory.
|
4 |
Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.4.2
|
7 |
+
Stable tag: 4.8.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 4.8.1 =
|
81 |
+
|
82 |
+
* Fix: select multiple value with post, user and taxonomy
|
83 |
+
* Fix: bug in oembed field
|
84 |
+
* Fix: fix JS/CSS compatibility with WooCommerce
|
85 |
+
* Fix: do not force field ID to lowercase, which can potentially breaks existing fields or fields with ID of CAPS characters.
|
86 |
+
|
87 |
= 4.8.0 =
|
88 |
|
89 |
* Improvement: rewrite the way the plugin loads file, which allows developers to include the plugin into themes/plugins simply by include the main file. The new loading mechanism also uses autoloading feature which prevents loading files twice and saves memory.
|