diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
index 295f965cf..60bbb78a1 100644
|
|
|
function wporg_themes_scripts() { |
| 114 | 114 | 'settings' => array( |
| 115 | 115 | 'title' => array( |
| 116 | 116 | 'default' => "%s | ${title_suffix}", |
| | 117 | 'base' => __( 'WordPress Themes', 'wporg-themes' ) . " | ${title_suffix}", |
| 117 | 118 | 'theme' => '%s - ' . __( 'WordPress theme', 'wporg-themes' ) . " | ${title_suffix}", |
| 118 | 119 | /* translators: %s: theme author name */ |
| 119 | 120 | 'author' => sprintf( |
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js
index 554e41874..11d2f6a47 100644
|
|
|
window.wp = window.wp || {}; |
| 7 | 7 | var themes = wp.themes = wp.themes || {}, |
| 8 | 8 | l10n; |
| 9 | 9 | |
| | 10 | |
| | 11 | var defaultView = 'featured'; |
| | 12 | |
| 10 | 13 | // Store the theme data and settings for organized and quick access |
| 11 | 14 | // themes.data.settings, themes.data.themes, themes.data.l10n |
| 12 | 15 | themes.data = _wpThemeSettings; |
| … |
… |
window.wp = window.wp || {}; |
| 21 | 24 | |
| 22 | 25 | if ( 'author' === type ) { |
| 23 | 26 | format = themes.data.settings.title.author; |
| | 27 | } else if ( defaultView === item.toLowerCase() ) { |
| | 28 | format = themes.data.settings.title.base; |
| 24 | 29 | } else if ( 'tags' === type || 'browse' === type ) { |
| 25 | 30 | format = themes.data.settings.title.tax; |
| 26 | 31 | } else if ( 'search' === type ) { |
| … |
… |
window.wp = window.wp || {}; |
| 801 | 806 | } |
| 802 | 807 | else if ( sorter = $( '.filter-links .current' ) ) { |
| 803 | 808 | if ( ! sorter.length ) { |
| 804 | | sorter = $( '.filter-links [data-sort="featured"]' ); |
| | 809 | sorter = $( '.filter-links [data-sort="' + defaultView + '"]' ); |
| 805 | 810 | args = { trigger: true }; |
| 806 | 811 | } |
| 807 | 812 | themes.router.navigate( themes.router.baseUrl( themes.router.browsePath + sorter.data( 'sort' ) ), args ); |
| … |
… |
window.wp = window.wp || {}; |
| 1304 | 1309 | themes.router.navigate( themes.router.baseUrl( themes.router.searchPath + value ), { replace: true } ); |
| 1305 | 1310 | } else { |
| 1306 | 1311 | delete request.search; |
| 1307 | | request.browse = 'featured'; |
| | 1312 | request.browse = defaultView; |
| 1308 | 1313 | |
| 1309 | | themes.utils.title( $( '.filter-links [data-sort="featured"]' ).text(), 'browse' ); |
| 1310 | | themes.router.navigate( themes.router.baseUrl( themes.router.browsePath + 'featured' ), { replace: true } ); |
| | 1314 | themes.utils.title( $( '.filter-links [data-sort="' + defaultView +'"]' ).text(), 'browse' ); |
| | 1315 | themes.router.navigate( themes.router.baseUrl( themes.router.browsePath + defaultView ), { replace: true } ); |
| 1311 | 1316 | } |
| 1312 | 1317 | |
| 1313 | 1318 | // Get the themes by sending Ajax POST request to api.wordpress.org/themes |
| … |
… |
window.wp = window.wp || {}; |
| 1644 | 1649 | // Set up the view |
| 1645 | 1650 | // Passes the default 'section' as an option |
| 1646 | 1651 | this.view = new themes.view.Installer({ |
| 1647 | | section: 'featured', |
| | 1652 | section: defaultView, |
| 1648 | 1653 | SearchView: themes.view.Search |
| 1649 | 1654 | }); |
| 1650 | 1655 | |
| … |
… |
window.wp = window.wp || {}; |
| 1685 | 1690 | |
| 1686 | 1691 | // Handles sorting / browsing routes |
| 1687 | 1692 | // Also handles the root URL triggering a sort request |
| 1688 | | // for `featured`, the default view |
| | 1693 | // for the default view |
| 1689 | 1694 | themes.router.on( 'route:sort', function( sort, page ) { |
| 1690 | 1695 | if ( page ) { |
| 1691 | 1696 | themes.router.navigate( 'browse/' + sort + '/', { replace: true } ); |
| … |
… |
window.wp = window.wp || {}; |
| 1694 | 1699 | self.view.collection.queries.push( themes.data.query ); |
| 1695 | 1700 | |
| 1696 | 1701 | if ( ! sort ) { |
| 1697 | | sort = 'featured'; |
| | 1702 | sort = defaultView; |
| 1698 | 1703 | } |
| 1699 | 1704 | self.view.sort( sort ); |
| 1700 | 1705 | self.view.trigger( 'theme:close' ); |