Skip to content
Docs
Get RestroPress

Filter

rpress_session_start_uri_blacklist

Updated
On this page

Filters the request URIs for which sessions are never started.

Applied in RPRESS_Session::get_blacklist(). The defaults are the feed URIs and comments/feed. When WordPress runs in a sub folder, each entry is also added with the folder prefix after the filter. URIs are compared without a leading or trailing slash.

Parameters#

ParameterTypeDescription
$blacklistarrayURIs without leading or trailing slashes.

Return value#

array. The URI blacklist.

Example#

function my_session_blacklist( $blacklist ) {
	$blacklist[] = 'sitemap.xml';
	return $blacklist;
}
add_filter( 'rpress_session_start_uri_blacklist', 'my_session_blacklist' );

Source#

Applied in:

  • includes/class-rpress-session.php (line 303), in RPRESS_Session::get_blacklist()

See also#

Was this page helpful?