'aieo_store', 'post_status' => 'publish', 'numberposts' => 1, 'fields' => 'ids', 'meta_key' => '_aieo_grv_location_id', 'meta_value' => $id, 'suppress_filters' => false, 'no_found_rows' => true, ) ); if ( ! empty( $ids ) ) { $url = (string) get_permalink( (int) $ids[0] ); } } if ( '' === $url && ( function_exists( 'rooster_store_post_url_for_location' ) || function_exists( 'roosterx_store_post_url_for_location' ) ) ) { $themed = ( function_exists( 'rooster_store_post_url_for_location' ) ? 'rooster_store_post_url_for_location' : 'roosterx_store_post_url_for_location' )( $loc ); if ( is_string( $themed ) ) { $url = $themed; } } self::$cache[ $id ] = $url; return $url; } }