Plugin: dezeen-services
Overview
| Property | Value |
|---|---|
| Plugin Name | Dezeen Services |
| Version | 1.2.0 |
| Author | DenCreative |
| Location | _project/_web/wp-content/plugins/dezeen-services/ |
| Purpose | Most popular widgets — generates cached widget data from analytics and comments |
Architecture
dezeen-services/
├── dezeen-services.php # Main plugin file
├── cron/
│ ├── dezeen.widget.data.cron.php # Cron runner
│ ├── widget-helper.php # Widget data generator
│ ├── _lib/
│ │ ├── widget.lib.php # Widget library
│ │ ├── comments.lib.php # Comment data
│ │ ├── disqus.lib.php # Disqus integration
│ │ ├── ga4.lib.php # Google Analytics 4
│ │ ├── ga.lib.php # Google Analytics (legacy)
│ │ └── simple_html_dom.php # HTML parser
│ └── _config/
│ ├── config.disqus.php # Disqus config
│ ├── config.ga.php # GA config
│ ├── config.general.php # General config
│ └── config.jobs.php # Jobs config
└── assets/
├── scss/widget.scss # Widget styles
└── css/widget.css # Compiled stylesWP-CLI Commands
| Command | Purpose |
|---|---|
wp generate-most-popular | Generate most popular widget data |
wp generate-most-recent | Generate most recent widget data |
wp generate-most-commented | Generate most commented widget data |
wp generate-bolon | Generate Bolon popular/recent data |
wp generate-jobs | Generate jobs popular/featured data |
wp generate-all | Generate all widget data |
Shortcodes
| Shortcode | Purpose |
|---|---|
[most_popular_widget] | Display most popular widget |
Custom Database Table
Table: {prefix}_dezeen_services_data
Stores generated widget data (most popular, most commented, etc.).
Action Hooks (for scheduling)
| Action | Purpose |
|---|---|
dez_ser_create_most_popular_feeds | Generate popular feeds |
dez_ser_create_most_recent_feeds | Generate recent feeds |
dez_ser_create_most_commented | Generate commented feeds |
dez_ser_create_bolon_popular_and_recent | Generate Bolon feeds |
dez_ser_create_jobs_popular_and_featured | Generate jobs feeds |
These actions are intended to be triggered via WP-CLI or system cron.
Data Sources
- Google Analytics 4 — Page view data for "most popular"
- Disqus API — Comment counts for "most commented"
- WordPress queries — Recent posts for "most recent"
Asset Build
Widget styles are compiled via the main webpack.mix.js:
assets/scss/widget.scss→assets/css/widget.css- Also copied to theme:
themes/2016dezeen/assets/css/plugins/dezeen-services-widget.css