Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] trunk from ryanwelcher:trunk #16

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/Traits/Date_Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function process_date_query(): void {
$range = $date_query['range'] ?? false;
if ( $date_query && $range && ! empty( $range ) ) {
$date_queries = $this->process_date_range( $range );

} else {
$date_queries = array();
$date_relationship = $date_query['relation'] ?? null;
$date_primary = $date_query['date_primary'] ?? null;
if ( $date_query && $date_relationship && $date_primary ) {
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Advanced Query Loop
* Description: Query loop block variations to create custom queries.
* Plugin URI: https://github.com/ryanwelcher/advanced-query-loop/
* Version: 3.0.1
* Version: 3.1.0
* Requires at least: 6.2
* Requires PHP: 7.4
* Author: Ryan Welcher
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "advanced-query-loop",
"version": "3.0.1",
"version": "3.1.0",
"description": "Query loop block variations to create custom queries.",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Generate complicated post meta queries using an interface that allows you to cre

#### Date Query

Query item before a date, after a date or between two dates!
Query items before a date, after a date or between two dates or choose to show the post from the last 1, 3, 6 and 12 months.

#### Post Order controls

Expand All @@ -51,8 +51,9 @@ Sort in ascending or descending order by:
- Meta Value
- Meta Value Num
- Random
- Menu Order ( props to @jvanja )
- Post ID ( props to @markhowellsmead )
- Menu Order (props to @jvanja)
- Name (props @philbee)
- Post ID (props to @markhowellsmead)

**Please note that this is a slight duplication of the existing sorting controls. They both work interchangeably but it just looks a bit odd in the UI**

Expand Down
19 changes: 12 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: welcher
Tags: Query Loop, Custom Queries
Requires at least: 6.2
Tested up to: 6.5.2
Stable tag: 3.0.1
Stable tag: 3.1.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -39,22 +39,21 @@ Choose whether you want to start at the first or 100th!
Generate complicated post meta queries using an interface that allows you to create a query based on `meta_key`, `meta_value` and the `compare` options. Combine multiple queries and determine if they combine results (OR) or narrow them down (AND).

==== Date Query ====
Query items before a date, after a date or between two dates!
Query items before a date, after a date or between two dates or choose to show the post from the last 1, 3, 6 and 12 months.

==== Post Order controls ====
Sort in ascending or descending order by:

- Author
- Comment Count
- Date
- Included Posts
- Last Modified Date
- Menu Order ( props to @jvanja )
- Title
- Meta Value
- Meta Value Num
- Post ID ( props to @markhowellsmead )
- Random
- Title
- Menu Order (props to @jvanja)
- Name (props @philbee)
- Post ID (props to @markhowellsmead)

**Please note that this is a slight duplication of the existing sorting controls. They both work interchangeably but it just looks a bit odd in the UI**

Expand All @@ -65,6 +64,12 @@ Sort in ascending or descending order by:
3. Query posts before a date, after a date or between two dates.

== Changelog ==
= 3.1.0 =
* Add dynamic date ranges to see posts from the last 1, 3, 6 and 12 months.
* Insert a new instance by typing "AQL" or "aql" and pressing enter.
* Adds sorting by Name (props @philbee).
* Bug fixes.

= 3.0.1 =
* Addresses some PHP fatal errors caused by type hinting.

Expand Down
Loading