Make WordPress Core


Ignore:
Timestamp:
11/05/2019 09:25:53 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Further improve documentation of known return types, plus other docs fixes.

See #48303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme.php

    r46278 r46661  
    11571157     * @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth). -1 depth is infinite.
    11581158     * @param bool $search_parent Optional. Whether to return parent files. Defaults to false.
    1159      * @return array Array of files, keyed by the path to the file relative to the theme's directory, with the values
    1160      *               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.
    11611161     */
    11621162    public function get_files( $type = null, $depth = 0, $search_parent = false ) {
     
    11751175     * @since 4.7.0
    11761176     *
    1177      * @return array Array of page templates, keyed by filename and post type,
     1177     * @return string Array of page templates, keyed by filename and post type,
    11781178     *               with the value of the translated header name.
    11791179     */
     
    12341234     * @param string       $post_type Optional. Post type to get the templates for. Default 'page'.
    12351235     *                                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 header name.
     1236     * @return string[] Array of template header names keyed by the template file name.
    12371237     */
    12381238    public function get_page_templates( $post = null, $post_type = 'page' ) {
     
    12491249         * @since 4.9.6
    12501250         *
    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.
    12531252         * @param WP_Theme     $this           The theme object.
    12541253         * @param WP_Post|null $post           The post being edited, provided for context, or null.
     
    12661265         * @since 4.7.0 Added the `$post_type` parameter.
    12671266         *
    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.
    12701268         * @param WP_Theme     $this           The theme object.
    12711269         * @param WP_Post|null $post           The post being edited, provided for context, or null.
     
    12901288     *                                         returned path for the found files, particularly when this function
    12911289     *                                         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 prepended
    1293      *                     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.
    12941292     */
    12951293    private static function scandir( $path, $extensions = null, $depth = 0, $relative_path = '' ) {
Note: See TracChangeset for help on using the changeset viewer.