WordPress_Security_Txt

The core plugin class.

This is used to define internationalization, admin-specific hooks, and public-facing site hooks.

Also maintains the unique identifier of this plugin as well as the current version of the plugin.

since 1.0.0
package

WordPress_Security_Txt

subpackage

WordPress_Security_Txt/includes

author

Austin Heap me@austinheap.com

Methods

Define the core functionality of the plugin.

__construct() 

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.

since 1.0.0

Register all of the hooks related to the admin area functionality of the plugin.

define_admin_hooks() 
since 1.0.0
access

private

Register all of the hooks related to the public-facing functionality of the plugin.

define_public_hooks() 
since 1.0.0
access

private

Send event to server for processing.

event( $name,  $version = WORDPRESS_SECURITY_TXT_VERSION) : void
static
since 1.0.0

Arguments

$name

$version

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

get_loader() : \WordPress_Security_Txt_Loader
since 1.0.0

Response

\WordPress_Security_Txt_Loader

Orchestrates the hooks of the plugin.

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

get_plugin_name() : string
since 1.0.0

Response

string

The name of the plugin.

Retrieve the version number of the plugin.

get_version() : string
since 1.0.0

Response

string

The version number of the plugin.

Imports php-security-txt.

import_lib() : void
static
since 1.0.0

Load the required dependencies for this plugin.

load_dependencies() 

Include the following files that make up the plugin:

  • WordPress_Security_Txt_Loader. Orchestrates the hooks of the plugin.
  • WordPress_Security_Txt_i18n. Defines internationalization functionality.
  • WordPress_Security_Txt_Admin. Defines all hooks for the admin area.
  • WordPress_Security_Txt_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.

since 1.0.0
access

private

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

run() 
since 1.0.0

Define the locale for this plugin for internationalization.

set_locale() 

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

since 1.0.0
access

private

Properties

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

loader : \WordPress_Security_Txt_Loader
since
access

protected

var

Maintains and registers all hooks for the plugin.

Type(s)

\WordPress_Security_Txt_Loader

The unique identifier of this plugin.

plugin_name : string
since
access

protected

var

The string used to uniquely identify this plugin.

Type(s)

string

The current version of the plugin.

version : string
since
access

protected

var

The current version of the plugin.

Type(s)

string