Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:38-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13100 2011-12-20T09:50:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=57836#p57836 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=55518#p55518 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=51892#p51892 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=49987#p49987 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=47781#p47781 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=46182#p46182 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:48:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=44312#p44312 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: October 3, 2011, 1:48 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:48 pm


]]>
2011-10-03T03:41:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=43019#p43019 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=41265#p41265 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=40021#p40021 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:21:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=38163#p38163 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: September 17, 2011, 2:21 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:21 pm


]]>
2011-09-14T01:28:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=36744#p36744 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:28 am


]]>
2011-09-13T12:03:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=35472#p35472 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=31593#p31593 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]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 list of all Category IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Category IDs. */ public static function get_all_category_ids ( ) { $ids = get_all_category_ids ( ) ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all child Category IDs from the database. * * @package s2Member\Utilities * @since 3.5 * * @param int|str $parent Expects a numeric Category ID. * @return array Array of all Category IDs under the ``$parent``. */ public static function get_all_child_category_ids ( $parent = FALSE ) { if ( is_numeric ( $parent ) && is_array ( $categories = get_categories ( "child_of=" . $parent ) ) ) foreach ( $categories as $child_category ) $child_ids [ ] = $child_category - term_id ; /**/ return ( array ) $child_ids ; } /** * Retrieves a list of all Tag IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Tag IDs. */ public static function get_all_tag_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ foreach ( ( array ) get_tags ( ) as $tag ) $ids [ ] = $tag - term_id ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all Post IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Post IDs. * Includes Custom Post Types. Excludes `page|attachment|revision`. */ public static function get_all_post_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ $ids = $wpdb - get_col ( "SELECT `ID` FROM `" . $wpdb - posts . "` WHERE `post_status` = 'publish' AND `post_type` NOT IN('page','attachment','revision')" ) ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all Page IDs from the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Page IDs. */ public static function get_all_page_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ $ids = $wpdb - get_col ( "SELECT `ID` FROM `" . $wpdb - posts . "` WHERE `post_status` = 'publish' AND `post_type` = 'page'" ) ; /**/ return ( array ) $ids ; } /** * Converts a comma-delimited list of: Tag slugs/names/ids - into all IDs. * * @package s2Member\Utilities * @since 3.5 * * @param str $tags Tag slugs/names/IDs, comma-delimited. * @return array Array of all Tag IDs. */ public static function convert_tags_2_ids ( $tags = FALSE ) { foreach ( preg_split ( "/[\r \n \t;,]+/" , $tags ) as $tag ) { if ( ( $tag = trim ( $tag ) ) && is_numeric ( $tag ) ) { $ids [ ] = $tag ; } else if ( $tag && is_string ( $tag ) ) { if ( is_object ( $term = get_term_by ( "name" , $tag , "post_tag" ) ) ) { $ids [ ] = $term - term_id ; } else if ( is_object ( $term = get_term_by ( "slug" , $tag , "post_tag" ) ) ) { $ids [ ] = $term - term_id ; } } } /**/ return ( array ) $ids ; } /** * Retrieves a list of singular IDs from the database. * * Only returns Posts that require Custom Capabilities; * and ONLY those which are NOT satisfied by ``$user``. * * @package s2Member\Utilities * @since 3.5 * * @param obj $user Optional. A `WP_User` object. * @return array Array of all singular IDs not available to ``$user`` because of Custom Capability restrictions. */ public static function get_singular_ids_with_ccaps_req ( $user = FALSE ) { global $wpdb ; /* Need global DB obj. */ /**/ 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 $result ) /* Now we need to check Custom Capabilities against $user. */ { if ( ! is_object ( $user ) || ! $user - ID ) /* No ``$user``? / not logged-in?. */ $ids [ ] = $result - post_id ; /* There's no way to satisfy anything here. */ /**/ else if ( is_array ( $ccaps = @ unserialize ( $result - meta_value ) ) ) /**/ foreach ( $ccaps as $ccap ) /* Test all Custom Capability requirements. */ if ( strlen ( $ccap ) ) /* Quick (empty) check here. */ if ( ! $user - has_cap ( "access_s2member_ccap_" . $ccap ) ) { $ids [ ] = $result - post_id ; break ; } } } /**/ return ( array ) $ids ; } /** * Retrieves a list of singular IDs from the database. * * Only returns Posts that require Specific Post/Page Access; * and ONLY those which are NOT satisfied by the current Visitor. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all singular IDs not available to ``$user`` because of Specific Post/Page restrictions. */ public static function get_singular_ids_with_sp_req ( ) { global $wpdb ; /* Need global DB obj. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "specific_ids" ] && is_array ( $sps = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "specific_ids" ] ) ) ) { foreach ( $sps as $sp ) /* Now we need to check access against the current Visitor. */ { if ( $sp && !c_ws_plugin__s2member_sp_access:: sp_access ( $sp , "read-only" ) ) $ids [ ] = $sp ; } } /**/ return ( array ) $ids ; } } } ? [ full view ]s2member\includes\classes\utils-gets.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=27763#p27763 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: July 11, 2011, 6:30 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]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 list of all Category IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Category IDs. */ public static function get_all_category_ids ( ) { $ids = get_all_category_ids ( ) ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all child Category IDs from the database. * * @package s2Member\Utilities * @since 3.5 * * @param int|str $parent Expects a numeric Category ID. * @return array Array of all Category IDs under the ``$parent``. */ public static function get_all_child_category_ids ( $parent = FALSE ) { if ( is_numeric ( $parent ) && is_array ( $categories = get_categories ( "child_of=" . $parent ) ) ) foreach ( $categories as $child_category ) $child_ids [ ] = $child_category - term_id ; /**/ return ( array ) $child_ids ; } /** * Retrieves a list of all Tag IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Tag IDs. */ public static function get_all_tag_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ foreach ( ( array ) get_tags ( ) as $tag ) $ids [ ] = $tag - term_id ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all Post IDs in the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Post IDs. * Includes Custom Post Types. Excludes `page|attachment|revision`. */ public static function get_all_post_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ $ids = $wpdb - get_col ( "SELECT `ID` FROM `" . $wpdb - posts . "` WHERE `post_status` = 'publish' AND `post_type` NOT IN('page','attachment','revision')" ) ; /**/ return ( array ) $ids ; } /** * Retrieves a list of all Page IDs from the database. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all Page IDs. */ public static function get_all_page_ids ( ) { global $wpdb ; /* Need global DB obj. */ /**/ $ids = $wpdb - get_col ( "SELECT `ID` FROM `" . $wpdb - posts . "` WHERE `post_status` = 'publish' AND `post_type` = 'page'" ) ; /**/ return ( array ) $ids ; } /** * Converts a comma-delimited list of: Tag slugs/names/ids - into all IDs. * * @package s2Member\Utilities * @since 3.5 * * @param str $tags Tag slugs/names/IDs, comma-delimited. * @return array Array of all Tag IDs. */ public static function convert_tags_2_ids ( $tags = FALSE ) { foreach ( preg_split ( "/[\r \n \t;,]+/" , $tags ) as $tag ) { if ( ( $tag = trim ( $tag ) ) && is_numeric ( $tag ) ) { $ids [ ] = $tag ; } else if ( $tag && is_string ( $tag ) ) { if ( is_object ( $term = get_term_by ( "name" , $tag , "post_tag" ) ) ) { $ids [ ] = $term - term_id ; } else if ( is_object ( $term = get_term_by ( "slug" , $tag , "post_tag" ) ) ) { $ids [ ] = $term - term_id ; } } } /**/ return ( array ) $ids ; } /** * Retrieves a list of singular IDs from the database. * * Only returns Posts that require Custom Capabilities; * and ONLY those which are NOT satisfied by ``$user``. * * @package s2Member\Utilities * @since 3.5 * * @param obj $user Optional. A `WP_User` object. * @return array Array of all singular IDs not available to ``$user`` because of Custom Capability restrictions. */ public static function get_singular_ids_with_ccaps_req ( $user = FALSE ) { global $wpdb ; /* Need global DB obj. */ /**/ 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 $result ) /* Now we need to check Custom Capabilities against $user. */ { if ( ! is_object ( $user ) || ! $user - ID ) /* No ``$user``? / not logged-in?. */ $ids [ ] = $result - post_id ; /* There's no way to satisfy anything here. */ /**/ else if ( is_array ( $ccaps = @ unserialize ( $result - meta_value ) ) ) /**/ foreach ( $ccaps as $ccap ) /* Test all Custom Capability requirements. */ if ( strlen ( $ccap ) ) /* Quick (empty) check here. */ if ( ! $user - has_cap ( "access_s2member_ccap_" . $ccap ) ) { $ids [ ] = $result - post_id ; break ; } } } /**/ return ( array ) $ids ; } /** * Retrieves a list of singular IDs from the database. * * Only returns Posts that require Specific Post/Page Access; * and ONLY those which are NOT satisfied by the current Visitor. * * @package s2Member\Utilities * @since 3.5 * * @return array Array of all singular IDs not available to ``$user`` because of Specific Post/Page restrictions. */ public static function get_singular_ids_with_sp_req ( ) { global $wpdb ; /* Need global DB obj. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "specific_ids" ] && is_array ( $sps = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "specific_ids" ] ) ) ) { foreach ( $sps as $sp ) /* Now we need to check access against the current Visitor. */ { if ( $sp && !c_ws_plugin__s2member_sp_access:: sp_access ( $sp , "read-only" ) ) $ids [ ] = $sp ; } } /**/ return ( array ) $ids ; } } } ? [ full view ]s2member\includes\classes\utils-gets.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:30 pm


]]>
2011-07-09T06:10:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13100&p=25395#p25395 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utils-gets.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:10 am


]]>