Skip to content

Commit

Permalink
Updates for WordPress 6.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Mar 29, 2023
1 parent 602b825 commit 0bb94c0
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This library provides well-documented classes which represent many of the associ

## Current Status

Last updated for WordPress 6.1.
Last updated for WordPress 6.2.

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"phpstan/phpstan-strict-rules": "^1.1",
"phpunit/phpunit": "^9.0",
"roots/wordpress-core-installer": "^1.0.0",
"roots/wordpress-full": "~6.1.0"
"roots/wordpress-full": "~6.2.0"
},
"funding": [
{
Expand Down
12 changes: 12 additions & 0 deletions src/WP_Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,18 @@ class WP_Query extends Shared\Base implements DateQuery\WithArgs, MetaQuery\With
*/
public string $s;

/**
* Array of column names to be searched.
*
* Accepts 'post_title', 'post_excerpt', and 'post_content'.
*
* Default empty array.
*
* @var array<int, string>
* @phpstan-var list<'post_title'|'post_excerpt'|'post_content'>
*/
public array $search_columns;

/**
* Second of the minute.
*
Expand Down
14 changes: 0 additions & 14 deletions src/wp_insert_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,6 @@ class wp_insert_post extends Shared\Base {
*/
public string $pinged;

/**
* The date when the post was last modified.
*
* Default is the current time.
*/
public string $post_modified;

/**
* The date when the post was last modified in the GMT timezone.
*
* Default is the current time.
*/
public string $post_modified_gmt;

/**
* Set this for the post it belongs to, if any.
*
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/BasicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public function testBasicParamsAreCorrectlyConvertedToArray(): void {
public function testUnknownParamsAreIncludedInArray(): void {
$args = new \Args\WP_Query;

self::assertObjectNotHasAttribute( 'hello', $args );

$args->attachment_id = 123;
$args->hello = 'world';

Expand Down
1 change: 1 addition & 0 deletions tests/shapes/WP_Query.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ string|string[] $post_type
int $posts_per_archive_page
int $posts_per_page
string $s
array $search_columns
int $second
bool $sentence
bool $suppress_filters
Expand Down
2 changes: 0 additions & 2 deletions tests/shapes/wp_insert_post.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ string $post_date
string $post_date_gmt
string $post_excerpt
string $post_mime_type
string $post_modified
string $post_modified_gmt
string $post_name
int $post_parent
string $post_password
Expand Down
2 changes: 0 additions & 2 deletions tests/wp_insert_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
$args->post_name = 'hello-world';
$args->to_ping = 'http://example.org,http://example.net';
$args->pinged = 'http://example.com';
$args->post_modified = '2001-01-01 01:01:01';
$args->post_modified_gmt = '2001-01-01 01:01:01';
$args->post_parent = 123;
$args->menu_order = 0;
$args->post_mime_type = 'image/jpeg';
Expand Down

0 comments on commit 0bb94c0

Please sign in to comment.