CMB2 Documentation
  • Package
  • Function
  • Tree
  • Deprecated
  • Todo
  • Hooks
  • Download Docs
  • Github

Packages

  • CMB2
  • Demo
    • CMB2
  • None
  • Tests
    • CMB2

Functions

  • yourprefix_before_row_if_2
  • yourprefix_display_text_small_column
  • yourprefix_hide_if_no_cats
  • yourprefix_limit_rest_view_to_logged_in_users
  • yourprefix_options_page_message_callback
  • yourprefix_register_about_page_metabox
  • yourprefix_register_demo_metabox
  • yourprefix_register_repeatable_group_field_metabox
  • yourprefix_register_rest_api_box
  • yourprefix_register_taxonomy_metabox
  • yourprefix_register_theme_options_metabox
  • yourprefix_register_user_profile_metabox
  • yourprefix_render_row_cb
  • yourprefix_show_if_front_page

Hooks

  • Hook Reference

Function yourprefix_options_page_message_callback

Callback to define the optionss-saved message.

Package: Demo\CMB2
License: GPL v2.0 (or later)
Type: bool $is_options_page Whether current page is this options page.
Type: bool $should_notify Whether options were saved and we should be notified.
Type: bool $is_updated Whether options were updated with save (or stayed the same).
Type:

string $setting For add_settings_error(), Slug title of the setting to which this error applies.


Type:

string $code For add_settings_error(), Slug-name to identify the error. Used as part of 'id' attribute in HTML output.


Type:

string $message For add_settings_error(), The formatted message text to display to the user (will be shown inside styled <div> and <p> tags). Will be 'Settings updated.' if $is_updated is true, else 'Nothing to update.'


Type:

string $type For add_settings_error(), Message type, controls HTML class. Accepts 'error', 'updated', '', 'notice-warning', etc. Will be 'updated' if $is_updated is true, else 'notice-warning'. }


Located at example-functions.php

Parameters summary

CMB2 $cmb The CMB2 object.
array $args <p>{ An array of message arguments</p>
CMB2 Documentation API documentation generated by ApiGen