feat(exclusions): Implement component exclusion system (Plan 99.11)
Adds ability to exclude components from specific: - Categories (by slug or term_id) - Post/Page IDs - URL patterns (substring or regex) Architecture: - Domain: Value Objects (CategoryExclusion, PostIdExclusion, UrlPatternExclusion, ExclusionRuleSet) + Contracts - Application: EvaluateExclusionsUseCase + EvaluateComponentVisibilityUseCase (orchestrator) - Infrastructure: WordPressExclusionRepository, WordPressPageContextProvider, WordPressServerRequestProvider - Admin: ExclusionFormPartial (reusable UI), ExclusionFieldProcessor, JS toggle The PageVisibilityHelper now uses the orchestrator UseCase that combines page-type visibility (Plan 99.10) with exclusion rules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
37
Shared/Domain/Constants/ExclusionDefaults.php
Normal file
37
Shared/Domain/Constants/ExclusionDefaults.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Domain\Constants;
|
||||
|
||||
/**
|
||||
* Constantes de exclusion por defecto para componentes
|
||||
*
|
||||
* @package ROITheme\Shared\Domain\Constants
|
||||
*/
|
||||
final class ExclusionDefaults
|
||||
{
|
||||
/**
|
||||
* Configuracion de exclusion por defecto (sin exclusiones)
|
||||
*/
|
||||
public const DEFAULT_EXCLUSIONS = [
|
||||
'exclusions_enabled' => false,
|
||||
'exclude_categories' => '[]',
|
||||
'exclude_post_ids' => '[]',
|
||||
'exclude_url_patterns' => '[]',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lista de campos de exclusion validos
|
||||
*/
|
||||
public const EXCLUSION_FIELDS = [
|
||||
'exclusions_enabled',
|
||||
'exclude_categories',
|
||||
'exclude_post_ids',
|
||||
'exclude_url_patterns',
|
||||
];
|
||||
|
||||
/**
|
||||
* Nombre del grupo en BD
|
||||
*/
|
||||
public const GROUP_NAME = '_exclusions';
|
||||
}
|
||||
Reference in New Issue
Block a user