Skip to content

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.phpdezeen/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 abstraction

Custom Post Types Registered

Post TypeFileDescription
dezeen_eventdezeen-events-create-taxonomies-and-cpts.phpEvents
award_entrydezeen-awards-create-taxonomies-and-cpts.phpAward entries
shortlist_entrydezeen-awards-create-taxonomies-and-cpts.phpShortlist entries
longlist_entrydezeen-awards-create-taxonomies-and-cpts.phpLonglist entries
winnerdezeen-awards-create-taxonomies-and-cpts.phpWinners
jurorjuror.phpJurors
hotlisthotlist.phpHot List entries

Custom Taxonomies Registered

TaxonomyApplied ToFile
event_typedezeen_eventdezeen-events-create-taxonomies-and-cpts.php
event_city_guidedezeen_eventdezeen-events-create-taxonomies-and-cpts.php
locationdezeen_eventdezeen-events-create-taxonomies-and-cpts.php
award_yearAwards CPTsdezeen-awards-create-taxonomies-and-cpts.php
award_categoryAwards CPTsdezeen-awards-create-taxonomies-and-cpts.php

REST API Routes

Registered in rest-api-v2.php:

NamespaceRoutesPurpose
Custom longlist APIMultiple endpointsLonglist ordering, meta, taxonomy management

JWT auth whitelist is configured for these endpoints.

Key Hooks Summary

Content & Query

HookFilePurpose
the_content (priority 20)rewrite-the-content.phpDOM manipulation of post content
pre_get_postsquery-hooks.phpModify main queries
the_content_more_linkquery-hooks.phpMore link customisation
body_classquery-hooks.phpCustom body classes
max_srcset_image_widthquery-hooks.phpImage srcset limit
get_the_archive_titletext-utilities.phpArchive title format
human_time_difftext-utilities.phpTime difference format

Feeds

HookFilePurpose
rss2_itemfeed.php, query-hooks.phpRSS item customisation
the_content_feedfeed.phpFeed content modification
atom_entryquery-hooks.phpAtom feed entry

SEO & Social

HookFilePurpose
wpseo_opengraph_imagedezeen-events.phpOG image override
wpseo_twitter_imagedezeen-events.phpTwitter image override
wpseo_opengraph_descdezeen-events.phpOG description override
wpseo_frontend_presentersquery-hooks.phpSEO presenter modification
HookFilePurpose
nav_menu_css_classmenu.php, dezeen-edit-taxonomies.phpMenu item CSS classes
wp_update_nav_menu_itemdezeen-edit-taxonomies.phpMenu item updates

ACF

HookFilePurpose
acf/initadvanced-custom-fields.phpRegister ACF fields and update CPTs
acf/update_valuequery-hooks.phpACF value update handling

AMP

HookFilePurpose
amp_post_template_*amp.phpAMP template customisation
pre_amp_render_postamp.phpPre-render AMP processing

Algolia

HookFilePurpose
algolia_searchable_post_recordsalgolia.phpCustomise Algolia records

Configuration Constants

Defined in src/configuration.php:

  • PRIMARY_CATEGORIES — Map of primary category slugs
  • CM_API — Campaign Monitor API configuration
  • CM_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