Plugin Directory

Changeset 886153

Timestamp:
04/02/2014 05:49:21 AM (10 years ago)
Author:
enej
Message:

Bug fix, the coun't woun't count posts that are in trash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • photostream-sync/branches/ux-refresh/photostream-sync.php

    r886048 r886153  
    10721072       
    10731073        global $wpdb;
    1074 
    1075         return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->postmeta LEFT JOIN $wpdb->posts ON $wpdb->postmeta.post_id = $wpdb->posts.ID WHERE $wpdb->postmeta.meta_key = 'ps_stream' AND $wpdb->postmeta.meta_value = %s AND $wpdb->posts.post_type != 'attachment'", $key ) );
    1076 
     1074       
     1075        return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->postmeta LEFT JOIN $wpdb->posts ON $wpdb->postmeta.post_id = $wpdb->posts.ID WHERE $wpdb->postmeta.meta_key = 'ps_stream' AND $wpdb->postmeta.meta_value = %s AND $wpdb->posts.post_type != 'attachment' ) );
     1076       
    10771077    }
    10781078
Note: See TracChangeset for help on using the changeset viewer.