Core Function
View Source on Trac ↗ wp_json_file_decode()
wp_json_file_decode( mixed $filename, mixed $options = array() ) Reads and decodes a JSON file.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $filename string | Path to the JSON file. Required |
| array | $options { Optional. Options to be used with `json_decode()`. Required |
Return Value
(mixed)
mixed Returns the value encoded in JSON in appropriate PHP type.
`null` is returned if the file is not found, or its content can't be decoded.
Function Information
Since Version
5.9.0
Source File
wp-includes/functions.php
Advertisement