Making WordPress.org


Ignore:
Timestamp:
07/02/2018 11:21:31 PM (7 years ago)
Author:
obenland
Message:

Main: Make releases page work with w.org

See #3673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php

    r7350 r7357  
    171171
    172172/**
    173  * Filter page templates that require `$rosetta` to be available.
    174  *
    175  * @global Rosetta_Sites $rosetta
    176  *
    177  * @param array $post_templates Array of page templates. Keys are filenames,
    178  *                              values are translated names.
    179  */
    180 function rosetta_page_templates( $post_templates ) {
    181     if ( empty( $GLOBALS['rosetta'] ) ) {
    182         unset( $post_templates['page-releases.php'] );
    183     }
    184 
    185     return $post_templates;
    186 }
    187 add_filter( 'theme_page_templates', __NAMESPACE__ . '\rosetta_page_templates' );
    188 
    189 /**
    190173 * Passes SEO-optimized title and description to embeds.
    191174 */
Note: See TracChangeset for help on using the changeset viewer.