Make WordPress Core

Ticket #31292: link-template.php.patch

File link-template.php.patch, 3.1 KB (added by Funkatronic, 10 years ago)
  • link-template.php

     
    15681568         * @param array  $excluded_terms Array of excluded term IDs.
    15691569         */
    15701570        $join  = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms );
     1571       
     1572        /**
     1573         * Filter the JOIN clause in the SQL for an adjacent post type query.
     1574         *
     1575         * The dynamic portion of the hook name, `$adjacent`, refers to the type
     1576         * of adjacency, 'next' or 'previous'.  The dynamic portion`$post->post_type` refers to the current post type
     1577         *
     1578         * @since 4.2.0
     1579         *
     1580         * @param string $join           The JOIN clause in the SQL.
     1581         * @param bool   $in_same_term   Whether post should be in a same taxonomy term.
     1582         * @param array  $excluded_terms Array of excluded term IDs.
     1583         */
     1584        $join  = apply_filters( "get_{$adjacent}_{$post->post_type}_join", $join, $in_same_term, $excluded_terms );
    15711585
    15721586        /**
    15731587         * Filter the WHERE clause in the SQL for an adjacent post query.
    15741588         *
    15751589         * The dynamic portion of the hook name, `$adjacent`, refers to the type
    1576          * of adjacency, 'next' or 'previous'.
     1590         * of adjacency, 'next' or 'previous'. 
    15771591         *
    15781592         * @since 2.5.0
    15791593         *
     
    15821596         * @param array  $excluded_terms Array of excluded term IDs.
    15831597         */
    15841598        $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms );
     1599       
     1600        /**
     1601         * Filter the WHERE clause in the SQL for an adjacent post type query.
     1602         *
     1603         * The dynamic portion of the hook name, `$adjacent`, refers to the type
     1604         * of adjacency, 'next' or 'previous'.  The dynamic portion `$post->post_type` refers to the current post type
     1605         *
     1606         * @since 4.2.0
     1607         *
     1608         * @param string $where          The `WHERE` clause in the SQL.
     1609         * @param bool   $in_same_term   Whether post should be in a same taxonomy term.
     1610         * @param array  $excluded_terms Array of excluded term IDs.
     1611         */
     1612        $where = apply_filters( "get_{$adjacent}_{$post->post_type}_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms );
    15851613
    15861614        /**
    15871615         * Filter the ORDER BY clause in the SQL for an adjacent post query.
     
    15941622         * @param string $order_by The `ORDER BY` clause in the SQL.
    15951623         */
    15961624        $sort  = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" );
     1625       
     1626        /**
     1627         * Filter the ORDER BY clause in the SQL for an adjacent post query.
     1628         *
     1629         * The dynamic portion of the hook name, `$adjacent`, refers to the type
     1630         * of adjacency, 'next' or 'previous'.  The dynamic portion `$post->post_type` refers to the current post type
     1631         *
     1632         * @since 4.2.0
     1633         *
     1634         * @param string $order_by The `ORDER BY` clause in the SQL.
     1635         */
     1636        $sort  = apply_filters( "get_{$adjacent}_{$post->post_type}_sort", "ORDER BY p.post_date $order LIMIT 1" );
    15971637
    15981638        $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
    15991639        $query_key = 'adjacent_post_' . md5( $query );