Make WordPress Core


Ignore:
Timestamp:
06/01/2021 08:07:07 AM (5 years ago)
Author:
youknowriad
Message:

Block Editor: Update packages and backport the latest Gutenberg fixes.

This includes the following fixes:

Props nosolosw, noisysocks.
See #52991.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/wpThemeJson.php

    r51003 r51051  
    621621
    622622        /**
     623         * Function that appends a sub-selector to a existing one.
     624         *
     625         * Given the compounded $selector "h1, h2, h3"
     626         * and the $to_append selector ".some-class" the result will be
     627         * "h1.some-class, h2.some-class, h3.some-class".
     628         *
     629         * @param string $selector Original selector.
     630         * @param string $to_append Selector to append.
     631         *
     632         * @return string
     633         */
     634        private static function append_to_selector( $selector, $to_append ) {
     635                $new_selectors = array();
     636                $selectors     = explode( ',', $selector );
     637                foreach ( $selectors as $sel ) {
     638                        $new_selectors[] = $sel . $to_append;
     639                }
     640
     641                return implode( ',', $new_selectors );
     642        }
     643
     644        /**
    623645         * @ticket 52991
    624646         */
Note: See TracChangeset for help on using the changeset viewer.