golden hour
/home/doctorbruno/public_html/taeionline.com/wp-content/plugins_old/jetpack/modules/shortcodes
⬆️ Go Up
Upload
File/Folder
Size
Actions
archiveorg-book.php
3.31 KB
Del
OK
archiveorg.php
3.92 KB
Del
OK
archives.php
2.38 KB
Del
OK
bandcamp.php
7.7 KB
Del
OK
brightcove.php
8.77 KB
Del
OK
cartodb.php
803 B
Del
OK
class.filter-embedded-html-objects.php
13.05 KB
Del
OK
codepen.php
265 B
Del
OK
crowdsignal.php
21.85 KB
Del
OK
css
-
Del
OK
dailymotion.php
15.14 KB
Del
OK
descript.php
3 KB
Del
OK
facebook.php
4.4 KB
Del
OK
flatio.php
383 B
Del
OK
flickr.php
9.21 KB
Del
OK
getty.php
7.49 KB
Del
OK
gist.php
8.29 KB
Del
OK
googleapps.php
9.7 KB
Del
OK
googlemaps.php
7.97 KB
Del
OK
googleplus.php
1.03 KB
Del
OK
gravatar.php
4.7 KB
Del
OK
houzz.php
920 B
Del
OK
images
-
Del
OK
img
-
Del
OK
inline-pdfs.php
1.14 KB
Del
OK
instagram.php
14.47 KB
Del
OK
js
-
Del
OK
kickstarter.php
2.35 KB
Del
OK
mailchimp.php
6.91 KB
Del
OK
medium.php
3.23 KB
Del
OK
mixcloud.php
3.62 KB
Del
OK
others.php
1.58 KB
Del
OK
pinterest.php
1.79 KB
Del
OK
presentations.php
14.61 KB
Del
OK
quiz.php
9.16 KB
Del
OK
recipe.php
18.9 KB
Del
OK
scribd.php
2.45 KB
Del
OK
sitemap.php
562 B
Del
OK
slideshare.php
3.81 KB
Del
OK
slideshow.php
8.89 KB
Del
OK
smartframe.php
3.63 KB
Del
OK
soundcloud.php
8.57 KB
Del
OK
spotify.php
3.21 KB
Del
OK
ted.php
3.35 KB
Del
OK
tweet.php
8.51 KB
Del
OK
twitchtv.php
2.63 KB
Del
OK
twitter-timeline.php
1.93 KB
Del
OK
unavailable.php
2.97 KB
Del
OK
untappd-menu.php
2.41 KB
Del
OK
upcoming-events.php
1.18 KB
Del
OK
ustream.php
3.13 KB
Del
OK
videopress.php
423 B
Del
OK
vimeo.php
11.09 KB
Del
OK
vine.php
2.61 KB
Del
OK
vr.php
4.89 KB
Del
OK
wordads.php
1.81 KB
Del
OK
wufoo.php
3.38 KB
Del
OK
youtube.php
20.43 KB
Del
OK
Edit: mixcloud.php
<?php /** * Mixcloud embeds * * Examples: * [mixcloud MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ /] * [mixcloud MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ width=640 height=480 /] * [mixcloud http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ /] * [mixcloud http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ width=640 height=480 /] * [mixcloud]http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/[/mixcloud] * [mixcloud]MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/[/mixcloud] * [mixcloud http://www.mixcloud.com/mat/playlists/classics/ width=660 height=208 hide_cover=1 hide_tracklist=1] * * @package automattic/jetpack */ /* * Register oEmbed provider * Example URL: http://www.mixcloud.com/oembed/?url=http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ */ wp_oembed_add_provider( '#https?://(?:www\.)?mixcloud\.com/\S*#i', 'https://www.mixcloud.com/oembed', true ); /** * Register mixcloud shortcode. * * @param array $atts Shortcode atttributes. * @param string $content Post content. */ function mixcloud_shortcode( $atts, $content = null ) { if ( empty( $atts[0] ) && empty( $content ) ) { return '<!-- mixcloud error: invalid mixcloud resource -->'; } $regular_expression = '/((?<=mixcloud\.com\/)[\w\-\/]+$)|(^[\w\-\/]+$)/i'; preg_match( $regular_expression, $content, $match ); if ( ! empty( $match ) ) { $resource_id = trim( $match[0] ); } else { preg_match( $regular_expression, $atts[0], $match ); if ( ! empty( $match ) ) { $resource_id = trim( $match[0] ); } } if ( empty( $resource_id ) ) { return '<!-- mixcloud error: invalid mixcloud resource -->'; } $mixcloud_url = 'https://mixcloud.com/' . $resource_id; $atts = shortcode_atts( array( 'width' => false, 'height' => false, 'color' => false, 'light' => false, 'dark' => false, 'hide_tracklist' => false, 'hide_cover' => false, 'mini' => false, 'hide_followers' => false, 'hide_artwork' => false, ), $atts ); // remove falsey values. $atts = array_filter( $atts ); $query_args = array( 'url' => $mixcloud_url ); $query_args = array_merge( $query_args, $atts ); $url = add_query_arg( urlencode_deep( $query_args ), 'https://www.mixcloud.com/oembed/' ); $mixcloud_response = wp_remote_get( $url, array( 'redirection' => 0 ) ); if ( is_wp_error( $mixcloud_response ) || 200 !== $mixcloud_response['response']['code'] || empty( $mixcloud_response['body'] ) ) { return '<!-- mixcloud error: invalid mixcloud resource -->'; } $response_body = json_decode( $mixcloud_response['body'] ); $html = $response_body->html; preg_match( '/sandbox="([^"]*)"/', $html, $matches ); if ( empty( $matches ) ) { // MixCloud doesn't use sandbox attribute. $html = preg_replace( '/>/', ' sandbox="allow-popups allow-scripts allow-same-origin allow-presentation">', $html, 1 ); } else { // MixCloud uses sandbox attribute. $allowed_values = array(); // Here we make sure that these string are not repeated in the sandbox attribute. $attrs = array( 'allow-popups', 'allow-scripts', 'allow-same-origin', 'allow-presentation' ); foreach ( $attrs as $attr ) { if ( false === strpos( $matches[1], $attr ) ) { $allowed_values[] = $attr; } } $sandbox_value = $matches[1] . ' ' . implode( ' ', $allowed_values ); $html = preg_replace( '/sandbox="([^"]*)"/', "sandbox=\"$sandbox_value\"", $html ); } return $html; } add_shortcode( 'mixcloud', 'mixcloud_shortcode' );
Save