Store_Protector implements Registerable, Service
This class provides the main functions to lock down the entire store on the front end.
This includes locking down the store pages, products, categories, tags, etc, as well as hiding items from navigations menus, removing WooCommerce widgets, and hiding from search results.
Tags
Interfaces, Classes and Traits
- Registerable
- Service
Table of Contents
- $is_protected_page : mixed
- empty_shortcode() : mixed
- hide_gutenberg_wc_blocks() : string
- Hide all blocks starting with the name "woocommerce".
- hide_products_in_search() : mixed
- hide_store_in_pages_widget() : mixed
- hide_store_in_search() : mixed
- is_protected_page() : mixed
- maybe_prevent_caching() : mixed
- maybe_protect_store_page() : mixed
- meta_robots_noindex_head() : mixed
- protect() : mixed
- protect_nav_menus() : mixed
- protect_widgets() : mixed
- register() : mixed
- is_wc_endpoint() : mixed
- prevent_caching() : mixed
- prevent_indexing() : mixed
- replace_shortcodes() : mixed
- show_protected_page_content() : mixed
Properties
$is_protected_page
private
mixed
$is_protected_page
= null
Methods
empty_shortcode()
public
static empty_shortcode([mixed $atts = [] ]) : mixed
Parameters
- $atts : mixed = []
Return values
mixed —hide_gutenberg_wc_blocks()
Hide all blocks starting with the name "woocommerce".
public
hide_gutenberg_wc_blocks(string $content, array<string|int, mixed> $block) : string
Parameters
- $content : string
-
content of the block.
- $block : array<string|int, mixed>
-
block details
Return values
string —hide_products_in_search()
public
hide_products_in_search(mixed $where, mixed $query) : mixed
Parameters
- $where : mixed
- $query : mixed
Return values
mixed —hide_store_in_pages_widget()
public
hide_store_in_pages_widget(mixed $excludes) : mixed
Parameters
- $excludes : mixed
Return values
mixed —hide_store_in_search()
public
hide_store_in_search(mixed &$query) : mixed
Parameters
- $query : mixed
Return values
mixed —is_protected_page()
public
is_protected_page() : mixed
Return values
mixed —maybe_prevent_caching()
public
maybe_prevent_caching() : mixed
Return values
mixed —maybe_protect_store_page()
public
maybe_protect_store_page() : mixed
Return values
mixed —meta_robots_noindex_head()
public
meta_robots_noindex_head() : mixed
Return values
mixed —protect()
public
protect() : mixed
Return values
mixed —protect_nav_menus()
public
protect_nav_menus(mixed $menu_items, mixed $menu, mixed $args) : mixed
Parameters
- $menu_items : mixed
- $menu : mixed
- $args : mixed
Return values
mixed —protect_widgets()
public
protect_widgets(mixed $sidebars_widgets) : mixed
Parameters
- $sidebars_widgets : mixed
Return values
mixed —register()
public
register() : mixed
Return values
mixed —is_wc_endpoint()
private
is_wc_endpoint(mixed $endpoint) : mixed
Parameters
- $endpoint : mixed
Return values
mixed —prevent_caching()
private
prevent_caching() : mixed
Return values
mixed —prevent_indexing()
private
prevent_indexing() : mixed
Return values
mixed —replace_shortcodes()
private
replace_shortcodes() : mixed
Return values
mixed —show_protected_page_content()
private
show_protected_page_content() : mixed