woof_seo_do_index
Hook woof_seo_do_index ist für SEO-URLs von Erweiterungen. Dies dient einer flexibleren Indexierungssteuerung. Zum Beispiel möchte der Benutzer nicht nur rote Produkte indizieren:
add_filter('woof_seo_do_index', function ($do_index, $curr_url, $request_data) {
if (isset($request_data['pa_color'])) {
$colors = explode(',', $request_data['pa_color']);
if (in_array('red', $colors)) {
$do_index = false;
}
}
return $do_index;
}, 10, 3);