From eb55b2113168ae068a7aa27cd7a472544e9f5a60 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sun, 7 Aug 2016 12:47:52 +0000 Subject: [PATCH] About Page: Second pass for 4.6. * Update images for native fonts and editor features. * Add video animation with image fallback for update feature. * Rename "Simplified Disaster Recovery" to "Content Recovery". * Fix broken layout on credits and freedoms pages. Props hugobaeta, SergeyBiryukov, ocean90. Fixes #37590. See #37246. git-svn-id: https://develop.svn.wordpress.org/trunk@38213 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 54 +++++++++++++++++++++++++++++++------- src/wp-admin/css/about.css | 23 ++++++++++------ 2 files changed, 60 insertions(+), 17 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 029ea04c3c..24a25dd48b 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -9,8 +9,28 @@ /** WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -if ( current_user_can( 'customize' ) ) { - wp_enqueue_script( 'customize-loader' ); +if ( ! wp_is_mobile() ) { + wp_enqueue_style( 'wp-mediaelement' ); + wp_enqueue_script( 'wp-mediaelement' ); + wp_localize_script( 'mediaelement', '_wpmejsSettings', array( + 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), + 'pauseOtherPlayers' => '', + ) ); +} + +/** + * Replaces the height and width attributes with values for full size. + * + * wp_video_shortcode() limits the width to 640px. + * + * @since 4.6.0 + * @ignore + * + * @param $output Video shortcode HTML output. + * @return string Filtered HTML content to display video. + */ +function _wp_override_admin_video_width_limit( $output ) { + return str_replace( array( '640', '384' ), array( '1050', '630' ), $output ); } $video_url = 'https://videopress.com/embed/scFdjVo6?hd=true'; @@ -50,9 +70,25 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

-
- -
+ 'https://cldup.com/NlOEbKLT_6.mp4', + 'ogv' => 'https://cldup.com/0XzDZMlYwb.ogv', + 'webm' => 'https://cldup.com/ngOx9w9VlE.webm', + 'poster' => 'https://cldup.com/c0kfjoVcFo.png', + 'loop' => true, + 'autoplay' => true, + 'width' => 1050, + 'height' => 630, + 'class' => 'wp-video-shortcode feature-video', + ) ); + remove_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' ); + } else { + echo ''; + } + ?>

@@ -60,7 +96,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

- +

@@ -68,13 +104,13 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

- +

- -

+ +

diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 2c36e3dceb..a6dbb5c4ad 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -90,17 +90,14 @@ .about-wrap p { line-height: 1.5; font-size: 14px; +} + +.about-wrap .feature-section p { max-width: 38em; margin-left: auto; margin-right: auto; } -.about-wrap .changelog p { - max-width: 100%; - margin-left: 0; - margin-right: 0; -} - .about-wrap h1 { margin: 0.2em 200px 0 0; padding: 0; @@ -201,6 +198,14 @@ margin-top: 3em; } +.about-wrap .feature-video .mejs-controls { + display: none !important; +} + +.about-wrap .feature-video .mejs-overlay-loading span { + background: transparent; /* Hide loading.gif */ +} + /* 1.3 - Point Releases */ .about-wrap .point-releases { @@ -474,11 +479,13 @@ padding-bottom: 0; } - .about-wrap .under-the-hood:nth-of-type(2n) { + .about-wrap .under-the-hood:nth-of-type(2n), + .about-wrap .under-the-hood:nth-of-type(3n) { margin-top: 0; } - .about-wrap .under-the-hood:nth-of-type(2n) h4 { + .about-wrap .under-the-hood:nth-of-type(2n) h3, + .about-wrap .under-the-hood:nth-of-type(3n) h3 { margin-top: 0; } }