Skip to content

Commit

Permalink
merging in develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Dec 2, 2024
2 parents 69c5264 + fe49de5 commit 7727fbe
Show file tree
Hide file tree
Showing 13 changed files with 1,088 additions and 1,222 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/all-pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- name: Run Node Tests
# See https://github.com/alleyinteractive/action-test-node for more options
uses: alleyinteractive/action-test-node@develop
with:
node-version: '20'

- name: Run PHP Tests
# See https://github.com/alleyinteractive/action-test-php for more options
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

All notable changes to `WP Curate` will be documented in this file.

## 2.4.3 - 2024-10-10
## 2.4.4 - 2024-12-02

- Restore maxNumberOfPosts attribute with a default filterable value of maxPosts.

## 2.4.3 - 2024-11-18

- Enhancement: Post Title block (which allows title overrides for pinned posts) works in Subquery block.

## 2.4.2 - 2024-09-27

- Bug Fix: Posts not of type 'post' are flagged as being deleted.
Expand Down
49 changes: 40 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
# WP Curate

[![Testing Suite](https://github.com/alleyinteractive/wp-curate/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/wp-curate/actions/workflows/unit-test.yml)
[![PHPCS](https://github.com/alleyinteractive/wp-curate/actions/workflows/code-quality.yml/badge.svg)](https://github.com/alleyinteractive/wp-curate/actions/workflows/code-quality.yml)
[![Node Tests](https://github.com/alleyinteractive/wp-curate/actions/workflows/node-tests.yml/badge.svg)](https://github.com/alleyinteractive/wp-curate/actions/workflows/node-tests.yml)
[![All Pull Request Tests](https://github.com/alleyinteractive/wp-curate/actions/workflows/all-pr-tests.yml/badge.svg)](https://github.com/alleyinteractive/wp-curate/actions/workflows/all-pr-tests.yml)

Plugin to curate homepages and other landing pages.
A plugin for WordPress to build flexible, curatable layouts for homepages and landing pages.

WP Curate provides a new query block, which is a more powerful version of the Query Loop block available in WordPress's full site editor that is available on all pages, not just templates edited by the full site editor. Notable improvements include:

- The ability to include more than one post type in the results
- The ability to curate (pin) posts to any location in the results
- The ability to deduplicate posts across multiple query blocks on the same page

By using multiple query blocks on the same page, it is possible to create complex layouts featuring curated posts, recent posts, posts in specific categories, and more, all while ensuring that no post is repeated across multiple blocks.

## Features

### Curation

When adding a WP Curate Query block, editors can choose the number of posts to display, and can optionally select specific posts to appear in any of those locations. This is particularly useful if you have a section on the homepage that you want to retain full editorial control over, where you want to ensure that specific posts appear in specific locations.

### Automatic Backfill

By specifying post types and taxonomy terms, any WP Curate Query block can automatically display the latest posts that meet those criteria, whether curated posts are part of the block or not. This is useful for creating sections that display the latest posts in a specific category, tag, or custom taxonomy. Posts that are backfilled will be previewed in the editor, but will be grayed out to indicate that they are not curated. As new posts are published that meet the query criteria for backfill, they will automatically be displayed without having to edit the homepage or landing page again.

### Deduplication

WP Curate Query blocks can be set to deduplicate posts across multiple blocks on the same page. This ensures that no post is repeated across multiple blocks, even if it meets the criteria for multiple blocks.

### Flexible Templates

WP Curate Query blocks use the same Post Template block that the main Query Loop block uses, allowing for a wide range of layout options. This includes the ability to show or hide featured images, authors, excerpts, dates, and more.

### Parse.ly Support

WP Curate supports integration with Parse.ly for showing posts based on a Parse.ly popular posts query. This allows you to show popular posts on your homepage or landing page without having to manually curate them. As data is updated in Parse.ly, the posts displayed in the WP Curate Query block will automatically update.

## Screenshots

For an up-to-date gallery of screenshots of the plugin in action, see [the screenshots page on the WP Curate wiki](https://github.com/alleyinteractive/wp-curate/wiki/Screenshots).

## Requirements

WP Curate requires PHP 8.1+. It is developed for use on WordPress 6.3+,
though it may also work on earlier versions.
WP Curate requires PHP 8.1+. It is developed for use on WordPress 6.4+.

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Credits

This project is actively maintained by [Alley
Interactive](https://github.com/alleyinteractive). Like what you see? [Come work
with us](https://alley.co/careers/).
This project is actively maintained by [Alley](https://github.com/alleyinteractive).

Like what you see? [Come work with us](https://alley.com/careers/).

## License

Expand Down
4 changes: 3 additions & 1 deletion blocks/post-title/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export default function Edit({
setAttributes,
}: PostTitleEditProps) {
// @ts-ignore
const queryParentId = select('core/block-editor').getBlockParentsByBlockName(clientId, 'wp-curate/query')[0];
const queryParentIds = select('core/block-editor').getBlockParentsByBlockName(clientId, ['wp-curate/query', 'wp-curate/subquery']);
const queryParentId = queryParentIds.length ? queryParentIds[queryParentIds.length - 1] : null;

const {
postId,
pinnedPosts = [],
Expand Down
12 changes: 11 additions & 1 deletion blocks/subquery/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"postId"
],
"providesContext": {
"query": "query"
"query": "query",
"pinnedPosts": "posts",
"customPostTitles": "customPostTitles"
},
"attributes": {
"deduplication": {
Expand Down Expand Up @@ -105,6 +107,14 @@
"uniqueId": {
"default": "",
"type": "string"
},
"customPostTitles": {
"default": [],
"items": {
"default": {},
"type": "object"
},
"type": "array"
}
}
}
2 changes: 1 addition & 1 deletion blocks/subquery/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default function Edit({
'wp-curate/post',
{},
[
['core/post-title', { isLink: true, level: 3 }],
['wp-curate/post-title', { isLink: true, level: 3 }],
],
],
],
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"alleyinteractive/alley-coding-standards": "^2.0",
"mantle-framework/testkit": "^1.1",
"nunomaduro/collision": "^7.10",
"simplehtmldom/simplehtmldom": "^2.0@RC",
"szepeviktor/phpstan-wordpress": "^1.1"
},
"config": {
Expand Down
Loading

0 comments on commit 7727fbe

Please sign in to comment.