Making WordPress.org


Ignore:
Timestamp:
02/25/2022 06:41:30 AM (4 years ago)
Author:
dd32
Message:

Trac: Don't apply the mobile table styles to tables in oEmbed embeds.

See https://make.wordpress.org/meta/2022/02/24/meta-trac-ticket-focus-feb-24/
See #4917.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/trac/oembed/index.php

    r11600 r11614  
    173173        $remove_tags[] = 'h1';
    174174        $remove_tags[] = 'h2';
     175        $remove_tags[] = 'div.paging';
    175176        break;
    176177}
     
    258259    function send() {
    259260        window.parent.postMessage( {
    260             height: Math.max( document.getElementsByTagName('html')[0].offsetHeight, document.documentElement.clientHeight ),
     261            height: Math.max( document.getElementsByTagName('html')[0].offsetHeight, document.documentElement.offsetHeight ),
    261262            el: id
    262263        }, '*' );
     
    279280$doc->getElementsByTagName( 'head' )[0]->appendChild( $doc->createElement( 'style', $css ) );
    280281
     282// Finally add a CSS class to target.
     283$body = $doc->getElementsByTagName( 'body' )[0];
     284$body->setAttribute( 'class', $body->getAttribute( 'class' ) . ' is-oembed' );
     285
    281286$data = $doc->saveHTML();
    282287
Note: See TracChangeset for help on using the changeset viewer.