mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
PressThis:
- Simplify `getSuggestedContent()` and helpers. No need to override the global `data`. - Replace the `press_this_source_string` and `press_this_source_link` filters with `press_this_suggested_html` that allows filtering of the link and the wrapper HTML tags. See #31373. git-svn-id: https://develop.svn.wordpress.org/trunk@31595 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -474,23 +474,6 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array(
|
||||
/**
|
||||
* Filter the string displayed before the source attribution string in Press This.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $string Internationalized source string.
|
||||
*/
|
||||
'source' => apply_filters( 'press_this_source_string', __( 'Source:' ) ),
|
||||
|
||||
/**
|
||||
* Filter the HTML link format for the Press This source attribution, can control target, class, etc.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $link_format Link format, %1$s is link href, %2$s is link text.
|
||||
*/
|
||||
'sourceLink' => apply_filters( 'press_this_source_link', '<a href="%1$s">%2$s</a>' ),
|
||||
'newPost' => __( 'Title' ),
|
||||
'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
|
||||
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
|
||||
|
||||
Reference in New Issue
Block a user