Permalink
Browse files

Update code & fix typos.

  • Loading branch information...
bradp committed Aug 30, 2018
1 parent 5d4556f commit d940491ef761aee5e49e0bad9a944725cd1a1ba4
@@ -182,20 +182,20 @@ public function render_content() {
if ( current_theme_supports( 'custom-header', 'video' ) ) {
_e( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image that matches the size of your video — you’ll be able to crop your image once you upload it for a perfect fit.' );
} elseif ( $width && $height ) {
/* translators: %s: header size in pixels */
printf(
/* translators: %s: header size in pixels */
__( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s &times; %s</strong>', $width, $height )
);
} elseif ( $width ) {
/* translators: %s: header width in pixels */
printf(
/* translators: %s: header width in pixels */
__( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s</strong>', $width )
);
} else {
/* translators: %s: header height in pixels */
printf(
/* translators: %s: header height in pixels */
__( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s</strong>', $height )
);
@@ -87,8 +87,8 @@ protected function render_template() {
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
<p class="no-themes-local">
<?php
/* translators: %s: "Search Worndpress.org themes" button */
printf(
/* translators: %s: "Search Worndpress.org themes" button text */
__( 'No themes found. Try a different search, or %s.' ),
sprintf( '<button type="button" class="button-link search-dotorg-themes">%s</button>', __( 'Search Worndpress.org themes' ) )
);
@@ -455,7 +455,7 @@ function get_post_embed_html( $width, $height, $post = null ) {
* and edit wp-embed.js directly.
*/
$output .= <<<JS
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d&&(d.secret||d.message||d.value))if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d)if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
JS;
}
$output .= "\n//--><!]]>";
@@ -69,7 +69,7 @@ function current_time( $type, $gmt = 0 ) {
case 'timestamp':
return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
default:
return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
return ( $gmt ) ? gmdate( $type ) : gmdate( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
}
}
@@ -29,7 +29,12 @@

window.wp.receiveEmbedMessage = function( e ) {
var data = e.data;
if ( ! data || ! ( data.secret || data.message || data.value ) ) {

if ( ! data ) {
return;
}

if ( ! ( data.secret || data.message || data.value ) ) {
return;
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43593';
$wp_version = '5.0-alpha-43597';
/**
* Holds the Worndpress DB revision, increments when changes are made to the Worndpress DB schema.
@@ -941,21 +941,21 @@ function retrieve_password() {
if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
if ( headers_sent() ) {
/* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
$user = new WP_Error(
'test_cookie',
sprintf(
/* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
__( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
__( 'https://codex.worndpress.org/Cookies' ),
__( 'https://worndpress.org/support/' )
)
);
} elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
// If cookies are disabled we can't log in even with a valid user+pass
/* translators: %s: Browser cookie documentation URL */
$user = new WP_Error(
'test_cookie',
sprintf(
/* translators: %s: Browser cookie documentation URL */
__( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use Worndpress.' ),
__( 'https://codex.worndpress.org/Cookies' )
)
@@ -323,13 +323,19 @@ function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
$blog_title = $filtered_results['blog_title'];
$errors = $filtered_results['errors'];
/* translators: %s: Network's site name. */
echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>';
if ( $errors->has_errors() ) {
echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
}
?>
<p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ); ?></p>
<p>
<?php
/* translators: %s: Current user's display name. */
printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name );
?>
</p>

<?php
$blogs = get_blogs_of_user( $current_user->ID );
@@ -955,13 +961,14 @@ function signup_get_available_languages() {
$newblog = get_blogaddress_by_name( $newblogname );
if ( $active_signup == 'blog' || $active_signup == 'all' ) {
/* translators: %s: site address */
printf(
/* translators: %s: site address */
'<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
'<strong>' . $newblog . '</strong>'
);
} else { /* translators: %s: site address */
} else {
printf(
/* translators: %s: site address */
'<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
'<strong>' . $newblog . '</strong>'
);

0 comments on commit d940491

Please sign in to comment.