Modified get_wp_plugin_id() (#35727)
* Modified get_wp_plugin_id() * Changelog. * Use strict comparison per project coding standards. Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
This commit is contained in:
parent
6b3056422e
commit
9fabda744a
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: tweak
|
||||||
|
|
||||||
|
Improves efficiency of code responsible for determining plugin IDs (during feature compatibility checks).
|
|
@ -129,7 +129,7 @@ class PluginUtil {
|
||||||
|
|
||||||
// Try to match plugin_basename().
|
// Try to match plugin_basename().
|
||||||
$plugin_basename = $this->proxy->call_function( 'plugin_basename', $plugin_file );
|
$plugin_basename = $this->proxy->call_function( 'plugin_basename', $plugin_file );
|
||||||
if ( array_key_exists( $plugin_basename, $wp_plugins ) ) {
|
if ( in_array( $plugin_basename, $wp_plugins, true ) ) {
|
||||||
return $plugin_basename;
|
return $plugin_basename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue