[wp-trac] [WordPress Trac] #51293: Add $option Parameter to wp_send_json, wp_send_json_success and wp_send_json_error

WordPress Trac noreply at wordpress.org
Sat Sep 12 06:37:07 UTC 2020


#51293: Add $option Parameter to wp_send_json, wp_send_json_success and
wp_send_json_error
-----------------------------+---------------------------------------
 Reporter:  eroraghav        |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:  5.5.1
 Severity:  normal           |   Keywords:  2nd-opinion needs-refresh
  Focuses:  accessibility    |
-----------------------------+---------------------------------------
 I mostly use wp_send_json function(s) as they work perfectly with
 wp.ajax.post and wp.ajax.send functions. But there was one problem that i
 was not able to use JSON Constants (FLAGS )
 [https://www.php.net/manual/en/json.constants.php]
 So i made an edit to add this option parameter that will be used to add
 JSON Constant.

 $option is Optional. Options to be passed to json_encode(). Default 0.

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


More information about the wp-trac mailing list