{"id":12505445,"date":"2020-03-04T00:25:01","date_gmt":"2020-03-04T00:25:01","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/adding-new-rules-through-code\/"},"modified":"2020-03-04T00:25:01","modified_gmt":"2020-03-04T00:25:01","slug":"adding-new-rules-through-code","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/adding-new-rules-through-code\/","title":{"rendered":"Adding new rules through code"},"content":{"rendered":"<p>Hi John,<\/p>\n<p>I am the developer of Media File Renamer (among other plugins). Many of my users are using Redirection (and I am redirecting many of them to your plugin, in fact, :p), but it&#8217;s understandable that they would prefer not to have to export and import the list of redirections every time.<\/p>\n<p>Is there a function I could call to add new redirections, directly?<br \/>\nAlso, do you have a function to check if a redirection already exists, to avoid duplicates?<\/p>\n<p>Thanks a lot \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-12505445","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12505445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12505445\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12505445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}