Make WordPress Core

Ticket #34663: 34663.13.diff

File 34663.13.diff, 2.0 KB (added by ocean90, 9 years ago)
  • src/wp-admin/about.php

     
    8383                <div class="feature-section two-col">
    8484                        <div class="col">
    8585                                <div class="embed-container">
    86                                         <?php echo wp_oembed_get( 'https://make.wordpress.org/core/2015/10/28/new-embeds-feature-in-wordpress-4-4/' ); ?>
     86                                        <?php
     87                                        $embed1 = get_site_transient( 'about-page-embed-1' );
     88                                        if ( false === $embed1 ) {
     89                                                $embed1 = wp_oembed_get( 'https://make.wordpress.org/core/2015/10/28/new-embeds-feature-in-wordpress-4-4/' );
     90                                                if ( ! $embed1 ) {
     91                                                        $embed1 = '{{unknown}}';
     92                                                }
     93                                                set_site_transient( 'about-page-embed-1', $embed1 );
     94                                        }
     95                                        echo '{{unknown}}' !== $embed1 ? $embed1 : '';
     96                                        ?>
    8797                                </div>
    8898                                <h3><?php _e( 'Embed your WordPress content' ); ?></h3>
    8999                                <p><?php _e( 'Now you can embed your posts on other sites, even other WordPress sites. Simply drop a post URL into the editor and see an instant embed preview, complete with the title, excerpt, and featured image if you&#8217;ve set one. We&#8217;ll even include your site icon and links for comments and sharing.' ); ?></p>
    90100                        </div>
    91101                        <div class="col">
    92102                                <div class="embed-container">
    93                                         <?php echo wp_oembed_get( '' ); ?>
     103                                        <?php
     104                                        $embed2 = get_site_transient( 'about-page-embed-2' );
     105                                        if ( false === $embed2 ) {
     106                                                $embed2 = wp_oembed_get( 'https://cloudup.com/cD3duXiAI5k' );
     107                                                if ( ! $embed2 ) {
     108                                                        $embed2 = '{{unknown}}';
     109                                                }
     110                                                set_site_transient( 'about-page-embed-2', $embed2 );
     111                                        }
     112                                        echo '{{unknown}}' !== $embed2 ? $embed2 : '';
     113                                        ?>
    94114                                </div>
    95115                                <h3><?php _e( 'Even more embed providers' ); ?></h3>
    96116                                <p><?php _e( 'In addition to post embeds, WordPress 4.4 also adds support for five new oEmbed providers: Cloudup, Reddit&nbsp;Comments, ReverbNation, Speaker&nbsp;Deck, and VideoPress.' ); ?></p>