Skip to content

Commit

Permalink
Updating back compat against get_post().
Browse files Browse the repository at this point in the history
  • Loading branch information
JasWSInc committed Jan 7, 2014
1 parent 7991f42 commit 7b8c8ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion s2member/includes/classes/css-js-themes.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public static function lazy_load_css_js ()

if(isset($load)) return $load;

$null = NULL; // Needed below in earlier versions of WP.

if(!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"])
$load = TRUE;

Expand All @@ -54,7 +56,7 @@ public static function lazy_load_css_js ()
&& (bp_is_register_page() || bp_is_activation_page() || bp_is_user_profile()))
$load = TRUE;

else if(is_singular() && ($post = get_post(NULL))
else if(is_singular() && ($post = get_post($null))
&& (stripos($post->post_content, "s2member") !== FALSE
|| stripos($post->post_content, "[s2") !== FALSE))
$load = TRUE;
Expand Down

0 comments on commit 7b8c8ae

Please # to comment.