PressThis:

- Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them.
- Fix docs typo, props kraftbj.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-03-01 23:28:00 +00:00
parent aee04ab9a3
commit 2d19a3b446
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class WP_Press_This {
}
/**
* Get the sources images and save them locally, fr posterity, unless we can't.
* Get the source's images and save them locally, for posterity, unless we can't.
*
* @since 4.2.0
* @access public

View File

@ -208,7 +208,7 @@
// Add a source attribution if there is one available.
if ( url && siteConfig.suggestedHTML && ( ( title && __( 'newPost' ) !== title ) || siteName ) ) {
content += siteConfig.suggestedHTML.replace( '%1$s', encodeURI( url ) ).replace( '%2$s', ( title || siteName ) );
content += siteConfig.suggestedHTML.replace( /%1\$s/g, encodeURI( url ) ).replace( /%2\$s/g, ( title || siteName ) );
}
return content || '';