SLP_Power_Category_Stores_Taxonomy
extends SLPlus_BaseClass_Object
in package
Category interface.
Table of Contents
Properties
- $addon : SLPPower
- $addon : mixed
- $meta : SLP_Power_Category_Stores_Taxonomy_Meta
- $slplus : SLPlus
- $slplus : SLPlus
- $taxonomy : string
- $taxonomy : mixed
- $uses_slplus : bool
- $slplus : mixed
- $uses_slplus : mixed
- $meta : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_wp_filters() : mixed
- Add WordPress filters for this taxonomy.
- create_or_edited_stores() : mixed
- Called after a store category is inserted or updated in the database.
- delete_category_from_locations() : mixed
- Handle deleting terms IDS from locations when taxonomy deletes the category.
- get_instance() : SLPlus_BaseClass_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- get_parent_categories() : mixed
- Fetch an array of term IDs for all stores categories that are parents with children.
- get_term() : string
- Return the term name for a specific term.
- initialize() : mixed
- Startup things.
- isset_category_attribute() : bool
- Check if any of the special category attributes are present in the form post.
- set_column_data() : string
- Prepare the Store taxonomy custom column data.
- set_columns() : mixed
- Set the Store taxonomy page columns.
- set_messages() : mixed
- Tweak the edit categories messages;
- set_properties() : mixed
- Set our properties.
Properties
$addon
public
SLPPower
$addon
$addon
public
mixed
$addon
$meta read-only
public
SLP_Power_Category_Stores_Taxonomy_Meta
$meta
Term Meta Data
$slplus
public
SLPlus
$slplus
$slplus
public
SLPlus
$slplus
$taxonomy
public
string
$taxonomy
The 'stores' taxonomy name.
NOTE: get_term employs the WP Object Cache to avoid subsequent data I/O calls when fetching the same object ID.
$taxonomy
public
mixed
$taxonomy
= \SLPlus::locationTaxonomy
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slplus
protected
mixed
$slplus
$uses_slplus
protected
mixed
$uses_slplus
= \true
$meta
private
mixed
$meta
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booladd_wp_filters()
Add WordPress filters for this taxonomy.
public
add_wp_filters() : mixed
Custom Taxonomy Processing from the WP stores category page
wp-includes/taxonomy/ in wp_update_term()
do_action("edited_$taxonomy", $term_id, $tt_id); do_action("create_$taxonomy", $term_id, $tt_id);
create_or_edited_stores()
Called after a store category is inserted or updated in the database.
public
create_or_edited_stores(int $term_id, mixed $ttid) : mixed
Creates an entry in the wp_options table with an option name based on the category ID and a tagalong prefix like this:
csl-slplus-TAGALONG-category_14
Parameters
- $term_id : int
-
- the newly inserted category ID
- $ttid : mixed
delete_category_from_locations()
Handle deleting terms IDS from locations when taxonomy deletes the category.
public
delete_category_from_locations(int $term_id, int $tt_id, mixed $deleted_term) : mixed
Parameters
- $term_id : int
- $tt_id : int
- $deleted_term : mixed
get_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([bool $no_global = false ][, mixed $params = array() ]) : SLPlus_BaseClass_Object
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object
Parameters
- $no_global : bool = false
-
set to true to skip assigning object to SLP global as a property.
- $params : mixed = array()
-
object init params
Return values
SLPlus_BaseClass_Objectget_parent_categories()
Fetch an array of term IDs for all stores categories that are parents with children.
public
get_parent_categories([mixed $options = array() ]) : mixed
$options - do not pass 'fields' , 'parent', or 'childless' for base functionality.
Parameters
- $options : mixed = array()
Tags
get_term()
Return the term name for a specific term.
public
get_term(int $term_id[, string $property = 'name' ]) : string
Parameters
- $term_id : int
- $property : string = 'name'
-
the get_term property (default: 'name')
Tags
Return values
stringinitialize()
Startup things.
public
initialize() : mixed
isset_category_attribute()
Check if any of the special category attributes are present in the form post.
public
isset_category_attribute(mixed $named_array) : bool
Parameters
- $named_array : mixed
Return values
boolset_column_data()
Prepare the Store taxonomy custom column data.
public
set_column_data(string $output[, string $column_name = '' ][, int $term_id = null ]) : string
Parameters
- $output : string
- $column_name : string = ''
- $term_id : int = null
Return values
string —what we want to display as data for the column
set_columns()
Set the Store taxonomy page columns.
public
set_columns(array<string|int, mixed> $columns) : mixed
Parameters
- $columns : array<string|int, mixed>
set_messages()
Tweak the edit categories messages;
public
set_messages( $messages) : mixed
Parameters
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()