WordPress.org

Make WordPress Core

Ticket #15249: 15249.5.patch

File 15249.5.patch, 1.2 KB (added by sc0ttkclark, 6 years ago)

Changing to use of apply_filters

  • trunk/wp-includes/user.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    594594                                $searches[] = "$col LIKE '$leading_wild" . like_escape($string) . "$trailing_wild'";
    595595                }
    596596
    597                 return ' AND (' . implode(' OR ', $searches) . ')';
     597                $search = ' AND (' . implode(' OR ', $searches) . ')';
     598
     599                return apply_filters( 'user_search_sql', $search, $string, $cols, $searches, $wild );
    598600        }
    599601
    600602        /**
  • trunk/wp-includes/comment.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    372372                foreach ( $cols as $col )
    373373                        $searches[] = "$col LIKE '%$string%'";
    374374
    375                 return ' AND (' . implode(' OR ', $searches) . ')';
     375                $search = ' AND (' . implode(' OR ', $searches) . ')';
     376
     377                return apply_filters( 'comment_search_sql', $search, $string, $cols, $searches );
    376378        }
    377379}
    378380