Rename get_specific_template as get_template_part so as to make it clearer as to the point of the function. See #12371
git-svn-id: https://develop.svn.wordpress.org/trunk@13815 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0286b0f2e5
commit
8003673862
@ -94,10 +94,13 @@ function get_sidebar( $name = null ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a generic template.
|
* Load a template part into a template
|
||||||
*
|
*
|
||||||
* Includes the named template for a theme or if a name is specified then a
|
* Makes it easy for a theme to reuse sections of code in a easy to overload way
|
||||||
* specialised template will be included. If the theme contains no {slug}.php file
|
* for child themes.
|
||||||
|
*
|
||||||
|
* Includes the named template part for a theme or if a name is specified then a
|
||||||
|
* specialised part will be included. If the theme contains no {slug}.php file
|
||||||
* then no template will be included.
|
* then no template will be included.
|
||||||
*
|
*
|
||||||
* For the parameter, if the file is called "{slug}-special.php" then specify
|
* For the parameter, if the file is called "{slug}-special.php" then specify
|
||||||
@ -105,13 +108,13 @@ function get_sidebar( $name = null ) {
|
|||||||
*
|
*
|
||||||
* @uses locate_template()
|
* @uses locate_template()
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @uses do_action() Calls 'get_generic_template_{$slug}' action.
|
* @uses do_action() Calls 'get_template_part{$slug}' action.
|
||||||
*
|
*
|
||||||
* @param string $slug The slug name for the generic template.
|
* @param string $slug The slug name for the generic template.
|
||||||
* @param string $name The name of the specialised template.
|
* @param string $name The name of the specialised template.
|
||||||
*/
|
*/
|
||||||
function get_generic_template( $slug, $name = null ) {
|
function get_template_part( $slug, $name = null ) {
|
||||||
do_action( "get_generic_template_{$slug}", $name );
|
do_action( "get_template_part{$slug}", $name );
|
||||||
|
|
||||||
$templates = array();
|
$templates = array();
|
||||||
if ( isset($name) )
|
if ( isset($name) )
|
||||||
|
Loading…
Reference in New Issue
Block a user