PHP 클래스 Awesome_Support

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

공개 프로퍼티들

프로퍼티 타입 설명
$addons array List of registered addons
$admin_notices Admin Notices object
$custom_fields WPAS_Custom_Fields Holds the WPAS_Custom_Fields instance
$php_version_required string Follow WordPress latest requirements and require PHP version 5.2 at least.
$products_sync null | WPAS_Product_Sync Only used if there is a compatible e-commerce plugin active
$session WPAS_Session Session object
$wordpress_version_required string Minimum version of WordPress required ot run the plugin

보호된 프로퍼티들

프로퍼티 타입 설명
$error null | WP_Error Possible error message.

공개 메소드들

메소드 설명
__clone ( ) : void Throw error on object clone
__wakeup ( ) : void Disable unserializing of the class
display_error ( ) : void Display error.
instance ( ) : object Instantiate and return the unique Awesome Support object
load_plugin_textdomain ( ) : boolean Load the plugin text domain for translation.
load_theme_functions ( ) : void Load Awesome Support's theme functions if any
redirect_to_about ( ) : void Redirect to about page.
remote_notifications ( ) : void Check for remote notifications.

비공개 메소드들

메소드 설명
add_error ( string $message ) : void Add error.
dependencies_loaded ( ) : boolean Check if plugin dependencies are present.
includes ( ) : void Include all files used sitewide
includes_admin ( ) : void Include all files used in admin only
init ( ) : void Instantiate the plugin
is_php_version_enough ( ) : boolean Check if the version of PHP is compatible with this addon.
is_version_compatible ( ) : boolean Check if the core version is compatible with this addon.
maybe_setup ( ) Plugin setup.
setup_constants ( ) : void Setup all plugin constants

메소드 상세

__clone() 공개 메소드

The whole idea of the singleton design pattern is that there is a single object therefore, we don't want the object to be cloned.
부터: 3.2.5
public __clone ( ) : void
리턴 void

__wakeup() 공개 메소드

Disable unserializing of the class
부터: 3.2.5
public __wakeup ( ) : void
리턴 void

display_error() 공개 메소드

Get all the error messages and display them in the admin notices.
부터: 3.3
public display_error ( ) : void
리턴 void

instance() 공개 정적인 메소드

Instantiate and return the unique Awesome Support object
부터: 3.2.5
public static instance ( ) : object
리턴 object Awesome_Support Unique instance of Awesome Support

load_plugin_textdomain() 공개 메소드

With the introduction of plugins language packs in WordPress loading the textdomain is slightly more complex. We now have 3 steps: 1. Check for the language pack in the WordPress core directory 2. Check for the translation file in the plugin's language directory 3. Fallback to loading the textdomain the classic way
부터: 1.0.0
public load_plugin_textdomain ( ) : boolean
리턴 boolean True if the language file was loaded, false otherwise

load_theme_functions() 공개 메소드

Load Awesome Support's theme functions if any
부터: 3.2.0
public load_theme_functions ( ) : void
리턴 void

redirect_to_about() 공개 메소드

Redirect the user to the about page after plugin activation.
public redirect_to_about ( ) : void
리턴 void

remote_notifications() 공개 메소드

Use the Remote Dashboard Notifications plugin to check for possible notifications from http://getawesomesupport.com
public remote_notifications ( ) : void
리턴 void

프로퍼티 상세

$addons 공개적으로 프로퍼티

List of registered addons
부터: 3.3
public array $addons
리턴 array

$admin_notices 공개적으로 프로퍼티

Admin Notices object
부터: 3.1.5
public $admin_notices

$custom_fields 공개적으로 프로퍼티

Holds the WPAS_Custom_Fields instance
부터: 3.3
public WPAS_Custom_Fields $custom_fields
리턴 WPAS_Custom_Fields

$error 보호되어 있는 프로퍼티

Possible error message.
부터: 3.3
protected null|WP_Error $error
리턴 null | WP_Error

$php_version_required 공개적으로 프로퍼티

Follow WordPress latest requirements and require PHP version 5.2 at least.
부터: 3.3
public string $php_version_required
리턴 string

$products_sync 공개적으로 프로퍼티

Only used if there is a compatible e-commerce plugin active
부터: 3.3
public null|WPAS_Product_Sync $products_sync
리턴 null | WPAS_Product_Sync

$session 공개적으로 프로퍼티

Session object
부터: 3.2.6
public WPAS_Session $session
리턴 WPAS_Session

$wordpress_version_required 공개적으로 프로퍼티

Minimum version of WordPress required ot run the plugin
부터: 3.3
public string $wordpress_version_required
리턴 string