Making WordPress.org


Ignore:
Timestamp:
11/18/2014 08:02:05 AM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: add search form to internal pages

fixes #493.
props nlarnold1.

File:
1 edited

Legend:

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

    r954 r990  
    10521052    }
    10531053
     1054    /**
     1055     * Should the search bar be shown?
     1056     *
     1057     * @return bool True if search bar should be shown.
     1058     */
     1059    function should_show_search_bar() {
     1060        $post_types = array( 'wp-parser-class', 'wp-parser-function', 'wp-parser-method', 'wp-parser-hook' );
     1061        $taxonomies = array( 'wp-parser-since', 'wp-parser-package', 'wp-parser-source-file' );
     1062
     1063        return ( is_singular( $post_types ) || is_post_type_archive( $post_types ) || is_tax( $taxonomies ) );
     1064    }
     1065
    10541066}
Note: See TracChangeset for help on using the changeset viewer.