From 9441756a895fb4fdc4bcf20e0d228cef622663ca Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 10 Jan 2016 11:11:18 -0800 Subject: [PATCH] WordPress 4.4.1 Signed-off-by: Edward Z. Yang --- license.txt | 2 +- readme.html | 2 +- wp-admin/about.php | 10 +- .../includes/class-wp-filesystem-ftpext.php | 12 +- .../class-wp-filesystem-ftpsockets.php | 2 +- wp-admin/includes/class-wp-screen.php | 6 +- wp-admin/includes/screen.php | 8 +- wp-admin/js/common.js | 2 +- wp-admin/js/common.min.js | 2 +- wp-admin/js/postbox.js | 13 +- wp-admin/js/postbox.min.js | 2 +- wp-admin/users.php | 15 +- wp-config-sample.php | 178 +++--- wp-content/plugins/akismet/_inc/akismet.css | 98 ++++ wp-content/plugins/akismet/_inc/akismet.js | 35 +- wp-content/plugins/akismet/akismet.php | 4 +- .../plugins/akismet/class.akismet-admin.php | 51 +- wp-content/plugins/akismet/class.akismet.php | 15 +- wp-content/plugins/akismet/readme.txt | 17 +- wp-content/plugins/akismet/views/config.php | 14 +- wp-content/plugins/akismet/views/notice.php | 14 +- wp-content/themes/twentysixteen/css/ie8.css | 10 +- wp-content/themes/twentysixteen/footer.php | 4 +- wp-content/themes/twentysixteen/functions.php | 30 +- wp-content/themes/twentysixteen/header.php | 6 +- .../themes/twentysixteen/inc/customizer.php | 4 +- wp-content/themes/twentysixteen/readme.txt | 2 +- wp-content/themes/twentysixteen/style.css | 7 +- wp-includes/category-template.php | 18 +- wp-includes/certificates/ca-bundle.crt | 340 ++++++++++++ wp-includes/class-IXR.php | 9 +- wp-includes/class-oembed.php | 6 +- wp-includes/class-phpmailer.php | 518 ++++++++++++------ wp-includes/class-smtp.php | 92 ++-- wp-includes/class-wp-theme.php | 8 +- wp-includes/class-wp-walker.php | 2 +- wp-includes/class-wp-xmlrpc-server.php | 16 +- wp-includes/class-wp.php | 11 +- wp-includes/comment-template.php | 43 +- wp-includes/comment.php | 6 +- .../class-wp-customize-themes-section.php | 2 +- wp-includes/embed-template.php | 2 +- wp-includes/embed.php | 2 +- wp-includes/formatting.php | 42 +- wp-includes/functions.php | 5 + wp-includes/general-template.php | 18 +- wp-includes/js/autosave.js | 2 +- wp-includes/js/autosave.min.js | 2 +- wp-includes/js/media-views.js | 23 +- wp-includes/js/media-views.min.js | 8 +- wp-includes/js/twemoji.js | 2 +- wp-includes/js/twemoji.min.js | 2 +- wp-includes/js/wp-emoji-loader.js | 23 +- wp-includes/js/wp-emoji-loader.min.js | 2 +- wp-includes/js/wp-emoji-release.min.js | 4 +- wp-includes/js/wp-emoji.js | 4 +- wp-includes/js/wp-emoji.min.js | 2 +- wp-includes/link-template.php | 8 +- wp-includes/media.php | 94 ++-- wp-includes/nav-menu-template.php | 2 +- wp-includes/post.php | 5 +- wp-includes/query.php | 4 + wp-includes/random_compat/random.php | 22 +- .../random_bytes_dev_urandom.php | 25 +- wp-includes/shortcodes.php | 6 +- wp-includes/taxonomy.php | 12 +- wp-includes/update.php | 15 +- wp-includes/version.php | 2 +- wp-includes/widgets.php | 4 +- wp-includes/widgets/class-wp-widget-rss.php | 2 +- wp-login.php | 5 +- 71 files changed, 1437 insertions(+), 548 deletions(-) diff --git a/license.txt b/license.txt index c21e12bc..85ee00db 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ WordPress - Web publishing software -Copyright 2015 by the contributors +Copyright 2016 by the contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/readme.html b/readme.html index a9898575..bdbe470c 100644 --- a/readme.html +++ b/readme.html @@ -9,7 +9,7 @@

WordPress -
Version 4.4 +
Version 4.4.1

Semantic Personal Publishing Platform

diff --git a/wp-admin/about.php b/wp-admin/about.php index 04a85566..8810c8ba 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -48,6 +48,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); +
+

+

Version %1$s addressed some security issues and fixed %2$s bug.', + 'Version %1$s addressed some security issues and fixed %2$s bugs.', 52 ), '4.4.1', number_format_i18n( 52 ) ); ?> + the release notes.' ), 'https://codex.wordpress.org/Version_4.4.1' ); ?> +

+
+
@@ -67,7 +75,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

