Make WordPress Core


Ignore:
Timestamp:
12/04/2021 12:56:29 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Some documentation improvements for WP_Theme_JSON and WP_Theme_JSON_Resolver classes:

  • Make the @since 5.9.0 notes more specific. When mentioning that parameters or values have been added or changed, it is generally also helpful to include their exact names and the nature of changes for future reference.
  • Update some DocBlocks per the documentation standards.

Follow-up to [52049], [52306].

See #53399, #54336.

File:
1 edited

Legend:

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

    r52280 r52320  
    5757     *
    5858     * @since 5.9.0
    59      * @var integer
     59     * @var int
    6060     */
    6161    private static $user_custom_post_type_id = null;
     
    6565     *
    6666     * @since 5.8.0
    67      * @since 5.9.0 Renamed from $theme_json_i18n
     67     * @since 5.9.0 Renamed from `$theme_json_i18n`.
    6868     * @var array
    6969     */
     
    151151     *
    152152     * @since 5.8.0
    153      * @since 5.9.0 Theme supports have been inlined and the argument removed.
    154      *
     153     * @since 5.9.0 Theme supports have been inlined and the `$theme_support_data` argument removed.
     154     *
     155     * @param array $deprecated Deprecated. Not used.
    155156     * @return WP_Theme_JSON Entity that holds theme data.
    156157     */
    157158    public static function get_theme_data( $deprecated = array() ) {
    158159        if ( ! empty( $deprecated ) ) {
    159             _deprecated_argument( __METHOD__, '5.9' );
     160            _deprecated_argument( __METHOD__, '5.9.0' );
    160161        }
    161162        if ( null === self::$theme ) {
     
    348349     *
    349350     * @since 5.8.0
    350      * @since 5.9.0 Add user data and change the arguments.
     351     * @since 5.9.0 Added user data, removed the `$settings` parameter,
     352     *              added the `$origin` parameter.
    351353     *
    352354     * @param string $origin Optional. To what level should we merge data.
    353      *                       Valid values are 'theme' or 'custom'.
    354      *                       Default is 'custom'.
     355     *                       Valid values are 'theme' or 'custom'. Default 'custom'.
    355356     * @return WP_Theme_JSON
    356357     */
    357358    public static function get_merged_data( $origin = 'custom' ) {
    358359        if ( is_array( $origin ) ) {
    359             _deprecated_argument( __FUNCTION__, '5.9' );
     360            _deprecated_argument( __FUNCTION__, '5.9.0' );
    360361        }
    361362
     
    397398     *
    398399     * @since 5.8.0
    399      * @since 5.9.0 Also check in the parent theme.
     400     * @since 5.9.0 Added a check in the parent theme.
    400401     *
    401402     * @return bool
     
    418419     *
    419420     * @since 5.8.0
    420      * @since 5.9.0 Adapt to work with child themes.
     421     * @since 5.9.0 Adapted to work with child themes, added the `$template` argument.
    421422     *
    422423     * @param string $file_name Name of the file.
     
    435436     *
    436437     * @since 5.8.0
    437      * @since 5.9.0 Added new variables to reset.
     438     * @since 5.9.0 Added the `$user`, `$user_custom_post_type_id`,
     439     *              and `$i18n_schema` variables to reset.
    438440     */
    439441    public static function clean_cached_data() {
Note: See TracChangeset for help on using the changeset viewer.