Making WordPress.org


Ignore:
Timestamp:
03/05/2021 12:05:23 AM (4 years ago)
Author:
coffee2code
Message:

Handbooks: Use WPorg_Handbook_Init::get_post_types() as the canonical source for obtaining all handbook post types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/template-tags.php

    r10763 r10768  
    66 * Wrapper function for WPorg_Handbook_Init::get_post_types().
    77 *
    8  * @return array Array with full handbook post type names {post-type}-handbook.
     8 * @return array Array of handbook post types.
    99 */
    1010function wporg_get_handbook_post_types() {
     
    1313    }
    1414
    15     $post_types = WPorg_Handbook_Init::get_post_types();
    16 
    17     foreach ( $post_types as $key => $post_type ) {
    18         if ( 'handbook' !== $post_type ) {
    19             $post_types[ $key ] = $post_type . '-handbook';
    20         }
    21     }
    22 
    23     return $post_types;
     15    return WPorg_Handbook_Init::get_post_types();
    2416}
    2517
Note: See TracChangeset for help on using the changeset viewer.