GRAYBYTE WORDPRESS FILE MANAGER9272

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/modules/shortcodes/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/plugins/jetpack/modules/shortcodes//vr.php
<?php
/**
 * VR Viewer Shortcode
 * converts [vr] shortcode to an iframe viewer hosted on vr.me.sh
 *
 * @package automattic/jetpack
 */

/**
 * Scrub URL paramaters for VR viewer
 *
 * @param array $params {
 *     parameter array which is passed to the jetpack_vr_viewer.
 *
 *     @type string $url url of 360 media
 *     @type string $guid     guid for videopress
 *     @type string $view     cinema, 360 - controls if panaroma view, or 360
 *     @type string $rotation number for rotating media
 *     @type string $preview  show preview image or not
 * }
 *
 * @return array|false $url_params Array of URL parameters.
 */
function jetpack_vr_viewer_get_viewer_url_params( $params ) {
	$url_params = array();

	if ( isset( $params['rotation'] ) ) {
		$url_params['rotation'] = (int) $params['rotation'];
	}

	if ( isset( $params['view'] ) && in_array( $params['view'], array( 'cinema', '360' ), true ) ) {
		$url_params['view'] = $params['view'];
	}

	if ( isset( $params['preview'] ) && $params['preview'] ) {
		$url_params['preview'] = 1;
	}

	if ( isset( $params['url'] ) ) {
		return array_merge( $url_params, array( 'url' => $params['url'] ) );
	} elseif ( isset( $params['guid'] ) ) {
		return array_merge( $url_params, array( 'guid' => $params['guid'] ) );
	}

	return false;
}

/**
 * Get padding for IFRAME depending on view type
 *
 * @param string $view string cinema, 360 - default cinema.
 *
 * @return string $css padding
 */
function jetpack_vr_viewer_iframe_padding( $view ) {
	if ( '360' === $view ) {
		return '100%'; // 1:1 square aspect for 360
	}

	return '50%'; // 2:1 panorama aspect
}

/**
 * Create HTML for VR Viewer IFRAME and wrapper
 * The viewer code is hosted on vr.me.sh site which is then displayed
 * within posts via an IFRAME. This function returns the IFRAME html.
 *
 * @param array $url_params {
 *     parameter array which is passed to the jetpack_vr_viewer.
 *
 *     @type string $url url of 360 media
 *     @type string $guid     guid for videopress
 *     @type string $view     cinema, 360 - controls if panaroma view, or 360
 *     @type string $rotation number for rotating media
 *     @type string $preview  show preview image or not
 * }
 *
 * @return string $rtn an iframe for viewer.
 */
function jetpack_vr_viewer_get_html( $url_params ) {
	global $content_width;

	$iframe = add_query_arg( $url_params, 'https://vr.me.sh/view/' );

	// set some defaults.
	$maxwidth = ( is_numeric( $content_width ) && $content_width > 0 ) ? $content_width : 720;
	$view     = ( isset( $url_params['view'] ) ) ? $url_params['view'] : 'cinema';

	// If the shortcode is displayed in a WPCOM notification, display a simple link only.
	if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
		require_once WP_CONTENT_DIR . '/lib/display-context.php';
		$context = A8C\Display_Context\get_current_context();
		if ( A8C\Display_Context\NOTIFICATIONS === $context ) {
			return sprintf(
				'<a href="%1$s" target="_blank" rel="noopener noreferrer">%1$s</a>',
				esc_url( $iframe )
			);
		}
	}

	$rtn  = '<div style="position: relative; max-width: ' . $maxwidth . 'px; margin-left: auto; margin-right: auto; overflow: hidden; margin-bottom: 1em;">';
	$rtn .= '<div style="padding-top: ' . jetpack_vr_viewer_iframe_padding( $view ) . ';"></div>';
	$rtn .= '<iframe style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; height: 100%" allowfullscreen="true" frameborder="0" width="100%" height="300" src="' . esc_url( $iframe ) . '">';
	$rtn .= '</iframe>';
	$rtn .= '</div>';

	return $rtn;
}

/**
 * Convert [vr] shortcode to viewer
 *
 * Shortcode example:
 * [vr url="https://en-blog.files.wordpress.com/2016/12/regents_park.jpg" view="360"]
 *
 * VR Viewer embed code:
 * <div style="position: relative; max-width: 720px; margin-left: auto; margin-right: auto; overflow: hidden;">
 * <div style="padding-top: 100%;"></div>
 * <iframe style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; height: 100%" allowfullscreen="true" frameborder="0" width="100%" height="400" src="https://vr.me.sh/view/?view=360&amp;url=https://en-blog.files.wordpress.com/2016/12/regents_park.jpg">
 * </iframe>
 * </div>
 *
 * @param array $atts Shortcode attributes.
 *
 * @return string complete vr viewer html
 */
function jetpack_vr_viewer_shortcode( $atts ) {
	$params = shortcode_atts(
		array(
			0          => null,
			'url'      => null,
			'src'      => null,
			'guid'     => null,
			'rotation' => null,
			'view'     => null,
			'preview'  => false,
		),
		$atts
	);

	// We offer a few ways to specify the URL.
	if ( $params[0] ) {
		$params['url'] = $params[0];
	} elseif ( $params['src'] ) {
		$params['url'] = $params['src'];
	}

	$url_params = jetpack_vr_viewer_get_viewer_url_params( $params );
	if ( $url_params ) {
		return jetpack_vr_viewer_get_html( $url_params );
	}

	// add check for user.
	if ( current_user_can( 'edit_posts' ) ) {
		return '[vr] shortcode requires a data source to be given';
	} else {
		return '';
	}
}
add_shortcode( 'vr', 'jetpack_vr_viewer_shortcode' );

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
css
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
images
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
img
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
js
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
archiveorg-book.php
3.314 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
archiveorg.php
3.921 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
archives.php
2.38 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
bandcamp.php
7.749 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
brightcove.php
8.77 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
cartodb.php
0.784 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
class.filter-embedded-html-objects.php
13.012 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
codepen.php
0.259 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
crowdsignal.php
21.596 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
dailymotion.php
15.268 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
descript.php
2.995 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
facebook.php
4.727 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
flatio.php
0.374 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
flickr.php
9.289 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
getty.php
7.539 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
gist.php
8.313 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
googleapps.php
9.843 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
googlemaps.php
7.969 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
googleplus.php
1.029 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
gravatar.php
6.133 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
houzz.php
0.898 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
inline-pdfs.php
1.141 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
instagram.php
14.506 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
kickstarter.php
2.391 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
mailchimp.php
7.025 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
medium.php
3.223 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
mixcloud.php
3.616 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
others.php
2.065 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
pinterest.php
1.791 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
presentations.php
14.532 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
quiz.php
9.158 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
recipe.php
18.951 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
scribd.php
2.445 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
sitemap.php
0.549 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
slideshare.php
3.812 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
slideshow.php
9.271 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
smartframe.php
3.641 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
soundcloud.php
8.676 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
spotify.php
3.258 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
ted.php
3.349 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
tweet.php
5.027 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
twitchtv.php
2.625 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
twitter-timeline.php
1.933 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
unavailable.php
3.237 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
untappd-menu.php
2.406 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
upcoming-events.php
1.684 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
ustream.php
3.131 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
videopress.php
0.413 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
vimeo.php
11.509 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
vine.php
2.611 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
vr.php
4.917 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
wufoo.php
3.382 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644
youtube.php
23.328 KB
February 05 2025 15:45:00
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF