Move upgrader_process_complete for core to its proper place in Core_Upgrader.
This means it will be firing as a JS redirect is taking place if the update is from pre-3.4. Acceptable. props dd32. fixes #25659. Built from https://develop.svn.wordpress.org/trunk@25861 git-svn-id: http://core.svn.wordpress.org/trunk@25861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d1482cd0d
commit
de7977d66c
|
@ -0,0 +1 @@
|
||||||
|
.wp-color-result{margin:0 0 6px 6px;padding-left:0;padding-right:30px}.wp-color-result:after{border-radius:0 0 1px 1px;border-left:0;border-right:1px solid #bbb;left:auto;right:0}.wp-color-result:hover{border-color:#aaa}.wp-color-result:hover:after{border-left:0;border-right:1px solid #999}.wp-picker-container .button{margin-left:0;margin-right:6px}
|
|
@ -0,0 +1 @@
|
||||||
|
.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f9f9f9;border:1px solid #bbb;border-radius:2px;cursor:pointer;display:inline-block;height:22px;margin:0 6px 6px 0;position:relative;top:1px;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px}.wp-color-result:after{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fefefe),to(#f4f4f4));background-image:-webkit-linear-gradient(top,#fefefe,#f4f4f4);background-image:-moz-linear-gradient(top,#fefefe,#f4f4f4);background-image:-o-linear-gradient(top,#fefefe,#f4f4f4);background-image:linear-gradient(to bottom,#fefefe,#f4f4f4);color:#333;text-shadow:0 1px 0 #fff;border-radius:0 1px 1px 0;border-left:1px solid #bbb;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:hover{border-color:#aaa;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.1)}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-left:1px solid #999}.wp-color-result.wp-picker-open{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{border-color:#dfdfdf;margin-top:6px}input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
#customize-header-actions .button-primary{float:left}#customize-header-actions .spinner{float:left;margin-right:0;margin-left:4px}.customize-control{float:right}.customize-control-radio input,.customize-control-checkbox input{margin-right:0;margin-left:5px}.accordion-section .dropdown{float:right}.accordion-section .dropdown-content{float:right;margin-right:0;margin-left:16px;-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.customize-control .dropdown-arrow{right:auto;left:0;border-color:#ccc;border-style:solid;border-width:1px 0 1px 1px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.customize-control .dropdown-arrow:after{right:auto;left:4px}.customize-control-color .dropdown{margin-right:0;margin-left:5px}.accordion-section input[type=text].color-picker-hex{direction:ltr}.accordion-section .customize-control-image .actions{text-align:left}.customize-control-image .library,.customize-control-image .actions,.accordion-section .customize-control-image .library ul,.accordion-section .customize-control-image .library li,.accordion-section .customize-control-image .library-content{float:right}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
body{direction:rtl;width:99.5%}.rtl #adminmenuback{left:auto;right:0;background-image:none}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px}#plupload-upload-ui{zoom:1}.post-com-count-wrapper a.post-com-count{float:none}#adminmenu .wp-submenu ul{width:99%}#adminmenu .wp-submenu .wp-submenu .wp-submenu,#adminmenu .wp-menu-open .wp-submenu .wp-submenu{border:1px solid #dfdfdf}.folded #adminmenu .wp-submenu{right:30px}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px}div.quicktags-toolbar input{min-width:0}.inline-edit-row fieldset label span.title{float:right}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}p.search-box{float:left}#bh{margin:7px 10px 0 0;float:left}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%}div#dashboard-widgets{padding-right:0;padding-left:1px}.widefat th input{margin:0 5px 0 0}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important}#dashboard_plugins{direction:ltr}#dashboard_plugins h3.hndle{direction:rtl}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%}#post-status-info{height:25px}p.submit{height:22px}.available-theme .action-links li{padding-left:7px;margin-left:7px}form#widgets-filter{position:static}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:-30px}.menu-item-depth-2{margin-left:-60px}.menu-item-depth-3{margin-left:-90px}.menu-item-depth-4{margin-left:-120px}.menu-item-depth-5{margin-left:-150px}.menu-item-depth-6{margin-left:-180px}.menu-item-depth-7{margin-left:-210px}.menu-item-depth-8{margin-left:-240px}.menu-item-depth-9{margin-left:-270px}.menu-item-depth-10{margin-left:-300px}.menu-item-depth-11{margin-left:-330px}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1}.nav-menus-php label{max-width:90%!important}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%}.nav-menus-php .major-publishing-actions .publishing-action{float:none}#wpbody #nav-menu-header label{float:none}#nav-menu-header{margin-top:-10px}#nav-menu-footer{margin-bottom:-20px}#update-nav-menu .publishing-action{max-width:200px}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important}.auto-add-pages{clear:both;float:none}#nav-menus-frame .open-label span{float:none;display:inline-block}#nav-menus-frame .delete-action{float:none}#title-wrap #title-prompt-text{right:0}.screen-reader-text{right:auto;text-indent:-1000em}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
html{background:#f9f9f9}body{background:#fff;color:#333;font-family:sans-serif;margin:2em auto;padding:1em 2em;-webkit-border-radius:3px;border-radius:3px;border:1px solid #dfdfdf;max-width:700px}a{color:#21759b;text-decoration:none}a:hover{color:#d54e21}h1{border-bottom:1px solid #dadada;clear:both;color:#666;font:24px Georgia,"Times New Roman",Times,serif;margin:30px 0 0;padding:0;padding-bottom:7px}h2{font-size:16px}p,li,dd,dt{padding-bottom:2px;font-size:14px;line-height:1.5}code,.code{font-size:14px}ul,ol,dl{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/wordpress-logo.png?ver=20120216);background-size:274px 63px;background-position:top center;background-repeat:no-repeat;height:67px;text-indent:-9999px;outline:0;overflow:hidden;display:block}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#logo a{background-image:url(../images/wordpress-logo-2x.png?ver=20120412);background-size:274px 63px}}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif;width:695px}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;border-bottom:8px solid #fff;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:2px;border:1px #dfdfdf solid;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif}.form-table input[type=text],.form-table input[type=password]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;-webkit-border-radius:3px;border-radius:3px;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}body.rtl{font-family:Tahoma,arial}.rtl h1{font-family:arial;margin:5px -4px 0 0}.rtl ul,.rtl ol{padding:5px 22px 5px 5px}.rtl .step,.rtl th,.rtl .form-table th{text-align:right}.rtl .submit input,.rtl .button,.rtl .button-secondary{margin-right:0}.rtl #dbname,.rtl #uname,.rtl #pwd,.rtl #dbhost,.rtl #prefix,.rtl #user_login,.rtl #admin_email,.rtl #pass1,.rtl #pass2{direction:ltr}
|
|
@ -0,0 +1 @@
|
||||||
|
body#media-upload ul#sidemenu{left:auto;right:0}#search-filter{text-align:left}.align .field label{padding:0 23px 0 0;margin:0 3px 0 1em}.image-align-none-label,.image-align-left-label,.image-align-center-label,.image-align-right-label{background-position:center right}tr.image-size label{margin:0 5px 0 0}.file-error{margin:0 50px 5px 0}.progress{left:auto;right:0}.describe td{padding:0 0 0 5px}#media-upload .describe th.label{text-align:right}.menu_order{float:left}.media-upload-form label.form-help,td.help,#media-upload p.help,#media-upload label.help{font-family:Tahoma,Arial}#gallery-settings #basic th.label{padding:5px 0 5px 5px}#gallery-settings .title,h3.media-title{font-family:Tahoma,Arial}#gallery-settings .describe th.label{text-align:right}#gallery-settings label,#gallery-settings legend{margin-right:0;margin-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#sort-buttons{margin:3px 0 -8px 25px;text-align:left}#sort-buttons #asc,#sort-buttons #showall{padding-left:0;padding-right:5px}#sort-buttons span{margin-right:0;margin-left:25px}
|
|
@ -0,0 +1 @@
|
||||||
|
div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:700;position:relative;border-bottom-width:1px;border-bottom-style:solid}body#media-upload ul#sidemenu{font-weight:400;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden}form{margin:1em}#search-filter{text-align:right}th{position:relative}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:400}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:0;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#library-form .progress,#gallery-form .progress,.insert-gallery,.describe.startopen,.describe.startclosed{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required{text-decoration:none;border:0}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type=text],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:400}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:right;font-size:11px;margin:10px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{width:626px;border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 5px 5px 0}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA}h3.media-title{font-size:1.6em}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:left}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px}#gallery-settings .align .field label{margin:0 1em 0 3px}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px}#sort-buttons a{text-decoration:none}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px}#sort-buttons span{margin-right:25px}p.media-types{margin:1em}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);background-size:22px 15px}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1406,6 +1406,8 @@ class Core_Upgrader extends WP_Upgrader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -891,9 +891,6 @@ function update_core($from, $to) {
|
||||||
// Remove maintenance file, we're done.
|
// Remove maintenance file, we're done.
|
||||||
$wp_filesystem->delete($maintenance_file);
|
$wp_filesystem->delete($maintenance_file);
|
||||||
|
|
||||||
// Has to be in here, rather than the Upgrader as the filter below will override and kill the process before themes get updated on major updates
|
|
||||||
do_action( 'upgrader_process_complete', null, array( 'action' => 'update', 'type' => 'core' ) );
|
|
||||||
|
|
||||||
// If we made it this far:
|
// If we made it this far:
|
||||||
do_action( '_core_updated_successfully', $wp_version );
|
do_action( '_core_updated_successfully', $wp_version );
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){function b(){d.removeClass("top bottom"),d.filter(":visible").first().addClass("top"),d.filter(":visible").last().addClass("bottom").find(e).addClass("bottom")}function c(a){var c=a.closest(".accordion-section"),d=c.closest(".accordion-container").find(".open"),f=c.find(e);c.hasClass("cannot-expand")||(c.hasClass("open")?(c.toggleClass("open"),f.toggle(!0).slideToggle(150)):(d.removeClass("open"),d.find(e).show().slideUp(150),f.toggle(!1).slideToggle(150),c.toggleClass("open")),b())}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(b){("keydown"!==b.type||13===b.which)&&(b.preventDefault(),c(a(this)))}),a(".hide-postbox-tog").click(function(){b()})});var d=a(".accordion-container li.accordion-section"),e=a(".accordion-section-content");b()}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a,b){var c='<a tabindex="0" class="wp-color-result" />',d='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',f='<input type="button" class="button button-small hidden" />',g={options:{defaultColor:!1,change:!1,clear:!1,hide:!0,palettes:!0},_create:function(){if(a.support.iris){var b=this,g=b.element;a.extend(b.options,g.data()),b.initialValue=g.val(),g.addClass("wp-color-picker").hide().wrap(e),b.wrap=g.parent(),b.toggler=a(c).insertBefore(g).css({backgroundColor:b.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),b.pickerContainer=a(d).insertAfter(g),b.button=a(f),b.options.defaultColor?b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString):b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),g.wrap('<span class="wp-picker-input-wrap" />').after(b.button),g.iris({target:b.pickerContainer,hide:!0,width:255,mode:"hsv",palettes:b.options.palettes,change:function(c,d){b.toggler.css({backgroundColor:d.color.toString()}),a.isFunction(b.options.change)&&b.options.change.call(this,c,d)}}),g.val(b.initialValue),b._addListeners(),b.options.hide||b.toggler.click()}},_addListeners:function(){var b=this;b.toggler.click(function(c){c.stopPropagation(),b.element.toggle().iris("toggle"),b.button.toggleClass("hidden"),b.toggler.toggleClass("wp-picker-open"),b.toggler.hasClass("wp-picker-open")?a("body").on("click",{wrap:b.wrap,toggler:b.toggler},b._bodyListener):a("body").off("click",b._bodyListener)}),b.element.change(function(c){var d=a(this),e=d.val();(""===e||"#"===e)&&(b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c))}),b.toggler.on("keyup",function(a){(13===a.keyCode||32===a.keyCode)&&(a.preventDefault(),b.toggler.trigger("click").next().focus())}),b.button.click(function(c){var d=a(this);d.hasClass("wp-picker-clear")?(b.element.val(""),b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c)):d.hasClass("wp-picker-default")&&b.element.val(b.options.defaultColor).change()})},_bodyListener:function(a){a.data.wrap.find(a.target).length||a.data.toggler.click()},color:function(a){return a===b?this.element.iris("option","color"):(this.element.iris("option","color",a),void 0)},defaultColor:function(a){return a===b?this.options.defaultColor:(this.options.defaultColor=a,void 0)}};a.widget("wp.wpColorPicker",g)}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
jQuery(document).ready(function(a){postboxes.add_postbox_toggles("comment");var b=a("#timestamp").html();a(".edit-timestamp").click(function(){return a("#timestampdiv").is(":hidden")&&(a("#timestampdiv").slideDown("normal"),a(".edit-timestamp").hide()),!1}),a(".cancel-timestamp").click(function(){return a("#timestampdiv").slideUp("normal"),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),a("#timestamp").html(b),a(".edit-timestamp").show(),!1}),a(".save-timestamp").click(function(){var b=a("#aa").val(),c=a("#mm").val(),d=a("#jj").val(),e=a("#hh").val(),f=a("#mn").val(),g=new Date(b,c-1,d,e,f);return g.getFullYear()!=b||1+g.getMonth()!=c||g.getDate()!=d||g.getMinutes()!=f?(a(".timestamp-wrap","#timestampdiv").addClass("form-invalid"),!1):(a(".timestamp-wrap","#timestampdiv").removeClass("form-invalid"),a("#timestampdiv").slideUp("normal"),a(".edit-timestamp").show(),a("#timestamp").html(commentL10n.submittedOn+" <b>"+a('#mm option[value="'+c+'"]').text()+" "+d+", "+b+" @ "+e+":"+f+"</b> "),!1)})});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('input[name="background-position-x"]').change(function(){c.css("background-position",a(this).val()+" top")}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).val())}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?(b.open(),void 0):(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first();a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,size:"full"}).done(function(){window.location.reload()})}),b.open(),void 0)})})}(jQuery);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){var b=a("#welcome-panel"),c=a("#wp_welcome_panel-hide"),d=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})};b.hasClass("hidden")&&c.prop("checked")&&b.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",b).click(function(c){c.preventDefault(),b.addClass("hidden"),d(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),c.click(function(){b.toggleClass("hidden",!this.checked),d(this.checked?1:0)}),ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!=a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var b,c=a("#quickpost-action");b=a("#quick-press").submit(function(){return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),"post"==c.val()&&c.val("post-quickpress-publish"),a("#dashboard_quick_press div.inside").load(b.attr("action"),b.serializeArray(),function(){a("#dashboard_quick_press #publishing-action .spinner").hide(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),a("#dashboard_quick_press ul").next("p").remove(),a("#dashboard_quick_press ul").find("li").each(function(){a("#dashboard_recent_drafts ul").prepend(this)}).end().remove(),quickPressLoad()}),!1}),a("#publish").click(function(){c.val("post-quickpress-publish")}),a("#title, #tags-input").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"})},quickPressLoad()});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
jQuery(document).ready(function(a){var b,c,d,e=!1;c=function(){b=a("#media-items").sortable({items:"div.media-item",placeholder:"sorthelper",axis:"y",distance:2,handle:"div.filename",stop:function(){var b=a("#media-items").sortable("toArray"),c=b.length;a.each(b,function(b,d){var f=e?c-b:1+b;a("#"+d+" .menu_order input").val(f)})}})},sortIt=function(){var b=a(".menu_order_input"),c=b.length;b.each(function(b){var d=e?c-b:1+b;a(this).val(d)})},clearAll=function(b){b=b||0,a(".menu_order_input").each(function(){("0"==this.value||b)&&(this.value="")})},a("#asc").click(function(){return e=!1,sortIt(),!1}),a("#desc").click(function(){return e=!0,sortIt(),!1}),a("#clear").click(function(){return clearAll(1),!1}),a("#showall").click(function(){return a("#sort-buttons span a").toggle(),a("a.describe-toggle-on").hide(),a("a.describe-toggle-off, table.slidetoggle").show(),a("img.pinkynail").toggle(!1),!1}),a("#hideall").click(function(){return a("#sort-buttons span a").toggle(),a("a.describe-toggle-on").show(),a("a.describe-toggle-off, table.slidetoggle").hide(),a("img.pinkynail").toggle(!0),!1}),c(),clearAll(),a("#media-items>*").length>1&&(d=wpgallery.getWin(),a("#save-all, #gallery-settings").show(),"undefined"!=typeof d.tinyMCE&&d.tinyMCE.activeEditor&&!d.tinyMCE.activeEditor.isHidden()?(wpgallery.mcemode=!0,wpgallery.init()):a("#insert-gallery").show())}),jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:!1,editor:{},dom:{},is_update:!1,el:{},I:function(a){return document.getElementById(a)},init:function(){var a,b,c,d,e=this,f=e.getWin();if(e.mcemode){for(a=(""+document.location.search).replace(/^\?/,"").split("&"),b={},c=0;c<a.length;c++)d=a[c].split("="),b[unescape(d[0])]=unescape(d[1]);b.mce_rdomain&&(document.domain=b.mce_rdomain),tinymce=f.tinymce,tinyMCE=f.tinyMCE,e.editor=tinymce.EditorManager.activeEditor,e.setup()}},getWin:function(){return window.dialogArguments||opener||parent||top},setup:function(){var a,b,c,d,e,f,g=this,h=g.editor;if(g.mcemode){if(g.el=h.selection.getNode(),"IMG"!=g.el.nodeName||!h.dom.hasClass(g.el,"wpGallery")){if(!(b=h.dom.select("img.wpGallery"))||!b[0])return"1"==getUserSetting("galfile")&&(g.I("linkto-file").checked="checked"),"1"==getUserSetting("galdesc")&&(g.I("order-desc").checked="checked"),getUserSetting("galcols")&&(g.I("columns").value=getUserSetting("galcols")),getUserSetting("galord")&&(g.I("orderby").value=getUserSetting("galord")),jQuery("#insert-gallery").show(),void 0;g.el=b[0]}a=h.dom.getAttrib(g.el,"title"),a=h.dom.decode(a),a?(jQuery("#update-gallery").show(),g.is_update=!0,c=a.match(/columns=['"]([0-9]+)['"]/),d=a.match(/link=['"]([^'"]+)['"]/i),e=a.match(/order=['"]([^'"]+)['"]/i),f=a.match(/orderby=['"]([^'"]+)['"]/i),d&&d[1]&&(g.I("linkto-file").checked="checked"),e&&e[1]&&(g.I("order-desc").checked="checked"),c&&c[1]&&(g.I("columns").value=""+c[1]),f&&f[1]&&(g.I("orderby").value=f[1])):jQuery("#insert-gallery").show()}},update:function(){var a,b=this,c=b.editor,d="";return b.mcemode&&b.is_update?("IMG"==b.el.nodeName&&(d=c.dom.decode(c.dom.getAttrib(b.el,"title")),d=d.replace(/\s*(order|link|columns|orderby)=['"]([^'"]+)['"]/gi,""),d+=b.getSettings(),c.dom.setAttrib(b.el,"title",d),b.getWin().tb_remove()),void 0):(a="[gallery"+b.getSettings()+"]",b.getWin().send_to_editor(a),void 0)},getSettings:function(){var a=this.I,b="";return a("linkto-file").checked&&(b+=' link="file"',setUserSetting("galfile","1")),a("order-desc").checked&&(b+=' order="DESC"',setUserSetting("galdesc","1")),3!=a("columns").value&&(b+=' columns="'+a("columns").value+'"',setUserSetting("galcols",a("columns").value)),"menu_order"!=a("orderby").value&&(b+=' orderby="'+a("orderby").value+'"',setUserSetting("galord",a("orderby").value)),b}};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
!function(a){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27==a.which?inlineEditTax.revert():void 0}),a("a.cancel",c).click(function(){return inlineEditTax.revert()}),a("a.save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13==a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"==a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d=this;return d.revert(),"object"==typeof b&&(b=d.getId(b)),c=a("#inline-edit").clone(!0),rowData=a("#inline_"+b),a("td",c).attr("colspan",a(".widefat:first thead th:visible").length),a(d.what+b).hasClass("alternate")&&a(c).addClass("alternate"),a(d.what+b).hide().after(c),a(':input[name="name"]',c).val(a(".name",rowData).text()),a(':input[name="slug"]',c).val(a(".slug",rowData).text()),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(b){var c,d,e=a('input[name="taxonomy"]').val()||"";return"object"==typeof b&&(b=this.getId(b)),a("table.widefat .spinner").show(),c={action:"inline-save-tax",tax_type:this.type,tax_ID:b,taxonomy:e},d=a("#edit-"+b+" :input").serialize(),c=d+"&"+a.param(c),a.post(ajaxurl,c,function(c){var d,e;a("table.widefat .spinner").hide(),c?-1!=c.indexOf("<tr")?(a(inlineEditTax.what+b).remove(),e=a(c).attr("id"),a("#edit-"+b).before(c).remove(),d=e?a("#"+e):a(inlineEditTax.what+b),d.hide().fadeIn()):a("#edit-"+b+" .inline-edit-save .error").html(c).show():a("#edit-"+b+" .inline-edit-save .error").html(inlineEditL10n.error).show(),a(d).prev("tr").hasClass("alternate")&&a(d).removeClass("alternate")}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");return b&&(a("table.widefat .spinner").hide(),a("#"+b).remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show()),!1},getId:function(b){var c="TR"==b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
jQuery(document).ready(function(a){var b,c,d,e=!1;a("#link_name").focus(),postboxes.add_postbox_toggles("link"),a("#category-tabs a").click(function(){var b=a(this).attr("href");return a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(".tabs-panel").hide(),a(b).show(),"#categories-all"==b?deleteUserSetting("cats"):setUserSetting("cats","pop"),!1}),getUserSetting("cats")&&a('#category-tabs a[href="#categories-pop"]').click(),b=a("#newcat").one("focus",function(){a(this).val("").removeClass("form-input-tip")}),a("#link-category-add-submit").click(function(){b.focus()}),c=function(){if(!e){e=!0;var b=a(this),c=b.is(":checked"),d=b.val().toString();a("#in-link-category-"+d+", #in-popular-link_category-"+d).prop("checked",c),e=!1}},d=function(b,d){a(d.what+" response_data",b).each(function(){var b=a(a(this).text());b.find("label").each(function(){var b,d=a(this),e=d.find("input").val(),f=d.find("input")[0].id,g=a.trim(d.text());a("#"+f).change(c),b=a('<option value="'+parseInt(e,10)+'"></option>').text(g)})})},a("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:d}),a('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")}),a('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")}),"pop"==getUserSetting("cats")&&a('a[href="#categories-pop"]').click(),a("#category-add-toggle").click(function(){return a(this).parents("div:first").toggleClass("wp-hidden-children"),a('#category-tabs a[href="#categories-all"]').click(),a("#newcategory").focus(),!1}),a(".categorychecklist :checkbox").change(c).filter(":checked").change()});
|
|
@ -0,0 +1 @@
|
||||||
|
jQuery(function(a){a("body").bind("click.wp-gallery",function(b){var c,d,e=a(b.target);e.hasClass("wp-set-header")?((window.dialogArguments||opener||parent||top).location.href=e.data("location"),b.preventDefault()):e.hasClass("wp-set-background")&&(c=e.data("attachment-id"),d=a('input[name="attachments['+c+'][image-size]"]:checked').val(),jQuery.post(ajaxurl,{action:"set-background-image",attachment_id:c,size:d},function(){var a=window.dialogArguments||opener||parent||top;a.tb_remove(),a.location.reload()}),b.preventDefault())})});
|
|
@ -0,0 +1 @@
|
||||||
|
function send_to_editor(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=!tinymce.activeEditor||"mce_fullscreen"!=tinymce.activeEditor.id&&"wp_mce_fullscreen"!=tinymce.activeEditor.id?tinymce.get(wpActiveEditor):tinymce.activeEditor);else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;b&&!b.isHidden()?(tinymce.isIE&&b.windowManager.insertimagebookmark&&b.selection.moveToBookmark(b.windowManager.insertimagebookmark),-1!==a.indexOf("[caption")?b.wpSetImgCaption&&(a=b.wpSetImgCaption(a)):-1!==a.indexOf("[gallery")?b.plugins.wpgallery&&(a=b.plugins.wpgallery._do_gallery(a)):0===a.indexOf("[embed")&&b.plugins.wordpress&&(a=b.plugins.wordpress._setEmbed(a)),b.execCommand("mceInsertContent",!1,a)):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a;try{tb_remove()}catch(e){}}var wpActiveEditor,tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>720?720:c,f=0;return a("body.admin-bar").length&&(f=28),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()}),a(document).ready(function(a){a("a.thickbox").click(function(){var a;"undefined"!=typeof tinymce&&tinymce.isIE&&(a=tinymce.get(wpActiveEditor))&&!a.isHidden()&&(a.focus(),a.windowManager.insertimagebookmark=a.selection.getBookmark())})})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
var findPosts;!function(a){findPosts={open:function(b,c){var d=document.documentElement.scrollTop||a(document).scrollTop(),e=a(".ui-find-overlay");return 0==e.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),e.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show().draggable({handle:"#find-posts-head"}).css({top:d+50+"px",left:"50%",marginLeft:"-328px"}),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").html(""),a("#find-posts").draggable("destroy").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").css({"z-index":"999",width:a(document).width()+"px",height:a(document).height()+"px"}).on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.show(),a.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){findPosts.show(a),c.hide()},error:function(a){findPosts.error(a),c.hide()}})},show:function(b){if("string"==typeof b)return this.error({responseText:b}),void 0;var c=wpAjax.parseAjaxResponse(b);c.errors&&this.error({responseText:wpAjax.broken}),c=c.responses[0],a("#find-posts-response").html(c.data),a(".found-posts td").on("click",function(){a(this).parent().find(".found-radio input").prop("checked",!0)})},error:function(b){var c=b.statusText;b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#find-posts-response").html(c)}},a(document).ready(function(){a("#find-posts-submit").click(function(b){""==a("#find-posts-response").html()&&b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){return 13==a.which?(findPosts.send(),!1):void 0}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){"attach"==a(this).val()&&(b.preventDefault(),findPosts.open())})})}),a(window).resize(function(){findPosts.overlay()})}(jQuery);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{};var passwordStrength;!function(a){wp.passwordStrength={meter:function(b,c,d){if(a.isArray(c)||(c=[c.toString()]),b!=d&&d&&d.length>0)return 5;var e=zxcvbn(b,c);return e.score},userInputBlacklist:function(){var b,c,d,e,f=[],g=[],h=["user_login","first_name","last_name","nickname","display_name","email","url","description","weblog_title","admin_email"];for(f.push(document.title),f.push(document.URL),c=h.length,b=0;c>b;b++)e=a("#"+h[b]),0!=e.length&&(f.push(e[0].defaultValue),f.push(e.val()));for(d=f.length,b=0;d>b;b++)f[b]&&(g=g.concat(f[b].replace(/\W/g," ").split(" ")));return g=a.grep(g,function(b,c){return""==b||4>b.length?!1:a.inArray(b,g)===c})}},passwordStrength=wp.passwordStrength.meter}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>720?720:c,f=0;return a("body.admin-bar").length&&(f=28),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()}),a("#dashboard_plugins, .plugins").on("click","a.thickbox",function(){return tb_click.call(this),a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"}),a("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+a(this).attr("title")),!1}),a("#plugin-information #sidemenu a").click(function(){var b=a(this).attr("name");return a("#plugin-information-header a.current").removeClass("current"),a(this).addClass("current"),a("#section-holder div.section").hide(),a("#section-"+b).show(),!1}),a("a.install-now").click(function(){return confirm(plugininstallL10n.ays)})});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
var postboxes;!function(a){postboxes={add_postbox_toggles:function(b,c){var d=this;d.init(b,c),a(".postbox h3, .postbox .handlediv").bind("click.postboxes",function(){var c=a(this).parent(".postbox"),e=c.attr("id");"dashboard_browser_nag"!=e&&(c.toggleClass("closed"),"press-this"!=b&&d.save_state(b),e&&(!c.hasClass("closed")&&a.isFunction(postboxes.pbshow)?d.pbshow(e):c.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&d.pbhide(e)))}),a(".postbox h3 a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").bind("click.postboxes",function(){var b=a(this).parents(".postbox").attr("id")+"-hide";return a("#"+b).prop("checked",!1).triggerHandler("click"),!1}),a(".hide-postbox-tog").bind("click.postboxes",function(){var c=a(this).val();a(this).prop("checked")?(a("#"+c).show(),a.isFunction(postboxes.pbshow)&&d.pbshow(c)):(a("#"+c).hide(),a.isFunction(postboxes.pbhide)&&d.pbhide(c)),d.save_state(b),d._mark_area()}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var c=parseInt(a(this).val(),10);c&&(d._pb_edit(c),d.save_order(b))})},init:function(b,c){var d=a(document.body).hasClass("mobile");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(){return a(this).find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?(a(this).sortable("cancel"),void 0):(postboxes.save_order(b),void 0)},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()},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.className=c.className.replace(/columns-\d+/,"columns-"+b)},_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);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
function WPSetAsThumbnail(a,b){var c=jQuery("a#wp-post-thumbnail-"+a);c.text(setPostThumbnailL10n.saving),jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:a,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(b){var d=window.dialogArguments||opener||parent||top;c.text(setPostThumbnailL10n.setThumbnail),"0"==b?alert(setPostThumbnailL10n.error):(jQuery("a.wp-post-thumbnail").show(),c.text(setPostThumbnailL10n.done),c.fadeOut(2e3),d.WPSetThumbnailID(a),d.WPSetThumbnailHTML(b))})}
|
|
@ -0,0 +1 @@
|
||||||
|
jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return validateForm(b)?(a.post(ajaxurl,a("#addtag").serialize(),function(c){a("#ajax-response").empty();var d=wpAjax.parseAjaxResponse(c,"ajax-response");if(d&&!d.errors){var e=b.find("select#parent").val();if(e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(var f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+=" ";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1):!1})});
|
|
@ -0,0 +1 @@
|
||||||
|
var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var b,c,d=a("#TB_window"),e=a(window).height(),f=a(window).width();b=tbWidth&&f-90>tbWidth?tbWidth:f-90,c=tbHeight&&e-60>tbHeight?tbHeight:e-60,d.size()&&(d.width(b).height(c),a("#TB_iframeContent").width(b).height(c-27),d.css({"margin-left":"-"+parseInt(b/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&d.css({top:"30px","margin-top":"0"}))},thickDims(),a(window).resize(function(){thickDims()}),a("a.thickbox-preview").click(function(){tb_click.call(this);var b,c,d=a(this).parents(".available-theme").find(".activatelink"),e="",f=a(this).attr("href");return tbWidth=(tbWidth=f.match(/&tbWidth=[0-9]+/))?parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10):a(window).width()-90,tbHeight=(tbHeight=f.match(/&tbHeight=[0-9]+/))?parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10):a(window).height()-60,d.length?(b=d.attr("href")||"",c=d.attr("title")||"",e=' <a href="'+b+'" target="_top" class="tb-theme-preview-link">'+c+"</a>"):(c=a(this).attr("title")||"",e=' <span class="tb-theme-preview-link">'+c+"</span>"),a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"}),a("#TB_closeAjaxWindow").css({"float":"left"}),a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e),a("#TB_iframeContent").width("100%"),thickDims(),!1})});
|
|
@ -0,0 +1 @@
|
||||||
|
jQuery(function(a){a("#availablethemes").on("click",".theme-detail",function(b){var c=a(this).closest(".available-theme"),d=c.find(".themedetaildiv");d.length||(d=c.find(".install-theme-info .theme-details"),d=d.clone().addClass("themedetaildiv").appendTo(c).hide()),d.toggle(),b.preventDefault()})});var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("body.admin-bar").length&&(f=28),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})}),jQuery(function(a){if(window.postMessage){var b=a("#theme-installer"),c=b.find(".install-theme-info"),d=b.find(".wp-full-overlay-main"),e=a(document.body);b.on("click",".close-full-overlay",function(a){b.fadeOut(200,function(){d.empty(),e.removeClass("theme-installer-active full-overlay-active")}),a.preventDefault()}),b.on("click",".collapse-sidebar",function(a){b.toggleClass("collapsed").toggleClass("expanded"),a.preventDefault()}),a("#availablethemes").on("click",".install-theme-preview",function(f){var g;c.html(a(this).closest(".installable-theme").find(".install-theme-info").html()),g=c.find(".theme-preview-url").val(),d.html('<iframe src="'+g+'" />'),b.fadeIn(200,function(){e.addClass("theme-installer-active full-overlay-active")}),f.preventDefault()})}});var ThemeViewer;!function(a){ThemeViewer=function(){function b(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){return a("#filter-click").toggleClass("current"),a("#filter-box").slideToggle(),a("#current-theme").slideToggle(300),!1}),a("#filter-box :checkbox").unbind("click").click(function(){var b=a("#filter-box :checked").length,c=a("#filter-click").text();-1!=c.indexOf("(")&&(c=c.substr(0,c.indexOf("("))),0==b?a("#filter-click").text(c):a("#filter-click").text(c+" ("+b+")")})}var c={init:b};return c}}(jQuery),jQuery(document).ready(function(){theme_viewer=new ThemeViewer,theme_viewer.init()});var ThemeScroller;!function(a){ThemeScroller={querying:!1,scrollPollingDelay:500,failedRetryDelay:4e3,outListBottomThreshold:300,init:function(){var b=this;return"undefined"==typeof ajaxurl||"undefined"==typeof list_args||"undefined"==typeof theme_list_args?(a(".pagination-links").show(),void 0):(this.nonce=a("#_ajax_fetch_list_nonce").val(),this.nextPage=theme_list_args.paged+1,this.$outList=a("#availablethemes"),this.$spinner=a("div.tablenav.bottom").children(".spinner"),this.$window=a(window),this.$document=a(document),theme_list_args.total_pages>=this.nextPage&&(this.pollInterval=setInterval(function(){return b.poll()},this.scrollPollingDelay)),void 0)},poll:function(){var a=this.$document.scrollTop()+this.$window.innerHeight();this.querying||a<this.$outList.height()-this.outListBottomThreshold||this.ajax()},process:function(a){return void 0===a?(clearInterval(this.pollInterval),void 0):(this.nextPage>theme_list_args.total_pages&&clearInterval(this.pollInterval),this.nextPage<=theme_list_args.total_pages+1&&this.$outList.append(a.rows),void 0)},ajax:function(){var b=this;this.querying=!0;var c={action:"fetch-list",paged:this.nextPage,s:theme_list_args.search,tab:theme_list_args.tab,type:theme_list_args.type,_ajax_fetch_list_nonce:this.nonce,"features[]":theme_list_args.features,list_args:list_args};this.$spinner.show(),a.getJSON(ajaxurl,c).done(function(a){b.nextPage++,b.process(a),b.$spinner.hide(),b.querying=!1}).fail(function(){b.$spinner.hide(),b.querying=!1,setTimeout(function(){b.ajax()},b.failedRetryDelay)})}},a(document).ready(function(){ThemeScroller.init()})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){function b(){var b,c=a("#pass1").val(),d=(a("#user_login").val(),a("#pass2").val());if(a("#pass-strength-result").removeClass("short bad good strong"),!c)return a("#pass-strength-result").html(pwsL10n.empty),void 0;switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),d)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}a(document).ready(function(){var c=a("#display_name");a("#pass1").val("").keyup(b),a("#pass2").val("").keyup(b),a("#pass-strength-result").show(),a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').prop("checked",!0)}),c.length&&a("#first_name, #last_name, #nickname").bind("blur.user_profile",function(){var b=[],d={display_nickname:a("#nickname").val()||"",display_username:a("#user_login").val()||"",display_firstname:a("#first_name").val()||"",display_lastname:a("#last_name").val()||""};d.display_firstname&&d.display_lastname&&(d.display_firstlast=d.display_firstname+" "+d.display_lastname,d.display_lastfirst=d.display_lastname+" "+d.display_firstname),a.each(a("option",c),function(a,c){b.push(c.value)}),a.each(d,function(e,f){if(f){var g=f.replace(/<\/?[a-z][^>]*>/gi,"");d[e].length&&-1==a.inArray(g,b)&&(b.push(g),a("<option />",{text:g}).appendTo(c))}})})})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){var b="undefined"!=typeof current_site_id?"&site_id="+current_site_id:"";a(document).ready(function(){a(".wp-suggest-user").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=add"+b,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){a(this).addClass("open")},close:function(){a(this).removeClass("open")}})})}(jQuery);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
!function(a,b){wpWordCount={settings:{strip:/<[a-zA-Z\/][^<>]*>/g,clean:/[0-9.(),;:!?%#$¿'"_+=\\/-]+/g,w:/\S\s+/g,c:/\S/g},block:0,wc:function(c,d){var e=this,f=a(".word-count"),g=0;d===b&&(d=wordCountL10n.type),"w"!==d&&"c"!==d&&(d="w"),e.block||(e.block=1,setTimeout(function(){c&&(c=c.replace(e.settings.strip," ").replace(/ | /gi," "),c=c.replace(e.settings.clean,""),c.replace(e.settings[d],function(){g++})),f.html(g.toString()),setTimeout(function(){e.block=0},2e3)},1))}},a(document).bind("wpcountwords",function(a,b){wpWordCount.wc(b)})}(jQuery);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
jQuery(document).ready(function(a){a("#link_rel").prop("readonly",!0),a("#linkxfndiv input").bind("click keyup",function(){var b=a("#me").is(":checked"),c="";a("input.valinp").each(function(){b?a(this).prop("disabled",!0).parent().addClass("disabled"):(a(this).removeAttr("disabled").parent().removeClass("disabled"),a(this).is(":checked")&&""!=a(this).val()&&(c+=a(this).val()+" "))}),a("#link_rel").val(b?"me":c.substr(0,c.length-1))})});
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The base configurations of the WordPress.
|
||||||
|
*
|
||||||
|
* This file has the following configurations: MySQL settings, Table Prefix,
|
||||||
|
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
|
||||||
|
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
|
||||||
|
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
|
||||||
|
*
|
||||||
|
* This file is used by the wp-config.php creation script during the
|
||||||
|
* installation. You don't have to use the web site, you can just copy this file
|
||||||
|
* to "wp-config.php" and fill in the values.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ** MySQL settings - You can get this info from your web host ** //
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
define('DB_NAME', 'database_name_here');
|
||||||
|
|
||||||
|
/** MySQL database username */
|
||||||
|
define('DB_USER', 'username_here');
|
||||||
|
|
||||||
|
/** MySQL database password */
|
||||||
|
define('DB_PASSWORD', 'password_here');
|
||||||
|
|
||||||
|
/** MySQL hostname */
|
||||||
|
define('DB_HOST', 'localhost');
|
||||||
|
|
||||||
|
/** Database Charset to use in creating database tables. */
|
||||||
|
define('DB_CHARSET', 'utf8');
|
||||||
|
|
||||||
|
/** The Database Collate type. Don't change this if in doubt. */
|
||||||
|
define('DB_COLLATE', '');
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* Authentication Unique Keys and Salts.
|
||||||
|
*
|
||||||
|
* Change these to different unique phrases!
|
||||||
|
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
||||||
|
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
define('AUTH_KEY', 'put your unique phrase here');
|
||||||
|
define('SECURE_AUTH_KEY', 'put your unique phrase here');
|
||||||
|
define('LOGGED_IN_KEY', 'put your unique phrase here');
|
||||||
|
define('NONCE_KEY', 'put your unique phrase here');
|
||||||
|
define('AUTH_SALT', 'put your unique phrase here');
|
||||||
|
define('SECURE_AUTH_SALT', 'put your unique phrase here');
|
||||||
|
define('LOGGED_IN_SALT', 'put your unique phrase here');
|
||||||
|
define('NONCE_SALT', 'put your unique phrase here');
|
||||||
|
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Database Table prefix.
|
||||||
|
*
|
||||||
|
* You can have multiple installations in one database if you give each a unique
|
||||||
|
* prefix. Only numbers, letters, and underscores please!
|
||||||
|
*/
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Localized Language, defaults to English.
|
||||||
|
*
|
||||||
|
* Change this to localize WordPress. A corresponding MO file for the chosen
|
||||||
|
* language must be installed to wp-content/languages. For example, install
|
||||||
|
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
|
||||||
|
* language support.
|
||||||
|
*/
|
||||||
|
define('WPLANG', '');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For developers: WordPress debugging mode.
|
||||||
|
*
|
||||||
|
* Change this to true to enable the display of notices during development.
|
||||||
|
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||||
|
* in their development environments.
|
||||||
|
*/
|
||||||
|
define('WP_DEBUG', false);
|
||||||
|
|
||||||
|
/* That's all, stop editing! Happy blogging. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
if ( !defined('ABSPATH') )
|
||||||
|
define('ABSPATH', dirname(__FILE__) . '/');
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once(ABSPATH . 'wp-settings.php');
|
|
@ -0,0 +1 @@
|
||||||
|
#wpadminbar *{font-family:Tahoma,Arial,Helvetica,sans-serif}#wpadminbar{direction:rtl;font-family:Tahoma,Arial,Helvetica,sans-serif;left:auto;right:0}#wpadminbar .quicklinks ul{text-align:right}#wpadminbar li{float:right}#wpadminbar .quicklinks>ul>li{border-right:0;border-left:1px solid #555}#wpadminbar .quicklinks>ul>li>a,#wpadminbar .quicklinks>ul>li>.ab-empty-item{border-right:0;border-left:1px solid #333}#wpadminbar .quicklinks .ab-top-secondary>li{border-left:0;border-right:1px solid #333;float:left}#wpadminbar .quicklinks .ab-top-secondary>li>a,#wpadminbar .quicklinks .ab-top-secondary>li>.ab-empty-item{border-right:1px solid #555;border-left:0}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0 -1px 0 0}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{left:auto;right:0}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{right:auto;left:0;margin:0 0 0 -1px}#wpadminbar .menupop li:hover>.ab-sub-wrapper,#wpadminbar .menupop li.hover>.ab-sub-wrapper{margin-left:0;margin-right:100%}#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper{margin-left:inherit;margin-right:0;left:100%;right:inherit}#wpadminbar .menupop .menupop>.ab-item{background-position:5% -46px;padding-left:2em;padding-right:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{background-position:95% -20px;padding-left:1em;padding-right:2em}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{right:0;left:auto}#wpadminbar .ab-top-secondary{float:left;right:auto;left:0}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{border-left:0}#wpadminbar .screen-reader-shortcut:focus{left:auto;right:6px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-right:88px;margin-left:16px}#wp-admin-bar-user-actions>li>.ab-item{padding-left:0;padding-right:8px}#wp-admin-bar-user-info .avatar{left:auto;right:-72px}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{margin-left:-1px;margin-right:4px}#wpadminbar .quicklinks li .blavatar{margin-right:0;margin-left:4px}#wpadminbar #adminbarsearch .adminbar-input{font-family:Tahoma,Arial,Helvetica,sans-serif;padding:0 24px 0 3px;margin:0;background-position:50% 2px}#wpadminbar #adminbarsearch .adminbar-input:focus,#wpadminbar.ie7 #adminbarsearch .adminbar-input{background-position:99% 2px}#wpadminbar .ab-icon{float:right}.ie7 #wp-admin-bar-wp-logo>.ab-item .ab-icon{position:static}#wpadminbar.ie7 .ab-icon{float:left;left:12px}#wpadminbar .ab-label{margin-left:0;margin-right:4px;float:left}#wpadminbar.ie7 .ab-label{margin-right:0}#wpadminbar.ie7 #wp-admin-bar-comments>a{min-width:25px}#wpadminbar a:hover .ab-comments-icon-arrow{border-right-color:#bbb}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{right:0}#wpadminbar .quicklinks .menupop ul li a{position:relative}* html #wpadminbar .quicklinks ul li a{float:right}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
||||||
|
/*!
|
||||||
|
* jQuery UI CSS Framework 1.10.1
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Theming/API
|
||||||
|
*/.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}/*!
|
||||||
|
* jQuery UI Resizable 1.10.1
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Resizable#theming
|
||||||
|
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}/*!
|
||||||
|
* jQuery UI Dialog 1.10.1
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Dialog#theming
|
||||||
|
*/.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.wp-dialog{padding:0;z-index:300002;border:1px solid #999;-webkit-box-shadow:0 0 16px rgba(0,0,0,.3);box-shadow:0 0 16px rgba(0,0,0,.3);background-color:#f5f5f5;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:1px 0 2px}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-weight:700;font-size:11px;line-height:18px;color:#e5e5e5;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.wp-dialog .ui-dialog-content{padding:0}.wp-dialog .ui-dialog-titlebar-close{cursor:pointer;-webkit-appearance:none;border:0;width:29px;height:16px;top:13px;right:6px;background:url(../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif) no-repeat -87px -16px}.wp-dialog .ui-dialog-titlebar-close .ui-button-text{display:none}.wp-dialog .ui-dialog-titlebar-close:hover,.wp-dialog .ui-dialog-titlebar-close:focus{background-position:-87px -32px}.ui-widget-overlay{z-index:300001;background-color:#000;opacity:.6;filter:alpha(opacity=60)}
|
|
@ -0,0 +1 @@
|
||||||
|
.media-modal-close{right:auto;left:7px}.media-toolbar-primary{float:left}.media-toolbar-secondary{float:right}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-left:0;margin-right:10px;float:right}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-right:0;margin-left:10px;float:right}.media-sidebar{right:auto;left:0;border-left:0;border-right:1px solid #dfdfdf}.media-sidebar .setting{float:right}.media-sidebar .setting .link-to-custom{direction:ltr}.media-sidebar .setting span{margin-right:0;margin-left:4%}.media-sidebar .setting span,.compat-item label span{float:right;text-align:left}.media-sidebar .setting input,.media-sidebar .setting textarea{float:left}.compat-item{float:right}.compat-item .label{margin-right:0;margin-left:4%;float:right;text-align:left}.compat-item .field{float:left;padding-right:0;padding-left:1px}.media-menu{border-right:0;border-left:1px solid #d9d9d9;box-shadow:inset 6px 0 6px -6px rgba(0,0,0,.2)}.media-router>a{float:right;border-right:0;border-left:1px solid #dfdfdf}.media-router>a:last-child{border-left:0}.media-frame-menu{left:auto;right:0}.media-frame-title,.media-frame-router,.media-frame-content,.media-frame-toolbar{left:0;right:200px}.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-toolbar,.media-frame.hide-menu .media-frame-content{right:0}.media-frame.hide-menu .media-frame-menu{left:auto;right:-200px}.media-frame select.attachment-filters{margin-right:0;margin-left:10px}.media-toolbar-secondary .search{margin-right:0;margin-left:16px}.attachments{padding-right:0;padding-left:16px}.attachment{float:right}.attachment .thumbnail{left:auto;right:0}.attachment .close{right:auto;left:5px}.attachment .check{right:auto;left:-7px}.attachments-browser .media-toolbar{right:0;left:300px}.attachments-browser .attachments,.attachments-browser .uploader-inline{right:0;left:300px}.attachment-preview .media-progress-bar{left:auto;right:15%}.media-sidebar .media-uploader-status .upload-dismiss-errors{right:auto;left:0}.upload-errors .upload-error-label{margin-right:0;margin-left:8px;float:right;margin-top:-3px}.media-selection{right:0;left:350px;padding:0 16px 0 0}.media-selection .selection-info{margin-right:0;margin-left:10px}.media-selection .selection-info a{float:right;border-right:0;border-left:1px solid #dfdfdf;margin:1px -8px 1px 8px}.media-selection .selection-info a:last-child{border-right:1px;border-left:0;margin-left:0;margin-right:-8px}.media-selection:after{right:auto;left:0;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:-moz-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:-o-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to right,rgba(255,255,255,1),rgba(255,255,255,0))}.attachment-info .thumbnail{float:right;margin-right:0;margin-left:10px}.attachment-info .details{float:right}.attachment-display-settings{float:right}.embed-url span{display:block;padding:4px 2px 6px 0}.media-embed .thumbnail{float:right}.media-embed .setting{float:right}.media-frame .embed-url input,.media-frame .link-to-custom{direction:ltr}@media only screen and (max-width:900px){.media-frame-title,.media-frame-router,.media-frame-content,.media-frame-toolbar{left:0;right:140px}.attachments-browser .attachments,.attachments-browser .uploader-inline,.attachments-browser .media-toolbar{right:0;left:180px}}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.5;filter:alpha(opacity=50);z-index:1000000}#wp-auth-check-wrap #wp-auth-check{position:fixed;left:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 0 0 -190px;padding:30px 0 0;background-color:#fbfbfb;-webkit-border-radius:3px;border-radius:3px;z-index:1000001}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/wpspin-2x.gif) no-repeat center center;background-size:16px 16px;height:100%}#wp-auth-check-wrap #wp-auth-check-form iframe{height:100%;width:100%;overflow:auto}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:14px;width:14px;cursor:pointer;background-image:url(../images/uploader-icons.png);background-repeat:no-repeat;background-position:-100px 0}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:1px dotted #888}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-fallback,#wp-auth-check-wrap.fallback .wp-auth-check-close{display:block}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#wp-auth-check-wrap .wp-auth-check-close{background-image:url(../images/uploader-icons-2x.png);background-size:134px 15px}}
|
|
@ -0,0 +1 @@
|
||||||
|
.wp-pointer{}.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border-style:solid;border-width:1px;border-color:#dfdfdf;border-color:rgba(0,0,0,.125);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.19);box-shadow:0 2px 4px rgba(0,0,0,.19)}.wp-pointer-content h3{position:relative;margin:0 0 5px;padding:15px 18px 14px 60px;line-height:1.4em;font-size:14px;color:#fff;border-radius:3px 3px 0 0;text-shadow:0 -1px 0 rgba(0,0,0,.3);background:#8cc1e9;background-image:-webkit-gradient(linear,left bottom,left top,from(#72a7cf),to(#8cc1e9));background-image:-webkit-linear-gradient(bottom,#72a7cf,#8cc1e9);background-image:-moz-linear-gradient(bottom,#72a7cf,#8cc1e9);background-image:-o-linear-gradient(bottom,#72a7cf,#8cc1e9);background-image:linear-gradient(to top,#72a7cf,#8cc1e9)}.wp-pointer-content h3:before{position:absolute;top:0;left:15px;content:' ';width:36px;height:100%;background:url(../images/icon-pointer-flag.png) 0 50% no-repeat}.wp-pointer-content p{padding:0 15px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:right;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-left:3px;position:relative}.wp-pointer-buttons a.close:before{content:' ';width:10px;height:100%;position:absolute;left:-10px;background:url(../images/xit.gif) 0 50% no-repeat}.wp-pointer-buttons a.close:hover:before{background-position:100% 50%}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0}.wp-pointer-arrow{z-index:10;background:url(../images/arrow-pointer-blue.png) 0 0 no-repeat}.wp-pointer-arrow-inner{z-index:20}.wp-pointer-top,.wp-pointer-undefined{padding-top:13px}.wp-pointer-bottom{padding-bottom:13px}.wp-pointer-left{padding-left:13px}.wp-pointer-right{padding-right:13px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-bottom .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{left:50px;width:30px;height:14px}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow{top:50%;margin-top:-15px;width:14px;height:30px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{top:0;background-position:0 0}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;background-position:0 -46px}.wp-pointer-left .wp-pointer-arrow{left:0;background-position:0 -15px}.wp-pointer-right .wp-pointer-arrow{right:0;background-position:-16px -15px}.rtl .wp-pointer-content h3{padding-right:60px;padding-left:18px}.rtl .wp-pointer-content h3:before{right:15px}.rtl .wp-pointer-buttons a{float:left}.rtl .wp-pointer-buttons a.close{padding-right:3px;padding-left:0}.rtl .wp-pointer-buttons a.close:before{right:-10px}.rtl .wp-pointer-top .wp-pointer-arrow,.rtl .wp-pointer-bottom .wp-pointer-arrow,.rtl .wp-pointer-undefined .wp-pointer-arrow{right:50px}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-pointer-buttons a.close:before{background-image:url(../images/xit-2x.gif);background-size:20px auto}.wp-pointer-content h3:before{background-image:url(../images/icon-pointer-flag-2x.png);background-size:36px auto}.wp-pointer-arrow{background:url(../images/arrow-pointer-blue-2x.png) 0 0 no-repeat;background-size:30px 60px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{background-position:0 1px}.wp-pointer-bottom .wp-pointer-arrow{background-position:0 -47px}.wp-pointer-left .wp-pointer-arrow{background-position:1px -15px}.wp-pointer-right .wp-pointer-arrow{background-position:-17px -15px}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
addComment={moveForm:function(a,b,c,d){var e,f=this,g=f.I(a),h=f.I(c),i=f.I("cancel-comment-reply-link"),j=f.I("comment_parent"),k=f.I("comment_post_ID");if(g&&h&&i&&j){f.respondId=c,d=d||!1,f.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",h.parentNode.insertBefore(e,h)),g.parentNode.insertBefore(h,g.nextSibling),k&&d&&(k.value=d),j.value=b,i.style.display="",i.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{f.I("comment").focus()}catch(l){}return!1}},I:function(a){return document.getElementById(a)}};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(a,b){var c,d=wp.customize;b.extend(b.support,{history:!(!window.history||!history.pushState),hashchange:"onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7)}),c=b.extend({},d.Events,{initialize:function(){this.body=b(document.body),c.settings&&b.support.postMessage&&(b.support.cors||!c.settings.isCrossDomain)&&(this.window=b(window),this.element=b('<div id="customize-container" />').appendTo(this.body),this.bind("open",this.overlay.show),this.bind("close",this.overlay.hide),b("#wpbody").on("click",".load-customize",function(a){a.preventDefault(),c.link=b(this),c.open(c.link.attr("href"))}),b.support.history&&this.window.on("popstate",c.popstate),b.support.hashchange&&(this.window.on("hashchange",c.hashchange),this.window.triggerHandler("hashchange")))},popstate:function(a){var b=a.originalEvent.state;b&&b.customize?c.open(b.customize):c.active&&c.close()},hashchange:function(){var a=window.location.toString().split("#")[1];a&&0===a.indexOf("wp_customize=on")&&c.open(c.settings.url+"?"+a),a||b.support.history||c.close()},open:function(a){var e;if(!this.active){if(c.settings.browser.mobile)return window.location=a;this.active=!0,this.body.addClass("customize-loading"),this.iframe=b("<iframe />",{src:a}).appendTo(this.element),this.iframe.one("load",this.loaded),this.messenger=new d.Messenger({url:a,channel:"loader",targetWindow:this.iframe[0].contentWindow}),this.messenger.bind("ready",function(){c.messenger.send("back")}),this.messenger.bind("close",function(){b.support.history?history.back():b.support.hashchange?window.location.hash="":c.close()}),this.messenger.bind("activated",function(a){a&&(window.location=a)}),e=a.split("?")[1],b.support.history&&window.location.href!==a?history.pushState({customize:a},"",a):!b.support.history&&b.support.hashchange&&e&&(window.location.hash="wp_customize=on&"+e),this.trigger("open")}},opened:function(){c.body.addClass("customize-active full-overlay-active")},close:function(){this.active&&(this.active=!1,this.trigger("close"),this.link&&this.link.focus())},closed:function(){c.iframe.remove(),c.messenger.destroy(),c.iframe=null,c.messenger=null,c.body.removeClass("customize-active full-overlay-active").removeClass("customize-loading")},loaded:function(){c.body.removeClass("customize-loading")},overlay:{show:function(){this.element.fadeIn(200,c.opened)},hide:function(){this.element.fadeOut(200,c.closed)}}}),b(function(){c.settings=_wpCustomizeLoaderSettings,c.initialize()}),d.Loader=c}(wp,jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a,b){var c,d=wp.customize;c=function(a,b,c){var d;return function(){var e=arguments;c=c||this,clearTimeout(d),d=setTimeout(function(){d=null,a.apply(c,e)},b)}},d.Preview=d.Messenger.extend({initialize:function(a,e){var f=this;d.Messenger.prototype.initialize.call(this,a,e),this.body=b(document.body),this.body.on("click.preview","a",function(a){a.preventDefault(),f.send("scroll",0),f.send("url",b(this).prop("href"))}),this.body.on("submit.preview","form",function(a){a.preventDefault()}),this.window=b(window),this.window.on("scroll.preview",c(function(){f.send("scroll",f.window.scrollTop())},200)),this.bind("scroll",function(a){f.window.scrollTop(a)})}}),b(function(){if(d.settings=window._wpCustomizeSettings,d.settings){var a,c;a=new d.Preview({url:window.location.href,channel:d.settings.channel}),a.bind("settings",function(a){b.each(a,function(a,b){d.has(a)?d(a).set(b):d.create(a,b)})}),a.trigger("settings",d.settings.values),a.bind("setting",function(a){var b;a=a.slice(),(b=d(a.shift()))&&b.set.apply(b,a)}),a.bind("sync",function(c){b.each(c,function(b,c){a.trigger(b,c)}),a.send("synced")}),a.bind("active",function(){d.settings.nonce&&a.send("nonce",d.settings.nonce)}),a.send("ready"),c=b.map(["color","image","position_x","repeat","attachment"],function(a){return"background_"+a}),d.when.apply(d,c).done(function(a,c,d,e,f){var g,h=b(document.body),i=b("head"),j=b("#custom-background-css");(!h.hasClass("custom-background")||j.length)&&(g=function(){var g="";h.toggleClass("custom-background",!(!a()&&!c())),a()&&(g+="background-color: "+a()+";"),c()&&(g+='background-image: url("'+c()+'");',g+="background-position: top "+d()+";",g+="background-repeat: "+e()+";",g+="background-attachment: "+f()+";"),j.remove(),j=b('<style type="text/css" id="custom-background-css">body.custom-background { '+g+" }</style>").appendTo(i)},b.each(arguments,function(){this.bind(g)}))})}})}(wp,jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(a){var b=function(){function b(a){return a?parseInt((new Date).getTime()/1e3):(new Date).getTime()}function c(a){var b,c=a.src;if(c&&/^https?:\/\//.test(c)&&(b=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.host,0!==c.indexOf(b)))return!1;try{if(a.contentWindow.document)return!0}catch(d){}return!1}function d(b){var c;if(b){switch(b){case"abort":break;case"timeout":c=!0;break;case"parsererror":case"error":case"empty":case"unknown":A++,A>2&&(c=!0)}c&&!u.hasConnectionError()&&(D=!0,a(document).trigger("heartbeat-connection-lost",[b]))}else u.hasConnectionError()&&(A=0,D=!1,a(document).trigger("heartbeat-connection-restored"))}function e(){var c,e,g={},h=!0,i="object"==typeof window.heartbeatSettings?window.heartbeatSettings.nonce:"";x=b(),c=a.extend({},y),y={},a(document).trigger("heartbeat-send",[c]);for(e in c)if(c.hasOwnProperty(e)){h=!1;break}return h&&!u.hasConnectionError()?(p=!1,f(),void 0):(g.data=c,g.interval=o/1e3,g._nonce=i,g.action="heartbeat",g.screen_id=v,g.has_focus=B,p=!0,u.xhr=a.ajax({url:w,type:"post",timeout:3e4,data:g,dataType:"json"}).done(function(b,c,e){var f;return b?(u.hasConnectionError()&&d(),b.nonces_expired?(a(document).trigger("heartbeat-nonces-expired"),void 0):(b.heartbeat_interval&&(f=b.heartbeat_interval,delete b.heartbeat_interval),u.tick(b,c,e),f&&u.interval.call(u,f),void 0)):d("empty")}).always(function(){p=!1,f()}).fail(function(a,b,c){d(b||"unknown"),u.error(a,b,c)}),void 0)}function f(){var a=b()-x,c=o;l&&(B?z>0&&q&&(c=q,z--):c=1e5,window.clearTimeout(m),c>a?m=window.setTimeout(function(){l&&e()},c-a):e())}function g(){window.clearTimeout(t),window.clearTimeout(C),t=C=0,B=!1}function h(){window.clearTimeout(t),window.clearTimeout(C),t=C=0,r=b(),B||(B=!0,window.clearTimeout(m),p||f())}function i(){a("iframe").each(function(b,d){c(d)&&(a.data(d,"wp-heartbeat-focus")||(a.data(d,"wp-heartbeat-focus",1),a(d.contentWindow).on("focus.wp-heartbeat-focus",function(){h()}).on("blur.wp-heartbeat-focus",function(){i(),C=window.setTimeout(function(){g()},500)})))})}function j(){s=!1,a(document).off(".wp-heartbeat-active"),a("iframe").each(function(b,d){c(d)&&a(d.contentWindow).off(".wp-heartbeat-active")}),h()}function k(){var d=r?b()-r:0;d>3e5&&B&&g(),s||(a(document).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active",function(){j()}),a("iframe").each(function(b,d){c(d)&&a(d.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active",function(){j()})}),s=!0)}var l,m,n,o,p,q,r,s,t,u=this,v="undefined"!=typeof pagenow?pagenow:"",w="undefined"!=typeof ajaxurl?ajaxurl:"",x=0,y={},z=0,A=0,B=!0,C=-1,D=!1;this.hasConnectionError=function(){return D},"object"==typeof window.heartbeatSettings&&(n=a.extend({},window.heartbeatSettings),w=n.ajaxurl||w,delete n.ajaxurl,delete n.nonce,o=n.interval||15,delete n.interval,15>o?o=15:o>60&&(o=60),o=1e3*o,v=v||n.screenId||"front",delete n.screenId,a.extend(this,n)),a(window).on("blur.wp-heartbeat-focus",function(){i(),t=window.setTimeout(function(){g()},500)}).on("focus.wp-heartbeat-focus",function(){a("iframe").each(function(b,d){c(d)&&(a.removeData(d,"wp-heartbeat-focus"),a(d.contentWindow).off(".wp-heartbeat-focus"))}),h()}),window.setInterval(function(){k()},3e4),a(document).ready(function(){l=!0,x=b(),f()}),this.hasFocus=function(){return B},this.interval=function(a,b){var c,d;if(b=parseInt(b,10)||30,b=1>b||b>30?30:b,a){switch(a){case"fast":d=5,z=b;break;case"slow":d=60,z=0;break;case"long-polling":return o=0,0;default:d=15,z=0}c=o>1e3*d,z>0?q=1e3*d:(o=1e3*d,q=0),c&&f()}return B?q?q/1e3:o/1e3:120},this.enqueue=function(a,b,c){return a?c&&this.isQueued(a)?!1:(y[a]=b,!0):!1},this.isQueued=function(a){return a?y.hasOwnProperty(a):void 0},this.dequeue=function(a){a&&delete y[a]},this.getQueuedItem=function(a){return a?this.isQueued(a)?y[a]:void 0:void 0}};a.extend(b.prototype,{tick:function(b,c,d){a(document).trigger("heartbeat-tick",[b,c,d])},error:function(b,c,d){a(document).trigger("heartbeat-error",[b,c,d])}}),wp.heartbeat=new b}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){a.fn.hoverIntent=function(b,c,d){var e={interval:100,sensitivity:7,timeout:0};e="object"==typeof b?a.extend(e,b):a.isFunction(c)?a.extend(e,{over:b,out:c,selector:d}):a.extend(e,{over:b,out:b,selector:c});var f,g,h,i,j=function(a){f=a.pageX,g=a.pageY},k=function(b,c){return c.hoverIntent_t=clearTimeout(c.hoverIntent_t),Math.abs(h-f)+Math.abs(i-g)<e.sensitivity?(a(c).off("mousemove.hoverIntent",j),c.hoverIntent_s=1,e.over.apply(c,[b])):(h=f,i=g,c.hoverIntent_t=setTimeout(function(){k(b,c)},e.interval),void 0)},l=function(a,b){return b.hoverIntent_t=clearTimeout(b.hoverIntent_t),b.hoverIntent_s=0,e.out.apply(b,[a])},m=function(b){var c=jQuery.extend({},b),d=this;d.hoverIntent_t&&(d.hoverIntent_t=clearTimeout(d.hoverIntent_t)),"mouseenter"==b.type?(h=c.pageX,i=c.pageY,a(d).on("mousemove.hoverIntent",j),1!=d.hoverIntent_s&&(d.hoverIntent_t=setTimeout(function(){k(c,d)},e.interval))):(a(d).off("mousemove.hoverIntent",j),1==d.hoverIntent_s&&(d.hoverIntent_t=setTimeout(function(){l(c,d)},e.timeout)))};return this.on({"mouseenter.hoverIntent":m,"mouseleave.hoverIntent":m},e.selector)}}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
var JSON;JSON||(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
|
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(a){var b={},c={};wp.mce=wp.mce||{},wp.mce.view={defaults:{pattern:{view:Backbone.View,text:function(a){return a.options.original},toView:function(a){if(this.pattern){this.pattern.lastIndex=0;var b=this.pattern.exec(a);if(b)return{index:b.index,content:b[0],options:{original:b[0],results:b}}}}},shortcode:{view:Backbone.View,text:function(a){return a.options.shortcode.string()},toView:function(a){var b=wp.shortcode.next(this.shortcode,a);if(b)return{index:b.index,content:b.content,options:{shortcode:b.shortcode}}}}},add:function(a,d){var e,f,g,h;e=d.extend?wp.mce.view.get(d.extend):d.shortcode?wp.mce.view.defaults.shortcode:wp.mce.view.defaults.pattern,_.defaults(d,e),d.id=a,h={remove:function(){return delete c[this.el.id],this.$el.parent().remove(),f&&f.apply(this,arguments),this}},_.isFunction(d.view)?g=d.view:(g=e.view,f=d.view.remove,_.defaults(h,d.view)),f||g._mceview||(f=g.prototype.remove),d.view=g.extend(h,{_mceview:!0}),b[a]=d},get:function(a){return b[a]},remove:function(a){delete b[a]},toViews:function(a){var c,d=[{content:a}];return _.each(b,function(a,b){c=d.slice(),d=[],_.each(c,function(c){var e,f=c.content;if(c.processed)return d.push(c),void 0;for(;f&&(e=a.toView(f));)e.index&&d.push({content:f.substring(0,e.index)}),d.push({content:wp.mce.view.toView(b,e.options),processed:!0}),f=f.slice(e.index+e.content.length);f&&d.push({content:f})})}),_.pluck(d,"content").join("")},toView:function(b,d){var e,f,g=wp.mce.view.get(b);return g?(e=new g.view(_.extend(d||{},{viewType:b})),f=e.el.id=e.el.id||_.uniqueId("__wpmce-"),c[f]=e,e.$wrapper=a(),wp.html.string({tag:"span"===e.tagName?"span":"div",attrs:{"class":"wp-view-wrap wp-view-type-"+b,"data-wp-view":f,contenteditable:!1}})):""},render:function(b){a(".wp-view-wrap",b).each(function(){var b=a(this),c=wp.mce.view.instance(this);c&&(c.$wrapper=b,c.render(),c.$el.detach(),b.empty().append(c.el).append('<span data-wp-view-end class="wp-view-end"></span>'))})},toText:function(a){return a.replace(/<(?:div|span)[^>]+data-wp-view="([^"]+)"[^>]*>.*?<span[^>]+data-wp-view-end[^>]*><\/span><\/(?:div|span)>/g,function(a,b){var d,e=c[b];return e&&(d=wp.mce.view.get(e.options.viewType)),e&&d?d.text(e):""})},removeInternalAttrs:function(a){var b={};return _.each(a,function(a,c){-1===c.indexOf("data-mce")&&(b[c]=a)}),b},attrs:function(a){return wp.mce.view.removeInternalAttrs(wp.html.attrs(a))},instance:function(b){var d=a(b).data("wp-view");return d?c[d]:void 0},select:function(b){var c=a(b);c.hasClass("selected")||(c.addClass("selected"),a(b.firstChild).trigger("select"))},deselect:function(b){var c=a(b);c.hasClass("selected")&&(c.removeClass("selected"),a(b.firstChild).trigger("deselect"))}}}(jQuery);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(){wp.shortcode={next:function(a,b,c){var d,e,f=wp.shortcode.regexp(a);return f.lastIndex=c||0,(d=f.exec(b))?"["===d[1]&&"]"===d[7]?wp.shortcode.next(a,b,f.lastIndex):(e={index:d.index,content:d[0],shortcode:wp.shortcode.fromMatch(d)},d[1]&&(e.match=e.match.slice(1),e.index++),d[7]&&(e.match=e.match.slice(0,-1)),e):void 0},replace:function(a,b,c){return b.replace(wp.shortcode.regexp(a),function(a,b,d,e,f,g,h,i){if("["===b&&"]"===i)return a;var j=c(wp.shortcode.fromMatch(arguments));return j?b+j+i:a})},string:function(a){return new wp.shortcode(a).string()},regexp:_.memoize(function(a){return new RegExp("\\[(\\[?)("+a+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(a){var b,c,d={},e=[];for(b=/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g,a=a.replace(/[\u00a0\u200b]/g," ");c=b.exec(a);)c[1]?d[c[1].toLowerCase()]=c[2]:c[3]?d[c[3].toLowerCase()]=c[4]:c[5]?d[c[5].toLowerCase()]=c[6]:c[7]?e.push(c[7]):c[8]&&e.push(c[8]);return{named:d,numeric:e}}),fromMatch:function(a){var b;return b=a[4]?"self-closing":a[6]?"closed":"single",new wp.shortcode({tag:a[2],attrs:a[3],type:b,content:a[5]})}},wp.shortcode=_.extend(function(a){_.extend(this,_.pick(a||{},"tag","attrs","type","content"));var b=this.attrs;this.attrs={named:{},numeric:[]},b&&(_.isString(b)?this.attrs=wp.shortcode.attrs(b):_.isEqual(_.keys(b),["named","numeric"])?this.attrs=b:_.each(a.attrs,function(a,b){this.set(b,a)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(a){return this.attrs[_.isNumber(a)?"numeric":"named"][a]},set:function(a,b){return this.attrs[_.isNumber(a)?"numeric":"named"][a]=b,this},string:function(){var a="["+this.tag;return _.each(this.attrs.numeric,function(b){a+=/\s/.test(b)?' "'+b+'"':" "+b}),_.each(this.attrs.named,function(b,c){a+=" "+c+'="'+b+'"'}),"single"===this.type?a+"]":"self-closing"===this.type?a+" /]":(a+="]",this.content&&(a+=this.content),a+"[/"+this.tag+"]")}})}(),function(){wp.html=_.extend(wp.html||{},{attrs:function(a){var b,c;return"/"===a[a.length-1]&&(a=a.slice(0,-1)),b=wp.shortcode.attrs(a),c=b.named,_.each(b.numeric,function(a){/\s/.test(a)||(c[a]="")}),c},string:function(a){var b="<"+a.tag,c=a.content||"";return _.each(a.attrs,function(a,c){b+=" "+c,""!==a&&(_.isBoolean(a)&&(a=a?"true":"false"),b+='="'+a+'"')}),a.single?b+" />":(b+=">",b+=_.isObject(c)?wp.html.string(c):c,b+"</"+a.tag+">")}})}();
|
|
@ -0,0 +1 @@
|
||||||
|
function sack(file){this.xmlhttp=null,this.resetData=function(){this.method="POST",this.queryStringSeparator="?",this.argumentSeparator="&",this.URLString="",this.encodeURIString=!0,this.execute=!1,this.element=null,this.elementObj=null,this.requestFile=file,this.vars=new Object,this.responseStatus=new Array(2)},this.resetFunctions=function(){this.onLoading=function(){},this.onLoaded=function(){},this.onInteractive=function(){},this.onCompletion=function(){},this.onError=function(){},this.onFail=function(){}},this.reset=function(){this.resetFunctions(),this.resetData()},this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){this.xmlhttp=null}}this.xmlhttp||("undefined"!=typeof XMLHttpRequest?this.xmlhttp=new XMLHttpRequest:this.failed=!0)},this.setVar=function(a,b){this.vars[a]=Array(b,!1)},this.encVar=function(a,b,c){return 1==c?Array(encodeURIComponent(a),encodeURIComponent(b)):(this.vars[encodeURIComponent(a)]=Array(encodeURIComponent(b),!0),void 0)},this.processURLString=function(a,b){for(encoded=encodeURIComponent(this.argumentSeparator),regexp=new RegExp(this.argumentSeparator+"|"+encoded),varArray=a.split(regexp),i=0;i<varArray.length;i++)urlVars=varArray[i].split("="),1==b?this.encVar(urlVars[0],urlVars[1]):this.setVar(urlVars[0],urlVars[1])},this.createURLString=function(a){this.encodeURIString&&this.URLString.length&&this.processURLString(this.URLString,!0),a&&(this.URLString.length?this.URLString+=this.argumentSeparator+a:this.URLString=a),this.setVar("rndval",(new Date).getTime()),urlstringtemp=new Array;for(key in this.vars)0==this.vars[key][1]&&1==this.encodeURIString&&(encoded=this.encVar(key,this.vars[key][0],!0),delete this.vars[key],this.vars[encoded[0]]=Array(encoded[1],!0),key=encoded[0]),urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0];this.URLString+=a?this.argumentSeparator+urlstringtemp.join(this.argumentSeparator):urlstringtemp.join(this.argumentSeparator)},this.runResponse=function(){eval(this.response)},this.runAJAX=function(a){if(this.failed)this.onFail();else if(this.createURLString(a),this.element&&(this.elementObj=document.getElementById(this.element)),this.xmlhttp){var b=this;if("GET"==this.method)totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString,this.xmlhttp.open(this.method,totalurlstring,!0);else{this.xmlhttp.open(this.method,this.requestFile,!0);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(c){}}this.xmlhttp.onreadystatechange=function(){switch(b.xmlhttp.readyState){case 1:b.onLoading();break;case 2:b.onLoaded();break;case 3:b.onInteractive();break;case 4:b.response=b.xmlhttp.responseText,b.responseXML=b.xmlhttp.responseXML,b.responseStatus[0]=b.xmlhttp.status,b.responseStatus[1]=b.xmlhttp.statusText,b.execute&&b.runResponse(),b.elementObj&&(elemNodeName=b.elementObj.nodeName,elemNodeName.toLowerCase(),"input"==elemNodeName||"select"==elemNodeName||"option"==elemNodeName||"textarea"==elemNodeName?b.elementObj.value=b.response:b.elementObj.innerHTML=b.response),"200"==b.responseStatus[0]?b.onCompletion():b.onError(),b.URLString=""}},this.xmlhttp.send(this.URLString)}},this.reset(),this.createAJAX()}
|
|
@ -0,0 +1 @@
|
||||||
|
function getUserSetting(a,b){var c=getAllUserSettings();return c.hasOwnProperty(a)?c[a]:"undefined"!=typeof b?b:""}function setUserSetting(a,b,c){if("object"!=typeof userSettings)return!1;var d="wp-settings-"+userSettings.uid,e=wpCookies.getHash(d)||{},f=userSettings.url,g=a.toString().replace(/[^A-Za-z0-9_]/,""),h=b.toString().replace(/[^A-Za-z0-9_]/,"");return c?delete e[g]:e[g]=h,wpCookies.setHash(d,e,31536e3,f),wpCookies.set("wp-settings-time-"+userSettings.uid,userSettings.time,31536e3,f),a}function deleteUserSetting(a){return setUserSetting(a,"",1)}function getAllUserSettings(){return"object"!=typeof userSettings?{}:wpCookies.getHash("wp-settings-"+userSettings.uid)||{}}var wpCookies={each:function(a,b,c){var d,e;if(!a)return 0;if(c=c||a,"undefined"!=typeof a.length){for(d=0,e=a.length;e>d;d++)if(b.call(c,a[d],d,a)===!1)return 0}else for(d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d,a)===!1)return 0;return 1},getHash:function(a){var b,c=this.get(a);return c&&this.each(c.split("&"),function(a){a=a.split("="),b=b||{},b[a[0]]=a[1]}),b},setHash:function(a,b,c,d,e,f){var g="";this.each(b,function(a,b){g+=(g?"&":"")+b+"="+a}),this.set(a,g,c,d,e,f)},get:function(a){var b,c,d=document.cookie,e=a+"=";if(d){if(c=d.indexOf("; "+e),-1==c){if(c=d.indexOf(e),0!=c)return null}else c+=2;return b=d.indexOf(";",c),-1==b&&(b=d.length),decodeURIComponent(d.substring(c+e.length,b))}},set:function(a,b,c,d,e,f){var g=new Date;"object"==typeof c&&c.toGMTString?c=c.toGMTString():parseInt(c,10)?(g.setTime(g.getTime()+1e3*parseInt(c,10)),c=g.toGMTString()):c="",document.cookie=a+"="+encodeURIComponent(b)+(c?"; expires="+c:"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b){this.set(a,"",-1e3,b)}};
|
|
@ -0,0 +1 @@
|
||||||
|
var wpAjax=jQuery.extend({unserialize:function(a){var b,c,d,e,f={};if(!a)return f;b=a.split("?"),b[1]&&(a=b[1]),c=a.split("&");for(d in c)(!jQuery.isFunction(c.hasOwnProperty)||c.hasOwnProperty(d))&&(e=c[d].split("="),f[e[0]]=e[1]);return f},parseAjaxResponse:function(a,b,c){var d={},e=jQuery("#"+b).html(""),f="";return a&&"object"==typeof a&&a.getElementsByTagName("wp_ajax")?(d.responses=[],d.errors=!1,jQuery("response",a).each(function(){var b,e=jQuery(this),g=jQuery(this.firstChild);b={action:e.attr("action"),what:g.get(0).nodeName,id:g.attr("id"),oldId:g.attr("old_id"),position:g.attr("position")},b.data=jQuery("response_data",g).text(),b.supplemental={},jQuery("supplemental",g).children().each(function(){b.supplemental[this.nodeName]=jQuery(this).text()}).size()||(b.supplemental=!1),b.errors=[],jQuery("wp_error",g).each(function(){var e,g,h,i=jQuery(this).attr("code");e={code:i,message:this.firstChild.nodeValue,data:!1},g=jQuery('wp_error_data[code="'+i+'"]',a),g&&(e.data=g.get()),h=jQuery("form-field",g).text(),h&&(i=h),c&&wpAjax.invalidateForm(jQuery("#"+c+' :input[name="'+i+'"]').parents(".form-field:first")),f+="<p>"+e.message+"</p>",b.errors.push(e),d.errors=!0}).size()||(b.errors=!1),d.responses.push(b)}),f.length&&e.html('<div class="error">'+f+"</div>"),d):isNaN(a)?!e.html('<div class="error"><p>'+a+"</p></div>"):(a=parseInt(a,10),-1==a?!e.html('<div class="error"><p>'+wpAjax.noPerm+"</p></div>"):0===a?!e.html('<div class="error"><p>'+wpAjax.broken+"</p></div>"):!0)},invalidateForm:function(a){return jQuery(a).addClass("form-invalid").find("input:visible").change(function(){jQuery(this).closest(".form-invalid").removeClass("form-invalid")})},validateForm:function(a){return a=jQuery(a),!wpAjax.invalidateForm(a.find(".form-required").filter(function(){return""==jQuery("input:visible",this).val()})).size()}},wpAjax||{noPerm:"You do not have permission to do that.",broken:"An unidentified error has occurred."});jQuery(document).ready(function(a){a("form.validate").submit(function(){return wpAjax.validateForm(a(this))})});
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){function b(){var b,d=a("#wp-auth-check"),f=a("#wp-auth-check-form"),g=e.find(".wp-auth-fallback-expired"),h=!1;f.length&&(a(window).on("beforeunload.wp-auth-check",function(a){a.originalEvent.returnValue=window.authcheckL10n.beforeunload}),b=a('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",g.text()),b.load(function(){var b,i;h=!0;try{i=a(this).contents().find("body"),b=i.height()}catch(j){return e.addClass("fallback"),d.css("max-height",""),f.remove(),g.focus(),void 0}b?i&&i.hasClass("interim-login-success")?c():d.css("max-height",b+40+"px"):i&&i.length||(e.addClass("fallback"),d.css("max-height",""),f.remove(),g.focus())}).attr("src",f.data("src")),a("#wp-auth-check-form").append(b)),e.removeClass("hidden"),b?(b.focus(),setTimeout(function(){h||(e.addClass("fallback"),f.remove(),g.focus())},1e4)):g.focus()}function c(){a(window).off("beforeunload.wp-auth-check"),"undefined"==typeof adminpage||"post-php"!=adminpage&&"post-new-php"!=adminpage||"undefined"==typeof wp||!wp.heartbeat||wp.heartbeat.interval("fast",1),e.fadeOut(200,function(){e.addClass("hidden").css("display",""),a("#wp-auth-check-frame").remove()})}function d(){var a=parseInt(window.authcheckL10n.interval,10)||180;f=(new Date).getTime()+1e3*a}var e,f;a(document).on("heartbeat-tick.wp-auth-check",function(a,f){"wp-auth-check"in f&&(d(),!f["wp-auth-check"]&&e.hasClass("hidden")?b():f["wp-auth-check"]&&!e.hasClass("hidden")&&c())}).on("heartbeat-send.wp-auth-check",function(a,b){(new Date).getTime()>f&&(b["wp-auth-check"]=!0)}).ready(function(){d(),e=a("#wp-auth-check-wrap"),e.find(".wp-auth-check-close").on("click",function(){c()})})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(a){wp.Backbone={},wp.Backbone.Subviews=function(a,b){this.view=a,this._views=_.isArray(b)?{"":b}:b||{}},wp.Backbone.Subviews.extend=Backbone.Model.extend,_.extend(wp.Backbone.Subviews.prototype,{all:function(){return _.flatten(this._views)},get:function(a){return a=a||"",this._views[a]},first:function(a){var b=this.get(a);return b&&b.length?b[0]:null},set:function(a,b,c){var d,e;return _.isString(a)||(c=b,b=a,a=""),c=c||{},b=_.isArray(b)?b:[b],d=this.get(a),e=b,d&&(c.add?_.isUndefined(c.at)?e=d.concat(b):(e=d,e.splice.apply(e,[c.at,0].concat(b))):(_.each(e,function(a){a.__detach=!0}),_.each(d,function(a){a.__detach?a.$el.detach():a.remove()}),_.each(e,function(a){delete a.__detach}))),this._views[a]=e,_.each(b,function(b){var c=b.Views||wp.Backbone.Subviews,d=b.views=b.views||new c(b);d.parent=this.view,d.selector=a},this),c.silent||this._attach(a,b,_.extend({ready:this._isReady()},c)),this},add:function(a,b,c){return _.isString(a)||(c=b,b=a,a=""),this.set(a,b,_.extend({add:!0},c))},unset:function(a,b,c){var d;return _.isString(a)||(c=b,b=a,a=""),b=b||[],(d=this.get(a))&&(b=_.isArray(b)?b:[b],this._views[a]=b.length?_.difference(d,b):[]),c&&c.silent||_.invoke(b,"remove"),this},detach:function(){return a(_.pluck(this.all(),"el")).detach(),this},render:function(){var a={ready:this._isReady()};return _.each(this._views,function(b,c){this._attach(c,b,a)},this),this.rendered=!0,this},remove:function(a){return a&&a.silent||(this.parent&&this.parent.views&&this.parent.views.unset(this.selector,this.view,{silent:!0}),delete this.parent,delete this.selector),_.invoke(this.all(),"remove"),this._views=[],this},replace:function(a,b){return a.html(b),this},insert:function(a,b,c){var d,e=c&&c.at;return _.isNumber(e)&&(d=a.children()).length>e?d.eq(e).before(b):a.append(b),this},ready:function(){this.view.trigger("ready"),_.chain(this.all()).map(function(a){return a.views}).flatten().where({attached:!0}).invoke("ready")},_attach:function(a,b,c){var d,e=a?this.view.$(a):this.view.$el;return e.length?(d=_.chain(b).pluck("views").flatten().value(),_.each(d,function(a){a.rendered||(a.view.render(),a.rendered=!0)},this),this[c.add?"insert":"replace"](e,_.pluck(b,"el"),c),_.each(d,function(a){a.attached=!0,c.ready&&a.ready()},this),this):this},_isReady:function(){for(var a=this.view.el;a;){if(a===document.body)return!0;a=a.parentNode}return!1}}),wp.Backbone.View=Backbone.View.extend({Subviews:wp.Backbone.Subviews,constructor:function(){this.views=new this.Subviews(this,this.views),this.on("ready",this.ready,this),Backbone.View.apply(this,arguments)},remove:function(){var a=Backbone.View.prototype.remove.apply(this,arguments);return this.views&&this.views.remove(),a},render:function(){var a;return this.prepare&&(a=this.prepare()),this.views.detach(),this.template&&(a=a||{},this.trigger("prepare",a),this.$el.html(this.template(a))),this.views.render(),this},prepare:function(){return this.options},ready:function(){}})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){var b=function(){var a=document.getElementById("post-revisions"),b=a?a.getElementsByTagName("input"):[];a.onclick=function(){var a,c,d=0;for(a=0;a<b.length;a++)d+=b[a].checked?1:0,c=b[a].getAttribute("name"),b[a].checked||!("left"==c&&1>d||"right"==c&&d>1&&(!b[a-1]||!b[a-1].checked))||b[a+1]&&b[a+1].checked&&"right"==b[a+1].getAttribute("name")?("left"==c||"right"==c)&&(b[a].style.visibility="visible"):b[a].style.visibility="hidden"},a.onclick()};a&&a.addEventListener?a.addEventListener("load",b,!1):a&&a.attachEvent&&a.attachEvent("onload",b)}(window);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
!function(a){var b=0,c=9999;a.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(){return a(this).text()},buttons:function(b,c){var d=wpPointerL10n?wpPointerL10n.dismiss:"Dismiss",e=a('<a class="close" href="#">'+d+"</a>");return e.bind("click.pointer",function(a){a.preventDefault(),c.element.pointer("close")})},position:"top",show:function(a,b){b.pointer.show(),b.opened()},hide:function(a,b){b.pointer.hide(),b.closed()},document:document},_create:function(){var c,d;this.content=a('<div class="wp-pointer-content"></div>'),this.arrow=a('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>'),d=this.element.parents().add(this.element),c="absolute",d.filter(function(){return"fixed"===a(this).css("position")}).length&&(c="fixed"),this.pointer=a("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+b++).addClass(this.options.pointerClass).css({position:c,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(b,c){var d=this.options,e=this.pointer;"document"===b&&c!==d.document?e.detach().appendTo(c.body):"pointerClass"===b&&e.removeClass(d.pointerClass).addClass(c),a.Widget.prototype._setOption.apply(this,arguments),"position"===b?this.reposition():"content"===b&&this.active&&this.update()},destroy:function(){this.pointer.remove(),a.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(b){var c,d=this,e=this.options,f=a.Deferred();if(!e.disabled)return f.done(function(a){d._update(b,a)}),c="string"==typeof e.content?e.content:e.content.call(this.element[0],f.resolve,b,this._handoff()),c&&f.resolve(c),f.promise()},_update:function(a,b){var c,d=this.options;b&&(this.pointer.stop(),this.content.html(b),c=d.buttons.call(this.element[0],a,this._handoff()),c&&c.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content),this.reposition())},reposition:function(){var b;this.options.disabled||(b=this._processPosition(this.options.position),this.pointer.css({top:0,left:0,zIndex:c++}).show().position(a.extend({of:this.element,collision:"fit none"},b)),this.repoint())},repoint:function(){var a,b=this.options;b.disabled||(a="string"==typeof b.position?b.position:b.position.edge,this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,""),this.pointer.addClass("wp-pointer-"+a))},_processPosition:function(b){var c,d={top:"bottom",bottom:"top",left:"right",right:"left"};return c="string"==typeof b?{edge:b+""}:a.extend({},b),c.edge?("top"==c.edge||"bottom"==c.edge?(c.align=c.align||"left",c.at=c.at||c.align+" "+d[c.edge],c.my=c.my||c.align+" "+c.edge):(c.align=c.align||"top",c.at=c.at||d[c.edge]+" "+c.align,c.my=c.my||c.edge+" "+c.align),c):c},open:function(a){var b=this,c=this.options;this.active||c.disabled||this.element.is(":hidden")||this.update().done(function(){b._open(a)})},_open:function(a){var b=this,c=this.options;this.active||c.disabled||this.element.is(":hidden")||(this.active=!0,this._trigger("open",a,this._handoff()),this._trigger("show",a,this._handoff({opened:function(){b._trigger("opened",a,b._handoff())}})))},close:function(a){if(this.active&&!this.options.disabled){var b=this;this.active=!1,this._trigger("close",a,this._handoff()),this._trigger("hide",a,this._handoff({closed:function(){b._trigger("closed",a,b._handoff())}}))}},sendToTop:function(){this.active&&this.pointer.css("z-index",c++)},toggle:function(a){this.pointer.is(":hidden")?this.open(a):this.close(a)},_handoff:function(b){return a.extend({pointer:this.pointer,element:this.element},b)}})}(jQuery);
|
|
@ -0,0 +1 @@
|
||||||
|
window.wp=window.wp||{},function(a){var b="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return c=c||_.template(a("#tmpl-"+b).html(),null,d),c(e)}}),wp.ajax={settings:b.ajax||{},post:function(a,b){return wp.ajax.send({data:_.isObject(a)?a:_.extend(b||{},{action:a})})},send:function(b,c){return _.isObject(b)?c=b:(c=c||{},c.data=_.extend(c.data||{},{action:b})),c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this}),a.Deferred(function(b){c.success&&b.done(c.success),c.error&&b.fail(c.error),delete c.success,delete c.error,a.ajax(c).done(function(a){("1"===a||1===a)&&(a={success:!0}),_.isObject(a)&&!_.isUndefined(a.success)?b[a.success?"resolveWith":"rejectWith"](this,[a.data]):b.rejectWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}).promise()}}}(jQuery);
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Outputs the OPML XML format for getting the links defined in the link
|
||||||
|
* administration. This can be used to export links from one blog over to
|
||||||
|
* another. Links aren't exported by the WordPress export, so this file handles
|
||||||
|
* that.
|
||||||
|
*
|
||||||
|
* This file is not added by default to WordPress theme pages when outputting
|
||||||
|
* feed links. It will have to be added manually for browsers and users to pick
|
||||||
|
* up that this file exists.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once( dirname( __FILE__ ) . '/wp-load.php' );
|
||||||
|
|
||||||
|
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
|
$link_cat = '';
|
||||||
|
if ( !empty($_GET['link_cat']) ) {
|
||||||
|
$link_cat = $_GET['link_cat'];
|
||||||
|
if ( !in_array($link_cat, array('all', '0')) )
|
||||||
|
$link_cat = absint( (string)urldecode($link_cat) );
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<?xml version="1.0"?'.">\n";
|
||||||
|
?>
|
||||||
|
<opml version="1.0">
|
||||||
|
<head>
|
||||||
|
<title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title>
|
||||||
|
<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires in the OPML header.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'opml_head' );
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
if ( empty($link_cat) )
|
||||||
|
$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0));
|
||||||
|
else
|
||||||
|
$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
|
||||||
|
|
||||||
|
foreach ( (array)$cats as $cat ) :
|
||||||
|
/**
|
||||||
|
* Filter the OPML outline link category name.
|
||||||
|
*
|
||||||
|
* @since 2.2.0
|
||||||
|
*
|
||||||
|
* @param string $catname The OPML outline category name.
|
||||||
|
*/
|
||||||
|
$catname = apply_filters( 'link_category', $cat->name );
|
||||||
|
|
||||||
|
?>
|
||||||
|
<outline type="category" title="<?php echo esc_attr($catname); ?>">
|
||||||
|
<?php
|
||||||
|
$bookmarks = get_bookmarks(array("category" => $cat->term_id));
|
||||||
|
foreach ( (array)$bookmarks as $bookmark ) :
|
||||||
|
/**
|
||||||
|
* Filter the OPML outline link title text.
|
||||||
|
*
|
||||||
|
* @since 2.2.0
|
||||||
|
*
|
||||||
|
* @param string $title The OPML outline title text.
|
||||||
|
*/
|
||||||
|
$title = apply_filters( 'link_title', $bookmark->link_name );
|
||||||
|
?>
|
||||||
|
<outline text="<?php echo esc_attr($title); ?>" type="link" xmlUrl="<?php echo esc_attr($bookmark->link_rss); ?>" htmlUrl="<?php echo esc_attr($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
|
||||||
|
<?php
|
||||||
|
endforeach; // $bookmarks
|
||||||
|
?>
|
||||||
|
</outline>
|
||||||
|
<?php
|
||||||
|
endforeach; // $cats
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</opml>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Bootstrap file for setting the ABSPATH constant
|
||||||
|
* and loading the wp-config.php file. The wp-config.php
|
||||||
|
* file will then load the wp-settings.php file, which
|
||||||
|
* will then set up the WordPress environment.
|
||||||
|
*
|
||||||
|
* If the wp-config.php file is not found then an error
|
||||||
|
* will be displayed asking the visitor to set up the
|
||||||
|
* wp-config.php file.
|
||||||
|
*
|
||||||
|
* Will also search for wp-config.php in WordPress' parent
|
||||||
|
* directory to allow the WordPress directory to remain
|
||||||
|
* untouched.
|
||||||
|
*
|
||||||
|
* @internal This file must be parsable by PHP4.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Define ABSPATH as this file's directory */
|
||||||
|
define( 'ABSPATH', dirname(__FILE__) . '/' );
|
||||||
|
|
||||||
|
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
|
||||||
|
|
||||||
|
if ( file_exists( ABSPATH . 'wp-config.php') ) {
|
||||||
|
|
||||||
|
/** The config file resides in ABSPATH */
|
||||||
|
require_once( ABSPATH . 'wp-config.php' );
|
||||||
|
|
||||||
|
} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
|
||||||
|
|
||||||
|
/** The config file resides one level above ABSPATH but is not part of another install */
|
||||||
|
require_once( dirname(ABSPATH) . '/wp-config.php' );
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// A config file doesn't exist
|
||||||
|
|
||||||
|
define( 'WPINC', 'wp-includes' );
|
||||||
|
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
||||||
|
require_once( ABSPATH . WPINC . '/load.php' );
|
||||||
|
require_once( ABSPATH . WPINC . '/version.php' );
|
||||||
|
|
||||||
|
wp_check_php_mysql_versions();
|
||||||
|
wp_load_translations_early();
|
||||||
|
|
||||||
|
// Standardize $_SERVER variables across setups.
|
||||||
|
wp_fix_server_vars();
|
||||||
|
|
||||||
|
require_once( ABSPATH . WPINC . '/functions.php' );
|
||||||
|
|
||||||
|
$path = wp_guess_url() . '/wp-admin/setup-config.php';
|
||||||
|
|
||||||
|
// Die with an error message
|
||||||
|
$die = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';
|
||||||
|
$die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';
|
||||||
|
$die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';
|
||||||
|
$die .= '<p><a href="' . $path . '" class="button button-large">' . __( "Create a Configuration File" ) . '</a>';
|
||||||
|
|
||||||
|
wp_die( $die, __( 'WordPress › Error' ) );
|
||||||
|
}
|
|
@ -0,0 +1,921 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* WordPress User Page
|
||||||
|
*
|
||||||
|
* Handles authentication, registering, resetting passwords, forgot password,
|
||||||
|
* and other user handling.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Make sure that the WordPress bootstrap has run before continuing. */
|
||||||
|
require( dirname(__FILE__) . '/wp-load.php' );
|
||||||
|
|
||||||
|
// Redirect to https login if forced to use SSL
|
||||||
|
if ( force_ssl_admin() && ! is_ssl() ) {
|
||||||
|
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
|
||||||
|
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
|
||||||
|
exit();
|
||||||
|
} else {
|
||||||
|
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output the login page header.
|
||||||
|
*
|
||||||
|
* @param string $title Optional. WordPress Log In Page title to display in <title/> element. Default 'Log In'.
|
||||||
|
* @param string $message Optional. Message to display in header. Default empty.
|
||||||
|
* @param string $wp_error Optional. The error to pass. Default empty.
|
||||||
|
* @param WP_Error $wp_error Optional. WordPress Error Object
|
||||||
|
*/
|
||||||
|
function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||||
|
global $error, $interim_login, $current_site, $action;
|
||||||
|
|
||||||
|
// Don't index any of these forms
|
||||||
|
add_action( 'login_head', 'wp_no_robots' );
|
||||||
|
|
||||||
|
if ( wp_is_mobile() )
|
||||||
|
add_action( 'login_head', 'wp_login_viewport_meta' );
|
||||||
|
|
||||||
|
if ( empty($wp_error) )
|
||||||
|
$wp_error = new WP_Error();
|
||||||
|
|
||||||
|
// Shake it!
|
||||||
|
$shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
|
||||||
|
/**
|
||||||
|
* Filter the error codes array for shaking the login form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $shake_error_codes Error codes that shake the login form.
|
||||||
|
*/
|
||||||
|
$shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
|
||||||
|
|
||||||
|
if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
|
||||||
|
add_action( 'login_head', 'wp_shake_js', 12 );
|
||||||
|
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||||
|
<title><?php bloginfo('name'); ?> › <?php echo $title; ?></title>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
wp_admin_css( 'wp-admin', true );
|
||||||
|
wp_admin_css( 'colors-fresh', true );
|
||||||
|
|
||||||
|
// Remove all stored post data on logging out.
|
||||||
|
// This could be added by add_action('login_head'...) like wp_shake_js()
|
||||||
|
// but maybe better if it's not removable by plugins
|
||||||
|
if ( 'loggedout' == $wp_error->get_error_code() ) {
|
||||||
|
?>
|
||||||
|
<script>if("sessionStorage" in window){try{for(var key in sessionStorage){if(key.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(key)}}}catch(e){}};</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enqueue scripts and styles for the login page.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_enqueue_scripts' );
|
||||||
|
/**
|
||||||
|
* Fires in the login page header after scripts are enqueued.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_head' );
|
||||||
|
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
$login_header_url = network_home_url();
|
||||||
|
$login_header_title = $current_site->site_name;
|
||||||
|
} else {
|
||||||
|
$login_header_url = __( 'http://wordpress.org/' );
|
||||||
|
$login_header_title = __( 'Powered by WordPress' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter link URL of the header logo above login form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*
|
||||||
|
* @param string $login_header_url Login header logo URL.
|
||||||
|
*/
|
||||||
|
$login_header_url = apply_filters( 'login_headerurl', $login_header_url );
|
||||||
|
/**
|
||||||
|
* Filter the title attribute of the header logo above login form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*
|
||||||
|
* @param string $login_header_title Login header logo title attribute.
|
||||||
|
*/
|
||||||
|
$login_header_title = apply_filters( 'login_headertitle', $login_header_title );
|
||||||
|
|
||||||
|
$classes = array( 'login-action-' . $action, 'wp-core-ui' );
|
||||||
|
if ( wp_is_mobile() )
|
||||||
|
$classes[] = 'mobile';
|
||||||
|
if ( is_rtl() )
|
||||||
|
$classes[] = 'rtl';
|
||||||
|
if ( $interim_login ) {
|
||||||
|
$classes[] = 'interim-login';
|
||||||
|
?>
|
||||||
|
<style type="text/css">html{background-color: transparent;}</style>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( 'success' === $interim_login )
|
||||||
|
$classes[] = 'interim-login-success';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the login page body classes.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*
|
||||||
|
* @param array $classes An array of body classes.
|
||||||
|
* @param string $action The action that brought the visitor to the login page.
|
||||||
|
*/
|
||||||
|
$classes = apply_filters( 'login_body_class', $classes, $action );
|
||||||
|
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
||||||
|
<div id="login">
|
||||||
|
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
unset( $login_header_url, $login_header_title );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the message to display above the login form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*
|
||||||
|
* @param string $message Login message text.
|
||||||
|
*/
|
||||||
|
$message = apply_filters( 'login_message', $message );
|
||||||
|
if ( !empty( $message ) )
|
||||||
|
echo $message . "\n";
|
||||||
|
|
||||||
|
// In case a plugin uses $error rather than the $wp_errors object
|
||||||
|
if ( !empty( $error ) ) {
|
||||||
|
$wp_error->add('error', $error);
|
||||||
|
unset($error);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $wp_error->get_error_code() ) {
|
||||||
|
$errors = '';
|
||||||
|
$messages = '';
|
||||||
|
foreach ( $wp_error->get_error_codes() as $code ) {
|
||||||
|
$severity = $wp_error->get_error_data($code);
|
||||||
|
foreach ( $wp_error->get_error_messages($code) as $error ) {
|
||||||
|
if ( 'message' == $severity )
|
||||||
|
$messages .= ' ' . $error . "<br />\n";
|
||||||
|
else
|
||||||
|
$errors .= ' ' . $error . "<br />\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( ! empty( $errors ) ) {
|
||||||
|
/**
|
||||||
|
* Filter the error messages displayed above the login form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*
|
||||||
|
* @param string $errors Login error message.
|
||||||
|
*/
|
||||||
|
echo '<div id="login_error">' . apply_filters( 'login_errors', $errors ) . "</div>\n";
|
||||||
|
}
|
||||||
|
if ( ! empty( $messages ) ) {
|
||||||
|
/**
|
||||||
|
* Filter instructional messages displayed above the login form.
|
||||||
|
*
|
||||||
|
* @since 2.5.0
|
||||||
|
*
|
||||||
|
* @param string $messages Login messages.
|
||||||
|
*/
|
||||||
|
echo '<p class="message">' . apply_filters( 'login_messages', $messages ) . "</p>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // End of login_header()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs the footer for the login page.
|
||||||
|
*
|
||||||
|
* @param string $input_id Which input to auto-focus
|
||||||
|
*/
|
||||||
|
function login_footer($input_id = '') {
|
||||||
|
global $interim_login;
|
||||||
|
|
||||||
|
// Don't allow interim logins to navigate away from the page.
|
||||||
|
if ( ! $interim_login ): ?>
|
||||||
|
<p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php esc_attr_e( 'Are you lost?' ); ?>"><?php printf( __( '← Back to %s' ), get_bloginfo( 'title', 'display' ) ); ?></a></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ( !empty($input_id) ) : ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
|
||||||
|
if(typeof wpOnload=='function')wpOnload();
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires in the login page footer.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_footer' ); ?>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function wp_shake_js() {
|
||||||
|
if ( wp_is_mobile() )
|
||||||
|
return;
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||||
|
function s(id,pos){g(id).left=pos+'px';}
|
||||||
|
function g(id){return document.getElementById(id).style;}
|
||||||
|
function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{g(id).position='static';wp_attempt_focus();}catch(e){}}}
|
||||||
|
addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.concat(p));var i=document.forms[0].id;g(i).position='relative';shake(i,p,20);});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function wp_login_viewport_meta() {
|
||||||
|
?>
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles sending password retrieval email to user.
|
||||||
|
*
|
||||||
|
* @uses $wpdb WordPress Database object
|
||||||
|
*
|
||||||
|
* @return bool|WP_Error True: when finish. WP_Error on error
|
||||||
|
*/
|
||||||
|
function retrieve_password() {
|
||||||
|
global $wpdb, $current_site, $wp_hasher;
|
||||||
|
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
if ( empty( $_POST['user_login'] ) ) {
|
||||||
|
$errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));
|
||||||
|
} else if ( strpos( $_POST['user_login'], '@' ) ) {
|
||||||
|
$user_data = get_user_by( 'email', trim( $_POST['user_login'] ) );
|
||||||
|
if ( empty( $user_data ) )
|
||||||
|
$errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));
|
||||||
|
} else {
|
||||||
|
$login = trim($_POST['user_login']);
|
||||||
|
$user_data = get_user_by('login', $login);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before errors are returned from a password reset request.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'lostpassword_post' );
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() )
|
||||||
|
return $errors;
|
||||||
|
|
||||||
|
if ( !$user_data ) {
|
||||||
|
$errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or e-mail.'));
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
// redefining user_login ensures we return the right case in the email
|
||||||
|
$user_login = $user_data->user_login;
|
||||||
|
$user_email = $user_data->user_email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before a new password is retrieved.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
* @deprecated 1.5.2 Misspelled. Use 'retrieve_password' hook instead.
|
||||||
|
*
|
||||||
|
* @param string $user_login The user login name.
|
||||||
|
*/
|
||||||
|
do_action( 'retreive_password', $user_login );
|
||||||
|
/**
|
||||||
|
* Fires before a new password is retrieved.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
*
|
||||||
|
* @param string $user_login The user login name.
|
||||||
|
*/
|
||||||
|
do_action( 'retrieve_password', $user_login );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter whether to allow a password to be reset.
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
*
|
||||||
|
* @param bool true Whether to allow the password to be reset. Default true.
|
||||||
|
* @param int $user_data->ID The ID of the user attempting to reset a password.
|
||||||
|
*/
|
||||||
|
$allow = apply_filters( 'allow_password_reset', true, $user_data->ID );
|
||||||
|
|
||||||
|
if ( ! $allow )
|
||||||
|
return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));
|
||||||
|
else if ( is_wp_error($allow) )
|
||||||
|
return $allow;
|
||||||
|
|
||||||
|
// Generate something random for a password reset key.
|
||||||
|
$key = wp_generate_password( 20, false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires when a password reset key is generated.
|
||||||
|
*
|
||||||
|
* @since 2.5.0
|
||||||
|
*
|
||||||
|
* @param string $user_login The username for the user.
|
||||||
|
* @param string $key The generated password reset key.
|
||||||
|
*/
|
||||||
|
do_action( 'retrieve_password_key', $user_login, $key );
|
||||||
|
|
||||||
|
// Now insert the key, hashed, into the DB.
|
||||||
|
if ( empty( $wp_hasher ) ) {
|
||||||
|
require_once ABSPATH . 'wp-includes/class-phpass.php';
|
||||||
|
$wp_hasher = new PasswordHash( 8, true );
|
||||||
|
}
|
||||||
|
$hashed = $wp_hasher->HashPassword( $key );
|
||||||
|
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) );
|
||||||
|
|
||||||
|
$message = __('Someone requested that the password be reset for the following account:') . "\r\n\r\n";
|
||||||
|
$message .= network_home_url( '/' ) . "\r\n\r\n";
|
||||||
|
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||||
|
$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
|
||||||
|
$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
|
||||||
|
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
|
||||||
|
|
||||||
|
if ( is_multisite() )
|
||||||
|
$blogname = $GLOBALS['current_site']->site_name;
|
||||||
|
else
|
||||||
|
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
||||||
|
// we want to reverse this for the plain text arena of emails.
|
||||||
|
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
||||||
|
|
||||||
|
$title = sprintf( __('[%s] Password Reset'), $blogname );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the subject of the password reset email.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @param string $title Default email title.
|
||||||
|
*/
|
||||||
|
$title = apply_filters( 'retrieve_password_title', $title );
|
||||||
|
/**
|
||||||
|
* Filter the message body of the password reset mail.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @param string $message Default mail message.
|
||||||
|
* @param string $key The activation key.
|
||||||
|
*/
|
||||||
|
$message = apply_filters( 'retrieve_password_message', $message, $key );
|
||||||
|
|
||||||
|
if ( $message && !wp_mail($user_email, $title, $message) )
|
||||||
|
wp_die( __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Main
|
||||||
|
//
|
||||||
|
|
||||||
|
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
if ( isset($_GET['key']) )
|
||||||
|
$action = 'resetpass';
|
||||||
|
|
||||||
|
// validate action so as to default to the login screen
|
||||||
|
if ( !in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login' ), true ) && false === has_filter( 'login_form_' . $action ) )
|
||||||
|
$action = 'login';
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
|
||||||
|
|
||||||
|
if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
|
||||||
|
if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
|
||||||
|
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
||||||
|
|
||||||
|
$url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
|
||||||
|
if ( $url != get_option( 'siteurl' ) )
|
||||||
|
update_option( 'siteurl', $url );
|
||||||
|
}
|
||||||
|
|
||||||
|
//Set a cookie now to see if they are supported by the browser.
|
||||||
|
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
|
||||||
|
if ( SITECOOKIEPATH != COOKIEPATH )
|
||||||
|
setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires when the login form is initialized.
|
||||||
|
*
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_init' );
|
||||||
|
/**
|
||||||
|
* Fires before a specified login form action.
|
||||||
|
*
|
||||||
|
* The dynamic portion of the hook name, $action, refers to the action
|
||||||
|
* that brought the visitor to the login form. Actions include 'postpass',
|
||||||
|
* 'logout', 'lostpassword', etc.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_form_' . $action );
|
||||||
|
|
||||||
|
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
||||||
|
$interim_login = isset($_REQUEST['interim-login']);
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
|
||||||
|
case 'postpass' :
|
||||||
|
require_once ABSPATH . 'wp-includes/class-phpass.php';
|
||||||
|
$hasher = new PasswordHash( 8, true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the life span of the post password cookie.
|
||||||
|
*
|
||||||
|
* By default, the cookie expires 10 days from creation. To turn this
|
||||||
|
* into a session cookie, return 0.
|
||||||
|
*
|
||||||
|
* @since 3.7.0
|
||||||
|
*
|
||||||
|
* @param int $expires The expiry time, as passed to setcookie().
|
||||||
|
*/
|
||||||
|
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
|
||||||
|
setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH );
|
||||||
|
|
||||||
|
wp_safe_redirect( wp_get_referer() );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'logout' :
|
||||||
|
check_admin_referer('log-out');
|
||||||
|
wp_logout();
|
||||||
|
|
||||||
|
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true';
|
||||||
|
wp_safe_redirect( $redirect_to );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'lostpassword' :
|
||||||
|
case 'retrievepassword' :
|
||||||
|
|
||||||
|
if ( $http_post ) {
|
||||||
|
$errors = retrieve_password();
|
||||||
|
if ( !is_wp_error($errors) ) {
|
||||||
|
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm';
|
||||||
|
wp_safe_redirect( $redirect_to );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $_GET['error'] ) ) {
|
||||||
|
if ( 'invalidkey' == $_GET['error'] )
|
||||||
|
$errors->add( 'invalidkey', __( 'Sorry, that key does not appear to be valid.' ) );
|
||||||
|
elseif ( 'expiredkey' == $_GET['error'] )
|
||||||
|
$errors->add( 'expiredkey', __( 'Sorry, that key has expired. Please try again.' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
||||||
|
/**
|
||||||
|
* Filter the URL redirected to after submitting the lostpassword/retrievepassword form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $lostpassword_redirect The redirect destination URL.
|
||||||
|
*/
|
||||||
|
$redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the lost password form.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
*/
|
||||||
|
do_action( 'lost_password' );
|
||||||
|
|
||||||
|
login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors);
|
||||||
|
|
||||||
|
$user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : '';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
|
||||||
|
<p>
|
||||||
|
<label for="user_login" ><?php _e('Username or E-mail:') ?><br />
|
||||||
|
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires inside the lostpassword <form> tags, before the hidden fields.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'lostpassword_form' ); ?>
|
||||||
|
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
|
||||||
|
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Get New Password'); ?>" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p id="nav">
|
||||||
|
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a>
|
||||||
|
<?php
|
||||||
|
if ( get_option( 'users_can_register' ) ) :
|
||||||
|
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
||||||
|
/**
|
||||||
|
* Filter the registration URL below the login form.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
*
|
||||||
|
* @param string $registration_url Registration URL.
|
||||||
|
*/
|
||||||
|
echo ' | ' . apply_filters( 'register', $registration_url );
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
login_footer('user_login');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'resetpass' :
|
||||||
|
case 'rp' :
|
||||||
|
$user = check_password_reset_key($_GET['key'], $_GET['login']);
|
||||||
|
|
||||||
|
if ( is_wp_error($user) ) {
|
||||||
|
if ( $user->get_error_code() === 'expired_key' )
|
||||||
|
wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
|
||||||
|
else
|
||||||
|
wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=invalidkey' ) );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
if ( isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2'] )
|
||||||
|
$errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the password reset procedure is validated.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*
|
||||||
|
* @param object $errors WP Error object.
|
||||||
|
* @param WP_User|WP_Error $user WP_User object if the login and reset key match. WP_Error object otherwise.
|
||||||
|
*/
|
||||||
|
do_action( 'validate_password_reset', $errors, $user );
|
||||||
|
|
||||||
|
if ( ( ! $errors->get_error_code() ) && isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) {
|
||||||
|
reset_password($user, $_POST['pass1']);
|
||||||
|
login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log in' ) . '</a></p>' );
|
||||||
|
login_footer();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_enqueue_script('utils');
|
||||||
|
wp_enqueue_script('user-profile');
|
||||||
|
|
||||||
|
login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form name="resetpassform" id="resetpassform" action="<?php echo esc_url( site_url( 'wp-login.php?action=resetpass&key=' . urlencode( $_GET['key'] ) . '&login=' . urlencode( $_GET['login'] ), 'login_post' ) ); ?>" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" id="user_login" value="<?php echo esc_attr( $_GET['login'] ); ?>" autocomplete="off" />
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label for="pass1"><?php _e('New password') ?><br />
|
||||||
|
<input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="pass2"><?php _e('Confirm new password') ?><br />
|
||||||
|
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
|
||||||
|
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p>
|
||||||
|
|
||||||
|
<br class="clear" />
|
||||||
|
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p id="nav">
|
||||||
|
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
|
||||||
|
<?php
|
||||||
|
if ( get_option( 'users_can_register' ) ) :
|
||||||
|
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
||||||
|
//duplicate_hook
|
||||||
|
echo ' | ' . apply_filters( 'register', $registration_url );
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
login_footer('user_pass');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'register' :
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
$sign_up_url = network_site_url( 'wp-signup.php' );
|
||||||
|
/**
|
||||||
|
* Filter the Multisite sign up URL.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $sign_up_url The sign up URL.
|
||||||
|
*/
|
||||||
|
wp_redirect( apply_filters( 'wp_signup_location', $sign_up_url ) );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !get_option('users_can_register') ) {
|
||||||
|
wp_redirect( site_url('wp-login.php?registration=disabled') );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_login = '';
|
||||||
|
$user_email = '';
|
||||||
|
if ( $http_post ) {
|
||||||
|
$user_login = $_POST['user_login'];
|
||||||
|
$user_email = $_POST['user_email'];
|
||||||
|
$errors = register_new_user($user_login, $user_email);
|
||||||
|
if ( !is_wp_error($errors) ) {
|
||||||
|
$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
|
||||||
|
wp_safe_redirect( $redirect_to );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
||||||
|
/**
|
||||||
|
* Filter the registration redirect URL.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $registration_redirect The redirect destination URL.
|
||||||
|
*/
|
||||||
|
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
|
||||||
|
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post">
|
||||||
|
<p>
|
||||||
|
<label for="user_login"><?php _e('Username') ?><br />
|
||||||
|
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="user_email"><?php _e('E-mail') ?><br />
|
||||||
|
<input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(wp_unslash($user_email)); ?>" size="25" /></label>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires following the 'E-mail' field in the user registration form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'register_form' );
|
||||||
|
?>
|
||||||
|
<p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
|
||||||
|
<br class="clear" />
|
||||||
|
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
|
||||||
|
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p id="nav">
|
||||||
|
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
|
||||||
|
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ) ?>"><?php _e( 'Lost your password?' ); ?></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
login_footer('user_login');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'login' :
|
||||||
|
default:
|
||||||
|
$secure_cookie = '';
|
||||||
|
$customize_login = isset( $_REQUEST['customize-login'] );
|
||||||
|
if ( $customize_login )
|
||||||
|
wp_enqueue_script( 'customize-base' );
|
||||||
|
|
||||||
|
// If the user wants ssl but the session is not ssl, force a secure cookie.
|
||||||
|
if ( !empty($_POST['log']) && !force_ssl_admin() ) {
|
||||||
|
$user_name = sanitize_user($_POST['log']);
|
||||||
|
if ( $user = get_user_by('login', $user_name) ) {
|
||||||
|
if ( get_user_option('use_ssl', $user->ID) ) {
|
||||||
|
$secure_cookie = true;
|
||||||
|
force_ssl_admin(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $_REQUEST['redirect_to'] ) ) {
|
||||||
|
$redirect_to = $_REQUEST['redirect_to'];
|
||||||
|
// Redirect to https if user wants ssl
|
||||||
|
if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') )
|
||||||
|
$redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
|
||||||
|
} else {
|
||||||
|
$redirect_to = admin_url();
|
||||||
|
}
|
||||||
|
|
||||||
|
$reauth = empty($_REQUEST['reauth']) ? false : true;
|
||||||
|
|
||||||
|
// If the user was redirected to a secure login form from a non-secure admin page, and secure login is required but secure admin is not, then don't use a secure
|
||||||
|
// cookie and redirect back to the referring non-secure admin page. This allows logins to always be POSTed over SSL while allowing the user to choose visiting
|
||||||
|
// the admin via http or https.
|
||||||
|
if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) )
|
||||||
|
$secure_cookie = false;
|
||||||
|
|
||||||
|
// If cookies are disabled we can't log in even with a valid user+pass
|
||||||
|
if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
|
||||||
|
$user = new WP_Error('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
|
||||||
|
else
|
||||||
|
$user = wp_signon('', $secure_cookie);
|
||||||
|
|
||||||
|
$requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
||||||
|
/**
|
||||||
|
* Filter the login redirect URL.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $redirect_to The redirect destination URL.
|
||||||
|
* @param string $requested_redirect_to The requested redirect destination URL passed as a parameter.
|
||||||
|
* @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise.
|
||||||
|
*/
|
||||||
|
$redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
|
||||||
|
|
||||||
|
if ( !is_wp_error($user) && !$reauth ) {
|
||||||
|
if ( $interim_login ) {
|
||||||
|
$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
|
||||||
|
$interim_login = 'success';
|
||||||
|
login_header( '', $message ); ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
//duplicate_hook
|
||||||
|
do_action( 'login_footer' ); ?>
|
||||||
|
<?php if ( $customize_login ) : ?>
|
||||||
|
<script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
</body></html>
|
||||||
|
<?php exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
|
||||||
|
// If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
|
||||||
|
if ( is_multisite() && !get_active_blog_for_user($user->ID) && !is_super_admin( $user->ID ) )
|
||||||
|
$redirect_to = user_admin_url();
|
||||||
|
elseif ( is_multisite() && !$user->has_cap('read') )
|
||||||
|
$redirect_to = get_dashboard_url( $user->ID );
|
||||||
|
elseif ( !$user->has_cap('edit_posts') )
|
||||||
|
$redirect_to = admin_url('profile.php');
|
||||||
|
}
|
||||||
|
wp_safe_redirect($redirect_to);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$errors = $user;
|
||||||
|
// Clear errors if loggedout is set.
|
||||||
|
if ( !empty($_GET['loggedout']) || $reauth )
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
if ( $interim_login ) {
|
||||||
|
if ( ! $errors->get_error_code() )
|
||||||
|
$errors->add('expired', __('Session expired. Please log in again. You will not move away from this page.'), 'message');
|
||||||
|
} else {
|
||||||
|
// Some parts of this script use the main login form to display a message
|
||||||
|
if ( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
|
||||||
|
$errors->add('loggedout', __('You are now logged out.'), 'message');
|
||||||
|
elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] )
|
||||||
|
$errors->add('registerdisabled', __('User registration is currently not allowed.'));
|
||||||
|
elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] )
|
||||||
|
$errors->add('confirm', __('Check your e-mail for the confirmation link.'), 'message');
|
||||||
|
elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] )
|
||||||
|
$errors->add('newpass', __('Check your e-mail for your new password.'), 'message');
|
||||||
|
elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )
|
||||||
|
$errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message');
|
||||||
|
elseif ( strpos( $redirect_to, 'about.php?updated' ) )
|
||||||
|
$errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to experience the awesomeness.' ), 'message' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the login page errors.
|
||||||
|
*
|
||||||
|
* @since 3.6.0
|
||||||
|
*
|
||||||
|
* @param object $errors WP Error object.
|
||||||
|
* @param string $redirect_to Redirect destination URL.
|
||||||
|
*/
|
||||||
|
$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
|
||||||
|
|
||||||
|
// Clear any stale cookies.
|
||||||
|
if ( $reauth )
|
||||||
|
wp_clear_auth_cookie();
|
||||||
|
|
||||||
|
login_header(__('Log In'), '', $errors);
|
||||||
|
|
||||||
|
if ( isset($_POST['log']) )
|
||||||
|
$user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(wp_unslash($_POST['log'])) : '';
|
||||||
|
$rememberme = ! empty( $_POST['rememberme'] );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
|
||||||
|
<p>
|
||||||
|
<label for="user_login"><?php _e('Username') ?><br />
|
||||||
|
<input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="user_pass"><?php _e('Password') ?><br />
|
||||||
|
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires following the 'Password' field in the login form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
do_action( 'login_form' );
|
||||||
|
?>
|
||||||
|
<p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p>
|
||||||
|
<p class="submit">
|
||||||
|
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Log In'); ?>" />
|
||||||
|
<?php if ( $interim_login ) { ?>
|
||||||
|
<input type="hidden" name="interim-login" value="1" />
|
||||||
|
<?php } else { ?>
|
||||||
|
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect_to); ?>" />
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ( $customize_login ) : ?>
|
||||||
|
<input type="hidden" name="customize-login" value="1" />
|
||||||
|
<?php endif; ?>
|
||||||
|
<input type="hidden" name="testcookie" value="1" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php if ( ! $interim_login ) { ?>
|
||||||
|
<p id="nav">
|
||||||
|
<?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
|
||||||
|
if ( get_option( 'users_can_register' ) ) :
|
||||||
|
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
||||||
|
//duplicate_hook
|
||||||
|
echo apply_filters( 'register', $registration_url ) . ' | ';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ); ?>"><?php _e( 'Lost your password?' ); ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function wp_attempt_focus(){
|
||||||
|
setTimeout( function(){ try{
|
||||||
|
<?php if ( $user_login || $interim_login ) { ?>
|
||||||
|
d = document.getElementById('user_pass');
|
||||||
|
d.value = '';
|
||||||
|
<?php } else { ?>
|
||||||
|
d = document.getElementById('user_login');
|
||||||
|
<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
|
||||||
|
if( d.value != '' )
|
||||||
|
d.value = '';
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}?>
|
||||||
|
d.focus();
|
||||||
|
d.select();
|
||||||
|
} catch(e){}
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
<?php if ( !$error ) { ?>
|
||||||
|
wp_attempt_focus();
|
||||||
|
<?php } ?>
|
||||||
|
if(typeof wpOnload=='function')wpOnload();
|
||||||
|
<?php if ( $interim_login ) { ?>
|
||||||
|
(function(){
|
||||||
|
try {
|
||||||
|
var i, links = document.getElementsByTagName('a');
|
||||||
|
for ( i in links ) {
|
||||||
|
if ( links[i].href )
|
||||||
|
links[i].target = '_blank';
|
||||||
|
}
|
||||||
|
} catch(e){}
|
||||||
|
}());
|
||||||
|
<?php } ?>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
login_footer();
|
||||||
|
break;
|
||||||
|
} // end action switch
|
|
@ -0,0 +1,230 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Gets the email message from the user's mailbox to add as
|
||||||
|
* a WordPress post. Mailbox connection information must be
|
||||||
|
* configured under Settings > Writing
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Make sure that the WordPress bootstrap has run before continuing. */
|
||||||
|
require(dirname(__FILE__) . '/wp-load.php');
|
||||||
|
|
||||||
|
if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
|
||||||
|
wp_die( __( 'This action has been disabled by the administrator.' ) );
|
||||||
|
|
||||||
|
/** Allow a plugin to do a complete takeover of Post by Email **/
|
||||||
|
do_action('wp-mail.php');
|
||||||
|
|
||||||
|
/** Get the POP3 class with which to access the mailbox. */
|
||||||
|
require_once( ABSPATH . WPINC . '/class-pop3.php' );
|
||||||
|
|
||||||
|
/** Only check at this interval for new messages. */
|
||||||
|
if ( !defined('WP_MAIL_INTERVAL') )
|
||||||
|
define('WP_MAIL_INTERVAL', 300); // 5 minutes
|
||||||
|
|
||||||
|
$last_checked = get_transient('mailserver_last_checked');
|
||||||
|
|
||||||
|
if ( $last_checked )
|
||||||
|
wp_die(__('Slow down cowboy, no need to check for new mails so often!'));
|
||||||
|
|
||||||
|
set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
|
||||||
|
|
||||||
|
$time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS;
|
||||||
|
|
||||||
|
$phone_delim = '::';
|
||||||
|
|
||||||
|
$pop3 = new POP3();
|
||||||
|
|
||||||
|
if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
|
||||||
|
wp_die( esc_html( $pop3->ERROR ) );
|
||||||
|
|
||||||
|
$count = $pop3->pass( get_option('mailserver_pass') );
|
||||||
|
|
||||||
|
if( false === $count )
|
||||||
|
wp_die( esc_html( $pop3->ERROR ) );
|
||||||
|
|
||||||
|
if( 0 === $count ) {
|
||||||
|
$pop3->quit();
|
||||||
|
wp_die( __('There doesn’t seem to be any new mail.') );
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( $i = 1; $i <= $count; $i++ ) {
|
||||||
|
|
||||||
|
$message = $pop3->get($i);
|
||||||
|
|
||||||
|
$bodysignal = false;
|
||||||
|
$boundary = '';
|
||||||
|
$charset = '';
|
||||||
|
$content = '';
|
||||||
|
$content_type = '';
|
||||||
|
$content_transfer_encoding = '';
|
||||||
|
$post_author = 1;
|
||||||
|
$author_found = false;
|
||||||
|
$dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
|
||||||
|
foreach ($message as $line) {
|
||||||
|
// body signal
|
||||||
|
if ( strlen($line) < 3 )
|
||||||
|
$bodysignal = true;
|
||||||
|
if ( $bodysignal ) {
|
||||||
|
$content .= $line;
|
||||||
|
} else {
|
||||||
|
if ( preg_match('/Content-Type: /i', $line) ) {
|
||||||
|
$content_type = trim($line);
|
||||||
|
$content_type = substr($content_type, 14, strlen($content_type) - 14);
|
||||||
|
$content_type = explode(';', $content_type);
|
||||||
|
if ( ! empty( $content_type[1] ) ) {
|
||||||
|
$charset = explode('=', $content_type[1]);
|
||||||
|
$charset = ( ! empty( $charset[1] ) ) ? trim($charset[1]) : '';
|
||||||
|
}
|
||||||
|
$content_type = $content_type[0];
|
||||||
|
}
|
||||||
|
if ( preg_match('/Content-Transfer-Encoding: /i', $line) ) {
|
||||||
|
$content_transfer_encoding = trim($line);
|
||||||
|
$content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding) - 27);
|
||||||
|
$content_transfer_encoding = explode(';', $content_transfer_encoding);
|
||||||
|
$content_transfer_encoding = $content_transfer_encoding[0];
|
||||||
|
}
|
||||||
|
if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos($line, 'boundary="') ) && ( '' == $boundary ) ) {
|
||||||
|
$boundary = trim($line);
|
||||||
|
$boundary = explode('"', $boundary);
|
||||||
|
$boundary = $boundary[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/Subject: /i', $line)) {
|
||||||
|
$subject = trim($line);
|
||||||
|
$subject = substr($subject, 9, strlen($subject) - 9);
|
||||||
|
// Captures any text in the subject before $phone_delim as the subject
|
||||||
|
if ( function_exists('iconv_mime_decode') ) {
|
||||||
|
$subject = iconv_mime_decode($subject, 2, get_option('blog_charset'));
|
||||||
|
} else {
|
||||||
|
$subject = wp_iso_descrambler($subject);
|
||||||
|
}
|
||||||
|
$subject = explode($phone_delim, $subject);
|
||||||
|
$subject = $subject[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the author using the email address (From or Reply-To, the last used)
|
||||||
|
// otherwise use the site admin
|
||||||
|
if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) {
|
||||||
|
if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) )
|
||||||
|
$author = $matches[0];
|
||||||
|
else
|
||||||
|
$author = trim($line);
|
||||||
|
$author = sanitize_email($author);
|
||||||
|
if ( is_email($author) ) {
|
||||||
|
echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>';
|
||||||
|
$userdata = get_user_by('email', $author);
|
||||||
|
if ( ! empty( $userdata ) ) {
|
||||||
|
$post_author = $userdata->ID;
|
||||||
|
$author_found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37'
|
||||||
|
$ddate = trim($line);
|
||||||
|
$ddate = str_replace('Date: ', '', $ddate);
|
||||||
|
if (strpos($ddate, ',')) {
|
||||||
|
$ddate = trim(substr($ddate, strpos($ddate, ',') + 1, strlen($ddate)));
|
||||||
|
}
|
||||||
|
$date_arr = explode(' ', $ddate);
|
||||||
|
$date_time = explode(':', $date_arr[3]);
|
||||||
|
|
||||||
|
$ddate_H = $date_time[0];
|
||||||
|
$ddate_i = $date_time[1];
|
||||||
|
$ddate_s = $date_time[2];
|
||||||
|
|
||||||
|
$ddate_m = $date_arr[1];
|
||||||
|
$ddate_d = $date_arr[0];
|
||||||
|
$ddate_Y = $date_arr[2];
|
||||||
|
for ( $j = 0; $j < 12; $j++ ) {
|
||||||
|
if ( $ddate_m == $dmonths[$j] ) {
|
||||||
|
$ddate_m = $j+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$time_zn = intval($date_arr[4]) * 36;
|
||||||
|
$ddate_U = gmmktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
|
||||||
|
$ddate_U = $ddate_U - $time_zn;
|
||||||
|
$post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);
|
||||||
|
$post_date_gmt = gmdate('Y-m-d H:i:s', $ddate_U);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set $post_status based on $author_found and on author's publish_posts capability
|
||||||
|
if ( $author_found ) {
|
||||||
|
$user = new WP_User($post_author);
|
||||||
|
$post_status = ( $user->has_cap('publish_posts') ) ? 'publish' : 'pending';
|
||||||
|
} else {
|
||||||
|
// Author not found in DB, set status to pending. Author already set to admin.
|
||||||
|
$post_status = 'pending';
|
||||||
|
}
|
||||||
|
|
||||||
|
$subject = trim($subject);
|
||||||
|
|
||||||
|
if ( $content_type == 'multipart/alternative' ) {
|
||||||
|
$content = explode('--'.$boundary, $content);
|
||||||
|
$content = $content[2];
|
||||||
|
// match case-insensitive content-transfer-encoding
|
||||||
|
if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim) ) {
|
||||||
|
$content = explode($delim[0], $content);
|
||||||
|
$content = $content[1];
|
||||||
|
}
|
||||||
|
$content = strip_tags($content, '<img><p><br><i><b><u><em><strong><strike><font><span><div>');
|
||||||
|
}
|
||||||
|
$content = trim($content);
|
||||||
|
|
||||||
|
//Give Post-By-Email extending plugins full access to the content
|
||||||
|
//Either the raw content or the content of the last quoted-printable section
|
||||||
|
$content = apply_filters('wp_mail_original_content', $content);
|
||||||
|
|
||||||
|
if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) {
|
||||||
|
$content = quoted_printable_decode($content);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( function_exists('iconv') && ! empty( $charset ) ) {
|
||||||
|
$content = iconv($charset, get_option('blog_charset'), $content);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Captures any text in the body after $phone_delim as the body
|
||||||
|
$content = explode($phone_delim, $content);
|
||||||
|
$content = empty( $content[1] ) ? $content[0] : $content[1];
|
||||||
|
|
||||||
|
$content = trim($content);
|
||||||
|
|
||||||
|
$post_content = apply_filters('phone_content', $content);
|
||||||
|
|
||||||
|
$post_title = xmlrpc_getposttitle($content);
|
||||||
|
|
||||||
|
if ($post_title == '') $post_title = $subject;
|
||||||
|
|
||||||
|
$post_category = array(get_option('default_email_category'));
|
||||||
|
|
||||||
|
$post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
|
||||||
|
$post_data = wp_slash($post_data);
|
||||||
|
|
||||||
|
$post_ID = wp_insert_post($post_data);
|
||||||
|
if ( is_wp_error( $post_ID ) )
|
||||||
|
echo "\n" . $post_ID->get_error_message();
|
||||||
|
|
||||||
|
// We couldn't post, for whatever reason. Better move forward to the next email.
|
||||||
|
if ( empty( $post_ID ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
do_action('publish_phone', $post_ID);
|
||||||
|
|
||||||
|
echo "\n<p>" . sprintf(__('<strong>Author:</strong> %s'), esc_html($post_author)) . '</p>';
|
||||||
|
echo "\n<p>" . sprintf(__('<strong>Posted title:</strong> %s'), esc_html($post_title)) . '</p>';
|
||||||
|
|
||||||
|
if(!$pop3->delete($i)) {
|
||||||
|
echo '<p>' . sprintf(__('Oops: %s'), esc_html($pop3->ERROR)) . '</p>';
|
||||||
|
$pop3->reset();
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo '<p>' . sprintf(__('Mission complete. Message <strong>%s</strong> deleted.'), $i) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$pop3->quit();
|
|
@ -0,0 +1,361 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Used to set up and fix common variables and include
|
||||||
|
* the WordPress procedural and class library.
|
||||||
|
*
|
||||||
|
* Allows for some configuration in wp-config.php (see default-constants.php)
|
||||||
|
*
|
||||||
|
* @internal This file must be parsable by PHP4.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the location of the WordPress directory of functions, classes, and core content.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
define( 'WPINC', 'wp-includes' );
|
||||||
|
|
||||||
|
// Include files required for initialization.
|
||||||
|
require( ABSPATH . WPINC . '/load.php' );
|
||||||
|
require( ABSPATH . WPINC . '/default-constants.php' );
|
||||||
|
require( ABSPATH . WPINC . '/version.php' );
|
||||||
|
|
||||||
|
// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
|
||||||
|
wp_initial_constants();
|
||||||
|
|
||||||
|
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||||
|
wp_check_php_mysql_versions();
|
||||||
|
|
||||||
|
// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
|
||||||
|
@ini_set( 'magic_quotes_runtime', 0 );
|
||||||
|
@ini_set( 'magic_quotes_sybase', 0 );
|
||||||
|
|
||||||
|
// WordPress calculates offsets from UTC.
|
||||||
|
date_default_timezone_set( 'UTC' );
|
||||||
|
|
||||||
|
// Turn register_globals off.
|
||||||
|
wp_unregister_GLOBALS();
|
||||||
|
|
||||||
|
// Standardize $_SERVER variables across setups.
|
||||||
|
wp_fix_server_vars();
|
||||||
|
|
||||||
|
// Check if we have received a request due to missing favicon.ico
|
||||||
|
wp_favicon_request();
|
||||||
|
|
||||||
|
// Check if we're in maintenance mode.
|
||||||
|
wp_maintenance();
|
||||||
|
|
||||||
|
// Start loading timer.
|
||||||
|
timer_start();
|
||||||
|
|
||||||
|
// Check if we're in WP_DEBUG mode.
|
||||||
|
wp_debug_mode();
|
||||||
|
|
||||||
|
// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
|
||||||
|
if ( WP_CACHE )
|
||||||
|
WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
|
||||||
|
|
||||||
|
// Define WP_LANG_DIR if not set.
|
||||||
|
wp_set_lang_dir();
|
||||||
|
|
||||||
|
// Load early WordPress files.
|
||||||
|
require( ABSPATH . WPINC . '/compat.php' );
|
||||||
|
require( ABSPATH . WPINC . '/functions.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-wp.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-wp-error.php' );
|
||||||
|
require( ABSPATH . WPINC . '/plugin.php' );
|
||||||
|
require( ABSPATH . WPINC . '/pomo/mo.php' );
|
||||||
|
|
||||||
|
// Include the wpdb class and, if present, a db.php database drop-in.
|
||||||
|
require_wp_db();
|
||||||
|
|
||||||
|
// Set the database table prefix and the format specifiers for database table columns.
|
||||||
|
$GLOBALS['table_prefix'] = $table_prefix;
|
||||||
|
wp_set_wpdb_vars();
|
||||||
|
|
||||||
|
// Start the WordPress object cache, or an external object cache if the drop-in is present.
|
||||||
|
wp_start_object_cache();
|
||||||
|
|
||||||
|
// Attach the default filters.
|
||||||
|
require( ABSPATH . WPINC . '/default-filters.php' );
|
||||||
|
|
||||||
|
// Initialize multisite if enabled.
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
require( ABSPATH . WPINC . '/ms-blogs.php' );
|
||||||
|
require( ABSPATH . WPINC . '/ms-settings.php' );
|
||||||
|
} elseif ( ! defined( 'MULTISITE' ) ) {
|
||||||
|
define( 'MULTISITE', false );
|
||||||
|
}
|
||||||
|
|
||||||
|
register_shutdown_function( 'shutdown_action_hook' );
|
||||||
|
|
||||||
|
// Stop most of WordPress from being loaded if we just want the basics.
|
||||||
|
if ( SHORTINIT )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Load the L10n library.
|
||||||
|
require_once( ABSPATH . WPINC . '/l10n.php' );
|
||||||
|
|
||||||
|
// Run the installer if WordPress is not installed.
|
||||||
|
wp_not_installed();
|
||||||
|
|
||||||
|
// Load most of WordPress.
|
||||||
|
require( ABSPATH . WPINC . '/class-wp-walker.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
|
||||||
|
require( ABSPATH . WPINC . '/formatting.php' );
|
||||||
|
require( ABSPATH . WPINC . '/capabilities.php' );
|
||||||
|
require( ABSPATH . WPINC . '/query.php' );
|
||||||
|
require( ABSPATH . WPINC . '/date.php' );
|
||||||
|
require( ABSPATH . WPINC . '/theme.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-wp-theme.php' );
|
||||||
|
require( ABSPATH . WPINC . '/template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/user.php' );
|
||||||
|
require( ABSPATH . WPINC . '/meta.php' );
|
||||||
|
require( ABSPATH . WPINC . '/general-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/link-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/author-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/post.php' );
|
||||||
|
require( ABSPATH . WPINC . '/post-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/revision.php' );
|
||||||
|
require( ABSPATH . WPINC . '/post-formats.php' );
|
||||||
|
require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/category.php' );
|
||||||
|
require( ABSPATH . WPINC . '/category-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/comment.php' );
|
||||||
|
require( ABSPATH . WPINC . '/comment-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/rewrite.php' );
|
||||||
|
require( ABSPATH . WPINC . '/feed.php' );
|
||||||
|
require( ABSPATH . WPINC . '/bookmark.php' );
|
||||||
|
require( ABSPATH . WPINC . '/bookmark-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/kses.php' );
|
||||||
|
require( ABSPATH . WPINC . '/cron.php' );
|
||||||
|
require( ABSPATH . WPINC . '/deprecated.php' );
|
||||||
|
require( ABSPATH . WPINC . '/script-loader.php' );
|
||||||
|
require( ABSPATH . WPINC . '/taxonomy.php' );
|
||||||
|
require( ABSPATH . WPINC . '/update.php' );
|
||||||
|
require( ABSPATH . WPINC . '/canonical.php' );
|
||||||
|
require( ABSPATH . WPINC . '/shortcodes.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-wp-embed.php' );
|
||||||
|
require( ABSPATH . WPINC . '/media.php' );
|
||||||
|
require( ABSPATH . WPINC . '/http.php' );
|
||||||
|
require( ABSPATH . WPINC . '/class-http.php' );
|
||||||
|
require( ABSPATH . WPINC . '/widgets.php' );
|
||||||
|
require( ABSPATH . WPINC . '/nav-menu.php' );
|
||||||
|
require( ABSPATH . WPINC . '/nav-menu-template.php' );
|
||||||
|
require( ABSPATH . WPINC . '/admin-bar.php' );
|
||||||
|
|
||||||
|
// Load multisite-specific files.
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
require( ABSPATH . WPINC . '/ms-functions.php' );
|
||||||
|
require( ABSPATH . WPINC . '/ms-default-filters.php' );
|
||||||
|
require( ABSPATH . WPINC . '/ms-deprecated.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define constants that rely on the API to obtain the default value.
|
||||||
|
// Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
|
||||||
|
wp_plugin_directory_constants();
|
||||||
|
|
||||||
|
// Load must-use plugins.
|
||||||
|
foreach ( wp_get_mu_plugins() as $mu_plugin ) {
|
||||||
|
include_once( $mu_plugin );
|
||||||
|
}
|
||||||
|
unset( $mu_plugin );
|
||||||
|
|
||||||
|
// Load network activated plugins.
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
foreach( wp_get_active_network_plugins() as $network_plugin ) {
|
||||||
|
include_once( $network_plugin );
|
||||||
|
}
|
||||||
|
unset( $network_plugin );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires once all must-use and network-activated plugins have loaded.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*/
|
||||||
|
do_action( 'muplugins_loaded' );
|
||||||
|
|
||||||
|
if ( is_multisite() )
|
||||||
|
ms_cookie_constants( );
|
||||||
|
|
||||||
|
// Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
|
||||||
|
wp_cookie_constants();
|
||||||
|
|
||||||
|
// Define and enforce our SSL constants
|
||||||
|
wp_ssl_constants();
|
||||||
|
|
||||||
|
// Create common globals.
|
||||||
|
require( ABSPATH . WPINC . '/vars.php' );
|
||||||
|
|
||||||
|
// Make taxonomies and posts available to plugins and themes.
|
||||||
|
// @plugin authors: warning: these get registered again on the init hook.
|
||||||
|
create_initial_taxonomies();
|
||||||
|
create_initial_post_types();
|
||||||
|
|
||||||
|
// Register the default theme directory root
|
||||||
|
register_theme_directory( get_theme_root() );
|
||||||
|
|
||||||
|
// Load active plugins.
|
||||||
|
foreach ( wp_get_active_and_valid_plugins() as $plugin )
|
||||||
|
include_once( $plugin );
|
||||||
|
unset( $plugin );
|
||||||
|
|
||||||
|
// Load pluggable functions.
|
||||||
|
require( ABSPATH . WPINC . '/pluggable.php' );
|
||||||
|
require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
|
||||||
|
|
||||||
|
// Set internal encoding.
|
||||||
|
wp_set_internal_encoding();
|
||||||
|
|
||||||
|
// Run wp_cache_postload() if object cache is enabled and the function exists.
|
||||||
|
if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
|
||||||
|
wp_cache_postload();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires once activated plugins have loaded.
|
||||||
|
*
|
||||||
|
* Pluggable functions are also available at this point in the loading order.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
*/
|
||||||
|
do_action( 'plugins_loaded' );
|
||||||
|
|
||||||
|
// Define constants which affect functionality if not already defined.
|
||||||
|
wp_functionality_constants();
|
||||||
|
|
||||||
|
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
|
||||||
|
wp_magic_quotes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires when comment cookies are sanitized.
|
||||||
|
*
|
||||||
|
* @since 2.0.11
|
||||||
|
*/
|
||||||
|
do_action( 'sanitize_comment_cookies' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Query object
|
||||||
|
* @global object $wp_the_query
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
$wp_the_query = new WP_Query();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the reference to @see $wp_the_query
|
||||||
|
* Use this global for WordPress queries
|
||||||
|
* @global object $wp_query
|
||||||
|
* @since 1.5.0
|
||||||
|
*/
|
||||||
|
$wp_query = $wp_the_query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the WordPress Rewrite object for creating pretty URLs
|
||||||
|
* @global object $wp_rewrite
|
||||||
|
* @since 1.5.0
|
||||||
|
*/
|
||||||
|
$GLOBALS['wp_rewrite'] = new WP_Rewrite();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Object
|
||||||
|
* @global object $wp
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
$wp = new WP();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Widget Factory Object
|
||||||
|
* @global object $wp_widget_factory
|
||||||
|
* @since 2.8.0
|
||||||
|
*/
|
||||||
|
$GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress User Roles
|
||||||
|
* @global object $wp_roles
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
$GLOBALS['wp_roles'] = new WP_Roles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the theme is loaded.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
do_action( 'setup_theme' );
|
||||||
|
|
||||||
|
// Define the template related constants.
|
||||||
|
wp_templating_constants( );
|
||||||
|
|
||||||
|
// Load the default text localization domain.
|
||||||
|
load_default_textdomain();
|
||||||
|
|
||||||
|
$locale = get_locale();
|
||||||
|
$locale_file = WP_LANG_DIR . "/$locale.php";
|
||||||
|
if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
|
||||||
|
require( $locale_file );
|
||||||
|
unset( $locale_file );
|
||||||
|
|
||||||
|
// Pull in locale data after loading text domain.
|
||||||
|
require_once( ABSPATH . WPINC . '/locale.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress Locale object for loading locale domain date and various strings.
|
||||||
|
* @global object $wp_locale
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
|
$GLOBALS['wp_locale'] = new WP_Locale();
|
||||||
|
|
||||||
|
// Load the functions for the active theme, for both parent and child theme if applicable.
|
||||||
|
if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
|
||||||
|
if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
|
||||||
|
include( STYLESHEETPATH . '/functions.php' );
|
||||||
|
if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
|
||||||
|
include( TEMPLATEPATH . '/functions.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after the theme is loaded.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'after_setup_theme' );
|
||||||
|
|
||||||
|
// Set up current user.
|
||||||
|
$wp->init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after WordPress has finished loading but before any headers are sent.
|
||||||
|
*
|
||||||
|
* Most of WP is loaded at this stage, and the user is authenticated. WP continues
|
||||||
|
* to load on the init hook that follows (e.g. widgets), and many plugins instantiate
|
||||||
|
* themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
|
||||||
|
*
|
||||||
|
* If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
|
||||||
|
*
|
||||||
|
* @since 1.5.2
|
||||||
|
*/
|
||||||
|
do_action( 'init' );
|
||||||
|
|
||||||
|
// Check site status
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
if ( true !== ( $file = ms_site_check() ) ) {
|
||||||
|
require( $file );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
unset($file);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
|
||||||
|
*
|
||||||
|
* AJAX requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
|
||||||
|
* users not logged in.
|
||||||
|
*
|
||||||
|
* @link http://codex.wordpress.org/AJAX_in_Plugins
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'wp_loaded' );
|
|
@ -0,0 +1,736 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/** Sets up the WordPress Environment. */
|
||||||
|
require( dirname(__FILE__) . '/wp-load.php' );
|
||||||
|
|
||||||
|
add_action( 'wp_head', 'wp_no_robots' );
|
||||||
|
|
||||||
|
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
|
||||||
|
|
||||||
|
if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
|
||||||
|
wp_redirect( network_home_url() );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints signup_header via wp_head
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*/
|
||||||
|
function do_signup_header() {
|
||||||
|
/**
|
||||||
|
* Fires within the <head> section of the site sign-up screen.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'signup_header' );
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'do_signup_header' );
|
||||||
|
|
||||||
|
if ( !is_multisite() ) {
|
||||||
|
wp_redirect( site_url('wp-login.php?action=register') );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !is_main_site() ) {
|
||||||
|
wp_redirect( network_site_url( 'wp-signup.php' ) );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix for page title
|
||||||
|
$wp_query->is_404 = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints styles for front-end Multisite signup pages
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*/
|
||||||
|
function wpmu_signup_stylesheet() {
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
.mu_register { width: 90%; margin:0 auto; }
|
||||||
|
.mu_register form { margin-top: 2em; }
|
||||||
|
.mu_register .error { font-weight:700; padding:10px; color:#333333; background:#FFEBE8; border:1px solid #CC0000; }
|
||||||
|
.mu_register input[type="submit"],
|
||||||
|
.mu_register #blog_title,
|
||||||
|
.mu_register #user_email,
|
||||||
|
.mu_register #blogname,
|
||||||
|
.mu_register #user_name { width:100%; font-size: 24px; margin:5px 0; }
|
||||||
|
.mu_register .prefix_address,
|
||||||
|
.mu_register .suffix_address {font-size: 18px;display:inline; }
|
||||||
|
.mu_register label { font-weight:700; font-size:15px; display:block; margin:10px 0; }
|
||||||
|
.mu_register label.checkbox { display:inline; }
|
||||||
|
.mu_register .mu_alert { font-weight:700; padding:10px; color:#333333; background:#ffffe0; border:1px solid #e6db55; }
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'wp_head', 'wpmu_signup_stylesheet' );
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the site sign-up form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'before_signup_form' );
|
||||||
|
?>
|
||||||
|
<div id="content" class="widecolumn">
|
||||||
|
<div class="mu_register">
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Generates and displays the Signup and Create Site forms
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $blogname The new site name
|
||||||
|
* @param string $blog_title The new site title
|
||||||
|
* @param array $errors
|
||||||
|
*/
|
||||||
|
function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
|
||||||
|
global $current_site;
|
||||||
|
// Blog name
|
||||||
|
if ( !is_subdomain_install() )
|
||||||
|
echo '<label for="blogname">' . __('Site Name:') . '</label>';
|
||||||
|
else
|
||||||
|
echo '<label for="blogname">' . __('Site Domain:') . '</label>';
|
||||||
|
|
||||||
|
if ( $errmsg = $errors->get_error_message('blogname') ) { ?>
|
||||||
|
<p class="error"><?php echo $errmsg ?></p>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if ( !is_subdomain_install() )
|
||||||
|
echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />';
|
||||||
|
else
|
||||||
|
echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
|
||||||
|
|
||||||
|
if ( !is_user_logged_in() ) {
|
||||||
|
if ( !is_subdomain_install() )
|
||||||
|
$site = $current_site->domain . $current_site->path . __( 'sitename' );
|
||||||
|
else
|
||||||
|
$site = __( 'domain' ) . '.' . $site_domain . $current_site->path;
|
||||||
|
echo '<p>(<strong>' . sprintf( __('Your address will be %s.'), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Blog Title
|
||||||
|
?>
|
||||||
|
<label for="blog_title"><?php _e('Site Title:') ?></label>
|
||||||
|
<?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?>
|
||||||
|
<p class="error"><?php echo $errmsg ?></p>
|
||||||
|
<?php }
|
||||||
|
echo '<input name="blog_title" type="text" id="blog_title" value="'.esc_attr($blog_title).'" />';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="privacy">
|
||||||
|
<p class="privacy-intro">
|
||||||
|
<label for="blog_public_on"><?php _e('Privacy:') ?></label>
|
||||||
|
<?php _e( 'Allow search engines to index this site.' ); ?>
|
||||||
|
<br style="clear:both" />
|
||||||
|
<label class="checkbox" for="blog_public_on">
|
||||||
|
<input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
|
||||||
|
<strong><?php _e( 'Yes' ); ?></strong>
|
||||||
|
</label>
|
||||||
|
<label class="checkbox" for="blog_public_off">
|
||||||
|
<input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> />
|
||||||
|
<strong><?php _e( 'No' ); ?></strong>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires after the site sign-up form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $errors An array possibly containing 'blogname' or 'blog_title' errors.
|
||||||
|
*/
|
||||||
|
do_action( 'signup_blogform', $errors );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate the new site signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses wp_get_current_user() to retrieve the current user
|
||||||
|
* @uses wpmu_validate_blog_signup() to validate new site signup for the current user
|
||||||
|
* @return array Contains the new site data and error messages.
|
||||||
|
*/
|
||||||
|
function validate_blog_form() {
|
||||||
|
$user = '';
|
||||||
|
if ( is_user_logged_in() )
|
||||||
|
$user = wp_get_current_user();
|
||||||
|
|
||||||
|
return wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title'], $user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display user registration form
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $user_name The entered username
|
||||||
|
* @param string $user_email The entered email address
|
||||||
|
* @param array $errors
|
||||||
|
*/
|
||||||
|
function show_user_form($user_name = '', $user_email = '', $errors = '') {
|
||||||
|
// User name
|
||||||
|
echo '<label for="user_name">' . __('Username:') . '</label>';
|
||||||
|
if ( $errmsg = $errors->get_error_message('user_name') ) {
|
||||||
|
echo '<p class="error">'.$errmsg.'</p>';
|
||||||
|
}
|
||||||
|
echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr($user_name) .'" maxlength="60" /><br />';
|
||||||
|
_e( '(Must be at least 4 characters, letters and numbers only.)' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<label for="user_email"><?php _e( 'Email Address:' ) ?></label>
|
||||||
|
<?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
|
||||||
|
<p class="error"><?php echo $errmsg ?></p>
|
||||||
|
<?php } ?>
|
||||||
|
<input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?>
|
||||||
|
<?php
|
||||||
|
if ( $errmsg = $errors->get_error_message('generic') ) {
|
||||||
|
echo '<p class="error">' . $errmsg . '</p>';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Fires at the end of the user registration form on the site sign-up form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $errors An array possibly containing 'user_name' or 'user_email' errors.
|
||||||
|
*/
|
||||||
|
do_action( 'signup_extra_fields', $errors );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate user signup name and email
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses wpmu_validate_user_signup() to retrieve an array of user data
|
||||||
|
* @return array Contains username, email, and error messages.
|
||||||
|
*/
|
||||||
|
function validate_user_form() {
|
||||||
|
return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow returning users to sign up for another site
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses wp_get_current_user() to get the current user
|
||||||
|
* @param string $blogname The new site name
|
||||||
|
* @param string $blog_title The new blog title
|
||||||
|
* @param array $errors
|
||||||
|
*/
|
||||||
|
function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
|
||||||
|
global $current_site;
|
||||||
|
$current_user = wp_get_current_user();
|
||||||
|
|
||||||
|
if ( ! is_wp_error($errors) ) {
|
||||||
|
$errors = new WP_Error();
|
||||||
|
}
|
||||||
|
|
||||||
|
$signup_defaults = array(
|
||||||
|
'blogname' => $blogname,
|
||||||
|
'blog_title' => $blog_title,
|
||||||
|
'errors' => $errors
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the default site sign-up variables.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $signup_defaults {
|
||||||
|
* An array of default site sign-up variables.
|
||||||
|
*
|
||||||
|
* @type string $blogname The site blogname.
|
||||||
|
* @type string $blog_title The site title.
|
||||||
|
* @type array $errors An array possibly containing 'blogname' or 'blog_title' errors.
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
$filtered_results = apply_filters( 'signup_another_blog_init', $signup_defaults );
|
||||||
|
|
||||||
|
$blogname = $filtered_results['blogname'];
|
||||||
|
$blog_title = $filtered_results['blog_title'];
|
||||||
|
$errors = $filtered_results['errors'];
|
||||||
|
|
||||||
|
echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), $current_site->site_name ) . '</h2>';
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() ) {
|
||||||
|
echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' ), $current_user->display_name ) ?></p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$blogs = get_blogs_of_user($current_user->ID);
|
||||||
|
if ( !empty($blogs) ) { ?>
|
||||||
|
|
||||||
|
<p><?php _e( 'Sites you are already a member of:' ) ?></p>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ( $blogs as $blog ) {
|
||||||
|
$home_url = get_home_url( $blog->userblog_id );
|
||||||
|
echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>';
|
||||||
|
} ?>
|
||||||
|
</ul>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<p><?php _e( 'If you’re not going to use a great site domain, leave it for a new user. Now have at it!' ) ?></p>
|
||||||
|
<form id="setupform" method="post" action="wp-signup.php">
|
||||||
|
<input type="hidden" name="stage" value="gimmeanotherblog" />
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Hidden sign-up form fields output when creating another site or user.
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $context A string describing the steps of the sign-up process. The value can be
|
||||||
|
* 'create-another-site', 'validate-user', or 'validate-site'.
|
||||||
|
*/
|
||||||
|
do_action( 'signup_hidden_fields', 'create-another-site' );
|
||||||
|
?>
|
||||||
|
<?php show_blog_form($blogname, $blog_title, $errors); ?>
|
||||||
|
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate a new blog signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses wp_get_current_user() to retrieve the current user
|
||||||
|
* @uses wpmu_create_blog() to add a new site
|
||||||
|
* @uses confirm_another_blog_signup() to confirm the user's new site signup
|
||||||
|
* @return bool True if blog signup was validated, false if error
|
||||||
|
*/
|
||||||
|
function validate_another_blog_signup() {
|
||||||
|
global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
|
||||||
|
$current_user = wp_get_current_user();
|
||||||
|
if ( !is_user_logged_in() )
|
||||||
|
die();
|
||||||
|
|
||||||
|
$result = validate_blog_form();
|
||||||
|
extract($result);
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() ) {
|
||||||
|
signup_another_blog($blogname, $blog_title, $errors);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$public = (int) $_POST['blog_public'];
|
||||||
|
|
||||||
|
$blog_meta_defaults = array(
|
||||||
|
'lang_id' => 1,
|
||||||
|
'public' => $public
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the new site meta variables.
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
* @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
|
||||||
|
*
|
||||||
|
* @param array $blog_meta_defaults An array of default blog meta variables.
|
||||||
|
*/
|
||||||
|
$meta = apply_filters( 'signup_create_blog_meta', $blog_meta_defaults );
|
||||||
|
/**
|
||||||
|
* Filter the new default site meta variables.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $meta {
|
||||||
|
* An array of default site meta variables.
|
||||||
|
*
|
||||||
|
* @type int $lang_id The language ID.
|
||||||
|
* @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
$meta = apply_filters( 'add_signup_meta', $meta );
|
||||||
|
|
||||||
|
wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );
|
||||||
|
confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm a new site signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $domain The domain URL
|
||||||
|
* @param string $path The site root path
|
||||||
|
* @param string $user_name The username
|
||||||
|
* @param string $user_email The user's email address
|
||||||
|
* @param array $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup()
|
||||||
|
*/
|
||||||
|
function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array() ) {
|
||||||
|
?>
|
||||||
|
<h2><?php printf( __( 'The site %s is yours.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
|
||||||
|
<p>
|
||||||
|
<?php printf( __( '<a href="http://%1$s">http://%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires when the site or user sign-up process is complete.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'signup_finished' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the new user signup process
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses apply_filters() filter $filtered_results
|
||||||
|
* @uses show_user_form() to display the user registration form
|
||||||
|
* @param string $user_name The username
|
||||||
|
* @param string $user_email The user's email
|
||||||
|
* @param array $errors
|
||||||
|
*/
|
||||||
|
function signup_user($user_name = '', $user_email = '', $errors = '') {
|
||||||
|
global $current_site, $active_signup;
|
||||||
|
|
||||||
|
if ( !is_wp_error($errors) )
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
$signup_for = isset( $_POST[ 'signup_for' ] ) ? esc_html( $_POST[ 'signup_for' ] ) : 'blog';
|
||||||
|
|
||||||
|
$signup_user_defaults = array(
|
||||||
|
'user_name' => $user_name,
|
||||||
|
'user_email' => $user_email,
|
||||||
|
'errors' => $errors,
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the default user variables used on the user sign-up form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $signup_user_defaults {
|
||||||
|
* An array of default user variables.
|
||||||
|
*
|
||||||
|
* @type string $user_name The user username.
|
||||||
|
* @type string $user_email The user email address.
|
||||||
|
* @type array $errors An array of possible errors relevant to the sign-up user.
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
$filtered_results = apply_filters( 'signup_user_init', $signup_user_defaults );
|
||||||
|
$user_name = $filtered_results['user_name'];
|
||||||
|
$user_email = $filtered_results['user_email'];
|
||||||
|
$errors = $filtered_results['errors'];
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<h2><?php printf( __( 'Get your own %s account in seconds' ), $current_site->site_name ) ?></h2>
|
||||||
|
<form id="setupform" method="post" action="wp-signup.php">
|
||||||
|
<input type="hidden" name="stage" value="validate-user-signup" />
|
||||||
|
<?php
|
||||||
|
//duplicate_hook
|
||||||
|
do_action( 'signup_hidden_fields', 'validate-user' );
|
||||||
|
?>
|
||||||
|
<?php show_user_form($user_name, $user_email, $errors); ?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php if ( $active_signup == 'blog' ) { ?>
|
||||||
|
<input id="signupblog" type="hidden" name="signup_for" value="blog" />
|
||||||
|
<?php } elseif ( $active_signup == 'user' ) { ?>
|
||||||
|
<input id="signupblog" type="hidden" name="signup_for" value="user" />
|
||||||
|
<?php } else { ?>
|
||||||
|
<input id="signupblog" type="radio" name="signup_for" value="blog" <?php checked( $signup_for, 'blog' ); ?> />
|
||||||
|
<label class="checkbox" for="signupblog"><?php _e('Gimme a site!') ?></label>
|
||||||
|
<br />
|
||||||
|
<input id="signupuser" type="radio" name="signup_for" value="user" <?php checked( $signup_for, 'user' ); ?> />
|
||||||
|
<label class="checkbox" for="signupuser"><?php _e('Just a username, please.') ?></label>
|
||||||
|
<?php } ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next') ?>" /></p>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate the new user signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses validate_user_form() to retrieve an array of the user data
|
||||||
|
* @uses wpmu_signup_user() to signup the new user
|
||||||
|
* @uses confirm_user_signup() to confirm the new user signup
|
||||||
|
* @return bool True if new user signup was validated, false if error
|
||||||
|
*/
|
||||||
|
function validate_user_signup() {
|
||||||
|
$result = validate_user_form();
|
||||||
|
extract($result);
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() ) {
|
||||||
|
signup_user($user_name, $user_email, $errors);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( 'blog' == $_POST['signup_for'] ) {
|
||||||
|
signup_blog($user_name, $user_email);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//duplicate_hook
|
||||||
|
wpmu_signup_user( $user_name, $user_email, apply_filters( 'add_signup_meta', array() ) );
|
||||||
|
|
||||||
|
confirm_user_signup($user_name, $user_email);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New user signup confirmation
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $user_name The username
|
||||||
|
* @param string $user_email The user's email address
|
||||||
|
*/
|
||||||
|
function confirm_user_signup($user_name, $user_email) {
|
||||||
|
?>
|
||||||
|
<h2><?php printf( __( '%s is your new username' ), $user_name) ?></h2>
|
||||||
|
<p><?php _e( 'But, before you can start using your new username, <strong>you must activate it</strong>.' ) ?></p>
|
||||||
|
<p><?php printf( __( 'Check your inbox at <strong>%s</strong> and click the link given.' ), $user_email ); ?></p>
|
||||||
|
<p><?php _e( 'If you do not activate your username within two days, you will have to sign up again.' ); ?></p>
|
||||||
|
<?php
|
||||||
|
//duplicate_hook
|
||||||
|
do_action( 'signup_finished' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the new site signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses apply_filters() to filter $filtered_results
|
||||||
|
* @uses show_blog_form() to display the blog signup form
|
||||||
|
* @param string $user_name The username
|
||||||
|
* @param string $user_email The user's email address
|
||||||
|
* @param string $blogname The site name
|
||||||
|
* @param string $blog_title The site title
|
||||||
|
* @param array $errors
|
||||||
|
*/
|
||||||
|
function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
|
||||||
|
if ( !is_wp_error($errors) )
|
||||||
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
$signup_blog_defaults = array(
|
||||||
|
'user_name' => $user_name,
|
||||||
|
'user_email' => $user_email,
|
||||||
|
'blogname' => $blogname,
|
||||||
|
'blog_title' => $blog_title,
|
||||||
|
'errors' => $errors
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the default site creation variables for the site sign-up form.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param array $signup_blog_defaults {
|
||||||
|
* An array of default site creation variables.
|
||||||
|
*
|
||||||
|
* @type string $user_name The user username.
|
||||||
|
* @type string $user_email The user email address.
|
||||||
|
* @type string $blogname The blogname.
|
||||||
|
* @type string $blog_title The title of the site.
|
||||||
|
* @type array $errors An array of possible errors relevant to new site creation variables.
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
$filtered_results = apply_filters( 'signup_blog_init', $signup_blog_defaults );
|
||||||
|
|
||||||
|
$user_name = $filtered_results['user_name'];
|
||||||
|
$user_email = $filtered_results['user_email'];
|
||||||
|
$blogname = $filtered_results['blogname'];
|
||||||
|
$blog_title = $filtered_results['blog_title'];
|
||||||
|
$errors = $filtered_results['errors'];
|
||||||
|
|
||||||
|
if ( empty($blogname) )
|
||||||
|
$blogname = $user_name;
|
||||||
|
?>
|
||||||
|
<form id="setupform" method="post" action="wp-signup.php">
|
||||||
|
<input type="hidden" name="stage" value="validate-blog-signup" />
|
||||||
|
<input type="hidden" name="user_name" value="<?php echo esc_attr($user_name) ?>" />
|
||||||
|
<input type="hidden" name="user_email" value="<?php echo esc_attr($user_email) ?>" />
|
||||||
|
<?php
|
||||||
|
//duplicate_hook
|
||||||
|
do_action( 'signup_hidden_fields', 'validate-site' );
|
||||||
|
?>
|
||||||
|
<?php show_blog_form($blogname, $blog_title, $errors); ?>
|
||||||
|
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Signup') ?>" /></p>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate new site signup
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @uses wpmu_validate_user_signup() to retrieve an array of the new user data and errors
|
||||||
|
* @uses wpmu_validate_blog_signup() to retrieve an array of the new site data and errors
|
||||||
|
* @uses apply_filters() to make signup $meta filterable
|
||||||
|
* @uses signup_user() to signup a new user
|
||||||
|
* @uses signup_blog() to signup a the new user to a new site
|
||||||
|
* @return bool True if the site signup was validated, false if error
|
||||||
|
*/
|
||||||
|
function validate_blog_signup() {
|
||||||
|
// Re-validate user info.
|
||||||
|
$result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
|
||||||
|
extract($result);
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() ) {
|
||||||
|
signup_user($user_name, $user_email, $errors);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title']);
|
||||||
|
extract($result);
|
||||||
|
|
||||||
|
if ( $errors->get_error_code() ) {
|
||||||
|
signup_blog($user_name, $user_email, $blogname, $blog_title, $errors);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$public = (int) $_POST['blog_public'];
|
||||||
|
$meta = array ('lang_id' => 1, 'public' => $public);
|
||||||
|
|
||||||
|
//duplicate_hook
|
||||||
|
$meta = apply_filters( 'add_signup_meta', $meta );
|
||||||
|
|
||||||
|
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
|
||||||
|
confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New site signup confirmation
|
||||||
|
*
|
||||||
|
* @since MU
|
||||||
|
*
|
||||||
|
* @param string $domain The domain URL
|
||||||
|
* @param string $path The site root path
|
||||||
|
* @param string $blog_title The new site title
|
||||||
|
* @param string $user_name The user's username
|
||||||
|
* @param string $user_email The user's email address
|
||||||
|
* @param array $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup()
|
||||||
|
*/
|
||||||
|
function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) {
|
||||||
|
?>
|
||||||
|
<h2><?php printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
|
||||||
|
|
||||||
|
<p><?php _e( 'But, before you can start using your site, <strong>you must activate it</strong>.' ) ?></p>
|
||||||
|
<p><?php printf( __( 'Check your inbox at <strong>%s</strong> and click the link given.' ), $user_email) ?></p>
|
||||||
|
<p><?php _e( 'If you do not activate your site within two days, you will have to sign up again.' ); ?></p>
|
||||||
|
<h2><?php _e( 'Still waiting for your email?' ); ?></h2>
|
||||||
|
<p>
|
||||||
|
<?php _e( 'If you haven’t received your email yet, there are a number of things you can do:' ) ?>
|
||||||
|
<ul id="noemail-tips">
|
||||||
|
<li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ) ?></strong></p></li>
|
||||||
|
<li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ) ?></p></li>
|
||||||
|
<li><?php printf( __( 'Have you entered your email correctly? You have entered %s, if it’s incorrect, you will not receive your email.' ), $user_email ) ?></li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
//duplicate_hook
|
||||||
|
do_action( 'signup_finished' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main
|
||||||
|
$active_signup = get_site_option( 'registration', 'none' );
|
||||||
|
/**
|
||||||
|
* Filter the type of site sign-up.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $active_signup String that returns registration type. The value can be
|
||||||
|
* 'all', 'none', 'blog', or 'user'.
|
||||||
|
*/
|
||||||
|
$active_signup = apply_filters( 'wpmu_active_signup', $active_signup );
|
||||||
|
|
||||||
|
// Make the signup type translatable.
|
||||||
|
$i18n_signup['all'] = _x('all', 'Multisite active signup type');
|
||||||
|
$i18n_signup['none'] = _x('none', 'Multisite active signup type');
|
||||||
|
$i18n_signup['blog'] = _x('blog', 'Multisite active signup type');
|
||||||
|
$i18n_signup['user'] = _x('user', 'Multisite active signup type');
|
||||||
|
|
||||||
|
if ( is_super_admin() )
|
||||||
|
echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing “%s” registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
|
||||||
|
|
||||||
|
$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
|
||||||
|
|
||||||
|
$current_user = wp_get_current_user();
|
||||||
|
if ( $active_signup == 'none' ) {
|
||||||
|
_e( 'Registration has been disabled.' );
|
||||||
|
} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
|
||||||
|
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( network_site_url( 'wp-signup.php' ) ) );
|
||||||
|
echo sprintf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
|
||||||
|
} else {
|
||||||
|
$stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default';
|
||||||
|
switch ( $stage ) {
|
||||||
|
case 'validate-user-signup' :
|
||||||
|
if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
|
||||||
|
validate_user_signup();
|
||||||
|
else
|
||||||
|
_e( 'User registration has been disabled.' );
|
||||||
|
break;
|
||||||
|
case 'validate-blog-signup':
|
||||||
|
if ( $active_signup == 'all' || $active_signup == 'blog' )
|
||||||
|
validate_blog_signup();
|
||||||
|
else
|
||||||
|
_e( 'Site registration has been disabled.' );
|
||||||
|
break;
|
||||||
|
case 'gimmeanotherblog':
|
||||||
|
validate_another_blog_signup();
|
||||||
|
break;
|
||||||
|
case 'default':
|
||||||
|
default :
|
||||||
|
$user_email = isset( $_POST[ 'user_email' ] ) ? $_POST[ 'user_email' ] : '';
|
||||||
|
/**
|
||||||
|
* Fires when the site sign-up form is sent.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'preprocess_signup_form' );
|
||||||
|
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
|
||||||
|
signup_another_blog($newblogname);
|
||||||
|
elseif ( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) )
|
||||||
|
signup_user( $newblogname, $user_email );
|
||||||
|
elseif ( is_user_logged_in() == false && ( $active_signup == 'blog' ) )
|
||||||
|
_e( 'Sorry, new registrations are not allowed at this time.' );
|
||||||
|
else
|
||||||
|
_e( 'You are logged in already. No need to register again!' );
|
||||||
|
|
||||||
|
if ( $newblogname ) {
|
||||||
|
$newblog = get_blogaddress_by_name( $newblogname );
|
||||||
|
|
||||||
|
if ( $active_signup == 'blog' || $active_signup == 'all' )
|
||||||
|
printf( '<p><em>' . __( 'The site you were looking for, <strong>%s</strong>, does not exist, but you can create it now!' ) . '</em></p>', $newblog );
|
||||||
|
else
|
||||||
|
printf( '<p><em>' . __( 'The site you were looking for, <strong>%s</strong>, does not exist.' ) . '</em></p>', $newblog );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires after the sign-up forms, before wp_footer.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'after_signup_form' ); ?>
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
|
@ -0,0 +1,127 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Handle Trackbacks and Pingbacks Sent to WordPress
|
||||||
|
*
|
||||||
|
* @since 0.71
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Trackbacks
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (empty($wp)) {
|
||||||
|
require_once( dirname( __FILE__ ) . '/wp-load.php' );
|
||||||
|
wp( array( 'tb' => '1' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response to a trackback.
|
||||||
|
*
|
||||||
|
* Responds with an error or success XML message.
|
||||||
|
*
|
||||||
|
* @since 0.71
|
||||||
|
*
|
||||||
|
* @param int|bool $error Whether there was an error.
|
||||||
|
* Default '0'. Accepts '0' or '1'.
|
||||||
|
* @param string $error_message Error message if an error occurred.
|
||||||
|
*/
|
||||||
|
function trackback_response($error = 0, $error_message = '') {
|
||||||
|
header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
|
||||||
|
if ($error) {
|
||||||
|
echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
|
||||||
|
echo "<response>\n";
|
||||||
|
echo "<error>1</error>\n";
|
||||||
|
echo "<message>$error_message</message>\n";
|
||||||
|
echo "</response>";
|
||||||
|
die();
|
||||||
|
} else {
|
||||||
|
echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
|
||||||
|
echo "<response>\n";
|
||||||
|
echo "<error>0</error>\n";
|
||||||
|
echo "</response>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trackback is done by a POST.
|
||||||
|
$request_array = 'HTTP_POST_VARS';
|
||||||
|
|
||||||
|
if ( !isset($_GET['tb_id']) || !$_GET['tb_id'] ) {
|
||||||
|
$tb_id = explode('/', $_SERVER['REQUEST_URI']);
|
||||||
|
$tb_id = intval( $tb_id[ count($tb_id) - 1 ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
$tb_url = isset($_POST['url']) ? $_POST['url'] : '';
|
||||||
|
$charset = isset($_POST['charset']) ? $_POST['charset'] : '';
|
||||||
|
|
||||||
|
// These three are stripslashed here so they can be properly escaped after mb_convert_encoding().
|
||||||
|
$title = isset($_POST['title']) ? wp_unslash($_POST['title']) : '';
|
||||||
|
$excerpt = isset($_POST['excerpt']) ? wp_unslash($_POST['excerpt']) : '';
|
||||||
|
$blog_name = isset($_POST['blog_name']) ? wp_unslash($_POST['blog_name']) : '';
|
||||||
|
|
||||||
|
if ($charset)
|
||||||
|
$charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
|
||||||
|
else
|
||||||
|
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
|
||||||
|
|
||||||
|
// No valid uses for UTF-7.
|
||||||
|
if ( false !== strpos($charset, 'UTF-7') )
|
||||||
|
die;
|
||||||
|
|
||||||
|
// For international trackbacks.
|
||||||
|
if ( function_exists('mb_convert_encoding') ) {
|
||||||
|
$title = mb_convert_encoding($title, get_option('blog_charset'), $charset);
|
||||||
|
$excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset);
|
||||||
|
$blog_name = mb_convert_encoding($blog_name, get_option('blog_charset'), $charset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now that mb_convert_encoding() has been given a swing, we need to escape these three.
|
||||||
|
$title = wp_slash($title);
|
||||||
|
$excerpt = wp_slash($excerpt);
|
||||||
|
$blog_name = wp_slash($blog_name);
|
||||||
|
|
||||||
|
if ( is_single() || is_page() )
|
||||||
|
$tb_id = $posts[0]->ID;
|
||||||
|
|
||||||
|
if ( !isset($tb_id) || !intval( $tb_id ) )
|
||||||
|
trackback_response(1, 'I really need an ID for this to work.');
|
||||||
|
|
||||||
|
if (empty($title) && empty($tb_url) && empty($blog_name)) {
|
||||||
|
// If it doesn't look like a trackback at all.
|
||||||
|
wp_redirect(get_permalink($tb_id));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !empty($tb_url) && !empty($title) ) {
|
||||||
|
header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
|
||||||
|
|
||||||
|
if ( !pings_open($tb_id) )
|
||||||
|
trackback_response(1, 'Sorry, trackbacks are closed for this item.');
|
||||||
|
|
||||||
|
$title = wp_html_excerpt( $title, 250, '…' );
|
||||||
|
$excerpt = wp_html_excerpt( $excerpt, 252, '…' );
|
||||||
|
|
||||||
|
$comment_post_ID = (int) $tb_id;
|
||||||
|
$comment_author = $blog_name;
|
||||||
|
$comment_author_email = '';
|
||||||
|
$comment_author_url = $tb_url;
|
||||||
|
$comment_content = "<strong>$title</strong>\n\n$excerpt";
|
||||||
|
$comment_type = 'trackback';
|
||||||
|
|
||||||
|
$dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) );
|
||||||
|
if ( $dupe )
|
||||||
|
trackback_response(1, 'We already have a ping from that URL for this post.');
|
||||||
|
|
||||||
|
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
|
||||||
|
|
||||||
|
wp_new_comment($commentdata);
|
||||||
|
$trackback_id = $wpdb->insert_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after a trackback is added to a post.
|
||||||
|
*
|
||||||
|
* @since 1.2.0
|
||||||
|
*
|
||||||
|
* @param int $trackback_id Trackback ID.
|
||||||
|
*/
|
||||||
|
do_action( 'trackback_post', $trackback_id );
|
||||||
|
trackback_response( 0 );
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* XML-RPC protocol support for WordPress
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this is an XML-RPC Request
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
define('XMLRPC_REQUEST', true);
|
||||||
|
|
||||||
|
// Some browser-embedded clients send cookies. We don't want them.
|
||||||
|
$_COOKIE = array();
|
||||||
|
|
||||||
|
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||||
|
// but we can do it ourself.
|
||||||
|
if ( !isset( $HTTP_RAW_POST_DATA ) ) {
|
||||||
|
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// fix for mozBlog and other cases where '<?xml' isn't on the very first line
|
||||||
|
if ( isset($HTTP_RAW_POST_DATA) )
|
||||||
|
$HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
|
||||||
|
|
||||||
|
/** Include the bootstrap for setting up WordPress environment */
|
||||||
|
include('./wp-load.php');
|
||||||
|
|
||||||
|
if ( isset( $_GET['rsd'] ) ) { // http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
|
||||||
|
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
|
?>
|
||||||
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
|
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
||||||
|
<service>
|
||||||
|
<engineName>WordPress</engineName>
|
||||||
|
<engineLink>http://wordpress.org/</engineLink>
|
||||||
|
<homePageLink><?php bloginfo_rss('url') ?></homePageLink>
|
||||||
|
<apis>
|
||||||
|
<api name="WordPress" blogID="1" preferred="true" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||||
|
<api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||||
|
<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||||
|
<api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Add additional APIs to the Really Simple Discovery (RSD) endpoint.
|
||||||
|
*
|
||||||
|
* @see http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
|
||||||
|
* @since 3.5.0
|
||||||
|
*/
|
||||||
|
do_action( 'xmlrpc_rsd_apis' );
|
||||||
|
?>
|
||||||
|
</apis>
|
||||||
|
</service>
|
||||||
|
</rsd>
|
||||||
|
<?php
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once(ABSPATH . 'wp-admin/includes/admin.php');
|
||||||
|
include_once(ABSPATH . WPINC . '/class-IXR.php');
|
||||||
|
include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Posts submitted via the XML-RPC interface get that title
|
||||||
|
* @name post_default_title
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
$post_default_title = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the class used for handling XML-RPC requests.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
* @param string The name of the XML-RPC server class.
|
||||||
|
*/
|
||||||
|
$wp_xmlrpc_server_class = apply_filters( 'wp_xmlrpc_server_class', 'wp_xmlrpc_server' );
|
||||||
|
$wp_xmlrpc_server = new $wp_xmlrpc_server_class;
|
||||||
|
|
||||||
|
// Fire off the request
|
||||||
|
$wp_xmlrpc_server->serve_request();
|
||||||
|
|
||||||
|
exit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* logIO() - Writes logging info to a file.
|
||||||
|
*
|
||||||
|
* @deprecated 3.4.0
|
||||||
|
* @deprecated Use error_log()
|
||||||
|
*
|
||||||
|
* @param string $io Whether input or output
|
||||||
|
* @param string $msg Information describing logging reason.
|
||||||
|
*/
|
||||||
|
function logIO( $io, $msg ) {
|
||||||
|
_deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
|
||||||
|
if ( ! empty( $GLOBALS['xmlrpc_logging'] ) )
|
||||||
|
error_log( $io . ' - ' . $msg );
|
||||||
|
}
|
Loading…
Reference in New Issue