Order of rewrite rules when calling add_rewrite_rule
I am checking the document for add_rewrite_rule at https://developer.wordpress.org/reference/functions/add_rewrite_rule/, based on its description, it said “Any value in the $after parameter that isn’t ‘bottom’ will result in the rule being placed at the top of the rewrite rules.”
If I understand correctly, the following code:
add_rewrite_rule('/rule1/', 'index.php?rule1', 'top'); add_rewrite_rule('/rule2/', 'index.php?rule2', 'top'); add_rewrite_rule('/rule3/', 'index.php?rule3', 'top');
will cause the rule priority of:
rule3(most high) rule2(second high) rule1
Is that correct?