- +
diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 38536a0e..0a90b9cb 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -326,16 +326,14 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { * @param string $file * @return bool */ - public function exists( $file ) { - $path = dirname( $file ); - $filename = basename( $file ); + public function exists($file) { + $list = @ftp_nlist($this->link, $file); - $file_list = @ftp_nlist( $this->link, '-a ' . $path ); - if ( $file_list ) { - $file_list = array_map( 'basename', $file_list ); + if ( empty( $list ) && $this->is_dir( $file ) ) { + return true; // File is an empty directory. } - return $file_list && in_array( $filename, $file_list ); + return !empty($list); //empty list = no file, so invert. } /** diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 29ac7888..31f22573 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -342,7 +342,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { * @return bool */ public function exists( $file ) { - $list = $this->ftp->rawlist( $file, '-a' ); + $list = $this->ftp->nlist( $file ); if ( empty( $list ) && $this->is_dir( $file ) ) { return true; // File is an empty directory. diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index 398bb073..5910c750 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -530,7 +530,7 @@ final class WP_Screen { } } - sort( $priorities ); + ksort( $priorities ); $sorted = array(); foreach ( $priorities as $list ) { @@ -998,7 +998,7 @@ final class WP_Screen { * Filter whether to show the Screen Options submit button. * * @since 4.4.0 - * + * * @param bool $show_button Whether to show Screen Options submit button. * Default false. * @param WP_Screen $this Current WP_Screen instance. @@ -1087,7 +1087,7 @@ final class WP_Screen { $id = "$column-hide"; echo '\n"; } ?> diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 8db0cde4..a320f0e1 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -57,7 +57,9 @@ function get_hidden_columns( $screen ) { $hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' ); - if ( ! $hidden ) { + $use_defaults = ! is_array( $hidden ); + + if ( $use_defaults ) { $hidden = array(); /** @@ -75,11 +77,13 @@ function get_hidden_columns( $screen ) { * Filter the list of hidden columns. * * @since 4.4.0 + * @since 4.4.1 Added the `use_defaults` parameter. * * @param array $hidden An array of hidden columns. * @param WP_Screen $screen WP_Screen object of the current screen. + * @param bool $use_defaults Whether to show the default columns. */ - return apply_filters( 'hidden_columns', $hidden, $screen ); + return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults ); } /** diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 796e1400..9d7fa415 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -397,7 +397,7 @@ $document.ready( function() { * The `.below-h2` class is here just for backwards compatibility with plugins * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570. */ - $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap' ).children( ':header' ).first() ); + $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() ); // Make notices dismissible function makeNoticesDismissible() { diff --git a/wp-admin/js/common.min.js b/wp-admin/js/common.min.js index 604ac9ef..6f5cda2e 100644 --- a/wp-admin/js/common.min.js +++ b/wp-admin/js/common.min.js @@ -1 +1 @@ -var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b,c){var d=a(document),e=a(b),f=a(document.body);adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).removeClass("hidden"),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).addClass("hidden"),this.colSpanChange(-1)},hidden:function(){return a(".manage-column[id]").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},d.ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a("#screen-meta-links").find(".show-settings"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(){var b=a("#"+a(this).attr("aria-controls"));b.length&&(b.is(":visible")?screenMeta.close(b,a(this)):screenMeta.open(b,a(this)))},open:function(b,c){a("#screen-meta-links").find(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),d.trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),d.trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),d.ready(function(){function c(){var c,d=a("a.wp-has-current-submenu");c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,f.hasClass("folded")||f.hasClass("auto-fold")&&c&&960>=c&&c>782?d.attr("aria-haspopup","true"):d.attr("aria-haspopup","false")}function g(a){var b,c,d,f,g,h,i,j=a.find(".wp-submenu");g=a.offset().top,h=e.scrollTop(),i=g-h-30,b=g+j.height()+1,c=B.height(),d=60+b-c,f=e.height()+h-50,b-d>f&&(d=b-f),d>i&&(d=i),d>1?j.css("margin-top","-"+d+"px"):j.css("margin-top","")}function h(){a(".notice.is-dismissible").each(function(){var b=a(this),c=a(''),d=commonL10n.dismiss||"";c.find(".screen-reader-text").text(d),c.on("click.wp-dismiss-notice",function(a){a.preventDefault(),b.fadeTo(100,0,function(){b.slideUp(100,function(){b.remove()})})}),b.append(c)})}function i(a){var b=e.scrollTop(),c=!a||"scroll"!==a.type;if(!(x||z||C.data("wp-responsive"))){if(O.menu+O.adminbarO.wpwrap)return void k();if(N=!0,O.menu+O.adminbar>O.window){if(0>b)return void(K||(K=!0,L=!1,A.css({position:"fixed",top:"",bottom:""})));if(b+O.window>d.height()-1)return void(L||(L=!0,K=!1,A.css({position:"fixed",top:"",bottom:0})));b>J?K?(K=!1,M=A.offset().top-O.adminbar-(b-J),M+O.menu+O.adminbarb?L?(L=!1,M=A.offset().top-O.adminbar+(J-b),M+O.menu>b+O.window&&(M=b),A.css({position:"absolute",top:M,bottom:""})):!K&&A.offset().top>=b+O.adminbar&&(K=!0,A.css({position:"fixed",top:"",bottom:""})):c&&(K=L=!1,M=b+O.window-O.menu-O.adminbar-1,M>0?A.css({position:"absolute",top:M,bottom:""}):k())}J=b}}function j(){O={window:e.height(),wpwrap:B.height(),adminbar:I.height(),menu:A.height()}}function k(){!x&&N&&(K=L=N=!1,A.css({position:"",top:"",bottom:""}))}function l(){j(),C.data("wp-responsive")?(f.removeClass("sticky-menu"),k()):O.menu+O.adminbar>O.window?(i(),f.removeClass("sticky-menu")):(f.addClass("sticky-menu"),k())}var m,n,o,p,q,r,s,t,u=!1,v=a("input.current-page"),w=v.val(),x=/iPhone|iPad|iPod/.test(navigator.userAgent),y=-1!==navigator.userAgent.indexOf("Android"),z=a(document.documentElement).hasClass("ie8"),A=a("#adminmenuwrap"),B=a("#wpwrap"),C=a("#adminmenu"),D=a("#wp-responsive-overlay"),E=a("#wp-toolbar"),F=E.find('a[aria-haspopup="true"]'),G=a(".meta-box-sortables"),H=!1,I=a("#wpadminbar"),J=0,K=!1,L=!1,M=0,N=!1,O={window:e.height(),wpwrap:B.height(),adminbar:I.height(),menu:A.height()};C.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var e,g;a("#adminmenu div.wp-submenu").css("margin-top",""),e=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,e&&960>e?f.hasClass("auto-fold")?(f.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),g="open"):(f.addClass("auto-fold"),setUserSetting("unfold",0),g="folded"):f.hasClass("folded")?(f.removeClass("folded"),setUserSetting("mfold","o"),g="open"):(f.addClass("folded"),setUserSetting("mfold","f"),g="folded"),c(),d.trigger("wp-collapse-menu",{state:g})}),d.on("wp-window-resized wp-responsive-activate wp-responsive-deactivate",c),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(r=x?"touchstart":"click",f.on(r+".wp-mobile-hover",function(b){C.data("wp-responsive")||a(b.target).closest("#adminmenu").length||C.find("li.opensub").removeClass("opensub")}),C.find("a.wp-has-submenu").on(r+".wp-mobile-hover",function(b){var c=a(this).parent();C.data("wp-responsive")||c.hasClass("opensub")||c.hasClass("wp-menu-open")&&!(c.width()<40)||(b.preventDefault(),g(c),C.find("li.opensub").removeClass("opensub"),c.addClass("opensub"))})),x||y||(C.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),c=b.find(".wp-submenu"),d=parseInt(c.css("top"),10);isNaN(d)||d>-5||C.data("wp-responsive")||(g(b),C.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){C.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),C.on("focus.adminmenu",".wp-submenu a",function(b){C.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){C.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",function(){g(a(this))})),a("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(a(".wrap").children(":header").first()),d.on("wp-plugin-update-error",function(){h()}),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!u)return!0;m=a(u).closest("form").find(":checkbox").filter(":visible:enabled"),n=m.index(u),o=m.index(this),p=a(this).prop("checked"),n>0&&o>0&&n!=o&&(q=o>n?m.slice(n,o):m.slice(o,n),q.prop("checked",function(){return a(this).closest("tr").is(":visible")?p:!1}))}u=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden,:disabled")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("#wpbody-content").on({focusin:function(){clearTimeout(s),t=a(this).find(".row-actions"),a(".row-actions").not(this).removeClass("visible"),t.addClass("visible")},focusout:function(){s=setTimeout(function(){t.removeClass("visible")},30)}},".has-row-actions"),a("tbody").on("click",".toggle-row",function(){a(this).closest("tr").toggleClass("is-expanded")}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return b.preventDefault(),void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value,document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat(" ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),v.length&&v.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&v.val()==w&&v.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),x||(e.on("scroll.pin-menu",i),d.on("tinymce-editor-init.pin-menu",function(a,b){b.on("wp-autoresize",j)})),b.wpResponsive={init:function(){var c=this;d.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),I.find(".hover").removeClass("hover"),B.toggleClass("wp-responsive-open"),B.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),C.on("click.wp-responsive","li.wp-has-submenu > a",function(b){C.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),d.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),e.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?e.width():b.innerWidth;782>=a&&c.disableSortables()})},activate:function(){l(),f.hasClass("auto-fold")||f.addClass("auto-fold"),C.data("wp-responsive",1),this.disableSortables()},deactivate:function(){l(),C.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?H||(d.trigger("wp-responsive-activate"),H=!0):H&&(d.trigger("wp-responsive-deactivate"),H=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===D.length&&(D=a('
').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){E.find(".menupop.hover").removeClass("hover"),a(this).hide()})),F.on("click.wp-responsive",function(){D.show()})},disableOverlay:function(){F.off("click.wp-responsive"),D.hide()},disableSortables:function(){if(G.length)try{G.sortable("disable")}catch(a){}},enableSortables:function(){if(G.length)try{G.sortable("enable")}catch(a){}}},b.wpResponsive.init(),l(),c(),h(),d.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",l)}),function(){function a(){d.trigger("wp-window-resized")}function c(){b.clearTimeout(f),f=b.setTimeout(a,200)}var f;e.on("resize.wp-fire-once",c)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window); \ No newline at end of file +var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b,c){var d=a(document),e=a(b),f=a(document.body);adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).removeClass("hidden"),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).addClass("hidden"),this.colSpanChange(-1)},hidden:function(){return a(".manage-column[id]").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},d.ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a("#screen-meta-links").find(".show-settings"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(){var b=a("#"+a(this).attr("aria-controls"));b.length&&(b.is(":visible")?screenMeta.close(b,a(this)):screenMeta.open(b,a(this)))},open:function(b,c){a("#screen-meta-links").find(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),d.trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),d.trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),d.ready(function(){function c(){var c,d=a("a.wp-has-current-submenu");c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,f.hasClass("folded")||f.hasClass("auto-fold")&&c&&960>=c&&c>782?d.attr("aria-haspopup","true"):d.attr("aria-haspopup","false")}function g(a){var b,c,d,f,g,h,i,j=a.find(".wp-submenu");g=a.offset().top,h=e.scrollTop(),i=g-h-30,b=g+j.height()+1,c=B.height(),d=60+b-c,f=e.height()+h-50,b-d>f&&(d=b-f),d>i&&(d=i),d>1?j.css("margin-top","-"+d+"px"):j.css("margin-top","")}function h(){a(".notice.is-dismissible").each(function(){var b=a(this),c=a(''),d=commonL10n.dismiss||"";c.find(".screen-reader-text").text(d),c.on("click.wp-dismiss-notice",function(a){a.preventDefault(),b.fadeTo(100,0,function(){b.slideUp(100,function(){b.remove()})})}),b.append(c)})}function i(a){var b=e.scrollTop(),c=!a||"scroll"!==a.type;if(!(x||z||C.data("wp-responsive"))){if(O.menu+O.adminbarO.wpwrap)return void k();if(N=!0,O.menu+O.adminbar>O.window){if(0>b)return void(K||(K=!0,L=!1,A.css({position:"fixed",top:"",bottom:""})));if(b+O.window>d.height()-1)return void(L||(L=!0,K=!1,A.css({position:"fixed",top:"",bottom:0})));b>J?K?(K=!1,M=A.offset().top-O.adminbar-(b-J),M+O.menu+O.adminbarb?L?(L=!1,M=A.offset().top-O.adminbar+(J-b),M+O.menu>b+O.window&&(M=b),A.css({position:"absolute",top:M,bottom:""})):!K&&A.offset().top>=b+O.adminbar&&(K=!0,A.css({position:"fixed",top:"",bottom:""})):c&&(K=L=!1,M=b+O.window-O.menu-O.adminbar-1,M>0?A.css({position:"absolute",top:M,bottom:""}):k())}J=b}}function j(){O={window:e.height(),wpwrap:B.height(),adminbar:I.height(),menu:A.height()}}function k(){!x&&N&&(K=L=N=!1,A.css({position:"",top:"",bottom:""}))}function l(){j(),C.data("wp-responsive")?(f.removeClass("sticky-menu"),k()):O.menu+O.adminbar>O.window?(i(),f.removeClass("sticky-menu")):(f.addClass("sticky-menu"),k())}var m,n,o,p,q,r,s,t,u=!1,v=a("input.current-page"),w=v.val(),x=/iPhone|iPad|iPod/.test(navigator.userAgent),y=-1!==navigator.userAgent.indexOf("Android"),z=a(document.documentElement).hasClass("ie8"),A=a("#adminmenuwrap"),B=a("#wpwrap"),C=a("#adminmenu"),D=a("#wp-responsive-overlay"),E=a("#wp-toolbar"),F=E.find('a[aria-haspopup="true"]'),G=a(".meta-box-sortables"),H=!1,I=a("#wpadminbar"),J=0,K=!1,L=!1,M=0,N=!1,O={window:e.height(),wpwrap:B.height(),adminbar:I.height(),menu:A.height()};C.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var e,g;a("#adminmenu div.wp-submenu").css("margin-top",""),e=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,e&&960>e?f.hasClass("auto-fold")?(f.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),g="open"):(f.addClass("auto-fold"),setUserSetting("unfold",0),g="folded"):f.hasClass("folded")?(f.removeClass("folded"),setUserSetting("mfold","o"),g="open"):(f.addClass("folded"),setUserSetting("mfold","f"),g="folded"),c(),d.trigger("wp-collapse-menu",{state:g})}),d.on("wp-window-resized wp-responsive-activate wp-responsive-deactivate",c),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(r=x?"touchstart":"click",f.on(r+".wp-mobile-hover",function(b){C.data("wp-responsive")||a(b.target).closest("#adminmenu").length||C.find("li.opensub").removeClass("opensub")}),C.find("a.wp-has-submenu").on(r+".wp-mobile-hover",function(b){var c=a(this).parent();C.data("wp-responsive")||c.hasClass("opensub")||c.hasClass("wp-menu-open")&&!(c.width()<40)||(b.preventDefault(),g(c),C.find("li.opensub").removeClass("opensub"),c.addClass("opensub"))})),x||y||(C.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),c=b.find(".wp-submenu"),d=parseInt(c.css("top"),10);isNaN(d)||d>-5||C.data("wp-responsive")||(g(b),C.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){C.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),C.on("focus.adminmenu",".wp-submenu a",function(b){C.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){C.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",function(){g(a(this))})),a("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(a(".wrap h1, .wrap h2").first()),d.on("wp-plugin-update-error",function(){h()}),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!u)return!0;m=a(u).closest("form").find(":checkbox").filter(":visible:enabled"),n=m.index(u),o=m.index(this),p=a(this).prop("checked"),n>0&&o>0&&n!=o&&(q=o>n?m.slice(n,o):m.slice(o,n),q.prop("checked",function(){return a(this).closest("tr").is(":visible")?p:!1}))}u=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden,:disabled")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("#wpbody-content").on({focusin:function(){clearTimeout(s),t=a(this).find(".row-actions"),a(".row-actions").not(this).removeClass("visible"),t.addClass("visible")},focusout:function(){s=setTimeout(function(){t.removeClass("visible")},30)}},".has-row-actions"),a("tbody").on("click",".toggle-row",function(){a(this).closest("tr").toggleClass("is-expanded")}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return b.preventDefault(),void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value,document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat(" ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),v.length&&v.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&v.val()==w&&v.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),x||(e.on("scroll.pin-menu",i),d.on("tinymce-editor-init.pin-menu",function(a,b){b.on("wp-autoresize",j)})),b.wpResponsive={init:function(){var c=this;d.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),I.find(".hover").removeClass("hover"),B.toggleClass("wp-responsive-open"),B.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),C.on("click.wp-responsive","li.wp-has-submenu > a",function(b){C.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),d.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),e.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?e.width():b.innerWidth;782>=a&&c.disableSortables()})},activate:function(){l(),f.hasClass("auto-fold")||f.addClass("auto-fold"),C.data("wp-responsive",1),this.disableSortables()},deactivate:function(){l(),C.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?H||(d.trigger("wp-responsive-activate"),H=!0):H&&(d.trigger("wp-responsive-deactivate"),H=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===D.length&&(D=a('
').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){E.find(".menupop.hover").removeClass("hover"),a(this).hide()})),F.on("click.wp-responsive",function(){D.show()})},disableOverlay:function(){F.off("click.wp-responsive"),D.hide()},disableSortables:function(){if(G.length)try{G.sortable("disable")}catch(a){}},enableSortables:function(){if(G.length)try{G.sortable("enable")}catch(a){}}},b.wpResponsive.init(),l(),c(),h(),d.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",l)}),function(){function a(){d.trigger("wp-window-resized")}function c(){b.clearTimeout(f),f=b.setTimeout(a,200)}var f;e.on("resize.wp-fire-once",c)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window); \ No newline at end of file diff --git a/wp-admin/js/postbox.js b/wp-admin/js/postbox.js index 4fe74193..c75e423d 100644 --- a/wp-admin/js/postbox.js +++ b/wp-admin/js/postbox.js @@ -50,7 +50,7 @@ var postboxes; this.page = page; this.init( page, args ); - $handles.on( 'click.postboxes', this.handle_click ); + $handles.on( 'click.postboxes', this.handle_click ); $('.postbox .hndle a').click( function(e) { e.stopPropagation(); @@ -144,8 +144,15 @@ var postboxes; }, save_state : function(page) { - var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','), - hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(','); + var closed, hidden; + + // Return on the nav-menus.php screen, see #35112. + if ( 'nav-menus' === page ) { + return; + } + + closed = $( '.postbox' ).filter( '.closed' ).map( function() { return this.id; } ).get().join( ',' ); + hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' ); $.post(ajaxurl, { action: 'closed-postboxes', diff --git a/wp-admin/js/postbox.min.js b/wp-admin/js/postbox.min.js index 077a5e3a..f118baca 100644 --- a/wp-admin/js/postbox.min.js +++ b/wp-admin/js/postbox.min.js @@ -1 +1 @@ -var postboxes;!function(a){var b=a(document);postboxes={handle_click:function(){var c,d=a(this),e=d.parent(".postbox"),f=e.attr("id");"dashboard_browser_nag"!==f&&(e.toggleClass("closed"),c=!e.hasClass("closed"),d.hasClass("handlediv")?d.attr("aria-expanded",c):d.closest(".postbox").find("button.handlediv").attr("aria-expanded",c),"press-this"!==postboxes.page&&postboxes.save_state(postboxes.page),f&&(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)?postboxes.pbshow(f):e.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&postboxes.pbhide(f)),b.trigger("postbox-toggled",e))},add_postbox_toggles:function(c,d){var e=a(".postbox .hndle, .postbox .handlediv");this.page=c,this.init(c,d),e.on("click.postboxes",this.handle_click),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").on("click.postboxes",function(b){var c=a(this).parents(".postbox").attr("id")+"-hide";b.preventDefault(),a("#"+c).prop("checked",!1).triggerHandler("click")}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this),e=d.val(),f=a("#"+e);d.prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&postboxes.pbshow(e)):(f.hide(),a.isFunction(postboxes.pbhide)&&postboxes.pbhide(e)),postboxes.save_state(c),postboxes._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(postboxes._pb_edit(b),postboxes.save_order(c))})},init:function(b,c){var d=a(document.body).hasClass("mobile"),e=a(".postbox .handlediv");a.extend(this,c||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:d?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:"clone",opacity:.65,stop:function(){var c=a(this);return c.find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void c.sortable("cancel"):void postboxes.save_order(b)},receive:function(b,c){"dashboard_browser_nag"==c.item[0].id&&a(c.sender).sortable("cancel"),postboxes._mark_area()}}),d&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area(),e.each(function(){var b=a(this);b.attr("aria-expanded",!b.parent(".postbox").hasClass("closed"))})},save_state:function(b){var c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b})},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):c.addClass("empty-container")}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery); \ No newline at end of file +var postboxes;!function(a){var b=a(document);postboxes={handle_click:function(){var c,d=a(this),e=d.parent(".postbox"),f=e.attr("id");"dashboard_browser_nag"!==f&&(e.toggleClass("closed"),c=!e.hasClass("closed"),d.hasClass("handlediv")?d.attr("aria-expanded",c):d.closest(".postbox").find("button.handlediv").attr("aria-expanded",c),"press-this"!==postboxes.page&&postboxes.save_state(postboxes.page),f&&(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)?postboxes.pbshow(f):e.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&postboxes.pbhide(f)),b.trigger("postbox-toggled",e))},add_postbox_toggles:function(c,d){var e=a(".postbox .hndle, .postbox .handlediv");this.page=c,this.init(c,d),e.on("click.postboxes",this.handle_click),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").on("click.postboxes",function(b){var c=a(this).parents(".postbox").attr("id")+"-hide";b.preventDefault(),a("#"+c).prop("checked",!1).triggerHandler("click")}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this),e=d.val(),f=a("#"+e);d.prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&postboxes.pbshow(e)):(f.hide(),a.isFunction(postboxes.pbhide)&&postboxes.pbhide(e)),postboxes.save_state(c),postboxes._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(postboxes._pb_edit(b),postboxes.save_order(c))})},init:function(b,c){var d=a(document.body).hasClass("mobile"),e=a(".postbox .handlediv");a.extend(this,c||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:d?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:"clone",opacity:.65,stop:function(){var c=a(this);return c.find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void c.sortable("cancel"):void postboxes.save_order(b)},receive:function(b,c){"dashboard_browser_nag"==c.item[0].id&&a(c.sender).sortable("cancel"),postboxes._mark_area()}}),d&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area(),e.each(function(){var b=a(this);b.attr("aria-expanded",!b.parent(".postbox").hasClass("closed"))})},save_state:function(b){var c,d;"nav-menus"!==b&&(c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(","),a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b}))},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):c.addClass("empty-container")}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery); \ No newline at end of file diff --git a/wp-admin/users.php b/wp-admin/users.php index cdf0d8b3..cec9747c 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -211,13 +211,14 @@ case 'delete': else $userids = array_map( 'intval', (array) $_REQUEST['users'] ); - $users_posts = new WP_Query( array( - 'post_type' => 'any', - 'author' => implode( ',', $userids ), - 'posts_per_page' => 1 - ) ); + $users_have_content = false; + if ( $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_author IN( " . implode( ',', $userids ) . " ) LIMIT 1" ) ) { + $users_have_content = true; + } elseif ( $wpdb->get_var( "SELECT link_id FROM {$wpdb->links} WHERE link_owner IN( " . implode( ',', $userids ) . " ) LIMIT 1" ) ) { + $users_have_content = true; + } - if ( $users_posts->have_posts() ) { + if ( $users_have_content ) { add_action( 'admin_head', 'delete_users_add_js' ); } @@ -257,7 +258,7 @@ case 'delete': have_posts() ) : ?> + if ( ! $users_have_content ) : ?> diff --git a/wp-config-sample.php b/wp-config-sample.php index 02091c1b..7cfaf329 100644 --- a/wp-config-sample.php +++ b/wp-config-sample.php @@ -1,89 +1,89 @@ -x' ) - .attr( 'commentid', thisCommentId[1] ) - .attr( 'title', WPAkismet.strings['Remove this URL'] ) - ); + $('#the-comment-list') + .find('tr.comment, tr[id ^= "comment-"]') + .find('.column-author a[href^="http"]:first') // Ignore mailto: links, which would be the comment author's email. + .each(function () { + var linkHref = $(this).attr( 'href' ); + + // Ignore any links to the current domain, which are diagnostic tools, like the IP address link + // or any other links another plugin might add. + var currentHostParts = document.location.href.split( '/' ); + var currentHost = currentHostParts[0] + '//' + currentHostParts[2] + '/'; + + if ( linkHref.indexOf( currentHost ) != 0 ) { + var thisCommentId = $(this).parents('tr:first').attr('id').split("-"); + + $(this) + .attr("id", "author_comment_url_"+ thisCommentId[1]) + .after( + $( 'x' ) + .attr( 'commentid', thisCommentId[1] ) + .attr( 'title', WPAkismet.strings['Remove this URL'] ) + ); } }); $('.remove_url').live('click', function () { diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php index 7cdd0680..2c13942b 100644 --- a/wp-content/plugins/akismet/akismet.php +++ b/wp-content/plugins/akismet/akismet.php @@ -6,7 +6,7 @@ Plugin Name: Akismet Plugin URI: http://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. It keeps your site protected even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) Sign up for an Akismet plan to get an API key, and 3) Go to your Akismet configuration page, and save your API key. -Version: 3.1.5 +Version: 3.1.7 Author: Automattic Author URI: http://automattic.com/wordpress-plugins/ License: GPLv2 or later @@ -37,7 +37,7 @@ if ( !function_exists( 'add_action' ) ) { exit; } -define( 'AKISMET_VERSION', '3.1.5' ); +define( 'AKISMET_VERSION', '3.1.7' ); define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' ); define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php index 6a05b2ba..863d1cab 100644 --- a/wp-content/plugins/akismet/class.akismet-admin.php +++ b/wp-content/plugins/akismet/class.akismet-admin.php @@ -4,7 +4,25 @@ class Akismet_Admin { const NONCE = 'akismet-update-key'; private static $initiated = false; - private static $notices = array(); + private static $notices = array(); + private static $allowed = array( + 'a' => array( + 'href' => true, + 'title' => true, + ), + 'b' => array(), + 'code' => array(), + 'del' => array( + 'datetime' => true, + ), + 'em' => array(), + 'i' => array(), + 'q' => array( + 'cite' => true, + ), + 'strike' => array(), + 'strong' => array(), + ); public static function init() { if ( ! self::$initiated ) { @@ -91,6 +109,7 @@ class Akismet_Admin { 'post.php', 'settings_page_akismet-key-config', 'jetpack_page_akismet-key-config', + 'plugins.php', ) ) ) { wp_register_style( 'akismet.css', AKISMET__PLUGIN_URL . '_inc/akismet.css', array(), AKISMET_VERSION ); wp_enqueue_style( 'akismet.css'); @@ -257,8 +276,10 @@ class Akismet_Admin { if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) ) update_option( 'wordpress_api_key', $api_key ); - if ( $akismet_user->status == 'active' ) + if ( $akismet_user->status == 'active' ) self::$notices['status'] = 'new-key-valid'; + elseif ( $akismet_user->status == 'notice' ) + self::$notices['status'] = $akismet_user; else self::$notices['status'] = $akismet_user->status; } @@ -867,11 +888,11 @@ class Akismet_Admin { $cleaning_up = __( 'Cleaning up spam takes time.' , 'akismet'); if ( $total_in_days > 1 ) - $time_saved = $cleaning_up . ' ' . sprintf( __( 'Akismet has saved you %s days!' , 'akismet'), number_format_i18n( $total_in_days ) ); + $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %s day!', 'Akismet has saved you %s days!', $total_in_days, 'akismet' ), number_format_i18n( $total_in_days ) ); elseif ( $total_in_hours > 1 ) - $time_saved = $cleaning_up . ' ' . sprintf( __( 'Akismet has saved you %d hours!' , 'akismet'), $total_in_hours ); + $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d hour!', 'Akismet has saved you %d hours!', $total_in_hours, 'akismet' ), $total_in_hours ); elseif ( $total_in_minutes >= 30 ) - $time_saved = $cleaning_up . ' ' . sprintf( __( 'Akismet has saved you %d minutes!' , 'akismet'), $total_in_minutes ); + $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d minute!', 'Akismet has saved you %d minutes!', $total_in_minutes, 'akismet' ), $total_in_minutes ); } Akismet::view( 'notice', array( 'type' => 'active-notice', 'time_saved' => $time_saved ) ); @@ -918,8 +939,24 @@ class Akismet_Admin { if ( !empty( $type ) ) Akismet::view( 'notice', compact( 'type' ) ); elseif ( !empty( self::$notices ) ) { - foreach ( self::$notices as $type ) - Akismet::view( 'notice', compact( 'type' ) ); + foreach ( self::$notices as $type ) { + if ( is_object( $type ) ) { + $notice_header = $notice_text = ''; + + if ( property_exists( $type, 'notice_header' ) ) + $notice_header = wp_kses( $type->notice_header, self::$allowed ); + + if ( property_exists( $type, 'notice_text' ) ) + $notice_text = wp_kses( $type->notice_text, self::$allowed ); + + if ( property_exists( $type, 'status' ) ) { + $type = wp_kses( $type->status, self::$allowed ); + Akismet::view( 'notice', compact( 'type', 'notice_header', 'notice_text' ) ); + } + } + else + Akismet::view( 'notice', compact( 'type' ) ); + } } } diff --git a/wp-content/plugins/akismet/class.akismet.php b/wp-content/plugins/akismet/class.akismet.php index ede1d1b9..e47c8a8f 100644 --- a/wp-content/plugins/akismet/class.akismet.php +++ b/wp-content/plugins/akismet/class.akismet.php @@ -29,6 +29,14 @@ class Akismet { add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments_meta' ) ); add_action( 'akismet_schedule_cron_recheck', array( 'Akismet', 'cron_recheck' ) ); + /** + * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag + * and return any string value that is not 'true' or '' (empty string). + * + * Don't return boolean false, because that implies that the 'akismet_comment_nonce' option + * has not been set and that Akismet should just choose the default behavior for that + * situation. + */ $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) @@ -45,12 +53,6 @@ class Akismet { // Run this early in the pingback call, before doing a remote fetch of the source uri add_action( 'xmlrpc_call', array( 'Akismet', 'pre_check_pingback' ) ); - - if ( '3.0.5' == $GLOBALS['wp_version'] ) { - remove_filter( 'comment_text', 'wp_kses_data' ); - if ( is_admin() ) - add_filter( 'comment_text', 'wp_kses_post' ); - } } public static function get_api_key() { @@ -95,6 +97,7 @@ class Akismet { if ( !empty( $comment['user_ID'] ) ) $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] ); + /** See filter documentation in init_hooks(). */ $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); $comment['akismet_comment_nonce'] = 'inactive'; if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { diff --git a/wp-content/plugins/akismet/readme.txt b/wp-content/plugins/akismet/readme.txt index 553e292e..69f43d80 100644 --- a/wp-content/plugins/akismet/readme.txt +++ b/wp-content/plugins/akismet/readme.txt @@ -2,8 +2,8 @@ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments Requires at least: 3.2 -Tested up to: 4.3.1 -Stable tag: 3.1.5 +Tested up to: 4.4.1 +Stable tag: 3.1.7 License: GPLv2 or later Akismet checks your comments against the Akismet Web service to see if they look like spam or not. @@ -30,6 +30,19 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co == Changelog == += 3.1.7 = +*Release Date - 4 January 2016* + +* Added documentation for the 'akismet_comment_nonce' filter. +* The post-install activation button is now accessible to screen readers and keyboard-only users. +* Fixed a bug that was preventing the "Remove author URL" feature from working in WordPress 4.4 + += 3.1.6 = +*Release Date - 14 December 2015* + +* Improve the notices shown after activating Akismet. +* Update some strings to allow for the proper plural forms in all languages. + = 3.1.5 = *Release Date - 13 October 2015* diff --git a/wp-content/plugins/akismet/views/config.php b/wp-content/plugins/akismet/views/config.php index 74701c9e..d84e21a8 100644 --- a/wp-content/plugins/akismet/views/config.php +++ b/wp-content/plugins/akismet/views/config.php @@ -17,23 +17,19 @@
  • spam );?> - + spam, 'akismet' ) ); ?>
  • spam );?> - + spam, 'akismet' ) ); ?>
  • accuracy; ?>% - false_positives , 'akismet') - ), - number_format( $stat_totals['all']->missed_spam ), - number_format( $stat_totals['all']->false_positives ) - ); ?> + missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?> + | + false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
  • diff --git a/wp-content/plugins/akismet/views/notice.php b/wp-content/plugins/akismet/views/notice.php index c3638f88..fc8bc183 100644 --- a/wp-content/plugins/akismet/views/notice.php +++ b/wp-content/plugins/akismet/views/notice.php @@ -1,14 +1,11 @@
    -
    A
    -
    +
    -
    +
    Almost done - activate Akismet and say goodbye to spam', 'akismet');?>
    @@ -37,6 +34,13 @@ ?>

    + +
    +

    +

    + +

    +

    diff --git a/wp-content/themes/twentysixteen/css/ie8.css b/wp-content/themes/twentysixteen/css/ie8.css index 7b181c17..1b07fe89 100644 --- a/wp-content/themes/twentysixteen/css/ie8.css +++ b/wp-content/themes/twentysixteen/css/ie8.css @@ -132,7 +132,7 @@ code { .comment-navigation .nav-previous + .nav-next:before { content: "\002f"; display: inline-block; - opacity: 0.7; + filter: alpha(opacity=70); padding: 0 0.538461538em; } @@ -153,17 +153,13 @@ code { width: 50%; } -.entry-footer > span:before { +.entry-footer > span:after { content: "\002f"; display: inline-block; - opacity: 0.7; + filter: alpha(opacity=70); padding: 0 0.538461538em; } -.entry-footer > span:first-child:before { - display: none; -} - .updated { display: none; } diff --git a/wp-content/themes/twentysixteen/footer.php b/wp-content/themes/twentysixteen/footer.php index 6c910cfb..5c6a1827 100644 --- a/wp-content/themes/twentysixteen/footer.php +++ b/wp-content/themes/twentysixteen/footer.php @@ -14,7 +14,7 @@
    -
    diff --git a/wp-content/themes/twentysixteen/inc/customizer.php b/wp-content/themes/twentysixteen/inc/customizer.php index bad570b9..bc932cff 100644 --- a/wp-content/themes/twentysixteen/inc/customizer.php +++ b/wp-content/themes/twentysixteen/inc/customizer.php @@ -384,7 +384,7 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' ); * @since Twenty Sixteen 1.0 */ function twentysixteen_customize_control_js() { - wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20150825', true ); + wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20150926', true ); wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() ); } add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' ); @@ -395,7 +395,7 @@ add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_contr * @since Twenty Sixteen 1.0 */ function twentysixteen_customize_preview_js() { - wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20150825', true ); + wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20150922', true ); } add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' ); diff --git a/wp-content/themes/twentysixteen/readme.txt b/wp-content/themes/twentysixteen/readme.txt index 2850e6fe..14741ee7 100644 --- a/wp-content/themes/twentysixteen/readme.txt +++ b/wp-content/themes/twentysixteen/readme.txt @@ -2,7 +2,7 @@ Contributors: the WordPress team Requires at least: WordPress 4.4 Tested up to: WordPress 4.4 -Version: 1.0 +Version: 1.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: black, blue, gray, green, white, yellow, dark, light, one-column, two-columns, right-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready diff --git a/wp-content/themes/twentysixteen/style.css b/wp-content/themes/twentysixteen/style.css index 60a26186..909a03e1 100644 --- a/wp-content/themes/twentysixteen/style.css +++ b/wp-content/themes/twentysixteen/style.css @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere. -Version: 1.0 +Version: 1.1 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: black, blue, gray, red, white, yellow, dark, light, one-column, two-columns, right-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready @@ -1487,7 +1487,6 @@ blockquote:after, border-radius: 2px; display: inline-block; font-family: Montserrat, "Helvetica Neue", sans-serif; - font-size: inherit !important; line-height: 1; margin: 0 0.1875em 0.4375em 0; padding: 0.5625em 0.4375em 0.5em; @@ -1961,7 +1960,7 @@ body:not(.search-results) .entry-summary > :last-child, color: #007acc; } -.entry-footer > span:not(:first-child):before { +.entry-footer > span:not(:last-child):after { content: "\002f"; display: inline-block; opacity: 0.7; @@ -3515,7 +3514,7 @@ p > video { width: 21.42857143%; } - body:not(.search-results) article:not(.type-page) .entry-footer > span:not(:first-child):before { + body:not(.search-results) article:not(.type-page) .entry-footer > span:not(:last-child):after { display: none; } diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 9b685edb..a8d7941f 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -550,11 +550,11 @@ function wp_list_categories( $args = '' ) { $exclude_tree = array(); if ( $r['exclude_tree'] ) { - $exclude_tree = array_merge( $exclude_tree, (array) $r['exclude_tree'] ); + $exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude_tree'] ) ); } if ( $r['exclude'] ) { - $exclude_tree = array_merge( $exclude_tree, (array) $r['exclude'] ); + $exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude'] ) ); } $r['exclude_tree'] = $exclude_tree; @@ -1148,14 +1148,18 @@ function get_the_terms( $post, $taxonomy ) { $terms = get_object_term_cache( $post->ID, $taxonomy ); if ( false === $terms ) { $terms = wp_get_object_terms( $post->ID, $taxonomy ); - $to_cache = array(); - foreach ( $terms as $key => $term ) { - $to_cache[ $key ] = $term->data; + if ( ! is_wp_error( $terms ) ) { + $to_cache = array(); + foreach ( $terms as $key => $term ) { + $to_cache[ $key ] = $term->data; + } + wp_cache_add( $post->ID, $to_cache, $taxonomy . '_relationships' ); } - wp_cache_add( $post->ID, $to_cache, $taxonomy . '_relationships' ); } - $terms = array_map( 'get_term', $terms ); + if ( ! is_wp_error( $terms ) ) { + $terms = array_map( 'get_term', $terms ); + } /** * Filter the list of terms attached to the given post. diff --git a/wp-includes/certificates/ca-bundle.crt b/wp-includes/certificates/ca-bundle.crt index d02706ca..e631095f 100644 --- a/wp-includes/certificates/ca-bundle.crt +++ b/wp-includes/certificates/ca-bundle.crt @@ -2,6 +2,8 @@ ## Bundle of CA Root Certificates ## ## Certificate data from Mozilla as of: Wed Sep 16 08:58:11 2015 +## Includes a WordPress Modification - We include the 'legacy' 1024bit certificates +## for backwards compatibility. See https://core.trac.wordpress.org/ticket/34935#comment:10 ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -41,6 +43,61 @@ uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU dcGWxZ0= -----END CERTIFICATE----- +GTE CyberTrust Global Root +========================== +-----BEGIN CERTIFICATE----- +MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg +Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG +A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz +MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL +Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0 +IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u +sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql +HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID +AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW +M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF +NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ +-----END CERTIFICATE----- + +Thawte Server CA +================ +-----BEGIN CERTIFICATE----- +MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE +AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j +b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV +BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u +c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG +A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 +ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl +/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 +1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J +GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ +GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= +-----END CERTIFICATE----- + +Thawte Premium Server CA +======================== +-----BEGIN CERTIFICATE----- +MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE +AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl +ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT +AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU +VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2 +aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZ +cHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2 +aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIh +Udib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/ +qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAm +SCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf +8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t +UCemDaYj+bvLpgcUQg== +-----END CERTIFICATE----- + Equifax Secure CA ================= -----BEGIN CERTIFICATE----- @@ -61,6 +118,41 @@ BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 70+sB3c4 -----END CERTIFICATE----- +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA +TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah +WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf +Tqj/ZA1k +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO +FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 +lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB +MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT +1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD +Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 +-----END CERTIFICATE----- + GlobalSign Root CA ================== -----BEGIN CERTIFICATE----- @@ -104,6 +196,64 @@ BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== -----END CERTIFICATE----- + +ValiCert Class 1 VA +=================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIy +MjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIi +GQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCm +DuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwG +lN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkX +icnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nP +Orf1LXLI +-----END CERTIFICATE----- + +ValiCert Class 2 VA +=================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw +MTk1NFoXDTE5MDYyNjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDOOnHK5avIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVC +CSRrCl6zfN1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7Rf +ZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9vUJSZ +SWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTuIYEZoDJJKPTEjlbV +UjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8 +W9ViH0Pd +-----END CERTIFICATE----- + +RSA Root Certificate 1 +====================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw +MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td +3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H +BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs +3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF +V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r +on+jjBXu +-----END CERTIFICATE----- + Verisign Class 3 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- @@ -152,6 +302,33 @@ RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== -----END CERTIFICATE----- +Entrust.net Secure Server CA +============================ +-----BEGIN CERTIFICATE----- +MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV +BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg +cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl +ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv +cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIG +A1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBi +eSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1p +dGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQ +aO2f55M28Qpku0f1BBc/I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5 +gXpa0zf3wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OCAdcw +ggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHboIHYpIHVMIHSMQsw +CQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5l +dC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF +bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu +dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw +NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow +HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA +BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN +Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9 +n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= +-----END CERTIFICATE----- + Entrust.net Premium 2048 Secure Server CA ========================================= -----BEGIN CERTIFICATE----- @@ -197,6 +374,40 @@ Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp -----END CERTIFICATE----- +Equifax Secure Global eBusiness CA +================================== +-----BEGIN CERTIFICATE----- +MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp +bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx +HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds +b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV +PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN +qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn +hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j +BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs +MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN +I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY +NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 1 +============================= +-----BEGIN CERTIFICATE----- +MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB +LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE +ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz +IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ +1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a +IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk +MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW +Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF +AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5 +lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+ +KpYrtWKmpj29f5JZzVoqgrI3eQ== +-----END CERTIFICATE----- + AddTrust Low-Value Services Root ================================ -----BEGIN CERTIFICATE----- @@ -442,6 +653,60 @@ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -----END CERTIFICATE----- + +America Online Root Certification Authority 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG +v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z +DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh +sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP +8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z +o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf +GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF +VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft +3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g +Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds +sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 +-----END CERTIFICATE----- + +America Online Root Certification Authority 2 +============================================= +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC206B89en +fHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFciKtZHgVdEglZTvYYUAQv8 +f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2JxhP7JsowtS013wMPgwr38oE18aO6lhO +qKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JN +RvCAOVIyD+OEsnpD8l7eXz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0 +gBe4lL8BPeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67Xnfn +6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEqZ8A9W6Wa6897Gqid +FEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZo2C7HK2JNDJiuEMhBnIMoVxtRsX6 +Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnj +B453cMor9H124HhnAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3Op +aaEg5+31IqEjFNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmnxPBUlgtk87FY +T15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2LHo1YGwRgJfMqZJS5ivmae2p ++DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzcccobGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXg +JXUjhx5c3LqdsKyzadsXg8n33gy8CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//Zoy +zH1kUQ7rVyZ2OuMeIjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgO +ZtMADjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2FAjgQ5ANh +1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUXOm/9riW99XJZZLF0Kjhf +GEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPbAZO1XB4Y3WRayhgoPmMEEf0cjQAPuDff +Z4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQlZvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuP +cX/9XhmgD0uRuMRUvAawRY8mkaKO/qk= +-----END CERTIFICATE----- + Visa eCommerce Root =================== -----BEGIN CERTIFICATE----- @@ -858,6 +1123,65 @@ KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM 8CgHrTwXZoi1/baI -----END CERTIFICATE----- + +NetLock Business (Class B) Root +=============================== +-----BEGIN CERTIFICATE----- +MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg +VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD +VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv +bnNhZ2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5ldExvY2sg +VXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB +iQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xKgZjupNTKihe5In+DCnVMm8Bp2GQ5o+2S +o/1bXHQawEfKOml2mrriRBf8TKPV/riXiK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr +1nGTLbO/CVRY7QbrqHvcQ7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV +HQ8BAf8EBAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZ +RUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRh +dGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQuIEEgaGl0 +ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRv +c2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUg +YXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh +c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBz +Oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA +bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl +IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2 +YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj +cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM +43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR +stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI +-----END CERTIFICATE----- + +NetLock Express (Class C) Root +============================== +-----BEGIN CERTIFICATE----- +MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD +KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ +BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 +dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j +ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNAOoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3Z +W3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63 +euyucYT2BDMIJTLrdKwWRMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQw +DgYDVR0PAQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEWggJN +RklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0YWxhbm9zIFN6b2xn +YWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBB +IGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBOZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1i +aXp0b3NpdGFzYSB2ZWRpLiBBIGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0 +ZWxlIGF6IGVsb2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs +ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25sYXBqYW4gYSBo +dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kga2VyaGV0byBheiBlbGxlbm9y +emVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4gSU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5k +IHRoZSB1c2Ugb2YgdGhpcyBjZXJ0aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQ +UyBhdmFpbGFibGUgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwg +YXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2 +xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW +gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== +-----END CERTIFICATE----- + XRamp Global CA Root ==================== -----BEGIN CERTIFICATE----- @@ -2232,6 +2556,22 @@ MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== -----END CERTIFICATE----- +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky +CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX +bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/ +D/xwzoiQ +-----END CERTIFICATE----- + Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- diff --git a/wp-includes/class-IXR.php b/wp-includes/class-IXR.php index cbb65e59..2fee046d 100644 --- a/wp-includes/class-IXR.php +++ b/wp-includes/class-IXR.php @@ -201,7 +201,6 @@ class IXR_Message var $_value; var $_currentTag; var $_currentTagContents; - var $_valueHasType = false; // The XML parser var $_parser; @@ -325,8 +324,6 @@ class IXR_Message $this->_arraystructstypes[] = 'struct'; $this->_arraystructs[] = array(); break; - case 'value': - $this->_valueHasType = false; } } @@ -358,8 +355,8 @@ class IXR_Message break; case 'value': // "If no type is indicated, the type is string." - if ( !$this->_valueHasType ) { - $value = trim( $this->_currentTagContents ); + if (trim($this->_currentTagContents) != '') { + $value = (string)$this->_currentTagContents; $valueFlag = true; } break; @@ -390,8 +387,6 @@ class IXR_Message } if ($valueFlag) { - $this->_valueHasType = true; - if (count($this->_arraystructs) > 0) { // Add value to struct or array if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index e7f72c91..b60a4f47 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -60,8 +60,6 @@ class WP_oEmbed { '#https?://(www\.)?soundcloud\.com/.*#i' => array( 'http://soundcloud.com/oembed', true ), '#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ), '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i' => array( 'https://api.instagram.com/oembed', true ), - '#https?://(www\.)?rdio\.com/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ), - '#https?://rd\.io/x/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ), '#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ), '#https?://(.+\.)?imgur\.com/.*#i' => array( 'http://api.imgur.com/oembed', true ), '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'http://api.meetup.com/oembed', true ), @@ -124,8 +122,6 @@ class WP_oEmbed { * | SoundCloud | soundcloud.com | Yes | 3.5.0 | * | Dailymotion | dai.ly | No | 3.6.0 | * | Flickr | flic.kr | Yes | 3.6.0 | - * | Rdio | rdio.com | Yes | 3.6.0 | - * | Rdio | rd.io | Yes | 3.6.0 | * | Spotify | spotify.com | Yes | 3.6.0 | * | Imgur | imgur.com | Yes | 3.9.0 | * | Meetup.com | meetup.com | Yes | 3.9.0 | @@ -156,6 +152,8 @@ class WP_oEmbed { * | Viddler | viddler.com | Yes | 2.9.0 | 4.0.0 | * | Revision3 | revision3.com | No | 2.9.0 | 4.2.0 | * | Blip | blip.tv | No | 2.9.0 | 4.4.0 | + * | Rdio | rdio.com | Yes | 3.6.0 | 4.4.1 | + * | Rdio | rd.io | Yes | 3.6.0 | 4.4.1 | * * @see wp_oembed_add_provider() * diff --git a/wp-includes/class-phpmailer.php b/wp-includes/class-phpmailer.php index 338965ff..b28c4ef2 100644 --- a/wp-includes/class-phpmailer.php +++ b/wp-includes/class-phpmailer.php @@ -29,65 +29,66 @@ class PHPMailer { /** * The PHPMailer Version number. - * @type string + * @var string */ - public $Version = '5.2.10'; + public $Version = '5.2.14'; /** * Email priority. - * Options: 1 = High, 3 = Normal, 5 = low. - * @type integer + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * @var integer */ - public $Priority = 3; + public $Priority = null; /** * The character set of the message. - * @type string + * @var string */ public $CharSet = 'iso-8859-1'; /** * The MIME Content-type of the message. - * @type string + * @var string */ public $ContentType = 'text/plain'; /** * The message encoding. * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". - * @type string + * @var string */ public $Encoding = '8bit'; /** * Holds the most recent mailer error message. - * @type string + * @var string */ public $ErrorInfo = ''; /** * The From email address for the message. - * @type string + * @var string */ public $From = 'root@localhost'; /** * The From name of the message. - * @type string + * @var string */ public $FromName = 'Root User'; /** * The Sender email (Return-Path) of the message. * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. - * @type string + * @var string */ public $Sender = ''; /** * The Return-Path of the message. * If empty, it will be set to either From or Sender. - * @type string + * @var string * @deprecated Email senders should never set a return-path header; * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference @@ -96,14 +97,14 @@ class PHPMailer /** * The Subject of the message. - * @type string + * @var string */ public $Subject = ''; /** * An HTML or plain text message body. * If HTML then call isHTML(true). - * @type string + * @var string */ public $Body = ''; @@ -112,7 +113,7 @@ class PHPMailer * This body can be read by mail clients that do not have HTML email * capability such as mutt & Eudora. * Clients that can read HTML will view the normal Body. - * @type string + * @var string */ public $AltBody = ''; @@ -122,27 +123,27 @@ class PHPMailer * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ * @link http://kigkonsult.se/iCalcreator/ - * @type string + * @var string */ public $Ical = ''; /** * The complete compiled MIME message body. * @access protected - * @type string + * @var string */ protected $MIMEBody = ''; /** * The complete compiled MIME message headers. - * @type string + * @var string * @access protected */ protected $MIMEHeader = ''; /** * Extra headers that createHeader() doesn't fold in. - * @type string + * @var string * @access protected */ protected $mailHeader = ''; @@ -150,64 +151,64 @@ class PHPMailer /** * Word-wrap the message body to this number of chars. * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. - * @type integer + * @var integer */ public $WordWrap = 0; /** * Which method to use to send mail. * Options: "mail", "sendmail", or "smtp". - * @type string + * @var string */ public $Mailer = 'mail'; /** * The path to the sendmail program. - * @type string + * @var string */ public $Sendmail = '/usr/sbin/sendmail'; /** * Whether mail() uses a fully sendmail-compatible MTA. * One which supports sendmail's "-oi -f" options. - * @type boolean + * @var boolean */ public $UseSendmailOptions = true; /** * Path to PHPMailer plugins. * Useful if the SMTP class is not in the PHP include path. - * @type string + * @var string * @deprecated Should not be needed now there is an autoloader. */ public $PluginDir = ''; /** - * The email address that a reading confirmation should be sent to. - * @type string + * The email address that a reading confirmation should be sent to, also known as read receipt. + * @var string */ public $ConfirmReadingTo = ''; /** - * The hostname to use in Message-Id and Received headers - * and as default HELO string. - * If empty, the value returned - * by SERVER_NAME is used or 'localhost.localdomain'. - * @type string + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * @var string */ public $Hostname = ''; /** - * An ID to be used in the Message-Id header. + * An ID to be used in the Message-ID header. * If empty, a unique id will be generated. - * @type string + * @var string */ public $MessageID = ''; /** * The message Date to be used in the Date header. * If empty, the current date will be added. - * @type string + * @var string */ public $MessageDate = ''; @@ -220,21 +221,22 @@ class PHPMailer * You can also specify encryption type, for example: * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). * Hosts will be tried in order. - * @type string + * @var string */ public $Host = 'localhost'; /** * The default SMTP server port. - * @type integer + * @var integer * @TODO Why is this needed when the SMTP class takes care of it? */ public $Port = 25; /** * The SMTP HELO of the message. - * Default is $Hostname. - * @type string + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * @var string * @see PHPMailer::$Hostname */ public $Helo = ''; @@ -242,7 +244,7 @@ class PHPMailer /** * What kind of encryption to use on the SMTP connection. * Options: '', 'ssl' or 'tls' - * @type string + * @var string */ public $SMTPSecure = ''; @@ -250,14 +252,14 @@ class PHPMailer * Whether to enable TLS encryption automatically if a server supports it, * even if `SMTPSecure` is not set to 'tls'. * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. - * @type boolean + * @var boolean */ public $SMTPAutoTLS = true; /** * Whether to use SMTP authentication. * Uses the Username and Password properties. - * @type boolean + * @var boolean * @see PHPMailer::$Username * @see PHPMailer::$Password */ @@ -265,47 +267,47 @@ class PHPMailer /** * Options array passed to stream_context_create when connecting via SMTP. - * @type array + * @var array */ public $SMTPOptions = array(); /** * SMTP username. - * @type string + * @var string */ public $Username = ''; /** * SMTP password. - * @type string + * @var string */ public $Password = ''; /** * SMTP auth type. * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5 - * @type string + * @var string */ public $AuthType = ''; /** * SMTP realm. * Used for NTLM auth - * @type string + * @var string */ public $Realm = ''; /** * SMTP workstation. * Used for NTLM auth - * @type string + * @var string */ public $Workstation = ''; /** * The SMTP server timeout in seconds. * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @type integer + * @var integer */ public $Timeout = 300; @@ -318,7 +320,7 @@ class PHPMailer * * `2` Data and commands * * `3` As 2 plus connection status * * `4` Low-level data output - * @type integer + * @var integer * @see SMTP::$do_debug */ public $SMTPDebug = 0; @@ -334,7 +336,7 @@ class PHPMailer * * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; * - * @type string|callable + * @var string|callable * @see SMTP::$Debugoutput */ public $Debugoutput = 'echo'; @@ -343,20 +345,20 @@ class PHPMailer * Whether to keep SMTP connection open after each message. * If this is set to true then to close the connection * requires an explicit call to smtpClose(). - * @type boolean + * @var boolean */ public $SMTPKeepAlive = false; /** * Whether to split multiple to addresses into multiple messages * or send them all in one message. - * @type boolean + * @var boolean */ public $SingleTo = false; /** * Storage for addresses when SingleTo is enabled. - * @type array + * @var array * @TODO This should really not be public */ public $SingleToArray = array(); @@ -364,15 +366,15 @@ class PHPMailer /** * Whether to generate VERP addresses on send. * Only applicable when sending via SMTP. - * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path * @link http://www.postfix.org/VERP_README.html Postfix VERP info - * @type boolean + * @var boolean */ public $do_verp = false; /** * Whether to allow sending messages with an empty body. - * @type boolean + * @var boolean */ public $AllowEmpty = false; @@ -380,40 +382,40 @@ class PHPMailer * The default line ending. * @note The default remains "\n". We force CRLF where we know * it must be used via self::CRLF. - * @type string + * @var string */ public $LE = "\n"; /** * DKIM selector. - * @type string + * @var string */ public $DKIM_selector = ''; /** * DKIM Identity. * Usually the email address used as the source of the email - * @type string + * @var string */ public $DKIM_identity = ''; /** * DKIM passphrase. * Used if your key is encrypted. - * @type string + * @var string */ public $DKIM_passphrase = ''; /** * DKIM signing domain name. * @example 'example.com' - * @type string + * @var string */ public $DKIM_domain = ''; /** * DKIM private key file path. - * @type string + * @var string */ public $DKIM_private = ''; @@ -433,48 +435,48 @@ class PHPMailer * string $subject the subject * string $body the email body * string $from email address of sender - * @type string + * @var string */ public $action_function = ''; /** * What to put in the X-Mailer header. * Options: An empty string for PHPMailer default, whitespace for none, or a string to use - * @type string + * @var string */ public $XMailer = ''; /** * An instance of the SMTP sender class. - * @type SMTP + * @var SMTP * @access protected */ protected $smtp = null; /** - * The array of 'to' addresses. - * @type array + * The array of 'to' names and addresses. + * @var array * @access protected */ protected $to = array(); /** - * The array of 'cc' addresses. - * @type array + * The array of 'cc' names and addresses. + * @var array * @access protected */ protected $cc = array(); /** - * The array of 'bcc' addresses. - * @type array + * The array of 'bcc' names and addresses. + * @var array * @access protected */ protected $bcc = array(); /** * The array of reply-to names and addresses. - * @type array + * @var array * @access protected */ protected $ReplyTo = array(); @@ -482,77 +484,100 @@ class PHPMailer /** * An array of all kinds of addresses. * Includes all of $to, $cc, $bcc - * @type array + * @var array * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc */ protected $all_recipients = array(); + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + */ + protected $RecipientsQueue = array(); + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$ReplyTo + */ + protected $ReplyToQueue = array(); + /** * The array of attachments. - * @type array + * @var array * @access protected */ protected $attachment = array(); /** * The array of custom headers. - * @type array + * @var array * @access protected */ protected $CustomHeader = array(); /** * The most recent Message-ID (including angular brackets). - * @type string + * @var string * @access protected */ protected $lastMessageID = ''; /** * The message's MIME type. - * @type string + * @var string * @access protected */ protected $message_type = ''; /** * The array of MIME boundary strings. - * @type array + * @var array * @access protected */ protected $boundary = array(); /** * The array of available languages. - * @type array + * @var array * @access protected */ protected $language = array(); /** * The number of errors encountered. - * @type integer + * @var integer * @access protected */ protected $error_count = 0; /** * The S/MIME certificate file path. - * @type string + * @var string * @access protected */ protected $sign_cert_file = ''; /** * The S/MIME key file path. - * @type string + * @var string * @access protected */ protected $sign_key_file = ''; /** * The optional S/MIME extra certificates ("CA Chain") file path. - * @type string + * @var string * @access protected */ protected $sign_extracerts_file = ''; @@ -560,21 +585,21 @@ class PHPMailer /** * The S/MIME password for the key. * Used only if the key is encrypted. - * @type string + * @var string * @access protected */ protected $sign_key_pass = ''; /** * Whether to throw exceptions for errors. - * @type boolean + * @var boolean * @access protected */ protected $exceptions = false; /** * Unique ID used for message ID and boundaries. - * @type string + * @var string * @access protected */ protected $uniqueid = ''; @@ -601,7 +626,7 @@ class PHPMailer /** * The maximum line length allowed by RFC 2822 section 2.1.1 - * @type integer + * @var integer */ const MAX_LINE_LENGTH = 998; @@ -763,55 +788,101 @@ class PHPMailer /** * Add a "To" address. - * @param string $address + * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used + * @return boolean true on success, false if address already used or invalid in some way */ public function addAddress($address, $name = '') { - return $this->addAnAddress('to', $address, $name); + return $this->addOrEnqueueAnAddress('to', $address, $name); } /** * Add a "CC" address. * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address + * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used + * @return boolean true on success, false if address already used or invalid in some way */ public function addCC($address, $name = '') { - return $this->addAnAddress('cc', $address, $name); + return $this->addOrEnqueueAnAddress('cc', $address, $name); } /** * Add a "BCC" address. * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address + * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used + * @return boolean true on success, false if address already used or invalid in some way */ public function addBCC($address, $name = '') { - return $this->addAnAddress('bcc', $address, $name); + return $this->addOrEnqueueAnAddress('bcc', $address, $name); } /** - * Add a "Reply-to" address. - * @param string $address + * Add a "Reply-To" address. + * @param string $address The email address to reply to * @param string $name - * @return boolean + * @return boolean true on success, false if address already used or invalid in some way */ public function addReplyTo($address, $name = '') { - return $this->addAnAddress('Reply-To', $address, $name); + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); } /** - * Add an address to one of the recipient arrays. - * Addresses that have been added already return false, but do not throw exceptions - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' - * @param string $address The email address to send to + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @throws phpmailerException + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (($pos = strrpos($address, '@')) === false) { + // At-sign is misssing. + $error_message = $this->lang('invalid_address') . $address; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + $params = array($kind, $address, $name); + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { + if ($kind != 'Reply-To') { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + return true; + } + } else { + if (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + return true; + } + } + return false; + } + // Immediately add standard addresses without IDN. + return call_user_func_array(array($this, 'addAnAddress'), $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to * @param string $name * @throws phpmailerException * @return boolean true on success, false if address already used or invalid in some way @@ -819,26 +890,26 @@ class PHPMailer */ protected function addAnAddress($kind, $address, $name = '') { - if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) { - $this->setError($this->lang('Invalid recipient array') . ': ' . $kind); - $this->edebug($this->lang('Invalid recipient array') . ': ' . $kind); + if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { + $error_message = $this->lang('Invalid recipient kind: ') . $kind; + $this->setError($error_message); + $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException('Invalid recipient array: ' . $kind); + throw new phpmailerException($error_message); } return false; } - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim if (!$this->validateAddress($address)) { - $this->setError($this->lang('invalid_address') . ': ' . $address); - $this->edebug($this->lang('invalid_address') . ': ' . $address); + $error_message = $this->lang('invalid_address') . $address; + $this->setError($error_message); + $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); + throw new phpmailerException($error_message); } return false; } if ($kind != 'Reply-To') { - if (!isset($this->all_recipients[strtolower($address)])) { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { array_push($this->$kind, array($address, $name)); $this->all_recipients[strtolower($address)] = true; return true; @@ -864,11 +935,15 @@ class PHPMailer { $address = trim($address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!$this->validateAddress($address)) { - $this->setError($this->lang('invalid_address') . ': ' . $address); - $this->edebug($this->lang('invalid_address') . ': ' . $address); + // Don't validate now addresses with IDN. Will be done in send(). + if (($pos = strrpos($address, '@')) === false or + (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and + !$this->validateAddress($address)) { + $error_message = $this->lang('invalid_address') . $address; + $this->setError($error_message); + $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); + throw new phpmailerException($error_message); } return false; } @@ -898,10 +973,10 @@ class PHPMailer * Check that a string looks like an email address. * @param string $address The email address to check * @param string $patternselect A selector for the validation pattern to use : - * * `auto` Pick strictest one automatically; + * * `auto` Pick best pattern automatically; * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; * * `pcre` Use old PCRE implementation; - * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; same as pcre8 but does not allow 'dotless' domains; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. * * `noregex` Don't use a regex: super fast, really dumb. * @return boolean @@ -910,6 +985,10 @@ class PHPMailer */ public static function validateAddress($address, $patternselect = 'auto') { + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { + return false; + } if (!$patternselect or $patternselect == 'auto') { //Check this constant first so it works when extension_loaded() is disabled by safe mode //Constant was added in PHP 5.2.4 @@ -989,6 +1068,48 @@ class PHPMailer } } + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * "intl" and "mbstring" PHP extensions. + * @return bool "true" if required functions for IDN support are present + */ + public function idnSupported() + { + // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. + return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain has characters not allowed in an IDN) + * @see PHPMailer::$CharSet + * @param string $address The email address to convert + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + if ($this->idnSupported() and + !empty($this->CharSet) and + ($pos = strrpos($address, '@')) !== false) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? + idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : + idn_to_ascii($domain)) !== false) { + return substr($address, 0, $pos) . $punycode; + } + } + } + return $address; + } + /** * Create a message and send it. * Uses the sending method specified by $Mailer. @@ -1020,17 +1141,41 @@ class PHPMailer public function preSend() { try { + $this->error_count = 0; // Reset errors $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array(array($this, 'addAnAddress'), $params); + } if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); } + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!$this->validateAddress($this->$address_kind)) { + $error_message = $this->lang('invalid_address') . $this->$address_kind; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + } + // Set whether the message is multipart/alternative if (!empty($this->AltBody)) { $this->ContentType = 'multipart/alternative'; } - $this->error_count = 0; // Reset errors $this->setMessageType(); // Refuse to send an empty message unless we are specifically allowing it if (!$this->AllowEmpty and empty($this->Body)) { @@ -1171,7 +1316,15 @@ class PHPMailer fputs($mail, $header); fputs($mail, $body); $result = pclose($mail); - $this->doCallback(($result == 0), $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + $this->doCallback( + ($result == 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From + ); if ($result != 0) { throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } @@ -1458,7 +1611,7 @@ class PHPMailer 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', - 'invalid_address' => 'Invalid address', + 'invalid_address' => 'Invalid address: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', @@ -1723,7 +1876,6 @@ class PHPMailer } $result .= $this->headerLine('Date', $this->MessageDate); - // To be created automatically by mail() if ($this->SingleTo) { if ($this->Mailer != 'mail') { @@ -1769,14 +1921,16 @@ class PHPMailer if ($this->MessageID != '') { $this->lastMessageID = $this->MessageID; } else { - $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->ServerHostname()); + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); } $result .= $this->headerLine('Message-ID', $this->lastMessageID); - $result .= $this->headerLine('X-Priority', $this->Priority); + if (!is_null($this->Priority)) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } if ($this->XMailer == '') { $result .= $this->headerLine( 'X-Mailer', - 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer/)' + 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' ); } else { $myXmailer = trim($this->XMailer); @@ -1786,7 +1940,7 @@ class PHPMailer } if ($this->ConfirmReadingTo != '') { - $result .= $this->headerLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); } // Add custom headers @@ -2266,18 +2420,27 @@ class PHPMailer $type = $attachment[4]; $disposition = $attachment[6]; $cid = $attachment[7]; - if ($disposition == 'inline' && isset($cidUniq[$cid])) { + if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { continue; } $cidUniq[$cid] = true; $mime[] = sprintf('--%s%s', $boundary, $this->LE); - $mime[] = sprintf( - 'Content-Type: %s; name="%s"%s', - $type, - $this->encodeHeader($this->secureHeader($name)), - $this->LE - ); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name="%s"%s', + $type, + $this->encodeHeader($this->secureHeader($name)), + $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + $this->LE + ); + } // RFC1341 part 5 says 7bit is assumed if not specified if ($encoding != '7bit') { $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); @@ -2301,12 +2464,20 @@ class PHPMailer $this->LE . $this->LE ); } else { - $mime[] = sprintf( - 'Content-Disposition: %s; filename=%s%s', - $disposition, - $encoded_name, - $this->LE . $this->LE - ); + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + $encoded_name, + $this->LE . $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + $this->LE . $this->LE + ); + } } } else { $mime[] = $this->LE; @@ -2340,7 +2511,6 @@ class PHPMailer * @param string $path The full path to the file * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' * @throws phpmailerException - * @see EncodeFile(encodeFile * @access protected * @return string */ @@ -2560,7 +2730,7 @@ class PHPMailer { // Use native function if it's available (>= PHP5.3) if (function_exists('quoted_printable_encode')) { - return $this->fixEOL(quoted_printable_encode($string)); + return quoted_printable_encode($string); } // Fall back to a pure PHP implementation $string = str_replace( @@ -2568,8 +2738,7 @@ class PHPMailer array(' ', "\r\n=2E", "\r\n", '='), rawurlencode($string) ); - $string = preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); - return $this->fixEOL($string); + return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); } /** @@ -2638,7 +2807,6 @@ class PHPMailer return str_replace(' ', '_', $encoded); } - /** * Add a string or binary attachment (non-filesystem). * This method can be used to attach ascii or binary data, @@ -2744,7 +2912,7 @@ class PHPMailer $disposition = 'inline' ) { // If a MIME type is not specified, try to work it out from the name - if ($type == '') { + if ($type == '' and !empty($name)) { $type = self::filenameToType($name); } @@ -2800,6 +2968,22 @@ class PHPMailer return !empty($this->AltBody); } + /** + * Clear queued addresses of given kind. + * @access protected + * @param string $kind 'to', 'cc', or 'bcc' + * @return void + */ + public function clearQueuedAddresses($kind) + { + $RecipientsQueue = $this->RecipientsQueue; + foreach ($RecipientsQueue as $address => $params) { + if ($params[0] == $kind) { + unset($this->RecipientsQueue[$address]); + } + } + } + /** * Clear all To recipients. * @return void @@ -2810,6 +2994,7 @@ class PHPMailer unset($this->all_recipients[strtolower($to[0])]); } $this->to = array(); + $this->clearQueuedAddresses('to'); } /** @@ -2822,6 +3007,7 @@ class PHPMailer unset($this->all_recipients[strtolower($cc[0])]); } $this->cc = array(); + $this->clearQueuedAddresses('cc'); } /** @@ -2834,6 +3020,7 @@ class PHPMailer unset($this->all_recipients[strtolower($bcc[0])]); } $this->bcc = array(); + $this->clearQueuedAddresses('bcc'); } /** @@ -2843,6 +3030,7 @@ class PHPMailer public function clearReplyTos() { $this->ReplyTo = array(); + $this->ReplyToQueue = array(); } /** @@ -2855,6 +3043,7 @@ class PHPMailer $this->cc = array(); $this->bcc = array(); $this->all_recipients = array(); + $this->RecipientsQueue = array(); } /** @@ -3011,8 +3200,7 @@ class PHPMailer } /** - * Returns all custom headers - * + * Returns all custom headers. * @return array */ public function getCustomHeaders() @@ -3029,13 +3217,13 @@ class PHPMailer * @param string $message HTML message string * @param string $basedir baseline directory for path * @param boolean|callable $advanced Whether to use the internal HTML to text converter - * or your own custom converter @see html2text() + * or your own custom converter @see PHPMailer::html2text() * @return string $message */ public function msgHTML($message, $basedir = '', $advanced = false) { preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); - if (isset($images[2])) { + if (array_key_exists(2, $images)) { foreach ($images[2] as $imgindex => $url) { // Convert data URIs into embedded images if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { @@ -3046,15 +3234,16 @@ class PHPMailer $data = rawurldecode($data); } $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if ($this->addStringEmbeddedImage($data, $cid, '', 'base64', $match[1])) { + if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { $message = str_replace( $images[0][$imgindex], $images[1][$imgindex] . '="cid:' . $cid . '"', $message ); } - } elseif (!preg_match('#^[A-z]+://#', $url)) { + } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) { // Do not change urls for absolute images (thanks to corvuscorax) + // Do not change urls that are already inline images $filename = basename($url); $directory = dirname($url); if ($directory == '.') { @@ -3144,6 +3333,16 @@ class PHPMailer 'bin' => 'application/macbinary', 'doc' => 'application/msword', 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'class' => 'application/octet-stream', 'dll' => 'application/octet-stream', 'dms' => 'application/octet-stream', @@ -3348,7 +3547,6 @@ class PHPMailer return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); } - /** * Set the public and private key files and password for S/MIME signing. * @access public @@ -3517,7 +3715,10 @@ class PHPMailer "\tbh=" . $DKIMb64 . ";\r\n" . "\tb="; $toSign = $this->DKIM_HeaderC( - $from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs + $from_header . "\r\n" . + $to_header . "\r\n" . + $subject_header . "\r\n" . + $dkimhdrs ); $signed = $this->DKIM_Sign($toSign); return $dkimhdrs . $signed . "\r\n"; @@ -3537,6 +3738,7 @@ class PHPMailer /** * Allows for public read access to 'to' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. * @access public * @return array */ @@ -3547,6 +3749,7 @@ class PHPMailer /** * Allows for public read access to 'cc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. * @access public * @return array */ @@ -3557,6 +3760,7 @@ class PHPMailer /** * Allows for public read access to 'bcc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. * @access public * @return array */ @@ -3567,6 +3771,7 @@ class PHPMailer /** * Allows for public read access to 'ReplyTo' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. * @access public * @return array */ @@ -3577,6 +3782,7 @@ class PHPMailer /** * Allows for public read access to 'all_recipients' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. * @access public * @return array */ diff --git a/wp-includes/class-smtp.php b/wp-includes/class-smtp.php index 1eae77a1..f17ca0fd 100644 --- a/wp-includes/class-smtp.php +++ b/wp-includes/class-smtp.php @@ -28,25 +28,25 @@ class SMTP { /** * The PHPMailer SMTP version number. - * @type string + * @var string */ - const VERSION = '5.2.10'; + const VERSION = '5.2.14'; /** * SMTP line break constant. - * @type string + * @var string */ const CRLF = "\r\n"; /** * The SMTP port to use if one is not specified. - * @type integer + * @var integer */ const DEFAULT_SMTP_PORT = 25; /** * The maximum line length allowed by RFC 2822 section 2.1.1 - * @type integer + * @var integer */ const MAX_LINE_LENGTH = 998; @@ -77,15 +77,15 @@ class SMTP /** * The PHPMailer SMTP Version number. - * @type string + * @var string * @deprecated Use the `VERSION` constant instead * @see SMTP::VERSION */ - public $Version = '5.2.10'; + public $Version = '5.2.14'; /** * SMTP server port number. - * @type integer + * @var integer * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead * @see SMTP::DEFAULT_SMTP_PORT */ @@ -93,7 +93,7 @@ class SMTP /** * SMTP reply line ending. - * @type string + * @var string * @deprecated Use the `CRLF` constant instead * @see SMTP::CRLF */ @@ -107,7 +107,7 @@ class SMTP * * self::DEBUG_SERVER (`2`) Client commands and server responses * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages - * @type integer + * @var integer */ public $do_debug = self::DEBUG_OFF; @@ -122,7 +122,7 @@ class SMTP * * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; * - * @type string|callable + * @var string|callable */ public $Debugoutput = 'echo'; @@ -130,7 +130,7 @@ class SMTP * Whether to use VERP. * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path * @link http://www.postfix.org/VERP_README.html Info on VERP - * @type boolean + * @var boolean */ public $do_verp = false; @@ -139,26 +139,26 @@ class SMTP * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 - * @type integer + * @var integer */ public $Timeout = 300; /** * How long to wait for commands to complete, in seconds. * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @type integer + * @var integer */ public $Timelimit = 300; /** * The socket for the server connection. - * @type resource + * @var resource */ protected $smtp_conn; /** * Error information, if any, for the last SMTP command. - * @type array + * @var array */ protected $error = array( 'error' => '', @@ -170,7 +170,7 @@ class SMTP /** * The reply the server sent to us for HELO. * If null, no HELO string has yet been received. - * @type string|null + * @var string|null */ protected $helo_rply = null; @@ -181,13 +181,13 @@ class SMTP * represents the server name. In case of HELO it is the only element of the array. * Other values can be boolean TRUE or an array containing extension options. * If null, no HELO/EHLO string has yet been received. - * @type array|null + * @var array|null */ protected $server_caps = null; /** * The most recent reply received from the server. - * @type string + * @var string */ protected $last_reply = ''; @@ -351,20 +351,21 @@ class SMTP * Perform SMTP authentication. * Must be run after hello(). * @see hello() - * @param string $username The user name - * @param string $password The password - * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5) - * @param string $realm The auth realm for NTLM + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) + * @param string $realm The auth realm for NTLM * @param string $workstation The auth workstation for NTLM - * @access public - * @return boolean True if successfully authenticated. + * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) + * @return bool True if successfully authenticated.* @access public */ public function authenticate( $username, $password, $authtype = null, $realm = '', - $workstation = '' + $workstation = '', + $OAuth = null ) { if (!$this->server_caps) { $this->setError('Authentication is not allowed before HELO/EHLO'); @@ -673,9 +674,11 @@ class SMTP { $this->server_caps = array(); $lines = explode("\n", $this->last_reply); + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space $s = trim(substr($s, 4)); - if (!$s) { + if (empty($s)) { continue; } $fields = explode(' ', $s); @@ -685,11 +688,20 @@ class SMTP $fields = $fields[0]; } else { $name = array_shift($fields); - if ($name == 'SIZE') { - $fields = ($fields) ? $fields[0] : 0; + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = array(); + } + break; + default: + $fields = true; } } - $this->server_caps[$name] = ($fields ? $fields : true); + $this->server_caps[$name] = $fields; } } } @@ -739,15 +751,15 @@ class SMTP * Sets the TO argument to $toaddr. * Returns true if the recipient was accepted false if it was rejected. * Implements from rfc 821: RCPT TO: - * @param string $toaddr The address the message is being sent to + * @param string $address The address the message is being sent to * @access public * @return boolean */ - public function recipient($toaddr) + public function recipient($address) { return $this->sendCommand( 'RCPT TO', - 'RCPT TO:<' . $toaddr . '>', + 'RCPT TO:<' . $address . '>', array(250, 251) ); } @@ -766,9 +778,9 @@ class SMTP /** * Send a command to an SMTP server and check its return code. - * @param string $command The command name - not sent to the server + * @param string $command The command name - not sent to the server * @param string $commandstring The actual command to send - * @param integer|array $expect One or more expected integer success codes + * @param integer|array $expect One or more expected integer success codes * @access protected * @return boolean True on success. */ @@ -778,6 +790,11 @@ class SMTP $this->setError("Called $command without being connected"); return false; } + //Reject line breaks in all commands + if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { + $this->setError("Command '$command' contained line breaks"); + return false; + } $this->client_send($commandstring . self::CRLF); $this->last_reply = $this->get_lines(); @@ -981,10 +998,9 @@ class SMTP } while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { $str = @fgets($this->smtp_conn, 515); - $this->edebug("SMTP -> get_lines(): \$data was \"$data\"", self::DEBUG_LOWLEVEL); - $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); - $data .= $str; $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); + $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); + $data .= $str; // If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen if ((isset($str[3]) and $str[3] == ' ')) { break; diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 2128df23..cf497f13 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -240,7 +240,7 @@ final class WP_Theme implements ArrayAccess { } elseif ( ! file_exists( $this->theme_root . '/' . $theme_file ) ) { $this->headers['Name'] = $this->stylesheet; if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet ) ) - $this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), $this->stylesheet ) ); + $this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), esc_html( $this->stylesheet ) ) ); else $this->errors = new WP_Error( 'theme_no_stylesheet', __( 'Stylesheet is missing.' ) ); $this->template = $this->stylesheet; @@ -287,7 +287,7 @@ final class WP_Theme implements ArrayAccess { $theme_root_template = $directories[ $this->template ]['theme_root']; } else { // Parent theme is missing. - $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), $this->template ) ); + $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), esc_html( $this->template ) ) ); $this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) ); $this->parent = new WP_Theme( $this->template, $this->theme_root, $this ); return; @@ -299,11 +299,11 @@ final class WP_Theme implements ArrayAccess { // If we are a parent, then there is a problem. Only two generations allowed! Cancel things out. if ( $_child instanceof WP_Theme && $_child->template == $this->stylesheet ) { $_child->parent = null; - $_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $_child->template ) ); + $_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $_child->template ) ) ); $_child->cache_add( 'theme', array( 'headers' => $_child->headers, 'errors' => $_child->errors, 'stylesheet' => $_child->stylesheet, 'template' => $_child->template ) ); // The two themes actually reference each other with the Template header. if ( $_child->stylesheet == $this->template ) { - $this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $this->template ) ); + $this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $this->template ) ) ); $this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) ); } return; diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php index e4890ae5..ee68a205 100644 --- a/wp-includes/class-wp-walker.php +++ b/wp-includes/class-wp-walker.php @@ -215,7 +215,7 @@ class Walker { $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e) { - if ( 0 == $e->$parent_field ) + if ( empty( $e->$parent_field ) ) $top_level_elements[] = $e; else $children_elements[ $e->$parent_field ][] = $e; diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 08897dc0..5be4dc9b 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -1349,8 +1349,8 @@ class wp_xmlrpc_server extends IXR_Server { } if ( ! empty( $dateCreated ) ) { - $post_data['post_date'] = iso8601_to_datetime( $dateCreated ); - $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); + $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) ); + $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' ); } if ( ! isset( $post_data['ID'] ) ) @@ -3423,8 +3423,8 @@ class wp_xmlrpc_server extends IXR_Server { if ( !empty( $content_struct['date_created_gmt'] ) ) { // We know this is supposed to be GMT, so we're going to slap that Z on there by force $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z'; - $comment_date = iso8601_to_datetime( $dateCreated ); - $comment_date_gmt = get_gmt_from_date( $comment_date ); + $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); } if ( isset($content_struct['content']) ) @@ -4991,8 +4991,8 @@ class wp_xmlrpc_server extends IXR_Server { $dateCreated = $content_struct['dateCreated']->getIso(); if ( !empty( $dateCreated ) ) { - $post_date = iso8601_to_datetime( $dateCreated ); - $post_date_gmt = get_gmt_from_date( $post_date ); + $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); } else { $post_date = ''; $post_date_gmt = ''; @@ -5345,8 +5345,8 @@ class wp_xmlrpc_server extends IXR_Server { $dateCreated = $content_struct['dateCreated']->getIso(); if ( !empty( $dateCreated ) ) { - $post_date = iso8601_to_datetime( $dateCreated ); - $post_date_gmt = get_gmt_from_date( $post_date, 'GMT' ); + $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); } else { $post_date = $postdata['post_date']; $post_date_gmt = $postdata['post_date_gmt']; diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 555167b1..3685305a 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -15,7 +15,7 @@ class WP { * @access public * @var array */ - public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'title', 'embed' ); + public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' ); /** * Private query variables. @@ -25,7 +25,7 @@ class WP { * @since 2.0.0 * @var array */ - public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in' ); + public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title' ); /** * Extra query variables set by the user. @@ -609,7 +609,12 @@ class WP { $success = true; if ( is_singular() ) { - $p = clone $wp_query->post; + $p = false; + + if ( $wp_query->post instanceof WP_Post ) { + $p = clone $wp_query->post; + } + // Only set X-Pingback for single posts that allow pings. if ( $p && pings_open( $p ) ) { @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url' ) ); diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index ada53c89..4ef67dd7 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -736,7 +736,7 @@ function get_comment_link( $comment = null, $args = array() ) { } } - if ( $cpage ) { + if ( $cpage && get_option( 'page_comments' ) ) { if ( $wp_rewrite->using_permalinks() ) { if ( $cpage ) { $link = trailingslashit( $link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage; @@ -1313,12 +1313,19 @@ function comments_template( $file = '/comments.php', $separate_comments = false } else { // If fetching the first page of 'newest', we need a top-level comment count. $top_level_query = new WP_Comment_Query(); - $top_level_count = $top_level_query->query( array( + $top_level_args = array( 'count' => true, 'orderby' => false, 'post_id' => $post->ID, 'parent' => 0, - ) ); + 'status' => 'approve', + ); + + if ( isset( $comment_args['include_unapproved'] ) ) { + $top_level_args['include_unapproved'] = $comment_args['include_unapproved']; + } + + $top_level_count = $top_level_query->query( $top_level_args ); $comment_args['offset'] = ( ceil( $top_level_count / $per_page ) - 1 ) * $per_page; } @@ -1330,11 +1337,16 @@ function comments_template( $file = '/comments.php', $separate_comments = false // Trees must be flattened before they're passed to the walker. $comments_flat = array(); foreach ( $_comments as $_comment ) { - $comments_flat = array_merge( $comments_flat, array( $_comment ), $_comment->get_children( array( + $comments_flat[] = $_comment; + $comment_children = $_comment->get_children( array( 'format' => 'flat', 'status' => $comment_args['status'], 'orderby' => $comment_args['orderby'] - ) ) ); + ) ); + + foreach ( $comment_children as $comment_child ) { + $comments_flat[] = $comment_child; + } } /** @@ -1913,6 +1925,27 @@ function wp_list_comments( $args = array(), $comments = null ) { */ $r = apply_filters( 'wp_list_comments_args', $r ); + /* + * If 'page' or 'per_page' has been passed, and does not match what's in $wp_query, + * perform a separate comment query and allow Walker_Comment to paginate. + */ + if ( is_singular() && ( $r['page'] || $r['per_page'] ) ) { + $current_cpage = get_query_var( 'cpage' ); + if ( ! $current_cpage ) { + $current_cpage = 'newest' === get_option( 'default_comments_page' ) ? 1 : $wp_query->max_num_comment_pages; + } + + $current_per_page = get_query_var( 'comments_per_page' ); + if ( $r['page'] != $current_cpage || $r['per_page'] != $current_per_page ) { + $comments = get_comments( array( + 'post_id' => get_queried_object_id(), + 'orderby' => 'comment_date_gmt', + 'order' => 'ASC', + 'status' => 'all', + ) ); + } + } + // Figure out what comments we'll be looping through ($_comments) if ( null !== $comments ) { $comments = (array) $comments; diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 5de95313..9586b8b7 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1805,7 +1805,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) { } // Only send notifications for approved comments. - if ( ! isset( $comment->comment_approved ) || 'spam' === $comment->comment_approved || ! $comment->comment_approved ) { + if ( ! isset( $comment->comment_approved ) || '1' != $comment->comment_approved ) { return false; } @@ -2750,7 +2750,7 @@ function wp_handle_comment_submission( $comment_data ) { $comment_author = $user->display_name; $comment_author_email = $user->user_email; $comment_author_url = $user->user_url; - $user_id = $user->ID; + $user_ID = $user->ID; if ( current_user_can( 'unfiltered_html' ) ) { if ( ! isset( $comment_data['_wp_unfiltered_html_comment'] ) || ! wp_verify_nonce( $comment_data['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID ) @@ -2787,7 +2787,7 @@ function wp_handle_comment_submission( $comment_data ) { 'comment_content', 'comment_type', 'comment_parent', - 'user_id' + 'user_ID' ); $comment_id = wp_new_comment( wp_slash( $commentdata ) ); diff --git a/wp-includes/customize/class-wp-customize-themes-section.php b/wp-includes/customize/class-wp-customize-themes-section.php index fb983a9c..9674b645 100644 --- a/wp-includes/customize/class-wp-customize-themes-section.php +++ b/wp-includes/customize/class-wp-customize-themes-section.php @@ -46,7 +46,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section { } ?> - controls ) > 1 ) : ?> + controls ) > 0 ) : ?> diff --git a/wp-includes/embed-template.php b/wp-includes/embed-template.php index df2518f9..fab8c842 100644 --- a/wp-includes/embed-template.php +++ b/wp-includes/embed-template.php @@ -50,7 +50,7 @@ if ( have_posts() ) : $image_size = 'full'; // Fallback. $meta = wp_get_attachment_metadata( $thumbnail_id ); - if ( is_array( $meta ) ) { + if ( ! empty( $meta['sizes'] ) ) { foreach ( $meta['sizes'] as $size => $data ) { if ( $data['width'] / $data['height'] > $aspect_ratio ) { $aspect_ratio = $data['width'] / $data['height']; diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 5e4cdc16..9fa1aa3d 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -345,7 +345,7 @@ function wp_oembed_register_route() { function wp_oembed_add_discovery_links() { $output = ''; - if ( is_singular() ) { + if ( is_singular() && ! is_front_page() ) { $output .= '' . "\n"; if ( class_exists( 'SimpleXMLElement' ) ) { diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ff4167d2..1f4a8638 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -216,7 +216,7 @@ function wptexturize( $text, $reset = false ) { // Look for shortcodes and HTML elements. - preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20]++)@', $text, $matches ); + preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches ); $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); $found_shortcodes = ! empty( $tagnames ); $shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : ''; @@ -233,6 +233,10 @@ function wptexturize( $text, $reset = false ) { continue; } else { // This is an HTML element delimiter. + + // Replace each & with & unless it already looks like an entity. + $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl ); + _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags ); } @@ -3892,14 +3896,20 @@ function sanitize_option( $option, $value ) { * @return The value with the callback applied to all non-arrays and non-objects inside it. */ function map_deep( $value, $callback ) { - if ( is_array( $value ) || is_object( $value ) ) { - foreach ( $value as &$item ) { - $item = map_deep( $item, $callback ); + if ( is_array( $value ) ) { + foreach ( $value as $index => $item ) { + $value[ $index ] = map_deep( $item, $callback ); + } + } elseif ( is_object( $value ) ) { + $object_vars = get_object_vars( $value ); + foreach ( $object_vars as $property_name => $property_value ) { + $value->$property_name = map_deep( $property_value, $callback ); } - return $value; } else { - return call_user_func( $callback, $value ); + $value = call_user_func( $callback, $value ); } + + return $value; } /** @@ -4571,7 +4581,7 @@ function print_emoji_detection_script() { ?> + .postbox .button-link .edit-box { display: none; } + .wp-admin .edit-box { display: block; opacity: 0; } + .hndle:hover .edit-box, .edit-box:focus { opacity: 1; } + #dashboard-widgets h2 a { text-decoration: underline; } + #dashboard-widgets .hndle .postbox-title-action { float: right; line-height: 1.2; } + '; +} +add_action( 'admin_print_styles-index.php', '_wp_441_dashboard_display_configure_links_css' ); \ No newline at end of file diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e3fb3531..b3781639 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -172,6 +172,11 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { function wp_maybe_decline_date( $date ) { global $wp_locale; + // i18n functions are not available in SHORTINIT mode + if ( ! function_exists( '_x' ) ) { + return $date; + } + /* translators: If months in your language require a genitive case, * translate this to 'on'. Do not translate into your own language. */ diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index f554e1fd..79b42e9c 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -471,7 +471,7 @@ function wp_login_form( $args = array() ) { $login_form_bottom = apply_filters( 'login_form_bottom', '', $args ); $form = ' - + ' . $login_form_top . '
    ")[0],priority:-40})),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}),b.exports=d},{}],3:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"cropper",title:e.cropImage,toolbar:"crop",content:"crop",router:!1,canSkipCrop:!1},activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},deactivate:function(){this.frame.toolbar.mode("browse")},createCropContent:function(){this.cropperView=new wp.media.view.Cropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},removeCropper:function(){this.imgSelect.cancelSelection(),this.imgSelect.setOptions({remove:!0}),this.imgSelect.update(),this.cropperView.remove()},createCropToolbar:function(){var a,b;a=this.get("canSkipCrop")||!1,b={controller:this.frame,items:{insert:{style:"primary",text:e.cropImage,priority:80,requires:{library:!1,selection:!1},click:function(){var a,b=this.controller;a=b.state().get("selection").first(),a.set({cropDetails:b.state().imgSelect.getSelection()}),this.$el.text(e.cropping),this.$el.attr("disabled",!0),b.state().doCrop(a).done(function(a){b.trigger("cropped",a),b.close()}).fail(function(){b.trigger("content:error:crop")})}}}},a&&_.extend(b.items,{skip:{style:"secondary",text:e.skipCropping,priority:70,requires:{library:!1,selection:!1},click:function(){var a=this.controller.state().get("selection").first();this.controller.state().cropperView.remove(),this.controller.trigger("skippedcrop",a),this.controller.close()}}}),this.frame.toolbar.set(new wp.media.view.Toolbar(b))},doCrop:function(a){return wp.ajax.post("custom-header-crop",{nonce:a.get("nonces").edit,id:a.get("id"),cropDetails:a.get("cropDetails")})}}),b.exports=d},{}],4:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control");return b.dst_width=c.params.width,b.dst_height=c.params.height,wp.ajax.post("crop-image",{wp_customize:"on",nonce:a.get("nonces").edit,id:a.get("id"),context:c.id,cropDetails:b})}}),b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"edit-image",title:e.editImage,menu:!1,toolbar:"edit-image",content:"edit-image",url:""},activate:function(){this.listenTo(this.frame,"toolbar:render:edit-image",this.toolbar)},deactivate:function(){this.stopListening(this.frame)},toolbar:function(){var a=this.frame,b=a.lastState(),c=b&&b.id;a.toolbar.set(new wp.media.view.Toolbar({controller:a,items:{back:{style:"primary",text:e.back,priority:20,click:function(){c?a.setState(c):a.close()}}}}))}}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.view.l10n,f=Backbone.$;d=wp.media.controller.State.extend({defaults:{id:"embed",title:e.insertFromUrlTitle,content:"embed",menu:"default",toolbar:"main-embed",priority:120,type:"link",url:"",metadata:{}},sensitivity:400,initialize:function(a){this.metadata=a.metadata,this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity),this.props=new Backbone.Model(this.metadata||{url:""}),this.props.on("change:url",this.debouncedScan,this),this.props.on("change:url",this.refresh,this),this.on("scan",this.scanImage,this)},scan:function(){var a,b=this,c={type:"link",scanners:[]};this.props.get("url")&&this.trigger("scan",c),c.scanners.length?(a=c.scanners=f.when.apply(f,c.scanners),a.always(function(){b.get("scanners")===a&&b.set("loading",!1)})):c.scanners=null,c.loading=!!c.scanners,this.set(c)},scanImage:function(a){var b=this.frame,c=this,d=this.props.get("url"),e=new Image,g=f.Deferred();a.scanners.push(g.promise()),e.onload=function(){g.resolve(),c===b.state()&&d===c.props.get("url")&&(c.set({type:"image"}),c.props.set({width:e.width,height:e.height}))},e.onerror=g.reject,e.src=d},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""}),this.active&&this.refresh()}}),b.exports=d},{}],7:[function(a,b,c){var d,e=wp.media.model.Attachment,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"featured-image",title:g.setFeaturedImageTitle,multiple:!1,filterable:"uploaded",toolbar:"featured-image",priority:60,syncSelection:!0},f.prototype.defaults),initialize:function(){var a,b;this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments),a=this.get("library"),b=a.comparator,a.comparator=function(a,c){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(c.cid);return!d&&e?-1:d&&!e?1:b.apply(this,arguments)},a.observe(this.get("selection"))},activate:function(){this.updateSelection(),this.frame.on("open",this.updateSelection,this),f.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this),f.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var a,b=this.get("selection"),c=wp.media.view.settings.post.featuredImageId;""!==c&&-1!==c&&(a=e.get(c),a.fetch()),b.reset(a?[a]:[])}}),b.exports=d},{}],8:[function(a,b,c){var d,e=wp.media.model.Selection,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"gallery-library",title:g.addToGalleryTitle,multiple:"add",filterable:"uploaded",menu:"gallery",toolbar:"gallery-add",priority:100,syncSelection:!1},f.prototype.defaults),initialize:function(){this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library"),b=this.frame.state("gallery-edit").get("library");this.editLibrary&&this.editLibrary!==b&&a.unobserve(this.editLibrary),a.validator=function(a){return!!this.mirroring.get(a.cid)&&!b.get(a.cid)&&e.prototype.validator.apply(this,arguments)},a.reset(a.mirroring.models,{silent:!0}),a.observe(b),this.editLibrary=b,f.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],9:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:{id:"gallery-edit",title:f.editGalleryTitle,multiple:!1,searchable:!1,sortable:!0,date:!1,display:!1,content:"browse",toolbar:"gallery-edit",describe:!0,displaySettings:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,syncSelection:!1},initialize:function(){this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library");a.props.set("type","image"),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.gallerySettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.gallerySettings,this),e.prototype.deactivate.apply(this,arguments)},gallerySettings:function(a){if(this.get("displaySettings")){var b=this.get("library");b&&a&&(b.gallery=b.gallery||new Backbone.Model,a.sidebar.set({gallery:new wp.media.view.Settings.Gallery({controller:this,model:b.gallery,priority:40})}),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}}),b.exports=d},{}],10:[function(a,b,c){var d,e=wp.media.controller.State,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"image-details",title:g.imageDetailsTitle,content:"image-details",menu:!1,router:!1,toolbar:"image-details",editing:!1,priority:60},f.prototype.defaults),initialize:function(a){this.image=a.image,e.prototype.initialize.apply(this,arguments)},activate:function(){this.frame.modal.$el.addClass("image-details")}}),b.exports=d},{}],11:[function(a,b,c){var d,e=wp.media.view.l10n,f=window.getUserSetting,g=window.setUserSetting;d=wp.media.controller.State.extend({defaults:{id:"library",title:e.mediaLibraryTitle,multiple:!1,content:"upload",menu:"default",router:"browse",toolbar:"select",searchable:!0,filterable:!1,sortable:!0,autoSelect:!0,describe:!1,contentUserSetting:!0,syncSelection:!0},initialize:function(){var a,b=this.get("selection");this.get("library")||this.set("library",wp.media.query()),b instanceof wp.media.model.Selection||(a=b,a||(a=this.get("library").props.toJSON(),a=_.omit(a,"orderby","query")),this.set("selection",new wp.media.model.Selection(null,{multiple:this.get("multiple"),props:a}))),this.resetDisplays()},activate:function(){this.syncSelection(),wp.Uploader.queue.on("add",this.uploading,this),this.get("selection").on("add remove reset",this.refreshContent,this),this.get("router")&&this.get("contentUserSetting")&&(this.frame.on("content:activate",this.saveContentMode,this),this.set("content",f("libraryContent",this.get("content"))))},deactivate:function(){this.recordSelection(),this.frame.off("content:activate",this.saveContentMode,this),this.get("selection").off(null,null,this),wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset(),this.resetDisplays(),this.refreshContent()},resetDisplays:function(){var a=wp.media.view.settings.defaultProps;this._displays=[],this._defaultDisplaySettings={align:f("align",a.align)||"none",size:f("imgsize",a.size)||"medium",link:f("urlbutton",a.link)||"none"}},display:function(a){var b=this._displays;return b[a.cid]||(b[a.cid]=new Backbone.Model(this.defaultDisplaySettings(a))),b[a.cid]},defaultDisplaySettings:function(a){var b=this._defaultDisplaySettings;return(b.canEmbed=this.canEmbed(a))&&(b.link="embed"),b},canEmbed:function(a){if(!a.get("uploading")){var b=a.get("type");if("audio"!==b&&"video"!==b)return!1}return _.contains(wp.media.view.settings.embedExts,a.get("filename").split(".").pop())},refreshContent:function(){var a=this.get("selection"),b=this.frame,c=b.router.get(),d=b.content.mode();this.active&&!a.length&&c&&!c.get(d)&&this.frame.content.render(this.get("content"))},uploading:function(a){var b=this.frame.content;"upload"===b.mode()&&this.frame.content.mode("browse"),this.get("autoSelect")&&(this.get("selection").add(a),this.frame.trigger("library:selection:add"))},saveContentMode:function(){if("browse"===this.get("router")){var a=this.frame.content.mode(),b=this.frame.router.get();b&&b.get(a)&&g("libraryContent",a)}}}),_.extend(d.prototype,wp.media.selectionSync),b.exports=d},{}],12:[function(a,b,c){var d,e=wp.media.controller.Library;d=e.extend({defaults:_.defaults({filterable:"uploaded",displaySettings:!1,priority:80,syncSelection:!1},e.prototype.defaults),initialize:function(a){this.media=a.media,this.type=a.type,this.set("library",wp.media.query({type:this.type})),e.prototype.initialize.apply(this,arguments)},activate:function(){wp.media.frame.lastMime&&(this.set("library",wp.media.query({type:wp.media.frame.lastMime})),delete wp.media.frame.lastMime),e.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],13:[function(a,b,c){var d=function(a){_.extend(this,_.pick(a||{},"id","view","selector"))};d.extend=Backbone.Model.extend,_.extend(d.prototype,{mode:function(a){return a?a===this._mode?this:(this.trigger("deactivate"),this._mode=a,this.render(a),this.trigger("activate"),this):this._mode},render:function(a){if(a&&a!==this._mode)return this.mode(a);var b,c={view:null};return this.trigger("create",c),b=c.view,this.trigger("render",b),b&&this.set(b),this},get:function(){return this.view.views.first(this.selector)},set:function(a,b){return b&&(b.add=!1),this.view.views.set(this.selector,a,b)},trigger:function(a){var b,c;if(this._mode)return c=_.toArray(arguments),b=this.id+":"+a,c[0]=b+":"+this._mode,this.view.trigger.apply(this.view,c),c[0]=b,this.view.trigger.apply(this.view,c),this}}),b.exports=d},{}],14:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"replace-image",title:f.replaceImageTitle,multiple:!1,filterable:"uploaded",toolbar:"replace",menu:!1,priority:60,syncSelection:!0},e.prototype.defaults),initialize:function(a){var b,c;this.image=a.image,this.get("library")||this.set("library",wp.media.query({type:"image"})),e.prototype.initialize.apply(this,arguments),b=this.get("library"),c=b.comparator,b.comparator=function(a,b){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(b.cid);return!d&&e?-1:d&&!e?1:c.apply(this,arguments)},b.observe(this.get("selection"))},activate:function(){this.updateSelection(),e.prototype.activate.apply(this,arguments)},updateSelection:function(){var a=this.get("selection"),b=this.image.attachment;a.reset(b?[b]:[])}}),b.exports=d},{}],15:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},createCropContent:function(){this.cropperView=new wp.media.view.SiteIconCropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control");return b.dst_width=c.params.width,b.dst_height=c.params.height,wp.ajax.post("crop-image",{nonce:a.get("nonces").edit,id:a.get("id"),context:"site-icon",cropDetails:b})}}),b.exports=d},{}],16:[function(a,b,c){var d=function(a){this.states=new Backbone.Collection(a)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{state:function(a){return this.states=this.states||new Backbone.Collection,a=a||this._state,a&&!this.states.get(a)&&this.states.add({id:a}),this.states.get(a)},setState:function(a){var b=this.state();return b&&a===b.id||!this.states||!this.states.get(a)?this:(b&&(b.trigger("deactivate"),this._lastState=b.id),this._state=a,this.state().trigger("activate"),this)},lastState:function(){return this._lastState?this.state(this._lastState):void 0}}),_.each(["on","off","trigger"],function(a){d.prototype[a]=function(){return this.states=this.states||new Backbone.Collection,this.states[a].apply(this.states,arguments),this}}),b.exports=d},{}],17:[function(a,b,c){var d=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(a){a.$el.text(this.get("title")||"")},_router:function(){var a,b=this.frame.router,c=this.get("router");this.frame.$el.toggleClass("hide-router",!c),c&&(this.frame.router.render(c),a=b.get(),a&&a.select&&a.select(this.frame.content.mode()))},_menu:function(){var a,b=this.frame.menu,c=this.get("menu");this.frame.$el.toggleClass("hide-menu",!c),c&&(b.mode(c),a=b.get(),a&&a.select&&a.select(this.id))},_updateMenu:function(){var a=this.previous("menu"),b=this.get("menu");a&&this.frame.off("menu:render:"+a,this._renderMenu,this),b&&this.frame.on("menu:render:"+b,this._renderMenu,this)},_renderMenu:function(a){var b=this.get("menuItem"),c=this.get("title"),d=this.get("priority");!b&&c&&(b={text:c},d&&(b.priority=d)),b&&a.set(this.id,b)}});_.each(["toolbar","content"],function(a){d.prototype["_"+a]=function(){var b=this.get(a);b&&this.frame[a].render(b)}}),b.exports=d},{}],18:[function(a,b,c){var d={syncSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple&&(a.reset([],{silent:!0}),a.validateAll(b.attachments),b.difference=_.difference(b.attachments.models,a.models)),a.single(b.single))},recordSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple?(b.attachments.reset(a.toArray().concat(b.difference)),b.difference=[]):b.attachments.add(a.toArray()),b.single=a._single)}};b.exports=d},{}],19:[function(a,b,c){var d,e=wp.media,f=jQuery;e.isTouchDevice="ontouchend"in document,d=e.view.l10n=window._wpMediaViewsL10n||{},e.view.settings=d.settings||{},delete d.settings,e.model.settings.post=e.view.settings.post,f.support.transition=function(){var a,b=document.documentElement.style,c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};return a=_.find(_.keys(c),function(a){return!_.isUndefined(b[a])}),a&&{end:c[a]}}(),e.events=_.extend({},Backbone.Events),e.transition=function(a,b){var c=f.Deferred();return b=b||2e3,f.support.transition?(a instanceof f||(a=f(a)),a.first().one(f.support.transition.end,c.resolve),_.delay(c.resolve,b)):c.resolve(),c.promise()},e.controller.Region=a("./controllers/region.js"),e.controller.StateMachine=a("./controllers/state-machine.js"),e.controller.State=a("./controllers/state.js"),e.selectionSync=a("./utils/selection-sync.js"),e.controller.Library=a("./controllers/library.js"),e.controller.ImageDetails=a("./controllers/image-details.js"),e.controller.GalleryEdit=a("./controllers/gallery-edit.js"),e.controller.GalleryAdd=a("./controllers/gallery-add.js"),e.controller.CollectionEdit=a("./controllers/collection-edit.js"),e.controller.CollectionAdd=a("./controllers/collection-add.js"),e.controller.FeaturedImage=a("./controllers/featured-image.js"),e.controller.ReplaceImage=a("./controllers/replace-image.js"),e.controller.EditImage=a("./controllers/edit-image.js"),e.controller.MediaLibrary=a("./controllers/media-library.js"),e.controller.Embed=a("./controllers/embed.js"),e.controller.Cropper=a("./controllers/cropper.js"),e.controller.CustomizeImageCropper=a("./controllers/customize-image-cropper.js"),e.controller.SiteIconCropper=a("./controllers/site-icon-cropper.js"),e.View=a("./views/view.js"),e.view.Frame=a("./views/frame.js"),e.view.MediaFrame=a("./views/media-frame.js"),e.view.MediaFrame.Select=a("./views/frame/select.js"),e.view.MediaFrame.Post=a("./views/frame/post.js"),e.view.MediaFrame.ImageDetails=a("./views/frame/image-details.js"),e.view.Modal=a("./views/modal.js"),e.view.FocusManager=a("./views/focus-manager.js"),e.view.UploaderWindow=a("./views/uploader/window.js"),e.view.EditorUploader=a("./views/uploader/editor.js"),e.view.UploaderInline=a("./views/uploader/inline.js"),e.view.UploaderStatus=a("./views/uploader/status.js"),e.view.UploaderStatusError=a("./views/uploader/status-error.js"),e.view.Toolbar=a("./views/toolbar.js"),e.view.Toolbar.Select=a("./views/toolbar/select.js"),e.view.Toolbar.Embed=a("./views/toolbar/embed.js"),e.view.Button=a("./views/button.js"),e.view.ButtonGroup=a("./views/button-group.js"),e.view.PriorityList=a("./views/priority-list.js"),e.view.MenuItem=a("./views/menu-item.js"),e.view.Menu=a("./views/menu.js"),e.view.RouterItem=a("./views/router-item.js"),e.view.Router=a("./views/router.js"),e.view.Sidebar=a("./views/sidebar.js"),e.view.Attachment=a("./views/attachment.js"),e.view.Attachment.Library=a("./views/attachment/library.js"),e.view.Attachment.EditLibrary=a("./views/attachment/edit-library.js"),e.view.Attachments=a("./views/attachments.js"),e.view.Search=a("./views/search.js"),e.view.AttachmentFilters=a("./views/attachment-filters.js"),e.view.DateFilter=a("./views/attachment-filters/date.js"),e.view.AttachmentFilters.Uploaded=a("./views/attachment-filters/uploaded.js"),e.view.AttachmentFilters.All=a("./views/attachment-filters/all.js"),e.view.AttachmentsBrowser=a("./views/attachments/browser.js"),e.view.Selection=a("./views/selection.js"),e.view.Attachment.Selection=a("./views/attachment/selection.js"),e.view.Attachments.Selection=a("./views/attachments/selection.js"),e.view.Attachment.EditSelection=a("./views/attachment/edit-selection.js"),e.view.Settings=a("./views/settings.js"),e.view.Settings.AttachmentDisplay=a("./views/settings/attachment-display.js"),e.view.Settings.Gallery=a("./views/settings/gallery.js"),e.view.Settings.Playlist=a("./views/settings/playlist.js"),e.view.Attachment.Details=a("./views/attachment/details.js"),e.view.AttachmentCompat=a("./views/attachment-compat.js"),e.view.Iframe=a("./views/iframe.js"),e.view.Embed=a("./views/embed.js"),e.view.Label=a("./views/label.js"),e.view.EmbedUrl=a("./views/embed/url.js"),e.view.EmbedLink=a("./views/embed/link.js"),e.view.EmbedImage=a("./views/embed/image.js"),e.view.ImageDetails=a("./views/image-details.js"),e.view.Cropper=a("./views/cropper.js"),e.view.SiteIconCropper=a("./views/site-icon-cropper.js"),e.view.SiteIconPreview=a("./views/site-icon-preview.js"),e.view.EditImage=a("./views/edit-image.js"),e.view.Spinner=a("./views/spinner.js")},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/customize-image-cropper.js":4,"./controllers/edit-image.js":5,"./controllers/embed.js":6,"./controllers/featured-image.js":7,"./controllers/gallery-add.js":8,"./controllers/gallery-edit.js":9,"./controllers/image-details.js":10,"./controllers/library.js":11,"./controllers/media-library.js":12,"./controllers/region.js":13,"./controllers/replace-image.js":14,"./controllers/site-icon-cropper.js":15,"./controllers/state-machine.js":16,"./controllers/state.js":17,"./utils/selection-sync.js":18,"./views/attachment-compat.js":20,"./views/attachment-filters.js":21,"./views/attachment-filters/all.js":22,"./views/attachment-filters/date.js":23,"./views/attachment-filters/uploaded.js":24,"./views/attachment.js":25,"./views/attachment/details.js":26,"./views/attachment/edit-library.js":27,"./views/attachment/edit-selection.js":28,"./views/attachment/library.js":29,"./views/attachment/selection.js":30,"./views/attachments.js":31,"./views/attachments/browser.js":32,"./views/attachments/selection.js":33,"./views/button-group.js":34,"./views/button.js":35,"./views/cropper.js":36,"./views/edit-image.js":37,"./views/embed.js":38,"./views/embed/image.js":39,"./views/embed/link.js":40,"./views/embed/url.js":41,"./views/focus-manager.js":42,"./views/frame.js":43,"./views/frame/image-details.js":44,"./views/frame/post.js":45,"./views/frame/select.js":46,"./views/iframe.js":47,"./views/image-details.js":48,"./views/label.js":49,"./views/media-frame.js":50,"./views/menu-item.js":51,"./views/menu.js":52,"./views/modal.js":53,"./views/priority-list.js":54,"./views/router-item.js":55,"./views/router.js":56,"./views/search.js":57,"./views/selection.js":58,"./views/settings.js":59,"./views/settings/attachment-display.js":60,"./views/settings/gallery.js":61,"./views/settings/playlist.js":62,"./views/sidebar.js":63,"./views/site-icon-cropper.js":64,"./views/site-icon-preview.js":65,"./views/spinner.js":66,"./views/toolbar.js":67,"./views/toolbar/embed.js":68,"./views/toolbar/select.js":69,"./views/uploader/editor.js":70,"./views/uploader/inline.js":71,"./views/uploader/status-error.js":72,"./views/uploader/status.js":73,"./views/uploader/window.js":74,"./views/view.js":75}],20:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.listenTo(this.model,"change:compat",this.render)},dispose:function(){return this.$(":focus").length&&this.save(),e.prototype.dispose.apply(this,arguments)},render:function(){var a=this.model.get("compat");if(a&&a.item)return this.views.detach(),this.$el.html(a.item),this.views.render(),this},preventDefault:function(a){a.preventDefault()},save:function(a){var b={};a&&a.preventDefault(),_.each(this.$el.serializeArray(),function(a){b[a.name]=a.value}),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(b).always(_.bind(this.postSave,this))},postSave:function(){this.controller.trigger("attachment:compat:ready",["ready"])}}),b.exports=d},{}],21:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"select",className:"attachment-filters",id:"media-attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters(),_.extend(this.filters,this.options.filters),this.$el.html(_.chain(this.filters).map(function(a,b){return{el:e("").val(b).html(a.text)[0],priority:a.priority||50}},this).sortBy("priority").pluck("el").value()),this.listenTo(this.model,"change",this.select),this.select()},createFilters:function(){this.filters={}},change:function(){var a=this.filters[this.el.value];a&&this.model.set(a.props)},select:function(){var a=this.model,b="all",c=a.toJSON();_.find(this.filters,function(a,d){var e=_.all(a.props,function(a,b){return a===(_.isUndefined(c[b])?null:c[b])});return e?b=d:void 0}),this.$el.val(b)}}),b.exports=d},{}],22:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a={};_.each(wp.media.view.settings.mimeTypes||{},function(b,c){a[c]={text:b,props:{status:null,type:c,uploadedTo:null,orderby:"date",order:"DESC"}}}),a.all={text:e.allMediaItems,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10},wp.media.view.settings.post.id&&(a.uploaded={text:e.uploadedToThisPost,props:{status:null,type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}),a.unattached={text:e.unattached,props:{status:null,uploadedTo:0,type:null,orderby:"menuOrder",order:"ASC"},priority:50},wp.media.view.settings.mediaTrash&&this.controller.isModeActive("grid")&&(a.trash={text:e.trash,props:{uploadedTo:null,status:"trash",type:null,orderby:"date",order:"DESC"},priority:50}),this.filters=a}}),b.exports=d},{}],23:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({id:"media-attachment-date-filters",createFilters:function(){var a={};_.each(wp.media.view.settings.months||{},function(b,c){a[c]={text:b.text,props:{year:b.year,monthnum:b.month}}}),a.all={text:e.allDates,props:{monthnum:!1,year:!1},priority:10},this.filters=a}}),b.exports=d},{}],24:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a,b=this.model.get("type"),c=wp.media.view.settings.mimeTypes;c&&b&&(a=c[b]),this.filters={all:{text:a||e.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10},uploaded:{text:e.uploadedToThisPost,props:{uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20},unattached:{text:e.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC"},priority:50}}}}),b.exports=d},{}],25:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"li",className:"attachment",template:wp.template("attachment"),attributes:function(){return{tabIndex:0,role:"checkbox","aria-label":this.model.get("title"),"aria-checked":!1,"data-id":this.model.get("id")}},events:{"click .js--select-attachment":"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .attachment-close":"removeFromLibrary","click .check":"checkClickHandler",keydown:"toggleSelectionHandler"},buttons:{},initialize:function(){var a=this.options.selection,b=_.defaults(this.options,{rerenderOnModelChange:!0});b.rerenderOnModelChange?this.listenTo(this.model,"change",this.render):this.listenTo(this.model,"change:percent",this.progress),this.listenTo(this.model,"change:title",this._syncTitle),this.listenTo(this.model,"change:caption",this._syncCaption),this.listenTo(this.model,"change:artist",this._syncArtist),this.listenTo(this.model,"change:album",this._syncAlbum),this.listenTo(this.model,"add",this.select),this.listenTo(this.model,"remove",this.deselect),a&&(a.on("reset",this.updateSelect,this),this.listenTo(this.model,"selection:single selection:unsingle",this.details),this.details(this.model,this.controller.state().get("selection"))),this.listenTo(this.controller,"attachment:compat:waiting attachment:compat:ready",this.updateSave)},dispose:function(){var a=this.options.selection;return this.updateAll(),a&&a.off(null,null,this), -e.prototype.dispose.apply(this,arguments),this},render:function(){var a=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:!1,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:!1,alt:"",description:""},this.options);return a.buttons=this.buttons,a.describe=this.controller.state().get("describe"),"image"===a.type&&(a.size=this.imageSize()),a.can={},a.nonces&&(a.can.remove=!!a.nonces["delete"],a.can.save=!!a.nonces.update),this.controller.state().get("allowLocalEdits")&&(a.allowLocalEdits=!0),a.uploading&&!a.percent&&(a.percent=0),this.views.detach(),this.$el.html(this.template(a)),this.$el.toggleClass("uploading",a.uploading),a.uploading?this.$bar=this.$(".media-progress-bar div"):delete this.$bar,this.updateSelect(),this.updateSave(),this.views.render(),this},progress:function(){this.$bar&&this.$bar.length&&this.$bar.width(this.model.get("percent")+"%")},toggleSelectionHandler:function(a){var b;if("INPUT"!==a.target.nodeName&&"BUTTON"!==a.target.nodeName){if(37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode)return void this.controller.trigger("attachment:keydown:arrow",a);if("keydown"!==a.type||13===a.keyCode||32===a.keyCode){if(a.preventDefault(),this.controller.isModeActive("grid")){if(this.controller.isModeActive("edit"))return void this.controller.trigger("edit:attachment",this.model,a.currentTarget);this.controller.isModeActive("select")&&(b="toggle")}a.shiftKey?b="between":(a.ctrlKey||a.metaKey)&&(b="toggle"),this.toggleSelection({method:b}),this.controller.trigger("selection:toggle")}}},toggleSelection:function(a){var b,c,d,e,f=this.collection,g=this.options.selection,h=this.model,i=a&&a.method;if(g){if(b=g.single(),i=_.isUndefined(i)?g.multiple:i,"between"===i&&b&&g.multiple){if(b===h)return;return d=f.indexOf(b),e=f.indexOf(this.model),c=e>d?f.models.slice(d,e+1):f.models.slice(e,d+1),g.add(c),void g.single(h)}if("toggle"===i)return g[this.selected()?"remove":"add"](h),void g.single(h);if("add"===i)return g.add(h),void g.single(h);i||(i="add"),"add"!==i&&(i="reset"),this.selected()?g[b===h?"remove":"single"](h):(g[i](h),g.single(h))}},updateSelect:function(){this[this.selected()?"select":"deselect"]()},selected:function(){var a=this.options.selection;return a?!!a.get(this.model.cid):void 0},select:function(a,b){var c=this.options.selection,d=this.controller;!c||b&&b!==c||this.$el.hasClass("selected")||(this.$el.addClass("selected").attr("aria-checked",!0),d.isModeActive("grid")&&d.isModeActive("select")||this.$(".check").attr("tabindex","0"))},deselect:function(a,b){var c=this.options.selection;!c||b&&b!==c||this.$el.removeClass("selected").attr("aria-checked",!1).find(".check").attr("tabindex","-1")},details:function(a,b){var c,d=this.options.selection;d===b&&(c=d.single(),this.$el.toggleClass("details",c===this.model))},imageSize:function(a){var b=this.model.get("sizes"),c=!1;return a=a||"medium",b&&(b[a]?c=b[a]:b.large?c=b.large:b.thumbnail?c=b.thumbnail:b.full&&(c=b.full),c)?_.clone(c):{url:this.model.get("url"),width:this.model.get("width"),height:this.model.get("height"),orientation:this.model.get("orientation")}},updateSetting:function(a){var b,c,d=f(a.target).closest("[data-setting]");d.length&&(b=d.data("setting"),c=a.target.value,this.model.get(b)!==c&&this.save(b,c))},save:function(){var a=this,b=this._save=this._save||{status:"ready"},c=this.model.save.apply(this.model,arguments),d=b.requests?f.when(c,b.requests):c;b.savedTimer&&clearTimeout(b.savedTimer),this.updateSave("waiting"),b.requests=d,d.always(function(){b.requests===d&&(a.updateSave("resolved"===d.state()?"complete":"error"),b.savedTimer=setTimeout(function(){a.updateSave("ready"),delete b.savedTimer},2e3))})},updateSave:function(a){var b=this._save=this._save||{status:"ready"};return a&&a!==b.status&&(this.$el.removeClass("save-"+b.status),b.status=a),this.$el.addClass("save-"+b.status),this},updateAll:function(){var a,b=this.$("[data-setting]"),c=this.model;a=_.chain(b).map(function(a){var b,d,e=f("input, textarea, select, [value]",a);if(e.length)return b=f(a).data("setting"),d=e.val(),c.get(b)!==d?[b,d]:void 0}).compact().object().value(),_.isEmpty(a)||c.save(a)},removeFromLibrary:function(a){("keydown"!==a.type||13===a.keyCode||32===a.keyCode)&&(a.stopPropagation(),this.collection.remove(this.model))},checkClickHandler:function(a){var b=this.options.selection;b&&(a.stopPropagation(),b.where({id:this.model.get("id")}).length?(b.remove(this.model),this.$el.focus()):b.add(this.model))}}),_.each({caption:"_syncCaption",title:"_syncTitle",artist:"_syncArtist",album:"_syncAlbum"},function(a,b){d.prototype[a]=function(a,c){var d=this.$('[data-setting="'+b+'"]');return d.length?c===d.find("input, textarea, select, [value]").val()?this:this.render():this}}),b.exports=d},{}],26:[function(a,b,c){var d,e=wp.media.view.Attachment,f=wp.media.view.l10n;d=e.extend({tagName:"div",className:"attachment-details",template:wp.template("attachment-details"),attributes:function(){return{tabIndex:0,"data-id":this.model.get("id")}},events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .trash-attachment":"trashAttachment","click .untrash-attachment":"untrashAttachment","click .edit-attachment":"editAttachment",keydown:"toggleSelectionHandler"},initialize:function(){this.options=_.defaults(this.options,{rerenderOnModelChange:!1}),this.on("ready",this.initialFocus),e.prototype.initialize.apply(this,arguments)},initialFocus:function(){wp.media.isTouchDevice||this.$('input[type="text"]').eq(0).focus()},deleteAttachment:function(a){a.preventDefault(),window.confirm(f.warnDelete)&&(this.model.destroy(),this.controller.modal.focusManager.focus())},trashAttachment:function(a){var b=this.controller.library;a.preventDefault(),wp.media.view.settings.mediaTrash&&"edit-metadata"===this.controller.content.mode()?(this.model.set("status","trash"),this.model.save().done(function(){b._requery(!0)})):this.model.destroy()},untrashAttachment:function(a){var b=this.controller.library;a.preventDefault(),this.model.set("status","inherit"),this.model.save().done(function(){b._requery(!0)})},editAttachment:function(a){var b=this.controller.states.get("edit-image");window.imageEdit&&b?(a.preventDefault(),b.set("image",this.model),this.controller.setState("edit-image")):this.$el.addClass("needs-refresh")},toggleSelectionHandler:function(a){return"keydown"===a.type&&9===a.keyCode&&a.shiftKey&&a.target===this.$(":tabbable").get(0)?(this.controller.trigger("attachment:details:shift-tab",a),!1):37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode?void this.controller.trigger("attachment:keydown:arrow",a):void 0}}),b.exports=d},{}],27:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{close:!0}});b.exports=d},{}],28:[function(a,b,c){var d=wp.media.view.Attachment.Selection.extend({buttons:{close:!0}});b.exports=d},{}],29:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{check:!0}});b.exports=d},{}],30:[function(a,b,c){var d=wp.media.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});b.exports=d},{}],31:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"ul",className:"attachments",attributes:{tabIndex:-1},initialize:function(){this.el.id=_.uniqueId("__attachments-view-"),_.defaults(this.options,{refreshSensitivity:wp.media.isTouchDevice?300:200,refreshThreshold:3,AttachmentView:wp.media.view.Attachment,sortable:!1,resize:!0,idealColumnWidth:f(window).width()<640?135:150}),this._viewsByCid={},this.$window=f(window),this.resizeEvent="resize.media-modal-columns",this.collection.on("add",function(a){this.views.add(this.createAttachmentView(a),{at:this.collection.indexOf(a)})},this),this.collection.on("remove",function(a){var b=this._viewsByCid[a.cid];delete this._viewsByCid[a.cid],b&&b.remove()},this),this.collection.on("reset",this.render,this),this.listenTo(this.controller,"library:selection:add",this.attachmentFocus),this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value(),this.options.scrollElement=this.options.scrollElement||this.el,f(this.options.scrollElement).on("scroll",this.scroll),this.initSortable(),_.bindAll(this,"setColumns"),this.options.resize&&(this.on("ready",this.bindEvents),this.controller.on("open",this.setColumns),_.defer(this.setColumns,this))},bindEvents:function(){this.$window.off(this.resizeEvent).on(this.resizeEvent,_.debounce(this.setColumns,50))},attachmentFocus:function(){this.$("li:first").focus()},restoreFocus:function(){this.$("li.selected:first").focus()},arrowEvent:function(a){var b=this.$el.children("li"),c=this.columns,d=b.filter(":focus").index(),e=c>=d+1?1:Math.ceil((d+1)/c);if(-1!==d){if(37===a.keyCode){if(0===d)return;b.eq(d-1).focus()}if(38===a.keyCode){if(1===e)return;b.eq(d-c).focus()}if(39===a.keyCode){if(b.length===d)return;b.eq(d+1).focus()}if(40===a.keyCode){if(Math.ceil(b.length/c)===e)return;b.eq(d+c).focus()}}},dispose:function(){this.collection.props.off(null,null,this),this.options.resize&&this.$window.off(this.resizeEvent),e.prototype.dispose.apply(this,arguments)},setColumns:function(){var a=this.columns,b=this.$el.width();b&&(this.columns=Math.min(Math.round(b/this.options.idealColumnWidth),12)||1,a&&a===this.columns||this.$el.closest(".media-frame-content").attr("data-columns",this.columns))},initSortable:function(){var a=this.collection;!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable&&(this.$el.sortable(_.extend({disabled:!!a.comparator,tolerance:"pointer",start:function(a,b){b.item.data("sortableIndexStart",b.item.index())},update:function(b,c){var d=a.at(c.item.data("sortableIndexStart")),e=a.comparator;delete a.comparator,a.remove(d,{silent:!0}),a.add(d,{silent:!0,at:c.item.index()}),a.comparator=e,a.trigger("reset",a),a.saveMenuOrder()}},this.options.sortable)),a.props.on("change:orderby",function(){this.$el.sortable("option","disabled",!!a.comparator)},this),this.collection.props.on("change:orderby",this.refreshSortable,this),this.refreshSortable())},refreshSortable:function(){if(!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable){var a=this.collection,b=a.props.get("orderby"),c="menuOrder"===b||!a.comparator;this.$el.sortable("option","disabled",!c)}},createAttachmentView:function(a){var b=new this.options.AttachmentView({controller:this.controller,model:a,collection:this.collection,selection:this.options.selection});return this._viewsByCid[a.cid]=b},prepare:function(){this.collection.length?this.views.set(this.collection.map(this.createAttachmentView,this)):(this.views.unset(),this.collection.more().done(this.scroll))},ready:function(){this.scroll()},scroll:function(){var a,b=this,c=this.options.scrollElement,d=c.scrollTop;c===document&&(c=document.body,d=f(document).scrollTop()),f(c).is(":visible")&&this.collection.hasMore()&&(a=this.views.parent.toolbar,c.scrollHeight-(d+c.clientHeight)'+g.dragInfo+"
    ")[0],priority:-40})),this.options.suggestedWidth&&this.options.suggestedHeight&&this.toolbar.set("suggestedDimensions",new e({el:h('
    '+g.suggestedDimensions+" "+this.options.suggestedWidth+" × "+this.options.suggestedHeight+"
    ")[0],priority:-40}))},updateContent:function(){var a,b=this;a=this.controller.isModeActive("grid")?b.attachmentsNoResults:b.uploader,this.collection.length?(a.$el.addClass("hidden"),b.toolbar.get("spinner").hide()):(this.toolbar.get("spinner").show(),this.dfd=this.collection.more().done(function(){b.collection.length?a.$el.addClass("hidden"):a.$el.removeClass("hidden"),b.toolbar.get("spinner").hide()}))},createUploader:function(){this.uploader=new wp.media.view.UploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":g.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.hide(),this.views.add(this.uploader)},toggleUploader:function(){this.uploader.$el.hasClass("hidden")?this.uploader.show():this.uploader.hide()},createAttachments:function(){this.attachments=new wp.media.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,scrollElement:this.options.scrollElement,idealColumnWidth:this.options.idealColumnWidth,AttachmentView:this.options.AttachmentView}),this.attachments.listenTo(this.controller,"attachment:keydown:arrow",this.attachments.arrowEvent),this.attachments.listenTo(this.controller,"attachment:details:shift-tab",this.attachments.restoreFocus),this.views.add(this.attachments),this.controller.isModeActive("grid")&&(this.attachmentsNoResults=new e({controller:this.controller,tagName:"p"}),this.attachmentsNoResults.$el.addClass("hidden no-media"),this.attachmentsNoResults.$el.html(g.noMedia),this.views.add(this.attachmentsNoResults))},createSidebar:function(){var a=this.options,b=a.selection,c=this.sidebar=new wp.media.view.Sidebar({controller:this.controller});this.views.add(c),this.controller.uploader&&c.set("uploads",new wp.media.view.UploaderStatus({controller:this.controller,priority:40})),b.on("selection:single",this.createSingle,this),b.on("selection:unsingle",this.disposeSingle,this),b.single()&&this.createSingle()},createSingle:function(){var a=this.sidebar,b=this.options.selection.single();a.set("details",new wp.media.view.Attachment.Details({controller:this.controller,model:b,priority:80})),a.set("compat",new wp.media.view.AttachmentCompat({controller:this.controller,model:b,priority:120})),this.options.display&&a.set("display",new wp.media.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(b),attachment:b,priority:160,userSettings:this.model.get("displayUserSettings")})),"insert"===this.model.id&&a.$el.addClass("visible")},disposeSingle:function(){var a=this.sidebar;a.unset("details"),a.unset("compat"),a.unset("display"),a.$el.removeClass("visible")}}),b.exports=d},{}],33:[function(a,b,c){var d,e=wp.media.view.Attachments;d=e.extend({events:{},initialize:function(){return _.defaults(this.options,{sortable:!1,resize:!1,AttachmentView:wp.media.view.Attachment.Selection}),e.prototype.initialize.apply(this,arguments)}}),b.exports=d},{}],34:[function(a,b,c){var d,e=Backbone.$;d=wp.media.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(a){return a instanceof Backbone.View?a:new wp.media.view.Button(a).render()}),delete this.options.buttons,this.options.classes&&this.$el.addClass(this.options.classes)},render:function(){return this.$el.html(e(_.pluck(this.buttons,"el")).detach()),this}}),b.exports=d},{}],35:[function(a,b,c){var d=wp.media.View.extend({tagName:"button",className:"media-button",attributes:{type:"button"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:!1},initialize:function(){this.model=new Backbone.Model(this.defaults),_.each(this.defaults,function(a,b){var c=this.options[b];_.isUndefined(c)||(this.model.set(b,c),delete this.options[b])},this),this.listenTo(this.model,"change",this.render)},render:function(){var a=["button",this.className],b=this.model.toJSON();return b.style&&a.push("button-"+b.style),b.size&&a.push("button-"+b.size),a=_.uniq(a.concat(this.options.classes)),this.el.className=a.join(" "),this.$el.attr("disabled",b.disabled),this.$el.text(this.model.get("text")),this},click:function(a){"#"===this.attributes.href&&a.preventDefault(),this.options.click&&!this.model.get("disabled")&&this.options.click.apply(this,arguments)}});b.exports=d},{}],36:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.UploaderStatus,g=wp.media.view.l10n,h=jQuery;d=e.extend({className:"crop-content",template:wp.template("crop-content"),initialize:function(){_.bindAll(this,"onImageLoad")},ready:function(){this.controller.frame.on("content:error:crop",this.onError,this),this.$image=this.$el.find(".crop-image"),this.$image.on("load",this.onImageLoad),h(window).on("resize.cropper",_.debounce(this.onImageLoad,250))},remove:function(){h(window).off("resize.cropper"),this.$el.remove(),this.$el.off(),e.prototype.remove.apply(this,arguments)},prepare:function(){return{title:g.cropYourImage,url:this.options.attachment.get("url")}},onImageLoad:function(){var a=this.controller.get("imgSelectOptions");"function"==typeof a&&(a=a(this.options.attachment,this.controller)),a=_.extend(a,{parent:this.$el}),this.trigger("image-loaded"),this.controller.imgSelect=this.$image.imgAreaSelect(a)},onError:function(){var a=this.options.attachment.get("filename");this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:f.prototype.filename(a),message:window._wpMediaViewsL10n.cropError}),{at:0})}}),b.exports=d},{}],37:[function(a,b,c){var d,e=wp.media.View;d=e.extend({className:"image-editor",template:wp.template("image-editor"),initialize:function(a){this.editor=window.imageEdit,this.controller=a.controller,e.prototype.initialize.apply(this,arguments)},prepare:function(){return this.model.toJSON()},loadEditor:function(){var a=this.editor.open(this.model.get("id"),this.model.get("nonces").edit,this);a.done(_.bind(this.focus,this))},focus:function(){this.$(".imgedit-submit .button").eq(0).focus()},back:function(){var a=this.controller.lastState();this.controller.setState(a)},refresh:function(){this.model.fetch()},save:function(){var a=this.controller.lastState();this.model.fetch().done(_.bind(function(){this.controller.setState(a)},this))}}),b.exports=d},{}],38:[function(a,b,c){var d=wp.media.View.extend({className:"media-embed",initialize:function(){this.url=new wp.media.view.EmbedUrl({controller:this.controller,model:this.model.props}).render(),this.views.set([this.url]),this.refresh(),this.listenTo(this.model,"change:type",this.refresh),this.listenTo(this.model,"change:loading",this.loading)},settings:function(a){this._settings&&this._settings.remove(),this._settings=a,this.views.add(a)},refresh:function(){var a,b=this.model.get("type");if("image"===b)a=wp.media.view.EmbedImage;else{if("link"!==b)return;a=wp.media.view.EmbedLink}this.settings(new a({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});b.exports=d},{}],39:[function(a,b,c){var d,e=wp.media.view.Settings.AttachmentDisplay;d=e.extend({className:"embed-media-settings",template:wp.template("embed-image-settings"),initialize:function(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:url",this.updateImage)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}}),b.exports=d},{}],40:[function(a,b,c){var d,e=jQuery;d=wp.media.view.Settings.extend({className:"embed-link-settings",template:wp.template("embed-link-settings"),initialize:function(){this.listenTo(this.model,"change:url",this.updateoEmbed)},updateoEmbed:_.debounce(function(){var a=this.model.get("url");this.$(".embed-container").hide().find(".embed-preview").empty(),this.$(".setting").hide(),a&&(a.length<11||!a.match(/^http(s)?:\/\//))||this.fetch()},wp.media.controller.Embed.sensitivity),fetch:function(){var a;e("#embed-url-field").val()===this.model.get("url")&&(this.dfd&&"pending"===this.dfd.state()&&this.dfd.abort(),a=new wp.shortcode({tag:"embed",attrs:_.pick(this.model.attributes,["width","height","src"]),content:this.model.get("url")}),this.dfd=e.ajax({type:"POST",url:wp.ajax.settings.url,context:this,data:{action:"parse-embed",post_ID:wp.media.view.settings.post.id,shortcode:a.string()}}).done(this.renderoEmbed).fail(this.renderFail))},renderFail:function(a,b){"abort"!==b&&this.$(".link-text").show()},renderoEmbed:function(a){var b=a&&a.data&&a.data.body||"";b?this.$(".embed-container").show().find(".embed-preview").html(b):this.renderFail()}}),b.exports=d},{}],41:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"label",className:"embed-url",events:{input:"url",keyup:"url",change:"url"},initialize:function(){this.$input=f('').val(this.model.get("url")),this.input=this.$input[0],this.spinner=f('')[0],this.$el.append([this.input,this.spinner]),this.listenTo(this.model,"change:url",this.render),this.model.get("url")&&_.delay(_.bind(function(){this.model.trigger("change:url")},this),500)},render:function(){var a=this.$input;if(!a.is(":focus"))return this.input.value=this.model.get("url")||"http://",e.prototype.render.apply(this,arguments),this},ready:function(){wp.media.isTouchDevice||this.focus()},url:function(a){this.model.set("url",a.target.value)},focus:function(){var a=this.$input;a.is(":visible")&&a.focus()[0].select()}}),b.exports=d},{}],42:[function(a,b,c){var d=wp.media.View.extend({events:{keydown:"constrainTabbing"},focus:function(){this.$(".media-menu-item").first().focus()},constrainTabbing:function(a){var b;if(9===a.keyCode)return b=this.$(":tabbable").not('.moxie-shim input[type="file"]'),b.last()[0]!==a.target||a.shiftKey?b.first()[0]===a.target&&a.shiftKey?(b.last().focus(),!1):void 0:(b.first().focus(),!1)}});b.exports=d},{}],43:[function(a,b,c){var d=wp.media.View.extend({initialize:function(){_.defaults(this.options,{mode:["select"]}),this._createRegions(),this._createStates(),this._createModes()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[],_.each(this.regions,function(a){this[a]=new wp.media.controller.Region({view:this,id:a,selector:".media-frame-"+a})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:wp.media.controller.State}),this.states.on("add",function(a){a.frame=this,a.trigger("ready")},this),this.options.states&&this.states.add(this.options.states)},_createModes:function(){this.activeModes=new Backbone.Collection,this.activeModes.on("add remove reset",_.bind(this.triggerModeEvents,this)),_.each(this.options.mode,function(a){this.activateMode(a)},this)},reset:function(){return this.states.invoke("trigger","reset"),this},triggerModeEvents:function(a,b,c){var d,e,f={add:"activate",remove:"deactivate"};_.each(c,function(a,b){a&&(d=b)}),_.has(f,d)&&(e=a.get("id")+":"+f[d],this.trigger(e))},activateMode:function(a){return this.isModeActive(a)?void 0:(this.activeModes.add([{id:a}]),this.$el.addClass("mode-"+a),this)},deactivateMode:function(a){return this.isModeActive(a)?(this.activeModes.remove(this.activeModes.where({id:a})),this.$el.removeClass("mode-"+a),this.trigger(a+":deactivate"),this):this},isModeActive:function(a){return Boolean(this.activeModes.where({id:a}).length)}});_.extend(d.prototype,wp.media.controller.StateMachine.prototype),b.exports=d},{}],44:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.view.l10n;d=e.extend({defaults:{id:"image",url:"",menu:"image-details",content:"image-details",toolbar:"image-details",type:"link",title:f.imageDetailsTitle,priority:120},initialize:function(a){this.image=new wp.media.model.PostImage(a.metadata),this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),e.prototype.initialize.apply(this,arguments)},bindHandlers:function(){e.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:image-details",this.createMenu,this),this.on("content:create:image-details",this.imageDetailsContent,this),this.on("content:render:edit-image",this.editImageContent,this),this.on("toolbar:render:image-details",this.renderImageDetailsToolbar,this),this.on("toolbar:render:replace",this.renderReplaceImageToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.ImageDetails({image:this.image,editable:!1}),new wp.media.controller.ReplaceImage({id:"replace-image",library:wp.media.query({type:"image"}),image:this.image,multiple:!1,title:f.imageReplaceTitle,toolbar:"replace",priority:80,displaySettings:!0}),new wp.media.controller.EditImage({image:this.image,selection:this.options.selection})])},imageDetailsContent:function(a){a.view=new wp.media.view.ImageDetails({controller:this,model:this.state().image,attachment:this.state().image.attachment})},editImageContent:function(){var a,b=this.state(),c=b.get("image");c&&(a=new wp.media.view.EditImage({model:c,controller:this}).render(),this.content.set(a),a.loadEditor())},renderImageDetailsToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{select:{style:"primary",text:f.update,priority:80,click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))},renderReplaceImageToolbar:function(){var a=this,b=a.lastState(),c=b&&b.id;this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{back:{text:f.back,priority:20,click:function(){c?a.setState(c):a.close()}},replace:{style:"primary",text:f.replace,priority:80,click:function(){var a=this.controller,b=a.state(),c=b.get("selection"),d=c.single();a.close(),a.image.changeAttachment(d,b.display(d)),b.trigger("replace",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))}}),b.exports=d},{}],45:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({initialize:function(){this.counts={audio:{count:wp.media.view.settings.attachmentCounts.audio,state:"playlist"},video:{count:wp.media.view.settings.attachmentCounts.video,state:"video-playlist"}},_.defaults(this.options,{multiple:!0,editing:!1,state:"insert",metadata:{}}),e.prototype.initialize.apply(this,arguments),this.createIframeStates()},createStates:function(){var a=this.options;this.states.add([new f({id:"insert",title:g.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:wp.media.query(a.library),multiple:a.multiple?"reset":!1,editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0}),new f({id:"gallery",title:g.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},a.library))}),new wp.media.controller.Embed({metadata:a.metadata}),new wp.media.controller.EditImage({model:a.editImage}),new wp.media.controller.GalleryEdit({library:a.selection,editing:a.editing,menu:"gallery"}),new wp.media.controller.GalleryAdd,new f({id:"playlist",title:g.createPlaylistTitle,priority:60,toolbar:"main-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"audio"},a.library))}),new wp.media.controller.CollectionEdit({type:"audio",collectionType:"playlist",title:g.editPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:a.selection,editing:a.editing,menu:"playlist",dragInfoText:g.playlistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"audio",collectionType:"playlist",title:g.addToPlaylistTitle}),new f({id:"video-playlist",title:g.createVideoPlaylistTitle,priority:60,toolbar:"main-video-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({ -type:"video"},a.library))}),new wp.media.controller.CollectionEdit({type:"video",collectionType:"playlist",title:g.editVideoPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:a.selection,editing:a.editing,menu:"video-playlist",dragInfoText:g.videoPlaylistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"video",collectionType:"playlist",title:g.addToVideoPlaylistTitle})]),wp.media.view.settings.post.featuredImageId&&this.states.add(new wp.media.controller.FeaturedImage)},bindHandlers:function(){var a,b;e.prototype.bindHandlers.apply(this,arguments),this.on("activate",this.activate,this),b=_.find(this.counts,function(a){return 0===a.count}),"undefined"!=typeof b&&this.listenTo(wp.media.model.Attachments.all,"change:type",this.mediaTypeCounts),this.on("menu:create:gallery",this.createMenu,this),this.on("menu:create:playlist",this.createMenu,this),this.on("menu:create:video-playlist",this.createMenu,this),this.on("toolbar:create:main-insert",this.createToolbar,this),this.on("toolbar:create:main-gallery",this.createToolbar,this),this.on("toolbar:create:main-playlist",this.createToolbar,this),this.on("toolbar:create:main-video-playlist",this.createToolbar,this),this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this),a={menu:{"default":"mainMenu",gallery:"galleryMenu",playlist:"playlistMenu","video-playlist":"videoPlaylistMenu"},content:{embed:"embedContent","edit-image":"editImageContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar","main-playlist":"mainPlaylistToolbar","playlist-edit":"playlistEditToolbar","playlist-add":"playlistAddToolbar","main-video-playlist":"mainVideoPlaylistToolbar","video-playlist-edit":"videoPlaylistEditToolbar","video-playlist-add":"videoPlaylistAddToolbar"}},_.each(a,function(a,b){_.each(a,function(a,c){this.on(b+":render:"+c,this[a],this)},this)},this)},activate:function(){_.each(this.counts,function(a){a.count<1&&this.menuItemVisibility(a.state,"hide")},this)},mediaTypeCounts:function(a,b){"undefined"!=typeof this.counts[b]&&this.counts[b].count<1&&(this.counts[b].count++,this.menuItemVisibility(this.counts[b].state,"show"))},mainMenu:function(a){a.set({"library-separator":new wp.media.View({className:"separator",priority:100})})},menuItemVisibility:function(a,b){var c=this.menu.get();"hide"===b?c.hide(a):"show"===b&&c.show(a)},galleryMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelGalleryTitle,priority:20,click:function(){c?d.setState(c):d.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},playlistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},videoPlaylistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelVideoPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},embedContent:function(){var a=new wp.media.view.Embed({controller:this,model:this.state()}).render();this.content.set(a),wp.media.isTouchDevice||a.url.focus()},editSelectionContent:function(){var a,b=this.state(),c=b.get("selection");a=new wp.media.view.AttachmentsBrowser({controller:this,collection:c,selection:c,model:b,sortable:!0,search:!1,date:!1,dragInfo:!0,AttachmentView:wp.media.view.Attachments.EditSelection}).render(),a.toolbar.set("backToLibrary",{text:g.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse")}}),this.content.set(a),this.trigger("edit:selection",this)},editImageContent:function(){var a=this.state().get("image"),b=new wp.media.view.EditImage({model:a,controller:this}).render();this.content.set(b),b.loadEditor()},selectionStatusToolbar:function(a){var b=this.state().get("editable");a.set("selection",new wp.media.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:b&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("insert",{style:"primary",priority:80,text:g.insertIntoPost,requires:{selection:!0},click:function(){var a=b.state(),c=a.get("selection");b.close(),a.trigger("insert",c).reset()}})},mainGalleryToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("gallery",{style:"primary",text:g.createNewGallery,priority:60,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("gallery-edit"),d=a.where({type:"image"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("gallery-edit"),this.controller.modal.focusManager.focus()}})},mainPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("playlist",{style:"primary",text:g.createNewPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("playlist-edit"),d=a.where({type:"audio"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("playlist-edit"),this.controller.modal.focusManager.focus()}})},mainVideoPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("video-playlist",{style:"primary",text:g.createNewVideoPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("video-playlist-edit"),d=a.where({type:"video"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("video-playlist-edit"),this.controller.modal.focusManager.focus()}})},featuredImageToolbar:function(a){this.createSelectToolbar(a,{text:g.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(a){a.view=new wp.media.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateGallery:g.insertGallery,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToGallery,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("gallery-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("gallery-edit")}}}}))},playlistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updatePlaylist:g.insertPlaylist,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},playlistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToPlaylist,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("playlist-edit")}}}}))},videoPlaylistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateVideoPlaylist:g.insertVideoPlaylist,priority:140,requires:{library:!0},click:function(){var a=this.controller,b=a.state(),c=b.get("library");c.type="video",a.close(),b.trigger("update",c),a.setState(a.options.state),a.reset()}}}}))},videoPlaylistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToVideoPlaylist,priority:140,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("video-playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("video-playlist-edit")}}}}))}}),b.exports=d},{}],46:[function(a,b,c){var d,e=wp.media.view.MediaFrame,f=wp.media.view.l10n;d=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{selection:[],library:{},multiple:!1,state:"library"}),this.createSelection(),this.createStates(),this.bindHandlers()},createSelection:function(){var a=this.options.selection;a instanceof wp.media.model.Selection||(this.options.selection=new wp.media.model.Selection(a,{multiple:this.options.multiple})),this._selection={attachments:new wp.media.model.Attachments,difference:[]}},createStates:function(){var a=this.options;this.options.states||this.states.add([new wp.media.controller.Library({library:wp.media.query(a.library),multiple:a.multiple,title:a.title,priority:20})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this)},browseRouter:function(a){a.set({upload:{text:f.uploadFilesTitle,priority:20},browse:{text:f.mediaLibraryTitle,priority:40}})},browseContent:function(a){var b=this.state();this.$el.removeClass("hide-toolbar"),a.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:b.get("library"),selection:b.get("selection"),model:b,sortable:b.get("sortable"),search:b.get("searchable"),filters:b.get("filterable"),date:b.get("date"),display:b.has("display")?b.get("display"):b.get("displaySettings"),dragInfo:b.get("dragInfo"),idealColumnWidth:b.get("idealColumnWidth"),suggestedWidth:b.get("suggestedWidth"),suggestedHeight:b.get("suggestedHeight"),AttachmentView:b.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.UploaderInline({controller:this}))},createSelectToolbar:function(a,b){b=b||this.options.button||{},b.controller=this,a.view=new wp.media.view.Toolbar.Select(b)}}),b.exports=d},{}],47:[function(a,b,c){var d=wp.media.View.extend({className:"media-iframe",render:function(){return this.views.detach(),this.$el.html('