if ($resource["type"] == "text" && is_string($data)) { // External link if (substr($data, 0, 4) == "http" && strpos($data, WWW_ROOT) === false) { // Only check external links if we've requested them if ($external) { // Strip out hashes, they conflict with urlExists if (strpos($data, "#") !== false) { $data = substr($data, 0, strpos($data, "#") - 1); } if (!BigTreeAdmin::urlExists($data)) { $integrity_errors[$field] = array("a" => array($data)); } } // Internal link } elseif (substr($data, 0, 4) == "http") { if (!BigTreeAdmin::urlExists($data)) { $integrity_errors[$field] = array("a" => array($data)); } } // HTML we just run through checkHTML } elseif ($resource["type"] == "html") { $integrity_errors[$field] = BigTreeAdmin::checkHTML($local_path, $data, $external); } elseif ($resource["type"] == "callouts" && is_array($data)) { foreach ($data as $callout_data) { $callout = BigTreeAdmin::getCallout($callout_data["type"]); if ($callout) { // We're going to modify the field titles so that it makes more sense when someone is diagnosing the issue $callout_resources = array_filter((array) $callout["resources"]); foreach ($callout_resources as &$column) { // If we have an internal title saved we can give even more context to which matrix entity has the problem if ($callout_data["display_title"]) {