c_ws_plugin__s2member_utils_gets
public class c_ws_plugin__s2member_utils_gets
3.5
( 12 Methods ) Method Summary | |
---|---|
public static array | Retrieves a unique array of all Category IDs in the database. |
public static array | get_all_child_category_ids(int|str $parent_category) Retrieves a unique array of all child Category IDs, within a specific parent Category. |
public static array | Retrieves a unique array of all published Page IDs in the database. |
public static array | get_all_post_ids(str $post_type) Retrieves a unique array of all published Post IDs in the database. |
public static array | get_all_singular_ids_with_ccaps() Retrieves a unique array of all Singular IDs in the database that require Custom Capabilities. |
public static array | get_all_singular_ids_with_sp(bool $exclude_conflicts) Retrieves a unique array of all Singular IDs that require Specific Post/Page Access. |
public static array | get_all_singulars_with_sp(bool $exclude_conflicts) Retrieves a unique array of all published Singulars, protected with Specific Post/Page Access. |
public static array | Retrieves a unique array of all Tag IDs in the database. |
public static array | get_singular_ids_in_terms(array $terms) Retrieves a unique array of Singular IDs in the database, within specific term IDs. |
public static array | get_tags_converted_to_ids(str $tags) Converts a comma-delimited list of: Tag slugs/names/ids, into a unique array of all IDs. |
public static array | get_unavailable_singular_ids_with_ccaps(obj $user) Retrieves a unique array of unavailable Singular IDs that require Custom Capabilities. |
public static array | get_unavailable_singular_ids_with_sp(bool $exclude_conflicts) Retrieves a unique array of unavailable Singular IDs that require Specific Post/Page Access. |
public static array get_all_category_ids()
Retrieves a unique array of all Category IDs in the database.
3.5
WordPress® Function → get_all_category_ids()
array - Unique array of all Category IDs (as integers).
public static array get_all_child_category_ids(int|str $parent_category)
Retrieves a unique array of all child Category IDs, within a specific parent Category.
3.5
int|str $parent_category - A numeric Category ID.
array - Unique array of all Category IDs (as integers) in $parent_category
.
public static array get_all_page_ids()
Retrieves a unique array of all published Page IDs in the database.
3.5
array - Unique array of all Page IDs (as integers).
public static array get_all_post_ids(str $post_type)
Retrieves a unique array of all published Post IDs in the database.
3.5
str $post_type - Optional. If provided, return all Post IDs of a specific Post Type. Otherwise, return all Post IDs that are NOT of these Post Types: page|attachment|nav_menu_item|revision
.
array - Unique array of all Post IDs (as integers), including Custom Post Types; or all Post IDs of a specific Post Type.
public static array get_all_singular_ids_with_ccaps()
Retrieves a unique array of all Singular IDs in the database that require Custom Capabilities.
111101
array - Unique array of all Singular IDs (as integers) that require Custom Capabilities.
public static array get_all_singular_ids_with_sp(bool $exclude_conflicts)
Retrieves a unique array of all Singular IDs that require Specific Post/Page Access.
111101
bool $exclude_conflicts - Optional. Defaults to false. If true, return ONLY those which are NOT in conflict with any other Restriction Types. The $exclude_conflicts
argument should be used whenever we introduce a list of option values to a site owner. Helping them avoid mishaps. Please note, the $exclude_conflicts
argument implements a resource-intensive processing routine.
array - Unique array of all Singular IDs (as integers) that require Specific Post/Page Access.
public static array get_all_singulars_with_sp(bool $exclude_conflicts)
Retrieves a unique array of all published Singulars, protected with Specific Post/Page Access.
111101
WordPress® Function → get_posts()
bool $exclude_conflicts - Optional. Defaults to false. If true, return ONLY those which are NOT in conflict with any other Restriction Types. The $exclude_conflicts
argument should be used whenever we introduce a list of option values to a site owner. Helping them avoid mishaps. Please note, the $exclude_conflicts
argument implements a resource-intensive processing routine.
array - Unique array of all Singulars (i.e. Posts/Pages ) protected with Specific Post/Page Access. Includes Custom Post Types also, as specified by site owner's Specific Post/Page Restrictions.
public static array get_all_tag_ids()
Retrieves a unique array of all Tag IDs in the database.
3.5
array - Unique array of all Tag IDs (as integers).
public static array get_singular_ids_in_terms(array $terms)
Retrieves a unique array of Singular IDs in the database, within specific term IDs.
Only returns Singular IDs that are within the $terms
passed through this function.
110912
array $terms - Required. An array of term IDs.
array - Unique array of all Singular IDs (as integers) within the $terms
passed through this function.
public static array get_tags_converted_to_ids(str $tags)
Converts a comma-delimited list of: Tag slugs/names/ids, into a unique array of all IDs.
111101
str $tags - Tag slugs/names/IDs; comma-delimited.
array - Unique array of Tag IDs (as integers). With Tag slugs/names converted to IDs.
public static array get_unavailable_singular_ids_with_ccaps(obj $user)
Retrieves a unique array of unavailable Singular IDs that require Custom Capabilities.
Only returns Singular IDs that require Custom Capabilities;
and ONLY those which are NOT satisfied by $user
.
111101
obj $user - Optional. A WP_User
object. If this is a valid WP_User
object, test against this $user
, else all are unavailable.
array - Unique array of all Singular IDs (as integers) NOT available to $user
, due to Custom Capability Restrictions.
public static array get_unavailable_singular_ids_with_sp(bool $exclude_conflicts)
Retrieves a unique array of unavailable Singular IDs that require Specific Post/Page Access.
Only returns Singular IDs that require Specific Post/Page Access; and ONLY those which are NOT satisfied by the current Visitor.
111101
bool $exclude_conflicts - Optional. Defaults to false. If true, return ONLY those which are NOT in conflict with any other Restriction Types. The $exclude_conflicts
argument should be used whenever we introduce a list of option values to a site owner. Helping them avoid mishaps. Please note, the $exclude_conflicts
argument implements a resource-intensive processing routine.
array - Unique array of all Singular IDs (as integers) NOT available to current Visitor, due to Specific Post/Page Restrictions.
Get utilities.