[wp-trac] [WordPress Trac] #55829: Doc error on ticket 10886

WordPress Trac noreply at wordpress.org
Wed May 25 14:23:56 UTC 2022


#55829: Doc error on ticket 10886
----------------------------+-----------------------------
 Reporter:  stevemullen     |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  6.0
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 This is a follow-up to #10886.

 The example, pasted to many places, has two problems:

 - it contains unbalanced parenthesis
 - $this is not a valid parameter.  I believe the function expects
 ($do_parse, $wp, $extra_query_vars)


 {{{
 function wporg_add_custom_query( $do_parse, $this, $extra_query_vars ) {
     if ( 'CUSTOM_VALUE' === $extra_query_vars['custom_arg'] {
         return false;
     }

     return $do_parse;
 }

 add_filter( 'do_parse_request', 'wporg_add_custom_query' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55829>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list