X7ROOT File Manager
Current Path:
/home/notabjze/digitalcontentmentors.com/wp-content/plugins/jetpack/_inc/lib
home
/
notabjze
/
digitalcontentmentors.com
/
wp-content
/
plugins
/
jetpack
/
_inc
/
lib
/
ðŸ“
..
ðŸ“
admin-pages
📄
class-jetpack-ai-helper.php
(14.21 KB)
📄
class-jetpack-blog-stats-helper.php
(2.73 KB)
📄
class-jetpack-currencies.php
(4.73 KB)
📄
class-jetpack-instagram-gallery-helper.php
(2.92 KB)
📄
class-jetpack-mapbox-helper.php
(3.16 KB)
📄
class-jetpack-podcast-feed-locator.php
(3.47 KB)
📄
class-jetpack-podcast-helper.php
(20.23 KB)
📄
class-jetpack-recommendations.php
(15.24 KB)
📄
class-jetpack-top-posts-helper.php
(4.48 KB)
📄
class.color.php
(21.79 KB)
📄
class.core-rest-api-endpoints.php
(148.07 KB)
📄
class.jetpack-automatic-install-skin.php
(293 B)
📄
class.jetpack-iframe-embed.php
(3.1 KB)
📄
class.jetpack-password-checker.php
(32.45 KB)
📄
class.jetpack-search-performance-logger.php
(3.62 KB)
📄
class.media-extractor.php
(21.57 KB)
📄
class.media-summary.php
(15.13 KB)
📄
class.media.php
(15.56 KB)
📄
components.php
(3.04 KB)
ðŸ“
core-api
ðŸ“
debugger
📄
debugger.php
(872 B)
📄
icalendar-reader.php
(33.11 KB)
ðŸ“
markdown
📄
markdown.php
(344 B)
📄
plans.php
(1.89 KB)
📄
plugins.php
(209 B)
📄
tonesque.php
(6.85 KB)
📄
widgets.php
(26.19 KB)
Editing: plans.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Plans Library * * Fetch plans data from WordPress.com. * * Not to be confused with the `Jetpack_Plan` (singular) * class, which stores and syncs data about the site's _current_ plan. * * @package automattic/jetpack */ class Jetpack_Plans { /** * Get a list of all available plans from WordPress.com * * @since 7.7.0 * * @return array The plans list */ public static function get_plans() { if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { if ( ! class_exists( 'Store_Product_List' ) ) { require WP_CONTENT_DIR . '/admin-plugins/wpcom-billing/store-product-list.php'; } return Store_Product_List::api_only_get_active_plans_v1_4(); } // We're on Jetpack, so it's safe to use this namespace. $request = Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_user( '/plans?_locale=' . get_user_locale(), // We're using version 1.5 of the endpoint rather than the default version 2 // since the latter only returns Jetpack Plans, but we're also interested in // WordPress.com plans, for consumers of this method that run on WP.com. '1.5', array( 'method' => 'GET', 'headers' => array( 'X-Forwarded-For' => ( new Automattic\Jetpack\Status\Visitor() )->get_ip( true ), ), ), null, 'rest' ); $body = wp_remote_retrieve_body( $request ); if ( 200 === wp_remote_retrieve_response_code( $request ) ) { return json_decode( $body ); } else { return $body; } } /** * Get plan information for a plan given its slug * * @since 7.7.0 * * @param string $plan_slug Plan slug. * * @return object The plan object */ public static function get_plan( $plan_slug ) { $plans = self::get_plans(); if ( ! is_array( $plans ) ) { return; } foreach ( $plans as $plan ) { if ( $plan_slug === $plan->product_slug ) { return $plan; } } } }
Upload File
Create Folder