I have a function which blacklists all public_query_vars and private_query_vars.
But wp-admin and wp-login aren't listed in these arrays. Is there a way to add them to these lists?
Original code:
public function forbidden_slugs() {
$wp = new WP;
return array_merge( $wp->public_query_vars, $wp->private_query_vars );
}
Something I tried but didn't work:
public function forbidden_slugs() {
$wp = new WP;
return array_merge( $wp->public_query_vars, $wp->private_query_vars, 'wp-admin', 'wp-login' );
}
Thank you!
array_mergemerges arrays.'wp-admin'is a string