Fieldmanager
  • Package
  • Class
  • Tree
  • Todo

Packages

  • Fieldmanager
    • Context
    • Datasource
    • Field
    • Util
  • None

Classes

  • Fieldmanager_Context
  • Fieldmanager_Context_Page
  • Fieldmanager_Context_Post
  • Fieldmanager_Context_QuickEdit
  • Fieldmanager_Context_Storable
  • Fieldmanager_Context_Submenu
  • Fieldmanager_Context_Term
  • Fieldmanager_Context_User

Class Fieldmanager_Context_Post

Use fieldmanager to create meta boxes on the new/edit post screen and save data primarily to post meta.

Fieldmanager_Context
Extended by Fieldmanager_Context_Storable
Extended by Fieldmanager_Context_Post
Package: Fieldmanager\Context
Located at context/class-fieldmanager-context-post.php

Methods summary

public
# __construct( string $title, string|string[] $post_types, string $context = 'normal', string $priority = 'default', Fieldmanager_Field $fm = Null )

Add a context to a fieldmanager

Add a context to a fieldmanager

Parameters

$title
string
$title
$post_types
string|string[]
$post_types
$context
string
$context (normal, advanced, or side)
$priority
string
$priority (high, core, default, or low)
$fm
Fieldmanager_Field
$fm
public
# meta_box_render_callback( )

admin_init callback to add meta boxes to content types Registers render_meta_box()

admin_init callback to add meta boxes to content types Registers render_meta_box()

public void.
# render_meta_box( mixed $post, mixed $form_struct = null )

Helper to attach element_markup() to add_meta_box(). Prints markup for post editor.

Helper to attach element_markup() to add_meta_box(). Prints markup for post editor.

Parameters

$post
mixed
$post the post object.
$form_struct
mixed
$form_struct the structure of the form itself. Unused.

Returns

void.

See

http://codex.wordpress.org/Function_Reference/add_meta_box
public void.
# remove_meta_boxes( )

Helper to remove all built-in meta boxes for all specified taxonomies on a post type

Helper to remove all built-in meta boxes for all specified taxonomies on a post type

Returns

void.
public
# save_fields_for_attachment( array $post, array $attachment )

Handles saving Fieldmanager data when the custom meta boxes are used on an attachment. Calls save_fields_for_post with the post ID.

Handles saving Fieldmanager data when the custom meta boxes are used on an attachment. Calls save_fields_for_post with the post ID.

Parameters

$post
array
$post The post fields
$attachment
array
$attachment The attachment fields
public
# delegate_save_post( integer $post_id )

Action handler to delegate to appropriate methods when a post is saved.

Action handler to delegate to appropriate methods when a post is saved.

Parameters

$post_id
integer
$post_id
public
# save_fields_for_post( integer $post_id )

Takes $_POST data and saves it to, calling save_to_post_meta() once validation is passed When using Fieldmanager as an API, do not call this function directly, call save_to_post_meta()

Takes $_POST data and saves it to, calling save_to_post_meta() once validation is passed When using Fieldmanager as an API, do not call this function directly, call save_to_post_meta()

Parameters

$post_id
integer
$post_id
public
# save_fields_for_cron( integer $post_id )

Process fields during a cron request, without saving data since the data isn't changing.

Process fields during a cron request, without saving data since the data isn't changing.

Parameters

$post_id
integer
$post_id
public
# save_to_post_meta( integer $post_id, array $data = null )

Helper to save an array of data to post meta

Helper to save an array of data to post meta

Parameters

$post_id
integer
$post_id
$data
array
$data
public static
# safe_update_post( mixed $args )

Helper for fieldmanager internals to save a post without worrying about infinite loops

Helper for fieldmanager internals to save a post without worrying about infinite loops

Magic methods summary

Properties summary

public string $title
#

Title of meta box

Title of meta box

public string[] $post_types
#

What post types to render this meta box

What post types to render this meta box

public string $context
#

Context (normal, advanced, or side)

Context (normal, advanced, or side)

public Fieldmanager_Context_Post::$priority $priority
#

Priority (high, core, default, or low)

Priority (high, core, default, or low)

public Fieldmanager_Group $fm
#

Base field

Base field

Properties inherited from Fieldmanager_Context_Storable

$taxonomies_to_save

Properties inherited from Fieldmanager_Context

$save_keys, $uniqid

Fieldmanager API documentation generated by ApiGen 2.8.0