[wp-trac] [WordPress Trac] #53262: wp_robots() (via wp_die) triggers a "doing_it_wrong_trigger_error", but should not.

WordPress Trac noreply at wordpress.org
Wed Jun 8 10:47:56 UTC 2022


#53262: wp_robots() (via wp_die) triggers a "doing_it_wrong_trigger_error", but
should not.
-------------------------------------------------+-------------------------
 Reporter:  juliobox                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  General                              |     Version:  5.7
 Severity:  minor                                |  Resolution:
 Keywords:  has-patch needs-testing 2nd-opinion  |     Focuses:
-------------------------------------------------+-------------------------
Changes (by optimocha):

 * keywords:   => has-patch needs-testing 2nd-opinion


Comment:

 I can confirm these notices about is_embed() and is_search are still being
 thrown in version 6.0, and I'm attaching a patch to get rid of them.

 I must admit the patch doesn't seem to have the right way to fix this
 problem but since there's an `add_filter()` line right above the
 `remove_filter()` lines I'm adding, it felt somewhat proper. Still, I'd
 like a second opinion for the patch.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53262#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list