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:
parent
aee04ab9a3
commit
2d19a3b446
|
@ -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
|
* @since 4.2.0
|
||||||
* @access public
|
* @access public
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
|
|
||||||
// Add a source attribution if there is one available.
|
// Add a source attribution if there is one available.
|
||||||
if ( url && siteConfig.suggestedHTML && ( ( title && __( 'newPost' ) !== title ) || siteName ) ) {
|
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 || '';
|
return content || '';
|
||||||
|
|
Loading…
Reference in New Issue