PHP 클래스 _WPLib_WP_Helpers, wplib

Provide a WordPress Helper class for WPLib. Basically, this class contributes static methods to the WPLib class using magic methods.
상속: extends WPLib_Helper_Base
파일 보기 프로젝트 열기: wplib/wplib 1 사용 예제들

공개 메소드들

메소드 설명
current_screen ( ) : WP_Screen Returns the "current screen."
has_query_var ( string $var_name, string | boolean $expected_value = null ) : boolean Return true if a URL query var is not empty and optionally matches an expected value.
is_page ( integer $page_id ) : boolean Is the Front Page configured to display a $post_type='page'?
maybe_make_abspath_relative ( string $filepath ) : string Takes a filepath and potentially returns a relative path (prefixed with '~/'), if $filepath begins with ABSPATH.
on_load ( )

메소드 상세

current_screen() 정적인 공개 메소드

Same as WordPress' get_current_screen() but will call set_current_screen() if is null.
부터: 0.9.9
static public current_screen ( ) : WP_Screen
리턴 WP_Screen

has_query_var() 정적인 공개 메소드

Return true if a URL query var is not empty and optionally matches an expected value.
static public has_query_var ( string $var_name, string | boolean $expected_value = null ) : boolean
$var_name string
$expected_value string | boolean
리턴 boolean

is_page() 정적인 공개 메소드

Is the Front Page configured to display a $post_type='page'?
static public is_page ( integer $page_id ) : boolean
$page_id integer
리턴 boolean

maybe_make_abspath_relative() 정적인 공개 메소드

Takes a filepath and potentially returns a relative path (prefixed with '~/'), if $filepath begins with ABSPATH.
static public maybe_make_abspath_relative ( string $filepath ) : string
$filepath string
리턴 string

on_load() 정적인 공개 메소드

static public on_load ( )