RW_Meta_Box::show PHP Method

show() public method

Callback function to show fields in meta box
public show ( )
    public function show()
    {
        $saved = $this->is_saved();
        // Container
        printf('<div class="rwmb-meta-box" data-autosave="%s">', $this->meta_box['autosave'] ? 'true' : 'false');
        wp_nonce_field("rwmb-save-{$this->meta_box['id']}", "nonce_{$this->meta_box['id']}");
        // Allow users to add custom code before meta box content
        // 1st action applies to all meta boxes
        // 2nd action applies to only current meta box
        do_action('rwmb_before', $this);
        do_action("rwmb_before_{$this->meta_box['id']}", $this);
        foreach ($this->fields as $field) {
            RWMB_Field::call('show', $field, $saved);
        }
        // Allow users to add custom code after meta box content
        // 1st action applies to all meta boxes
        // 2nd action applies to only current meta box
        do_action('rwmb_after', $this);
        do_action("rwmb_after_{$this->meta_box['id']}", $this);
        // End container
        echo '</div>';
    }