Ticket #43872: 43872.diff
File 43872.diff, 1.5 KB (added by , 5 years ago) |
---|
-
src/wp-includes/class-wp-theme.php
1185 1185 /** 1186 1186 * Filters list of page templates for a theme. 1187 1187 * 1188 * @since 5.0.0 1189 * 1190 * @param string[] $post_templates Array of page templates. Keys are filenames, 1191 * values are translated names. 1192 * @param WP_Theme $this The theme object. 1193 * @param WP_Post|null $post The post being edited, provided for context, or null. 1194 * @param string $post_type Post type to get the templates for. 1195 */ 1196 $post_templates = (array) apply_filters( 'theme_templates', $post_templates, $this, $post, $post_type ); 1197 1198 /** 1199 * Filters list of page templates for a theme. 1200 * 1188 1201 * The dynamic portion of the hook name, `$post_type`, refers to the post type. 1189 1202 * 1190 1203 * @since 3.9.0 … … 1197 1210 * @param WP_Post|null $post The post being edited, provided for context, or null. 1198 1211 * @param string $post_type Post type to get the templates for. 1199 1212 */ 1200 return (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type ); 1213 $post_templates = (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type ); 1214 1215 return $post_templates; 1201 1216 } 1202 1217 1203 1218 /**