WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #26877, comment 3


Ignore:
Timestamp:
02/17/2014 08:56:33 PM (8 years ago)
Author:
MikeSchinkel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26877, comment 3

    v2 v3  
    1111What I want to do is be able to add properties and behavior to the `$post` object so that when I pass the `$post` object around, especially through other people's code that the properties and behavior follow along with it. This is just OOP 101 and wasn't something I though needed to be made highly convincing. 
    1212
    13 I understand and appreciate [/ticket/24672#comment:3 @nacin's reluctance to remove final] which is why my patch did not propose final but instead used containment. The problem is we can't use containment if all the methods that would work with posts throw away our instances when they call `get_post()` which is the reason for my proposal.
     13I understand and appreciate [/ticket/24672#comment:3 @nacin's reluctance to remove final] which is why my patch did not propose `final` but instead used containment. The problem is we can't use containment if all the methods that would work with posts throw away our instances when they call `get_post()` which is the reason for my proposal.
    1414
    1515If someone wants to add their own functionality like this they can't do it compatibly with WordPress; they have to write a fully custom theme vs. just add their own selected theme template files.