BuddyClients Docs

PostQuery
in package

Queries the database for post data.

Retrieves posts of various types.

Tags
since
0.1.0

Table of Contents

Properties

$max  : int
The number of posts per page.
$posts  : array<string|int, mixed>
The result of the post query

Methods

__construct()  : mixed
Constructor method.
get_post_ids()  : array<string|int, mixed>
Retrieves post IDs.

Properties

$max

The number of posts per page.

public int $max

Defaults to -1 for no limit.

$posts

The result of the post query

public array<string|int, mixed> $posts

Methods

__construct()

Constructor method.

public __construct(string $post_type[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
$post_type : string

The slug of the post type.

$args : array<string|int, mixed> = []

} An optional array of args for the post query.

@array   array   $meta           An associative array of meta keys and values.
@string  string  $compare        The compare operator for the meta queries.
                                 Defaults to '='.
@array   array   $tax            An associative arary of tax names and tags.
@int     int     $max            The maximum number of posts to retrieve.

}

Tags
since
0.1.0

get_post_ids()

Retrieves post IDs.

public get_post_ids() : array<string|int, mixed>
Tags
since
0.1.0
Return values
array<string|int, mixed>

An array of post IDs.


        
On this page

Search results