Skip to content

WordPress plugins for Contentful integration and GraphQL shortcode support

License

Notifications You must be signed in to change notification settings

SilverAssist/contentful-wordpress-plugins

Repository files navigation

Contentful WordPress Plugins

A collection of WordPress plugins designed for Contentful integration and enhanced GraphQL functionality, with unified admin settings via Silver Assist Settings Hub.

CI License WordPress PHP

πŸš€ Plugins Included

1. Community Listings CPT v2.1.0

Directory: community-listings/

Registers a hierarchical "Community" custom post type for state and city memory care listings with WPGraphQL support.

Features:

  • Hierarchical CPT with state β†’ city structure
  • REST API filtering by listing type and state
  • WPGraphQL integration with shortcode rendering
  • Meta fields for Contentful integration
  • SEO-friendly URL structure
  • Silver Assist Settings Hub integration

2. Contentful Tables v4.1.1

Directory: contentful-tables/

Displays Contentful content components (tables, charts, cards, forms) using shortcodes with WPGraphQL support.

Features:

  • Data tables with filtering capabilities
  • Charts and data visualizations
  • Responsive card grids
  • Contact forms
  • Table of contents generation
  • WPGraphQL shortcode processing
  • Admin settings panel
  • Silver Assist Settings Hub integration

3. GraphQL Shortcode Support v1.1.0

Directory: graphql-shortcode-support/

Applies do_shortcode() to WPGraphQL content fields, rendering shortcodes as HTML in GraphQL responses.

Features:

  • Automatic shortcode processing in GraphQL content fields
  • Dedicated renderedContent field
  • Configurable post types and fields
  • Toggle for raw vs. processed content
  • Admin settings interface
  • Silver Assist Settings Hub integration

πŸ“‹ Requirements

πŸ›  Installation

Option 1: Download Latest Release

  1. Go to Releases
  2. Download the latest ZIP files
  3. Upload via WordPress Admin β†’ Plugins β†’ Add New β†’ Upload

Option 2: Clone Repository

cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/SilverAssist/contentful-wordpress-plugins.git
cd contentful-wordpress-plugins

# Install production dependencies for all plugins
make install

Option 3: Individual Plugin Installation

Clone or copy individual plugin directories to your WordPress plugins folder and install dependencies.

βš™οΈ Configuration

Silver Assist Settings Hub (Recommended)

When the wp-settings-hub package is installed, all three plugins register under a unified Silver Assist top-level menu in WordPress admin:

WordPress Admin
β”œβ”€β”€ Silver Assist πŸ›‘οΈ
β”‚   β”œβ”€β”€ Dashboard              ← Overview of all plugins
β”‚   β”œβ”€β”€ Community Listings     ← Plugin status & info
β”‚   β”œβ”€β”€ Contentful Tables      ← Table settings & shortcodes
β”‚   └── GraphQL Shortcodes     ← Processing settings

If the Settings Hub is not installed, each plugin falls back to its own standalone settings page.

Community Listings CPT

  • No additional configuration required
  • Custom post type is registered automatically
  • Access via WordPress Admin β†’ Communities
  • Settings via Silver Assist β†’ Community Listings (or Settings β†’ Community Listings)

Contentful Tables

  • Settings via Silver Assist β†’ Contentful Tables (or Settings β†’ Contentful Tables)
  • Set up data sources and styling options
  • Test shortcodes in posts/pages

GraphQL Shortcode Support

  • Settings via Silver Assist β†’ GraphQL Shortcodes (or Tools β†’ GraphQL Shortcodes)
  • Choose which post types and fields to process
  • Toggle automatic processing on/off

πŸ“ Usage Examples

Community Listings

// REST API queries
GET /wp-json/wp/v2/community?listing_type=state
GET /wp-json/wp/v2/community?state_short=TX

// GraphQL Query
{
  communities {
    nodes {
      title
      renderedContent
      communityMeta {
        listingType
        stateShort
      }
    }
  }
}

Contentful Tables Shortcodes

[contentful_table id="pricing-data"]
[contentful_chart id="statistics" type="bar"]
[contentful_cards id="services" filters="medicare"]
[contentful_toc id="guide-sections"]
[contentful_form id="contact-form"]

GraphQL Shortcode Processing

{
  posts {
    nodes {
      title
      content           # Raw shortcodes or processed HTML
      renderedContent   # Always processed HTML
    }
  }
}

πŸ— Architecture

All plugins follow SilverAssist WordPress Plugin Development Standards v2.0.0:

  • βœ… PSR-4 autoloading
  • βœ… Interface-driven design
  • βœ… Priority-based component loading
  • βœ… WordPress Coding Standards (WPCS)
  • βœ… PHPStan Level 8 analysis
  • βœ… Security best practices

πŸ§ͺ Development

Requirements

  • PHP 8.2+
  • Composer
  • Node.js (for any build processes)

Setup

git clone https://github.com/SilverAssist/contentful-wordpress-plugins.git
cd contentful-wordpress-plugins

# Install dev dependencies for all plugins
make install-dev

Quality Assurance

# Run all quality checks (PHPCS + PHPStan)
make test

# Individual checks
make phpcs        # WordPress Coding Standards
make phpcs-fix    # Auto-fix code style issues
make phpstan      # Static analysis (Level 8)
make lint         # Run PHPCS + PHPStan together

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Please ensure your code follows our coding standards and includes appropriate tests.

πŸ“„ License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

  • βœ… Permitted: Personal use, educational use, evaluation, non-commercial research
  • ❌ Prohibited: Commercial use without separate commercial license

For commercial licensing, please contact Silver Assist.

πŸ› Support & Issues

🎯 Roadmap

  • Silver Assist Settings Hub integration
  • CI/CD pipeline with GitHub Actions
  • PHPCS + PHPStan compliance (Level 8)
  • Automated release packaging
  • Plugin update mechanism via GitHub
  • Automated testing with WordPress core versions
  • Additional Contentful content types
  • Performance optimizations
  • Multilingual support

πŸ‘₯ Authors

Silver Assist


Made with ❀️ for the WordPress and Contentful communities

About

WordPress plugins for Contentful integration and GraphQL shortcode support

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published