Ticket #4267 (new defect)

Opened 1 year ago

Last modified 4 months ago

wp_list_pages using a 'the_title' on all entries my-2cents

Reported by: YellowSwordfish Assigned to:
Priority: normal Milestone: 2.6
Component: Administration Version: 2.2
Severity: normal Keywords: wp_list_pages, filter 2nd-opinion
Cc: david@coppit.org

Description

I have a plugin that – when a specific ‘page’ is displayed (checked by is_page and ID) a filter changes the page title using a standard add_filter on ‘the_title’. If wp_list_pages() is being used on the sidebar, ALL page titles are getting altered in the list output. I have just checked and this does not seem to be the case using 2.1.3 As an aside, optionally passing the post ID into 'the-title' would be useful.

Change History

05/15/07 22:41:19 changed by rob1n

  • milestone changed from 2.2 to 2.2.1.

05/21/07 04:38:11 changed by rob1n

  • keywords changed from wp_list_pages, filter to wp_list_pages, filter 2nd-opinion.
  • owner deleted.
  • milestone changed from 2.2.1 to 2.4.

I'm of the opinion that this is at the fault of the plugin.

05/23/07 15:19:47 changed by westi

  • milestone changed from 2.4 to 2.2.1.

This is a sideeffect of the changes made to wp_list_pages to try and support what is wanted in #4004.

It shows why reusing filters all over the code for similar but not identical things in not a good idea!

filter names should relate to where there are called from not the item of data on which the operate.

06/08/07 23:09:46 changed by rob1n

  • milestone changed from 2.2.1 to 2.2.2.

08/09/07 19:11:59 changed by foolswisdom

  • milestone changed from 2.2.2 to 2.2.3.

08/20/07 16:15:42 changed by coppit

  • cc set to david@coppit.org.

Adding myself to this bug.

08/23/07 23:39:08 changed by hakre

  • summary changed from wp_list_pages using a 'the_title' on all entries to wp_list_pages using a 'the_title' on all entries my-2cents.

+1 - move the filter out of wp_list_pages. good spoken westi, strong point!

08/29/07 18:01:55 changed by foolswisdom

  • milestone changed from 2.2.3 to 2.3.

09/13/07 05:22:58 changed by ryan

  • milestone changed from 2.3 to 2.4.

09/23/07 18:59:23 changed by mattyrob

+1 more for moving the filter out of wp_list_pages or for providing a more elegant solution overall :-)

03/14/08 09:31:04 changed by Denis-de-Bernardy

+1 over here as well -- the_title (or the_content, or...) are for use within the loop.

a widget_title filter would make a lot more sense.