WordPress_Security_Txt_Public

The public-facing functionality of the plugin.

Defines the plugin name, version, and hooks for the public-facing stylesheet and JavaScript.

package

WordPress_Security_Txt

subpackage

WordPress_Security_Txt/public

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 the plugin.

$version

string

The version of this plugin.

Applies plugin routes to a given URI.

apply_routes(string $uri) 

Arguments

$uri

string

Removes the cache file for the plugin.

cache_clear() : boolean
static
since 1.0.0

Response

boolean

Indicates if the cache was cleared during the current request.

cache_cleared( $reset = false) : boolean
static
since 1.0.0

Arguments

$reset

Response

boolean

Gets the cache file for the plugin.

cache_file() : string
static
since 1.0.0

Response

string

Get the security.txt cache.

get_security_txt_cache() : mixed

Response

mixed

Determines if current request is made via HTTPS.

is_secure() : boolean
since 1.0.0

Response

boolean

Redirects a request to the correct location.

redirect(string $document) : void
since 1.0.0

Arguments

$document

string

Renders gpg.txt for display

render_gpg_txt() : string

Response

string

Renders security.txt for display

render_security_txt() : string

Response

string

Hijacks requests for enabled routes

route() : void

Displays a document, assuming it can be rendered correctly.

show(string $document) : void
since 1.0.0

Arguments

$document

string

Write to the security.txt cache.

write_security_txt_cache(string $data) : void

Arguments

$data

string

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

The plugin cache cleared flag.

cache_cleared : boolean
static
since
access

private

var

The plugin cache cleared flag.

Type(s)

boolean