Properties

$version

$version : string

Type

string — Class version.

$post_type

$post_type : object

Type

object — The Fluent Framework Post Type object

$metaboxes

$metaboxes : object

Type

object — The Fluent Framework Metabox object

$domain

$domain : string

Type

string — Class text domain.

$url

$url : string

Type

string — fluent url.

$args

$args : array

Type

array — Class args to be run attached after <code>parse_args</code>.

$metaboxes_sections

$metaboxes_sections : string

Type

string — - contains all of the sections for the demo metaboxes

$metaboxes_args

$metaboxes_args : string

Type

string — - contains all of the arguments for the demo metaboxes

Methods

__construct()

__construct() : \none

Function loaded on class creation

Returns

\none

parent_dropdown()

parent_dropdown( $attributes,  $post) : array

Prevent articles being added as parents, we operate 2 levels deep.

Parameters

$attributes
$post

Returns

array —

$atributes

alter_admin_title()

alter_admin_title() : \none

load js to change the "edit" title on posts from documentation to section or article depending on the parent value.

Returns

\none

admin_view_buttons()

admin_view_buttons( $return,  $id,  $new_title,  $new_slug)

Parameters

$return
$id
$new_title
$new_slug

admin_view_links()

admin_view_links( $actions,  $post)

Parameters

$actions
$post

force_top_level_parent()

force_top_level_parent() : \none

prevent sections are articles being viewed globally.

Returns

\none

add_shortcode()

add_shortcode( $content) : \none

Add shortcode to content on documentation page to prevent the need to do it as you would on custom pages.

Parameters

$content

Returns

\none

parse_args()

parse_args(array $a, array $b, string $filter) : array

Recursive array merging from a default and supplied array.

Very similar function to wp_parse_args except it filters through the whole array tree.

Parameters

array $a

supplied value array.

array $b

default value array.

string $filter

optionally run the array through apply_filters before returning.

Returns

array

provide()

provide(string $key) : array

The provide function is just a shorthand wrapper for suppling a class object and method as array in WordPress actions and filters.

Parameters

string $key

the method name to be added to the array: array( &$this, $key ).

Returns

array

random_string()

random_string(string $length) : string

Helper function used inside the <code>guid()</code> function to generate random strings.

Parameters

string $length

the number of characters to return.

Returns

string

guid()

guid() : string

Guid function used to reformat array index values before sedning them to the fields.

Simply replicates the behaviour found in framework javascript.

Returns

string

setup_metaboxes_sections()

setup_metaboxes_sections() : \none

Sets up the metabox sections for docs

Returns

\none

setup_metaboxes_args()

setup_metaboxes_args() : \none

Sets up the metabox args for docs

Returns

\none

default_args()

default_args() : array

Function used across extended classes used in conjunction with <code>parse_args</code> to format supplied arrays and ensure all keys are supplied.

Returns

array