Carbon_Fields\Container\Post_Meta_Container::save PHP Method

save() public method

The call is propagated to all fields in the container.
public save ( integer $post_id )
$post_id integer ID of the post against which save() is ran
    public function save($post_id)
    {
        // Unhook action to garantee single save
        remove_action('save_post', array($this, '_save'));
        $this->set_post_id($post_id);
        foreach ($this->fields as $field) {
            $field->set_value_from_input();
            $field->save();
        }
        do_action('carbon_after_save_custom_fields', $post_id);
        do_action('carbon_after_save_post_meta', $post_id);
    }