Store Locator Plus®

SLP_Power_Pages_Admin extends SLPlus_BaseClass_Object
in package

Admin pages stuff.

Table of Contents

Properties

$addon  : SLPPower
$addon  : mixed
$admin  : SLP_Power_Admin
$admin  : mixed
$slplus  : SLPlus
$tab  : SLP_Power_Pages_Tab
$tab  : mixed
$uses_slplus  : bool
$slplus  : mixed
$uses_slplus  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
add_action_buttons()  : array<string|int, mixed>
Add a location action button.
add_hooks_and_filters()  : mixed
Add pages admin hooks and filters if pages is active.
create_content()  : array<string|int, mixed>
Set the page content when location create/update page is called.
create_string_default_template()  : string
Create the default Store Page content.
create_string_short_url()  : string
Create a short Store Page URL for use on manage locations interface.
delete_page()  : bool
Set the link in store locations table to null when a store page is permanently deleted.
extend_bulk_actions()  : array<string|int, mixed>
Add more actions to the Bulk Action drop down on the admin Locations/Manage Locations interface.
extend_elocation_columns()  : array<string|int, mixed>
Add the Store Pages URL column.
extend_location_columns()  : string
Render the extra fields on the manage location table.
extend_location_edit()  : mixed
Extend the location edit form.
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
initialize()  : mixed
Things we do to get started.
render_pages_tab()  : mixed
Render the admin panel.
replace_id_placeholder()  : string
Replace the content sl_id to the real id value.
set_properties()  : mixed
Set our properties.
update_content_on_publish()  : mixed
Check if the content of Store Page post is blank when it's being published.
create_string_action_entry()  : string
Create the action entry string based on the params entries.
create_string_actions()  : string
Create the action output for add/edit locations.
create_string_content()  : string
Create the content for a Store Page.
save_pages_settings()  : mixed
Save settings on pages, set permalink flush.
set_page_actions()  : array<string|int, mixed>
Set Page Actions.

Properties

$uses_slplus

public bool $uses_slplus

Set to true (default) if the object needs access to the SLPlus plugin object.

Methods

__construct()

public __construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

__isset()

public __isset(string $property) : bool
Parameters
$property : string
Return values
bool

add_action_buttons()

Add a location action button.

public add_action_buttons(array<string|int, mixed> $buttons) : array<string|int, mixed>
Parameters
$buttons : array<string|int, mixed>

buttons array

Tags
used-by

\SLP_Power_Pages_Admin::add_hooks_and_filters filter: slp_manage_locations_buttons

Return values
array<string|int, mixed>

modified/extended buttons array

add_hooks_and_filters()

Add pages admin hooks and filters if pages is active.

public add_hooks_and_filters() : mixed
Tags
uses
SLP_Power_Pages_Admin::create_content

create_content()

Set the page content when location create/update page is called.

public create_content(array<string|int, mixed> $page_data) : array<string|int, mixed>
Parameters
$page_data : array<string|int, mixed>
Tags
used-by

\SLP_Power_Pages_Admin::add_hooks_and_filters filter: slp_location_page_attributes

Return values
array<string|int, mixed>

create_string_default_template()

Create the default Store Page content.

public create_string_default_template() : string
Return values
string
  • HTML content that is the WordPress page content.

create_string_short_url()

Create a short Store Page URL for use on manage locations interface.

public create_string_short_url(string $fullURL) : string
Parameters
$fullURL : string
Return values
string

the short hyperlinked URL

delete_page()

Set the link in store locations table to null when a store page is permanently deleted.

public delete_page(int $pageID) : bool
Parameters
$pageID : int
Tags
used-by

\SLP_Power_Pages_Admin::add_hooks_and_filters filter: before_delete_post

Return values
bool

extend_bulk_actions()

Add more actions to the Bulk Action drop down on the admin Locations/Manage Locations interface.

public extend_bulk_actions(array<string|int, mixed> $BulkActions) : array<string|int, mixed>
Parameters
$BulkActions : array<string|int, mixed>
Return values
array<string|int, mixed>

extend_elocation_columns()

Add the Store Pages URL column.

public extend_elocation_columns(array<string|int, mixed> $theColumns) : array<string|int, mixed>
Parameters
$theColumns : array<string|int, mixed>
  • the array of column data/titles
Return values
array<string|int, mixed>
  • modified columns array

extend_location_columns()

Render the extra fields on the manage location table.

public extend_location_columns(string $theData, string $theField, string $theLabel) : string

SLP Filter: slp_column_data

Parameters
$theData : string
  • the option_value field data from the database
$theField : string
  • the name of the field from the database (should be sl_option_value)
$theLabel : string
  • the column label for this column (should be 'Categories')
Return values
string

the modified data

extend_location_edit()

Extend the location edit form.

public extend_location_edit() : mixed

TODO: Convert to new group params and slug based system. Called by slp_build_locations_panels.

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_Object

replace_id_placeholder()

Replace the content sl_id to the real id value.

public replace_id_placeholder(string $content) : string
Parameters
$content : string
Return values
string

set_properties()

Set our properties.

public set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

update_content_on_publish()

Check if the content of Store Page post is blank when it's being published.

public update_content_on_publish(mixed $post_id, mixed $post) : mixed

If it is, set content to default template value.

Parameters
$post_id : mixed
$post : mixed

create_string_action_entry()

Create the action entry string based on the params entries.

private create_string_action_entry(array<string|int, mixed> $params) : string

params['label'] - required, the text to show for the link params['ifok'] - boolean, if true only show this item if the pages_url for the current location is set

Parameters
$params : array<string|int, mixed>
Return values
string

create_string_actions()

Create the action output for add/edit locations.

private create_string_actions() : string
Return values
string

create_string_content()

Create the content for a Store Page.

private create_string_content() : string

Creates the content for the page. If plus pack is installed it uses the plus template file, otherwise we use the hard-coded layout.

Return values
string

save_pages_settings()

Save settings on pages, set permalink flush.

private save_pages_settings() : mixed

set_page_actions()

Set Page Actions.

private set_page_actions() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results