re->db ->start( aioseo()->core->db->db->posts . ' as p', true ) ->select( 'MAX(`p`.`post_modified_gmt`) as last_modified' ) ->whereRaw( " ( `p`.`ID` IN ( SELECT `tr`.`object_id` FROM `$termRelationshipsTable` as tr WHERE `tr`.`term_taxonomy_id` IN ( '$termIds' ) ) )" ) ->run() ->result(); } if ( ! empty( $lastModified[0]->last_modified ) ) { $index['lastmod'] = aioseo()->helpers->dateTimeToIso8601( $lastModified[0]->last_modified ); } $indexes[] = $index; } return $indexes; } }