WordPress.org

Make WordPress Core

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


Ignore:
Timestamp:
01/15/2017 08:04:38 AM (5 years ago)
Author:
MikeSchinkel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12955, comment 53

    initial v1  
    77But you are still missing the most common use-case; plugins.  Custom sites often use plugins that themselves use `get_post()`.
    88
    9 I will give you a real world example that happened to us.   We built a site in combination with a design-focused WordPress shop and then when we were close to project completion they had discussed something with the client and they had recommended Beaver Builder.  Well is turns out Beaver Builder was broken when we wrapped `WP_Post` because it used `get_post()` and thus sanitized our wrapper class into oblivion.
     9I will give you a real world example that happened to us.   We built a site in combination with a design-focused WordPress shop and then when we were close to project completion they had discussed something with the client and they had recommended Beaver Builder.  Well it turns out Beaver Builder was broken when we wrapped `WP_Post` because it used `get_post()` and thus sanitized our wrapper class into oblivion.
    1010
    1111Is it not unreasonable to expect that a custom site would want to use commercial or open-source plugins, and it is highly likely they will use `get_post()` internally and destroy the wrapped class objects we use.