Chyrp

Feathers

Contains various functions, acts as the backbone for all feathers.

Summary
Feathers Contains various functions, acts as the backbone for all feathers.
Variables
$instances Holds all Module instantiations.
$custom_filters Manages named Trigger filters for Feather fields.
$custom_filters Manages custom Feather-provided Trigger filters.
Functions
setFilter Applies a filter to a specified field of the Feather.
customFilter Allows a Feather to apply its own filter to a specified field.
respondTo Allows a Feather to respond to a Trigger as a Module would.
setField Sets the feather’s fields for creating/editing posts with that feather.
bookmarkletSelected If $boolean is true, the Feather that this function is called from will be selected when they open the Bookmarklet.

Variables

$instances

static $instances

Holds all Module instantiations.

$custom_filters

Manages named Trigger filters for Feather fields.

$custom_filters

static $custom_filters

Manages custom Feather-provided Trigger filters.

Functions

setFilter

protected function setFilter( $field,
$name )

Applies a filter to a specified field of the Feather.

customFilter

protected function customFilter( $field,   
$name,   
$priority  =  10 )

Allows a Feather to apply its own filter to a specified field.

respondTo

protected function respondTo( $name,   
$function  =  null,
$priority  =  10 )

Allows a Feather to respond to a Trigger as a Module would.

setField

protected function setField( $options )

Sets the feather’s fields for creating/editing posts with that feather.

Options

attr The technical name for the field.  Think $post->attr.
type The field type.  (text, file, text_block, or select)
label The label for the field.
preview Is this field previewable?
optional Is this field optional?
bookmarklet What to fill this field by in the bookmarklet.
url or page_url The URL of the page they’re viewing when they open the bookmarklet.
title or page_title The title of the page they’re viewing when they open the bookmarklet.
selection Their selection on the page they’re viewing when they open the bookmarklet.
extra Stuff to output after the input field.  Can be anything.
note A minor note to display next to the label text.

bookmarkletSelected

protected function bookmarkletSelected( $boolean  =  true )

If $boolean is true, the Feather that this function is called from will be selected when they open the Bookmarklet.