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 47af07e01..628858bad 100644
|
|
|
function wporg_themes_scripts() {
|
| 72 | 72 | 'query' => wporg_themes_get_themes_for_query(), |
| 73 | 73 | 'settings' => array( |
| 74 | 74 | /* translators: %s: theme name */ |
| 75 | | 'title' => __( '%s | WordPress.org', 'wporg-themes' ), |
| | 75 | 'title' => array( |
| | 76 | 'default' => __( '%s | WordPress.org', 'wporg-themes' ), |
| | 77 | 'theme' => '%s - ' . sprintf( __( '%s | WordPress.org', 'wporg-themes' ), __( 'WordPress theme', 'wporg-themes' ) ), |
| | 78 | ), |
| 76 | 79 | 'isMobile' => wp_is_mobile(), |
| 77 | 80 | 'postsPerPage' => 24, |
| 78 | 81 | 'path' => trailingslashit( parse_url( home_url(), PHP_URL_PATH ) ), |
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 faf9d4e00..8e58ae214 100644
|
|
|
window.wp = window.wp || {};
|
| 16 | 16 | _.extend( themes, { model: {}, view: {}, routes: {}, router: {}, template: wp.template }); |
| 17 | 17 | |
| 18 | 18 | themes.utils = { |
| 19 | | title: function ( item ) { |
| 20 | | document.title = $( '<div/>' ).html( themes.data.settings.title.replace( '%s', $( '<div/>' ).text(item).html() ) ).text(); |
| | 19 | title: function ( item, isTheme ) { |
| | 20 | var format = !!isTheme ? themes.data.settings.title.theme : themes.data.settings.title.default; |
| | 21 | var title = $( '<div/>' ).html( format.replace( '%s', $( '<div/>' ).text( item ).html() ) ).text(); |
| | 22 | |
| | 23 | if ( document.title !== title ) { |
| | 24 | document.title = title; |
| | 25 | } |
| 21 | 26 | } |
| 22 | 27 | }; |
| 23 | 28 | |
| … |
… |
window.wp = window.wp || {};
|
| 1131 | 1136 | |
| 1132 | 1137 | // Trigger a route update for the current model |
| 1133 | 1138 | themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.id ) ); |
| 1134 | | themes.utils.title( this.model.attributes.name ); |
| | 1139 | themes.utils.title( this.model.attributes.name, true ); |
| 1135 | 1140 | |
| 1136 | 1141 | // Sets this.view to 'detail' |
| 1137 | 1142 | this.setView( 'detail' ); |