Version Description
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 4.15.5 |
Comparing to | |
See all releases |
Code changes from version 4.15.4 to 4.15.5
- css/button-group.css +13 -13
- css/input-list.css +3 -3
- inc/fields/button-group.php +1 -1
- inc/fields/input-list.php +3 -3
- inc/fields/select-tree.php +1 -1
- inc/fields/taxonomy.php +3 -0
- inc/loader.php +1 -1
- inc/sanitizer.php +4 -3
- js/autosave.js +1 -1
- js/input-list.js +3 -3
- js/media.js +2 -2
- meta-box.php +1 -1
- readme.txt +1 -1
css/button-group.css
CHANGED
@@ -21,48 +21,48 @@
|
|
21 |
}
|
22 |
/* Layout not inline
|
23 |
-------------------------------------------------*/
|
24 |
-
.rwmb-button-input-list:not(.inline) li label {
|
25 |
border-top-width: 0;
|
26 |
}
|
27 |
-
.rwmb-button-input-list:not(.inline) li:first-child label {
|
28 |
border-top-width: 1px;
|
29 |
}
|
30 |
-
.rwmb-button-input-list:not(.inline) li label.selected {
|
31 |
border-bottom: 1px solid #fff;
|
32 |
}
|
33 |
-
.rwmb-button-input-list:not(.inline) li:last-child label.selected {
|
34 |
border-bottom-color: #0073aa;
|
35 |
}
|
36 |
-
.rwmb-button-input-list:not(.inline) > li:first-child:not(:last-child) label {
|
37 |
border-top-left-radius: 3px;
|
38 |
border-top-right-radius: 3px;
|
39 |
}
|
40 |
-
.rwmb-button-input-list:not(.inline) > li:last-child:not(:first-child) label {
|
41 |
border-bottom-right-radius: 3px;
|
42 |
border-bottom-left-radius: 3px;
|
43 |
}
|
44 |
/* Layout inline
|
45 |
---------------------------------------------*/
|
46 |
-
.rwmb-button-input-list.inline li {
|
47 |
display: inline-block;
|
48 |
}
|
49 |
-
.rwmb-button-input-list.inline li label {
|
50 |
border-left-width: 0;
|
51 |
}
|
52 |
-
.rwmb-button-input-list.inline li:first-child label {
|
53 |
border-left-width: 1px;
|
54 |
}
|
55 |
-
.rwmb-button-input-list.inline li label.selected {
|
56 |
border-right-color: rgb(255, 255, 255);
|
57 |
}
|
58 |
-
.rwmb-button-input-list.inline li:last-child label.selected {
|
59 |
border-right-color: #0073aa;
|
60 |
}
|
61 |
-
.rwmb-button-input-list.inline > li:first-child:not(:last-child) label {
|
62 |
border-top-left-radius: 3px;
|
63 |
border-bottom-left-radius: 3px;
|
64 |
}
|
65 |
-
.rwmb-button-input-list.inline > li:last-child:not(:first-child) label {
|
66 |
border-top-right-radius: 3px;
|
67 |
border-bottom-right-radius: 3px;
|
68 |
}
|
21 |
}
|
22 |
/* Layout not inline
|
23 |
-------------------------------------------------*/
|
24 |
+
.rwmb-button-input-list:not(.rwmb-inline) li label {
|
25 |
border-top-width: 0;
|
26 |
}
|
27 |
+
.rwmb-button-input-list:not(.rwmb-inline) li:first-child label {
|
28 |
border-top-width: 1px;
|
29 |
}
|
30 |
+
.rwmb-button-input-list:not(.rwmb-inline) li label.selected {
|
31 |
border-bottom: 1px solid #fff;
|
32 |
}
|
33 |
+
.rwmb-button-input-list:not(.rwmb-inline) li:last-child label.selected {
|
34 |
border-bottom-color: #0073aa;
|
35 |
}
|
36 |
+
.rwmb-button-input-list:not(.rwmb-inline) > li:first-child:not(:last-child) label {
|
37 |
border-top-left-radius: 3px;
|
38 |
border-top-right-radius: 3px;
|
39 |
}
|
40 |
+
.rwmb-button-input-list:not(.rwmb-inline) > li:last-child:not(:first-child) label {
|
41 |
border-bottom-right-radius: 3px;
|
42 |
border-bottom-left-radius: 3px;
|
43 |
}
|
44 |
/* Layout inline
|
45 |
---------------------------------------------*/
|
46 |
+
.rwmb-button-input-list.rwmb-inline li {
|
47 |
display: inline-block;
|
48 |
}
|
49 |
+
.rwmb-button-input-list.rwmb-inline li label {
|
50 |
border-left-width: 0;
|
51 |
}
|
52 |
+
.rwmb-button-input-list.rwmb-inline li:first-child label {
|
53 |
border-left-width: 1px;
|
54 |
}
|
55 |
+
.rwmb-button-input-list.rwmb-inline li label.selected {
|
56 |
border-right-color: rgb(255, 255, 255);
|
57 |
}
|
58 |
+
.rwmb-button-input-list.rwmb-inline li:last-child label.selected {
|
59 |
border-right-color: #0073aa;
|
60 |
}
|
61 |
+
.rwmb-button-input-list.rwmb-inline > li:first-child:not(:last-child) label {
|
62 |
border-top-left-radius: 3px;
|
63 |
border-bottom-left-radius: 3px;
|
64 |
}
|
65 |
+
.rwmb-button-input-list.rwmb-inline > li:last-child:not(:first-child) label {
|
66 |
border-top-right-radius: 3px;
|
67 |
border-bottom-right-radius: 3px;
|
68 |
}
|
css/input-list.css
CHANGED
@@ -9,12 +9,12 @@
|
|
9 |
list-style: none;
|
10 |
margin-bottom: 0;
|
11 |
}
|
12 |
-
.rwmb-input-list.inline {
|
13 |
line-height: inherit;
|
14 |
}
|
15 |
-
.rwmb-input-list.inline li {
|
16 |
display: inline-block;
|
17 |
}
|
18 |
-
.rwmb-input-list.inline li:not(:last-child) {
|
19 |
margin-right: 20px;
|
20 |
}
|
9 |
list-style: none;
|
10 |
margin-bottom: 0;
|
11 |
}
|
12 |
+
.rwmb-input-list.rwmb-inline {
|
13 |
line-height: inherit;
|
14 |
}
|
15 |
+
.rwmb-input-list.rwmb-inline li {
|
16 |
display: inline-block;
|
17 |
}
|
18 |
+
.rwmb-input-list.rwmb-inline li:not(:last-child) {
|
19 |
margin-right: 20px;
|
20 |
}
|
inc/fields/button-group.php
CHANGED
@@ -29,7 +29,7 @@ class RWMB_Button_Group_Field extends RWMB_Choice_Field {
|
|
29 |
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
|
31 |
$output = sprintf( '<ul class="rwmb-button-input-list %s">',
|
32 |
-
$field['inline'] ? 'inline' : ''
|
33 |
);
|
34 |
$output .= $walker->walk( $options, -1 );
|
35 |
$output .= '</ul>';
|
29 |
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
|
31 |
$output = sprintf( '<ul class="rwmb-button-input-list %s">',
|
32 |
+
$field['inline'] ? ' rwmb-inline' : ''
|
33 |
);
|
34 |
$output .= $walker->walk( $options, -1 );
|
35 |
$output .= '</ul>';
|
inc/fields/input-list.php
CHANGED
@@ -28,9 +28,9 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field {
|
|
28 |
$options = self::transform_options( $field['options'] );
|
29 |
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
$output = self::get_select_all_html( $field );
|
31 |
-
$output .= sprintf( '<ul class="rwmb-input-list
|
32 |
-
$field['collapse'] ? 'collapse' : '',
|
33 |
-
$field['inline'] ? 'inline' : ''
|
34 |
);
|
35 |
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
36 |
$output .= '</ul>';
|
28 |
$options = self::transform_options( $field['options'] );
|
29 |
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
$output = self::get_select_all_html( $field );
|
31 |
+
$output .= sprintf( '<ul class="rwmb-input-list%s%s">',
|
32 |
+
$field['collapse'] ? ' rwmb-collapse' : '',
|
33 |
+
$field['inline'] ? ' rwmb-inline' : ''
|
34 |
);
|
35 |
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
36 |
$output .= '</ul>';
|
inc/fields/select-tree.php
CHANGED
@@ -19,7 +19,7 @@ class RWMB_Select_Tree_Field extends RWMB_Select_Field {
|
|
19 |
public static function html( $meta, $field ) {
|
20 |
$options = self::transform_options( $field['options'] );
|
21 |
$walker = new RWMB_Walker_Select_Tree( $field, $meta );
|
22 |
-
return $walker->walk( $options );
|
23 |
}
|
24 |
|
25 |
/**
|
19 |
public static function html( $meta, $field ) {
|
20 |
$options = self::transform_options( $field['options'] );
|
21 |
$walker = new RWMB_Walker_Select_Tree( $field, $meta );
|
22 |
+
return $options ? $walker->walk( $options ) : '';
|
23 |
}
|
24 |
|
25 |
/**
|
inc/fields/taxonomy.php
CHANGED
@@ -132,6 +132,9 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
|
|
132 |
$meta = wp_get_object_terms( $object_id, $field['taxonomy'], array(
|
133 |
'orderby' => 'term_order',
|
134 |
) );
|
|
|
|
|
|
|
135 |
$meta = wp_list_pluck( $meta, 'term_id' );
|
136 |
|
137 |
return $field['multiple'] ? $meta : reset( $meta );
|
132 |
$meta = wp_get_object_terms( $object_id, $field['taxonomy'], array(
|
133 |
'orderby' => 'term_order',
|
134 |
) );
|
135 |
+
if ( is_wp_error( $meta ) ) {
|
136 |
+
return '';
|
137 |
+
}
|
138 |
$meta = wp_list_pluck( $meta, 'term_id' );
|
139 |
|
140 |
return $field['multiple'] ? $meta : reset( $meta );
|
inc/loader.php
CHANGED
@@ -18,7 +18,7 @@ class RWMB_Loader {
|
|
18 |
*/
|
19 |
protected function constants() {
|
20 |
// Script version, used to add version for scripts and styles.
|
21 |
-
define( 'RWMB_VER', '4.15.
|
22 |
|
23 |
list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
|
24 |
|
18 |
*/
|
19 |
protected function constants() {
|
20 |
// Script version, used to add version for scripts and styles.
|
21 |
+
define( 'RWMB_VER', '4.15.5' );
|
22 |
|
23 |
list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
|
24 |
|
inc/sanitizer.php
CHANGED
@@ -32,9 +32,10 @@ class RWMB_Sanitizer {
|
|
32 |
}
|
33 |
|
34 |
// Custom callback.
|
35 |
-
$
|
36 |
-
foreach ( $
|
37 |
-
|
|
|
38 |
}
|
39 |
}
|
40 |
|
32 |
}
|
33 |
|
34 |
// Custom callback.
|
35 |
+
$methods = array_diff( get_class_methods( __CLASS__ ), array( 'init' ) );
|
36 |
+
foreach ( $methods as $method ) {
|
37 |
+
$type = substr( $method, 9 );
|
38 |
+
add_filter( "rwmb_{$type}_sanitize", array( $this, $method ) );
|
39 |
}
|
40 |
}
|
41 |
|
js/autosave.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
'use strict';
|
3 |
|
4 |
$( document ).ajaxSend( function ( event, xhr, settings ) {
|
5 |
-
if (
|
6 |
return;
|
7 |
}
|
8 |
var inputSelectors = 'input[class*="rwmb"], textarea[class*="rwmb"], select[class*="rwmb"], button[class*="rwmb"], input[name^="nonce_"]';
|
2 |
'use strict';
|
3 |
|
4 |
$( document ).ajaxSend( function ( event, xhr, settings ) {
|
5 |
+
if ( ! Array.isArray( settings.data ) || -1 === settings.data.indexOf( 'wp_autosave' ) ) {
|
6 |
return;
|
7 |
}
|
8 |
var inputSelectors = 'input[class*="rwmb"], textarea[class*="rwmb"], select[class*="rwmb"], button[class*="rwmb"], input[name^="nonce_"]';
|
js/input-list.js
CHANGED
@@ -14,9 +14,9 @@ jQuery( function ( $ ) {
|
|
14 |
}
|
15 |
|
16 |
$( '.rwmb-input' )
|
17 |
-
.on( 'change', '.rwmb-input-list.collapse
|
18 |
-
.on( 'clone', '.rwmb-input-list.collapse
|
19 |
-
$( '.rwmb-input-list.collapse
|
20 |
|
21 |
$( '.rwmb-input-list-select-all-none' ).toggle(
|
22 |
function () {
|
14 |
}
|
15 |
|
16 |
$( '.rwmb-input' )
|
17 |
+
.on( 'change', '.rwmb-input-list.rwmb-collapse input[type="checkbox"]', update )
|
18 |
+
.on( 'clone', '.rwmb-input-list.rwmb-collapse input[type="checkbox"]', update );
|
19 |
+
$( '.rwmb-input-list.rwmb-collapse input[type="checkbox"]' ).each( update );
|
20 |
|
21 |
$( '.rwmb-input-list-select-all-none' ).toggle(
|
22 |
function () {
|
js/media.js
CHANGED
@@ -256,9 +256,9 @@ jQuery( function ( $ ) {
|
|
256 |
this.collection.remove( item );
|
257 |
},
|
258 |
|
259 |
-
resetItemViews: function( items
|
260 |
var that = this;
|
261 |
-
_.each(
|
262 |
that.removeItemView( item );
|
263 |
} );
|
264 |
items.each( function( item ) {
|
256 |
this.collection.remove( item );
|
257 |
},
|
258 |
|
259 |
+
resetItemViews: function( items ){
|
260 |
var that = this;
|
261 |
+
_.each( that.models, function( item ){
|
262 |
that.removeItemView( item );
|
263 |
} );
|
264 |
items.each( function( item ) {
|
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: 4.15.
|
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: 4.15.5
|
7 |
* Author: MetaBox.io
|
8 |
* Author URI: https://metabox.io
|
9 |
* License: GPL2+
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://metabox.io/pricing/
|
|
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.3
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 4.15.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress.
|
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.3
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 4.15.5
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress.
|