english/libraries/joomla/installer/adapters/plugin.php
/**
	 * Custom discover method
	 *
	 * @return  array  JExtension) list of extensions available
	 * @since   11.1
	 */
Custom discover method
@return  array  JExtension) list of extensions available
@since   11.1
Custom discover method @return array JExtension ) list of extensions available @since 11 . 1
function discover()
	{
		$results = Array();
		$folder_list = JFolder::folders(JPATH_SITE . '/plugins');
		foreach ($folder_list as $folder)
		{
			$file_list = JFolder::files(JPATH_SITE . '/plugins/' . $folder,'\.xml$');
			foreach ($file_list as $file)
			{
				$manifest_details = JApplicationHelper::parseXMLInstallFile(JPATH_SITE.'/plugins/'.$folder.'/'.$file);
				$file = JFile::stripExt($file);
				if ($file == 'example') continue;
				$extension = JTable::getInstance('extension');
				$extension->set('type', 'plugin');
				$extension->set('client_id', 0);
				$extension->set('element', $file);
				$extension->set('folder', $folder);
				$extension->set('name', $file);
				$extension->set('state', -1);
				$extension->set('manifest_cache', json_encode($manifest_details));
				$results[] = $extension;
			}
			$folder_list = JFolder::folders(JPATH_SITE . '/plugins/' . $folder);
			foreach ($folder_list as $plugin_folder)
			{
				$file_list = JFolder::files(JPATH_SITE . '/plugins/' . $folder . '/' . $plugin_folder,'\.xml$');
				foreach ($file_list as $file)
				{
					$manifest_details = JApplicationHelper::parseXMLInstallFile(JPATH_SITE.'/plugins/'.$folder.'/'.$plugin_folder.'/'.$file);
					$file = JFile::stripExt($file);
					if ($file == 'example') continue; 
					$extension = JTable::getInstance('extension');
					$extension->set('type', 'plugin');
					$extension->set('client_id', 0);
					$extension->set('element', $file);
					$extension->set('folder', $folder);
					$extension->set('name', $file);
					$extension->set('state', -1);
					$extension->set('manifest_cache', json_encode($manifest_details));
					$results[] = $extension;
				}
			}
		}
		return $results;
	}
function discover ( ) { $ results = Array ( ) ; $ folder_list = JFolder :: folders ( JPATH_SITE . '/plugins' ) ; foreach ( $ folder_list as $ folder ) { $ file_list = JFolder :: files ( JPATH_SITE . '/plugins/' . $ folder , '\.xml$' ) ; foreach ( $ file_list as $ file ) { $ manifest_details = JApplicationHelper :: parseXMLInstallFile ( JPATH_SITE . '/plugins/' . $ folder . '/' . $ file ) ; $ file = JFile :: stripExt ( $ file ) ; if ( $ file == 'example' ) continue ; $ extension = JTable :: getInstance ( 'extension' ) ; $ extension -> set ( 'type' , 'plugin' ) ; $ extension -> set ( 'client_id' , 0 ) ; $ extension -> set ( 'element' , $ file ) ; $ extension -> set ( 'folder' , $ folder ) ; $ extension -> set ( 'name' , $ file ) ; $ extension -> set ( 'state' , - 1 ) ; $ extension -> set ( 'manifest_cache' , json_encode ( $ manifest_details ) ) ; $ results [ ] = $ extension ; } $ folder_list = JFolder :: folders ( JPATH_SITE . '/plugins/' . $ folder ) ; foreach ( $ folder_list as $ plugin_folder ) { $ file_list = JFolder :: files ( JPATH_SITE . '/plugins/' . $ folder . '/' . $ plugin_folder , '\.xml$' ) ; foreach ( $ file_list as $ file ) { $ manifest_details = JApplicationHelper :: parseXMLInstallFile ( JPATH_SITE . '/plugins/' . $ folder . '/' . $ plugin_folder . '/' . $ file ) ; $ file = JFile :: stripExt ( $ file ) ; if ( $ file == 'example' ) continue ; $ extension = JTable :: getInstance ( 'extension' ) ; $ extension -> set ( 'type' , 'plugin' ) ; $ extension -> set ( 'client_id' , 0 ) ; $ extension -> set ( 'element' , $ file ) ; $ extension -> set ( 'folder' , $ folder ) ; $ extension -> set ( 'name' , $ file ) ; $ extension -> set ( 'state' , - 1 ) ; $ extension -> set ( 'manifest_cache' , json_encode ( $ manifest_details ) ) ; $ results [ ] = $ extension ; } } } return $ results ; }
Custom discover method
 @return  array  JExtension) list of extensions available
 @since   11.1
Custom discover method @return array JExtension ) list of extensions available @since 11 . 1
// Ignore example plugins // ignore example plugins