WordPress.org

Make WordPress Core

Ticket #25879: 25879-3.patch

File 25879-3.patch, 760 bytes (added by meloniq, 8 years ago)

Renamed filter to 'page_template_dropdown_items', added inline filter doc

  • wp-admin/includes/template.php

     
    700700 */
    701701function page_template_dropdown( $default = '' ) {
    702702        $templates = get_page_templates();
     703        /**
     704         * Filter the page templates displayed in dropdown.
     705         *
     706         * @since 3.8
     707         *
     708         * @param array $templates The templates to be displayed.
     709         * @param string $default The default template file name.
     710         */
     711        $templates = apply_filters( 'page_template_dropdown_items', $templates, $default );
    703712        ksort( $templates );
    704713        foreach (array_keys( $templates ) as $template )
    705714                : if ( $default == $templates[$template] )