feat: add metadata url transformer
This commit is contained in:
@@ -138,6 +138,19 @@ if ( ! function_exists( 'wp_parse_url' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'wp_json_encode' ) ) {
|
||||
/**
|
||||
* Minimal JSON encoder for unit tests.
|
||||
*
|
||||
* @param mixed $value Value to encode.
|
||||
* @return string|false
|
||||
*/
|
||||
function wp_json_encode( $value ) {
|
||||
// phpcs:ignore -- Test stub for WordPress' wp_json_encode().
|
||||
return json_encode( $value );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'get_option' ) ) {
|
||||
/**
|
||||
* Minimal WordPress option reader for unit tests.
|
||||
|
||||
Reference in New Issue
Block a user