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-admin/includes/class-wp-press-this.php

    r31589 r31595  
    3232     */
    3333    public function site_settings() {
     34        $html = '<p class="press-this-suggested-source">' . _x( 'Source:', 'Used in Press This to indicate where the content comes from.' ) .
     35            ' <cite><a href="%1$s">%2$s</a></cite></p>';
     36
    3437        return array(
    3538            // Used to trigger the bookmarklet update notice.
     
    4245             * @since 4.2.0
    4346             *
    44              * @param bool $redir_in_parent Whether to redirect in parent window or not. Default false.
     47             * @param bool false Whether to redirect in parent window or not. Default false.
    4548             */
    46             'redir_in_parent' => apply_filters( 'press_this_redirect_in_parent', false ),
     49            'redirInParent' => apply_filters( 'press_this_redirect_in_parent', false ),
     50
     51            /**
     52             * Filter the HTML for the Press This source attribution.
     53             *
     54             * @since 4.2.0
     55             *
     56             * @param string $html Default HTML, %1$s is link href, %2$s is link text.
     57             */
     58            'suggestedHTML' => apply_filters( 'press_this_suggested_html', $html ),
    4759        );
    4860    }
Note: See TracChangeset for help on using the changeset viewer.