Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:11-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13057 2011-12-20T09:50:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=57789#p57789 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\roles-caps.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:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=55471#p55471 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\roles-caps.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:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=51845#p51845 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\roles-caps.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:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=49940#p49940 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\roles-caps.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:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=47734#p47734 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\roles-caps.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:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=46135#p46135 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\roles-caps.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:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=44265#p44265 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\roles-caps.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:41:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=42972#p42972 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\roles-caps.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:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=41218#p41218 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\roles-caps.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:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=39974#p39974 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\roles-caps.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:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=38118#p38118 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\roles-caps.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:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=36699#p36699 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\roles-caps.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:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=35427#p35427 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\roles-caps.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:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=31534#p31534 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\roles-caps.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\roles-caps.inc.php ?php /** * Roles/Capabilities. * * 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\Roles_Caps * @since 110524RC */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_roles_caps" ) ) { /** * Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC */ class c_ws_plugin__s2member_roles_caps { /** * Configures Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC * * @return null * * @todo Finalize support for unlimited Levels/Roles. * @todo Finalize support for independent Capabilities. */ public static function config_roles ( ) { do_action ( "ws_plugin__s2member_before_config_roles" , get_defined_vars ( ) ) ; /**/ if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { c_ws_plugin__s2member_roles_caps:: unlink_roles ( ) ; /**/ if ( function_exists ( "bbp_get_caps_for_role" ) ) foreach (bbp_get_caps_for_role ( "subscriber" ) as $bbp_cap ) $bbp_caps [ $bbp_cap ] = true ; /**/ if ( 0 === 0 ) /* Subscriber Role is required by s2Member. */ { $caps = array ( "read" = true , "level_0" = true ) ; $caps = array_merge ( $caps , array ( "access_s2member_level0" = true ) ) ; $caps = ( ! empty ( $bbp_caps ) ) ? array_merge ( $caps , $bbp_caps ) : $caps ; /**/ if ( ! ( $role = & get_role ( "subscriber" ) ) ) { add_role ( "subscriber" , "Subscriber" ) ; $role = & get_role ( "subscriber" ) ; } /**/ foreach ( array_keys ( $caps ) as $cap ) $role - add_cap ( $cap ) ; } /**/ for ( $n = 1 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) { for ( $i = 0 , $caps = array ( "read" = true , "level_0" = true ) ; $i = $n ; $i ++ ) $caps = array_merge ( $caps , array ( "access_s2member_level" . $i = true ) ) ; $caps = ( ! empty ( $bbp_caps ) ) ? array_merge ( $caps , $bbp_caps ) : $caps ; /**/ if ( ! ( $role = & get_role ( "s2member_level" . $n ) ) ) { add_role ( "s2member_level" . $n , "s2Member Level " . $n ) ; $role = & get_role ( "s2member_level" . $n ) ; } /**/ foreach ( array_keys ( $caps ) as $cap ) $role - add_cap ( $cap ) ; } /**/ foreach ( array ( "administrator" , "editor" , "author" , "contributor" , "bbp_moderator" ) as $role ) { if ( ( $role = & get_role ( $role ) ) ) for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) $role - add_cap ( "access_s2member_level" . $n ) ; } } /**/ do_action ( "ws_plugin__s2member_after_config_roles" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Unlinks Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC * * @return null */ public static function unlink_roles ( ) { do_action ( "ws_plugin__s2member_before_unlink_roles" , get_defined_vars ( ) ) ; /**/ if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { if ( ( $role = & get_role ( "subscriber" ) ) ) $role - remove_cap ( "access_s2member_level0" ) ; /**/ for ( $n = 1 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "max_levels" ] ; $n ++ ) remove_role ( "s2member_level" . $n ) ; /**/ foreach ( array ( "administrator" , "editor" , "author" , "contributor" , "bbp_moderator" ) as $role ) { if ( ( $role = & get_role ( $role ) ) ) for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) $role - remove_cap ( "access_s2member_level" . $n ) ; } } /**/ do_action ( "ws_plugin__s2member_after_unlink_roles" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Updates Roles/Capabilities via AJAX. * * @package s2Member\Roles_Caps * @since 110524RC * * @attaches-to: ``add_action("wp_ajax_ws_plugin__s2member_update_roles_via_ajax");`` * * @return null Exits script execution after output for AJAX caller. */ public static function update_roles_via_ajax ( ) { if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { c_ws_plugin__s2member_roles_caps:: config_roles ( ) ; /**/ exit ( "1" ) ; /* Success. */ } else exit ( "0" ) ; /* Locked. */ } } } ? [ full view ]s2member\includes\classes\roles-caps.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:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=27720#p27720 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\roles-caps.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\roles-caps.inc.php ?php /** * Roles/Capabilities. * * 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\Roles_Caps * @since 110524RC */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_roles_caps" ) ) { /** * Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC */ class c_ws_plugin__s2member_roles_caps { /** * Configures Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC * * @return null * * @todo Finalize support for unlimited Levels/Roles. * @todo Finalize support for independent Capabilities. */ public static function config_roles ( ) { do_action ( "ws_plugin__s2member_before_config_roles" , get_defined_vars ( ) ) ; /**/ if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { c_ws_plugin__s2member_roles_caps:: unlink_roles ( ) ; /**/ if ( function_exists ( "bbp_get_caps_for_role" ) ) foreach (bbp_get_caps_for_role ( "subscriber" ) as $bbp_cap ) $bbp_caps [ $bbp_cap ] = true ; /**/ if ( 0 === 0 ) /* Subscriber Role is required by s2Member. */ { $caps = array ( "read" = true , "level_0" = true ) ; $caps = array_merge ( $caps , array ( "access_s2member_level0" = true ) ) ; $caps = ( ! empty ( $bbp_caps ) ) ? array_merge ( $caps , $bbp_caps ) : $caps ; /**/ if ( ! ( $role = & get_role ( "subscriber" ) ) ) { add_role ( "subscriber" , "Subscriber" ) ; $role = & get_role ( "subscriber" ) ; } /**/ foreach ( array_keys ( $caps ) as $cap ) $role - add_cap ( $cap ) ; } /**/ for ( $n = 1 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) { for ( $i = 0 , $caps = array ( "read" = true , "level_0" = true ) ; $i = $n ; $i ++ ) $caps = array_merge ( $caps , array ( "access_s2member_level" . $i = true ) ) ; $caps = ( ! empty ( $bbp_caps ) ) ? array_merge ( $caps , $bbp_caps ) : $caps ; /**/ if ( ! ( $role = & get_role ( "s2member_level" . $n ) ) ) { add_role ( "s2member_level" . $n , "s2Member Level " . $n ) ; $role = & get_role ( "s2member_level" . $n ) ; } /**/ foreach ( array_keys ( $caps ) as $cap ) $role - add_cap ( $cap ) ; } /**/ foreach ( array ( "administrator" , "editor" , "author" , "contributor" , "bbp_moderator" ) as $role ) { if ( ( $role = & get_role ( $role ) ) ) for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) $role - add_cap ( "access_s2member_level" . $n ) ; } } /**/ do_action ( "ws_plugin__s2member_after_config_roles" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Unlinks Roles/Capabilities. * * @package s2Member\Roles_Caps * @since 110524RC * * @return null */ public static function unlink_roles ( ) { do_action ( "ws_plugin__s2member_before_unlink_roles" , get_defined_vars ( ) ) ; /**/ if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { if ( ( $role = & get_role ( "subscriber" ) ) ) $role - remove_cap ( "access_s2member_level0" ) ; /**/ for ( $n = 1 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "max_levels" ] ; $n ++ ) remove_role ( "s2member_level" . $n ) ; /**/ foreach ( array ( "administrator" , "editor" , "author" , "contributor" , "bbp_moderator" ) as $role ) { if ( ( $role = & get_role ( $role ) ) ) for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) $role - remove_cap ( "access_s2member_level" . $n ) ; } } /**/ do_action ( "ws_plugin__s2member_after_unlink_roles" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Updates Roles/Capabilities via AJAX. * * @package s2Member\Roles_Caps * @since 110524RC * * @attaches-to: ``add_action("wp_ajax_ws_plugin__s2member_update_roles_via_ajax");`` * * @return null Exits script execution after output for AJAX caller. */ public static function update_roles_via_ajax ( ) { if ( ! apply_filters ( "ws_plugin__s2member_lock_roles_caps" , false ) ) { c_ws_plugin__s2member_roles_caps:: config_roles ( ) ; /**/ exit ( "1" ) ; /* Success. */ } else exit ( "0" ) ; /* Locked. */ } } } ? [ full view ]s2member\includes\classes\roles-caps.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:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13057&p=25352#p25352 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\roles-caps.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


]]>