Error thrown

Call to undefined method WP_Rewrite::add_permastruct()