WordPress_Security_Txt_Admin

The admin-specific functionality of the plugin.

Defines the plugin name, version, and hooks for the admin-specific stylesheet and JavaScript.

package

WordPress_Security_Txt

subpackage

WordPress_Security_Txt/admin

author

Austin Heap me@austinheap.com

Methods

Initialize the class and set its properties.

__construct(string $plugin_name, string $version) 
since 1.0.0

Arguments

$plugin_name

string

The name of this plugin.

$version

string

The version of this plugin.

Add an options page under the Settings submenu

add_options_page() 
since 1.0.0

Adds an item to the admin bar

admin_bar() : void
since 1.0.0

Render the help page for plugin

display_help_page() 
since 1.0.0

Render the settings page for plugin

display_settings_page() 
since 1.0.0

Register the JavaScript for the admin area.

enqueue_scripts() 
since 1.0.0

Register the stylesheets for the admin area.

enqueue_styles() 
since 1.0.0

Sets the class variable $options

get_options(string $plugin_name = 'wordpress-security-txt') 
static

Arguments

$plugin_name

string

The name of the plugin.

Returns an array of options names, fields types, and default values

get_options_list() : array
static

Response

array

An array of options

Registers settings fields with WordPress

register_fields() : void
since 1.0.0

Registers settings sections with WordPress

register_sections() : void
since 1.0.0

Registers plugin settings

register_settings() : void
since 1.0.0

sanitizer

sanitizer( $type,  $data) 

Arguments

$type

$data

Creates a debug section

section_debug(array $params) : mixed
since 1.0.0

Arguments

$params

array

Array of parameters for the section

Response

mixed

The settings section

Creates a directives section

section_directives(array $params) : mixed
since 1.0.0

Arguments

$params

array

Array of parameters for the section

Response

mixed

The settings section

Creates a general section

section_general(array $params) : mixed
since 1.0.0

Arguments

$params

array

Array of parameters for the section

Response

mixed

The settings section

Creates a library section

section_library(array $params) : mixed
since 1.0.0

Arguments

$params

array

Array of parameters for the section

Response

mixed

The settings section

validate_options

validate_options( $input) 

Arguments

$input

validate_repeater

validate_repeater( $input,  &$valid) 

Arguments

$input

$valid

Properties

The ID of this plugin.

plugin_name : string
since
access

private

var

The ID of this plugin.

Type(s)

string

The version of this plugin.

version : string
since
access

private

var

The current version of this plugin.

Type(s)

string

The plugin options.

options : array
since
access

private

var

The plugin options.

Type(s)

array