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.
파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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