wp_json_file_decode


wp_json_file_decode ( $filename, $options = array() )

Parameters:
  • (string) filename Path to the JSON file.
  • (array) options { Optional. Options to be used with `json_decode()`. @type bool $associative Optional. When `true`, JSON objects will be returned as associative arrays. When `false`, JSON objects will be returned as objects. Default false. }
Returns:
  • (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.
Defined at:

Description

Reads and decodes a JSON file.

Related Functions

wp_json_encode, wp_is_file_mod_allowed, wp_filter_comment, wp_nonce_field, wp_handle_sideload

Top Google Results

User discussions

wpseek mobile