PHP Класс Crunion_Contact_Form_Shortcode, jetpack

Does nothing other than store structured data and output the shortcode as a string Not very general - specific to Grunion.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$attributes key => value pairs for the shortcode's attributes: [$shortcode_name key="value" ... /]
$body The HTML of the parsed inner "child" shortcodes". Null for selfclosing shortcodes.
$content Null for selfclosing shortcodes. Hhe inner content of otherwise: [$shortcode_name]$content[/$shortcode_name]
$defaults key => value pair for attribute defaults
$fields Associative array of inner "child" shortcodes equivalent to the $content: [$shortcode_name][child 1/][child 2/][/$shortcode_name]
$shortcode_name the name of the shortcode: [$shortcode_name /]

Открытые методы

Метод Описание
__construct ( array $attributes, null | string $content = null )
__toString ( ) Generates the shortcode
esc_attr ( $value )
get_attribute ( string $key ) : mixed Returns the value of the requested attribute.
parse_content ( string $content ) Processes the shortcode's inner content for "child" shortcodes
unesc_attr ( $value )

Описание методов

__construct() публичный Метод

public __construct ( array $attributes, null | string $content = null )
$attributes array An associative array of shortcode attributes. @see shortcode_atts()
$content null | string Null for selfclosing shortcodes. The inner content otherwise.

__toString() публичный Метод

Generates the shortcode
public __toString ( )

esc_attr() публичный Метод

public esc_attr ( $value )

get_attribute() публичный Метод

Returns the value of the requested attribute.
public get_attribute ( string $key ) : mixed
$key string The attribute to retrieve
Результат mixed

parse_content() публичный Метод

Processes the shortcode's inner content for "child" shortcodes
public parse_content ( string $content )
$content string The shortcode's inner content: [shortcode]$content[/shortcode]

unesc_attr() публичный Метод

public unesc_attr ( $value )

Описание свойств

$attributes публичное свойство

key => value pairs for the shortcode's attributes: [$shortcode_name key="value" ... /]
public $attributes

$body публичное свойство

The HTML of the parsed inner "child" shortcodes". Null for selfclosing shortcodes.
public $body

$content публичное свойство

Null for selfclosing shortcodes. Hhe inner content of otherwise: [$shortcode_name]$content[/$shortcode_name]
public $content

$defaults публичное свойство

key => value pair for attribute defaults
public $defaults

$fields публичное свойство

Associative array of inner "child" shortcodes equivalent to the $content: [$shortcode_name][child 1/][child 2/][/$shortcode_name]
public $fields

$shortcode_name публичное свойство

the name of the shortcode: [$shortcode_name /]
public $shortcode_name