\um\coreQuery

Class Query

Summary

Methods
Properties
Constants
__construct()
ajax_paginate()
wp_pages()
forms()
make()
get_recent_users()
count_users_by_status()
get_users_by_status()
count_users()
update_attr()
get_attr()
delete_attr()
has_post_meta()
find_post_id()
post_data()
get_meta_value()
is_core()
$wp_pages
$roles
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$wp_pages

$wp_pages : array

Type

array

$roles

$roles : array

Type

array

Methods

__construct()

__construct() 

Query constructor.

ajax_paginate()

ajax_paginate() 

Ajax pagination for posts

wp_pages()

wp_pages() : array|string

Get wp pages

Returns

array|string

forms()

forms() : mixed

Get all forms

Returns

mixed

make()

make(  $args) : array|boolean|integer|\WP_Query

Do custom queries

Parameters

$args

Returns

array|boolean|integer|\WP_Query

get_recent_users()

get_recent_users(integer  $number = 5) : array

Get last users

Parameters

integer $number

Returns

array

count_users_by_status()

count_users_by_status(  $status) : integer

Count users by status

Parameters

$status

Returns

integer

get_users_by_status()

get_users_by_status(  $status, integer  $number = 5) : array

Get users by status

Parameters

$status
integer $number

Returns

array

count_users()

count_users() : mixed

Count all users

Returns

mixed

update_attr()

update_attr(  $key,   $post_id,   $new_value) 

Using wpdb instead of update_post_meta

Parameters

$key
$post_id
$new_value

get_attr()

get_attr(  $key,   $post_id) : mixed

Get data

Parameters

$key
$post_id

Returns

mixed

delete_attr()

delete_attr(  $key,   $post_id) : boolean

Delete data

Parameters

$key
$post_id

Returns

boolean

has_post_meta()

has_post_meta(  $key, null  $value = null, null  $post_id = null) : boolean

Checks if post has a specific meta key

Parameters

$key
null $value
null $post_id

Returns

boolean

find_post_id()

find_post_id(  $post_type,   $key,   $value) : boolean

Get posts with specific meta key/value

Parameters

$post_type
$key
$value

Returns

boolean

post_data()

post_data(  $post_id) : mixed

Get post data

Parameters

$post_id

Returns

mixed

get_meta_value()

get_meta_value(  $key, null  $array_key = null, null  $fallback = null) : integer|mixed|null|string

Capture selected value

Parameters

$key
null $array_key
null $fallback

Returns

integer|mixed|null|string

is_core()

is_core(  $post_id) : boolean|mixed

Checks if its a core page of UM

Parameters

$post_id

Returns

boolean|mixed