Updating code to work with newer versions of WP
-
Please help me to update this code to use with newer WP versions. It’s from an abandoned plugin that hasn’t support anymore.
Warning: Missing argument 2 for wpdb::prepare(), called in /home1/revoluts/public_html/mty/wp-content/plugins/photosmash-galleries/admin/bwbps-admin.php on line 3411 and defined in /home1/revoluts/public_html/mty/wp-includes/wp-db.php on line 992
The line 3411 is: . PSIMAGESTABLE. ‘.image_id’ . $desc . $limitsql);
The whole thing:
case "moderation" : $sql = $wpdb->prepare('SELECT '.PSIMAGESTABLE . '.*, '.$wpdb->users.'.user_nicename,' . $wpdb->users.'.display_name, '.$wpdb->users . '.user_login, '.PSGALLERIESTABLE.'.gallery_name, ' . $wpdb->posts . '.post_status ' . $cfsql . " " . ' FROM ' . PSIMAGESTABLE . ' LEFT OUTER JOIN '.PSCUSTOMDATATABLE.' ON '.PSCUSTOMDATATABLE . '.image_id = '. PSIMAGESTABLE. '.image_id ' . ' LEFT OUTER JOIN '.$wpdb->users.' ON '.$wpdb->users . '.ID = '. PSIMAGESTABLE. '.user_id ' . ' LEFT OUTER JOIN '.PSGALLERIESTABLE . ' ON '.PSGALLERIESTABLE.'.gallery_id = ' . PSIMAGESTABLE.'.gallery_id ' . ' LEFT OUTER JOIN ' . $wpdb->posts . ' ON ' . $wpdb->posts . '.ID = ' . PSIMAGESTABLE . '.post_id ' . ' WHERE '. PSIMAGESTABLE . '.status = -1 OR '. PSIMAGESTABLE . '.alerted IN (-1, 0) ORDER BY ' . PSIMAGESTABLE. '.image_id' . $desc . $limitsql); break;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Updating code to work with newer versions of WP’ is closed to new replies.