Store Locator Plus®

SLP_Power_Pages_UI_Shortcode_slp_pages extends SLPlus_BaseClass_Object
in package

UI pages stuff on loaded of using pages is enabled.

[slp_pages] is used to create a list of Store Pages that are online.

Table of Contents

Properties

$categories_selected  : array<string|int, string>
$max_locations  : int
$order  : string
$orderby  : string
$page_retrieval_args  : array<string|int, mixed>
$slplus  : SLPlus
$style  : string
$uses_slplus  : bool
$slplus  : mixed
$uses_slplus  : mixed
$categories_selected  : mixed
$content  : mixed
$max_locations  : mixed
$meta_query  : mixed
$no_map  : mixed
$order  : mixed
$orderby  : mixed
$page_retrieval_args  : mixed
$show_featured  : mixed
$style  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
initalize()  : mixed
Things we do at the start.
process_shortcode()  : string
Manage the shortcode
set_properties()  : mixed
Set our properties.
initialize()  : mixed
Do these things when this object is invoked. Override in your class.
create_bullet_list()  : string
Style 'bullet' - creates a bullet list of location names.
create_custom_list()  : mixed
Create a custom list.
create_full_list()  : string
Style 'full' - creates a full list of location data.
create_page_list()  : string
Create the list of Store Pages.
create_string_location_list()  : string
Create the location list string.
create_summary_list()  : string
Style 'summary' - creates a summary list of location data.
filter_by_category()  : mixed
Set filters on which pages to return.
reset()  : mixed
Reset our properties to their initial state.
set_max_locations()  : mixed
Set the maximum locations to return.
set_meta_query()  : mixed
Set the meta query.
set_order()  : mixed
ASC/DESC sort order of the pages.
set_orderby()  : mixed
Field to sort the pages by.
set_page_retrieval_args()  : mixed
Set the page retrieval arguments.

Properties

$page_retrieval_args read-only

public array<string|int, mixed> $page_retrieval_args

The args used to fetch the page list. property-read boolean $show_featured If not set, show all. If set true = show featured, false = show NOT featured.

$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

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

process_shortcode()

Manage the shortcode

public process_shortcode(array<string|int, mixed> $attributes[, string $content = null ]) : string
Parameters
$attributes : array<string|int, mixed>

{ Named array of attributes set in shortcode.

 @type string $category  Name of category to include.
 @type string $style     Listing style can be 'bullet' or 'summary'. Default 'summary'.

}

$content : string = null

the existing content that we will modify

Tags
used-by

\SLP_Power_Pages_UI::add_hooks_and_filters

Return values
string

the modified HTML content

set_properties()

Set our properties.

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

initialize()

Do these things when this object is invoked. Override in your class.

protected initialize() : mixed

create_string_location_list()

Create the location list string.

private create_string_location_list(string $output) : string
Parameters
$output : string

The output HTMl with shortcodes.

Return values
string

reset()

Reset our properties to their initial state.

private reset() : mixed

This is needed when we use a singleton method as the memory space is re-used on each shortcode call. We need to make sure that process_shortcode starts with a clean slate on each call.


        
On this page

Search results