General
in package
Class provide all public-facing functionality of the plugin.
Defines the plugin name, version, and enqueues all public-facing stylesheets and JavaScript.
Tags
Table of Contents
- $alternative_tooltips_enabled : bool
- Allows to determine whether alternative tooltips are enabled.
- $amp_enabled : bool
- Allows to determine whether AMP compatibility mode is enabled.
- $script_mode : string
- Allows to determine the script mode among jQuery or plain JS.
- $task : Parser|null
- The footnote parser.
- $tooltips_enabled : bool
- Flag for using tooltips.
- $plugin_name : string
- The ID of this plugin.
- $reference_container_widget : Reference_Container
- The reference container widget.
- $settings : Settings
- The plugin settings object.
- $version : string
- The version of this plugin.
- __construct() : mixed
- Initialize the class and set its properties.
- enqueue_scripts() : void
- Register the JavaScript for the public-facing side of the site.
- enqueue_styles() : void
- Register the stylesheets for the public-facing side of the site.
- register_widgets() : void
- Register the widget(s) for the public-facing side of the site.
- load_dependencies() : void
- Load the required public-facing dependencies.
Properties
$alternative_tooltips_enabled
Allows to determine whether alternative tooltips are enabled.
public
static bool
$alternative_tooltips_enabled
= false
Tags
$amp_enabled
Allows to determine whether AMP compatibility mode is enabled.
public
static bool
$amp_enabled
= false
Tags
$script_mode
Allows to determine the script mode among jQuery or plain JS.
public
static string
$script_mode
= 'js'
‘js’ to use plain JavaScript, ‘jquery’ to use jQuery.
Tags
$task
The footnote parser.
public
Parser|null
$task
= null
The Plugin task.
Tags
$tooltips_enabled
Flag for using tooltips.
public
static bool
$tooltips_enabled
= false
Whether tooltips are enabled or not.
Tags
$plugin_name
The ID of this plugin.
private
string
$plugin_name
Tags
$reference_container_widget
The reference container widget.
private
Reference_Container
$reference_container_widget
The reference container widget
Tags
$settings
The plugin settings object.
private
Settings
$settings
Tags
$version
The version of this plugin.
private
string
$version
Tags
Methods
__construct()
Initialize the class and set its properties.
public
__construct(string $plugin_name, string $version, Settings $settings) : mixed
Parameters
- $plugin_name : string
-
The name of this plugin.
- $version : string
-
The version of this plugin.
- $settings : Settings
Tags
Return values
mixed —enqueue_scripts()
Register the JavaScript for the public-facing side of the site.
public
enqueue_scripts() : void
Tags
Return values
void —enqueue_styles()
Register the stylesheets for the public-facing side of the site.
public
enqueue_styles() : void
Enables enqueuing the formatted individual stylesheets if PRODUCTION_ENV
is true
.
Tags
Return values
void —register_widgets()
Register the widget(s) for the public-facing side of the site.
public
register_widgets() : void
Tags
Return values
void —load_dependencies()
Load the required public-facing dependencies.
private
load_dependencies() : void
Include the following files that provide the public-facing functionality of this plugin:
- Parser: parses Posts and Pages for footnote shortcodes; and
- Reference_Container: defines the Reference Container widget.