WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Tracker::get_all_plugins() private WC 1.0

Get all plugins grouped into activated or not.

{} Это метод класса: WC_Tracker{}

Хуков нет.

Возвращает

Массив.

Использование

$result = WC_Tracker::get_all_plugins();

Код WC_Tracker::get_all_plugins() WC 4.7.0

<?php
private static function get_all_plugins() {
	// Ensure get_plugins function is loaded.
	if ( ! function_exists( 'get_plugins' ) ) {
		include ABSPATH . '/wp-admin/includes/plugin.php';
	}

	$plugins             = get_plugins();
	$active_plugins_keys = get_option( 'active_plugins', array() );
	$active_plugins      = array();

	foreach ( $plugins as $k => $v ) {
		// Take care of formatting the data how we want it.
		$formatted         = array();
		$formatted['name'] = strip_tags( $v['Name'] );
		if ( isset( $v['Version'] ) ) {
			$formatted['version'] = strip_tags( $v['Version'] );
		}
		if ( isset( $v['Author'] ) ) {
			$formatted['author'] = strip_tags( $v['Author'] );
		}
		if ( isset( $v['Network'] ) ) {
			$formatted['network'] = strip_tags( $v['Network'] );
		}
		if ( isset( $v['PluginURI'] ) ) {
			$formatted['plugin_uri'] = strip_tags( $v['PluginURI'] );
		}
		if ( in_array( $k, $active_plugins_keys ) ) {
			// Remove active plugins from list so we can show active and inactive separately.
			unset( $plugins[ $k ] );
			$active_plugins[ $k ] = $formatted;
		} else {
			$plugins[ $k ] = $formatted;
		}
	}

	return array(
		'active_plugins'   => $active_plugins,
		'inactive_plugins' => $plugins,
	);
}