Changeset 7299
- Timestamp:
- 06/13/2018 08:39:00 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r7273 r7299 67 67 'settings' => array( 68 68 /* translators: %s: theme name */ 69 'title' => __( '%s & mdash; Free WordPress Themes', 'wporg-themes' ),69 'title' => __( '%s | WordPress.org', 'wporg-themes' ), 70 70 'isMobile' => wp_is_mobile(), 71 71 'postsPerPage' => 24, … … 143 143 } 144 144 add_filter( 'body_class', 'wporg_themes_body_class' ); 145 146 /** 147 * Append an optimized site name. 148 * 149 * @param array $title { 150 * The document title parts. 151 * 152 * @type string $title Title of the viewed page. 153 * @type string $page Optional. Page number if paginated. 154 * @type string $tagline Optional. Site description when on home page. 155 * @type string $site Optional. Site title when not on home page. 156 * } 157 * @return array Filtered title parts. 158 */ 159 function wporg_themes_document_title( $title ) { 160 if ( is_front_page() ) { 161 $title['title'] = __( 'WordPress Themes', 'wporg-themes' ); 162 $title['tagline'] = __( 'WordPress.org', 'wporg-themes' ); 163 } else if ( is_category() || is_tag() ) { 164 /* translators: Category or tag name */ 165 $title['title'] = sprintf( __( 'WordPress Themes: %s Free', 'wporg-themes' ), single_term_title( '', false ) ); 166 } 167 168 if ( ! is_front_page() ) { 169 $title['site'] = __( 'WordPress.org', 'wporg-themes' ); 170 } 171 172 return $title; 173 } 174 add_filter( 'document_title_parts', 'wporg_themes_document_title' ); 175 176 /** 177 * Set the separator for the document title. 178 * 179 * @return string Document title separator. 180 */ 181 add_filter( 'document_title_separator', function() { 182 return '|'; 183 } ); 184 185 /** 186 * Adds meta description for front page. 187 * 188 * @param array $tags Array that consists of meta name and meta content pairs. 189 */ 190 function wporg_themes_meta_tags( $tags ) { 191 if ( is_front_page() ) { 192 $tags['description'] = __( 'Find the perfect theme for your WordPress website. Choose from thousands of stunning designs with a wide variety of features and customization options.', 'wporg-themes' ); 193 } 194 195 return $tags; 196 } 197 add_filter( 'jetpack_seo_meta_tags', 'wporg_themes_meta_tags' ); 145 198 146 199 /** … … 299 352 add_filter( 'embed_template', 'wporg_themes_embed_template' ); 300 353 354 include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo.php'; 355 include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-posts.php'; 356 include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-titles.php'; 357 include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-utils.php'; 358 359 if ( class_exists( 'Jetpack_SEO' ) ) { 360 new Jetpack_SEO; 361 } -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php
r6347 r7299 6 6 */ 7 7 8 $GLOBALS['pagetitle'] = __( 'Theme Directory — Free WordPress Themes', 'wporg-themes');8 $GLOBALS['pagetitle'] = wp_get_document_title(); 9 9 10 10 require WPORGPATH . 'header.php';
Note: See TracChangeset
for help on using the changeset viewer.