
| Name | Type | Default | Description. |
|---|---|---|---|
| type | string | 'text' | Controls the field type. |
| id | string | Must be unique to all other options. | |
| title | string | Title of item to be displayed. | |
| subtitle | string | Subtitle of item to be displayed. | |
| desc | string | Description of item to be displayed. | |
| compiler | boolean | false | Flag to run the compiler hook. |
| class | string | Append any number of classes to the field. | |
| required | string/array | Provide the parent and value which affects this field's visibility. | |
| default | string | Default text. | |
| validate | string | Controls the entered validation. | |
| placeholder | string | Message to display when no text is present. | |
| rows | int | 6 | Numbers of text rows to display. |
| allowed_html | array | array of allowed HTML tags. See http://codex.wordpress.org/Function_Reference/wp_kses for more information. |
<?php
$fields = array(
'id'=>'7',
'type' => 'textarea',
'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'html_custom',
'default' => '<p>Some HTML is allowed in here.</p>',
'allowed_html' => array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array()
)
);
?>
$fields = array(
'id'=>'7',
'type' => 'textarea',
'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'html_custom',
'default' => 'Some HTML is allowed in here.
',
'allowed_html' => array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array()
)
);
$fields = array(
'id'=>'7',
'type' => 'textarea',
'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'html_custom',
'default' => 'Some HTML is allowed in here.
',
'allowed_html' => array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array()
)
);
*
* Here is another.
*
* And one more.
*
* @internal This file must be parsable by PHP4.
*
* @package Redux_Framework
* @subpackage Fields
* @access public
* @global $optname
* @internal Internal Note string
* @link http://reduxframework.com
* @method Test
* @name $globalvariablename
* @param string $this->field['test'] This is cool.
* @param string|boolean $field[default] Default value for this field.
* @return Test
* @see ParentClass
* @since Redux 3.0.9
* @todo Still need to fix this!
* @var string cool
* @var int notcool
* @param string[] $options {
* @type boolean $required Whether this element is required
* @type string $label The display name for this element
* }
*
*
*
*/
class ReduxFramework_textarea extends ReduxFramework {
/**
* Field Constructor.
*
* ## Example Declaration:
*
* $fields = array(
* 'id'=>'7',
* 'type' => 'textarea',
* 'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
* 'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
* 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
* 'validate' => 'html_custom',
* 'default' => 'Some HTML is allowed in here.
',
* 'allowed_html' => array(
* 'a' => array(
* 'href' => array(),
* 'title' => array()
* ),
* 'br' => array(),
* 'em' => array(),
* 'strong' => array()
* )
* );
*
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* Example Documentation:
$fields = array(
'id' => 'css_editor',
'type' => 'ace_editor',
'title' => __('CSS Code', 'redux-framework-demo'),
'subtitle' => __('Paste your CSS code here.', 'redux-framework-demo'),
'mode' => 'css',
'theme' => 'monokai',
'desc' => 'Possible modes can be found at http://ace.c9.io/.',
'default' => "#header{\nmargin: 0 auto;\n}"
);
*
* @param $field
*
* | Name | Type | Default | Description. |
|-------------|--------|----------|---------------------------------------------|
| type | string | 'text' | Controls the field type. |
| id | string | | Must be unique to all other options. |
| title | string | | Title of item to be displayed. |
| subtitle | string | | Subtitle of item to be displayed. |
| desc | string | | Description of item to be displayed. |
| compiler | boolean | false | Flag to run the compiler hook. |
| class | string | | Append any number of classes to the field. |
| required | string/array | | Provide the parent and value which affects this field's visibility. |
| default | string | | Default text. |
| validate | string | | Controls the entered validation. |
| placeholder | string | | Message to display when no text is present. |
| rows | int | 6 | Numbers of text rows to display. |
| allowed_html| array | | array of allowed HTML tags. See http://codex.wordpress.org/Function_Reference/wp_kses for more information. |
* @param $value Constructed by Redux class. Based on the passing in $field['defaults'] value and what is stored in the database.
* @param $parent ReduxFramework object is passed for easier pointing.
* @since ReduxFramework 1.0.0
* @type string $field[test] Description. Default