Making WordPress.org

Changeset 8684


Ignore:
Timestamp:
04/25/2019 08:17:09 PM (5 years ago)
Author:
coffee2code
Message:

Developer: Allow handbook post types to be filtered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php

    r7319 r8684  
    1717     * @access public
    1818     */
    19     public static $post_types = array( 'plugin', 'rest-api', 'theme' );
     19    public static $post_types = [];
    2020
    2121    /**
     
    9797    */
    9898    public static function filter_handbook_post_types( $types ) {
     99        if ( ! self::$post_types ) {
     100            self::$post_types = apply_filters( 'devhub_handbook_post_types', [ 'plugin', 'rest-api', 'theme' ] );
     101        }
     102
    99103        return self::$post_types;
    100104    }
Note: See TracChangeset for help on using the changeset viewer.