apply_filters( 'clanbite_component_available', bool $available, string $slug, array<string, mixed> $def )Filters whether a component is considered available (for example to switch one off for a site setting).
Filter PHP
Parameters
$available(bool)Whether it is available so far.
$slug(string)Component slug.
$def(array<string, mixed>)Its definition.
Example
add_filter( 'clanbite_component_available', function ( $available, $slug, $def ) {
// Change $available here.
return $available;
}, 10, 3 );Defined in inc/components.php
Changelog
| Version | Description |
|---|---|
| 1.6.3 | Introduced. |