Plugin Directory

Changeset 2746630

Timestamp:
06/22/2022 07:23:08 PM (2 years ago)
Author:
jarednova
Message:

Update to 1.19.2

Location:
timber-library/trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • timber-library/trunk/lib/Term.php

    r2103523 r2746630  
    156156    /**
    157157     * @internal
    158      * @param int $tid
     158     * @param int $tid
    159159     * @return mixed
    160160     */
     
    164164        }
    165165        $tid = self::get_tid($tid);
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
    166179
    167180        if ( isset($this->taxonomy) && strlen($this->taxonomy) ) {
     
    182195     * @internal
    183196     * @param int $tid
    184      * @return int
    185      */
    186     protected function get_tid( $tid ) {
     197     * @return int
     198     */
     199    protected function get_tid( $tid ) {
    187200        global $wpdb;
    188201        if ( is_numeric($tid) ) {
     
    193206        }
    194207        if ( is_numeric($tid) ) {
    195             $query = $wpdb->prepare("SELECT * FROM $wpdb->terms WHERE term_id = %d", $tid);
     208            $query = $wpdb->prepare("SELECT FROM $wpdb->terms WHERE term_id = %d", $tid);
    196209        } else {
    197             $query = $wpdb->prepare("SELECT * FROM $wpdb->terms WHERE slug = %s", $tid);
    198         }
    199         $result = $wpdb->get_row($query);
    200         if ( isset($result->term_id) ) {
    201             $result->ID = $result->term_id;
    202             $result->id = $result->term_id;
    203             return $result->ID;
     210            $query = $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug = %s", $tid);
     211        }
     212        $result = $wpdb->get_col($query);
     213        if ( $result ) {
     214            if ( count($result) == 1) {
     215                return $result[0];
     216            }
     217            return $result;
    204218        }
    205219        return 0;
  • timber-library/trunk/lib/Timber.php

    r2616192 r2746630  
    3636class Timber {
    3737
    38     public static $version = '1.19.1';
     38    public static $version = '1.19.';
    3939    public static $locations;
    4040    public static $dirname = 'views';
Note: See TracChangeset for help on using the changeset viewer.