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_limit_rest_view_to_logged_in_users

Only show this box in the CMB2 REST API if the user is logged in.

Package: Demo\CMB2
License: GPL v2.0 (or later)
Located at example-functions.php

Parameters summary

boolean $is_allowed Whether this box and its fields are allowed to be viewed.
CMB2_REST_Controller $cmb_controller <p>The controller object. CMB2 object available via <code>$cmb_controller-&gt;rest_box-&gt;cmb</code>.</p>

Return value summary

boolean Whether this box and its fields are allowed to be viewed.
CMB2 Documentation API documentation generated by ApiGen