Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:05-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13050 2011-12-20T09:50:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=57781#p57781 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\querys.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:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=55463#p55463 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\querys.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:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=51837#p51837 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\querys.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:34:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=49932#p49932 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\querys.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:34 pm


]]>
2011-10-17T15:39:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=47726#p47726 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\querys.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:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=46127#p46127 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\querys.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:47:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=44257#p44257 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: October 3, 2011, 1:47 pm

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

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


]]>
2011-10-03T03:40:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=42964#p42964 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: October 3, 2011, 1:40 am

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

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


]]>
2011-09-27T05:26:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=41210#p41210 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\querys.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:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=39966#p39966 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\querys.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:20:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=38110#p38110 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: September 17, 2011, 2:20 pm

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

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


]]>
2011-09-14T01:27:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=36691#p36691 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: September 13, 2011, 11:27 pm

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

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


]]>
2011-09-13T12:02:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=35419#p35419 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: September 13, 2011, 10:02 am

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

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


]]>
2011-08-15T14:13:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=31526#p31526 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: August 15, 2011, 3:13 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\querys.inc.php ?php /** * Query protection routines. * * 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\Queries * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_querys" ) ) { /** * Query protection routines. * * @package s2Member\Queries * @since 3.5 */ class c_ws_plugin__s2member_querys { /** * Filter all WordPress® queries. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter. * @param bool $force Optional. Defaults to false. If true, we bypass all standard conditions. * However, will never bypass `supress_filters`. * @return null */ public static function query_level_access ( & $wp_query = FALSE , $force = FALSE ) { static $initial_query = true ; /* Tracks initial query Filtering. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_object ( $wp_query ) && ! $wp_query - get ( "suppress_filters" ) ) /* s2Member will always respect the `suppress_filters` query arg. */ { if ( ( $o = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "filter_wp_query" ] ) !== "none" || $force ) /* If `none`; only Filter with $force. */ { if ( $force /* Forcing this routine bypasses all of these other conditions. This works with the API function `attach_s2member_query_filters()`. */ || ( $initial_query && preg_match ( "/^(all|searches,feeds|searches)$/" , $o ) && $wp_query - is_search ( ) ) /* Initial query for search results? */ || ( $initial_query && preg_match ( "/^(all|searches,feeds|feeds)$/" , $o ) && $wp_query - is_feed ( ) ) /* Initital query for feed listings? */ || ( $o === "all" && ! ( $initial_query && $wp_query - is_singular ( ) ) ) /* do NOT create 404's. Allow Security Gate to handle these. */ ) { if ( ! is_admin ( ) /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`. See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */ || ( is_admin ( ) && defined ( "DOING_AJAX" ) && DOING_AJAX && ! empty ( $_REQUEST [ "action" ] ) && ( did_action ( "wp_ajax_nopriv_" . $_REQUEST [ "action" ] ) || did_action ( "wp_ajax_" . $_REQUEST [ "action" ] ) ) && $wp_query - is_search ( ) ) ) { $user = ( is_user_logged_in ( ) ) ? wp_get_current_user ( ) : false ; /* Get the current User's object. */ /* Filter all Posts/Pages requiring Custom Capabilities that the current User does NOT have access to. */ if ( is_array ( $ccaps = c_ws_plugin__s2member_utils_gets:: get_singular_ids_with_ccaps_req ( $user ) ) && ! empty ( $ccaps ) ) $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $ccaps ) ) ) ; /* Filter all Posts/Pages requiring Specific Post/Page Access that the current Visitor does NOT have access to. */ if ( is_array ( $sps = c_ws_plugin__s2member_utils_gets:: get_singular_ids_with_sp_req ( ) ) && ! empty ( $sps ) ) $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $sps ) ) ) ; /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Category Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "category__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_category_ids ( ) ) ; break ; /* All Categories will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { foreach ( preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] ) as $catg ) $catgs = array_merge ( ( array ) $catgs , array ( $catg ) , c_ws_plugin__s2member_utils_gets:: get_all_child_category_ids ( $catg ) ) ; $wp_query - set ( "category__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "category__not_in" ) , $catgs ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Tag Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "tag__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_tag_ids ( ) ) ; break ; /* ALL Tags will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $tags = c_ws_plugin__s2member_utils_gets:: convert_tags_2_ids ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] ) ; $wp_query - set ( "tag__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "tag__not_in" ) , $tags ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Post Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "post__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_post_ids ( ) ) ; break ; /* ALL Posts will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $posts = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] ) ; $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $posts ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Page Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "post__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_page_ids ( ) ) ; break ; /* ALL Pages will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $pages = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] ) ; $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $pages ) ) ) ; } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } } } /**/ if ( $initial_query && is_object ( $wp_query ) ) /* Systematics. */ c_ws_plugin__s2member_querys::_query_level_access_sys ( $wp_query ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $initial_query = false ; /* No longer. */ /**/ return ; /* For uniformity. */ } /** * Filters Systematics in search results & feeds. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference. * @return null */ public static function _query_level_access_sys ( & $wp_query = FALSE ) { static $initial_query = true ; /* Tracks initial query filtering. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_before_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $initial_query && is_object ( $wp_query ) && ! $wp_query - get ( "suppress_filters" ) ) /* Suppressing Filters? */ { if ( ( ! is_admin ( ) && ( $wp_query - is_search ( ) || $wp_query - is_feed ( ) ) ) /* Filter Systematics in searches and in feeds. */ /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`. See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */ || ( is_admin ( ) && defined ( "DOING_AJAX" ) && DOING_AJAX && ! empty ( $_REQUEST [ "action" ] ) && ( did_action ( "wp_ajax_nopriv_" . $_REQUEST [ "action" ] ) || did_action ( "wp_ajax_" . $_REQUEST [ "action" ] ) ) && $wp_query - is_search ( ) ) ) { $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "membership_options_page" ] ; $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "login_welcome_page" ] ; $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "file_download_limit_exceeded_page" ] ; /**/ $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $s ) ) ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_during_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_after_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $initial_query = false ; /* No longer. */ /**/ return ; /* For uniformity. */ } /** * Forces query Filters *( on-demand )*. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference. * @return null */ public static function force_query_level_access ( & $wp_query = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_force_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_querys:: query_level_access ( $wp_query , "force-filters" ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_force_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* For uniformity. */ } } } ? [ full view ]s2member\includes\classes\querys.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 2:13 pm


]]>
2011-07-11T17:29:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=27713#p27713 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\querys.inc.php
Docs updated: July 11, 2011, 6:29 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\querys.inc.php ?php /** * Query protection routines. * * 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\Queries * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_querys" ) ) { /** * Query protection routines. * * @package s2Member\Queries * @since 3.5 */ class c_ws_plugin__s2member_querys { /** * Filter all WordPress® queries. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter. * @param bool $force Optional. Defaults to false. If true, we bypass all standard conditions. * However, will never bypass `supress_filters`. * @return null */ public static function query_level_access ( & $wp_query = FALSE , $force = FALSE ) { static $initial_query = true ; /* Tracks initial query Filtering. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_object ( $wp_query ) && ! $wp_query - get ( "suppress_filters" ) ) /* s2Member will always respect the `suppress_filters` query arg. */ { if ( ( $o = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "filter_wp_query" ] ) !== "none" || $force ) /* If `none`; only Filter with $force. */ { if ( $force /* Forcing this routine bypasses all of these other conditions. This works with the API function `attach_s2member_query_filters()`. */ || ( $initial_query && preg_match ( "/^(all|searches,feeds|searches)$/" , $o ) && $wp_query - is_search ( ) ) /* Initial query for search results? */ || ( $initial_query && preg_match ( "/^(all|searches,feeds|feeds)$/" , $o ) && $wp_query - is_feed ( ) ) /* Initital query for feed listings? */ || ( $o === "all" && ! ( $initial_query && $wp_query - is_singular ( ) ) ) /* do NOT create 404's. Allow Security Gate to handle these. */ ) { if ( ! is_admin ( ) /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`. See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */ || ( is_admin ( ) && defined ( "DOING_AJAX" ) && DOING_AJAX && ! empty ( $_REQUEST [ "action" ] ) && ( did_action ( "wp_ajax_nopriv_" . $_REQUEST [ "action" ] ) || did_action ( "wp_ajax_" . $_REQUEST [ "action" ] ) ) && $wp_query - is_search ( ) ) ) { $user = ( is_user_logged_in ( ) ) ? wp_get_current_user ( ) : false ; /* Get the current User's object. */ /* Filter all Posts/Pages requiring Custom Capabilities that the current User does NOT have access to. */ if ( is_array ( $ccaps = c_ws_plugin__s2member_utils_gets:: get_singular_ids_with_ccaps_req ( $user ) ) && ! empty ( $ccaps ) ) $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $ccaps ) ) ) ; /* Filter all Posts/Pages requiring Specific Post/Page Access that the current Visitor does NOT have access to. */ if ( is_array ( $sps = c_ws_plugin__s2member_utils_gets:: get_singular_ids_with_sp_req ( ) ) && ! empty ( $sps ) ) $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $sps ) ) ) ; /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Category Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "category__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_category_ids ( ) ) ; break ; /* All Categories will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { foreach ( preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_catgs" ] ) as $catg ) $catgs = array_merge ( ( array ) $catgs , array ( $catg ) , c_ws_plugin__s2member_utils_gets:: get_all_child_category_ids ( $catg ) ) ; $wp_query - set ( "category__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "category__not_in" ) , $catgs ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Tag Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "tag__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_tag_ids ( ) ) ; break ; /* ALL Tags will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $tags = c_ws_plugin__s2member_utils_gets:: convert_tags_2_ids ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_ptags" ] ) ; $wp_query - set ( "tag__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "tag__not_in" ) , $tags ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Post Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "post__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_post_ids ( ) ) ; break ; /* ALL Posts will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $posts = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_posts" ] ) ; $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $posts ) ) ) ; } } /**/ for ( $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n = 0 ; $n -- ) /* Page Level Restrictions. Go through each Level. */ { if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] === "all" && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $wp_query - set ( "post__not_in" , c_ws_plugin__s2member_utils_gets:: get_all_page_ids ( ) ) ; break ; /* ALL Pages will be locked down. */ } else if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] && ( ! $user || ! current_user_can ( "access_s2member_level" . $n ) ) ) { $pages = preg_split ( "/[\r \n \t\s;,]+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_pages" ] ) ; $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $pages ) ) ) ; } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } } } /**/ if ( $initial_query && is_object ( $wp_query ) ) /* Systematics. */ c_ws_plugin__s2member_querys::_query_level_access_sys ( $wp_query ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $initial_query = false ; /* No longer. */ /**/ return ; /* For uniformity. */ } /** * Filters Systematics in search results & feeds. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference. * @return null */ public static function _query_level_access_sys ( & $wp_query = FALSE ) { static $initial_query = true ; /* Tracks initial query filtering. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_before_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $initial_query && is_object ( $wp_query ) && ! $wp_query - get ( "suppress_filters" ) ) /* Suppressing Filters? */ { if ( ( ! is_admin ( ) && ( $wp_query - is_search ( ) || $wp_query - is_feed ( ) ) ) /* Filter Systematics in searches and in feeds. */ /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`. See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */ || ( is_admin ( ) && defined ( "DOING_AJAX" ) && DOING_AJAX && ! empty ( $_REQUEST [ "action" ] ) && ( did_action ( "wp_ajax_nopriv_" . $_REQUEST [ "action" ] ) || did_action ( "wp_ajax_" . $_REQUEST [ "action" ] ) ) && $wp_query - is_search ( ) ) ) { $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "membership_options_page" ] ; $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "login_welcome_page" ] ; $s [ ] = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "file_download_limit_exceeded_page" ] ; /**/ $wp_query - set ( "post__not_in" , array_unique ( array_merge ( ( array ) $wp_query - get ( "post__not_in" ) , $s ) ) ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_during_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "_ws_plugin__s2member_after_query_level_access_sys" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $initial_query = false ; /* No longer. */ /**/ return ; /* For uniformity. */ } /** * Forces query Filters *( on-demand )*. * * s2Member respects the query var: `suppress_filters`. * If you need to make a query without it being Filtered, use ``$wp_query-set ("suppress_filters", true);``. * * WordPress® 3.0+ Menus set: `suppress_filters = true`. * So this will NOT affect WP Menus * ( intended behavior ). * * @package s2Member\Queries * @since 3.5 * * @param obj $wp_query Expects ``$wp_query`` by reference. * @return null */ public static function force_query_level_access ( & $wp_query = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_force_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_querys:: query_level_access ( $wp_query , "force-filters" ) ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_force_query_level_access" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* For uniformity. */ } } } ? [ full view ]s2member\includes\classes\querys.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

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


]]>
2011-07-09T06:09:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13050&p=25345#p25345 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\querys.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:09 am


]]>