You are here

function patterns_load_xml in Patterns 5

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_load_xml()
  2. 6 patterns.module \patterns_load_xml()
2 calls to patterns_load_xml()
patterns_edit_submit in ./patterns.module
Submit edits to the pattern
patterns_get_patterns in ./patterns.module

File

./patterns.module, line 704
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_load_xml($path) {
  if (!file_exists($path)) {
    return;
  }
  $xml = file_get_contents($path);
  $pattern = patterns_from_source($xml);
  return $pattern;
}