Changeset 6869
- Timestamp:
- 03/13/2018 05:00:54 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
- Files:
-
- 1 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
r6797 r6869 167 167 add_filter( 'page_template_hierarchy', __NAMESPACE__ . '\child_page_templates' ); 168 168 169 function use_opengraph_data_for_embed_template() { 170 global $post; 171 if ( 'page' != $post->post_type || ! $post->page_template || 'default' == $post->page_template ) { 172 return; 173 } 174 175 $meta = custom_open_graph_tags(); 176 if ( $meta ) { 177 add_filter( 'the_title', function( $title ) use( $meta ) { 178 return $meta['og:title'] ?? $title; 179 } ); 180 add_filter( 'the_content', function( $content ) use( $meta ) { 181 return $meta['og:description'] ?? $content; 182 } ); 183 } 184 } 185 add_action( 'embed_head', __NAMESPACE__ . '\use_opengraph_data_for_embed_template' ); 186 169 187 /** 170 188 * Custom template tags. 171 189 */ 172 190 require_once get_stylesheet_directory() . '/inc/template-tags.php'; 191 192 /** 193 * Custom meta descriptions for page templates. 194 */ 195 require_once get_stylesheet_directory() . '/inc/page-meta-descriptions.php'; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-domains.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'WordPress Domains', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'WordPress domains and site names can be very flexible; however, top-level domains can’t use the word WordPress. Find out what is allowed and what constitutes a trademark violation, as well as policies on subdomain use. Review the list of official WordPress sites to know how to recognize and advise violators.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-etiquette.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'Etiquette at WordPress', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'We welcome the contributions of everyone who’s interested in joining the WordPress open source project, and every thriving, diverse community needs etiquette guidelines. Review our simple guidelines that focus on diversity, safety, and inclusion and foster a welcoming community for our contributors around the world.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-features.php
r6868 r6869 27 27 } ); 28 28 29 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 30 $tags['og:title'] = _esc_html__( 'WordPress Features', 'wporg' ); 31 /* translators: WordPress market share: 29%; */ 32 $tags['og:description'] = sprintf( _esc_html__( 'Discover why WordPress powers more than %s of the web. WordPress is a simple, flexible, user-friendly platform, with key features that include media management, SEO, and endless options for customization. More than 50,000 plugins extend the core functionality of WordPress even more. Build your site today.', 'wporg' ), WP_MARKET_SHARE . '%' ); 33 $tags['twitter:text:title'] = $tags['og:title']; 34 $tags['twitter:description'] = $tags['og:description']; 35 36 return $tags; 37 } ); 29 // See inc/page-meta-descriptions.php for the meta description for this page. 38 30 39 31 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-history.php
r6868 r6869 27 27 } ); 28 28 29 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 30 $tags['og:title'] = _esc_html__( 'The History of WordPress', 'wporg' ); 31 /* translators: WordPress market share: 29%; */ 32 $tags['og:description'] = sprintf( _esc_html__( 'WordPress currently powers more than %s of the web. How did it grow to become the world’s leading web publishing platform? Learn about the history of WordPress: an open source software project built by an active community of contributors who are passionate about collaboration, empowerment, and the open web.', 'wporg' ), WP_MARKET_SHARE . '%' ); 33 $tags['twitter:text:title'] = $tags['og:title']; 34 $tags['twitter:description'] = $tags['og:description']; 35 36 return $tags; 37 } ); 29 // See inc/page-meta-descriptions.php for the meta description for this page. 38 30 39 31 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-license.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'The GNU Public License', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'WordPress is an open source software project, and a fierce believer in the values of the open web. WordPress uses the GNU Public License, which provides a platform for technical expansion and encourages adaptation and innovation. Learn more about this license, and discover what can and cannot be done under it.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-logos.php
r6868 r6869 25 25 return new \WP_Error(); 26 26 } ); 27 28 // See inc/page-meta-descriptions.php for the meta description for this page. 27 29 28 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-philosophy.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'WordPress’ Philosophy', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'At the core of the WordPress philosophy is our commitment to the open web and to building software that works for everyone, from a new user to an advanced developer. Our philosophy pushes WordPress to remain flexible, adaptable, and easy-to-use. Learn about WordPress’s philosophy and how it shapes our community.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'WordPress Privacy Policy', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'Like other major software platforms, WordPress gathers and collects statistics and analytical data. Privacy is key in this endeavor and WordPress never discloses any personally identifiable data. Review the WordPress Privacy Policy to learn how, as a participant in this community, you’re privacy is protected.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-requirements.php
r6868 r6869 27 27 } ); 28 28 29 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 30 $tags['og:title'] = _esc_html__( 'Hosting Requirements for WordPress', 'wporg' ); 31 $tags['og:description'] = _esc_html__( 'Running WordPress doesn’t require a lot, but your host will still need to meet a few minimum requirements. Learn about the website hosting requirements to run WordPress, including our recommendation to support PHP 7.2+ and HTTPS. Not sure how to ask your host for these details? Use the sample email we include.', 'wporg' ); 32 $tags['twitter:text:title'] = $tags['og:title']; 33 $tags['twitter:description'] = $tags['og:description']; 34 35 return $tags; 36 } ); 29 // See inc/page-meta-descriptions.php for the meta description for this page. 37 30 38 31 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-roadmap.php
r6868 r6869 27 27 } ); 28 28 29 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 30 $tags['og:title'] = _esc_html__( 'WordPress Development Roadmap', 'wporg' ); 31 $tags['og:description'] = _esc_html__( 'The WordPress Roadmap lists major releases by date, includes details about the features of each release, and acknowledges the contributing community members. Learn about the status of upcoming releases, development cycles, issues, and milestones. Follow the progress of WordPress development week after week!', 'wporg' ); 32 $tags['twitter:text:title'] = $tags['og:title']; 33 $tags['twitter:description'] = $tags['og:description']; 34 35 return $tags; 36 } ); 29 // See inc/page-meta-descriptions.php for the meta description for this page. 37 30 38 31 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-security.php
r6868 r6869 27 27 } ); 28 28 29 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 30 $tags['og:title'] = _esc_html__( 'WordPress is Secure', 'wporg' ); 31 /* translators: WordPress market share: 29%; */ 32 $tags['og:description'] = sprintf( _esc_html__( 'Why is WordPress recommended as a secure website-building solution? With a passionate open source community and an extensible, easy-to-use platform, WordPress provides flexible and secure options for all levels of users, from beginners to pros. Learn how WordPress guarantees the security of %s of the web.', 'wporg' ), WP_MARKET_SHARE . '%' ); 33 $tags['twitter:text:title'] = $tags['og:title']; 34 $tags['twitter:description'] = $tags['og:description']; 35 36 return $tags; 37 } ); 29 // See inc/page-meta-descriptions.php for the meta description for this page. 38 30 39 31 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-stats.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'Key WordPress Statistics', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'WordPress is committed to transparency, and you can get a better sense of its constant worldwide growth through the statistics we share. Review key WordPress stats including usage breakdown by WordPress versions, PHP and MySQL versions being run, and locales of use, and see how WordPress expands its global reach.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-swag.php
r6868 r6869 26 26 } ); 27 27 28 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 29 $tags['og:title'] = _esc_html__( 'WordPress Swag', 'wporg' ); 30 $tags['og:description'] = _esc_html__( 'Show your WordPress pride and run with the coolest swag! You’ll be surprised how widely recognized our logo is around the world, bringing people together through recognition and community. Choose your WordPress swag today (Wapuu t-shirt, anyone?) and your purchase will also support free swag at WordCamps and meetups.', 'wporg' ); 31 $tags['twitter:text:title'] = $tags['og:title']; 32 $tags['twitter:description'] = $tags['og:description']; 33 34 return $tags; 35 } ); 28 // See inc/page-meta-descriptions.php for the meta description for this page. 36 29 37 30 get_header( 'child-page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about.php
r6868 r6869 19 19 } ); 20 20 21 add_filter( 'jetpack_open_graph_tags', function( $tags ) { 22 $tags['og:title'] = _esc_html__( 'Democratize Publishing', 'wporg' ); 23 $tags['og:description'] = _esc_html__( 'WordPress is software designed for everyone with emphasis on accessibility, performance, security, and usability.', 'wporg' ); 24 $tags['twitter:text:title'] = $tags['og:title']; 25 $tags['twitter:description'] = $tags['og:description']; 26 27 return $tags; 28 } ); 21 // See inc/page-meta-descriptions.php for the meta description for this page. 29 22 30 23 get_header();
Note: See TracChangeset
for help on using the changeset viewer.