PHP Class Awesome_Support

Afficher le fichier Open project: awesome-support/awesome-support Class Usage Examples

Méthodes publiques

Свойство Type Description
$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

Protected Properties

Свойство Type Description
$error null | WP_Error Possible error message.

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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

Method Details

__clone() public méthode

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.
Since: 3.2.5
public __clone ( ) : void
Résultat void

__wakeup() public méthode

Disable unserializing of the class
Since: 3.2.5
public __wakeup ( ) : void
Résultat void

display_error() public méthode

Get all the error messages and display them in the admin notices.
Since: 3.3
public display_error ( ) : void
Résultat void

instance() public static méthode

Instantiate and return the unique Awesome Support object
Since: 3.2.5
public static instance ( ) : object
Résultat object Awesome_Support Unique instance of Awesome Support

load_plugin_textdomain() public méthode

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
Since: 1.0.0
public load_plugin_textdomain ( ) : boolean
Résultat boolean True if the language file was loaded, false otherwise

load_theme_functions() public méthode

Load Awesome Support's theme functions if any
Since: 3.2.0
public load_theme_functions ( ) : void
Résultat void

redirect_to_about() public méthode

Redirect the user to the about page after plugin activation.
public redirect_to_about ( ) : void
Résultat void

remote_notifications() public méthode

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

Property Details

$addons public_oe property

List of registered addons
Since: 3.3
public array $addons
Résultat array

$admin_notices public_oe property

Admin Notices object
Since: 3.1.5
public $admin_notices

$custom_fields public_oe property

Holds the WPAS_Custom_Fields instance
Since: 3.3
public WPAS_Custom_Fields $custom_fields
Résultat WPAS_Custom_Fields

$error protected_oe property

Possible error message.
Since: 3.3
protected null|WP_Error $error
Résultat null | WP_Error

$php_version_required public_oe property

Follow WordPress latest requirements and require PHP version 5.2 at least.
Since: 3.3
public string $php_version_required
Résultat string

$products_sync public_oe property

Only used if there is a compatible e-commerce plugin active
Since: 3.3
public null|WPAS_Product_Sync $products_sync
Résultat null | WPAS_Product_Sync

$session public_oe property

Session object
Since: 3.2.6
public WPAS_Session $session
Résultat WPAS_Session

$wordpress_version_required public_oe property

Minimum version of WordPress required ot run the plugin
Since: 3.3
public string $wordpress_version_required
Résultat string