Class Fieldmanager_Datasource_Post
Datasource to populate autocomplete and option fields with WordPress Posts.
- Fieldmanager_Datasource
- Fieldmanager_Datasource_Post
Methods summary
public
|
|
public
string
|
|
public
array
|
|
public
string
|
#
get_ajax_action( )
Get an action to register by hashing (non cryptographically for speed) the options that make this datasource unique. |
public
|
#
title_like( mixed $where, mixed & $wp_query )
Perform a LIKE search on post_title, since 's' in WP_Query is too fuzzy when trying to autocomplete a title |
public
string
|
#
presave_alter_values(
For post relationships, delete reciprocal post metadata prior to saving (presave will re-add) |
public
string
|
#
presave(
Handle reciprocal postmeta and post parents |
public
|
#
presave_status_transition(
Handle any actions based on the parent's status transition |
public
array
|
#
preload_alter_values(
Preload alter values for post parent The post datasource can store data outside FM's array. This is how we add it back into the array for editing. |
public
string
|
|
public
string
|
Methods inherited from Fieldmanager_Datasource
autocomplete_search()
,
get_items_for_ajax()
Magic methods summary
Properties summary
public
mixed
|
$query_callback |
#
Supply a function which returns a list of posts; takes one argument, a possible fragment |
public
array
|
$query_args |
#
Arguments to get_posts(), which uses WP's defaults, plus suppress_filters = False, which can be overriden by setting suppress_filters = True here. |
public
boolean
|
$use_ajax |
#
Allow AJAX. If set to false, Autocomplete will pre-load get_items() with no fragment, so False could cause performance problems. |
public
string|Null
|
$reciprocal |
#
If not empty, set this post's ID as a value on the linked post. This is used to establish two-way relationships. |
public
boolean
|
$show_date |
#
Display the post publish date in the typeahead menu. |
public
string
|
$date_format |
#
If $show_date is true, the format to use for displaying the date. |
public
boolean
|
$publish_with_parent |
#
Publish the child post when/if the parent is published. |
public
boolean
|
$save_to_post_parent |
#
Save to post parent |
public
boolean
|
$only_save_to_post_parent |
#
Only save to post parent |
Properties inherited from Fieldmanager_Datasource
$ajax_action
,
$allow_optgroups
,
$counter
,
$grouped
,
$options
,
$options_callback