Must-Use Plugin: dezeen/
Overview
The dezeen/ mu-plugin is the core business logic layer of the site. It contains CPT/taxonomy registrations, REST API endpoints, content manipulation, and the backbone of the Awards, Events, and Hot List systems.
Location: _project/_web/wp-content/mu-plugins/dezeen/
Loading
Loaded via mu-plugins/index.php → dezeen/dezeen.php. Uses a custom PSR-style autoloader (autoload.php) that converts class names to WordPress-convention filenames.
Architecture
dezeen/
├── dezeen.php # Main loader: initialises static classes and singletons
├── autoload.php # Custom autoloader
└── src/
├── configuration.php # Constants, category maps
├── advanced-custom-fields.php # ACF field definitions
├── rest-api-v2.php # REST API routes
├── rest-api-v2-longlist-taxonomy-controller.php # Taxonomy ordering REST controller
├── rest-api-v2-longlist-meta-controller.php # Longlist meta REST controller
├── query-hooks.php # WP_Query modifications
├── rewrite-the-content.php # Content DOM manipulation
├── amp.php # AMP integration
├── algolia.php # Algolia record customisation
├── dezeen-awards.php # Awards logic (extends Annual_List)
├── dezeen-events.php # Events logic
├── dezeen-awards-create-taxonomies-and-cpts.php # Awards CPT/taxonomy registration
├── dezeen-events-create-taxonomies-and-cpts.php # Events CPT/taxonomy registration
├── dezeen-edit-taxonomies.php # Taxonomy editing
├── hotlist.php # Hot List (extends Annual_List)
├── juror.php # Juror CPT
├── feed.php # RSS feed customisation
├── url-rewriter.php # Custom rewrite rules
├── article.php # Related posts
├── text-utilities.php # Text manipulation
├── menu.php # Menu CSS classes
├── featured-posts.php # Featured stories
├── categories.php # Category logic
├── archive-loop.php # Archive rendering
├── right-hand-column.php # RHC content
├── opening-image.php # Hero images
├── inline-see-also.php # "See also" links
├── templates-hooks.php # Template hooks
├── image-utilities.php # Imagick trait
├── date-utilities.php # Date formatting trait
├── annual-list.php # Abstract base class
├── digital-guides.php # Digital Guides
├── carousel.php # Carousel logic
├── carousel-categories.php # Carousel categories
├── slideshow.php # Slideshow logic
├── video.php # Video handling
├── related-item.php # Related item model
├── related-story.php # Related story model
├── related-movie.php # Related movie model
├── better-adjacent.php # Better adjacent post navigation
├── xdomdocument.php # XML DOM wrapper
├── xdomelement.php # XML DOM element
├── den-singleton.php # Singleton base class
└── built-ins.php # PHP built-in abstractionCustom Post Types Registered
| Post Type | File | Description |
|---|---|---|
dezeen_event | dezeen-events-create-taxonomies-and-cpts.php | Events |
award_entry | dezeen-awards-create-taxonomies-and-cpts.php | Award entries |
shortlist_entry | dezeen-awards-create-taxonomies-and-cpts.php | Shortlist entries |
longlist_entry | dezeen-awards-create-taxonomies-and-cpts.php | Longlist entries |
winner | dezeen-awards-create-taxonomies-and-cpts.php | Winners |
juror | juror.php | Jurors |
hotlist | hotlist.php | Hot List entries |
Custom Taxonomies Registered
| Taxonomy | Applied To | File |
|---|---|---|
event_type | dezeen_event | dezeen-events-create-taxonomies-and-cpts.php |
event_city_guide | dezeen_event | dezeen-events-create-taxonomies-and-cpts.php |
location | dezeen_event | dezeen-events-create-taxonomies-and-cpts.php |
award_year | Awards CPTs | dezeen-awards-create-taxonomies-and-cpts.php |
award_category | Awards CPTs | dezeen-awards-create-taxonomies-and-cpts.php |
REST API Routes
Registered in rest-api-v2.php:
| Namespace | Routes | Purpose |
|---|---|---|
| Custom longlist API | Multiple endpoints | Longlist ordering, meta, taxonomy management |
JWT auth whitelist is configured for these endpoints.
Key Hooks Summary
Content & Query
| Hook | File | Purpose |
|---|---|---|
the_content (priority 20) | rewrite-the-content.php | DOM manipulation of post content |
pre_get_posts | query-hooks.php | Modify main queries |
the_content_more_link | query-hooks.php | More link customisation |
body_class | query-hooks.php | Custom body classes |
max_srcset_image_width | query-hooks.php | Image srcset limit |
get_the_archive_title | text-utilities.php | Archive title format |
human_time_diff | text-utilities.php | Time difference format |
Feeds
| Hook | File | Purpose |
|---|---|---|
rss2_item | feed.php, query-hooks.php | RSS item customisation |
the_content_feed | feed.php | Feed content modification |
atom_entry | query-hooks.php | Atom feed entry |
SEO & Social
| Hook | File | Purpose |
|---|---|---|
wpseo_opengraph_image | dezeen-events.php | OG image override |
wpseo_twitter_image | dezeen-events.php | Twitter image override |
wpseo_opengraph_desc | dezeen-events.php | OG description override |
wpseo_frontend_presenters | query-hooks.php | SEO presenter modification |
Navigation & Menus
| Hook | File | Purpose |
|---|---|---|
nav_menu_css_class | menu.php, dezeen-edit-taxonomies.php | Menu item CSS classes |
wp_update_nav_menu_item | dezeen-edit-taxonomies.php | Menu item updates |
ACF
| Hook | File | Purpose |
|---|---|---|
acf/init | advanced-custom-fields.php | Register ACF fields and update CPTs |
acf/update_value | query-hooks.php | ACF value update handling |
AMP
| Hook | File | Purpose |
|---|---|---|
amp_post_template_* | amp.php | AMP template customisation |
pre_amp_render_post | amp.php | Pre-render AMP processing |
Algolia
| Hook | File | Purpose |
|---|---|---|
algolia_searchable_post_records | algolia.php | Customise Algolia records |
Configuration Constants
Defined in src/configuration.php:
PRIMARY_CATEGORIES— Map of primary category slugsCM_API— Campaign Monitor API configurationCM_LISTS_OLD— Legacy CM list IDs
Abstract Base Class: Annual_List
Both dezeen-awards.php and hotlist.php extend annual-list.php, which provides shared logic for year-based content collections with:
- Year-based routing
- Archive page rendering
- Category navigation
- Pagination logic