PHP 클래스 Jetpack_Contact_Info_Widget, jetpack

상속: extends WP_Widget
파일 보기 프로젝트 열기: automattic/jetpack

공개 메소드들

메소드 설명
__construct ( ) Constructor
build_map ( $address, $api_key = null ) : string Builds map display HTML code from the supplied latitude and longitude.
build_map_link ( string $address ) : string Generate a Google Maps link for the supplied address.
defaults ( ) : array Return an associative array of default values
enqueue_scripts ( ) Enqueue scripts and styles.
form ( array $instance ) : void Displays the form for this widget on the Widgets page of the WP Admin area.
has_good_map ( array $instance ) : boolean Check if the instance has a valid Map location.
update ( array $new_instance, array $old_instance ) : array Deals with the settings when they are saved by the admin. Here is where any validation should be dealt with.
urlencode_address ( string $address ) : string Encode an URL
widget ( array $args, array $instance ) : void Outputs the HTML for this widget.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

build_map() 공개 메소드

Builds map display HTML code from the supplied latitude and longitude.
public build_map ( $address, $api_key = null ) : string
리턴 string HTML of the map

defaults() 공개 메소드

These values are used in new widgets.
public defaults ( ) : array
리턴 array Array of default values for the Widget's options

enqueue_scripts() 공개 메소드

Enqueue scripts and styles.
public enqueue_scripts ( )

form() 공개 메소드

Displays the form for this widget on the Widgets page of the WP Admin area.
public form ( array $instance ) : void
$instance array Instance configuration.
리턴 void

has_good_map() 공개 메소드

Check if the instance has a valid Map location.
public has_good_map ( array $instance ) : boolean
$instance array Widget instance configuration.
리턴 boolean Whether or not there is a valid map.

update() 공개 메소드

Deals with the settings when they are saved by the admin. Here is where any validation should be dealt with.
public update ( array $new_instance, array $old_instance ) : array
$new_instance array New configuration values
$old_instance array Old configuration values
리턴 array

urlencode_address() 공개 메소드

Encode an URL
public urlencode_address ( string $address ) : string
$address string The URL to encode
리턴 string The encoded URL

widget() 공개 메소드

Outputs the HTML for this widget.
public widget ( array $args, array $instance ) : void
$args array An array of standard parameters for widgets in this theme
$instance array An array of settings for this widget instance
리턴 void Echoes it's output