Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\Utilities

s2member\includes\classes\utils-gets.inc.php at line #28

Class c_ws_plugin__s2member_utils_gets

c_ws_plugin__s2member_utils_gets

public class c_ws_plugin__s2member_utils_gets

Get utilities.

Since:

3.5


( 12 Methods )
Method Summary
public static array

get_all_category_ids()

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

get_all_page_ids()

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

get_all_tag_ids()

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.

( 12 Methods )
Method Detail

s2member\includes\classes\utils-gets.inc.php at line #40

get_all_category_ids()

public static array get_all_category_ids()

Retrieves a unique array of all Category IDs in the database.

Since:

3.5

Uses:

WordPress® Functionget_all_category_ids()

Returns:

array - Unique array of all Category IDs (as integers).

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #56

get_all_child_category_ids()

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.

Since:

3.5

Parameters:

int|str $parent_category - A numeric Category ID.

Returns:

array - Unique array of all Category IDs (as integers) in $parent_category.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #133

get_all_page_ids()

public static array get_all_page_ids()

Retrieves a unique array of all published Page IDs in the database.

Since:

3.5

Returns:

array - Unique array of all Page IDs (as integers).

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #116

get_all_post_ids()

public static array get_all_post_ids(str $post_type)

Retrieves a unique array of all published Post IDs in the database.

Since:

3.5

Parameters:

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.

Returns:

array - Unique array of all Post IDs (as integers), including Custom Post Types; or all Post IDs of a specific Post Type.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #150

get_all_singular_ids_with_ccaps()

public static array get_all_singular_ids_with_ccaps()

Retrieves a unique array of all Singular IDs in the database that require Custom Capabilities.

Since:

111101

Returns:

array - Unique array of all Singular IDs (as integers) that require Custom Capabilities.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #204

get_all_singular_ids_with_sp()

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.

Since:

111101

Parameters:

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.

Returns:

array - Unique array of all Singular IDs (as integers) that require Specific Post/Page Access.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #326

get_all_singulars_with_sp()

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.

Since:

111101

Uses:

WordPress® Functionget_posts()

Parameters:

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.

Returns:

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.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #72

get_all_tag_ids()

public static array get_all_tag_ids()

Retrieves a unique array of all Tag IDs in the database.

Since:

3.5

Returns:

array - Unique array of all Tag IDs (as integers).

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #350

get_singular_ids_in_terms()

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.

Since:

110912

Parameters:

array $terms - Required. An array of term IDs.

Returns:

array - Unique array of all Singular IDs (as integers) within the $terms passed through this function.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #88

get_tags_converted_to_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.

Since:

111101

Parameters:

str $tags - Tag slugs/names/IDs; comma-delimited.

Returns:

array - Unique array of Tag IDs (as integers). With Tag slugs/names converted to IDs.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #171

get_unavailable_singular_ids_with_ccaps()

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.

Since:

111101

Parameters:

obj $user - Optional. A WP_User object. If this is a valid WP_User object, test against this $user, else all are unavailable.

Returns:

array - Unique array of all Singular IDs (as integers) NOT available to $user, due to Custom Capability Restrictions.

[ back to top ]

s2member\includes\classes\utils-gets.inc.php at line #296

get_unavailable_singular_ids_with_sp()

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.

Since:

111101

Parameters:

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.

Returns:

array - Unique array of all Singular IDs (as integers) NOT available to current Visitor, due to Specific Post/Page Restrictions.

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail