How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A PHP application that a Valencia company builds for a public body does not only have to work. If the contract is for the exercise of administrative powers, the system behind it can fall under Spain’s Esquema Nacional de Seguridad (ENS), and the tender documents can ask for proof of conformity. I am Mariusz Szatkowski, a developer in Gdynia working remotely and in writing, in the same time zone as Valencia. I am not a lawyer. This page reads the regulation for the parts that reach application code, and the shop or portal owner decides the legal position with an adviser.

The Torres de Quart in Valencia. Valencia photo by Diego Delso, under CC BY-SA 3.0, via Wikimedia Commons.
Real Decreto 311/2022 of 3 May regulates the ENS. The BOE published it in number 106 on 4 May 2022, it entered into force on 5 May 2022, and it repealed Real Decreto 3/2010. Article 2(1) applies it to the whole public sector as defined in Law 40/2015.
The text builds on basic principles (security as an integral process, risk based management, prevention, detection, response and conservation, continuous monitoring, periodic reassessment) and on minimum requirements. Article 36 puts the security specifications into the life cycle of services and systems, with control procedures. For a developer that sentence matters most: security is not a step added before launch.
Article 2(3) says it does in one situation. The ENS also applies to the information systems of private sector entities when, under applicable rules and by a contractual relationship, they provide services or solutions to public sector bodies for the exercise of their administrative powers. The same paragraph adds:
So a Valencia agency or software house can meet the ENS twice: as the contractor of a ministry, a municipality or a public company, or as a subcontractor of that contractor. A PHP application that only a private customer uses is outside this paragraph. Whether your contract is inside it is a legal question, and the tender documents are where the answer starts.
Article 40 says the security category of a system balances the importance of the information and services against the security effort, under proportionality. The impact of an incident on availability, authenticity, integrity, confidentiality and traceability is valued following Annex I.
Article 41 splits the roles. The owners of the information or services make the valuations, and the security officer determines the category of the system. The supplier does not choose it. Annex II then names the measures by category, and article 28 requires the entity to adopt the measures that belong to it, taking into account the assets, the category and the decisions on managing the identified risks. The chosen measures go into a Declaración de Aplicabilidad signed by the security officer, and compensating measures are allowed if the entity documents that they protect as well or better.
For a project this means one early question to the contracting body: which category, and which measures does the Declaración de Aplicabilidad list for the system my code runs in? A reply of “BASICA” and a reply of “MEDIA” lead to different amounts of work.
Under article 38, systems in scope go through a process to determine conformity. Systems of category MEDIA or ALTA need an audit for certification. Systems of category BASICA need only a self-assessment for the declaration of conformity, though they may also take a certification audit. The responsible parties publish declarations and certifications on their portals.
Article 31 adds a regular audit at least every two years, and an extraordinary one after substantial changes to the information systems that can affect the required measures. A large rework of an application is a candidate for that second case, and the entity decides whether it is.
For outsourced services, article 13(5) requires the providing organisation to designate a security point of contact, unless there is a documented reason not to. That contact channels the security requirements of the service and the incident communications. Article 33(2) obliges public sector bodies, not suppliers, to notify the CCN of incidents with a significant impact, so a supplier should agree with the body how it reports incidents to it.
The transitional provision gave pre-existing systems of public bodies and of private contractors 24 months from entry into force to reach full adequacy. New systems apply the real decreto from their conception. A new PHP system for a public body starts inside the regulation.
Annex II is long. These measures describe what a development and release process shows to an auditor. Category columns follow the Annex II tables.
| Measure | What it asks | Category |
|---|---|---|
| mp.sw.1.1 | Develop on a system separate from production, with no development tools or data in production and no production data in development | all (BASICA n.a. for the reinforcements) |
| mp.sw.1 R1 | Least privilege: the application accesses only the resources and privileges it needs | MEDIA, ALTA |
| mp.sw.1 R2 | A recognised secure development methodology across the life cycle, handling of test data, source code inspection | MEDIA, ALTA |
| mp.sw.1 R3 | Identification and authentication, protection of processed information, and audit trails as part of the design | MEDIA, ALTA |
| mp.sw.1 R4 | Tests before deployment preferably without real data | MEDIA, ALTA |
| mp.sw.2 | Check security acceptance criteria and that other components are not weakened before production | all, with R1 pre-production tests for MEDIA, ALTA |
| op.exp.4 | A procedure to analyse, prioritise and apply security updates, with R1 tests in a pre-production environment and R2 a way to roll back | all; R1 from MEDIA; R2 for ALTA |
| op.exp.8.1 | Audit log with user or entity identifier, date and time, the information concerned, event type and result | all |
| op.pl.5 R2 | Product description includes a list of software components as set in mp.sw.1 R5 | MEDIA, ALTA |
Measure mp.sw.1 R5 deserves its own line. It asks the developer to keep a formal, current list of the third-party components in the application, with a history across versions, and sets the minimum content as the component identification, the manufacturer and the version used. The detail is left to a CCN-STIC guide.
For web applications, mp.s.2 lists the threats: reaching information without authentication by alternative routes, URL manipulation, manipulation of cookies, code injection, privilege escalation and cross-site scripting. Reinforcements add black box security audits during development and before production, and white box audits for higher categories.
None of the following is a certification. It is how I would arrange the project so the audit evidence exists.
Component list. Composer records exact versions in composer.lock, and the Composer documentation says to commit that file to version control. composer show --locked lists the locked packages, and --format=json gives machine readable output. That is the raw material for the mp.sw.1 R5 list. Composer has no manufacturer field in that output, so the manufacturer column of the list is filled from the package vendor and project pages, by hand or by script.
composer show --locked --format=json > build/components-locked.json
composer audit --locked --format=json > build/composer-audit.jsoncomposer audit checks the installed packages against security advisories through the Packagist.org API by default, and also flags abandoned packages. It returns exit code 0 for no issues and 1 for findings, so a release pipeline can stop on it. It does not replace the entity’s procedure for prioritising updates under op.exp.4.
Separate environments. Development, pre-production and production on separate systems, with test data that is not production data. A password-protected staging copy that matches the production PHP and database versions is the pre-production environment of mp.sw.2 R1 and op.exp.4 R1.
Audit log. The event record in op.exp.8.1 names five fields. A small logging class that writes them in one structured line each, with a request or user identifier, covers the field list. Who may read and delete the logs, and how long they stay, belong to the entity’s security documentation (op.exp.8 reinforcements R3 and R4).
Authentication and web threats. Prepared statements, output escaping, session cookie settings and a deliberate permission check on every route address the mp.s.2 list. The audit tests whether they hold, so the project keeps the test results.
Test data. mp.sw.1 R4 prefers tests without real data. Fixtures and factories generated for the purpose keep real citizen or customer records out of the development system.
The Centro Criptológico Nacional runs a portal for the ENS. It links the consolidated text, the CCN-STIC 800 series guides, and the register of conformity certificates and certification bodies, according to the ENS portal. Article 34 of the real decreto says the CCN-CERT supports public bodies in handling vulnerabilities and incidents, and that the CCN-STIC series gives the norms and good practice for applying the ENS. I did not read the individual guides for this page, so which guide fits a given measure is for your adviser or the contracting body to say.
Article 3 keeps the GDPR and Organic Law 3/2018 in force for any system that processes personal data. The controller or processor, advised by the data protection officer, performs the risk analysis of article 24 GDPR and, where article 35 applies, a data protection impact assessment. Measures that follow from that analysis prevail where they are stricter than the Annex II ones. The two regimes stack. Mp.info.1 in Annex II asks the security officer to collect the data protection requirements set by the controller or processor.
I need access to the repository and hosting, and the written security requirements from the contracting body. The PHP developer page lists the rest of my PHP work.
If your Valencia company builds or maintains a PHP application for a public body, send the tender extract, the stack and your deadline through the contact form. I do not charge for the first written estimate on an ENS project. Whether the ENS applies to your contract, and which category the body assigns, is for you and your adviser to decide.
Examples of my work.
Olsztyn.com.pl is one of the key projects in my WordPress developer portfolio, serving as a comprehensive city portal dedicated to the residents of Olsztyn. ...
A package of various special banners for the osemka.pl website
A package of various special banners for the osemka.pl website
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.