WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12955, comment 32


Ignore:
Timestamp:
02/13/2016 02:15:41 AM (6 years ago)
Author:
MikeSchinkel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12955, comment 32

    initial v1  
    66> Basically by using `make_instance()` the goal is to be able to filter the returned object in `get_post()`
    77
    8 Completely agreed that it would be ideal to have the `__construct()` call call `make_instance()`, but unfortunately PHP does not allow changing the class of an object inside a constructor.  A major goal here was to stop `get_post()` from changing the object such that the following is always true:
     8Completely agreed that it would be ideal to have the `__construct()` call `make_instance()`, but unfortunately PHP does not allow specifying the object return value inside a constructor.  A major goal here was to stop `get_post()` from changing the object such that the following is always true:
    99
    1010{{{#!php