Application
Table of Contents
Classes
- FontAwesome_Loader
- Loader class, a Singleton. Coordinates potentially multiple installations of the Font Awesome plugin code, and ensures that the latest available semantic version is selected for execution at runtime. Exposes a few public API methods for initialization (activation), deactivation, and uninstallation of plugin code.
- FontAwesome_API_Controller
- Controller class for the plugin's GraphQL API REST endpoint.
- FontAwesome_Exception
- An abstract class defining behavior for most exceptions thrown by this plugin.
- FontAwesome_ServerException
- An abstract parent class for exceptions that should result in an HTTP 500 status.
- FontAwesome_ClientException
- An abstract parent class for exceptions that should result in an HTTP 400 status.
- ApiTokenMissingException
- Thrown when an API Token is required but not found.
- ApiTokenEndpointRequestException
- Thrown when the WordPress server fails to issue a request to the token endpoint on Font Awesome API server.
- ApiTokenInvalidException
- Thrown when the token endpoint on the Font Awesome API server returns an non-200 status when trying to use the configured API Token to get an access_token to use for subsequent API query requests.
- ApiTokenEndpointResponseException
- Thrown when the Font Awesome API server returns a response with an unexpected schema.
- AccessTokenStorageException
- Thrown when there is a failure to write a file on the WordPress server filesystem to store the access_token.
- ConfigSchemaException
- Thrown when an options configuration is attempted that does not pass validation.
- ActivationException
- Thrown when the plugin is activated on a site that does not meet compatibility requirements.
- PreferenceRegistrationException
- Thrown when catching an Error or Exception from a registered theme or plugin.
- ApiRequestException
- Thrown when the WordPress server fails to issue a request to the main query endpoint on Font Awesome API server.
- ApiResponseException
- Thrown when the query endpoint on the Font Awesome API server responds with an unexpected schema. This probably indicates either a programming error in the API server, or a breaking change and this plugin code is out of date.
- ReleaseProviderStorageException
- Thrown when there's a failure to write a transient for storing the Font Awesome releases metadata.
- ReleaseMetadataMissingException
- Thrown when the plugin expects release metadata to be present but isn't for some reason.
- ConfigCorruptionException
- Thrown when attempting front-end page load logic and the options configuration is invalid. This should never happen, since only valid options configurations should ever be stored. If it is thrown it probably means that either there's a programming error in this plugin, or that the state of database has been changed between the time that options would have been valid upon saving and the time that the page load occurs and those options are found to be invalid.
- ConflictDetectionSchemaException
- Thrown when the conflict detection scanner posts data to a REST endpoint and the data has an invalid schema. This would probably indicate a programming error in this plugin.
- ConflictDetectionStorageException
- Thrown when there's a failure to store conflict detection data as a transient.
- ClientPreferencesSchemaException
- Indicates that an incorrect array schema has been provided by a registerd client.
- UpgradeException
- Indicates a problem during upgrade process.
- FontAwesome_REST_Response
- Handles FontAwesome-specific enhancements to a REST response.
- FontAwesome
- Main plugin class, a Singleton. Exposes all API methods and hooks that may be used by client code to register with this plugin, to receive notifications about runtime configuration, or to query the runtime configuration.
Constants
- FONTAWESOME_DIR_PATH = \plugin_dir_path(__FILE__)
- Active Font Awesome plugin installation directory path.
- FONTAWESOME_DIR_URL = \plugin_dir_url(__FILE__)
- FONTAWESOME_MIN_PHP_VERSION = '5.6'
- Minimum PHP VERSION required
- FONTAWESOME_PLUGIN_FILE = 'font-awesome/index.php'
- Name of this plugin's entrypoint file.
Functions
- fa() : mixed
- Convenience global function to get a singleton instance of the main Font Awesome class.
Constants
FONTAWESOME_DIR_PATH
Active Font Awesome plugin installation directory path.
public
mixed
FONTAWESOME_DIR_PATH
= \plugin_dir_path(__FILE__)
The result of plugin_dir_path()
on the defines.php
file for the actively
executing installation of the Font Awesome plugin.
For example, if the example plugin under integrations/plugins/plugin-sigma
in this repo were installed, activated, and its copy of the Font Awesome
plugin were the one selected for execution, then the value of this
constant would be something like this:
/var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/
However, suppose that a second copy of the Font Awesome plugin were installed
from the WordPress plugins directory, and that copy had a later semantic
version than the one bundled by plugin-sigma. In that case, the value
of this constant would look more like this:
/var/www/html/wp-content/plugins/font-awesome/
Tags
FONTAWESOME_DIR_URL
public
mixed
FONTAWESOME_DIR_URL
= \plugin_dir_url(__FILE__)
FONTAWESOME_MIN_PHP_VERSION
Minimum PHP VERSION required
public
mixed
FONTAWESOME_MIN_PHP_VERSION
= '5.6'
Tags
FONTAWESOME_PLUGIN_FILE
Name of this plugin's entrypoint file.
public
mixed
FONTAWESOME_PLUGIN_FILE
= 'font-awesome/index.php'
Relative to the WordPress plugins directory, as would
be used for $plugin
in the
activate_{$plugin}
action hook.
Tags
Functions
fa()
Convenience global function to get a singleton instance of the main Font Awesome class.
fa() : mixed