SLP_Actions
extends SLPlus_BaseClass_Object
in package
Store Locator Plus action hooks.
The methods in here are normally called from an action hook called via the WordPress action stack.
Table of Contents
Properties
- $addon : object
- $myslp : MySLP
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
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 a startup.
- ManageTheScripts() : mixed
- Unload The SLP Scripts If No Shortcode
- network_admin_menu() : mixed
- Network menu admin.
- register_csl_script() : void
- Register the csl_script handle with WordPress.
- register_slp_core_script() : void
- Register the slp_core handle with WordPress.
- save_screen_options() : string
- Save screen options.
- set_properties() : mixed
- Set our properties.
- shutdown() : mixed
- This is called whenever the WordPress shutdown action is called.
- wp_enqueue_scripts() : void
- This is called whenever the WordPress wp_enqueue_scripts action is called.
- wp_enqueue_scripts_for_shitty_block_themes() : mixed
- Hack because WP added block theme rendering that fires shortcode processing way earlier than it used to.
- wp_footer() : void
- 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 and 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
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
The current user is authenticated by this time.
initialize()
Things to do at a startup.
public
initialize() : mixed
ManageTheScripts()
Unload The SLP Scripts If No Shortcode
public
ManageTheScripts() : mixed
network_admin_menu()
Network menu admin.
public
network_admin_menu() : mixed
register_csl_script()
Register the csl_script handle with WordPress.
public
register_csl_script() : void
Only call this in code paths that truly need csl_script (e.g., shortcode rendering).
register_slp_core_script()
Register the slp_core handle with WordPress.
public
register_slp_core_script() : void
This does not enqueue the script; it only ensures the handle exists so other code can declare dependencies safely (WP 6.9.1+ validates dependencies).
save_screen_options()
Save screen options.
public
save_screen_options(mixed $status, mixed $option, mixed $value) : string
Parameters
- $status : mixed
- $option : mixed
- $value : mixed
Return values
stringset_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() : mixed
wp_enqueue_scripts()
This is called whenever the WordPress wp_enqueue_scripts action is called.
public
wp_enqueue_scripts() : void
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(mixed $context) : mixed
Parameters
- $context : mixed
wp_footer()
This is called whenever the WordPress shutdown action is called.
public
wp_footer() : void
wp_head()
Called when the <head> tags are rendered.
public
wp_head() : mixed
setup_location_post_type()
Register the location taxonomy and page type.
private
setup_location_post_type() : void