Changeset 51221 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 06/23/2021 07:04:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r51198 r51221 356 356 * Example: 357 357 * 358 * { 359 * 'core/paragraph': { 360 * 'selector': 'p', 361 * 'elements': { 362 * 'link' => 'link selector', 363 * 'etc' => 'element selector' 358 * { 359 * 'core/paragraph': { 360 * 'selector': 'p', 361 * 'elements': { 362 * 'link' => 'link selector', 363 * 'etc' => 'element selector' 364 * } 365 * }, 366 * 'core/heading': { 367 * 'selector': 'h1', 368 * 'elements': {} 369 * } 370 * 'core/group': { 371 * 'selector': '.wp-block-group', 372 * 'elements': {} 373 * } 364 374 * } 365 * },366 * 'core/heading': {367 * 'selector': 'h1',368 * 'elements': {}369 * }370 * 'core/group': {371 * 'selector': '.wp-block-group',372 * 'elements': {}373 * }374 * }375 375 * 376 376 * @since 5.8.0 … … 518 518 * as classes for each preset value such as: 519 519 * 520 * .has-value-color {521 * color: value;522 * }523 * 524 * .has-value-background-color {525 * background-color: value;526 * }527 * 528 * .has-value-font-size {529 * font-size: value;530 * }531 * 532 * .has-value-gradient-background {533 * background: value;534 * }535 * 536 * p.has-value-gradient-background {537 * background: value;538 * }520 * .has-value-color { 521 * color: value; 522 * } 523 * 524 * .has-value-background-color { 525 * background-color: value; 526 * } 527 * 528 * .has-value-font-size { 529 * font-size: value; 530 * } 531 * 532 * .has-value-gradient-background { 533 * background: value; 534 * } 535 * 536 * p.has-value-gradient-background { 537 * background: value; 538 * } 539 539 * 540 540 * @since 5.8.0 … … 581 581 * For each section this creates a new ruleset such as: 582 582 * 583 * block-selector {584 * --wp--preset--category--slug: value;585 * --wp--custom--variable: value;586 * }583 * block-selector { 584 * --wp--preset--category--slug: value; 585 * --wp--custom--variable: value; 586 * } 587 587 * 588 588 * @since 5.8.0 … … 613 613 * Given a selector and a declaration list, 614 614 * creates the corresponding ruleset. 615 *616 * To help debugging, will add some space617 * if SCRIPT_DEBUG is defined and true.618 615 * 619 616 * @since 5.8.0 … … 732 729 * following the format: 733 730 * 734 * ```php 735 * array( 736 * 'name' => 'property_name', 737 * 'value' => 'property_value, 738 * ) 739 * ``` 731 * array( 732 * 'name' => 'property_name', 733 * 'value' => 'property_value, 734 * ) 740 735 * 741 736 * @since 5.8.0 … … 766 761 * array following the format: 767 762 * 768 * ```php 769 * array( 770 * 'name' => 'property_name', 771 * 'value' => 'property_value, 772 * ) 773 * ``` 763 * array( 764 * 'name' => 'property_name', 765 * 'value' => 'property_value, 766 * ) 774 767 * 775 768 * @since 5.8.0 … … 809 802 * and the token is '--', for this input tree: 810 803 * 811 * {812 * 'some/property': 'value',813 * 'nestedProperty': {814 * 'sub-property': 'value'815 * }816 * }804 * { 805 * 'some/property': 'value', 806 * 'nestedProperty': { 807 * 'sub-property': 'value' 808 * } 809 * } 817 810 * 818 811 * it'll return this output: 819 812 * 820 * {821 * '--wp--some-property': 'value',822 * '--wp--nested-property--sub-property': 'value'823 * }813 * { 814 * '--wp--some-property': 'value', 815 * '--wp--nested-property--sub-property': 'value' 816 * } 824 817 * 825 818 * @since 5.8.0 … … 857 850 * and adds them to the $declarations array following the format: 858 851 * 859 * ```php 860 * array( 861 * 'name' => 'property_name', 862 * 'value' => 'property_value, 863 * ) 864 * ``` 852 * array( 853 * 'name' => 'property_name', 854 * 'value' => 'property_value, 855 * ) 865 856 * 866 857 * @since 5.8.0 … … 968 959 * Builds metadata for the setting nodes, which returns in the form of: 969 960 * 970 * [971 * [972 * 'path' => ['path', 'to', 'some', 'node' ],973 * 'selector' => 'CSS selector for some node'974 * ],975 * [976 * 'path' => [ 'path', 'to', 'other', 'node' ],977 * 'selector' => 'CSS selector for other node'978 * ],979 * ]961 * [ 962 * [ 963 * 'path' => ['path', 'to', 'some', 'node' ], 964 * 'selector' => 'CSS selector for some node' 965 * ], 966 * [ 967 * 'path' => [ 'path', 'to', 'other', 'node' ], 968 * 'selector' => 'CSS selector for other node' 969 * ], 970 * ] 980 971 * 981 972 * @since 5.8.0 … … 1022 1013 * Builds metadata for the style nodes, which returns in the form of: 1023 1014 * 1024 * [1025 * [1026 * 'path' => [ 'path', 'to', 'some', 'node' ],1027 * 'selector' => 'CSS selector for some node'1028 * ],1029 * [1030 * 'path' => ['path', 'to', 'other', 'node' ],1031 * 'selector' => 'CSS selector for other node'1032 * ],1033 * ]1015 * [ 1016 * [ 1017 * 'path' => [ 'path', 'to', 'some', 'node' ], 1018 * 'selector' => 'CSS selector for some node' 1019 * ], 1020 * [ 1021 * 'path' => ['path', 'to', 'other', 'node' ], 1022 * 'selector' => 'CSS selector for other node' 1023 * ], 1024 * ] 1034 1025 * 1035 1026 * @since 5.8.0
Note: See TracChangeset
for help on using the changeset viewer.