Make WordPress Core


Ignore:
Timestamp:
02/28/2015 10:35:27 AM (10 years ago)
Author:
ocean90
Message:

Press This: Backwards compatibility enhancements.

  • Add missing actions for printing styles/scripts.
  • Since $hook_suffix is null, hardcode press-this.php.
  • Restore body classes, add filter.
  • Use boolean value instead of __return_false().
  • Use wp_json_encode().
  • Update docs for filters in script-loader.php.
  • Make <a href="%1$s">%2$s</a> not translatable.

see #31373.

File:
1 edited

Legend:

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

    r31572 r31588  
    474474        did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array(
    475475            /**
    476              * press_this_source_string: string displayed before the source attribution string, defaults to "Source:".
     476             * Filter the string displayed before the source attribution string in Press This.
    477477             *
    478              * @since 4.2
    479              * @see https://github.com/MichaelArestad/Press-This/issues/25
     478             * @since 4.2.0
    480479             *
    481              * @param string $string Internationalized source string
    482              *
    483              * @return string Source string
     480             * @param string $string Internationalized source string.
    484481             */
    485482            'source' => apply_filters( 'press_this_source_string', __( 'Source:' ) ),
    486483
    487484            /**
    488              * press_this_source_link: HTML link format for the source attribution, can control target, class, etc
     485             * Filter the HTML link format for the Press This source attribution, can control target, class, etc.
    489486             *
    490              * @since 4.2
    491              * @see https://github.com/MichaelArestad/Press-This/issues/25
     487             * @since 4.2.0
    492488             *
    493              * @param string $link_format Internationalized link format, %1$s is link href, %2$s is link text
    494              *
    495              * @return string Link markup
     489             * @param string $link_format Link format, %1$s is link href, %2$s is link text.
    496490             */
    497             'sourceLink' => apply_filters( 'press_this_source_link', __( '<a href="%1$s">%2$s</a>' ) ),
     491            'sourceLink' => apply_filters( 'press_this_source_link', '<a href="%1$s">%2$s</a>' ),
    498492            'newPost' => __( 'Title' ),
    499493            'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
Note: See TracChangeset for help on using the changeset viewer.