mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
Docs: Docs on docs. Further improve documentation of known return types, plus other docs fixes.
See #48303 git-svn-id: https://develop.svn.wordpress.org/trunk@46662 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -112,14 +112,14 @@ function delete_theme( $stylesheet, $redirect = '' ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Page Templates available in this theme
|
||||
* Gets the page templates available in this theme.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.7.0 Added the `$post_type` parameter.
|
||||
*
|
||||
* @param WP_Post|null $post Optional. The post being edited, provided for context.
|
||||
* @param string $post_type Optional. Post type to get the templates for. Default 'page'.
|
||||
* @return array Key is the template name, value is the filename of the template
|
||||
* @return string[] Array of template file names keyed by the template header name.
|
||||
*/
|
||||
function get_page_templates( $post = null, $post_type = 'page' ) {
|
||||
return array_flip( wp_get_theme()->get_page_templates( $post, $post_type ) );
|
||||
|
||||
Reference in New Issue
Block a user