Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:33-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13091 2011-12-20T09:50:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=57827#p57827 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utilities.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:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=55509#p55509 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\utilities.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:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=51883#p51883 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\utilities.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:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=49978#p49978 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\utilities.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:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=47772#p47772 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\utilities.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:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=46173#p46173 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\utilities.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:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=44303#p44303 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\utilities.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:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=43010#p43010 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\utilities.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:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=41256#p41256 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\utilities.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:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=40012#p40012 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\utilities.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:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=38154#p38154 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\utilities.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:20 pm


]]>
2011-09-14T01:28:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=36735#p36735 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\utilities.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:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=35463#p35463 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\utilities.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:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=31584#p31584 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\utilities.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\utilities.inc.php ?php /** * General 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_utilities" ) ) { /** * General utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utilities { /** * Evaluates PHP code, and "returns" output. * * @package s2Member\Utilities * @since 3.5 * * @param str $code A string of data, possibly with embedded PHP code. * @return str Output after PHP evaluation. */ public static function evl ( $code = FALSE ) { ob_start ( ) ; /* Output buffer. */ /**/ eval ( "?" . trim ( $code ) ) ; /**/ return ob_get_clean ( ) ; } /** * Buffers ( gets ) function output. * * A variable length of additional arguments are possible. * Additional parameters get passed into the ``$function``. * * @package s2Member\Utilities * @since 3.5 * * @param str $function Name of a function to call upon. * @return str Output after call to function. * Any output is buffered and returned. */ public static function get ( $function = FALSE ) { $args = func_get_args ( ) ; $function = array_shift ( $args ) ; /**/ if ( is_string ( $function ) && $function ) { ob_start ( ) ; /**/ if ( is_array ( $args ) && ! empty ( $args ) ) { $return = call_user_func_array ( $function , $args ) ; } else /* There are no additional arguments to pass. */ { $return = call_user_func ( $function ) ; } /**/ $echo = ob_get_clean ( ) ; /**/ return ( ! strlen ( $echo ) && strlen ( $return ) ) ? $return : $echo ; } else /* Else return null. */ return ; } /** * Builds a version checksum for this installation. * * @package s2Member\Utilities * @since 3.5 * * @return str String with `[version]-[pro version]-[consolidated checksum]`. */ public static function ver_checksum ( ) { $checksum = WS_PLUGIN__S2MEMBER_VERSION; /* Software version string. */ $checksum .= (c_ws_plugin__s2member_utils_conds:: pro_is_installed ( ) ) ? "-" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "" ; /* Pro version string? */ $checksum .= "-" . abs ( crc32 ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "checksum" ] . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "options_checksum" ] . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "options_version" ] ) ) ; /**/ return $checksum ; /* ( i.e. version-pro version-checksum ) */ } /** * String with all version details *( for WordPress® and s2Member )*. * * @package s2Member\Utilities * @since 3.5 * * @return str String with `WordPress® vX.XX :: s2Member® vX.XX :: s2Member® Pro vX.XX`. */ public static function ver_details ( ) { $details = "WordPress® v" . get_bloginfo ( "version" ) . " :: s2Member® v" . WS_PLUGIN__S2MEMBER_VERSION; $details .= (c_ws_plugin__s2member_utils_conds:: pro_is_installed ( ) ) ? " :: s2Member® Pro v" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "" ; /**/ return $details ; /* Return all details. */ } /** * Generates s2Member Security Badge. * * @package s2Member\Utilities * @since 3.5 * * @param str $v A variation number to display. Defaults to `1`. * @param bool $no_cache Defaults to false. If true, the HTML markup will contain query string params that prevent caching. * @param bool $display_on_failure. Defaults to false. True if we need to display the "NOT yet verified" version inside admin panels. * @return str HTML markup for display of s2Member Security Badge. */ public static function s_badge_gen ( $v = "1" , $no_cache = FALSE , $display_on_failure = FALSE ) { if ( $v && file_exists ( ( $template = dirname ( dirname ( __FILE__ ) ) . "/templates/badges/s-badge.html" ) ) ) { $badge = preg_replace ( "/%%site_url%%/i" , urlencode ( site_url ( ) ) , preg_replace ( "/%%v%%/i" , (string) $v , file_get_contents ( $template ) ) ) ; $badge = preg_replace ( "/%%no_cache%%/i" , ( ( $no_cache ) ? "&no_cache=" . urlencode ( mt_rand ( 0 , PHP_INT_MAX) ) : "" ) , $badge ) ; $badge = preg_replace ( "/%%display_on_failure%%/i" , ( ( $display_on_failure ) ? "&display_on_failure=1" : "" ) , $badge ) ; } /**/ return ( ! empty ( $badge ) ) ? $badge : "" ; /* Return Security Badge. */ } /** * Acquires information about memory usage. * * @package s2Member\Utilities * @since 110815 * * @return str String with `Memory x MB :: Real Memory x MB :: Peak Memory x MB :: Real Peak Memory x MB`. */ public static function mem_details ( ) { $memory = number_format ( memory_get_usage ( ) / 1048576 , 2 , "." , "" ) ; $real_memory = number_format ( memory_get_usage ( true ) / 1048576 , 2 , "." , "" ) ; $peak_memory = number_format ( memory_get_peak_usage ( ) / 1048576 , 2 , "." , "" ) ; $real_peak_memory = number_format ( memory_get_peak_usage ( true ) / 1048576 , 2 , "." , "" ) ; /**/ $details = "Memory " . $memory . " MB :: Real Memory " . $real_memory . " MB :: Peak Memory " . $peak_memory . " MB :: Real Peak Memory " . $real_peak_memory . " MB" ; /**/ return $details ; /* Return all details. */ } } } ? [ full view ]s2member\includes\classes\utilities.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:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=27754#p27754 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\utilities.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\utilities.inc.php ?php /** * General 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_utilities" ) ) { /** * General utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utilities { /** * Evaluates PHP code, and "returns" output. * * @package s2Member\Utilities * @since 3.5 * * @param str $code A string of data, possibly with embedded PHP code. * @return str Output after PHP evaluation. */ public static function evl ( $code = FALSE ) { ob_start ( ) ; /* Output buffer. */ /**/ eval ( "?" . trim ( $code ) ) ; /**/ return ob_get_clean ( ) ; } /** * Buffers ( gets ) function output. * * A variable length of additional arguments are possible. * Additional parameters get passed into the ``$function``. * * @package s2Member\Utilities * @since 3.5 * * @param str $function Name of a function to call upon. * @return str Output after call to function. * Any output is buffered and returned. */ public static function get ( $function = FALSE ) { $args = func_get_args ( ) ; $function = array_shift ( $args ) ; /**/ if ( is_string ( $function ) && $function ) { ob_start ( ) ; /**/ if ( is_array ( $args ) && ! empty ( $args ) ) { $return = call_user_func_array ( $function , $args ) ; } else /* There are no additional arguments to pass. */ { $return = call_user_func ( $function ) ; } /**/ $echo = ob_get_clean ( ) ; /**/ return ( ! strlen ( $echo ) && strlen ( $return ) ) ? $return : $echo ; } else /* Else return null. */ return ; } /** * Builds a version checksum for this installation. * * @package s2Member\Utilities * @since 3.5 * * @return str String with `[version]-[pro version]-[consolidated checksum]`. */ public static function ver_checksum ( ) { $checksum = WS_PLUGIN__S2MEMBER_VERSION; /* Software version string. */ $checksum .= ( defined ( "WS_PLUGIN__S2MEMBER_PRO_VERSION" ) ) ? "-" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "" ; /* Pro version string? */ $checksum .= "-" . abs ( crc32 ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "checksum" ] . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "options_checksum" ] . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "options_version" ] ) ) ; /**/ return $checksum ; /* ( i.e. version-pro version-checksum ) */ } /** * String with all version details *( for WordPress® and s2Member )*. * * @package s2Member\Utilities * @since 3.5 * * @return str String with `WordPress® vX.XX :: s2Member® vX.XX :: s2Member® Pro vX.XX`. */ public static function ver_details ( ) { $details = "WordPress® v" . get_bloginfo ( "version" ) . " :: s2Member® v" . WS_PLUGIN__S2MEMBER_VERSION; $details .= ( defined ( "WS_PLUGIN__S2MEMBER_PRO_VERSION" ) ) ? " :: s2Member® Pro v" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "" ; /**/ return $details ; /* Return all details. */ } /** * Generates s2Member Security Badge. * * @package s2Member\Utilities * @since 3.5 * * @param str $v A variation number to display. Defaults to `1`. * @param bool $no_cache Defaults to false. If true, the HTML markup will contain query string params that prevent caching. * @param bool $display_on_failure. Defaults to false. True if we need to display the "NOT yet verified" version inside admin panels. * @return str HTML markup for display of s2Member Security Badge. */ public static function s_badge_gen ( $v = "1" , $no_cache = FALSE , $display_on_failure = FALSE ) { if ( $v && file_exists ( ( $template = dirname ( dirname ( __FILE__ ) ) . "/templates/badges/s-badge.html" ) ) ) { $badge = preg_replace ( "/%%site_url%%/i" , urlencode ( site_url ( ) ) , preg_replace ( "/%%v%%/i" , (string) $v , file_get_contents ( $template ) ) ) ; $badge = preg_replace ( "/%%no_cache%%/i" , ( ( $no_cache ) ? "&no_cache=" . urlencode ( mt_rand ( 0 , PHP_INT_MAX) ) : "" ) , $badge ) ; $badge = preg_replace ( "/%%display_on_failure%%/i" , ( ( $display_on_failure ) ? "&display_on_failure=1" : "" ) , $badge ) ; } /**/ return ( ! empty ( $badge ) ) ? $badge : "" ; /* Return Security Badge. */ } } } ? [ full view ]s2member\includes\classes\utilities.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:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13091&p=25386#p25386 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utilities.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


]]>