Make WordPress Core

Changeset 54411


Ignore:
Timestamp:
10/07/2022 11:59:18 AM (2 years ago)
Author:
audrasjb
Message:

Docs: Various docblock fixes in WP_Theme_JSON class, as per documentation standards.

Follow-up to [54408].

See #55646.

File:
1 edited

Legend:

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

    r54409 r54411  
    684684     * @param string $to_append Selector to append.
    685685     * @param string $position  A position sub-selector should be appended. Default 'right'.
    686      * @return string
     686     * @return string The new selector.
    687687     */
    688688    protected static function append_to_selector( $selector, $to_append, $position = 'right' ) {
     
    800800     * @param array $tree   Input to process.
    801801     * @param array $schema Schema to adhere to.
    802      * @return array Returns the modified $tree.
     802     * @return array The modified $tree.
    803803     */
    804804    protected static function remove_keys_not_in_schema( $tree, $schema ) {
     
    866866     *                       - `presets`: only the classes for the presets.
    867867     * @param array $origins A list of origins to include. By default it includes VALID_ORIGINS.
    868      * @return string Stylesheet.
     868     * @return string The resulting stylesheet.
    869869     */
    870870    public function get_stylesheet( $types = array( 'variables', 'styles', 'presets' ), $origins = null ) {
     
    10121012
    10131013    /**
    1014      * Get the CSS layout rules for a particular block from theme.json layout definitions.
     1014     * Gets the CSS layout rules for a particular block from theme.json layout definitions.
    10151015     *
    10161016     * @since 6.1.0
    10171017     *
    10181018     * @param array $block_metadata Metadata about the block to get styles for.
    1019      *
    10201019     * @return string Layout styles for the block.
    10211020     */
     
    12871286     * @param string $selector     CSS selector.
    12881287     * @param array  $declarations List of declarations.
    1289      * @return string CSS ruleset.
     1288     * @return string The resulting CSS ruleset.
    12901289     */
    12911290    protected static function to_ruleset( $selector, $declarations ) {
     
    13051304
    13061305    /**
    1307      * Given a settings array, it returns the generated rulesets
     1306     * Given a settings array, returns the generated rulesets
    13081307     * for the preset classes.
    13091308     *
     
    14781477
    14791478    /**
    1480      * Transform a slug into a CSS Custom Property.
     1479     * Transforms a slug into a CSS Custom Property.
    14811480     *
    14821481     * @since 5.9.0
     
    14911490
    14921491    /**
    1493      * Given the block settings, it extracts the CSS Custom Properties
     1492     * Given the block settings, extracts the CSS Custom Properties
    14941493     * for the presets and adds them to the $declarations array
    14951494     * following the format:
     
    15051504     * @param array $settings Settings to process.
    15061505     * @param array $origins  List of origins to process.
    1507      * @return array Returns the modified $declarations.
     1506     * @return array The modified $declarations.
    15081507     */
    15091508    protected static function compute_preset_vars( $settings, $origins ) {
     
    15231522
    15241523    /**
    1525      * Given an array of settings, it extracts the CSS Custom Properties
     1524     * Given an array of settings, extracts the CSS Custom Properties
    15261525     * for the custom values and adds them to the $declarations
    15271526     * array following the format:
     
    15351534     *
    15361535     * @param array $settings Settings to process.
    1537      * @return array Returns the modified $declarations.
     1536     * @return array The modified $declarations.
    15381537     */
    15391538    protected static function compute_theme_vars( $settings ) {
     
    17921791     * @param array $theme_json The tree to extract setting nodes from.
    17931792     * @param array $selectors  List of selectors per block.
    1794      * @return array
     1793     * @return array An array of setting nodes metadata.
    17951794     */
    17961795    protected static function get_setting_nodes( $theme_json, $selectors = array() ) {
     
    18461845     * @param array $theme_json The tree to extract style nodes from.
    18471846     * @param array $selectors  List of selectors per block.
    1848      * @return array
     1847     * @return array An array of style nodes metadata.
    18491848     */
    18501849    protected static function get_style_nodes( $theme_json, $selectors = array() ) {
     
    22322231
    22332232    /**
    2234      * Merge new incoming data.
     2233     * Merges new incoming data.
    22352234     *
    22362235     * @since 5.8.0
     
    23512350
    23522351    /**
    2353      * Returns whether a presets should be overridden or not.
     2352     * Determines whether a presets should be overridden or not.
    23542353     *
    23552354     * @since 5.9.0
     
    24392438
    24402439    /**
    2441      * Get a `default`'s preset name by a provided slug.
     2440     * Gets a `default`'s preset name by a provided slug.
    24422441     *
    24432442     * @since 5.9.0
Note: See TracChangeset for help on using the changeset viewer.