General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org. Props keesiemeijer Fixes #39148 Built from https://develop.svn.wordpress.org/trunk@39600 git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2702,7 +2702,7 @@ function wp_ajax_send_link_to_editor() {
|
||||
$type = $ext_type;
|
||||
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$html = apply_filters( $type . '_send_to_editor_url', $html, $src, $link_text );
|
||||
$html = apply_filters( "{$type}_send_to_editor_url", $html, $src, $link_text );
|
||||
|
||||
wp_send_json_success( $html );
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ class WP_List_Table {
|
||||
*
|
||||
* @param int $per_page Number of items to be displayed. Default 20.
|
||||
*/
|
||||
return (int) apply_filters( $option, $per_page );
|
||||
return (int) apply_filters( "{$option}", $per_page );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1162,7 +1162,7 @@ final class WP_Screen {
|
||||
$per_page = apply_filters( 'edit_categories_per_page', $per_page );
|
||||
} else {
|
||||
/** This filter is documented in wp-admin/includes/class-wp-list-table.php */
|
||||
$per_page = apply_filters( $option, $per_page );
|
||||
$per_page = apply_filters( "{$option}", $per_page );
|
||||
}
|
||||
|
||||
// Back compat
|
||||
|
||||
@@ -1025,7 +1025,7 @@ function uninstall_plugin($plugin) {
|
||||
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
|
||||
include( WP_PLUGIN_DIR . '/' . $file );
|
||||
|
||||
add_action( 'uninstall_' . $file, $callable );
|
||||
add_action( "uninstall_{$file}", $callable );
|
||||
|
||||
/**
|
||||
* Fires in uninstall_plugin() once the plugin has been uninstalled.
|
||||
@@ -1035,7 +1035,7 @@ function uninstall_plugin($plugin) {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*/
|
||||
do_action( 'uninstall_' . $file );
|
||||
do_action( "uninstall_{$file}" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user