Changeset 954 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
- Timestamp:
- 10/29/2014 08:07:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
r953 r954 38 38 39 39 add_filter( 'the_content', array( __CLASS__, 'autolink_credits' ) ); 40 41 add_filter( 'handbook_post_type_defaults', array( __CLASS__, 'filter_handbook_post_type_defaults' ), 10, 2 ); 40 42 41 43 // Add the handbook's 'Watch' action link. … … 116 118 117 119 /** 120 * Overrides default handbook post type configuration. 121 * 122 * Specifically, uses a plural slug while retaining pre-existing singular post 123 * type name. 124 * 125 * @access public 126 * 127 * @param array $defaults The default post type configuration. 128 * @param string $post_type The post type name. 129 * @return array 130 */ 131 public static function filter_handbook_post_type_defaults( $defaults, $post_type ) { 132 $defaults['rewrite'] = array( 133 'feeds' => false, 134 'slug' => $post_type . 's', 135 'with_front' => false, 136 ); 137 138 return $defaults; 139 } 140 141 /** 118 142 * For specific credit pages, link @usernames references to their profiles on 119 143 * profiles.wordpress.org.
Note: See TracChangeset
for help on using the changeset viewer.