| Server IP : 198.54.115.198 / Your IP : 216.73.216.142 Web Server : LiteSpeed System : Linux server192.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : seatpheu ( 1569) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/seatpheu/public_html/wp-content/plugins/media-cleaner/classes/parsers/ |
Upload File : |
<?php
add_action( 'wpmc_scan_widgets', 'wpmc_scan_widgets_metaslider' );
function wpmc_scan_widgets_metaslider() {
global $wpdb;
global $wpmc;
$q = "SELECT object_id
FROM {$wpdb->term_relationships}
WHERE object_id > 0
AND term_taxonomy_id
IN (SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE taxonomy = 'ml-slider');";
$imageIds = $wpdb->get_col( $q );
if ( $wpdb->last_error ) {
error_log( $q . " " . $wpdb->last_error );
$wpmc->log( $q . " " . $wpdb->last_error );
die( $wpdb->last_error );
}
if ( count( $imageIds) > 0 ) {
$wpmc->add_reference_id( $imageIds, 'SLIDER (ID)' );
}
}
?>