Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new Curated List block, block pattern, and map functionality (#3)
* feat: initial post type and block setup Sets up custom post types and Listing block prototype. * feat: improvements to block structure and meta Instead of just registering a single Listing block and selecting the type in the parent post, this registers a separate block for each listing type (all of which use the same code). * fix: error after fetching post * feat: handle meta programmatically, add permalink prefix * fix: pull request feedback; refactor post types config Addresses pull request feedback and refactors post types config into a more DRY treatment. * chore: use permalink slugs defined in constant; spaces in JSON * feat: add Curated List block; remove Curated List CPT This removes the Curated List CPT in favor of a wrapper block that can be inserted into any other post or page. This block can contain Listing blocks to create curated lists anywhere, and can be converted to a Reusable Block if it needs to be reusable. * chore: update class docblocks, move blocks to newspack category * chore: remove unused block_categories filter * fix: remove fse action * feat: listing InnerBlocks inherit parent Curated List attributes Lays out a method of passing attributes data from the Curated List block to its child Listing inner blocks, without relying on contexts. We basically duplicate parent block attributes on each child block and sync the values of those attributes. * fix: wrong selector in sidebar JS * feat: change curated list to dynamic render * feat: add "business" block pattern for Marketplace listings This establishes a pattern for providing block patterns for particular listings CPTs. This might let us provide structured content without having to register metadata fields for listing content. * feat: map functionality via Jetpack Maps block Adds support for location-based data using the jetpack/maps block. If a listing CPT of any type contains a jetpack/map block with location data, the location data is used to show the listing on a map for any Curated List blocks containing the listing post. * feat: check for jetpack/maps block before using * feat: add Jetpack Contact Info block to Business Listing block pattern * feat: sync block content to post meta Sets up a sync from certain content blocks to post meta fields. This will help us more easily implement search/filter functionality for listing posts on a large scale. * fix: use listing post meta to get locations in curated list block * chore: phpdoc types should be lowercase * feat: don't register Curated List block in listings CPTs We want to avoid letting editors nest Curated Lists inside list items which could be nested inside Curated Lists which could be inside list items which could be... etc. * fix: css fixes for compatibility with core block editor (sans plugin) * fix: listing block parent should be list container, not curated list * fix: callable for settings fields * fix: block patterns for core WP Block patterns and block pattern categories can only be registered on init or admin_init hooks in WP 5.5. * chore: remove redundant docblock comment * fix: flush permalinks only after registering CPTs
- Loading branch information