From 3d932981e274d4db25deca8ac81a38bb120a0db0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 28 Apr 2020 15:00:30 +0000 Subject: [PATCH] Docs: Correct `@return` type for `WP_Theme::get_post_templates()`. The method returns an array of strings, not a single string. Props mayankmajeji, salvatore.formisano. Fixes #50020. git-svn-id: https://develop.svn.wordpress.org/trunk@47631 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php index d9368317ae..124ee11524 100644 --- a/src/wp-includes/class-wp-theme.php +++ b/src/wp-includes/class-wp-theme.php @@ -1189,8 +1189,8 @@ final class WP_Theme implements ArrayAccess { * * @since 4.7.0 * - * @return string Array of page templates, keyed by filename and post type, - * with the value of the translated header name. + * @return string[] Array of page templates, keyed by filename and post type, + * with the value of the translated header name. */ public function get_post_templates() { // If you screw up your current theme and we invalidate your parent, most things still work. Let it slide.