| 396 | | // echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" class="thickbox add_media" id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>'; |
| | 394 | // Don't use this filter. Want to add a button? Use the media_buttons action. |
| | 395 | $legacy_filter = apply_filters('media_buttons_context', ''); // deprecated |
| | 396 | |
| | 397 | if ( $legacy_filter ) { |
| | 398 | // #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag. |
| | 399 | if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) ) |
| | 400 | $legacy_filter .= '</a>'; |
| | 401 | echo $legacy_filter; |
| | 402 | } |