Feature Toggle Filtreleri
Child theme functions.php veya mu-plugin içine eklenebilecek filtre örnekleri.
Frontend Destek Matrisini Topluca Değiştirme
add_filter('musavir_flow_frontend_support', function (array $support): array {
$support['haber_archive'] = false;
$support['vergi_takvimi_page'] = true;
return $support;
});
Belirli Bir Feature'ı Kontrol Etme
add_filter('musavir_flow_frontend_feature_enabled', function (bool $enabled, string $feature): bool {
if ($feature === 'haber_single') {
return true;
}
return $enabled;
}, 10, 2);
Term Linklerini Dekoratif Bırakma
add_filter('musavir_flow_term_links_enabled', function (bool $enabled, string $context): bool {
if ($context === 'haber_terms') {
return false;
}
return $enabled;
}, 10, 2);
Makale Single Template Kontrolü
add_filter('musavir_flow_use_makale_single_template', function (bool $enabled, WP_Post $post): bool {
return $enabled && has_term('rehber', 'musavir_makale_kategori', $post);
}, 10, 2);