Forum Replies Created
-
AuthorPosts
-
brandoo
ParticipantI meant that I can do this as a bug report ๐ not a feature request. Sorry if I wasn't clear enough :). The metabox is displayed on options page:
https://ghostbin.com/paste/7wb5y
Updated the plugin and the extension and I still can do this. But only the outer group can be moved to inside group. The nested group is fine.
brandoo
ParticipantI think that new clone should be open by default. At least after clicking to add more. It's strange that user clicks add more and then he gets collapsed group.
brandoo
ParticipantYes but it seams to only work with separate fields (not whole groups) and you still can remove or add more copies.
brandoo
ParticipantSaving and new options works great. Thx.
The editor on the page looks like this:
http://tinypic.com/view.php?pic=2cr39yg&s=9I'm using Windows 10, latest Chrome but I get the same problem in Firefox.
I get this in the console:
Uncaught ReferenceError: Backbone is not defined
at notes-common-v2.js:32
at notes-common-v2.js:158
admin-bar-v2.js:2 Uncaught ReferenceError: _ is not defined
at admin-bar-v2.js:2brandoo
ParticipantI work currently on windows 10 with XAMPP installed, PHP version 7.1.6. WordPress 4.8.
Everything is basically copied from docs. Metabox and extensions are included directly in my plugin files. Metabox 4.12.2 and MB Settings Page 1.3
(I don't know how to format code because the editor here has no buttons)
the field:
$meta_boxes[] = array( 'id' => 'brt-header-scripts', 'title' => __( 'Scripts before </head> tag', 'brt' ), 'settings_pages' => 'brt-scripts', 'fields' => array( array( 'id' => 'brt-head-scripts', 'type' => 'textarea', 'clone' => true, 'sort_clone' => true, 'add_button' => __('Add another', 'brt'), 'attributes' => array( 'style' => 'height:250px', ), ) ) );the setting page:
$settings_pages[] = array( 'id' => 'brt-scripts', 'menu_title' => __( 'Additional scripts', 'brt' ), 'parent' => 'brt-options', );brandoo
ParticipantUpdated to 1.3 but problem still exists. But I changed my code to use wp_unslash and it works fine
brandoo
ParticipantOk, I think this code fixed the issue:
function filter_html_options( $new_value, $old_value ) { array_walk_recursive($new_value, function(&$value) { $value = stripslashes ($value); }); return $new_value; } function plugin_init() { add_filter( 'pre_update_option', 'filter_html_options', 10, 2 ); } add_action( 'init', 'plugin_init' ); -
AuthorPosts