HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpdehaus/wp-content/plugins/cmyee-momentopress/momentopress.php
<?php
/*
Plugin Name: MomentoPress for Momento360
Description: Add 360° VR images and videos easily to your WordPress site using MomentoPress for Momento360.
Version:     1.0.2
Author:      Chris Yee
Author URI:  https://chrisyee.ca
License:     GPL3
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Text Domain: momentopress
*/

/*
* Register CSS
*/

function momentopress_register_css(){
	wp_register_style( 'momentopress', plugins_url( 'cmyee-momentopress/css/momentopress.css' ) );
	wp_enqueue_style( 'momentopress' );
}

add_action('init', 'momentopress_register_css');

/*
* Create shortcode
*/

function momentopress_shortcode( $atts = [], $content = null, $tag = '' ){
	//normalize attribute keys, lowercase
    $atts = array_change_key_case( (array)$atts, CASE_LOWER );
 
    //override default attributes with user attributes
    $momentopress_atts = shortcode_atts(
    	[
			'url' => 'https://momento360.com/e/u/f07d802caeb9499694a0f8cb1e661fde', //default URL
		], $atts, $tag
	);

    //sanitize URL
	$momentopress_url = sanitize_url( $momentopress_atts['url'], array( 'http', 'https' ) );

    //build embed code
	$momentopress_embed = '<div class="momentopress-container">';
	$momentopress_embed .=	'<iframe class="momentopress-embed" src="' . $momentopress_url . '" allowfullscreen="allowfullscreen"></iframe>';
	$momentopress_embed .= '</div>';

	//output embed code
	return $momentopress_embed;
}

add_shortcode('momentopress', 'momentopress_shortcode');