PHP 클래스 WC_Admin_Settings

파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
add_error ( string $text ) Add an error.
add_message ( string $text ) Add a message.
check_download_folder_protection ( ) Checks which method we're using to serve downloads.
get_field_description ( array $value ) : array Helper function to get the formated description and tip HTML for a given form field. Plugins can call this when implementing their own custom settings types.
get_option ( mixed $option_name, $default = '' ) : string Get a setting from the settings API.
get_settings_pages ( ) Include the settings page classes.
output ( ) Settings page.
output_fields ( array $options ) Output admin fields.
save ( ) Save the settings.
save_fields ( array $options, array $data = null ) : boolean Save admin fields.
show_messages ( ) : string Output messages + errors.

메소드 상세

add_error() 공개 정적인 메소드

Add an error.
public static add_error ( string $text )
$text string

add_message() 공개 정적인 메소드

Add a message.
public static add_message ( string $text )
$text string

check_download_folder_protection() 공개 정적인 메소드

If using force or x-sendfile, this ensures the .htaccess is in place.

get_field_description() 공개 정적인 메소드

Helper function to get the formated description and tip HTML for a given form field. Plugins can call this when implementing their own custom settings types.
public static get_field_description ( array $value ) : array
$value array The form field value array
리턴 array The description and tip as a 2 element array

get_option() 공개 정적인 메소드

Get a setting from the settings API.
public static get_option ( mixed $option_name, $default = '' ) : string
$option_name mixed
리턴 string

get_settings_pages() 공개 정적인 메소드

Include the settings page classes.
public static get_settings_pages ( )

output() 공개 정적인 메소드

Handles the display of the main woocommerce settings page in admin.
public static output ( )

output_fields() 공개 정적인 메소드

Loops though the woocommerce options array and outputs each field.
public static output_fields ( array $options )
$options array Opens array to output

save() 공개 정적인 메소드

Save the settings.
public static save ( )

save_fields() 공개 정적인 메소드

Loops though the woocommerce options array and outputs each field.
public static save_fields ( array $options, array $data = null ) : boolean
$options array Options array to output
$data array Optional. Data to use for saving. Defaults to $_POST.
리턴 boolean

show_messages() 공개 정적인 메소드

Output messages + errors.
public static show_messages ( ) : string
리턴 string