WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/15/2014 10:52:45 PM (7 years ago)
Author:
azaozz
Message:

wpView: improve handling of embed errors/error messages, see #28195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r28746 r28754  
    825825// Run later as we have to set DOING_AUTOSAVE for back-compat
    826826add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
     827
     828/**
     829 * Send error message when an URL cannot be embedded. Used in wp_ajax_parse_embed().
     830 *
     831 * @access private
     832 * @since 4.0
     833 */
     834function _wpview_embed_error( $output, $url ) {
     835    wp_send_json_error( array(
     836        'message' => sprintf( __( '%s failed to embed.' ), esc_url( $url ) ),
     837    ) );
     838}
Note: See TracChangeset for help on using the changeset viewer.