| | 667 | my %field_map = ( |
|---|
| | 668 | author_url => [ 'designer_url', 'author_url', 'author uri' ], |
|---|
| | 669 | title => [ 'name', 'theme name' ], |
|---|
| | 670 | author => [ 'designer', 'author' ], |
|---|
| | 671 | ); |
|---|
| | 672 | while (my ($best_name, $possible_names) = each %field_map) { |
|---|
| | 673 | ($metadata{$best_name}) = grep { defined } |
|---|
| | 674 | delete @metadata{ @$possible_names }; |
|---|
| | 675 | } |
|---|
| | 676 | |
|---|
| 669 | | name => $theme, |
|---|
| 670 | | description => $metadata{description} || '', |
|---|
| 671 | | title => $metadata{name} || '(Untitled)', |
|---|
| 672 | | url => $url, |
|---|
| 673 | | imageSmall => $thumbnail_link, |
|---|
| 674 | | imageBig => $thumbnail_large_link, |
|---|
| 675 | | author => $metadata{designer} || $metadata{author} || '', |
|---|
| 676 | | author_url => $metadata{designer_url} || $metadata{author_url} || '', |
|---|
| 677 | | author_affiliation => $metadata{author_affiliation} || '', |
|---|
| 678 | | layouts => $metadata{layouts} || '', |
|---|
| 679 | | 'sort' => $metadata{name} || '', |
|---|
| 680 | | tags => $tags, |
|---|
| 681 | | blogs => [], |
|---|
| | 679 | name => $theme, |
|---|
| | 680 | description => $metadata{description} || '', |
|---|
| | 681 | title => $metadata{title} || '(Untitled)', |
|---|
| | 682 | url => $url, |
|---|
| | 683 | imageSmall => $thumbnail_link, |
|---|
| | 684 | imageBig => $thumbnail_large_link, |
|---|
| | 685 | layouts => $metadata{layouts} || '', |
|---|
| | 686 | sort => $metadata{name} || $theme || q{}, |
|---|
| | 687 | tags => $tags, |
|---|
| | 688 | blogs => [], |
|---|
| | 689 | author => $metadata{author} || q{}, |
|---|
| | 690 | author_url => $metadata{author_url} || q{}, |
|---|
| | 691 | author_affiliation => $metadata{author_affiliation} || q{}, |
|---|