Changeset 43025
- Timestamp:
- 04/29/2018 10:17:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r42876 r43025 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 * … … 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
Note: See TracChangeset
for help on using the changeset viewer.