- Timestamp:
- 03/05/2021 12:05:23 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/init.php
r10767 r10768 47 47 * @param array $handbooks Array of handbook post types. Default 'handbook'. 48 48 */ 49 return (array) apply_filters( 'handbook_post_types', array( 'handbook' ) ); 49 $post_types = (array) apply_filters( 'handbook_post_types', [ 'handbook' ] ); 50 return array_map( 51 function( $pt ) { 52 $pt = sanitize_title( $pt ); 53 return ( in_array( $pt, [ 'handbook', 'page' ] ) || false !== strpos( $pt, '-handbook' ) ) ? $pt : $pt . '-handbook'; 54 }, 55 $post_types 56 ); 50 57 } 51 58
Note: See TracChangeset
for help on using the changeset viewer.