WordPress.org

Make WordPress Core

Changeset 13815


Ignore:
Timestamp:
03/25/2010 10:02:45 PM (8 years ago)
Author:
westi
Message:

Rename get_specific_template as get_template_part so as to make it clearer as to the point of the function. See #12371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r13658 r13815  
    9595
    9696/**
    97  * Load a generic template.
    98  *
    99  * Includes the named template for a theme or if a name is specified then a
    100  * specialised template will be included. If the theme contains no {slug}.php file
     97 * Load a template part into a template
     98 *
     99 * Makes it easy for a theme to reuse sections of code in a easy to overload way
     100 * for child themes.
     101 *
     102 * Includes the named template part for a theme or if a name is specified then a
     103 * specialised part will be included. If the theme contains no {slug}.php file
    101104 * then no template will be included.
    102105 *
     
    106109 * @uses locate_template()
    107110 * @since 3.0.0
    108  * @uses do_action() Calls 'get_generic_template_{$slug}' action.
     111 * @uses do_action() Calls 'get_template_part{$slug}' action.
    109112 *
    110113 * @param string $slug The slug name for the generic template.
    111114 * @param string $name The name of the specialised template.
    112115 */
    113 function get_generic_template( $slug, $name = null ) {
    114     do_action( "get_generic_template_{$slug}", $name );
     116function get_template_part( $slug, $name = null ) {
     117    do_action( "get_template_part{$slug}", $name );
    115118
    116119    $templates = array();
Note: See TracChangeset for help on using the changeset viewer.