- b2evolution CMS User Manual
- Developer Reference
- Technical Reference
- Plugin API for item settings
Plugin API for item settings
Each plugin may set its own settings on each Item/Post. These settings will be stored in the database and can be requested any time, when the Item object is available.
How to set a custom setting:
$Item->set_setting( 'setting_name', $setting_value );
$Item->dbupdate();
Note that no changes are written to the database until you call $Item->dbupdate();
. This is so that you can queue several changes before updating the DB in one single operation.
How to get a custom setting:
$Item->get_setting( 'setting_name' );