Changeset 2268150
- Timestamp:
- 03/26/2020 12:51:28 PM (6 years ago)
- Location:
- kodeks-dashboard/trunk
- Files:
-
- 3 edited
-
functions.php (modified) (3 diffs)
-
kodeks-dashboard.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kodeks-dashboard/trunk/functions.php
r2267202 r2268150 709 709 * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join 710 710 */ 711 function cf_search_join( $join ) { 712 global $wpdb; 713 714 if ( is_search() ) { 715 $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id '; 716 } 717 718 return $join; 719 } 720 add_filter('posts_join', 'cf_search_join' ); 711 712 if ( ! function_exists( 'cf_search_join' ) ) { 713 714 function cf_search_join( $join ) { 715 global $wpdb; 716 717 if ( is_search() ) { 718 $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id '; 719 } 720 721 return $join; 722 } 723 add_filter('posts_join', 'cf_search_join' ); 724 725 } 721 726 722 727 /** … … 725 730 * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where 726 731 */ 727 function cf_search_where( $where ) { 728 global $pagenow, $wpdb; 729 730 if ( is_search() ) { 731 $where = preg_replace( 732 "/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", 733 "(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where ); 734 } 735 736 return $where; 737 } 738 add_filter( 'posts_where', 'cf_search_where' ); 732 733 if ( ! function_exists( 'cf_search_where' ) ) { 734 function cf_search_where( $where ) { 735 global $pagenow, $wpdb; 736 737 if ( is_search() ) { 738 $where = preg_replace( 739 "/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", 740 "(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where ); 741 } 742 743 return $where; 744 } 745 add_filter( 'posts_where', 'cf_search_where' ); 746 } 739 747 740 748 /** … … 743 751 * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_distinct 744 752 */ 745 function cf_search_distinct( $where ) { 746 global $wpdb; 747 748 if ( is_search() ) { 749 return "DISTINCT"; 750 } 751 752 return $where; 753 } 754 add_filter( 'posts_distinct', 'cf_search_distinct' ); 755 753 if ( ! function_exists( 'cf_search_distinct' ) ) { 754 function cf_search_distinct( $where ) { 755 global $wpdb; 756 757 if ( is_search() ) { 758 return "DISTINCT"; 759 } 760 761 return $where; 762 } 763 add_filter( 'posts_distinct', 'cf_search_distinct' ); 764 } 756 765 757 766 -
kodeks-dashboard/trunk/kodeks-dashboard.php
r2267203 r2268150 3 3 Plugin Name: Kodeks Dashboard 4 4 Description: This plugin customizes WordPress for Kodeks customers. 5 Version: 2.2 15 Version: 2.22 6 6 Author: Thomas Johannessen & Marius Kaase 7 7 Author URI: http://kodeks.no -
kodeks-dashboard/trunk/readme.txt
r2267204 r2268150 1 1 === Kodeks Dashboard === 2 Version: 2.2 12 Version: 2.22 3 3 Contributors: Kodeks AS 4 4 Tested up to: 5.3.2
Note: See TracChangeset
for help on using the changeset viewer.