Make WordPress Core

Ticket #41266: 41266-approach-2.diff

File 41266-approach-2.diff, 653 bytes (added by andizer, 8 years ago)
  • src/wp-includes/class-wp-meta-query.php

    diff --git src/wp-includes/class-wp-meta-query.php src/wp-includes/class-wp-meta-query.php
    index 3fb7956da..fbb20daa7 100644
    class WP_Meta_Query { 
    511511                $alias = $this->find_compatible_table_alias( $clause, $parent_query );
    512512                if ( false === $alias ) {
    513513                        $i = count( $this->table_aliases );
    514                         $alias = $i ? 'mt' . $i : $this->meta_table;
     514                        $alias = $i ? apply_filters( 'meta_query_get_meta_table_alias' , 'mt' ) . $i : $this->meta_table;
    515515
    516516                        // JOIN clauses for NOT EXISTS have their own syntax.
    517517                        if ( 'NOT EXISTS' === $meta_compare ) {