Make WordPress Core


Ignore:
Timestamp:
01/31/2020 01:15:32 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Add support for required WordPress and PHP versions to themes.

Follow-up to [45546] for plugins.

Props flixos90, afragen.
Fixes #44592. See #40934, #meta3718.

File:
1 edited

Legend:

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

    r47122 r47145  
    2222     * Headers for style.css files.
    2323     *
     24     * @since 3.4.0
     25     * @since 5.4.0 Added `Requires at least` and `Requires PHP` headers.
    2426     * @var array
    2527     */
     
    3638        'TextDomain'  => 'Text Domain',
    3739        'DomainPath'  => 'Domain Path',
     40        'RequiresWP'  => 'Requires at least',
     41        'RequiresPHP' => 'Requires PHP',
    3842    );
    3943
     
    802806     *
    803807     * @since 3.4.0
     808     * @since 5.4.0 Added support for `Requires at least` and `Requires PHP` headers.
    804809     *
    805810     * @staticvar array $header_tags
    806811     * @staticvar array $header_tags_with_a
    807812     *
    808      * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
     813     * @param string $header Theme header. Accepts 'Name', 'Description', 'Author', 'Version',
     814     *                       'ThemeURI', 'AuthorURI', 'Status', 'Tags', 'RequiresWP', 'RequiresPHP'.
    809815     * @param string $value  Value to sanitize.
    810816     * @return string|array An array for Tags header, string otherwise.
     
    854860                break;
    855861            case 'Version':
     862            case 'RequiresWP':
     863            case 'RequiresPHP':
    856864                $value = strip_tags( $value );
    857865                break;
Note: See TracChangeset for help on using the changeset viewer.