'
%1$s', 'link' => '
' . _x( 'Source:', 'Used in Press This to indicate where the content comes from.' ) . ' %2$s
', ); return array( // Used to trigger the bookmarklet update notice. // Needs to be set here and in get_shortcut_link() in wp-includes/link-template.php. 'version' => '5', /** * Filter whether or not Press This should redirect the user in the parent window upon save. * * @since 4.2.0 * * @param bool false Whether to redirect in parent window or not. Default false. */ 'redirInParent' => apply_filters( 'press_this_redirect_in_parent', false ), /** * Filter the default HTML for the Press This editor. * * @since 4.2.0 * * @param array $default_html Associative array with two keys: 'quote' where %1$s is replaced with the site description * or the selected content, and 'link' there %1$s is link href, %2$s is link text. */ 'html' => apply_filters( 'press_this_suggested_html', $default_html ), ); } /** * Get the source's images and save them locally, for posterity, unless we can't. * * @since 4.2.0 * @access public * * @param int $post_id Post ID. * @param string $content Optional. Current expected markup for Press This. Default empty. * @return string New markup with old image URLs replaced with the local attachment ones if swapped. */ public function side_load_images( $post_id, $content = '' ) { $new_content = $content; preg_match_all( '/