Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// Get the ID for a Model
$id = $model->get_id();
// Get a single setting for a Model by key
$setting = $model->get_setting( 'key' );
// Get all settings for a model
$settings = $model->get_settings();
// Get extra data stored with a submission.
$more_data = $model->get_extra_value( 'more_data' );
// Update a single setting for a model and save
$model->update_setting( 'key', 'value' )->save();
// Update an array of settings for a mdoel and save
$model->update_settings( $settings )->save();
// Delete a model
$model->delete();
// Save changes to a model
$model->save();
@dkomando

This comment has been minimized.

Copy link

@dkomando dkomando commented Jun 18, 2020

You have a small misspelling on one of your descriptions.
Line 18:
// Update an array of settings for a mdoel and save

// Update an array of settings for a model and save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.