Use simpler function for retrieving last array item
Also avoids array dereferencing syntax incompatible with PHP <5.4.
This commit is contained in:
parent
660a7eea0e
commit
d7dc2d45a4
|
@ -1079,7 +1079,7 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
|
|||
*/
|
||||
private static function associate_plugin_file( $plugins, $key ) {
|
||||
$path = explode( '/', $key );
|
||||
$filename = array_slice( $path, -1 )[0];
|
||||
$filename = end( $path );
|
||||
$plugins[ $filename ] = $key;
|
||||
return $plugins;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue