Changeset 3389253
- Timestamp:
- 11/04/2025 12:02:19 AM (5 months ago)
- Location:
- media-search-enhanced
- Files:
-
- 8 added
- 6 edited
- 1 copied
-
tags/0.9.1 (copied) (copied from media-search-enhanced/trunk)
-
tags/0.9.1/README.txt (modified) (2 diffs)
-
tags/0.9.1/languages/media-search-enhanced-es_ES.mo (added)
-
tags/0.9.1/languages/media-search-enhanced-es_ES.po (added)
-
tags/0.9.1/languages/media-search-enhanced-pt_BR.mo (added)
-
tags/0.9.1/languages/media-search-enhanced-pt_BR.po (added)
-
tags/0.9.1/media-search-enhanced.php (modified) (1 diff)
-
tags/0.9.1/public/class-media-search-enhanced.php (modified) (3 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/languages/media-search-enhanced-es_ES.mo (added)
-
trunk/languages/media-search-enhanced-es_ES.po (added)
-
trunk/languages/media-search-enhanced-pt_BR.mo (added)
-
trunk/languages/media-search-enhanced-pt_BR.po (added)
-
trunk/media-search-enhanced.php (modified) (1 diff)
-
trunk/public/class-media-search-enhanced.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-search-enhanced/tags/0.9.1/README.txt
r3037074 r3389253 6 6 Requires at least: 3.5 7 7 Tested up to: 6.4.3 8 Stable tag: 0.9. 08 Stable tag: 0.9.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 66 66 == Changelog == 67 67 68 = 0.9.1 = 69 * Fix: Prevent "Not unique table/alias: wp_postmeta" SQL error by aliasing the postmeta JOIN. Props [@mikemeinz](https://wordpress.org/support/users/mikemeinz/). See https://wordpress.org/support/topic/sql-syntax-error-26/ 70 68 71 = 0.9.0 = 69 72 * Added the languages pt_BR and es_ES. Thanks to [@larodiel](https://github.com/1fixdotio/media-search-enhanced/pull/4). -
media-search-enhanced/tags/0.9.1/media-search-enhanced.php
r3037074 r3389253 15 15 * Plugin URI: https://1fix.io/media-search-enhanced 16 16 * Description: Search through all fields in Media Library. 17 * Version: 0.9. 017 * Version: 0.9.1 18 18 * Author: 1fixdotio 19 19 * Author URI: https://1fix.io -
media-search-enhanced/tags/0.9.1/public/class-media-search-enhanced.php
r3037074 r3389253 29 29 * @var string 30 30 */ 31 const VERSION = '0. 8.0';31 const VERSION = '0.9.1'; 32 32 33 33 /** … … 190 190 $like = '%' . $wpdb->esc_like( $vars['s'] ) . '%'; 191 191 $pieces['where'] .= $wpdb->prepare( " AND ( ($wpdb->posts.ID LIKE %s) OR ($wpdb->posts.post_title LIKE %s) OR ($wpdb->posts.guid LIKE %s) OR ($wpdb->posts.post_content LIKE %s) OR ($wpdb->posts.post_excerpt LIKE %s)", $like, $like, $like, $like, $like ); 192 $pieces['where'] .= $wpdb->prepare( " OR ( $wpdb->postmeta.meta_key = '_wp_attachment_image_alt' AND $wpdb->postmeta.meta_value LIKE %s)", $like );193 $pieces['where'] .= $wpdb->prepare( " OR ( $wpdb->postmeta.meta_key = '_wp_attached_file' AND $wpdb->postmeta.meta_value LIKE %s)", $like );194 195 // Get taxes for attach ements192 $pieces['where'] .= $wpdb->prepare( " OR (mse_pm.meta_key = '_wp_attachment_image_alt' AND mse_pm.meta_value LIKE %s)", $like ); 193 $pieces['where'] .= $wpdb->prepare( " OR (mse_pm.meta_key = '_wp_attached_file' AND mse_pm.meta_value LIKE %s)", $like ); 194 195 // Get taxes for attachments 196 196 $taxes = get_object_taxonomies( 'attachment' ); 197 197 if ( ! empty( $taxes ) ) { … … 201 201 $pieces['where'] .= " )"; 202 202 203 $pieces['join'] .= " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id";204 205 // Get taxes for attach ements203 $pieces['join'] .= " LEFT JOIN $wpdb->postmeta AS mse_pm ON $wpdb->posts.ID = mse_pm.post_id"; 204 205 // Get taxes for attachments 206 206 $taxes = get_object_taxonomies( 'attachment' ); 207 207 if ( ! empty( $taxes ) ) { -
media-search-enhanced/trunk/README.txt
r3037074 r3389253 6 6 Requires at least: 3.5 7 7 Tested up to: 6.4.3 8 Stable tag: 0.9. 08 Stable tag: 0.9.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 66 66 == Changelog == 67 67 68 = 0.9.1 = 69 * Fix: Prevent "Not unique table/alias: wp_postmeta" SQL error by aliasing the postmeta JOIN. Props [@mikemeinz](https://wordpress.org/support/users/mikemeinz/). See https://wordpress.org/support/topic/sql-syntax-error-26/ 70 68 71 = 0.9.0 = 69 72 * Added the languages pt_BR and es_ES. Thanks to [@larodiel](https://github.com/1fixdotio/media-search-enhanced/pull/4). -
media-search-enhanced/trunk/media-search-enhanced.php
r3037074 r3389253 15 15 * Plugin URI: https://1fix.io/media-search-enhanced 16 16 * Description: Search through all fields in Media Library. 17 * Version: 0.9. 017 * Version: 0.9.1 18 18 * Author: 1fixdotio 19 19 * Author URI: https://1fix.io -
media-search-enhanced/trunk/public/class-media-search-enhanced.php
r3037074 r3389253 29 29 * @var string 30 30 */ 31 const VERSION = '0. 8.0';31 const VERSION = '0.9.1'; 32 32 33 33 /** … … 190 190 $like = '%' . $wpdb->esc_like( $vars['s'] ) . '%'; 191 191 $pieces['where'] .= $wpdb->prepare( " AND ( ($wpdb->posts.ID LIKE %s) OR ($wpdb->posts.post_title LIKE %s) OR ($wpdb->posts.guid LIKE %s) OR ($wpdb->posts.post_content LIKE %s) OR ($wpdb->posts.post_excerpt LIKE %s)", $like, $like, $like, $like, $like ); 192 $pieces['where'] .= $wpdb->prepare( " OR ( $wpdb->postmeta.meta_key = '_wp_attachment_image_alt' AND $wpdb->postmeta.meta_value LIKE %s)", $like );193 $pieces['where'] .= $wpdb->prepare( " OR ( $wpdb->postmeta.meta_key = '_wp_attached_file' AND $wpdb->postmeta.meta_value LIKE %s)", $like );194 195 // Get taxes for attach ements192 $pieces['where'] .= $wpdb->prepare( " OR (mse_pm.meta_key = '_wp_attachment_image_alt' AND mse_pm.meta_value LIKE %s)", $like ); 193 $pieces['where'] .= $wpdb->prepare( " OR (mse_pm.meta_key = '_wp_attached_file' AND mse_pm.meta_value LIKE %s)", $like ); 194 195 // Get taxes for attachments 196 196 $taxes = get_object_taxonomies( 'attachment' ); 197 197 if ( ! empty( $taxes ) ) { … … 201 201 $pieces['where'] .= " )"; 202 202 203 $pieces['join'] .= " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id";204 205 // Get taxes for attach ements203 $pieces['join'] .= " LEFT JOIN $wpdb->postmeta AS mse_pm ON $wpdb->posts.ID = mse_pm.post_id"; 204 205 // Get taxes for attachments 206 206 $taxes = get_object_taxonomies( 'attachment' ); 207 207 if ( ! empty( $taxes ) ) {
Note: See TracChangeset
for help on using the changeset viewer.