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>
24 lines
564 B
PHP
24 lines
564 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace ROITheme\Shared\Infrastructure\Services;
|
|
|
|
use ROITheme\Shared\Domain\Contracts\ServerRequestProviderInterface;
|
|
|
|
/**
|
|
* Implementacion WordPress del proveedor de request HTTP
|
|
*
|
|
* Encapsula el acceso a $_SERVER.
|
|
*
|
|
* v1.1: Nuevo - extrae logica de acceso a superglobales
|
|
*
|
|
* @package ROITheme\Shared\Infrastructure\Services
|
|
*/
|
|
final class WordPressServerRequestProvider implements ServerRequestProviderInterface
|
|
{
|
|
public function getRequestUri(): string
|
|
{
|
|
return $_SERVER['REQUEST_URI'] ?? '';
|
|
}
|
|
}
|