You are here

function rules_condition_alias_exists in Rules 6

Condition implementation: Check if the URL alias already exists

Related topics

File

rules/modules/path.rules.inc, line 39
Rules integration for the path module

Code

function rules_condition_alias_exists($settings) {
  $dst = rules_clean_path($settings['dst'], $settings['replace']);
  return (bool) drupal_lookup_path('source', $dst, $settings['language']);
}