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
- Fieldmanager_Context_Storable
- Fieldmanager_Context_Post
Methods summary
public
|
#
__construct( string $title, string|string[] $post_types, string $context = 'normal', string $priority = 'default',
Add a context to a fieldmanager |
public
|
#
meta_box_render_callback( )
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. |
public
void.
|
#
remove_meta_boxes( )
Helper to remove all built-in meta boxes for all specified taxonomies on a post type |
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. |
public
|
#
delegate_save_post( integer $post_id )
Action handler to delegate to appropriate methods when a post is saved. |
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() |
public
|
#
save_fields_for_cron( integer $post_id )
Process fields during a cron request, without saving data since the data isn't changing. |
public
|
#
save_to_post_meta( integer $post_id, array $data = null )
Helper to save an array of data to post meta |
public static
|
#
safe_update_post( mixed $args )
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 |
public
string[]
|
$post_types |
#
What post types to render this meta box |
public
string
|
$context |
#
Context (normal, advanced, or side) |
public
|
$priority |
#
Priority (high, core, default, or low) |
public
|
$fm |
#
Base field |