pfeifferNet

Taxonomy_Export extends Taxonomy_Export
in package

Functionality to export taxonomy terms as a delimited file.

  • Add tab and form to pNet tools page.
  • Handle AJAX interaction.
Tags
since
6.8.0
uses
Taxonomy_Export

Table of Contents

Constants

ACTION  : string = 'pnet_export_taxonomy'
The wp_ajax hook action properties.
CAPABILITY  : string = 'edit_others_posts'
The user capability required to run this tool.
EXTRA_FIELDS  : array<string|int, mixed> = array('pfic_has_recipes')
The additional fields required for the export file.
FORM_NAME  : string = 'export_taxonomy'
The name attribute of the form.
HANDLER  : string = 'downloadTaxonomy'
The name of the javascript handler for the form.
NONCE_NAME  : string = 'token'
The nonce name for the form.
TARGET_TAB  : string = 'transfer'
Target tools page tab for this tool.
TOOL_CONTAINER  : string = 'form-taxonomy-export.php'
Tool container partial.

Properties

$form_vars  : array<string|int, mixed>
The variables used to render the form.
$http_handler  : HTTP_Handler
The instance of the HTTP_Handler class.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$taxonomy  : Taxonomy
The instance of the Taxonomy class.
$tool_container  : string
Fully qualified path to the tool container partial.

Methods

get_action()  : string
Return the action name.
get_instance()  : object
Creates and/or returns the instance of this class.
handle_ajax_request()  : void
The AJAX call handler.
render()  : void
Render the tool.
set_tab()  : array<string|int, mixed>
Create the target tab on the tools page if it doesn't exist.
__construct()  : void
Initialise the class.
get_tab_name()  : string
Return the tab name.
init_tool()  : void
Initialise the tool form with required values and assets.

Constants

ACTION

The wp_ajax hook action properties.

protected string ACTION = 'pnet_export_taxonomy'
Tags
since
6.8.0

CAPABILITY

The user capability required to run this tool.

protected string CAPABILITY = 'edit_others_posts'
Tags
since
6.8.0

EXTRA_FIELDS

The additional fields required for the export file.

protected array<string|int, mixed> EXTRA_FIELDS = array('pfic_has_recipes')
Tags
since
6.8.0

FORM_NAME

The name attribute of the form.

protected string FORM_NAME = 'export_taxonomy'
Tags
since
6.8.0

HANDLER

The name of the javascript handler for the form.

protected string HANDLER = 'downloadTaxonomy'
Tags
since
6.8.0

NONCE_NAME

The nonce name for the form.

protected string NONCE_NAME = 'token'
Tags
since
6.1.0

TARGET_TAB

Target tools page tab for this tool.

protected string TARGET_TAB = 'transfer'
  • This will be created if it doesn't exist.
Tags
since
6.8.0

TOOL_CONTAINER

Tool container partial.

protected string TOOL_CONTAINER = 'form-taxonomy-export.php'
Tags
since
6.8.0

Properties

$form_vars

The variables used to render the form.

protected array<string|int, mixed> $form_vars = array('title' => '', 'description' => '')
  • Each tool may have its own set of variables other than these.

{ Array of variables used to render the form. @type string $title The title of the form. @type string $description The description for the form. }

Tags
since
6.1.0

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
6.1.0

$tool_container

Fully qualified path to the tool container partial.

protected string $tool_container = ''
Tags
since
6.1.0

Methods

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
6.1.0
Return values
object

The instance of this class.

render()

Render the tool.

public render([string $tab = '' ]) : void
  • The priority set on this hook will determine the tool sequence down the page.
Parameters
$tab : string = ''

The slug of the active tab on tools page.

Tags
since
6.1.0
see
Tools::render()

set_tab()

Create the target tab on the tools page if it doesn't exist.

public set_tab([array<string|int, mixed> $tabs = array() ]) : array<string|int, mixed>
  • The priority set on this hook will determine the tab sequence across the page.
Parameters
$tabs : array<string|int, mixed> = array()

A set of key/value pairs for the admin tools page.

Tags
since
6.1.0
see
Tools::render()
Return values
array<string|int, mixed>

The (maybe) modified tabs array.

get_tab_name()

Return the tab name.

protected get_tab_name() : string
Tags
since
6.8.0
Return values
string

The display name of the tab for this tool.


        
On this page

Search results