b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Developer Reference
  3. Plugins
  4. Plugin development
  5. 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' );

Created by asimo • Last edit by fplanque on 2019-06-12 01:00 • •

No feedback yet

On this page

  • How to set a custom setting:
  • How to get a custom setting:

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
    • Website Skins/Themes
    • Email Skins/Themes
    • b2evolution Files
    • Website Integration
    • Plugins
      • Introduction to Plugins
      • Renderer Plugins
      • Plugin development
        • Localizing Plugins
        • Plugin API for item settings
        • Coding Standard Guidelines
        • How to turn plugins on/off
        • How to write a new plugin
        • Creating A Plugin
        • Plugin / Apply Rendering
        • Plugin Documentation
        • Plugins Repository
        • Creating an Antispam Plugin
        • List of Plugin Hooks
      • Plugin / Apply Rendering
      • Widget Plugins
    • Debugging
    • Technical Reference
    • Hacks
    • Credits
    • Development
    • How to... (Customize)
    • Scheduled Tasks Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Community software

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque