\Als

Core plugin class

Summary

Methods
Properties
Constants
__construct()
run()
get_plugin_name()
get_loader()
get_version()
No public properties found
No constants found
No protected methods found
$loader
$plugin_name
$version
N/A
load_dependencies()
set_locale()
No private properties found
N/A

Properties

$loader

$loader : \Als

The loader that's responsible for maintaining and registering all hooks that power the plugin.

Type

\Als — Maintains and registers all hooks for the plugin.

$plugin_name

$plugin_name : string

The unique identifier of this plugin.

Type

string — The string used to uniquely identify this plugin.

$version

$version : string

The current version of the plugin.

Type

string — The current version of the plugin.

Methods

__construct()

__construct() 

Define the core functionality of the plugin.

Set the plugin name and the plugin version that can be used throughout the plugin. Load the dependencies, define the locale, and set the hooks for the admin area and the public-facing side of the site.

run()

run() 

Run the loader to execute all of the hooks with WordPress.

get_plugin_name()

get_plugin_name() : string

The name of the plugin used to uniquely identify it within the context of WordPress and to define internationalization functionality.

Returns

string —

The name of the plugin.

get_loader()

get_loader() : \Als_Loader

The reference to the class that orchestrates the hooks with the plugin.

Returns

\Als_Loader

Orchestrates the hooks of the plugin.

get_version()

get_version() : string

Retrieve the version number of the plugin.

Returns

string —

The version number of the plugin.

load_dependencies()

load_dependencies() 

Load the required dependencies for this plugin.

Include the following files that make up the plugin:

  • Als_Loader. Orchestrates the hooks of the plugin.
  • Als_i18n. Defines internationalization functionality.
  • Als_Admin. Defines all hooks for the admin area.
  • Als_Public. Defines all hooks for the public side of the site.

Create an instance of the loader which will be used to register the hooks with WordPress.

set_locale()

set_locale() 

Define the locale for this plugin for internationalization.

Uses the Als_i18n class in order to set the domain and to register the hook with WordPress.