UIX Documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • None
  • uix
    • data
    • ui
      • control

Classes

  • box
  • control
  • footer
  • grid
  • header
  • help
  • metabox
  • modal
  • notice
  • page
  • panel
  • post_type
  • repeat
  • section
  • uix

Class metabox

Metabox class for adding metaboxes to post types in the post editor

uix\ui\uix
Extended by uix\data\data
Extended by uix\ui\panel
Extended by uix\ui\metabox
Namespace: uix\ui
Package: uix\ui
Author: David Cramer
Located at classes/uix/ui/metabox.php

Methods summary

protected
# actions( )

setup actions and hooks to add metaboxes and save metadata

setup actions and hooks to add metaboxes and save metadata

Since

1.0.0

Overrides

uix\ui\uix::actions
public
# setup( )

Setup submission data

Setup submission data

Since

1.0.0

Overrides

uix\data\data::setup
public
# set_assets( )

set metabox styles

set metabox styles

Since

1.0.0

See

uix\ui\uix

Overrides

uix\ui\panel::set_assets
protected
# enqueue_active_assets( )

Enqueues specific tabs assets for the active pages

Enqueues specific tabs assets for the active pages

Since

1.0.0

Overrides

uix\ui\panel::enqueue_active_assets
protected
# chromeless( )

Writes script required to make a metabox chromeless

Writes script required to make a metabox chromeless

Since

1.0.0
public
# set_active_status( screen $screen )

Checks the screen object to determin if the metabox should load assets

Checks the screen object to determin if the metabox should load assets

Parameters

$screen
The current screen object;

Since

1.0.0

Uses

"current_screen" hook
public
# add_metaboxes( )

Add metaboxes to screen

Add metaboxes to screen

Since

1.0.0

Uses

"add_meta_boxes" hook
public
# create_metabox( wp_post $post )

Callback for the add_meta_box that sets the metabox data and renders it

Callback for the add_meta_box that sets the metabox data and renders it

Parameters

$post
Current post for the metabox

Since

1.0.0

Uses

"add_meta_box" function
public string
# render( )

Render the Metabox

Render the Metabox

Returns

string
HTML of rendered metabox

Since

1.0.0

Overrides

uix\ui\panel::render
public
# save_meta( integer $post_id, wp_post $post )

Saves a metabox data

Saves a metabox data

Parameters

$post_id
ID of the current post being saved
$post
Current post being saved

Since

1.0.0

Uses

"save_post" hook
public
# is_active( )

Determin which metaboxes are used for the current screen and set them active

Determin which metaboxes are used for the current screen and set them active

Since

1.0.0

Overrides

uix\ui\uix::is_active

Methods inherited from uix\ui\panel

child_count(), description(), get_data(), is_section_object(), label(), navigation(), panel_section(), render_template(), set_data(), wrapper_class_names()

Methods inherited from uix\ui\uix

__call(), __construct(), base_color(), build_attributes(), enqueue_core(), id(), init(), process_child(), process_children(), register(), render_children(), set_attributes(), set_url()

Properties summary

public string $type

The type of object

The type of object

Since

1.0.0
# 'metabox'
public WP_Post $post

Holds the current post object

Holds the current post object

Since

1.0.0
# null
public boolean $is_active

Status of the metabox to determin if assets should be loaded

Status of the metabox to determin if assets should be loaded

Since

1.0.0
# false

Properties inherited from uix\data\data

$data

Properties inherited from uix\ui\uix

$assets, $attributes, $child, $parent, $scripts, $slug, $struct, $styles, $url

UIX Documentation API documentation generated by ApiGen