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
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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 ( )