Changeset 46661 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 11/05/2019 09:25:53 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-theme.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r46278 r46661 1157 1157 * @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth). -1 depth is infinite. 1158 1158 * @param bool $search_parent Optional. Whether to return parent files. Defaults to false. 1159 * @return arrayArray of files, keyed by the path to the file relative to the theme's directory, with the values1160 * being absolute paths.1159 * @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values 1160 * being absolute paths. 1161 1161 */ 1162 1162 public function get_files( $type = null, $depth = 0, $search_parent = false ) { … … 1175 1175 * @since 4.7.0 1176 1176 * 1177 * @return arrayArray of page templates, keyed by filename and post type,1177 * @return string Array of page templates, keyed by filename and post type, 1178 1178 * with the value of the translated header name. 1179 1179 */ … … 1234 1234 * @param string $post_type Optional. Post type to get the templates for. Default 'page'. 1235 1235 * If a post is provided, its post type is used. 1236 * @return array Array of page templates, keyed by filename, with the value of the translated headername.1236 * @return string[] Array of template header names keyed by the template file name. 1237 1237 */ 1238 1238 public function get_page_templates( $post = null, $post_type = 'page' ) { … … 1249 1249 * @since 4.9.6 1250 1250 * 1251 * @param string[] $post_templates Array of page templates. Keys are filenames, 1252 * values are translated names. 1251 * @param string[] $post_templates Array of template header names keyed by the template file name. 1253 1252 * @param WP_Theme $this The theme object. 1254 1253 * @param WP_Post|null $post The post being edited, provided for context, or null. … … 1266 1265 * @since 4.7.0 Added the `$post_type` parameter. 1267 1266 * 1268 * @param string[] $post_templates Array of page templates. Keys are filenames, 1269 * values are translated names. 1267 * @param string[] $post_templates Array of template header names keyed by the template file name. 1270 1268 * @param WP_Theme $this The theme object. 1271 1269 * @param WP_Post|null $post The post being edited, provided for context, or null. … … 1290 1288 * returned path for the found files, particularly when this function 1291 1289 * recurses to lower depths. Default empty. 1292 * @return array|false Array of files, keyed by the path to the file relative to the `$path` directory prepended1293 * with `$relative_path`, with the values being absolute paths. False otherwise.1290 * @return string[]|false Array of files, keyed by the path to the file relative to the `$path` directory prepended 1291 * with `$relative_path`, with the values being absolute paths. False otherwise. 1294 1292 */ 1295 1293 private static function scandir( $path, $extensions = null, $depth = 0, $relative_path = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.