Make WordPress Core


Ignore:
Timestamp:
03/01/2015 10:43:36 PM (9 years ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r31594 r31595  
    475475        $scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 );
    476476        did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array(
    477             /**
    478              * Filter the string displayed before the source attribution string in Press This.
    479              *
    480              * @since 4.2.0
    481              *
    482              * @param string $string Internationalized source string.
    483              */
    484             'source' => apply_filters( 'press_this_source_string', __( 'Source:' ) ),
    485 
    486             /**
    487              * Filter the HTML link format for the Press This source attribution, can control target, class, etc.
    488              *
    489              * @since 4.2.0
    490              *
    491              * @param string $link_format Link format, %1$s is link href, %2$s is link text.
    492              */
    493             'sourceLink' => apply_filters( 'press_this_source_link', '<a href="%1$s">%2$s</a>' ),
    494477            'newPost' => __( 'Title' ),
    495478            'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
Note: See TracChangeset for help on using the changeset viewer.