'object', 'properties' => new \stdClass(), 'additionalProperties' => false]; } public function outputSchema(): ?array { return [ 'type' => 'object', 'properties' => [ 'css' => ['type' => 'string'], 'stylesheet' => ['type' => 'string'], 'lines' => ['type' => 'integer'], 'bytes' => ['type' => 'integer'], 'design_rev' => ['type' => 'string'], ], 'required' => ['css', 'stylesheet', 'lines', 'bytes', 'design_rev'], ]; } public function annotations(): array { return Annotations::read(); } public function isDirect(): bool { return false; } public function diviFeatures(array $input): array { return [DiviFeature::ThemeOptionRead]; } public function permission(array $input): bool|WP_Error { return DesignRights::customCss($this->options) ?? true; } public function execute(array $input): mixed { $refusal = DesignRights::customCss($this->options); if ($refusal !== null) { return $refusal; } $raw = $this->store->read(); $css = $raw['css']; return [ 'css' => $css, 'stylesheet' => $raw['stylesheet'], 'lines' => $css === '' ? 0 : substr_count($css, "\n") + 1, 'bytes' => strlen($css), 'design_rev' => (new CustomCssArea($this->store))->rev($raw), ]; } }