Make WordPress Core


Ignore:
Timestamp:
12/17/2018 04:35:32 PM (6 years ago)
Author:
desrosj
Message:

Help/About: WordPress 5.0 About Page.

The About page describes all the great changes in WordPress 5.0.

Highlights:

  • Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
  • Added illustrations to the Four Freedoms page.
  • Include a link to wporg user’s plugin favorites as a way to display only the classic plugin as a suggestion for install.
  • Detail the Classic Editor plugin and the support timeline.

Props pixelverbieger, ocean90, karmatosed, pento, boemedia, lonelyvegan, sami.keijonen, TimothyBlynJacobs, xkon, afercia, laurelfulford, joostdevalk, ipstenu, matveb, joen, tinkerbelly, chanthaboune, kjellr, alexislloyd, melchoyce, mcsf, courtney0burton, Otto42, cathibosco, tobifjellner, helen, audrasjb, antpb, jjj, elrae, desrosj, azaozz, joemcgill, skithund, gziolo.

Merges [43913], [43921-43922], [43937-43938], [43946-43947], [43952-43953], [43967-43969] into trunk.

Fixes #45178.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/class-wp-block-parser.php

    r44261 r44264  
    6464
    6565    function __construct( $name, $attrs, $innerBlocks, $innerHTML, $innerContent ) {
    66         $this->blockName    = $name;
    67         $this->attrs        = $attrs;
    68         $this->innerBlocks  = $innerBlocks;
    69         $this->innerHTML    = $innerHTML;
     66        $this->blockName   = $name;
     67        $this->attrs       = $attrs;
     68        $this->innerBlocks = $innerBlocks;
     69        $this->innerHTML   = $innerHTML;
    7070        $this->innerContent = $innerContent;
    7171    }
     
    270270                if ( 0 === $stack_depth ) {
    271271                    if ( isset( $leading_html_start ) ) {
    272                         $this->output[] = (array) self::freeform(
    273                             substr(
    274                                 $this->document,
    275                                 $leading_html_start,
    276                                 $start_offset - $leading_html_start
    277                             )
    278                         );
     272                        $this->output[] = (array) self::freeform( substr(
     273                            $this->document,
     274                            $leading_html_start,
     275                            $start_offset - $leading_html_start
     276                        ) );
    279277                    }
    280278
    281279                    $this->output[] = (array) new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() );
    282                     $this->offset   = $start_offset + $token_length;
     280                    $this->offset = $start_offset + $token_length;
    283281                    return true;
    284282                }
     
    295293            case 'block-opener':
    296294                // track all newly-opened blocks on the stack
    297                 array_push(
    298                     $this->stack,
    299                     new WP_Block_Parser_Frame(
    300                         new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
    301                         $start_offset,
    302                         $token_length,
    303                         $start_offset + $token_length,
    304                         $leading_html_start
    305                     )
    306                 );
     295                array_push( $this->stack, new WP_Block_Parser_Frame(
     296                    new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
     297                    $start_offset,
     298                    $token_length,
     299                    $start_offset + $token_length,
     300                    $leading_html_start
     301                ) );
    307302                $this->offset = $start_offset + $token_length;
    308303                return true;
     
    335330                 * block and add it as a new innerBlock to the parent
    336331                 */
    337                 $stack_top                        = array_pop( $this->stack );
    338                 $html                             = substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
    339                 $stack_top->block->innerHTML     .= $html;
     332                $stack_top = array_pop( $this->stack );
     333                $html = substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
     334                $stack_top->block->innerHTML .= $html;
    340335                $stack_top->block->innerContent[] = $html;
    341                 $stack_top->prev_offset           = $start_offset + $token_length;
     336                $stack_top->prev_offset = $start_offset + $token_length;
    342337
    343338                $this->add_inner_block(
     
    391386        }
    392387
    393         list( $match, $started_at ) = $matches[0];
     388        list( $match, $started_at ) = $matches[ 0 ];
    394389
    395390        $length    = strlen( $match );
    396         $is_closer = isset( $matches['closer'] ) && -1 !== $matches['closer'][1];
    397         $is_void   = isset( $matches['void'] ) && -1 !== $matches['void'][1];
    398         $namespace = $matches['namespace'];
    399         $namespace = ( isset( $namespace ) && -1 !== $namespace[1] ) ? $namespace[0] : 'core/';
    400         $name      = $namespace . $matches['name'][0];
    401         $has_attrs = isset( $matches['attrs'] ) && -1 !== $matches['attrs'][1];
     391        $is_closer = isset( $matches[ 'closer' ] ) && -1 !== $matches[ 'closer' ][ 1 ];
     392        $is_void   = isset( $matches[ 'void' ] ) && -1 !== $matches[ 'void' ][ 1 ];
     393        $namespace = $matches[ 'namespace' ];
     394        $namespace = ( isset( $namespace ) && -1 !== $namespace[ 1 ] ) ? $namespace[ 0 ] : 'core/';
     395        $name      = $namespace . $matches[ 'name' ][ 0 ];
     396        $has_attrs = isset( $matches[ 'attrs' ] ) && -1 !== $matches[ 'attrs' ][ 1 ];
    402397
    403398        /*
     
    406401         */
    407402        $attrs = $has_attrs
    408             ? json_decode( $matches['attrs'][0], /* as-associative */ true )
     403            ? json_decode( $matches[ 'attrs' ][ 0 ], /* as-associative */ true )
    409404            : $this->empty_attrs;
    410405
     
    471466     */
    472467    function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) {
    473         $parent                       = $this->stack[ count( $this->stack ) - 1 ];
     468        $parent = $this->stack[ count( $this->stack ) - 1 ];
    474469        $parent->block->innerBlocks[] = (array) $block;
    475         $html                         = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );
     470        $html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );
    476471
    477472        if ( ! empty( $html ) ) {
    478             $parent->block->innerHTML     .= $html;
     473            $parent->block->innerHTML .= $html;
    479474            $parent->block->innerContent[] = $html;
    480475        }
    481476
    482477        $parent->block->innerContent[] = null;
    483         $parent->prev_offset           = $last_offset ? $last_offset : $token_start + $token_length;
     478        $parent->prev_offset = $last_offset ? $last_offset : $token_start + $token_length;
    484479    }
    485480
     
    500495
    501496        if ( ! empty( $html ) ) {
    502             $stack_top->block->innerHTML     .= $html;
     497            $stack_top->block->innerHTML .= $html;
    503498            $stack_top->block->innerContent[] = $html;
    504499        }
    505500
    506501        if ( isset( $stack_top->leading_html_start ) ) {
    507             $this->output[] = (array) self::freeform(
    508                 substr(
    509                     $this->document,
    510                     $stack_top->leading_html_start,
    511                     $stack_top->token_start - $stack_top->leading_html_start
    512                 )
    513             );
     502            $this->output[] = (array) self::freeform( substr(
     503                $this->document,
     504                $stack_top->leading_html_start,
     505                $stack_top->token_start - $stack_top->leading_html_start
     506            ) );
    514507        }
    515508
Note: See TracChangeset for help on using the changeset viewer.