Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#40842 new enhancement

Adding template filters

Reported by: ninos-ego's profile Ninos Ego Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch dev-feedback needs-codex
Focuses: template Cc:

Description

Hey there,
for a plugin I really need filters for modifiing the header, footer and also maybe the sidebar. ATM I cannot change the template files without changing the theme itself because of missing filters.

If you need a description why I need to replace the header and footer, it's just simple: I want to add a functionality that on some pages the header/footer is replaced by a minimal header/footer (e.g. for customers from affiliate networks, shop pages). For a plugin it's not possible without these filters. Customers are forced to modify their theme itself, which is very hard to do for non-devs.

I hope you can implement them as soon as possible (in next WP 4.8).

PS: This is not a security risk, because a plugin also can manipulate the theme itself or use filters to change the general templates (single page...).

Attachments (1)

template_filters.patch (2.5 KB) - added by Ninos Ego 7 years ago.
template_filters_patch20170523

Download all attachments as: .zip

Change History (8)

@Ninos Ego
7 years ago

template_filters_patch20170523

#1 @Ninos Ego
7 years ago

  • Keywords has-patch added
  • Severity changed from normal to critical

I've uploaded a patch for faster implementation. The patch is working very well and is also nice documented @matt :-)

Last edited 7 years ago by Ninos Ego (previous) (diff)

#2 @Ninos Ego
7 years ago

  • Severity changed from critical to major

#3 @johnbillion
7 years ago

  • Keywords dev-feedback added
  • Severity changed from major to normal
  • Version trunk deleted

Thanks for the ticket and the patch.

Please don't @-mention random people in your comments unless they're specifically involved. The people who need to see it will see it.

Last edited 7 years ago by johnbillion (previous) (diff)

#4 @Ninos Ego
7 years ago

@johnbillion thx for fast response. I just mentioned the release leader of 4.8 because I hope that I than may get faster implemented into 4.8, sorry for that :)

#5 @Ninos Ego
7 years ago

@johnbillion Is it possible to add this ticket to v4.8 milestone? I'm very scared that implementing this small patch will take several years (several years I cannot finish my plugin). Please, this would be awesome! :)

#6 @Ninos Ego
7 years ago

  • Keywords needs-codex added

This ticket was mentioned in Slack in #core by ninos. View the logs.


7 years ago

Note: See TracTickets for help on using tickets.