WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 3 months ago

#25587 new defect (bug)

wp_search_stopwords filter shouldn't be cached

Reported by: alex-ye Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.7
Component: Query Keywords: has-patch needs-testing
Focuses: Cc:

Description

Caching wp_search_stopwords hook, make it harder to remove the filter and add other filters after the function invoke.

Some reasons:

  • When we make a dynamic stopwords list depending on the 'Input language' or the WP query object.
  • I may add some stopwords using the ar.php file in wp-content/languages , becuase Arabic language has more than 1000 stopword. so I want to provide the ability to remove the filter easily!

Attachments (1)

25587.patch (1.2 KB) - added by alex-ye 6 months ago.

Download all attachments as: .zip

Change History (7)

alex-ye6 months ago

comment:1 alex-ye6 months ago

  • Keywords needs-testing added

comment:2 SergeyBiryukov6 months ago

  • Version set to trunk

comment:3 follow-up: azaozz6 months ago

Arabic language has more than 1000 stopword.

Keep in mind that WordPress should use the shortest list of stopwords possible. The default English stopwords are approximately what the search engines use, however there is a much longer list used in MySQL for full-text queries which is not suitable.

comment:4 in reply to: ↑ 3 alex-ye6 months ago

Replying to azaozz:

Arabic language has more than 1000 stopword.

Keep in mind that WordPress should use the shortest list of stopwords possible. The default English stopwords are approximately what the search engines use, however there is a much longer list used in MySQL for full-text queries which is not suitable.

OK..

So is there any real reason about why wp_search_stopwords filter is cached?

comment:5 SergeyBiryukov5 months ago

  • Version changed from trunk to 3.7

comment:6 nacin3 months ago

  • Component changed from General to Query
Note: See TracTickets for help on using tickets.