WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#21645 closed defect (bug) (invalid)

Documentation for "Rewrite API" and flush_rules

Reported by: here Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.4.1
Component: Rewrite Rules Keywords:
Focuses: docs Cc:

Description

It is not clear if or how visiting the Settings -> Permalinks calls flush_rules. It is referenced occasionally as an apparent alternative to $wp_rewrite->flush_rules() in Documentation. This should be explicitly confirmed in the admin interface and/or a button based action.

Documentation for the Rewrite API functions do not point at $wp_rewrite->flush_rules() effectively. (Updated some codex links, but seems worth including a pointer inline in function definitions.)

I was confused while editing an existing theme why duplicating existing add_feed() structures in functions.php did not produce duplicated behaviour in the permalinks. ?feed=atom1 worked , but /feed/atom1/ didn't, until calling flush_rules()

Logic seems broken between these functions. Why call Rewrite API add_feed() every init, but still require a flush_rules reset to activate? They should be more explicitly linked / combined / triggered. See prior conversation in #21335

http://codex.wordpress.org/Rewrite_API

Change History (8)

#1 @here
9 years ago

  • Summary changed from Rewrite API logic to Rewrite API logic and flush_rules

#2 @SergeyBiryukov
9 years ago

  • Component changed from General to Rewrite Rules

#3 @markoheijnen
9 years ago

I don't agree with it. Flushing rules isn't something the user should deal with. It is something a developer should handle with care.

The add_feed also handles the call to a function and that is something that can change but flushing rules is a one time action.

#4 in reply to: ↑ description @here
7 years ago

  • Severity changed from normal to minor
  • Summary changed from Rewrite API logic and flush_rules to Documentation for "Rewrite API" and flush_rules

I can look into this again and update the documentation or close the ticket. I don't have an option to assign this ticket to me, but feel free to do so if you do.

#5 @SergeyBiryukov
7 years ago

  • Focuses docs added

#6 @DrewAPicture
7 years ago

  • Keywords reporter-feedback close added

@here: Would you to follow up on this ticket or shall we close it?

#7 @here
7 years ago

Sounds good, I will followup. Feel free to close after 2015-01-01 if no further action.

#8 @DrewAPicture
7 years ago

  • Keywords reporter-feedback close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

See comment:7.

Note: See TracTickets for help on using tickets.