Changes between Initial Version and Version 1 of Ticket #6008, comment 16
- Timestamp:
- 11/14/2014 02:03:58 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6008, comment 16
initial v1 2 2 > I still think that we'd be better off with a simple filter than with what we have now. 3 3 4 Using the filter you shared in you comment would result in having all titles of an eventual recent posts widgets set to 'Groups Directory' when on the groups directory page. If the post type was specific to the groups directory you could check it but it's a 'page' post type so even if you do a check on the page post type from your filter a "wp_list_page" widget would have all its title set to 'Groups Directory'.4 Using the filter you shared in your comment would result in having all titles of an eventual recent posts widgets set to 'Groups Directory' when on the groups directory page. If the post type was specific to the groups directory you could check it but it's a 'page' post type so even if you do a check on the page post type from your filter a "wp_list_page" widget would have all its title set to 'Groups Directory'. 5 5 6 6 This also means that every time get_the_title() will be used, the filter will be called. That's the main difference with adding a filter just before resetting the post.