Support Forum ยป User Profile

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: โœ…Sortable nested groups #8200
    brandoobrandoo
    Participant

    I 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.

    in reply to: About Group Items #7852
    brandoobrandoo
    Participant

    I 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.

    in reply to: โœ…[Request] Force number of clones #6634
    brandoobrandoo
    Participant

    Yes but it seams to only work with separate fields (not whole groups) and you still can remove or add more copies.

    in reply to: Options escaping quotes #6316
    brandoobrandoo
    Participant

    Saving and new options works great. Thx.

    The editor on the page looks like this:
    http://tinypic.com/view.php?pic=2cr39yg&s=9

    I'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:2

    in reply to: Options escaping quotes #6302
    brandoobrandoo
    Participant

    I 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', 
        );
    in reply to: Options escaping quotes #6296
    brandoobrandoo
    Participant

    Updated to 1.3 but problem still exists. But I changed my code to use wp_unslash and it works fine

    in reply to: Options escaping quotes #6284
    brandoobrandoo
    Participant

    Ok, 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' );
Viewing 7 posts - 1 through 7 (of 7 total)