Changeset 8688 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
- Timestamp:
- 04/25/2019 09:34:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
r8684 r8688 27 27 add_filter( 'handbook_post_type_defaults', array( __CLASS__, 'filter_handbook_post_type_defaults' ), 10, 2 ); 28 28 add_filter( 'handbook_post_types', array( __CLASS__, 'filter_handbook_post_types' ) ); 29 add_filter( 'handbook_label', array( __CLASS__, 'filter_handbook_label' ), 10, 2 );30 29 add_action( 'init', array( __CLASS__, 'do_init' ) ); 31 30 } … … 98 97 public static function filter_handbook_post_types( $types ) { 99 98 if ( ! self::$post_types ) { 100 self::$post_types = apply_filters( 'devhub_handbook_post_types', [ 'plugin', ' rest-api', 'theme' ] );99 self::$post_types = apply_filters( 'devhub_handbook_post_types', [ 'plugin', 'theme' ] ); 101 100 } 102 101 … … 188 187 189 188 /** 190 * Overrides the default handbook label used as the base for various handbook191 * post type related strings.192 *193 * @param string $label The default label, which is merely a santized194 * version of the handbook name.195 * @param string $post_type The handbook post type.196 * @return string197 */198 public static function filter_handbook_label( $label, $post_type ) {199 if ( 'rest-api-handbook' === $post_type ) {200 $label = __( 'REST API Handbook', 'wporg' );201 }202 203 return $label;204 }205 206 /**207 189 * For specific credit pages, link @usernames references to their profiles on 208 190 * profiles.wordpress.org.
Note: See TracChangeset
for help on using the changeset viewer.