mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names. Props ramiy. See #37748. git-svn-id: https://develop.svn.wordpress.org/trunk@38307 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -618,7 +618,7 @@ function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
|
||||
*
|
||||
* @param string $upload_iframe_src The upload iframe source URL by type.
|
||||
*/
|
||||
$upload_iframe_src = apply_filters( $type . '_upload_iframe_src', $upload_iframe_src );
|
||||
$upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
|
||||
|
||||
return add_query_arg('TB_iframe', true, $upload_iframe_src);
|
||||
}
|
||||
@@ -786,7 +786,7 @@ function wp_media_upload_handler() {
|
||||
* @param string $src Media source URL.
|
||||
* @param string $title Media title.
|
||||
*/
|
||||
$html = apply_filters( $type . '_send_to_editor_url', $html, esc_url_raw( $src ), $title );
|
||||
$html = apply_filters( "{$type}_send_to_editor_url", $html, esc_url_raw( $src ), $title );
|
||||
} else {
|
||||
$align = '';
|
||||
$alt = esc_attr( wp_unslash( $_POST['alt'] ) );
|
||||
|
||||
Reference in New Issue
Block a user