WC_Plugin_Updates::get_plugins_with_header( string $header )
Get plugins that have a valid value for a specific header.
Description Description
Parameters Parameters
- $header
-
(Required) Plugin header to search for.
Return Return
(array) Array of plugins that contain the searched header.
Source Source
File: includes/admin/plugin-updates/class-wc-plugin-updates.php
protected function get_plugins_with_header( $header ) { $plugins = get_plugins(); $matches = array(); foreach ( $plugins as $file => $plugin ) { if ( ! empty( $plugin[ $header ] ) ) { $matches[ $file ] = $plugin; } } return apply_filters( 'woocommerce_get_plugins_with_header', $matches, $header, $plugins ); }