mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 04:04:35 +00:00
Code Modernization: Remove workarounds for spl_object_hash().
The `spl_object_hash()` function was introduced in PHP 5.2.0. As of PHP 5.3, the PHP SPL extension can no longer be disabled, so these workarounds are no longer needed. Props jrf. See #48074. git-svn-id: https://develop.svn.wordpress.org/trunk@46220 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -925,23 +925,7 @@ function _wp_filter_build_unique_id( $tag, $function, $priority ) {
|
||||
|
||||
if ( is_object( $function[0] ) ) {
|
||||
// Object Class Calling
|
||||
if ( function_exists( 'spl_object_hash' ) ) {
|
||||
return spl_object_hash( $function[0] ) . $function[1];
|
||||
} else {
|
||||
$obj_idx = get_class( $function[0] ) . $function[1];
|
||||
if ( ! isset( $function[0]->wp_filter_id ) ) {
|
||||
if ( false === $priority ) {
|
||||
return false;
|
||||
}
|
||||
$obj_idx .= isset( $wp_filter[ $tag ][ $priority ] ) ? count( (array) $wp_filter[ $tag ][ $priority ] ) : $filter_id_count;
|
||||
$function[0]->wp_filter_id = $filter_id_count;
|
||||
++$filter_id_count;
|
||||
} else {
|
||||
$obj_idx .= $function[0]->wp_filter_id;
|
||||
}
|
||||
|
||||
return $obj_idx;
|
||||
}
|
||||
return spl_object_hash( $function[0] ) . $function[1];
|
||||
} elseif ( is_string( $function[0] ) ) {
|
||||
// Static Calling
|
||||
return $function[0] . '::' . $function[1];
|
||||
|
||||
Reference in New Issue
Block a user