changeset 16 | a86126ab1dd4 |
parent 9 | 177826044cd9 |
child 18 | be944660c56a |
15:3d4e9c994f10 | 16:a86126ab1dd4 |
---|---|
55 * @since 2.9.0 |
55 * @since 2.9.0 |
56 * |
56 * |
57 * @global int $content_width |
57 * @global int $content_width |
58 * |
58 * |
59 * @param string $url Optional. The URL that should be embedded. Default empty. |
59 * @param string $url Optional. The URL that should be embedded. Default empty. |
60 * |
60 * @return array { |
61 * @return array Default embed parameters. |
61 * Indexed array of the embed width and height in pixels. |
62 * |
|
63 * @type int $0 The embed width. |
|
64 * @type int $1 The embed height. |
|
65 * } |
|
62 */ |
66 */ |
63 function wp_embed_defaults( $url = '' ) { |
67 function wp_embed_defaults( $url = '' ) { |
64 if ( ! empty( $GLOBALS['content_width'] ) ) { |
68 if ( ! empty( $GLOBALS['content_width'] ) ) { |
65 $width = (int) $GLOBALS['content_width']; |
69 $width = (int) $GLOBALS['content_width']; |
66 } |
70 } |
74 /** |
78 /** |
75 * Filters the default array of embed dimensions. |
79 * Filters the default array of embed dimensions. |
76 * |
80 * |
77 * @since 2.9.0 |
81 * @since 2.9.0 |
78 * |
82 * |
79 * @param array $size An array of embed width and height values |
83 * @param array $size { |
80 * in pixels (in that order). |
84 * Indexed array of the embed width and height in pixels. |
85 * |
|
86 * @type int $0 The embed width. |
|
87 * @type int $1 The embed height. |
|
88 * } |
|
81 * @param string $url The URL that should be embedded. |
89 * @param string $url The URL that should be embedded. |
82 */ |
90 */ |
83 return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url ); |
91 return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url ); |
84 } |
92 } |
85 |
93 |
91 * @see WP_oEmbed |
99 * @see WP_oEmbed |
92 * |
100 * |
93 * @param string $url The URL that should be embedded. |
101 * @param string $url The URL that should be embedded. |
94 * @param array $args Optional. Additional arguments and parameters for retrieving embed HTML. |
102 * @param array $args Optional. Additional arguments and parameters for retrieving embed HTML. |
95 * Default empty. |
103 * Default empty. |
96 * @return false|string False on failure or the embed HTML on success. |
104 * @return string|false The embed HTML on success, false on failure. |
97 */ |
105 */ |
98 function wp_oembed_get( $url, $args = '' ) { |
106 function wp_oembed_get( $url, $args = '' ) { |
99 $oembed = _wp_oembed_get_object(); |
107 $oembed = _wp_oembed_get_object(); |
100 return $oembed->get_html( $url, $args ); |
108 return $oembed->get_html( $url, $args ); |
101 } |
109 } |
104 * Returns the initialized WP_oEmbed object. |
112 * Returns the initialized WP_oEmbed object. |
105 * |
113 * |
106 * @since 2.9.0 |
114 * @since 2.9.0 |
107 * @access private |
115 * @access private |
108 * |
116 * |
109 * @staticvar WP_oEmbed $wp_oembed |
|
110 * |
|
111 * @return WP_oEmbed object. |
117 * @return WP_oEmbed object. |
112 */ |
118 */ |
113 function _wp_oembed_get_object() { |
119 function _wp_oembed_get_object() { |
114 static $wp_oembed = null; |
120 static $wp_oembed = null; |
115 |
121 |
124 * |
130 * |
125 * @since 2.9.0 |
131 * @since 2.9.0 |
126 * |
132 * |
127 * @see WP_oEmbed |
133 * @see WP_oEmbed |
128 * |
134 * |
129 * @param string $format The format of URL that this provider can handle. You can use asterisks |
135 * @param string $format The format of URL that this provider can handle. You can use asterisks |
130 * as wildcards. |
136 * as wildcards. |
131 * @param string $provider The URL to the oEmbed provider. |
137 * @param string $provider The URL to the oEmbed provider. |
132 * @param boolean $regex Optional. Whether the `$format` parameter is in a RegEx format. Default false. |
138 * @param bool $regex Optional. Whether the `$format` parameter is in a RegEx format. Default false. |
133 */ |
139 */ |
134 function wp_oembed_add_provider( $format, $provider, $regex = false ) { |
140 function wp_oembed_add_provider( $format, $provider, $regex = false ) { |
135 if ( did_action( 'plugins_loaded' ) ) { |
141 if ( did_action( 'plugins_loaded' ) ) { |
136 $oembed = _wp_oembed_get_object(); |
142 $oembed = _wp_oembed_get_object(); |
137 $oembed->providers[ $format ] = array( $provider, $regex ); |
143 $oembed->providers[ $format ] = array( $provider, $regex ); |
444 if ( SCRIPT_DEBUG ) { |
450 if ( SCRIPT_DEBUG ) { |
445 $output .= file_get_contents( ABSPATH . WPINC . '/js/wp-embed.js' ); |
451 $output .= file_get_contents( ABSPATH . WPINC . '/js/wp-embed.js' ); |
446 } else { |
452 } else { |
447 /* |
453 /* |
448 * If you're looking at a src version of this file, you'll see an "include" |
454 * If you're looking at a src version of this file, you'll see an "include" |
449 * statement below. This is used by the `grunt build` process to directly |
455 * statement below. This is used by the `npm run build` process to directly |
450 * include a minified version of wp-embed.js, instead of using the |
456 * include a minified version of wp-embed.js, instead of using the |
451 * file_get_contents() method from above. |
457 * file_get_contents() method from above. |
452 * |
458 * |
453 * If you're looking at a build version of this file, you'll see a string of |
459 * If you're looking at a build version of this file, you'll see a string of |
454 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG |
460 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG |
455 * and edit wp-embed.js directly. |
461 * and edit wp-embed.js directly. |
456 */ |
462 */ |
457 $output .= <<<JS |
463 $output .= <<<JS |
458 !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d)if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); |
464 /*! This file is auto-generated */ |
465 !function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r<c.length;r++)c[r].style.display="none";for(r=0;r<o.length;r++)if(a=o[r],e.source===a.contentWindow){if(a.removeAttribute("style"),"height"===t.message){if(1e3<(i=parseInt(t.value,10)))i=1e3;else if(~~i<200)i=200;a.height=i}if("link"===t.message)if(s=l.createElement("a"),n=l.createElement("a"),s.href=a.getAttribute("src"),n.href=t.value,n.host===s.host)if(l.activeElement===a)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!o){o=!0;var e,t,r,a,i=-1!==navigator.appVersion.indexOf("MSIE 10"),s=!!navigator.userAgent.match(/Trident.*rv:11\./),n=l.querySelectorAll("iframe.wp-embedded-content");for(t=0;t<n.length;t++){if(!(r=n[t]).getAttribute("data-secret"))a=Math.random().toString(36).substr(2,10),r.src+="#?secret="+a,r.setAttribute("data-secret",a);if(i||s)(e=r.cloneNode(!0)).removeAttribute("security"),r.parentNode.replaceChild(e,r)}}}}(window,document); |
|
459 JS; |
466 JS; |
460 } |
467 } |
461 $output .= "\n//--><!]]>"; |
468 $output .= "\n//--><!]]>"; |
462 $output .= "\n</script>"; |
469 $output .= "\n</script>"; |
463 |
470 |
466 esc_url( $embed_url ), |
473 esc_url( $embed_url ), |
467 absint( $width ), |
474 absint( $width ), |
468 absint( $height ), |
475 absint( $height ), |
469 esc_attr( |
476 esc_attr( |
470 sprintf( |
477 sprintf( |
471 /* translators: 1: post title, 2: site name */ |
478 /* translators: 1: Post title, 2: Site title. */ |
472 __( '“%1$s” — %2$s' ), |
479 __( '“%1$s” — %2$s' ), |
473 get_the_title( $post ), |
480 get_the_title( $post ), |
474 get_bloginfo( 'name' ) |
481 get_bloginfo( 'name' ) |
475 ) |
482 ) |
476 ) |
483 ) |
602 } |
609 } |
603 |
610 |
604 $sites = get_sites( $qv ); |
611 $sites = get_sites( $qv ); |
605 $site = reset( $sites ); |
612 $site = reset( $sites ); |
606 |
613 |
607 if ( $site && (int) $site->blog_id !== get_current_blog_id() ) { |
614 if ( $site && get_current_blog_id() !== (int) $site->blog_id ) { |
608 switch_to_blog( $site->blog_id ); |
615 switch_to_blog( $site->blog_id ); |
609 $switched_blog = true; |
616 $switched_blog = true; |
610 } |
617 } |
611 } |
618 } |
612 |
619 |
789 * @param object $data A data object result from an oEmbed provider. |
796 * @param object $data A data object result from an oEmbed provider. |
790 * @param string $url The URL of the content to be embedded. |
797 * @param string $url The URL of the content to be embedded. |
791 * @return string The filtered oEmbed result. |
798 * @return string The filtered oEmbed result. |
792 */ |
799 */ |
793 function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) { |
800 function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) { |
794 if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ) ) ) { |
801 if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) { |
795 return $result; |
802 return $result; |
796 } |
803 } |
797 |
804 |
798 $title = ! empty( $data->title ) ? $data->title : ''; |
805 $title = ! empty( $data->title ) ? $data->title : ''; |
799 |
806 |
800 $pattern = '`<iframe[^>]*?title=(\\\\\'|\\\\"|[\'"])([^>]*?)\1`i'; |
807 $pattern = '`<iframe([^>]*)>`i'; |
801 $has_title_attr = preg_match( $pattern, $result, $matches ); |
808 if ( preg_match( $pattern, $result, $matches ) ) { |
802 |
809 $attrs = wp_kses_hair( $matches[1], wp_allowed_protocols() ); |
803 if ( $has_title_attr && ! empty( $matches[2] ) ) { |
810 |
804 $title = $matches[2]; |
811 foreach ( $attrs as $attr => $item ) { |
812 $lower_attr = strtolower( $attr ); |
|
813 if ( $lower_attr === $attr ) { |
|
814 continue; |
|
815 } |
|
816 if ( ! isset( $attrs[ $lower_attr ] ) ) { |
|
817 $attrs[ $lower_attr ] = $item; |
|
818 unset( $attrs[ $attr ] ); |
|
819 } |
|
820 } |
|
821 } |
|
822 |
|
823 if ( ! empty( $attrs['title']['value'] ) ) { |
|
824 $title = $attrs['title']['value']; |
|
805 } |
825 } |
806 |
826 |
807 /** |
827 /** |
808 * Filters the title attribute of the given oEmbed HTML iframe. |
828 * Filters the title attribute of the given oEmbed HTML iframe. |
809 * |
829 * |
818 |
838 |
819 if ( '' === $title ) { |
839 if ( '' === $title ) { |
820 return $result; |
840 return $result; |
821 } |
841 } |
822 |
842 |
823 if ( $has_title_attr ) { |
843 if ( isset( $attrs['title'] ) ) { |
824 // Remove the old title, $matches[1]: quote, $matches[2]: title attribute value. |
844 unset( $attrs['title'] ); |
825 $result = str_replace( ' title=' . $matches[1] . $matches[2] . $matches[1], '', $result ); |
845 $attr_string = join( ' ', wp_list_pluck( $attrs, 'whole' ) ); |
826 } |
846 $result = str_replace( $matches[0], '<iframe ' . trim( $attr_string ) . '>', $result ); |
827 |
847 } |
828 return str_ireplace( '<iframe ', sprintf( '<iframe title="%s" ', esc_attr( $title ) ), $result ); |
848 return str_ireplace( '<iframe ', sprintf( '<iframe title="%s" ', esc_attr( $title ) ), $result ); |
829 } |
849 } |
830 |
850 |
831 |
851 |
832 /** |
852 /** |
843 * @param object $data A data object result from an oEmbed provider. |
863 * @param object $data A data object result from an oEmbed provider. |
844 * @param string $url The URL of the content to be embedded. |
864 * @param string $url The URL of the content to be embedded. |
845 * @return string The filtered and sanitized oEmbed result. |
865 * @return string The filtered and sanitized oEmbed result. |
846 */ |
866 */ |
847 function wp_filter_oembed_result( $result, $data, $url ) { |
867 function wp_filter_oembed_result( $result, $data, $url ) { |
848 if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ) ) ) { |
868 if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) { |
849 return $result; |
869 return $result; |
850 } |
870 } |
851 |
871 |
852 $wp_oembed = _wp_oembed_get_object(); |
872 $wp_oembed = _wp_oembed_get_object(); |
853 |
873 |
927 } |
947 } |
928 |
948 |
929 $link = sprintf( |
949 $link = sprintf( |
930 '<a href="%1$s" class="wp-embed-more" target="_top">%2$s</a>', |
950 '<a href="%1$s" class="wp-embed-more" target="_top">%2$s</a>', |
931 esc_url( get_permalink() ), |
951 esc_url( get_permalink() ), |
932 /* translators: %s: Name of current post */ |
952 /* translators: %s: Post title. */ |
933 sprintf( __( 'Continue reading %s' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' ) |
953 sprintf( __( 'Continue reading %s' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' ) |
934 ); |
954 ); |
935 return ' … ' . $link; |
955 return ' … ' . $link; |
936 } |
956 } |
937 |
957 |
998 * Prints the CSS in the embed iframe header. |
1018 * Prints the CSS in the embed iframe header. |
999 * |
1019 * |
1000 * @since 4.4.0 |
1020 * @since 4.4.0 |
1001 */ |
1021 */ |
1002 function print_embed_styles() { |
1022 function print_embed_styles() { |
1023 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; |
|
1003 ?> |
1024 ?> |
1004 <style type="text/css"> |
1025 <style<?php echo $type_attr; ?>> |
1005 <?php |
1026 <?php |
1006 if ( SCRIPT_DEBUG ) { |
1027 if ( SCRIPT_DEBUG ) { |
1007 readfile( ABSPATH . WPINC . '/css/wp-embed-template.css' ); |
1028 readfile( ABSPATH . WPINC . '/css/wp-embed-template.css' ); |
1008 } else { |
1029 } else { |
1009 /* |
1030 /* |
1010 * If you're looking at a src version of this file, you'll see an "include" |
1031 * If you're looking at a src version of this file, you'll see an "include" |
1011 * statement below. This is used by the `grunt build` process to directly |
1032 * statement below. This is used by the `npm run build` process to directly |
1012 * include a minified version of wp-oembed-embed.css, instead of using the |
1033 * include a minified version of wp-oembed-embed.css, instead of using the |
1013 * readfile() method from above. |
1034 * readfile() method from above. |
1014 * |
1035 * |
1015 * If you're looking at a build version of this file, you'll see a string of |
1036 * If you're looking at a build version of this file, you'll see a string of |
1016 * minified CSS. If you need to debug it, please turn on SCRIPT_DEBUG |
1037 * minified CSS. If you need to debug it, please turn on SCRIPT_DEBUG |
1017 * and edit wp-embed-template.css directly. |
1038 * and edit wp-embed-template.css directly. |
1018 */ |
1039 */ |
1019 ?> |
1040 ?> |
1020 /*! This file is auto-generated */ |
1041 /*! This file is auto-generated */ |
1021 body,html{padding:0;margin:0}body{font-family:sans-serif}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;background-size:20px;background-position:center;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:1.5;color:#82878c;background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:600;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:600;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px;display:inline-block}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button{display:inline-block}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true]{color:#fff}.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px 0;padding:0 5px;font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:1.5;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa} |
1042 body,html{padding:0;margin:0}body{font-family:sans-serif}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;background-size:20px;background-position:center;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:1.5;color:#82878c;background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:600;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:600;line-height:1.78571428}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:1.78571428;display:inline-block}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button{display:inline-block}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true]{color:#fff}.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px 0;padding:0 5px;font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:1.5;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa} |
1022 <?php |
1043 <?php |
1023 } |
1044 } |
1024 ?> |
1045 ?> |
1025 </style> |
1046 </style> |
1026 <?php |
1047 <?php |
1030 * Prints the JavaScript in the embed iframe header. |
1051 * Prints the JavaScript in the embed iframe header. |
1031 * |
1052 * |
1032 * @since 4.4.0 |
1053 * @since 4.4.0 |
1033 */ |
1054 */ |
1034 function print_embed_scripts() { |
1055 function print_embed_scripts() { |
1056 $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; |
|
1035 ?> |
1057 ?> |
1036 <script type="text/javascript"> |
1058 <script<?php echo $type_attr; ?>> |
1037 <?php |
1059 <?php |
1038 if ( SCRIPT_DEBUG ) { |
1060 if ( SCRIPT_DEBUG ) { |
1039 readfile( ABSPATH . WPINC . '/js/wp-embed-template.js' ); |
1061 readfile( ABSPATH . WPINC . '/js/wp-embed-template.js' ); |
1040 } else { |
1062 } else { |
1041 /* |
1063 /* |
1042 * If you're looking at a src version of this file, you'll see an "include" |
1064 * If you're looking at a src version of this file, you'll see an "include" |
1043 * statement below. This is used by the `grunt build` process to directly |
1065 * statement below. This is used by the `npm run build` process to directly |
1044 * include a minified version of wp-embed-template.js, instead of using the |
1066 * include a minified version of wp-embed-template.js, instead of using the |
1045 * readfile() method from above. |
1067 * readfile() method from above. |
1046 * |
1068 * |
1047 * If you're looking at a build version of this file, you'll see a string of |
1069 * If you're looking at a build version of this file, you'll see a string of |
1048 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG |
1070 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG |
1049 * and edit wp-embed-template.js directly. |
1071 * and edit wp-embed-template.js directly. |
1050 */ |
1072 */ |
1051 ?> |
1073 ?> |
1052 !function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document); |
1074 /*! This file is auto-generated */ |
1075 !function(u,c){"use strict";var r,t,e,i=c.querySelector&&u.addEventListener,b=!1;function f(e,t){u.parent.postMessage({message:e,value:t,secret:r},"*")}function n(){if(!b){b=!0;var e,t=c.querySelector(".wp-embed-share-dialog"),r=c.querySelector(".wp-embed-share-dialog-open"),i=c.querySelector(".wp-embed-share-dialog-close"),n=c.querySelectorAll(".wp-embed-share-input"),a=c.querySelectorAll(".wp-embed-share-tab-button button"),o=c.querySelector(".wp-embed-featured-image img");if(n)for(e=0;e<n.length;e++)n[e].addEventListener("click",function(e){e.target.select()});if(r&&r.addEventListener("click",function(){t.className=t.className.replace("hidden",""),c.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}),i&&i.addEventListener("click",function(){l()}),a)for(e=0;e<a.length;e++)a[e].addEventListener("click",s),a[e].addEventListener("keydown",d);c.addEventListener("keydown",function(e){27===e.keyCode&&-1===t.className.indexOf("hidden")?l():9===e.keyCode&&function(e){var t=c.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');i!==e.target||e.shiftKey?t===e.target&&e.shiftKey&&(i.focus(),e.preventDefault()):(t.focus(),e.preventDefault())}(e)},!1),u.self!==u.top&&(f("height",Math.ceil(c.body.getBoundingClientRect().height)),o&&o.addEventListener("load",function(){f("height",Math.ceil(c.body.getBoundingClientRect().height))}),c.addEventListener("click",function(e){var t,r=e.target;(t=r.hasAttribute("href")?r.getAttribute("href"):r.parentElement.getAttribute("href"))&&(f("link",t),e.preventDefault())}))}function l(){t.className+=" hidden",c.querySelector(".wp-embed-share-dialog-open").focus()}function s(e){var t=c.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');t.setAttribute("aria-selected","false"),c.querySelector("#"+t.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),e.target.setAttribute("aria-selected","true"),c.querySelector("#"+e.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function d(e){var t,r,i=e.target,n=i.parentElement.previousElementSibling,a=i.parentElement.nextElementSibling;if(37===e.keyCode)t=n;else{if(39!==e.keyCode)return!1;t=a}"rtl"===c.documentElement.getAttribute("dir")&&(t=t===n?a:n),t&&(r=t.firstElementChild,i.setAttribute("tabindex","-1"),i.setAttribute("aria-selected",!1),c.querySelector("#"+i.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),r.setAttribute("tabindex","0"),r.setAttribute("aria-selected","true"),r.focus(),c.querySelector("#"+r.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}}i&&(!function e(){u.self===u.top||r||(r=u.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(t),t=setTimeout(function(){e()},100))}(),c.documentElement.className=c.documentElement.className.replace(/\bno-js\b/,"")+" js",c.addEventListener("DOMContentLoaded",n,!1),u.addEventListener("load",n,!1),u.addEventListener("resize",function(){u.self!==u.top&&(clearTimeout(e),e=setTimeout(function(){f("height",Math.ceil(c.body.getBoundingClientRect().height))},100))},!1))}(window,document); |
|
1053 <?php |
1076 <?php |
1054 } |
1077 } |
1055 ?> |
1078 ?> |
1056 </script> |
1079 </script> |
1057 <?php |
1080 <?php |
1083 <div class="wp-embed-comments"> |
1106 <div class="wp-embed-comments"> |
1084 <a href="<?php comments_link(); ?>" target="_top"> |
1107 <a href="<?php comments_link(); ?>" target="_top"> |
1085 <span class="dashicons dashicons-admin-comments"></span> |
1108 <span class="dashicons dashicons-admin-comments"></span> |
1086 <?php |
1109 <?php |
1087 printf( |
1110 printf( |
1111 /* translators: %s: Number of comments. */ |
|
1088 _n( |
1112 _n( |
1089 '%s <span class="screen-reader-text">Comment</span>', |
1113 '%s <span class="screen-reader-text">Comment</span>', |
1090 '%s <span class="screen-reader-text">Comments</span>', |
1114 '%s <span class="screen-reader-text">Comments</span>', |
1091 get_comments_number() |
1115 get_comments_number() |
1092 ), |
1116 ), |
1168 */ |
1192 */ |
1169 function the_embed_site_title() { |
1193 function the_embed_site_title() { |
1170 $site_title = sprintf( |
1194 $site_title = sprintf( |
1171 '<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>', |
1195 '<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>', |
1172 esc_url( home_url() ), |
1196 esc_url( home_url() ), |
1173 esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ), |
1197 esc_url( get_site_icon_url( 32, includes_url( 'images/w-logo-blue.png' ) ) ), |
1174 esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ), |
1198 esc_url( get_site_icon_url( 64, includes_url( 'images/w-logo-blue.png' ) ) ), |
1175 esc_html( get_bloginfo( 'name' ) ) |
1199 esc_html( get_bloginfo( 'name' ) ) |
1176 ); |
1200 ); |
1177 |
1201 |
1178 $site_title = '<div class="wp-embed-site-title">' . $site_title . '</div>'; |
1202 $site_title = '<div class="wp-embed-site-title">' . $site_title . '</div>'; |
1179 |
1203 |