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. Back-office Reference
  3. Collections
  4. Contents
  5. Post Concepts
  6. 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
    • Site
    • Collections
      • Collection Dashboard
      • Contents
        • Post Browsing Screens
        • Post Edit Screen
        • Short Tags Reference
        • Post Concepts
          • Front & Back-Office Edit Screens
          • Image / Attachment Positions
          • Visibility statuses
          • Intro and Featured Posts
          • Post Views Counting
          • HTML Validator
          • My users do not have access to the files section / upload
          • Plugin API for item settings
          • Workflow Panel
          • Intro Post
        • Mass Edit
        • Mass Post Contents
        • Other post actions
        • Renderers Reference
      • Comments
      • Categories
      • Features
      • Skins
      • Widgets
      • Settings
      • Creating a new collection
    • Files
    • Analytics
    • Users
    • Messages
    • Emails
    • System
    • Working with Results Tables
  • Developer 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