Plugin Features
Overview
Yoko Core is a comprehensive WordPress plugin that serves as the foundation toolkit for all Yoko Co managed WordPress sites. It provides shared utilities, integrations, content management tools, and workflow enhancements that extend WordPress functionality across multiple client sites.
Content Management & Configuration
YAML-Based Site Configuration
The plugin enables theme-level configuration through a yoko.yml file, allowing developers to define custom post types, taxonomies, and relational taxonomies using a simple YAML syntax. This provides a code-free way to scaffold site-specific content structures without hardcoding them into themes.
Use Case: Quickly deploy custom post types and taxonomies across multiple sites with consistent configuration.
Key Files:
/includes/Yoko.php- Main configuration loader/includes/Generators/Post_Type.php- Custom post type generator/includes/Generators/Taxonomy.php- Taxonomy generator/templates/yoko.yml- Configuration template
Custom Post Type Sync (CPTSync)
CPTSync provides a robust scaffolding for synchronizing custom post types with external data sources (like AMS systems). It uses Action Scheduler to manage recurring syncs, individual record updates, and full synchronizations with built-in logging and duplicate detection.
Use Case: Automatically sync member directories, event listings, or product catalogs from external APIs to WordPress.
Key Files:
/includes/CPTSync.php- Core sync utility- Provides actions:
Yoko\Sync\Records\{cpt_slug},Yoko\Sync\Record\{cpt_slug},Yoko\Sync\All\{cpt_slug}
Hierarchical Posts Enhancement
Extends WordPress hierarchical post types with advanced features including template inheritance from parent posts, meta value inheritance, and an enhanced admin dashboard display for nested content structures.
Use Case: Build nested resource libraries or documentation sites where child pages inherit settings from parents.
Key Files: /includes/HierarchicalPosts.php
Activation: Add yoko-hierarchical and page-attributes post type supports
Content Corral
A specialized workflow system for managing content creation and editorial processes. Includes a dedicated user role, custom taxonomies, reference management, and a sitemap importer for bulk content organization.
Use Case: Manage large-scale content projects with editorial workflows and content planning.
Key Files:
/includes/Workflow/ContentCorral.php/includes/Workflow/ContentCorral/- Supporting classes
Content Protection & Access Control
Content Protection System (YokoCP)
Implements role-based content access control allowing posts, pages, and custom post types to be restricted to specific user roles or membership levels. Integrates with search engine indexing controls and provides frontend/backend access restrictions.
Use Case: Create members-only content areas, gated resources, or role-specific documentation.
Key Files:
/includes/YokoCP.php/includes/ContentProtection/AllowIndexers.php
Gutenberg Blocks
The plugin provides several custom Gutenberg blocks built with React:
Add to Calendar Block
Generates calendar event links for Google Calendar, Outlook, iCal, and other calendar applications.
Key Files:
/src/add-to-calendar/- React components/includes/Blocks/AddToCalendar.php- Server-side support
Local Time Block
Displays times adjusted to the visitor's local timezone or specified timezone.
Key Files:
/src/local-time/- React components/includes/Blocks/LocalTime.php- Server-side support
Core Navigation & Post Title Variations
Enhanced variations of WordPress core blocks with additional customization options.
Key Files:
/includes/Blocks/CoreNavigation.php/includes/Blocks/CorePostTitle.php
Shortcodes
[yoko-content]
Enables dynamic content reuse and templating with variable replacement.
[partial]
Includes partial template files with parameter support.
[heroicon]
Embeds Heroicons SVG icons inline.
[local-time]
Renders timezone-aware timestamps from both backend settings and browser detection.
[add-to-calendar]
Creates add-to-calendar links for events.
Key Files: /includes/Shortcodes/ directory
Beaver Builder Modules
Custom Beaver Builder modules extend the page builder:
- Add to Calendar - Event calendar integration module
- Heroicons - Icon picker and display
- iFrame AutoResize - Self-sizing iframes
- Keen Slider - Advanced carousel/slider
- Boilerplate - Template for creating new modules
Key Files: /bb/ directory
Association Management System (AMS) Integrations
Pre-built client classes for connecting to popular AMS platforms:
- Impexium -
ImpexiumClient.php - NetForum -
NetForum.php - Nimble -
NimbleClient.php,NimbleSFClient.php - YourMembership -
YourMembershipClient.php - Personify360 -
Personify360Client.php - Euclid -
EuclidClient.php - Naylor -
NaylorClient.php - Salesforce -
SalesForceClient.php
Use Case: Integrate member data, event registrations, or e-commerce from AMS platforms.
Key Files: /includes/AMS/ directory
WordPress Plugin Integrations
Beaver Builder
Conditional visibility controls, custom modules, relational taxonomy support in post modules, and FacetWP compatibility for infinite scroll.
FacetWP
Resolves infinite scroll pagination issues with Beaver Builder post modules.
SearchWP
Forces partial search matching for better search results.
Typesense
Full integration with Typesense search including instant search shortcode and customization options.
Gravity Forms
Extended form integration and customization hooks.
ACF (Advanced Custom Fields)
Timezone selector auto-population, custom field integrations, and Content Corral field groups.
WP Activity Log
Custom event logging for Yoko-specific actions.
CMB2
Meta box framework integration.
Git Updater
Enables plugin updates directly from GitHub releases.
Key Files: /includes/Integrations/ directory
Developer Tools & Utilities
Custom Logging System
Flexible file-based logging with date-based or static filenames, per-post logging, and admin metabox display.
Functions:
yoko_log($message, $filename)- Date-prefixed loggingyoko_log_nodate($message, $filename)- Static filename loggingyoko_post_log($message, $post_id)- Post-specific loggingyoko_log_exists($filename)- Check log existenceyoko_log_content($filename)- Retrieve log contents
Use Case: Debug integrations, track sync operations, or monitor content import processes.
Key Files:
/includes/Logger.php/includes/functions.php
WP-CLI Commands
Custom WP-CLI commands for maintenance and troubleshooting:
Available Commands:
wp yoko rel_tax cleanup --cpt=[cpt_slug]- Repair relational taxonomy terms
Key Files: /includes/WP_CLI.php
PDF Viewer & Parser
Inline PDF viewing with customizable access controls, automatic text extraction for search indexing, and attachment-level viewing permissions.
Use Case: Display PDFs inline with role-based access, make PDF content searchable.
Key Files: /includes/PDFViewer.php
URL Proxy
Proxies external URLs for iframe rendering with anchor filtering, source attribute rewriting, and transient caching.
Use Case: Safely embed external content in iframes with content filtering.
Key Files: /includes/URLProxy.php
Google Geocoding
Automated geocoding integration for address-to-coordinate conversion with scheduled refresh actions.
Key Files: /includes/Google/Geocoder.php
Customization & Branding
Admin Interface Customization
Custom admin bar modifications, enhanced hierarchical post displays, improved search functionality, and environment change detection.
Key Files:
/includes/Admin/AdminUI.php/includes/Admin/YokoAdmin.php/includes/Admin/AdminBar.php/includes/Admin/AdminSearch.php
Frontend Branding
Configurable Yoko Co branding elements with opt-out filters.
Key Files: /includes/Branding/ directory
CSS & Body Classes
Dynamic CSS class injection for styling hooks based on content context, user roles, and environment.
Key Files:
/includes/CSSClasses.php/includes/BodyClasses.php
Performance & Maintenance
Scheduled Content Unpublishing
Automatically unpublish posts at a specified date/time using ACF date picker fields and Action Scheduler.
Use Case: Expire time-sensitive content like job postings or event announcements.
Key Files: /includes/ScheduledUnpublishPosts.php
Action Scheduler Integration
Leverages WooCommerce Action Scheduler for reliable background task execution including syncs, geocoding updates, and scheduled unpublishing.
Key Files: /includes/Integrations/ActionScheduler.php
Permalink Length Limiting
Configurable permalink length limits with automatic slug truncation and manual truncation tools.
Use Case: Prevent URL length issues with SEO or server configurations.
Key Files: /includes/LimitPermalinkLengths.php
AI Integration
OpenAI Integration
Optional OpenAI API integration for AI-powered features (requires OPENAI_API_KEY constant).
Key Files: /includes/OpenAI.php
Editor Enhancements
TinyMCE Customization
Custom editor styles and button configurations.
Key Files: /includes/Integrations/TinyMCE.php
Content Editing Tools
Enhanced editing interfaces for hierarchical content, relational taxonomies, and protected content.
Key Files: /includes/Editing.php
Analytics & Tracking
Appsero Analytics
Opt-in telemetry and usage tracking for plugin improvement (only on production environments).
Key Files: yoko-core.php - appsero_init_tracker_yoko_core() function
Site Tracking
Custom tracking and analytics integration hooks.
Key Files: /includes/Tracking.php
Developer Notes
Dependencies
Required:
- PHP 8.0 or higher
- WordPress 4.5 or higher
- Composer-managed dependencies (included in
/lib/)
Optional Plugins Enhanced:
- Beaver Builder
- Advanced Custom Fields (ACF)
- FacetWP
- SearchWP
- Gravity Forms
- WP Activity Log
- CMB2
- WP Mail SMTP
- Enable Media Replace
- Git Updater
Compatibility
The plugin is tested with PHP 8.1-8.3 and WordPress 6.8+. It follows WordPress coding standards and uses PSR-4 autoloading under the YokoCo\ namespace.
Extension Patterns
Custom Post Types: Define in yoko.yml or use Generators\Post_Type class
Shortcodes: Add new shortcodes in /includes/Shortcodes/ directory
Blocks: Create React blocks in /src/ with PHP support in /includes/Blocks/
Integrations: Add plugin integrations in /includes/Integrations/ directory
AMS Clients: Extend base AMS client classes in /includes/AMS/ directory
Hooks & Filters
The plugin provides numerous action and filter hooks for customization:
yoko_core_plugin_init- Main initialization hookyoko_core_plugin_updated- Fires when plugin version updatesyoko_after_setup_ctps- After custom post types setupyoko_pdf_should_use_pdf_viewer- Control PDF viewer usageyoko_core_show_frontend_branding- Toggle frontend branding- Many integration-specific hooks in respective classes
Configuration
Primary configuration is handled through:
yoko.ymlfile in theme root (copy from/templates/yoko.yml)- WordPress constants (e.g.,
OPENAI_API_KEY) - WordPress options for feature toggles
Logging & Debugging
Use built-in logging functions for troubleshooting:
- Logs stored in
wp-content/uploads/yoko-logs/ - Post-specific logs appear in admin metaboxes
- Integration logs categorized by feature area
Version Updates
Plugin uses Git Updater for automatic updates from GitHub releases. Release assets are automatically built via GitHub Actions workflow.