\ BWP_Sitemaps_Excluder

Summary

Methods
Properties
Constants
__construct()
get_excluded_items()
update_excluded_items()
No public properties found
No constants found
No protected methods found
$bridge
$cache
$cache_key
$storage_key
N/A

Properties

$bridge

$bridge : 

$cache

$cache : 

$cache_key

$cache_key : 

$storage_key

$storage_key : 

Methods

__construct()

__construct(\BWP_WP_Bridge  $bridge, \BWP_Cache  $cache,   $cache_key,   $storage_key) 

Parameters

\BWP_WP_Bridge $bridge
\BWP_Cache $cache
$cache_key
$storage_key

get_excluded_items()

get_excluded_items(string  $group = null, boolean  $flatten = false) : array

Get currently excluded items.

The result of this function is cached using \BWP_Cache.

Parameters

string $group

default to get all, when expected items are posts, $group is actually post type, when expected items are terms, $group is taxonomy.

boolean $flatten

whether to flatten the items into a one dimensional array of ids instead of grouping by $group. To use this $group must be set to NULL.

Returns

array
  • An array of item ids if $group is provided
  • An array of group => item ids string (comma separated) otherwise, example:
    array(
        'post'  => '1,2,3,4',
        'movie' => '5,6,7,8'
    )

update_excluded_items()

update_excluded_items(string  $group, array  $ids) 

Update excluded items.

Parameters

string $group
array $ids

all item ids under specified $group that should be excluded