Changeset 1667635
- Timestamp:
- 05/31/2017 11:25:02 AM (9 years ago)
- Location:
- ssv-users/trunk
- Files:
-
- 3 edited
-
functions.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
ssv-users.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ssv-users/trunk/functions.php
r1660274 r1667635 75 75 global $wpdb; 76 76 $customFieldsTag = SSV_Users::TAG_PROFILE_FIELDS; 77 $results = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_content LIKE '%$customFieldsTag%'"); 77 $table = $wpdb->prefix . 'posts'; 78 $results = $wpdb->get_results("SELECT * FROM $table WHERE post_content LIKE '%$customFieldsTag%'"); 78 79 foreach ($results as $key => $row) { 79 80 wp_delete_post($row->ID); -
ssv-users/trunk/readme.txt
r1666688 r1667635 31 31 32 32 == Changelog == 33 = 3.1.4 = 34 * Adding prefix (for multi-site) to all database searches. 35 33 36 = 3.1.3 = 34 37 * Updating name fields disabled (due to possible bugs) -
ssv-users/trunk/ssv-users.php
r1666688 r1667635 9 9 * - Etc. 10 10 * This plugin is fully compatible with the SSV library which can add functionality like: MailChimp, Events, etc. 11 * Version: 3.1. 311 * Version: 3.1.4 12 12 * Author: moridrin 13 13 * Author URI: http://nl.linkedin.com/in/jberkvens/ … … 135 135 /** @var \wpdb $wpdb */ 136 136 global $wpdb; 137 return $wpdb->get_results("SELECT * FROM wp_posts WHERE post_content LIKE '%$customFieldsTag%'"); 137 $table = $wpdb->prefix . 'posts'; 138 return $wpdb->get_results("SELECT * FROM $table WHERE post_content LIKE '%$customFieldsTag%'"); 138 139 } 139 140 … … 147 148 /** @var \wpdb $wpdb */ 148 149 global $wpdb; 149 $results = $wpdb->get_results("SELECT ID FROM wp_posts WHERE post_content LIKE '%$customFieldsTag%'"); 150 $table = $wpdb->prefix . 'posts'; 151 $results = $wpdb->get_results("SELECT ID FROM $table WHERE post_content LIKE '%$customFieldsTag%'"); 150 152 return array_column($results, 'ID'); 151 153 }
Note: See TracChangeset
for help on using the changeset viewer.