Fixed a couple of minor bugs for php 8.1 compatibility

parent 31b5ea65
...@@ -103,8 +103,6 @@ if(!class_exists('SH_Admin')) { ...@@ -103,8 +103,6 @@ if(!class_exists('SH_Admin')) {
break; break;
} }
sexhack_log("UPDATE OPTIONS: ".$option." OLD $old NEW $new");
sexhack_log(get_option('neew_rewrite_flush', 'NOT SET'));
} }
......
...@@ -131,7 +131,8 @@ if(!class_exists('SH_GDrive')) { ...@@ -131,7 +131,8 @@ if(!class_exists('SH_GDrive')) {
if($gfile && ($gfile['type'] != 'application/vnd.google-apps.folder')) if($gfile && ($gfile['type'] != 'application/vnd.google-apps.folder'))
{ {
$file="https://drive.google.com/open?action=igd-wc-download&id=".$gfile['id']; $file="https://drive.google.com/uc?export=download&confirm=t&id=".$gfile['id'];
//$file="https://drive.google.com/open?action=igd-wc-download&id=".$gfile['id'];
} }
} }
......
...@@ -80,7 +80,7 @@ if(!class_exists('SH_Shortcodes')) { ...@@ -80,7 +80,7 @@ if(!class_exists('SH_Shortcodes')) {
extract( shortcode_atts(array( extract( shortcode_atts(array(
'site' => 'chaturbate', 'site' => 'chaturbate',
'model' => 'sexhackme', 'model' => 'sexhackme',
), $attributes)); ), $attr));
$ret = LiveCamSite::getCamStream($site, $model); $ret = LiveCamSite::getCamStream($site, $model);
if($ret) return $ret; if($ret) return $ret;
return '<p>CamStreamDL Error: wrong site option '.$site.'</p> '; return '<p>CamStreamDL Error: wrong site option '.$site.'</p> ';
......
...@@ -35,7 +35,7 @@ if(!class_exists('SH_StoreFront')) { ...@@ -35,7 +35,7 @@ if(!class_exists('SH_StoreFront')) {
remove_action( 'storefront_header', 'storefront_product_search', 40); remove_action( 'storefront_header', 'storefront_product_search', 40);
// Remove StoreFront credits // Remove StoreFront credits
add_filter('storefront_credit_link', false); add_filter('storefront_credit_link', 'wp_SexHackMe\SH_StoreFront::credits');
// add footer disclaimer // add footer disclaimer
//add_action('storefront_footer', 'wp_SexHackMe\sh_get_disclaimer')); // XXX I don't like positioning this way. Fix in CSS or sobstitute footer theme file? //add_action('storefront_footer', 'wp_SexHackMe\sh_get_disclaimer')); // XXX I don't like positioning this way. Fix in CSS or sobstitute footer theme file?
...@@ -45,6 +45,11 @@ if(!class_exists('SH_StoreFront')) { ...@@ -45,6 +45,11 @@ if(!class_exists('SH_StoreFront')) {
} }
public static function credits($cred)
{
return '';
}
} }
} }
......
...@@ -115,6 +115,8 @@ if(!class_exists('SH_GalleryWidget')) { ...@@ -115,6 +115,8 @@ if(!class_exists('SH_GalleryWidget')) {
{ {
global $post; global $post;
if(!is_object($post)) return;
$pattern = get_shortcode_regex(); $pattern = get_shortcode_regex();
if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
......
...@@ -182,7 +182,7 @@ get_header(); ?> ...@@ -182,7 +182,7 @@ get_header(); ?>
default: // public too! default: // public too!
if($hls_public && $video->video_type=='VR') echo do_shortcode( "[sexvideo url=\"".$hls_public."\" posters=\"".$thumb."\"]" ); if($hls_public && $video->video_type=='VR') echo do_shortcode( "[sexvideo url=\"".$hls_public."\" posters=\"".$thumb."\"]" );
else if($hls_public) echo do_shortcode( "[sexhls url=\"".$hls."\" posters=\"".$thumb."\"]" ); else if($hls_public) echo do_shortcode( "[sexhls url=\"".$hls_public."\" posters=\"".$thumb."\"]" );
else if($gif_preview) echo '<img class="sexhack_videopreview" src="'.$gif_preview.'" loading="lazy"></img>'; else if($gif_preview) echo '<img class="sexhack_videopreview" src="'.$gif_preview.'" loading="lazy"></img>';
else echo '<img class="sexhack_videopreview" src="'.$thumb.'" loading="lazy"></img>'; else echo '<img class="sexhack_videopreview" src="'.$thumb.'" loading="lazy"></img>';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment