[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.119.157.233: ~ $
<?php
/**
 * Flickr Short Code
 * Author: kellan
 * License: BSD/GPL/public domain (take your pick)
 *
 * [flickr video=www.flickr.com/photos/kalakeli/49931239842]
 * [flickr video=49931239842]
 * [flickr video=49931239842 w=200 h=150]
 * [flickr video=49931239842 autoplay="yes" controls="no"]
 * [flickr video=49931239842 autoplay="no" controls="yes" w=200 h=150]
 *
 * <div class="flick_video" style="max-width: 100%;width: 500px;height: 300px;"><video src="https://www.flickr.com/photos/kalakeli/49931239842/play/360p/183f75d545/" controls autoplay ></video></div>
 *
 * @package automattic/jetpack
 */

/**
 * Transform embed to shortcode on save.
 *
 * @param string $content Post content.
 *
 * @return string Shortcode or the embed content itself.
 */
function flickr_embed_to_shortcode( $content ) {
	if ( ! is_string( $content ) ) {
		return $content;
	}

	if ( str_contains( $content, '<div class="flickr_video"' ) && str_contains( $content, '<video' ) ) {
		return jetpack_flickr_video_to_shortcode( $content );
	} elseif ( preg_match( '/<iframe src="(https?:)?\/\/([\da-z\-]+\.)*?((static)?flickr\.com|flic\.kr)\/[^\"]+\"/', $content ) ) {
		return jetpack_flickr_photo_to_shortcode( $content );
	}

	return $content;
}

/**
 * Transforms embed to shortcode on save when the photo param is used.
 * If embed content can not be transformed to a valid shortcode,
 * the embed content itself is returned.
 *
 * @param string $content Embed output.
 *
 * @return string Shortcode or the embed content.
 */
function jetpack_flickr_photo_to_shortcode( $content ) {
	preg_match( '/<iframe src=\"([^\"]+)\"(\s+height=\"([^\"]*)\")?(\s+width=\"([^\"]*)\")?/', $content, $matches );

	if ( empty( $matches[1] ) ) {
		return $content;
	}

	$src    = esc_attr( str_replace( 'player/', '', $matches[1] ) );
	$height = empty( $matches[3] ) ? '' : esc_attr( $matches[3] );
	$width  = empty( $matches[5] ) ? '' : esc_attr( $matches[5] );

	/** This action is documented in modules/shortcodes/youtube.php */
	do_action( 'jetpack_embed_to_shortcode', 'flickr_photo', $src );

	return '[flickr photo="' . $src . '" w=' . $width . ' h=' . $height . ']';
}

/**
 * Transforms embed to shortcode on save when the video param is used.
 * If embed content can not be transformed to a valid shortcode,
 * the embed content itself is returned.
 *
 * @param string $content Embed output.
 *
 * @return string Shortcode or the embed content.
 */
function jetpack_flickr_video_to_shortcode( $content ) {
	// Get video src.
	preg_match( '/<video src=\"([^\"]+)\"/', $content, $matches );

	if ( empty( $matches[1] ) ) {
		return $content;
	}

	preg_match( '/(https?:)?\/\/([\da-z\-]+\.)*?((static)?flickr\.com|flic\.kr)\/photos\/([^\/]+)\/\d+\//', $matches[1], $matches );

	$video_src = esc_attr( $matches[0] );

	// Get width and height.

	preg_match( '/style=\"max-width: 100%;(width:\s(\d+)px;)?(height:\s(\d+)px;)?/', $content, $matches );

	$width = empty( $matches[2] ) ? '' : 'w=' . esc_attr( $matches[2] );

	$height = empty( $matches[4] ) ? '' : 'h=' . esc_attr( $matches[4] );

	$controls = str_contains( $content, 'controls' ) ? 'yes' : 'no';

	$autoplay = str_contains( $content, 'autoplay' ) ? 'yes' : 'no';

	/** This action is documented in modules/shortcodes/youtube.php */
	do_action( 'jetpack_embed_to_shortcode', 'flickr_video', $video_src );

	return '[flickr video="' . $video_src . '" ' . $width . ' ' . $height . ' controls="' . $controls . '" autoplay="' . $autoplay . '"]';
}

add_filter( 'pre_kses', 'flickr_embed_to_shortcode' );

/**
 * Flickr Shortcode handler.
 *
 * @param array $atts Shortcode attributes.
 *
 * @return string Shortcode Output.
 */
function flickr_shortcode_handler( $atts ) {
	$atts = shortcode_atts(
		array(
			'video'    => 0,
			'photo'    => 0,
			'w'        => '',
			'h'        => '',
			'controls' => 'yes',
			'autoplay' => '',
		),
		$atts,
		'flickr'
	);

	if ( ! empty( $atts['video'] ) ) {
		$showing = 'video';
		$src     = $atts['video'];
	} elseif ( ! empty( $atts['photo'] ) ) {
		$showing = 'photo';
		$src     = $atts['photo'];
	} else {
		return '';
	}

	$src = str_replace( 'http://', 'https://', $src );

	if ( 'video' === $showing ) {

		$video_id = flick_shortcode_video_id( $src );

		if ( empty( $video_id ) ) {
			return '';
		}

		$atts = array_map( 'esc_attr', $atts );
		return flickr_shortcode_video_markup( $atts, $video_id, $src );
	} elseif ( 'photo' === $showing ) {

		if ( ! preg_match( '~^(https?:)?//([\da-z\-]+\.)*?((static)?flickr\.com|flic\.kr)/.*~i', $src ) ) {
			return '';
		}

		$height = empty( $atts['h'] ) ? 'auto' : esc_attr( $atts['h'] );

		$src = sprintf( '%s/player/', untrailingslashit( $src ) );

		$allow_full_screen = 'allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen';

		if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) {
			$allow_full_screen = str_replace( ' oallowfullscreen msallowfullscreen', '', $allow_full_screen );
		}

		return sprintf( '<iframe src="%s" height="%s" width="%s"  frameborder="0" %s></iframe>', esc_url( $src ), $height, esc_attr( $atts['w'] ), $allow_full_screen );
	}

	return false;
}

/**
 * Return HTML markup for a Flickr embed.
 *
 * @param array  $atts Shortcode attributes.
 * @param string $id Video ID.
 * @param string $video_param video param of the shortcode.
 *
 * @return string Shortcode ouput for video.
 */
function flickr_shortcode_video_markup( $atts, $id, $video_param ) {

	$transient_name = "flickr_video_$id";
	$video_src      = get_transient( $transient_name );

	if ( empty( $video_src ) ) {
		$video_url = '';
		if ( ! is_numeric( $video_param ) ) {
			$video_url = $video_param;
		} else {
			// Get the URL of the video from the page of the video.
			$video_page_content = wp_remote_get( "http://flickr.com/photo.gne?id=$video_param" );

			// Bail if we do not get any info from Flickr.
			if ( is_wp_error( $video_page_content ) ) {
				return '';
			}

			// Extract the URL from the og:url meta tag.
			preg_match( '/property=\"og:url\"\scontent=\"([^\"]+)\"/', $video_page_content['body'], $matches );
			if ( empty( $matches[1] ) ) {
				return '';
			}
			$video_url = $matches[1];
		}

		$provider = 'https://www.flickr.com/services/oembed/';
		$oembed   = _wp_oembed_get_object();
		$data     = (array) $oembed->fetch( $provider, $video_url );
		if ( empty( $data['html'] ) ) {
			return '';
		}

		// Get the embed url.
		preg_match( '/src=\"([^\"]+)\"/', $data['html'], $matches );

		$embed_url = $matches[1];

		$embed_page = wp_remote_get( $embed_url );

		// Bail if the request returns an error.
		if ( ! is_array( $embed_page ) ) {
			return '';
		}

		// Get the video url from embed html markup.

		preg_match( '/video.+src=\"([^\"]+)\"/', $embed_page['body'], $matches );

		$video_src = $matches[1];

		set_transient( $transient_name, $video_src, 2592000 ); // 30 days transient.
	}

	$style = 'max-width: 100%;';

	if ( ! empty( $atts['w'] ) && is_numeric( $atts['w'] ) ) {
		$style .= sprintf( 'width: %dpx;', $atts['w'] );
	}

	if ( ! empty( $atts['h'] ) && is_numeric( $atts['h'] ) ) {
		$style .= sprintf( 'height: %dpx;', $atts['h'] );
	}

	$controls = 'yes' === $atts['controls'] ? 'controls' : '';
	$autoplay = 'yes' === $atts['autoplay'] ? 'autoplay' : '';

	return sprintf(
		'<div class="flick_video" style="%s"><video src="%s" %s %s /></div>',
		esc_attr( $style ),
		esc_attr( $video_src ),
		$controls,
		$autoplay
	);
}

/**
 * Extract the id of the flickr video from the video param.
 *
 * @param string $video_param Video parameter of the shortcode.
 *
 * @return string|boolean ID of the video or false in case the ID can not be extracted.
 */
function flick_shortcode_video_id( $video_param ) {
	if ( preg_match( '/^https?:\/\/(www\.)?flickr\.com\/.+/', $video_param ) || preg_match( '/^https?:\/\/flic\.kr\/.+/', $video_param ) ) {

		// Extract the video id from the url.
		preg_match( '/\d+/', $video_param, $matches );

		if ( empty( $matches ) ) {
			return false;
		}

		return $matches[0];

	} elseif ( is_numeric( $video_param ) ) {
		return $video_param;
	}

	return false;
}

add_shortcode( 'flickr', 'flickr_shortcode_handler' );

// Override core's Flickr support because Flickr oEmbed doesn't support web embeds.
wp_embed_register_handler( 'flickr', '#https?://(www\.)?flickr\.com/.*#i', 'jetpack_flickr_oembed_handler' );

/**
 * Callback to modify output of embedded Vimeo video using Jetpack's shortcode.
 *
 * @since 3.9
 *
 * @param array $matches Regex partial matches against the URL passed.
 * @param array $attr    Attributes received in embed response.
 * @param array $url     Requested URL to be embedded.
 *
 * @return string Return output of Vimeo shortcode with the proper markup.
 */
function jetpack_flickr_oembed_handler( $matches, $attr, $url ) {
	/*
	 * Legacy slideshow embeds end with /show/
	 * e.g. http://www.flickr.com/photos/yarnaholic/sets/72157615194738969/show/
	 */
	if ( '/show/' !== substr( $url, -strlen( '/show/' ) ) ) {
		// These lookups need cached, as they don't use WP_Embed (which caches).
		$cache_key   = md5( $url . wp_json_encode( $attr ) );
		$cache_group = 'oembed_flickr';

		$html = wp_cache_get( $cache_key, $cache_group );

		if ( false === $html ) {
			$html = _wp_oembed_get_object()->get_html( $url, $attr );

			wp_cache_set( $cache_key, $html, $cache_group, 60 * MINUTE_IN_SECONDS );
		}

		return $html;
	}

	return flickr_shortcode_handler( array( 'photo' => $url ) );
}

Filemanager

Name Type Size Permission Actions
css Folder 0755
images Folder 0755
img Folder 0755
js Folder 0755
archiveorg-book.php File 3.31 KB 0644
archiveorg.php File 3.92 KB 0644
archives.php File 2.38 KB 0644
bandcamp.php File 7.75 KB 0644
brightcove.php File 8.77 KB 0644
cartodb.php File 803 B 0644
class.filter-embedded-html-objects.php File 13.01 KB 0644
codepen.php File 265 B 0644
crowdsignal.php File 21.6 KB 0644
dailymotion.php File 15.27 KB 0644
descript.php File 3 KB 0644
facebook.php File 4.73 KB 0644
flatio.php File 383 B 0644
flickr.php File 9.29 KB 0644
getty.php File 7.54 KB 0644
gist.php File 8.31 KB 0644
googleapps.php File 9.84 KB 0644
googlemaps.php File 7.97 KB 0644
googleplus.php File 1.03 KB 0644
gravatar.php File 6.13 KB 0644
houzz.php File 920 B 0644
inline-pdfs.php File 1.14 KB 0644
instagram.php File 14.51 KB 0644
kickstarter.php File 2.39 KB 0644
mailchimp.php File 7.03 KB 0644
medium.php File 3.22 KB 0644
mixcloud.php File 3.62 KB 0644
others.php File 2.07 KB 0644
pinterest.php File 1.79 KB 0644
presentations.php File 14.53 KB 0644
quiz.php File 9.16 KB 0644
recipe.php File 18.95 KB 0644
scribd.php File 2.45 KB 0644
sitemap.php File 562 B 0644
slideshare.php File 3.81 KB 0644
slideshow.php File 9.27 KB 0644
smartframe.php File 3.64 KB 0644
soundcloud.php File 8.68 KB 0644
spotify.php File 3.26 KB 0644
ted.php File 3.35 KB 0644
tweet.php File 5.03 KB 0644
twitchtv.php File 2.63 KB 0644
twitter-timeline.php File 1.93 KB 0644
unavailable.php File 3.24 KB 0644
untappd-menu.php File 2.41 KB 0644
upcoming-events.php File 1.68 KB 0644
ustream.php File 3.13 KB 0644
videopress.php File 423 B 0644
vimeo.php File 11.51 KB 0644
vine.php File 2.61 KB 0644
vr.php File 4.92 KB 0644
wordads.php File 1.81 KB 0644
wufoo.php File 3.38 KB 0644
youtube.php File 23.33 KB 0644