Hi I'm trying to add a rewrite rule for a plugin but get this error: 'Call to a member function add_rule() on a non-object' Is there a best way to implement this function? Any help much appreciated. Many thanks.