function feeds_include_library


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 feeds.module feeds_include_library($file, $library)
cle7 feeds.module feeds_include_library($file, $library)
elmsmedia7 feeds.module feeds_include_library($file, $library)
icor7 feeds.module feeds_include_library($file, $library)
meedjum_blog7 feeds.module feeds_include_library($file, $library)
mooc7 feeds.module feeds_include_library($file, $library)

Includes a library file.


$file: The filename to load from.

$library: The name of the library. If libraries module is installed, feeds_include_library() will look for libraries with this name managed by libraries module.

Related topics

8 calls to feeds_include_library()
FeedsCSVParser::parse in sites/all/modules/ulmus/feeds/plugins/
Implements FeedsParser::parse().
FeedsEnclosure::getContent in sites/all/modules/ulmus/feeds/plugins/
FeedsHTTPFetcher::clear in sites/all/modules/ulmus/feeds/plugins/
Clear caches.
FeedsHTTPFetcher::sourceFormValidate in sites/all/modules/ulmus/feeds/plugins/
Override parent::sourceFormValidate().
FeedsHTTPFetcherResult::getRaw in sites/all/modules/ulmus/feeds/plugins/
Overrides FeedsFetcherResult::getRaw();

... See full list


sites/all/modules/ulmus/feeds/feeds.module, line 952
Feeds - basic API functions and hook implementations.


function feeds_include_library($file, $library) {
  static $included = array();
  static $ignore_deprecated = array('simplepie');

  if (!isset($included[$file])) {
    // Disable deprecated warning for libraries known for throwing them
    if (in_array($library, $ignore_deprecated)) {
      $level = error_reporting();
      // We can safely use E_DEPRECATED since Drupal 7 requires PHP 5.3+
      error_reporting($level ^ E_DEPRECATED ^ E_STRICT);

    $library_dir = variable_get('feeds_library_dir', FALSE);
    $feeds_library_path = DRUPAL_ROOT . '/' . drupal_get_path('module', 'feeds') . "/libraries/$file";

    // Try first whether libraries module is present and load the file from
    // there. If this fails, require the library from the local path.
    if (module_exists('libraries') && file_exists(libraries_get_path($library) . "/$file")) {
      require libraries_get_path($library) . "/$file";
      $included[$file] = TRUE;
    elseif ($library_dir && file_exists("$library_dir/$library/$file")) {
      require "$library_dir/$library/$file";
      $included[$file] = TRUE;
    elseif (file_exists($feeds_library_path)) {
      // @todo: Throws "Deprecated function: Assigning the return value of new
      // by reference is deprecated."
      require $feeds_library_path;
      $included[$file] = TRUE;
    // Restore error reporting level
    if (isset($level)) {
  if (isset($included[$file])) {
    return TRUE;
  return FALSE;