Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Created April 24, 2025 20:23
Show Gist options
  • Save g-maclean/417650c9ba63182caa9419fa5bf00b24 to your computer and use it in GitHub Desktop.
Save g-maclean/417650c9ba63182caa9419fa5bf00b24 to your computer and use it in GitHub Desktop.
PropertyHive - IAmProperty RTDF rewrite rules
//flush rewrite rules after adding: Dashboard->Settings->Permalinks->Save
add_action( 'init', 'iamproperty_rtdf_endpoints_rewrite_rules');
function iamproperty_rtdf_endpoints_rewrite_rules() {
add_rewrite_rule(
'^([0-9]+)/sendpropertydetails[/]?',
'index.php?rtdf=1&rtdf_action=sendpropertydetails&import_id=$matches[1]',
'top'
);
add_rewrite_rule(
'^([0-9]+)/removeproperty[/]?',
'index.php?rtdf=1&rtdf_action=removeproperty&import_id=$matches[1]',
'top'
);
add_rewrite_rule(
'^([0-9]+)/getbranchpropertylist[/]?',
'index.php?rtdf=1&rtdf_action=getbranchpropertylist&import_id=$matches[1]',
'top'
);
add_rewrite_rule(
'^([0-9]+)/getbranchemails[/]?',
'index.php?rtdf=1&rtdf_action=getbranchemails&import_id=$matches[1]',
'top'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment