GRAYBYTE WORDPRESS FILE MANAGER6899

Server IP : 162.213.255.40 / Your IP : 216.73.216.121
System : Linux server146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/home/hellrfbn/public_html/wp-content/plugins/jetpack/sal/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/plugins/jetpack/sal//class.json-api-metadata.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
 * WPCOM_JSON_API_Metadata class - Utility classes that don't necessarily have a home yet.
 *
 * @package automattic/jetpack
 */

/**
 * Base class for WPCOM_JSON_API_Metadata
 */
class WPCOM_JSON_API_Metadata {
	/**
	 * Checks to see if a meta key is in the array of allowed public (and whitelisted) meta data.
	 *
	 * Additionally, if the key begins with 'geo_' or '_wpas_', true will also be returned.
	 *
	 * @param string $key A post metadata key value to check.
	 * @return bool True or false depending on whether the key meets the defined criteria.
	 **/
	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 ), true ) ) {
			return true;
		}

		if ( str_starts_with( $key, 'geo_' ) ) {
			return true;
		}

		if ( str_starts_with( $key, '_wpas_' ) ) {
			return true;
		}

		return false;
	}

	/**
	 * Checks to see if a meta key should be used internally only.
	 *
	 * @param string $key A post metadata key value to check.
	 * @return bool True or false depending on whether the key meets the defined criteria.
	 **/
	public static function is_internal_only( $key ) {
		// We want to always return the `_jetpack_blogging_prompt_key` key in post responses if it is available.
		if ( $key === '_jetpack_blogging_prompt_key' ) {
			return false;
		}

		// We want to always return the `_jetpack_newsletter_access` key to
		// display the correct newsletter access in Calypso.
		$whitelist = array(
			'_jetpack_newsletter_access',
			'_jetpack_newsletter_tier_id',
			'_jetpack_dont_email_post_to_subs',
		);

		if ( in_array( $key, $whitelist, true ) ) {
			return false;
		}

		if ( str_starts_with( $key, '_jetpack_' ) ) {
			return true;
		}

		if ( str_starts_with( $key, '_elasticsearch_' ) ) {
			return true;
		}

		return false;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
class.json-api-date.php
2.491 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-links.php
15.507 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-metadata.php
2.126 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-platform-jetpack.php
1.308 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-platform.php
1.254 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-post-base.php
31.188 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-post-jetpack.php
2.167 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-site-base.php
43.072 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-site-jetpack-base.php
10.824 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-site-jetpack.php
18.511 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.json-api-token.php
3.644 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF