WC_REST_System_Status_V2_Controller::get_dropins_mu_plugins()
Get a list of Dropins and MU plugins.
Метод класса: WC_REST_System_Status_V2_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_REST_System_Status_V2_Controller = new WC_REST_System_Status_V2_Controller(); $WC_REST_System_Status_V2_Controller->get_dropins_mu_plugins();
Список изменений
С версии 3.6.0 | Введена. |
Код WC_REST_System_Status_V2_Controller::get_dropins_mu_plugins() WC REST System Status V2 Controller::get dropins mu plugins WC 9.3.1
public function get_dropins_mu_plugins() { $plugins = get_transient( 'wc_system_status_dropins_mu_plugins' ); if ( false === $plugins ) { $dropins = get_dropins(); $plugins = array( 'dropins' => array(), 'mu_plugins' => array(), ); foreach ( $dropins as $key => $dropin ) { $plugins['dropins'][] = array( 'plugin' => $key, 'name' => $dropin['Name'], ); } $mu_plugins = get_mu_plugins(); foreach ( $mu_plugins as $plugin => $mu_plugin ) { $plugins['mu_plugins'][] = array( 'plugin' => $plugin, 'name' => $mu_plugin['Name'], 'version' => $mu_plugin['Version'], 'url' => $mu_plugin['PluginURI'], 'author_name' => $mu_plugin['AuthorName'], 'author_url' => esc_url_raw( $mu_plugin['AuthorURI'] ), ); } set_transient( 'wc_system_status_dropins_mu_plugins', $plugins, HOUR_IN_SECONDS ); } return $plugins; }