Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #63500


Ignore:
Timestamp:
05/29/2025 04:42:55 AM (18 months ago)
Author:
dd32
Comment:

Hi @mamunur105,

This request is being tracked in #12955

Note: Use of WP_Post fields directly is discouraged and the helper methods should be used instead, additionally, only modifying the contents of the WP_Post may not reflect through other helper methods.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63500

    • Property Component General → Posts, Post Types
    • Property Milestone Awaiting Review
    • Property Resolution → duplicate
    • Property Status new → closed
  • Ticket #63500 – Description

    initial v1  
    1111Add a filter hook before the return statement in `get_post()`, like so:
    1212
    13 ```php
     13{{{#!php
    1414$_post = apply_filters( 'get_post_object', $_post, $_post->ID );
    15 
     15}}}
    1616
    1717