SLP_Actions
extends SLPlus_BaseClass_Object
in package
Store Locator Plus action hooks.
The methods in here are normally called from an action hook that is called via the WordPress action stack.
Table of Contents
Properties
- $addon : object
- $myslp : MySLP
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
- $scripts_registered : bool
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- action_AddToPageHelp() : mixed
- Add content tab help to the post and post-new pages.
- add_slp_to_admin_bar() : mixed
- Add SLP setting to the admin bar on the top of the WordPress site.
- admin_menu() : mixed
- Add the Store Locator panel to the admin sidebar.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- init() : mixed
- Called when the WordPress init action is processed.
- initialize() : mixed
- Things to do at startup.
- ManageTheScripts() : void
- Unload google_maps, slp_core, and csl_script if there was no SLPLUS shortcode used.
- network_admin_menu() : void
- Network menu admin.
- save_screen_options() : mixed
- Save screen options.
- set_properties() : mixed
- Set our properties.
- shutdown() : void
- This is called whenever the WordPress shutdown action is called.
- wp_enqueue_scripts() : void
- Register the slp_core (js/slp_core.js) and csl_script (js/wpslp.js) JavaScript WordPress handles.
- wp_enqueue_scripts_for_shitty_block_themes() : array<string|int, mixed>
- Hack because WP added block theme rendering that fires shortcode processing way earlier than it used to.
- wp_footer() : mixed
- This is called whenever the WordPress shutdown action is called.
- wp_head() : mixed
- Called when the <head> tags are rendered.
- setup_location_post_type() : void
- Register the location taxonomy & page type.
Properties
$addon
public
object
$addon
$myslp
public
MySLP
$myslp
$slplus
public
SLPlus
$slplus
$uses_myslp
public
bool
$uses_myslp
Set to true to add a $myslp property pointing to global $myslp
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slug
protected
mixed
$slug
$scripts_registered
private
bool
$scripts_registered
= \false
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
boolaction_AddToPageHelp()
Add content tab help to the post and post-new pages.
public
action_AddToPageHelp() : mixed
add_slp_to_admin_bar()
Add SLP setting to the admin bar on the top of the WordPress site.
public
add_slp_to_admin_bar(mixed $admin_bar) : mixed
Parameters
- $admin_bar : mixed
admin_menu()
Add the Store Locator panel to the admin sidebar.
public
admin_menu() : 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() ]) : static
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
staticinit()
Called when the WordPress init action is processed.
public
init() : mixed
Current user is authenticated by this time.
Tags
initialize()
Things to do at startup.
public
initialize() : mixed
ManageTheScripts()
Unload google_maps, slp_core, and csl_script if there was no SLPLUS shortcode used.
public
ManageTheScripts() : void
network_admin_menu()
Network menu admin.
public
network_admin_menu() : void
save_screen_options()
Save screen options.
public
save_screen_options(mixed $status, mixed $option, mixed $value) : mixed
Parameters
- $status : mixed
- $option : mixed
- $value : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
shutdown()
This is called whenever the WordPress shutdown action is called.
public
shutdown() : void
wp_enqueue_scripts()
Register the slp_core (js/slp_core.js) and csl_script (js/wpslp.js) JavaScript WordPress handles.
public
wp_enqueue_scripts() : void
Tags
wp_enqueue_scripts_for_shitty_block_themes()
Hack because WP added block theme rendering that fires shortcode processing way earlier than it used to.
public
wp_enqueue_scripts_for_shitty_block_themes(array<string|int, mixed> $context) : array<string|int, mixed>
Parameters
- $context : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>wp_footer()
This is called whenever the WordPress shutdown action is called.
public
wp_footer() : mixed
wp_head()
Called when the <head> tags are rendered.
public
wp_head() : mixed
setup_location_post_type()
Register the location taxonomy & page type.
private
setup_location_post_type() : void