aioseo_bad_referer_list

aioseo_bad_referer_list

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: all-in-one-seo-pack.4.7.4.2

apply_filters('aioseo_bad_referer_list') is found 1 times:

  • /app/Common/Tools/BadBotBlocker.php line 401
    	private function isBadReferer() {
    		$refererList = aioseo()->options->deprecated->tools->blocker->custom->enable
    			? explode( "\n", aioseo()->options->deprecated->tools->blocker->custom->referer )
    			: $this->refererList;
    		$refererList = apply_filters( 'aioseo_bad_referer_list', $refererList );
    
    		if ( ! empty( $refererList ) && ! empty( $_SERVER ) && ! empty( $_SERVER['HTTP_REFERER'] ) ) {
    			$referer = esc_url_raw( sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) );
    			$regex   = $this->prepareList( $refererList );
    			if ( preg_match( '/' . $regex . '/i', $referer ) ) {
    				return true;