\lloc\MslsMslsMetaBox

Meta box for the edit mode of the (custom) post types

Summary

Methods
Properties
Constants
__construct()
init()
debugger()
get_input_array()
is_autosave()
verify_nonce()
delete()
suggest()
add()
render_select()
render_input()
set()
maybe_set_linked_post()
No public properties found
No constants found
get_input_value()
save()
$options
$collection
N/A
No private methods found
No private properties found
N/A

Properties

Methods

debugger()

debugger(mixed  $message) 

Prints a message in the error log if WP_DEBUG is true

Parameters

mixed $message

get_input_array()

get_input_array(integer  $object_id) : array

Get the input array

Parameters

integer $object_id

Returns

array

is_autosave()

is_autosave(integer  $post_id) : boolean

Checks if the current input comes from the autosave-functionality

Parameters

integer $post_id

Returns

boolean

verify_nonce()

verify_nonce() : boolean

Checks for the nonce in the INPUT_POST

Returns

boolean

delete()

delete(integer  $object_id) 

Delete

Parameters

integer $object_id

suggest()

suggest() 

Suggest

Echo a JSON-ified array of posts of the given post-type and the requested search-term and then die silently

add()

add() 

Add

render_select()

render_select() 

Render the classic select-box

render_input()

render_input(boolean  $echo = true) 

Render the suggest input-field

Parameters

boolean $echo

Whether the metabox markup should be echoed to the page or not.

set()

set(integer  $post_id) 

Set

Parameters

integer $post_id

maybe_set_linked_post()

maybe_set_linked_post(\lloc\Msls\MslsOptionsPost  $mydata) : \lloc\Msls\MslsOptionsPost

Sets the selected element in the data from the `$_GET` superglobal, if any.

Parameters

\lloc\Msls\MslsOptionsPost $mydata

Returns

\lloc\Msls\MslsOptionsPost

get_input_value()

get_input_value(  $key,   $value) : array

Prepare input key/value-pair

Parameters

$key
$value

Returns

array

save()

save(integer  $object_id, string  $class) 

Save

Parameters

integer $object_id
string $class