diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php
index 5a2a54c654..7b5fd914a1 100644
--- a/src/wp-admin/includes/class-wp-press-this.php
+++ b/src/wp-admin/includes/class-wp-press-this.php
@@ -52,7 +52,7 @@ class WP_Press_This {
*
* @param bool $redir_in_parent Whether to redirect in parent window or not. Default false.
*/
- 'redir_in_parent' => apply_filters( 'press_this_redirect_in_parent', __return_false() ),
+ 'redir_in_parent' => apply_filters( 'press_this_redirect_in_parent', false ),
);
}
@@ -377,7 +377,7 @@ class WP_Press_This {
$data['_meta'] = array();
}
- if ( preg_match_all( '/]+)[\s]?\/?>/ ', $source_content, $matches ) ) {
+ if ( preg_match_all( '/]+)[\s]?\/?>/', $source_content, $matches ) ) {
if ( ! empty( $matches[0] ) ) {
foreach ( $matches[0] as $key => $value ) {
if ( preg_match( '/]+(property|name)="(.+)"[^>]+content="(.+)"/', $value, $new_matches ) ) {
@@ -665,7 +665,7 @@ class WP_Press_This {
* @access public
*/
public function html() {
- global $wp_locale, $hook_suffix;
+ global $wp_locale, $wp_version;
// Get data, new (POST) and old (GET).
$data = $this->merge_or_fetch_data();
@@ -698,8 +698,8 @@ class WP_Press_This {
-
+
+
@@ -894,8 +916,12 @@ class WP_Press_This {
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 2c2ab5d1c5..931a47ffe6 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -473,28 +473,22 @@ 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(
/**
- * press_this_source_string: string displayed before the source attribution string, defaults to "Source:".
+ * Filter the string displayed before the source attribution string in Press This.
*
- * @since 4.2
- * @see https://github.com/MichaelArestad/Press-This/issues/25
+ * @since 4.2.0
*
- * @param string $string Internationalized source string
- *
- * @return string Source string
+ * @param string $string Internationalized source string.
*/
'source' => apply_filters( 'press_this_source_string', __( 'Source:' ) ),
/**
- * press_this_source_link: HTML link format for the source attribution, can control target, class, etc
+ * Filter the HTML link format for the Press This source attribution, can control target, class, etc.
*
- * @since 4.2
- * @see https://github.com/MichaelArestad/Press-This/issues/25
+ * @since 4.2.0
*
- * @param string $link_format Internationalized link format, %1$s is link href, %2$s is link text
- *
- * @return string Link markup
+ * @param string $link_format Link format, %1$s is link href, %2$s is link text.
*/
- 'sourceLink' => apply_filters( 'press_this_source_link', __( '%2$s' ) ),
+ 'sourceLink' => apply_filters( 'press_this_source_link', '%2$s' ),
'newPost' => __( 'Title' ),
'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),