| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/repository/wp-content/plugins/jetpack/sal/ |
Upload File : |
<?php
/**
* Utility classes that don't necessarily have a home yet
*/
class WPCOM_JSON_API_Metadata {
public static function is_public( $key ) {
if ( empty( $key ) )
return false;
// Default whitelisted meta keys.
$whitelisted_meta = array( '_thumbnail_id' );
// whitelist of metadata that can be accessed
/** This filter is documented in json-endpoints/class.wpcom-json-api-post-endpoint.php */
if ( in_array( $key, apply_filters( 'rest_api_allowed_public_metadata', $whitelisted_meta ) ) )
return true;
if ( 0 === strpos( $key, 'geo_' ) )
return true;
if ( 0 === strpos( $key, '_wpas_' ) )
return true;
return false;
}
public static function is_internal_only( $key ) {
if ( 0 === strpos( $key, '_jetpack_') )
return true;
if ( 0 === strpos( $key, '_elasticsearch_') )
return true;
return false;
}
}