Changeset 3794746
- Timestamp:
- 11/10/2026 04:01:40 PM (2 weeks ago)
- Location:
- copy-delete-posts
- Files:
-
- 253 added
- 8 edited
-
tags/1.5.8 (added)
-
tags/1.5.8/analyst (added)
-
tags/1.5.8/analyst/assets (added)
-
tags/1.5.8/analyst/assets/css (added)
-
tags/1.5.8/analyst/assets/css/customize.css (added)
-
tags/1.5.8/analyst/assets/img (added)
-
tags/1.5.8/analyst/assets/img/pencil.png (added)
-
tags/1.5.8/analyst/assets/img/shield_question.png (added)
-
tags/1.5.8/analyst/assets/img/shield_success.png (added)
-
tags/1.5.8/analyst/assets/img/smile.png (added)
-
tags/1.5.8/analyst/assets/index.php (added)
-
tags/1.5.8/analyst/assets/js (added)
-
tags/1.5.8/analyst/assets/js/customize.js (added)
-
tags/1.5.8/analyst/autoload.php (added)
-
tags/1.5.8/analyst/index.php (added)
-
tags/1.5.8/analyst/main.php (added)
-
tags/1.5.8/analyst/sdk_resolver.php (added)
-
tags/1.5.8/analyst/src (added)
-
tags/1.5.8/analyst/src/Account (added)
-
tags/1.5.8/analyst/src/Account/Account.php (added)
-
tags/1.5.8/analyst/src/Account/AccountData.php (added)
-
tags/1.5.8/analyst/src/Account/AccountDataFactory.php (added)
-
tags/1.5.8/analyst/src/Analyst.php (added)
-
tags/1.5.8/analyst/src/ApiRequestor.php (added)
-
tags/1.5.8/analyst/src/ApiResponse.php (added)
-
tags/1.5.8/analyst/src/Cache (added)
-
tags/1.5.8/analyst/src/Cache/DatabaseCache.php (added)
-
tags/1.5.8/analyst/src/Collector.php (added)
-
tags/1.5.8/analyst/src/Contracts (added)
-
tags/1.5.8/analyst/src/Contracts/AnalystContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/CacheContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/HttpClientContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/RequestContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/RequestorContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/StorageContract.php (added)
-
tags/1.5.8/analyst/src/Contracts/TrackerContract.php (added)
-
tags/1.5.8/analyst/src/Core (added)
-
tags/1.5.8/analyst/src/Core/AbstractFactory.php (added)
-
tags/1.5.8/analyst/src/Http (added)
-
tags/1.5.8/analyst/src/Http/CurlHttpClient.php (added)
-
tags/1.5.8/analyst/src/Http/DummyHttpClient.php (added)
-
tags/1.5.8/analyst/src/Http/Requests (added)
-
tags/1.5.8/analyst/src/Http/Requests/AbstractLoggerRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/ActivateRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/DeactivateRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/InstallRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/OptInRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/OptOutRequest.php (added)
-
tags/1.5.8/analyst/src/Http/Requests/UninstallRequest.php (added)
-
tags/1.5.8/analyst/src/Http/WordPressHttpClient.php (added)
-
tags/1.5.8/analyst/src/Mutator.php (added)
-
tags/1.5.8/analyst/src/Notices (added)
-
tags/1.5.8/analyst/src/Notices/Notice.php (added)
-
tags/1.5.8/analyst/src/Notices/NoticeFactory.php (added)
-
tags/1.5.8/analyst/src/Storage (added)
-
tags/1.5.8/analyst/src/Storage/DatabaseStorage.php (added)
-
tags/1.5.8/analyst/src/Storage/FileStorage.php (added)
-
tags/1.5.8/analyst/src/helpers.php (added)
-
tags/1.5.8/analyst/templates (added)
-
tags/1.5.8/analyst/templates/forms (added)
-
tags/1.5.8/analyst/templates/forms/deactivate.php (added)
-
tags/1.5.8/analyst/templates/forms/install.php (added)
-
tags/1.5.8/analyst/templates/notice.php (added)
-
tags/1.5.8/analyst/templates/optin.php (added)
-
tags/1.5.8/analyst/templates/optout.php (added)
-
tags/1.5.8/analyst/version.php (added)
-
tags/1.5.8/assets (added)
-
tags/1.5.8/assets/css (added)
-
tags/1.5.8/assets/css/cdp-editor.min.css (added)
-
tags/1.5.8/assets/css/cdp-global.min.css (added)
-
tags/1.5.8/assets/css/cdp-gutenberg.min.css (added)
-
tags/1.5.8/assets/css/cdp-select.min.css (added)
-
tags/1.5.8/assets/css/cdp-user.min.css (added)
-
tags/1.5.8/assets/css/cdp.min.css (added)
-
tags/1.5.8/assets/css/cdp.tooltip.min.css (added)
-
tags/1.5.8/assets/fonts (added)
-
tags/1.5.8/assets/fonts/Montserrat-Bold.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-ExtraBold.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-ExtraLight.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-Italic.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-Light.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-Medium.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-Regular.woff2 (added)
-
tags/1.5.8/assets/fonts/Montserrat-SemiBold.woff2 (added)
-
tags/1.5.8/assets/imgs (added)
-
tags/1.5.8/assets/imgs/alert_error.png (added)
-
tags/1.5.8/assets/imgs/alert_info.png (added)
-
tags/1.5.8/assets/imgs/alert_success.png (added)
-
tags/1.5.8/assets/imgs/alert_warning.png (added)
-
tags/1.5.8/assets/imgs/arrow.png (added)
-
tags/1.5.8/assets/imgs/close.png (added)
-
tags/1.5.8/assets/imgs/copy.png (added)
-
tags/1.5.8/assets/imgs/icon.png (added)
-
tags/1.5.8/assets/imgs/info.png (added)
-
tags/1.5.8/assets/imgs/intro_1.gif (added)
-
tags/1.5.8/assets/imgs/intro_2.gif (added)
-
tags/1.5.8/assets/imgs/intro_3.gif (added)
-
tags/1.5.8/assets/imgs/premium.png (added)
-
tags/1.5.8/assets/imgs/redirections.png (added)
-
tags/1.5.8/assets/imgs/search.png (added)
-
tags/1.5.8/assets/imgs/smile.svg (added)
-
tags/1.5.8/assets/imgs/stars.gif (added)
-
tags/1.5.8/assets/js (added)
-
tags/1.5.8/assets/js/cdp-bulk.min.js (added)
-
tags/1.5.8/assets/js/cdp-global.min.js (added)
-
tags/1.5.8/assets/js/cdp-gutenberg.min.js (added)
-
tags/1.5.8/assets/js/cdp-icPagination.min.js (added)
-
tags/1.5.8/assets/js/cdp-modal.min.js (added)
-
tags/1.5.8/assets/js/cdp-select.min.js (added)
-
tags/1.5.8/assets/js/cdp-user.min.js (added)
-
tags/1.5.8/assets/js/cdp.min.js (added)
-
tags/1.5.8/assets/js/cdp.tooltip.min.js (added)
-
tags/1.5.8/banner (added)
-
tags/1.5.8/banner/assets (added)
-
tags/1.5.8/banner/assets/index.min.js (added)
-
tags/1.5.8/banner/assets/style.min.css (added)
-
tags/1.5.8/banner/misc.php (added)
-
tags/1.5.8/banner/views (added)
-
tags/1.5.8/banner/views/index.php (added)
-
tags/1.5.8/banner/views/projects (added)
-
tags/1.5.8/banner/views/projects/bmi (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs/background-images.png (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs/background-texture-grey.png (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/bmi/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/bmi/install.php (added)
-
tags/1.5.8/banner/views/projects/bmi/installed.php (added)
-
tags/1.5.8/banner/views/projects/bmi/upgrade.php (added)
-
tags/1.5.8/banner/views/projects/cdp (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/background-texture-grey.png (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/main-background-image.png (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/secondary-background-image.svg (added)
-
tags/1.5.8/banner/views/projects/cdp/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/cdp/install.php (added)
-
tags/1.5.8/banner/views/projects/cdp/installed.php (added)
-
tags/1.5.8/banner/views/projects/cdp/upgrade.php (added)
-
tags/1.5.8/banner/views/projects/fit (added)
-
tags/1.5.8/banner/views/projects/fit/imgs (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/background-bottom-left.svg (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/background-bottom-right.svg (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/background-top-left.svg (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/background-top-right.svg (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/face1.png (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/face2.png (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/face3.png (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/face4.png (added)
-
tags/1.5.8/banner/views/projects/fit/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/fit/install.php (added)
-
tags/1.5.8/banner/views/projects/mpu (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/background-images.png (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/background-texture-green.png (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/background-texture-grey.png (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/mpu/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/mpu/install.php (added)
-
tags/1.5.8/banner/views/projects/mpu/installed.php (added)
-
tags/1.5.8/banner/views/projects/red (added)
-
tags/1.5.8/banner/views/projects/red/imgs (added)
-
tags/1.5.8/banner/views/projects/red/imgs/background-top-left.svg (added)
-
tags/1.5.8/banner/views/projects/red/imgs/big-colored-logo-rr.png (added)
-
tags/1.5.8/banner/views/projects/red/imgs/colored-logo-rr.svg (added)
-
tags/1.5.8/banner/views/projects/red/imgs/main-background-image.png (added)
-
tags/1.5.8/banner/views/projects/red/imgs/not-colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/red/install.php (added)
-
tags/1.5.8/banner/views/projects/red/installed.php (added)
-
tags/1.5.8/banner/views/projects/twp (added)
-
tags/1.5.8/banner/views/projects/twp/imgs (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/background-image-1.svg (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/background-image-2.svg (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/background-image-3.svg (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/twp/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/twp/install.php (added)
-
tags/1.5.8/banner/views/projects/usm (added)
-
tags/1.5.8/banner/views/projects/usm/imgs (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/background-icons.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/background-image.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/big-colored-logo.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/colored-logo.svg (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/play-icon.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/ribbon-icon.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/video-background.png (added)
-
tags/1.5.8/banner/views/projects/usm/imgs/white-logo.svg (added)
-
tags/1.5.8/banner/views/projects/usm/install.php (added)
-
tags/1.5.8/banner/views/projects/usm/installed.php (added)
-
tags/1.5.8/banner/views/projects/usm/part-install.php (added)
-
tags/1.5.8/banner/views/projects/usm/part-upgrade.php (added)
-
tags/1.5.8/banner/views/projects/usm/upgrade.php (added)
-
tags/1.5.8/banner/views/static (added)
-
tags/1.5.8/banner/views/static/imgs (added)
-
tags/1.5.8/banner/views/static/imgs/already-installed.svg (added)
-
tags/1.5.8/banner/views/static/imgs/check-icon.svg (added)
-
tags/1.5.8/banner/views/static/imgs/clock-icon.svg (added)
-
tags/1.5.8/banner/views/static/imgs/rating.svg (added)
-
tags/1.5.8/banner/views/static/imgs/white-arrow-right.svg (added)
-
tags/1.5.8/banner/views/static/tabs.php (added)
-
tags/1.5.8/copy-delete-posts.php (added)
-
tags/1.5.8/menu (added)
-
tags/1.5.8/menu/configuration.php (added)
-
tags/1.5.8/menu/modal.php (added)
-
tags/1.5.8/menu/notifications.php (added)
-
tags/1.5.8/menu/tooltips.php (added)
-
tags/1.5.8/menu/variables.php (added)
-
tags/1.5.8/modules (added)
-
tags/1.5.8/modules/new-bb-banner (added)
-
tags/1.5.8/modules/new-bb-banner/assets (added)
-
tags/1.5.8/modules/new-bb-banner/assets/css (added)
-
tags/1.5.8/modules/new-bb-banner/assets/css/style.css (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/1gb-free.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/4gb-upgraded.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/5gb-free.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/bg.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/bmi-logo.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/cloud-options.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/fast-backups.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/imgs/premium-cloud-options.svg (added)
-
tags/1.5.8/modules/new-bb-banner/assets/js (added)
-
tags/1.5.8/modules/new-bb-banner/assets/js/script.js (added)
-
tags/1.5.8/modules/new-bb-banner/misc.php (added)
-
tags/1.5.8/modules/new-bb-banner/views (added)
-
tags/1.5.8/modules/new-bb-banner/views/banner.php (added)
-
tags/1.5.8/modules/review (added)
-
tags/1.5.8/modules/review/assets (added)
-
tags/1.5.8/modules/review/assets/css (added)
-
tags/1.5.8/modules/review/assets/css/style.css (added)
-
tags/1.5.8/modules/review/assets/imgs (added)
-
tags/1.5.8/modules/review/assets/imgs/BM-background.svg (added)
-
tags/1.5.8/modules/review/assets/imgs/background-pattern.svg (added)
-
tags/1.5.8/modules/review/assets/imgs/main-image-part-2.svg (added)
-
tags/1.5.8/modules/review/assets/imgs/main-image-part-4.svg (added)
-
tags/1.5.8/modules/review/assets/imgs/main-image.svg (added)
-
tags/1.5.8/modules/review/assets/js (added)
-
tags/1.5.8/modules/review/assets/js/script.js (added)
-
tags/1.5.8/modules/review/review.php (added)
-
tags/1.5.8/modules/review/views (added)
-
tags/1.5.8/modules/review/views/banner.php (added)
-
tags/1.5.8/modules/tryOutPlugins (added)
-
tags/1.5.8/modules/tryOutPlugins/tryOutPlugins.php (added)
-
tags/1.5.8/post (added)
-
tags/1.5.8/post/handler.php (added)
-
tags/1.5.8/readme.txt (added)
-
tags/1.5.8/uninstall.php (added)
-
trunk/analyst/templates/optout.php (modified) (1 diff)
-
trunk/assets/js/cdp-gutenberg.min.js (modified) (1 diff)
-
trunk/assets/js/cdp.min.js (modified) (1 diff)
-
trunk/copy-delete-posts.php (modified) (3 diffs)
-
trunk/menu/configuration.php (modified) (6 diffs)
-
trunk/menu/variables.php (modified) (3 diffs)
-
trunk/post/handler.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
copy-delete-posts/trunk/analyst/templates/optout.php
r3481711 r3794746 23 23 <span style="color: #dc3232; font-size: 16px">Service unavailable. Please try again later</span> 24 24 </div> 25 </div>26 25 </div> 27 26 </div> -
copy-delete-posts/trunk/assets/js/cdp-gutenberg.min.js
r3455545 r3794746 1 jQuery(document).ready(function(t){if(t(document).on("readystatechange",function(){e(10)}),e(10),e(100),e(300),$button=t(t(".edit-post-header__settings").find('.components-button.components-icon-button[aria-label="Settings"]')[0]),$button.on("click",e),t(".edit-post-sidebar__panel-tab").on("click",e),t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent") ,n=t("#cdp-original-post").attr("data-cdp-parent-url");t(".edit-post-header-toolbar").append(t(`<div class="cdp-original-info-b">This post is a duplicate of <a href="${n}" target="_blank">${e}</a></div>`))}function e(e=100){"number"!=typeof e&&(e=100),setTimeout(()=>{0==t(".cdp-editor-gutenberg-copy").length&&($parent=t(".editor-post-trash").parents(".components-panel__row"),$html='<button type="button" class="components-button cdp-editor-gutenberg-copy is-button is-default is-large">'+cdpGutenbergJS.cdpCopy+"</button>",t($parent).prepend($html),t($html).insertBefore(".interface-pinned-items"))},e)}setInterval(()=>{t(".cdp-editor-gutenberg-copy").length<=0&&e(10)},3e3),t(window).on("resize",e)});1 jQuery(document).ready(function(t){if(t(document).on("readystatechange",function(){e(10)}),e(10),e(100),e(300),$button=t(t(".edit-post-header__settings").find('.components-button.components-icon-button[aria-label="Settings"]')[0]),$button.on("click",e),t(".edit-post-sidebar__panel-tab").on("click",e),t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent")||"",n=t("#cdp-original-post").attr("data-cdp-parent-url")||"",o=t("<a>",{target:"_blank",rel:"noopener noreferrer"}).text(e);/^https?:\/\//i.test(n)&&o.attr("href",n);let r=t("<div>",{class:"cdp-original-info-b"}).text("This post is a duplicate of ").append(o);t(".edit-post-header-toolbar").append(r)}function e(e=100){"number"!=typeof e&&(e=100),setTimeout(()=>{0==t(".cdp-editor-gutenberg-copy").length&&($parent=t(".editor-post-trash").parents(".components-panel__row"),$html='<button type="button" class="components-button cdp-editor-gutenberg-copy is-button is-default is-large">'+cdpGutenbergJS.cdpCopy+"</button>",t($parent).prepend($html),t($html).insertBefore(".interface-pinned-items"))},e)}setInterval(()=>{t(".cdp-editor-gutenberg-copy").length<=0&&e(10)},3e3),t(window).on("resize",e)}); -
copy-delete-posts/trunk/assets/js/cdp.min.js
r3709767 r3794746 1 function cdp_tooltips_update_content(){if(jQuery("select").cdpNiceSelect("update"),!(void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium)||!jQuery.cdp.isPremium()){jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),$prems=jQuery(".cdp-tooltip-premium");for(let t=0;t<$prems.length;t++){let e=$prems[t],c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top"))),jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return cdpJS.strAreYouSure;console.log(cdpJS.strYouAreCrazy);let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"debug_function"}).done(t=>{console.log(t),console.log(cdpJS.strDebugOutputEnd)})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,c="default",o=null,i=null,d=null,n=null,p=null,s=null,a=null,l=!1;const r=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function u(e=null,c=!1){let o=this;"string"==typeof e&&(o=`.${e}`),0!=c&&(o=c),$parent=t(t(o).parents(".cdp-collapsible")[0]),$arrow=$parent.find(".cdp-arrow"),$body=$parent.find(".cdp-collapsible-content"),$title=$parent.find(".cdp-collapsible-title"),$titles=t(".cdp-collapsible-title"),group=$parent.attr("data-cdp-group"),height=$body.prop("scrollHeight"),$oArrows=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-arrow"),$oBodies=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-collapsible-content"),$body.hasClass("cdp-active")?($body.removeClass("cdp-active"),$titles.removeClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":""})):($titles.removeClass("cdp-active"),$body.addClass("cdp-active"),$title.addClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-left").addClass("cdp-arrow-down"),$oArrows.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":`${height+30}px`}),$oBodies.css({"max-height":""}))}function m(){let e=t(".cdp-names-prefix").text(),c=t(".cdp-names-suffix").text(),o={year:(i=new Date).getFullYear(),month:("0"+(i.getMonth()+1)).slice(-2),day:i.getDate()<=9?"0"+i.getDate():i.getDate(),hour:i.getHours()<=9?"0"+i.getHours():i.getHours(),minute:i.getMinutes()<=9?"0"+i.getMinutes():i.getMinutes(),second:i.getSeconds()<=9?"0"+i.getSeconds():i.getSeconds(),week:i.getDay()};var i;let d="(blank)"==t(".cdp-togglable-name-b").text()?"":cdpJS.strTogglableName,n=`${e.trim()} ${d} ${c.trim()}`;n=n.replace(/\[Counter\]/g,"2");let p=t(".cdp-date-picked").val();"1"==p?n=n.replace(/\[CurrentDate\]/g,`${o.month}/${o.day}/${o.year}`):"2"==p?n=n.replace(/\[CurrentDate\]/g,`${o.day}/${o.month}/${o.year}`):"3"==p&&function(e){let c=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_formatted_time",format:c}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{n=n.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(n),n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n)}),"3"!=p&&(n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n))}function h(e=""){before=t(e).html(),text=t(e).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(e).html(text)}function f(){val=t('.cdp-other-options[name="after_copy"]').val(),2==val?t(".cdp-if-edit-page-selected").show(300):t(".cdp-if-edit-page-selected").is(":hidden")||t(".cdp-if-edit-page-selected").hide(300),setTimeout(()=>{jQuery(".cdp-oth-section").css({"max-height":""}),jQuery(".cdp-oth-section").css({"max-height":jQuery(".cdp-oth-section").height()})},310)}function g(o=!1){let i=t(this).attr("data-cdp-btn");1==o&&(i="copy-quick");let d=["copy-quick","copy-custom","copy-custom-link"],n=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(d.includes(i)){let o={type:i};if(i==d[0]){if(o.times=t(".cdp-modal-input-times-tooltip").val(),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",!o.profile||"custom"==o.profile)return t.cdpNotification("warning","Please select settings for this copy."),void _()}else if(i==d[1]||i==d[2]){t("#cdp-copy-modal-global").is(":visible")?($select=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second-modal"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]').val()):(o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val()),o.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",o.custom={};for(let e=0;e<n.length;++e)o.custom[t(n[e]).attr("name")]=t(n[e]).is(":checked");o.custom.taxonomy=o.custom.cdp_taxonomy,delete o.custom.cdp_taxonomy}if(isNaN(parseInt(o.times))||parseInt(o.times)<=0)return void t.cdpNotification("warning",cdpJS.strCopyNumIssue);let p=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];o.profile&&!p.includes(o.profile)||(o.profile=c),L(),function(e=(()=>{})){window.onbeforeunload=(()=>cdpJS.strCopyInProgress),$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")&&($e.show(),$e.animate({opacity:1},300,function(){e(!0)}))}(()=>{t.ajax({type:"POST",url:ajaxurl,data:{action:"cdp_action_handling",token:"cdp",f:"copy_post",nonce:cdpGlobalJS.ajaxNonce,origin:"tooltip",id:[e],data:o},timeout:0}).done(function(e){_(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error",cdpJS.strCopyPostIssue):i==d[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"delete_success_img"}),"-28"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),t("#cdp_notice_error_modal").length>0&&(t("#cdp_notice_error_modal").show(),t("#cdp_notice_error_modal").fadeIn(300),t("#cdp_notice_error_modal").animate({opacity:1},500),t("#cdp_notice_error_modal .cdp_notice_content").animate({opacity:1,top:"50%"},500))):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error",cdpJS.strCopyPostIssueConsInfo),_(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification(cdpJS.strTooltipBtnIssue)}function v(e,o=!1){let i=["clear","alloptions","custom","custom_named","null","undefined",null,void 0],d=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),n=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),p=d,s=!1;t("#cdp-copy-modal-global").is(":visible")&&(p=n,s=!0);let a=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic:not(:disabled)"),l=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),r=p.val();0==e&&0!=o&&(r=o),"custom_named"==r?p.val("custom_named"):void 0===r||"custom"==r||null==r||void 0==r?p.val("custom"):"clear"==r?(0!=e&&e.preventDefault(),l.prop("checked",!1),p.val("custom_named")):"alloptions"==r?(0!=e&&e.preventDefault(),a.prop("checked",!0),p.val("custom_named")):!i.includes(r)&&r.length>=1?b(r,function(e){e.cdp_taxonomy=e.taxonomy,delete e.taxonomy;for(let c in e)"object"!=typeof c&&t(`.cdp-input-dynamic[name="${c}"]`).prop("checked",y(e[c]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning",cdpJS.strSelectedProfIssue)),0==e&&p.val(r),i.includes(r)||(c=r,s?d.val(r):n.val(r)),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function b(e="default",c){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_settings",profile:e}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),e.status&&"error_no_exists"==e.status){t.cdpNotification("warning",cdpJS.strSelectedProfEmpty);let e={},o=t(".cdp-modal-option-r");for(let c=0;c<o.length;c++)e[t(o[c]).attr("name")]=t(o[c]).is(":checked");c(!1)}else c(e)}).fail(e=>{t.cdpNotification("error",cdpJS.strSelectedProfGetIssue),console.log(cdpJS.strConsLogErr),console.log(e),console.log("––––––––––––––––––––––––––"),c(!1)})}function x(){t(this).attr("class");let e=parseInt(t(this).val());e<=0&&(e=1),e>9999&&(e=9999),isNaN(e)&&(e=1),e||(e=1),t(".cdp-modal-input-times").val(e),t(".cdp-modal-input-times-tooltip").val(e),e>50?(t(".cdp-error-span-tooltip").show(300),t(".cdp-tooltip-before").attr("style","height: calc(225px - 20px - 16px) !important")):(t(".cdp-error-span-tooltip").hide(300),t(".cdp-tooltip-before").attr("style","")),e>1?(t(".cdp-multiple-tooltip-count").animate({opacity:1},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').hide()):(t(".cdp-multiple-tooltip-count").animate({opacity:0},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').show()),setTimeout(()=>{O()},310)}function _(e=(()=>{})){window.onbeforeunload=null,$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),e(!0)})}function w(){let e=t(".cdp-profile-selected").val();var c,o;b(e,i=>{if(t.isJsonString(i)||"object"==typeof i){"object"!=typeof i&&(i=JSON.parse(i));let d=["usmplugin","yoast","woo"];for(k in i)"names"==k?(t(".cdp-names-prefix").html(i[k].prefix),t(".cdp-names-suffix").html(i[k].suffix),"3"!=i[k].format||r||(i[k].format="1"),t(".cdp-date-picked").val(i[k].format),t(".cdp-custom-date-picking").val(i[k].custom)):(!d.includes(k)||d.includes(k)&&r&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==i[k]);cdp_tooltips_update_content(),m(),f(),r&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),j(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),c=e,o=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"set_default_profile",selection:c}).done(t=>{o(t)}).fail(()=>{o(!1)})}else t.cdpNotification("warning",cdpJS.strServerDataIssue)})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,c=t(".cdp-input-d-id:checked").length;c==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(c),$visible=t(".cdp-input-d-id:visible").length,$visible_checked=t(".cdp-input-d-id:checked:visible").length,$visible==$visible_checked?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1),function(){let e=t(".cdp-input-d-id").parents("tr"),c=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),c.addClass("cdp-del")}()}function S(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"give_me_current_tasks"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status&&e(c.tasks)})}function C(e){let c=0,o=+new Date/1e3,i=t(".cdp-dd-item");for(let o=0;o<i.length;++o){e[t(i[o]).attr("data-token")]||t(i[o]).remove(),c++}for(let d in e){let n=e[d],p=i.filter(function(){return t(this).attr("data-token")===d}).first();if(0==n.done){if(p.hasClass("cdp-dd-ud"))continue;{p.remove();let e=o-n.done>=86400;t(".cdp-dd-undone-list").append(I(n.shown,d,e,n.f)),c++}}else{if(p.hasClass("cdp-dd-d"))continue;p.remove(),t(".cdp-dd-done-list").append(D(n.data,n.shown,d,n.f)),c++}}(c>0||0==i.length)&&function(){let e=t(".cdp-dd-item").length,c=t(".cdp-dd-d").length,o=t(".cdp-dd-ud").length;c<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").show()),o<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").show()),e<=0?t(".cdp-admin-bar-noti").addClass("cdp-noti-hide"):t(".cdp-admin-bar-noti").removeClass("cdp-noti-hide"),t(".cdp-notis-counter").text(t(".cdp-bnew-notis").length)}()}function j(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let c=t($trs[e]);c.find("input").is(":checked")?c.addClass("cdp-selected-tr-opt"):c.removeClass("cdp-selected-tr-opt")}}function J(e){if(t(".cdp-modal").is(":visible"))return;let c=window;0!=t("#wpbody").scrollTop()&&(c="#wpbody");let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select, .cdp-nice-select .list").css({transition:"all 0s"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-cdp-nice-select .list").css({transition:""})},100),clearTimeout(d),d=setTimeout(()=>{let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select .list").css({transition:"all 0s !important"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-nice-select .list").css({transition:""})},100)},100)}function T(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),c=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||c?t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml):t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml2)}function N(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col)}t(".cdp-intro-button").on("click",function(){let e=t(".cdp-intro").height();t(".cdp-intro").css({height:e+"px"}),t(".cdp-intro").animate({opacity:0,height:0},300,function(){t(".cdp-intro").hide(10),t("#cdp-never-intro").is(":checked")&&t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"no_intro",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroSaveIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroSaveIssue2)})}),t(".cdp-s-i-a").show(),t(".cdp-s-i-a").animate({opacity:1},300)}),t(".cdp-save-options").on("click",function(){let e=t(".cdp-data-set"),c=t(".cdp-other-inputs"),o=t(".cdp-profile-selected").val(),i=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),d=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),n={names:{prefix:i,suffix:d,format:t(".cdp-date-picked").val(),custom:t(".cdp-custom-date-picking").val(),display:t(t(`option[value="${t(".cdp-profile-selected").val()}"]`)[0]).text()}},p={afterCopy:t('.cdp-other-options[name="after_copy"]').val(),postConverter:t('.cdp-other-options[name="post_converter"]').val(),others:{}};t('.cdp-other-inputs[name="cdp-take-over-original-slug"]').is(":checked")&&t('.cdp-data-set[data-cdp-opt="slug"]').trigger("click");let s={},a=t(".cdp-other-roles");for(let e=0;e<a.length;e++)s[t(a[e]).attr("name")]=t(a[e]).is(":checked");p.roles=s;for(let c=0;c<e.length;c++)n[t(e[c]).attr("data-cdp-opt")]=!!t(e[c]).is(":checked");for(let e=0;e<c.length;e++)p.others[t(c[e]).attr("name")]=!!t(c[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"save_options",options:n,profile:o,entire:p}).done(e=>{"success"==e?t.cdpNotification("success",cdpJS.strSettingsSaved,2e3):" error"==e?t.cdpNotification("error",cdpJS.strSettingsSaveIssue):t.cdpNotification("success",cdpJS.strSettingsSaved,2e3)}).fail(e=>{t.cdpNotification("error",cdpJS.strSettingsSaveIssue2),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroUpdateIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroUpdateIssue2)}),t(".cdp-s-i-a").animate({opacity:0},300,function(){t(".cdp-s-i-a").hide()}),function(){t(".cdp-intro").show().css({height:""});let e=t(".cdp-intro").height();t(".cdp-intro").css({height:"0px"}),t(".cdp-intro").animate({opacity:1,height:e+"px"},300,function(){})}()}),t(".cdp-show-projects").on("click",function(){t(".cdp-projects").is(":hidden")&&t(".cdp-projects").show(300);t(".cdp-show-projects").removeClass("cdp-pointer").animate({opacity:.5},300)}),t(".cdp-project-box").on("mouseenter",function(){t(".cdp-project-box").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-project-box").on("mouseleave",function(){t(".cdp-project-box").removeClass("cdp-half-opacity")}),t(".cdp-collapsible-title").on("click",u),t(".cdp-magic-input").on("keyup change",function(){before=t(this).html(),text=t(this).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(this).html(text)}),t(".cdp-magic-input").on("focus",function(e,c){if(c)return;let o=t(this).text();" "!=o[0]&&(o=" "+o);" "!=o[o.length-1]&&(o+=" ");t(this).html(o),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),m()},300)}),t(".cdp-support-animated").on("mouseenter",function(){t(".cdp-support-animated").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-name-clickable").on("mouseup",function(e){if(e.preventDefault(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],$box={1:".cdp-names-prefix",2:".cdp-names-real-input",3:".cdp-names-suffix"},t($box[e.which]).append($picks[t(this).attr("data-cdp-val")]),m(),e.which==e)return!1}),t(".cdp-support-animated").on("mouseleave",function(){t(".cdp-support-animated").removeClass("cdp-half-opacity")}),t(".cdp-f-einput-n").on("click","button",function(){let e=t(t(this).parents(".cdp-cf")[0]).find("input"),c=t(this).text(),o="12";"V"==c[0]?o="-51":"D"==c[0]&&(o="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning",cdpJS.strLicenseKeyEmpty);t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"i_love_squirrels",rat:e.val(),m:o}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status?"valid"==c.data.license?(t.cdpNotification("success",cdpJS.strLicenseActiveReloading),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==c.data.license?(e.prop("disabled",!0),t(this).text("Activating...").prop("disabled",!0).addClass("disabled"),o="12",t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"i_love_squirrels",rat:e.val(),m:o}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),void 0!==e.data&&void 0!==e.data.msg?(t.cdpNotification("success",e.data.msg),setTimeout(()=>{window.location.reload()},2e3)):(t(this).text("Activate").prop("disabled",!1),t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage))}).fail(e=>{t(this).text("Activate").prop("disabled",!1),t.cdpNotification("error",cdpJS.strSendRequestIssue2)})):void 0!==c.data&&void 0!==c.data.msg?(t.cdpNotification("success",c.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage):"fail"==c.status?t.cdpNotification(c.fail.type,c.fail.msg):(console.error(c),t.cdpNotification("error",cdpJS.strSendRequestIssue))}).fail(e=>{t.cdpNotification("error",cdpJS.strSendRequestIssue2)})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",m),t('.cdp-other-options[name="after_copy"]').on("change",f),t("body").on("change keyup",".cdp-input-dynamic",function(){$input=t(t(".cdp-tooltip-content, .cdp-modal-content").find(`[name="${t(this).attr("name")}"]`)),"checkbox"==t(this).attr("type")?$input.prop("checked",t(this).is(":checked")):t($input).is("select")?($input.val(t(this).val()),t($input).hasClass("cdp-modal-input-profiles-r")&&v(!1,t(this).val())):$input.val(t(this).val());if(cdp_tooltips_update_content(),t($input).is("select")&&t($input).hasClass("cdp-premium-modal-dropdown")){let e=t("div.cdp-premium-modal-dropdown"),c=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==c.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html(cdpJS.strChangeTypeOfCopy)):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){l=!0;let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&v(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{O(),setTimeout(()=>{l=!1},2e3)},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){v(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]');t("#cdp-copy-modal-global").is(":visible")&&(e=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'));e.val("custom_named"),cdp_tooltips_update_content(),v(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",x),t("body").on("change",".cdp-modal-input-times",x),t("body").on("click",".cdp-modal-times, .cdp-modal",t.cdpModalClose),t("body").on("click",".cdp-modal-open",t.cdpModal),t("body").on("change",".cdp-profile-selected",w),t("body").on("click",".cdp-show-more-d-title",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-more-d-title").is(":hidden")?(t(".cdp-more-d-title").show(300),t(this).text("(hide more options)")):(t(".cdp-more-d-title").hide(300),t(this).text("(show more options)"));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-first-chapter-cb",function(){t(".cdp-d-section").css({"max-height":"",height:""});let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,o=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+c+o>1?t(".cdp-d-option-select-parent").show(300):t(".cdp-d-option-select-parent").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("click",".cdp-d-search",function(){let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")?1:0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,d=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+c+d<=0?t.cdpNotification("error",cdpJS.strCheckDuplicatesSearch):null==i?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_all_posts"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),e(c)}).fail(c=>{t.cdpNotification("error",cdpJS.strPostListIssue),console.log(c),e(!1)})}(t=>{0!=t&&p(t)}):p(i);function n(t,e){let c=parseInt(e[e.length-1]);for(let o=e.length;o>0&&(c=parseInt(e[o-1]),ext=!1,t.posts.findIndex(t=>t.ID==c)>=0?ext=!0:t.pages.findIndex(t=>t.ID==c)>=0?ext=!0:t.custom.findIndex(t=>t.ID==c)>=0?ext=!0:c=!1,1!=ext);--o);return c}function p(e){let c={posts:[],pages:[],custom:[]},d={},p={};null!=i&&(c=i);let m=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),h=!!t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked"),f=!!t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked"),g=!!t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),v=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),y=!!t('.cdp-d-option[name="cdp-d-c-excerpt"]').is(":checked"),b=!!t('.cdp-d-option[name="cdp-d-c-count"]').is(":checked"),x=t('.cdp-d-option-select[name="cdp-d-d-sel-which"]').val(),k=null,_=null;if(m+h+f>1&&(k=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(_="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==i)for(post_type in e)if("meta"!=post_type)for(post in e[post_type]){post=e[post_type][post],post.post_type=post.post_type[0].toUpperCase()+post.post_type.slice(1);let o=e.meta[post.ID]._cdp_origin,i=e.meta[post.ID]._cdp_counter,d=e.meta[post.ID]._cdp_origin_title,s=l(post.post_content),a={id:post.ID,url:post.guid,slug:post.post_name,type:post.post_type,date:post.post_date,title:post.post_title,status:post.post_status,edit:post.post_modified,excerpt:post.post_excerpt,words:u(s),origin:"object"==typeof o&&n(e,o),counter:"object"==typeof i&&i[i.length-1],origin_title:"object"==typeof d&&d[0]};if(r&&t.cdp.isPremium()&&(a.content=t.cdp.premium.prepareAdvanced(s),a.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof o){let t=parseInt(o[o.length-1]);void 0===p[t]?p[t]=1:p[t]++}c[post_type].push(a)}c=function(t){let e=JSON.parse(JSON.stringify(t));return e.posts.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.pages.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.custom.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e}(c),null==i&&(i=c);let w=[],S=[],C=!1,j=0,J=0,T=[],N=[],I=[];if("2"==k){j=1;let t=[],e=[],o=[];1==m&&(t=c.posts),1==h&&(e=c.pages),1==f&&(o=c.custom),w=(w=[].concat(t,e,o)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),S=P(w)}else{let t=[],e=[],o=[];1==m&&(j+=1),1==h&&(j+=1),1==f&&(j+=1),c.posts=c.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(t=P(c.posts)),c.pages=c.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(e=P(c.pages)),c.custom=c.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(o=P(c.custom)),S=[].concat(t,e,o)}function D(e){1==++J&&(T=e),2==J&&(N=e),3==J&&(I=e),J==j&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((c=e[post],t(`<tr data-id="${c.id}">\n <td><input type="checkbox" id="cdp_in_${c.id}" class="cdp-input-d-id" name="${c.id}"/></td>\n <td><label for="cdp_in_${c.id}">${c.title}</label></td>\n <td><a href="${c.url}" target="_blank">${""!=c.slug?c.slug:c.url}</a></td>\n <td>${c.type}</td>\n <td>${c.date.slice(0,-8)}</td>\n <td>${c.words}</td>\n </tr>`)));var c;if("1"==x)for(parent in d)for(child in d[parent])t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0);else if("2"==x)for(parent in d){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...d[parent]);for(child in d[parent])d[parent][child]!=e&&t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0)}else"3"==x&&t(".cdp-input-d-id").prop("checked",!0);s=d,a=x;let i=!(g||v||y||b),n=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,p=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,l=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;i&&n+p+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),o.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html(cdpJS.strFilterNotSelected),t('[data-empty-info="true"]').addClass("cdp-customized")):o.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning",cdpJS.strNoDataForFilter),t(".cdp-delete-info").hide(300)):t(".cdp-not-yet-search").is(":visible")||(t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300),setTimeout(()=>{t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-d-section").css({"max-height":`${t(".cdp-d-section").height()}px`})},320))}(S=[].concat(T,N,I))}function P(e){let c=[],o=[],i=!(g||v||y||b);if(!e)return c;function n(t,e){if(t.id==e.origin&&0!=e.origin_title){let t=e.origin_title.replace(/\[Counter\]/g,e.counter);if(e.title==t)return!0}return!1}function p(t){for(let e=0;e<t.length;e++){let c=t[e];if(!o.includes(c.id))for(let d=i?0:e;d<t.length;d++){if(!t[d])continue;if(o.includes(t[d].id))continue;if(d==e)continue;let p=1==g&&(c.title==t[d].title||1==_&&n(c,t[d])),a=1==v&&Q(c.slug,t[d].slug)>=.85,l=!1;l=1==p||1==a?1==y&&(""==c.excerpt||c.excerpt==t[d].excerpt):1==y&&""!=c.excerpt&&c.excerpt==t[d].excerpt;let r=1==b&&c.words==t[d].words,u=1==i&&c.id==t[d].origin&&t.findIndex(e=>e.origin==t[d].id)<=-1;!p&&g||!a&&v||!l&&y||!r&&b||!u&&i||(s(c,!0,!1),s(t[d],!1,c.id))}}D(c)}function s(t,e=!1,i=!1){o.includes(t.id)||(1==e?d[t.id]=[]:0!=i&&d[i].push(t.id),o.push(t.id),c.push(t))}r&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_authors"}).done(c=>{if(t.isJsonString(c)&&(c=t.cdpParse(c)),"success"===c.status){let o=c.users;p(e=t.cdp.premium.advancedfilter(e,o))}else!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}).fail(()=>{!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}):p(e)}}function l(t){return(t=(t=(t=t.replace(/\<\!\-\-(.*?)\-\-\>/gim,"")).replace(/<[^>]*>/gim," ")).replace(/\s+/gim," ")).trim()}function u(t){return(t=t.split(" ")).length}}),t("body").on("change",".cdp-input-d-id",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(c++,t(this).parents("tr").addClass("cdp-del")):(c--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(c),c==e)t(".cdp-d-select-all").text("Deselect all"),t(".cdp-d-checkbox-all").prop("checked",!0);else{t(".cdp-d-select-all").text("Select all");let e=t(".cdp-input-d-id:visible");for(let c=0;c<e.length;++c){if(!t(e[c]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}c==e.length-1&&t(".cdp-d-checkbox-all").prop("checked",!0)}}}),t("body").on("change",".cdp-d-checkbox-all",function(e){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return e.preventDefault(),void t(this).prop("checked",!1);let c=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),o=t(".cdp-d-checkbox-all").is(":checked"),i=t(".cdp-input-d-id:visible"),d=0;for(let e=0;e<i.length;++e)t(i[e]).is(":checked")&&!o?d--:!t(i[e]).is(":checked")&&o&&d++,t(i[e]).prop("checked",o);let n=parseInt(t(".cdp-t-d-ct").text())+d;t(".cdp-t-d-ct").text(n),n==c?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all");let p=t(".cdp-input-d-id:visible").parents("tr"),s=t(".cdp-input-d-id:visible:checked").parents("tr");p.removeClass("cdp-del"),s.addClass("cdp-del")}),t("body").on("click",".cdp-d-select-all",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text()),o=!0;e==c&&(o=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",o);t(".cdp-t-d-ct").text(1==o?e:"0"),0==o?(t(".cdp-d-select-all").text("Select all"),t(".cdp-d-checkbox-all").prop("checked",!1),t(".cdp-input-d-id").parents("tr").removeClass("cdp-del")):(t(".cdp-d-checkbox-all").prop("checked",!0),t(".cdp-d-select-all").text("Deselect all"),t(".cdp-input-d-id").parents("tr").addClass("cdp-del"))}),t("body").on("click",".prev_page, .next_page, .page_link",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;t(".cdp-input-d-id:visible:checked").length==t(".cdp-input-d-id:visible").length?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1)}),t("body").on("click",".cdp-d-real-delete",function e(c=!1,d=null,n=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning",cdpJS.strCheckSteps);let p=[];if(null===d){let e=t(".cdp-input-d-id:checked");for(let c=0;c<e.length;++c)p.push(parseInt(t(e[c]).attr("name")));if(0==p.length)return void t.cdpNotification("warning",cdpJS.strSelectPostToDel)}else p=d;let l=t(".cdp-d-throttling").val(),m=t(".cdp-d-throttling-count").val(),h=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,v="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==l&&(!m||0==m||""==m))return void t.cdpNotification("warning",cdpJS.strFieldWrongCount);r&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(p.length>801&&!0!==c){let t=Math.ceil(p.length/800);for(let c=0,o=!0;c<t;++c)c==t-1&&(o=!1),e(o,p.slice(800*c,800*c+800),c);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",nonce:cdpGlobalJS.ajaxNonce,ids:p,throttling:l,thc:m,redi:h,thrs:f,auit:v,auitd:g}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){t("#cdp-d-table-tbody").find(".cdp-del").remove();let e=i.posts.filter(t=>!p.includes(t.id)),d=i.pages.filter(t=>!p.includes(t.id)),s=i.custom.filter(t=>!p.includes(t.id));i={posts:e,pages:d,custom:s},!0!==c&&o.refresh(),$(),0==n&&t.cdpNotification("success",cdpJS.strDeletionProcessStarted),S(C),!0!==c&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col))}else!0!==c&&t.cdpNotification("error",`${cdpJS.strDeletionTaskStart} ${"1"==l?cdpJS.strDeletionTaskEnd:""}`)}).fail(e=>{!0!==c&&t.cdpNotification("error",cdpJS.strDeletionTaskConsInfo),console.log(e)})}),t("body").on("change",".cdp-d-throttling",function(){t(".cdp-d-section").css({"max-height":"",height:""}),"1"==t(this).val()?t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").show(300):t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-throttling-count",function(){let e=parseInt(t(this).val());isNaN(e)?t(this).val(1):e>=1&&e<=10240?e>=1&&e<=1&&t(this).val(1):e<1?t(this).val(1):t(this).val(10240)}),t("body").on("change",".cdp-custom-date-picking",m),t("body").on("mouseover",".cdp-tooltip-copy",function(){if(!0===l)return;t(this).hasClass("cdptipstered")||(t(this).cdptipster({delay:100,timer:400,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"bottom",contentAsHTML:!0,content:t(".cdp-tooltip-content").html(),repositionOnScroll:!0,selfDestruction:!1,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},functionBefore:P,functionReady:M,functionAfter:A,functionFormat:H}),t(this).cdptipster("open"),t("#cdp-hideTT").length>0&&t(".cdptipster-base").hide())}),t("body").on("keyup",".cdp-d-searchbox-c",function(){if(t('[data-empty-info="true"].cdp-customized').length>0)return;let e=t(this).val();e.length>100&&(e=e.substr(0,100));if(e=(e=e.trim().replace(/\s+/gim," ").toLowerCase()).split(" "),$trs=t("#cdp-d-table-tbody").find("tr"),$trs.length<=0)return;$trs.removeAttr("data-ignore");for(let c=0;c<$trs.length;++c){$tr=t($trs[c]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let o=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))o=!0;else{if(!$url.includes(e[t])){o=!1;break}o=!0}0==o&&$tr.attr("data-ignore","true")}clearTimeout(p),p=setTimeout(()=>{o.refresh()},20)}),t("body").on("change",".cdp-data-set",j),t("#wpbody").on("scroll",J),t(window).on("scroll",J),t("body").on("click",".cdp-nice-select",J),t("body").on("click",".cdp-show-the-copies",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t("#cdp-d-table-tbody").find("tr").not('[data-empty-info="true"]').removeAttr("data-ignore"),t(".cdp-d-searchbox-c").val(""),t('[data-empty-info="true"]').addClass("cdp-customized"),o.refresh(),$(),t(".cdp-d-section").css({"max-height":"",height:""}),parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text())>0&&t(".cdp-delete-info").show(300);t(".cdp-not-yet-search").is(":visible")||(t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-per-page-select-show",function(){let e=t(this).val();o.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',T),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',T),t("body").on("click",".cdp-tab-element",function(){if(t(this).hasClass("cdp-tab-active"))return;if("true"==t(this).attr("data-disabled"))return;let e=t(t(`#${t(this).attr("data-box")}`)[0]),c=t(t(`#${t(".cdp-tab-active").attr("data-box")}`)[0]);if(!e||e.length<=0)return;t(".cdp-tab-active").removeClass("cdp-tab-active"),t(this).addClass("cdp-tab-active"),e.show(),e.css({"max-height":"",height:""});let o=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":o+"px",opacity:1},500,function(){}),t(".cdp-d-section").css({height:"","max-height":""}),c.css({"max-height":c.height()+"px",opacity:1}),c.animate({"max-height":"0px",opacity:0},500,function(){c.hide()}),setTimeout(()=>{c.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let i=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-i},500)}),t("body").on("click",".cdp-premium-element",function(t){t.preventDefault()}),t("body").on("click",".cdp-go-to-names-chapter",function(e){e.preventDefault(),L(),u("cdp-name-section-cnx"),setTimeout(()=>{let e=parseInt(t(window).height()/4);t("#wpbody").animate({scrollTop:t(".cdp-name-section-cnx")[0].offsetTop-e},500)},400)}),t("body").on("click",".cdp-go-to-slug-additional",function(e){e.preventDefault(),L(),u("cdp-other-options-section-cnx"),setTimeout(()=>{let e=parseInt(t("#wpadminbar").height()+20);t('.cdp-other-inputs[name="cdp-take-over-original-slug"]')[0].scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{window.scrollBy(0,-e)},200)},400)}),t("body").on("click",".cdp-close-chapter",N),t("body").on("click",".cdp-save-options",N),t("body").on("click",".cdp-togglable-name-b",function(){"(Name of original)"==t(".cdp-togglable-name-b").text()?(t(".cdp-togglable-name-b").text("(blank)"),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChange)):(t(".cdp-togglable-name-b").text(cdpJS.strTogglableName),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChangeBlank));m()}),t("body").on("click",".cdp_notice_perf_close",function(){setTimeout(function(){t("#cdp_notice_error_modal").remove()},700),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"hide_cron_notice"})}),t("body").on("click",".cdp-copy-notice-logs",function(){!function(e){try{const c=document.createElement("textarea");c.value=e,c.setAttribute("readonly",""),c.style.position="absolute",c.style.left="-9999px",document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),t.cdpNotification("success",cdpJS.copySuccessfull)}catch(e){return console.log(e),t.cdpNotification("warning",cdpJS.copyFailed),!1}}(t(".cdp_notice_logs").text())}),t("#cdp_jvlabelWrap-fake").on("click",function(){if(0===t("#support-cdp").length){t(t(".cdp-container")[0]).append('<script id="support-cdp" src="//code.jivosite.com/widget/MoP3Jphzts" async><\/script>'),setTimeout(function(){t("#cdp_jvlabelWrap-fake").hide()},100);var e=!1;let c=setInterval(function(){1==e&&clearInterval(c),void 0!==window.jivo_api&&(window.jivo_api.open(),e=!0)},30)}}),t(".cdp-select").cdpNiceSelect(),t(".cdp-tooltip").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"top",contentAsHTML:!0,maxWidth:600,triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["cdptipster-noir","cdptipster-noir-customized"],repositionOnScroll:!0,functionReady:O}),t("#cdp-d-table").length>0&&(o=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">'+cdpJS.strNoItems+"</div>"})),t(".cdp-copy-button").on("mouseup",function(){g(!0)});let I=(e,c,o,i)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left${1==o?" cdp-red":""}">${"delete"==i?cdpJS.strDeletingPosts:cdpJS.strAutoCleanPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-kill-btn">`+cdpJS.strKill+"</div>\n </div>\n </a>").attr("data-token",c),D=(e,c,o,i)=>{let d="",n="";void 0!==e&&(void 0!==e["formated-date"]&&(d=e["formated-date"]),void 0!==e.text&&(n=e.text));let p=t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==c?" cdp-bnew-notis":""}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left">${"delete"==i?cdpJS.strDeletedPosts:cdpJS.strAutoCleanedPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-hide-btn">`+cdpJS.strHide+"</div>\n </div>\n </a>").attr("data-token",o);return""!=n&&p.attr("data-ftext",n),""!=d&&p.attr("data-fdate","Completed at "+d),p};function Q(t,e){let c=t,o=e;t.length<e.length&&(c=e,o=t);let i=c.length;return 0==i?1:(i-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let c=new Array;for(let o=0;o<=t.length;o++){let i=o;for(let d=0;d<=e.length;d++)if(0==o)c[d]=d;else if(d>0){let n=c[d-1];t.charAt(o-1)!=e.charAt(d-1)&&(n=Math.min(Math.min(n,i),c[d])+1),c[d-1]=i,i=n}o>0&&(c[e.length]=i)}return c[e.length]}(c,o))/parseFloat(i)}function P(c,o){L(!0),t(".cdp-tooltip-before-options").show(),t(".cdp-tooltip-full-options").hide(),$inputs=t(t(".cdp-tooltip-content").find("input, select"));for(let e=0;e<$inputs.length;++e){let c=t($inputs[e]);if("checkbox"==c.attr("type"))c.is(":checked")?c.attr("checked","checked"):c.removeAttr("checked");else if(t(c).is("select"))if("tooltip-which-profile-first"==t(c).attr("name")){let e=t(t('[name="tooltip-which-profile-first"]')[0]).val();"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val(e)},50)}else{let e=t('[name="tooltip-which-profile-second"] option:selected').map(function(t,e){return this.value}).get()[0];"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val("custom"),t('[name="tooltip-which-profile-second-modal"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e),t('[name="tooltip-which-profile-second-modal"]').val(e)},50)}else c.attr("value",c.val())}return cdp_tooltips_update_content(),e=t(o.origin).attr("data-cdp-id"),!0}function M(e,c){$parent=t(c.origin).parents(".row-actions"),$parent.css({left:0});let o=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`${cdpJS.strDefCopySettingsStart} <a href="${o}">${cdpJS.strDefCopySettingsLink}</a>.`,maxWidth:400,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-center"],repositionOnScroll:!0}),r&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("checked",!1),t(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),O(),cdp_tooltips_update_content())}function A(e,c){return $parent=t(c.origin).parents(".row-actions"),$parent.css({left:""}),!1}function H(){return t(t(".cdp-tooltip-content").html())}function O(){setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].reposition()},10)}function L(e=!1){if(e){let e=t.cdptipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{S(t=>{C(t)})},7e3),t(".cdp-drag-name").draggable({containment:".cdp-drags-cont",scroll:!1,helper:"clone",revert:"invalid"}),t(".cdp-names-real-input").droppable({drop:function(e,c){$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],t(this).html(`${t(this).html()}${$picks[t(c.helper).attr("data-cdp-val")]}`),m()}}),"undefined"!=typeof pagenow&&["edit-page","edit-post"].includes(pagenow)&&t(".column-cb, .check-column").find("input").prop("checked",!1),t("#titlediv").find(".inside").length>0&&t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent"),c=t("#cdp-original-post").attr("data-cdp-parent-url");t("#titlediv").find(".inside").append(t(`<div style="padding-left: 10px">${cdpJS.strPostDuplicateOf} <a href="${c}" target="_blank">${e}</a></div>`))}t(".cdp-preloader-c").length>0&&(m(),f(),w(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let c=0;c<e.length;c++){let o=t(`#${t(e[c]).attr("data-box")}`);o.show(),o.css({"max-height":"",height:""});let i=o.height();t(i).css({"max-height":i+"px",height:i+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&t(".cdp-container").length>0&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-container").length>0&&(jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300));const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc-3").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc-3").find("input, select").prop("disabled",!0)):(jQuery('.cdp-option-premium [value="3"]').prop("disabled",!0),setTimeout(()=>{jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),jQuery(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top")));jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),o=e,jQuery(o).addClass("cdp-premium-element"),jQuery(o).find("input, select").prop("disabled",!0);var o}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let c=t.originalEvent.changedTouches[0],o=document.createEvent("MouseEvents");o.initMouseEvent(e,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(o)}}if(t.support.touch="ontouchend"in document,t.support.touch){let c,o=t.ui.mouse.prototype,i=o._mouseInit,d=o._mouseDestroy;o._touchStart=function(t){!c&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(c=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},o._touchMove=function(t){c&&(this._touchMoved=!0,e(t,"mousemove"))},o._touchEnd=function(t){c&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),c=!1)},o._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)},o._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),d.call(e)}}}(jQuery);1 function cdp_tooltips_update_content(){if(jQuery("select").cdpNiceSelect("update"),!(void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium)||!jQuery.cdp.isPremium()){jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),$prems=jQuery(".cdp-tooltip-premium");for(let t=0;t<$prems.length;t++){let e=$prems[t],c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top"))),jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return cdpJS.strAreYouSure;console.log(cdpJS.strYouAreCrazy);let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"debug_function"}).done(t=>{console.log(t),console.log(cdpJS.strDebugOutputEnd)})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,c="default",o=null,i=null,d=null,n=null,p=null,s=null,a=null,l=!1;const r=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function u(e=null,c=!1){let o=this;"string"==typeof e&&(o=`.${e}`),0!=c&&(o=c),$parent=t(t(o).parents(".cdp-collapsible")[0]),$arrow=$parent.find(".cdp-arrow"),$body=$parent.find(".cdp-collapsible-content"),$title=$parent.find(".cdp-collapsible-title"),$titles=t(".cdp-collapsible-title"),group=$parent.attr("data-cdp-group"),height=$body.prop("scrollHeight"),$oArrows=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-arrow"),$oBodies=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-collapsible-content"),$body.hasClass("cdp-active")?($body.removeClass("cdp-active"),$titles.removeClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":""})):($titles.removeClass("cdp-active"),$body.addClass("cdp-active"),$title.addClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-left").addClass("cdp-arrow-down"),$oArrows.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":`${height+30}px`}),$oBodies.css({"max-height":""}))}function m(){let e=t(".cdp-names-prefix").text(),c=t(".cdp-names-suffix").text(),o={year:(i=new Date).getFullYear(),month:("0"+(i.getMonth()+1)).slice(-2),day:i.getDate()<=9?"0"+i.getDate():i.getDate(),hour:i.getHours()<=9?"0"+i.getHours():i.getHours(),minute:i.getMinutes()<=9?"0"+i.getMinutes():i.getMinutes(),second:i.getSeconds()<=9?"0"+i.getSeconds():i.getSeconds(),week:i.getDay()};var i;let d="(blank)"==t(".cdp-togglable-name-b").text()?"":cdpJS.strTogglableName,n=`${e.trim()} ${d} ${c.trim()}`;n=n.replace(/\[Counter\]/g,"2");let p=t(".cdp-date-picked").val();"1"==p?n=n.replace(/\[CurrentDate\]/g,`${o.month}/${o.day}/${o.year}`):"2"==p?n=n.replace(/\[CurrentDate\]/g,`${o.day}/${o.month}/${o.year}`):"3"==p&&function(e){let c=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_formatted_time",format:c}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{n=n.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(n),n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n)}),"3"!=p&&(n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n))}function h(e=""){before=t(e).html(),text=t(e).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(e).html(text)}function f(){val=t('.cdp-other-options[name="after_copy"]').val(),2==val?t(".cdp-if-edit-page-selected").show(300):t(".cdp-if-edit-page-selected").is(":hidden")||t(".cdp-if-edit-page-selected").hide(300),setTimeout(()=>{jQuery(".cdp-oth-section").css({"max-height":""}),jQuery(".cdp-oth-section").css({"max-height":jQuery(".cdp-oth-section").height()})},310)}function g(o=!1){let i=t(this).attr("data-cdp-btn");1==o&&(i="copy-quick");let d=["copy-quick","copy-custom","copy-custom-link"],n=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(d.includes(i)){let o={type:i};if(i==d[0]){if(o.times=t(".cdp-modal-input-times-tooltip").val(),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",!o.profile||"custom"==o.profile)return t.cdpNotification("warning","Please select settings for this copy."),void _()}else if(i==d[1]||i==d[2]){t("#cdp-copy-modal-global").is(":visible")?($select=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second-modal"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]').val()):(o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val()),o.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",o.custom={};for(let e=0;e<n.length;++e)o.custom[t(n[e]).attr("name")]=t(n[e]).is(":checked");o.custom.taxonomy=o.custom.cdp_taxonomy,delete o.custom.cdp_taxonomy}if(isNaN(parseInt(o.times))||parseInt(o.times)<=0)return void t.cdpNotification("warning",cdpJS.strCopyNumIssue);let p=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];o.profile&&!p.includes(o.profile)||(o.profile=c),L(),function(e=(()=>{})){window.onbeforeunload=(()=>cdpJS.strCopyInProgress),$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")&&($e.show(),$e.animate({opacity:1},300,function(){e(!0)}))}(()=>{t.ajax({type:"POST",url:ajaxurl,data:{action:"cdp_action_handling",token:"cdp",f:"copy_post",nonce:cdpGlobalJS.ajaxNonce,origin:"tooltip",id:[e],data:o},timeout:0}).done(function(e){_(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error",cdpJS.strCopyPostIssue):i==d[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"delete_success_img"}),"-28"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),t("#cdp_notice_error_modal").length>0&&(t("#cdp_notice_error_modal").show(),t("#cdp_notice_error_modal").fadeIn(300),t("#cdp_notice_error_modal").animate({opacity:1},500),t("#cdp_notice_error_modal .cdp_notice_content").animate({opacity:1,top:"50%"},500))):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error",cdpJS.strCopyPostIssueConsInfo),_(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification(cdpJS.strTooltipBtnIssue)}function v(e,o=!1){let i=["clear","alloptions","custom","custom_named","null","undefined",null,void 0],d=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),n=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),p=d,s=!1;t("#cdp-copy-modal-global").is(":visible")&&(p=n,s=!0);let a=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic:not(:disabled)"),l=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),r=p.val();0==e&&0!=o&&(r=o),"custom_named"==r?p.val("custom_named"):void 0===r||"custom"==r||null==r||void 0==r?p.val("custom"):"clear"==r?(0!=e&&e.preventDefault(),l.prop("checked",!1),p.val("custom_named")):"alloptions"==r?(0!=e&&e.preventDefault(),a.prop("checked",!0),p.val("custom_named")):!i.includes(r)&&r.length>=1?b(r,function(e){e.cdp_taxonomy=e.taxonomy,delete e.taxonomy;for(let c in e)"object"!=typeof c&&t(`.cdp-input-dynamic[name="${c}"]`).prop("checked",y(e[c]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning",cdpJS.strSelectedProfIssue)),0==e&&p.val(r),i.includes(r)||(c=r,s?d.val(r):n.val(r)),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function b(e="default",c){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_settings",profile:e}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),e.status&&"error_no_exists"==e.status){t.cdpNotification("warning",cdpJS.strSelectedProfEmpty);let e={},o=t(".cdp-modal-option-r");for(let c=0;c<o.length;c++)e[t(o[c]).attr("name")]=t(o[c]).is(":checked");c(!1)}else c(e)}).fail(e=>{t.cdpNotification("error",cdpJS.strSelectedProfGetIssue),console.log(cdpJS.strConsLogErr),console.log(e),console.log("––––––––––––––––––––––––––"),c(!1)})}function x(){t(this).attr("class");let e=parseInt(t(this).val());e<=0&&(e=1),e>9999&&(e=9999),isNaN(e)&&(e=1),e||(e=1),t(".cdp-modal-input-times").val(e),t(".cdp-modal-input-times-tooltip").val(e),e>50?(t(".cdp-error-span-tooltip").show(300),t(".cdp-tooltip-before").attr("style","height: calc(225px - 20px - 16px) !important")):(t(".cdp-error-span-tooltip").hide(300),t(".cdp-tooltip-before").attr("style","")),e>1?(t(".cdp-multiple-tooltip-count").animate({opacity:1},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').hide()):(t(".cdp-multiple-tooltip-count").animate({opacity:0},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').show()),setTimeout(()=>{O()},310)}function _(e=(()=>{})){window.onbeforeunload=null,$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),e(!0)})}function w(){let e=t(".cdp-profile-selected").val();var c,o;b(e,i=>{if(t.isJsonString(i)||"object"==typeof i){"object"!=typeof i&&(i=JSON.parse(i));let d=["usmplugin","yoast","woo"];for(k in i)"names"==k?(t(".cdp-names-prefix").html(i[k].prefix),t(".cdp-names-suffix").html(i[k].suffix),"3"!=i[k].format||r||(i[k].format="1"),t(".cdp-date-picked").val(i[k].format),t(".cdp-custom-date-picking").val(i[k].custom)):(!d.includes(k)||d.includes(k)&&r&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==i[k]);cdp_tooltips_update_content(),m(),f(),r&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),j(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),c=e,o=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"set_default_profile",selection:c}).done(t=>{o(t)}).fail(()=>{o(!1)})}else t.cdpNotification("warning",cdpJS.strServerDataIssue)})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,c=t(".cdp-input-d-id:checked").length;c==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(c),$visible=t(".cdp-input-d-id:visible").length,$visible_checked=t(".cdp-input-d-id:checked:visible").length,$visible==$visible_checked?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1),function(){let e=t(".cdp-input-d-id").parents("tr"),c=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),c.addClass("cdp-del")}()}function S(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"give_me_current_tasks"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status&&e(c.tasks)})}function C(e){let c=0,o=+new Date/1e3,i=t(".cdp-dd-item");for(let o=0;o<i.length;++o){e[t(i[o]).attr("data-token")]||t(i[o]).remove(),c++}for(let d in e){let n=e[d],p=i.filter(function(){return t(this).attr("data-token")===d}).first();if(0==n.done){if(p.hasClass("cdp-dd-ud"))continue;{p.remove();let e=o-n.done>=86400;t(".cdp-dd-undone-list").append(I(n.shown,d,e,n.f)),c++}}else{if(p.hasClass("cdp-dd-d"))continue;p.remove(),t(".cdp-dd-done-list").append(D(n.data,n.shown,d,n.f)),c++}}(c>0||0==i.length)&&function(){let e=t(".cdp-dd-item").length,c=t(".cdp-dd-d").length,o=t(".cdp-dd-ud").length;c<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").show()),o<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").show()),e<=0?t(".cdp-admin-bar-noti").addClass("cdp-noti-hide"):t(".cdp-admin-bar-noti").removeClass("cdp-noti-hide"),t(".cdp-notis-counter").text(t(".cdp-bnew-notis").length)}()}function j(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let c=t($trs[e]);c.find("input").is(":checked")?c.addClass("cdp-selected-tr-opt"):c.removeClass("cdp-selected-tr-opt")}}function J(e){if(t(".cdp-modal").is(":visible"))return;let c=window;0!=t("#wpbody").scrollTop()&&(c="#wpbody");let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select, .cdp-nice-select .list").css({transition:"all 0s"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-cdp-nice-select .list").css({transition:""})},100),clearTimeout(d),d=setTimeout(()=>{let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select .list").css({transition:"all 0s !important"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-nice-select .list").css({transition:""})},100)},100)}function T(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),c=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||c?t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml):t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml2)}function N(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col)}t(".cdp-intro-button").on("click",function(){let e=t(".cdp-intro").height();t(".cdp-intro").css({height:e+"px"}),t(".cdp-intro").animate({opacity:0,height:0},300,function(){t(".cdp-intro").hide(10),t("#cdp-never-intro").is(":checked")&&t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"no_intro",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroSaveIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroSaveIssue2)})}),t(".cdp-s-i-a").show(),t(".cdp-s-i-a").animate({opacity:1},300)}),t(".cdp-save-options").on("click",function(){let e=t(".cdp-data-set"),c=t(".cdp-other-inputs"),o=t(".cdp-profile-selected").val(),i=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),d=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),n={names:{prefix:i,suffix:d,format:t(".cdp-date-picked").val(),custom:t(".cdp-custom-date-picking").val(),display:t(t(`option[value="${t(".cdp-profile-selected").val()}"]`)[0]).text()}},p={afterCopy:t('.cdp-other-options[name="after_copy"]').val(),postConverter:t('.cdp-other-options[name="post_converter"]').val(),others:{}};t('.cdp-other-inputs[name="cdp-take-over-original-slug"]').is(":checked")&&t('.cdp-data-set[data-cdp-opt="slug"]').trigger("click");let s={},a=t(".cdp-other-roles");for(let e=0;e<a.length;e++)s[t(a[e]).attr("name")]=t(a[e]).is(":checked");p.roles=s;for(let c=0;c<e.length;c++)n[t(e[c]).attr("data-cdp-opt")]=!!t(e[c]).is(":checked");for(let e=0;e<c.length;e++)p.others[t(c[e]).attr("name")]=!!t(c[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"save_options",options:n,profile:o,entire:p}).done(e=>{"success"==e?t.cdpNotification("success",cdpJS.strSettingsSaved,2e3):"no_access"==e?t.cdpNotification("error",cdpJS.strSettingsNoAccess):"error"==e?t.cdpNotification("error",cdpJS.strSettingsSaveIssue):t.cdpNotification("success",cdpJS.strSettingsSaved,2e3)}).fail(e=>{t.cdpNotification("error",cdpJS.strSettingsSaveIssue2),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroUpdateIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroUpdateIssue2)}),t(".cdp-s-i-a").animate({opacity:0},300,function(){t(".cdp-s-i-a").hide()}),function(){t(".cdp-intro").show().css({height:""});let e=t(".cdp-intro").height();t(".cdp-intro").css({height:"0px"}),t(".cdp-intro").animate({opacity:1,height:e+"px"},300,function(){})}()}),t(".cdp-show-projects").on("click",function(){t(".cdp-projects").is(":hidden")&&t(".cdp-projects").show(300);t(".cdp-show-projects").removeClass("cdp-pointer").animate({opacity:.5},300)}),t(".cdp-project-box").on("mouseenter",function(){t(".cdp-project-box").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-project-box").on("mouseleave",function(){t(".cdp-project-box").removeClass("cdp-half-opacity")}),t(".cdp-collapsible-title").on("click",u),t(".cdp-magic-input").on("keyup change",function(){before=t(this).html(),text=t(this).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(this).html(text)}),t(".cdp-magic-input").on("focus",function(e,c){if(c)return;let o=t(this).text();" "!=o[0]&&(o=" "+o);" "!=o[o.length-1]&&(o+=" ");t(this).html(o),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),m()},300)}),t(".cdp-support-animated").on("mouseenter",function(){t(".cdp-support-animated").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-name-clickable").on("mouseup",function(e){if(e.preventDefault(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],$box={1:".cdp-names-prefix",2:".cdp-names-real-input",3:".cdp-names-suffix"},t($box[e.which]).append($picks[t(this).attr("data-cdp-val")]),m(),e.which==e)return!1}),t(".cdp-support-animated").on("mouseleave",function(){t(".cdp-support-animated").removeClass("cdp-half-opacity")}),t(".cdp-f-einput-n").on("click","button",function(){let e=t(t(this).parents(".cdp-cf")[0]).find("input"),c=t(this).text(),o="12";"V"==c[0]?o="-51":"D"==c[0]&&(o="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning",cdpJS.strLicenseKeyEmpty);t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"i_love_squirrels",rat:e.val(),m:o}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status?"valid"==c.data.license?(t.cdpNotification("success",cdpJS.strLicenseActiveReloading),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==c.data.license?(e.prop("disabled",!0),t(this).text("Activating...").prop("disabled",!0).addClass("disabled"),o="12",t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"i_love_squirrels",rat:e.val(),m:o}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),void 0!==e.data&&void 0!==e.data.msg?(t.cdpNotification("success",e.data.msg),setTimeout(()=>{window.location.reload()},2e3)):(t(this).text("Activate").prop("disabled",!1),t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage))}).fail(e=>{t(this).text("Activate").prop("disabled",!1),t.cdpNotification("error",cdpJS.strSendRequestIssue2)})):void 0!==c.data&&void 0!==c.data.msg?(t.cdpNotification("success",c.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage):"fail"==c.status?t.cdpNotification(c.fail.type,c.fail.msg):(console.error(c),t.cdpNotification("error",cdpJS.strSendRequestIssue))}).fail(e=>{t.cdpNotification("error",cdpJS.strSendRequestIssue2)})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",m),t('.cdp-other-options[name="after_copy"]').on("change",f),t("body").on("change keyup",".cdp-input-dynamic",function(){$input=t(t(".cdp-tooltip-content, .cdp-modal-content").find(`[name="${t(this).attr("name")}"]`)),"checkbox"==t(this).attr("type")?$input.prop("checked",t(this).is(":checked")):t($input).is("select")?($input.val(t(this).val()),t($input).hasClass("cdp-modal-input-profiles-r")&&v(!1,t(this).val())):$input.val(t(this).val());if(cdp_tooltips_update_content(),t($input).is("select")&&t($input).hasClass("cdp-premium-modal-dropdown")){let e=t("div.cdp-premium-modal-dropdown"),c=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==c.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html(cdpJS.strChangeTypeOfCopy)):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){l=!0;let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&v(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{O(),setTimeout(()=>{l=!1},2e3)},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){v(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]');t("#cdp-copy-modal-global").is(":visible")&&(e=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'));e.val("custom_named"),cdp_tooltips_update_content(),v(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",x),t("body").on("change",".cdp-modal-input-times",x),t("body").on("click",".cdp-modal-times, .cdp-modal",t.cdpModalClose),t("body").on("click",".cdp-modal-open",t.cdpModal),t("body").on("change",".cdp-profile-selected",w),t("body").on("click",".cdp-show-more-d-title",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-more-d-title").is(":hidden")?(t(".cdp-more-d-title").show(300),t(this).text("(hide more options)")):(t(".cdp-more-d-title").hide(300),t(this).text("(show more options)"));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-first-chapter-cb",function(){t(".cdp-d-section").css({"max-height":"",height:""});let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,o=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+c+o>1?t(".cdp-d-option-select-parent").show(300):t(".cdp-d-option-select-parent").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("click",".cdp-d-search",function(){let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")?1:0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,d=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+c+d<=0?t.cdpNotification("error",cdpJS.strCheckDuplicatesSearch):null==i?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_all_posts"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),e(c)}).fail(c=>{t.cdpNotification("error",cdpJS.strPostListIssue),console.log(c),e(!1)})}(t=>{0!=t&&p(t)}):p(i);function n(t,e){let c=parseInt(e[e.length-1]);for(let o=e.length;o>0&&(c=parseInt(e[o-1]),ext=!1,t.posts.findIndex(t=>t.ID==c)>=0?ext=!0:t.pages.findIndex(t=>t.ID==c)>=0?ext=!0:t.custom.findIndex(t=>t.ID==c)>=0?ext=!0:c=!1,1!=ext);--o);return c}function p(e){let c={posts:[],pages:[],custom:[]},d={},p={};null!=i&&(c=i);let m=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),h=!!t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked"),f=!!t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked"),g=!!t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),v=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),y=!!t('.cdp-d-option[name="cdp-d-c-excerpt"]').is(":checked"),b=!!t('.cdp-d-option[name="cdp-d-c-count"]').is(":checked"),x=t('.cdp-d-option-select[name="cdp-d-d-sel-which"]').val(),k=null,_=null;if(m+h+f>1&&(k=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(_="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==i)for(post_type in e)if("meta"!=post_type)for(post in e[post_type]){post=e[post_type][post],post.post_type=post.post_type[0].toUpperCase()+post.post_type.slice(1);let o=e.meta[post.ID]._cdp_origin,i=e.meta[post.ID]._cdp_counter,d=e.meta[post.ID]._cdp_origin_title,s=l(post.post_content),a={id:post.ID,url:post.guid,slug:post.post_name,type:post.post_type,date:post.post_date,title:post.post_title,status:post.post_status,edit:post.post_modified,excerpt:post.post_excerpt,words:u(s),origin:"object"==typeof o&&n(e,o),counter:"object"==typeof i&&i[i.length-1],origin_title:"object"==typeof d&&d[0]};if(r&&t.cdp.isPremium()&&(a.content=t.cdp.premium.prepareAdvanced(s),a.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof o){let t=parseInt(o[o.length-1]);void 0===p[t]?p[t]=1:p[t]++}c[post_type].push(a)}c=function(t){let e=JSON.parse(JSON.stringify(t));return e.posts.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.pages.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.custom.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e}(c),null==i&&(i=c);let w=[],S=[],C=!1,j=0,J=0,T=[],N=[],I=[];if("2"==k){j=1;let t=[],e=[],o=[];1==m&&(t=c.posts),1==h&&(e=c.pages),1==f&&(o=c.custom),w=(w=[].concat(t,e,o)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),S=P(w)}else{let t=[],e=[],o=[];1==m&&(j+=1),1==h&&(j+=1),1==f&&(j+=1),c.posts=c.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(t=P(c.posts)),c.pages=c.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(e=P(c.pages)),c.custom=c.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(o=P(c.custom)),S=[].concat(t,e,o)}function D(e){1==++J&&(T=e),2==J&&(N=e),3==J&&(I=e),J==j&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((c=e[post],t(`<tr data-id="${c.id}">\n <td><input type="checkbox" id="cdp_in_${c.id}" class="cdp-input-d-id" name="${c.id}"/></td>\n <td><label for="cdp_in_${c.id}">${c.title}</label></td>\n <td><a href="${c.url}" target="_blank">${""!=c.slug?c.slug:c.url}</a></td>\n <td>${c.type}</td>\n <td>${c.date.slice(0,-8)}</td>\n <td>${c.words}</td>\n </tr>`)));var c;if("1"==x)for(parent in d)for(child in d[parent])t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0);else if("2"==x)for(parent in d){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...d[parent]);for(child in d[parent])d[parent][child]!=e&&t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0)}else"3"==x&&t(".cdp-input-d-id").prop("checked",!0);s=d,a=x;let i=!(g||v||y||b),n=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,p=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,l=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;i&&n+p+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),o.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html(cdpJS.strFilterNotSelected),t('[data-empty-info="true"]').addClass("cdp-customized")):o.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning",cdpJS.strNoDataForFilter),t(".cdp-delete-info").hide(300)):t(".cdp-not-yet-search").is(":visible")||(t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300),setTimeout(()=>{t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-d-section").css({"max-height":`${t(".cdp-d-section").height()}px`})},320))}(S=[].concat(T,N,I))}function P(e){let c=[],o=[],i=!(g||v||y||b);if(!e)return c;function n(t,e){if(t.id==e.origin&&0!=e.origin_title){let t=e.origin_title.replace(/\[Counter\]/g,e.counter);if(e.title==t)return!0}return!1}function p(t){for(let e=0;e<t.length;e++){let c=t[e];if(!o.includes(c.id))for(let d=i?0:e;d<t.length;d++){if(!t[d])continue;if(o.includes(t[d].id))continue;if(d==e)continue;let p=1==g&&(c.title==t[d].title||1==_&&n(c,t[d])),a=1==v&&Q(c.slug,t[d].slug)>=.85,l=!1;l=1==p||1==a?1==y&&(""==c.excerpt||c.excerpt==t[d].excerpt):1==y&&""!=c.excerpt&&c.excerpt==t[d].excerpt;let r=1==b&&c.words==t[d].words,u=1==i&&c.id==t[d].origin&&t.findIndex(e=>e.origin==t[d].id)<=-1;!p&&g||!a&&v||!l&&y||!r&&b||!u&&i||(s(c,!0,!1),s(t[d],!1,c.id))}}D(c)}function s(t,e=!1,i=!1){o.includes(t.id)||(1==e?d[t.id]=[]:0!=i&&d[i].push(t.id),o.push(t.id),c.push(t))}r&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_authors"}).done(c=>{if(t.isJsonString(c)&&(c=t.cdpParse(c)),"success"===c.status){let o=c.users;p(e=t.cdp.premium.advancedfilter(e,o))}else!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}).fail(()=>{!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}):p(e)}}function l(t){return(t=(t=(t=t.replace(/\<\!\-\-(.*?)\-\-\>/gim,"")).replace(/<[^>]*>/gim," ")).replace(/\s+/gim," ")).trim()}function u(t){return(t=t.split(" ")).length}}),t("body").on("change",".cdp-input-d-id",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(c++,t(this).parents("tr").addClass("cdp-del")):(c--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(c),c==e)t(".cdp-d-select-all").text("Deselect all"),t(".cdp-d-checkbox-all").prop("checked",!0);else{t(".cdp-d-select-all").text("Select all");let e=t(".cdp-input-d-id:visible");for(let c=0;c<e.length;++c){if(!t(e[c]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}c==e.length-1&&t(".cdp-d-checkbox-all").prop("checked",!0)}}}),t("body").on("change",".cdp-d-checkbox-all",function(e){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return e.preventDefault(),void t(this).prop("checked",!1);let c=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),o=t(".cdp-d-checkbox-all").is(":checked"),i=t(".cdp-input-d-id:visible"),d=0;for(let e=0;e<i.length;++e)t(i[e]).is(":checked")&&!o?d--:!t(i[e]).is(":checked")&&o&&d++,t(i[e]).prop("checked",o);let n=parseInt(t(".cdp-t-d-ct").text())+d;t(".cdp-t-d-ct").text(n),n==c?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all");let p=t(".cdp-input-d-id:visible").parents("tr"),s=t(".cdp-input-d-id:visible:checked").parents("tr");p.removeClass("cdp-del"),s.addClass("cdp-del")}),t("body").on("click",".cdp-d-select-all",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text()),o=!0;e==c&&(o=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",o);t(".cdp-t-d-ct").text(1==o?e:"0"),0==o?(t(".cdp-d-select-all").text("Select all"),t(".cdp-d-checkbox-all").prop("checked",!1),t(".cdp-input-d-id").parents("tr").removeClass("cdp-del")):(t(".cdp-d-checkbox-all").prop("checked",!0),t(".cdp-d-select-all").text("Deselect all"),t(".cdp-input-d-id").parents("tr").addClass("cdp-del"))}),t("body").on("click",".prev_page, .next_page, .page_link",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;t(".cdp-input-d-id:visible:checked").length==t(".cdp-input-d-id:visible").length?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1)}),t("body").on("click",".cdp-d-real-delete",function e(c=!1,d=null,n=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning",cdpJS.strCheckSteps);let p=[];if(null===d){let e=t(".cdp-input-d-id:checked");for(let c=0;c<e.length;++c)p.push(parseInt(t(e[c]).attr("name")));if(0==p.length)return void t.cdpNotification("warning",cdpJS.strSelectPostToDel)}else p=d;let l=t(".cdp-d-throttling").val(),m=t(".cdp-d-throttling-count").val(),h=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,v="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==l&&(!m||0==m||""==m))return void t.cdpNotification("warning",cdpJS.strFieldWrongCount);r&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(p.length>801&&!0!==c){let t=Math.ceil(p.length/800);for(let c=0,o=!0;c<t;++c)c==t-1&&(o=!1),e(o,p.slice(800*c,800*c+800),c);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",nonce:cdpGlobalJS.ajaxNonce,ids:p,throttling:l,thc:m,redi:h,thrs:f,auit:v,auitd:g}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){t("#cdp-d-table-tbody").find(".cdp-del").remove();let e=i.posts.filter(t=>!p.includes(t.id)),d=i.pages.filter(t=>!p.includes(t.id)),s=i.custom.filter(t=>!p.includes(t.id));i={posts:e,pages:d,custom:s},!0!==c&&o.refresh(),$(),0==n&&t.cdpNotification("success",cdpJS.strDeletionProcessStarted),S(C),!0!==c&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col))}else!0!==c&&t.cdpNotification("error",`${cdpJS.strDeletionTaskStart} ${"1"==l?cdpJS.strDeletionTaskEnd:""}`)}).fail(e=>{!0!==c&&t.cdpNotification("error",cdpJS.strDeletionTaskConsInfo),console.log(e)})}),t("body").on("change",".cdp-d-throttling",function(){t(".cdp-d-section").css({"max-height":"",height:""}),"1"==t(this).val()?t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").show(300):t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-throttling-count",function(){let e=parseInt(t(this).val());isNaN(e)?t(this).val(1):e>=1&&e<=10240?e>=1&&e<=1&&t(this).val(1):e<1?t(this).val(1):t(this).val(10240)}),t("body").on("change",".cdp-custom-date-picking",m),t("body").on("mouseover",".cdp-tooltip-copy",function(){if(!0===l)return;t(this).hasClass("cdptipstered")||(t(this).cdptipster({delay:100,timer:400,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"bottom",contentAsHTML:!0,content:t(".cdp-tooltip-content").html(),repositionOnScroll:!0,selfDestruction:!1,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},functionBefore:P,functionReady:A,functionAfter:M,functionFormat:H}),t(this).cdptipster("open"),t("#cdp-hideTT").length>0&&t(".cdptipster-base").hide())}),t("body").on("keyup",".cdp-d-searchbox-c",function(){if(t('[data-empty-info="true"].cdp-customized').length>0)return;let e=t(this).val();e.length>100&&(e=e.substr(0,100));if(e=(e=e.trim().replace(/\s+/gim," ").toLowerCase()).split(" "),$trs=t("#cdp-d-table-tbody").find("tr"),$trs.length<=0)return;$trs.removeAttr("data-ignore");for(let c=0;c<$trs.length;++c){$tr=t($trs[c]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let o=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))o=!0;else{if(!$url.includes(e[t])){o=!1;break}o=!0}0==o&&$tr.attr("data-ignore","true")}clearTimeout(p),p=setTimeout(()=>{o.refresh()},20)}),t("body").on("change",".cdp-data-set",j),t("#wpbody").on("scroll",J),t(window).on("scroll",J),t("body").on("click",".cdp-nice-select",J),t("body").on("click",".cdp-show-the-copies",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t("#cdp-d-table-tbody").find("tr").not('[data-empty-info="true"]').removeAttr("data-ignore"),t(".cdp-d-searchbox-c").val(""),t('[data-empty-info="true"]').addClass("cdp-customized"),o.refresh(),$(),t(".cdp-d-section").css({"max-height":"",height:""}),parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text())>0&&t(".cdp-delete-info").show(300);t(".cdp-not-yet-search").is(":visible")||(t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-per-page-select-show",function(){let e=t(this).val();o.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',T),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',T),t("body").on("click",".cdp-tab-element",function(){if(t(this).hasClass("cdp-tab-active"))return;if("true"==t(this).attr("data-disabled"))return;let e=t(t(`#${t(this).attr("data-box")}`)[0]),c=t(t(`#${t(".cdp-tab-active").attr("data-box")}`)[0]);if(!e||e.length<=0)return;t(".cdp-tab-active").removeClass("cdp-tab-active"),t(this).addClass("cdp-tab-active"),e.show(),e.css({"max-height":"",height:""});let o=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":o+"px",opacity:1},500,function(){}),t(".cdp-d-section").css({height:"","max-height":""}),c.css({"max-height":c.height()+"px",opacity:1}),c.animate({"max-height":"0px",opacity:0},500,function(){c.hide()}),setTimeout(()=>{c.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let i=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-i},500)}),t("body").on("click",".cdp-premium-element",function(t){t.preventDefault()}),t("body").on("click",".cdp-go-to-names-chapter",function(e){e.preventDefault(),L(),u("cdp-name-section-cnx"),setTimeout(()=>{let e=parseInt(t(window).height()/4);t("#wpbody").animate({scrollTop:t(".cdp-name-section-cnx")[0].offsetTop-e},500)},400)}),t("body").on("click",".cdp-go-to-slug-additional",function(e){e.preventDefault(),L(),u("cdp-other-options-section-cnx"),setTimeout(()=>{let e=parseInt(t("#wpadminbar").height()+20);t('.cdp-other-inputs[name="cdp-take-over-original-slug"]')[0].scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{window.scrollBy(0,-e)},200)},400)}),t("body").on("click",".cdp-close-chapter",N),t("body").on("click",".cdp-save-options",N),t("body").on("click",".cdp-togglable-name-b",function(){"(Name of original)"==t(".cdp-togglable-name-b").text()?(t(".cdp-togglable-name-b").text("(blank)"),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChange)):(t(".cdp-togglable-name-b").text(cdpJS.strTogglableName),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChangeBlank));m()}),t("body").on("click",".cdp_notice_perf_close",function(){setTimeout(function(){t("#cdp_notice_error_modal").remove()},700),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"hide_cron_notice"})}),t("body").on("click",".cdp-copy-notice-logs",function(){!function(e){try{const c=document.createElement("textarea");c.value=e,c.setAttribute("readonly",""),c.style.position="absolute",c.style.left="-9999px",document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),t.cdpNotification("success",cdpJS.copySuccessfull)}catch(e){return console.log(e),t.cdpNotification("warning",cdpJS.copyFailed),!1}}(t(".cdp_notice_logs").text())}),t("#cdp_jvlabelWrap-fake").on("click",function(){if(0===t("#support-cdp").length){t(t(".cdp-container")[0]).append('<script id="support-cdp" src="//code.jivosite.com/widget/MoP3Jphzts" async><\/script>'),setTimeout(function(){t("#cdp_jvlabelWrap-fake").hide()},100);var e=!1;let c=setInterval(function(){1==e&&clearInterval(c),void 0!==window.jivo_api&&(window.jivo_api.open(),e=!0)},30)}}),t(".cdp-select").cdpNiceSelect(),t(".cdp-tooltip").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"top",contentAsHTML:!0,maxWidth:600,triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["cdptipster-noir","cdptipster-noir-customized"],repositionOnScroll:!0,functionReady:O}),t("#cdp-d-table").length>0&&(o=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">'+cdpJS.strNoItems+"</div>"})),t(".cdp-copy-button").on("mouseup",function(){g(!0)});let I=(e,c,o,i)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left${1==o?" cdp-red":""}">${"delete"==i?cdpJS.strDeletingPosts:cdpJS.strAutoCleanPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-kill-btn">`+cdpJS.strKill+"</div>\n </div>\n </a>").attr("data-token",c),D=(e,c,o,i)=>{let d="",n="";void 0!==e&&(void 0!==e["formated-date"]&&(d=e["formated-date"]),void 0!==e.text&&(n=e.text));let p=t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==c?" cdp-bnew-notis":""}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left">${"delete"==i?cdpJS.strDeletedPosts:cdpJS.strAutoCleanedPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-hide-btn">`+cdpJS.strHide+"</div>\n </div>\n </a>").attr("data-token",o);return""!=n&&p.attr("data-ftext",n),""!=d&&p.attr("data-fdate","Completed at "+d),p};function Q(t,e){let c=t,o=e;t.length<e.length&&(c=e,o=t);let i=c.length;return 0==i?1:(i-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let c=new Array;for(let o=0;o<=t.length;o++){let i=o;for(let d=0;d<=e.length;d++)if(0==o)c[d]=d;else if(d>0){let n=c[d-1];t.charAt(o-1)!=e.charAt(d-1)&&(n=Math.min(Math.min(n,i),c[d])+1),c[d-1]=i,i=n}o>0&&(c[e.length]=i)}return c[e.length]}(c,o))/parseFloat(i)}function P(c,o){L(!0),t(".cdp-tooltip-before-options").show(),t(".cdp-tooltip-full-options").hide(),$inputs=t(t(".cdp-tooltip-content").find("input, select"));for(let e=0;e<$inputs.length;++e){let c=t($inputs[e]);if("checkbox"==c.attr("type"))c.is(":checked")?c.attr("checked","checked"):c.removeAttr("checked");else if(t(c).is("select"))if("tooltip-which-profile-first"==t(c).attr("name")){let e=t(t('[name="tooltip-which-profile-first"]')[0]).val();"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val(e)},50)}else{let e=t('[name="tooltip-which-profile-second"] option:selected').map(function(t,e){return this.value}).get()[0];"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val("custom"),t('[name="tooltip-which-profile-second-modal"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e),t('[name="tooltip-which-profile-second-modal"]').val(e)},50)}else c.attr("value",c.val())}return cdp_tooltips_update_content(),e=t(o.origin).attr("data-cdp-id"),!0}function A(e,c){$parent=t(c.origin).parents(".row-actions"),$parent.css({left:0});let o=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`${cdpJS.strDefCopySettingsStart} <a href="${o}">${cdpJS.strDefCopySettingsLink}</a>.`,maxWidth:400,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-center"],repositionOnScroll:!0}),r&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("checked",!1),t(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),O(),cdp_tooltips_update_content())}function M(e,c){return $parent=t(c.origin).parents(".row-actions"),$parent.css({left:""}),!1}function H(){return t(t(".cdp-tooltip-content").html())}function O(){setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].reposition()},10)}function L(e=!1){if(e){let e=t.cdptipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{S(t=>{C(t)})},7e3),t(".cdp-drag-name").draggable({containment:".cdp-drags-cont",scroll:!1,helper:"clone",revert:"invalid"}),t(".cdp-names-real-input").droppable({drop:function(e,c){$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],t(this).html(`${t(this).html()}${$picks[t(c.helper).attr("data-cdp-val")]}`),m()}}),"undefined"!=typeof pagenow&&["edit-page","edit-post"].includes(pagenow)&&t(".column-cb, .check-column").find("input").prop("checked",!1),t("#titlediv").find(".inside").length>0&&t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent")||"",c=t("#cdp-original-post").attr("data-cdp-parent-url")||"",o=t("<a>",{target:"_blank",rel:"noopener noreferrer"}).text(e);/^https?:\/\//i.test(c)&&o.attr("href",c);let i=t("<div>").css("padding-left","10px").text(cdpJS.strPostDuplicateOf+" ").append(o);t("#titlediv").find(".inside").append(i)}t(".cdp-preloader-c").length>0&&(m(),f(),w(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let c=0;c<e.length;c++){let o=t(`#${t(e[c]).attr("data-box")}`);o.show(),o.css({"max-height":"",height:""});let i=o.height();t(i).css({"max-height":i+"px",height:i+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&t(".cdp-container").length>0&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-container").length>0&&(jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300));const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc-3").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc-3").find("input, select").prop("disabled",!0)):(jQuery('.cdp-option-premium [value="3"]').prop("disabled",!0),setTimeout(()=>{jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),jQuery(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top")));jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),o=e,jQuery(o).addClass("cdp-premium-element"),jQuery(o).find("input, select").prop("disabled",!0);var o}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let c=t.originalEvent.changedTouches[0],o=document.createEvent("MouseEvents");o.initMouseEvent(e,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(o)}}if(t.support.touch="ontouchend"in document,t.support.touch){let c,o=t.ui.mouse.prototype,i=o._mouseInit,d=o._mouseDestroy;o._touchStart=function(t){!c&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(c=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},o._touchMove=function(t){c&&(this._touchMoved=!0,e(t,"mousemove"))},o._touchEnd=function(t){c&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),c=!1)},o._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)},o._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),d.call(e)}}}(jQuery); -
copy-delete-posts/trunk/copy-delete-posts.php
r3709767 r3794746 4 4 * Plugin Name: Copy & Delete Posts 5 5 * Description: The best solution to easily make duplicates of your posts & pages, and delete them in one go. 6 * Version: 1.5. 76 * Version: 1.5.8 7 7 * Text Domain: copy-delete-posts 8 8 * Author: Inisev … … 32 32 */ 33 33 // Plugin constants 34 define('CDP_VERSION', '1.5. 7');34 define('CDP_VERSION', '1.5.8'); 35 35 define('CDP_WP_VERSION', get_bloginfo('version')); 36 36 define('CDP_SCRIPT_DEBUG', false); … … 861 861 'strSettingsSaved' => __('All your settings were saved!', 'copy-delete-posts'), 862 862 'strSettingsSaveIssue' => __('Something went wrong and we couldn\'t save your settings.', 'copy-delete-posts'), 863 'strSettingsNoAccess' => __('Only administrators can change these settings.', 'copy-delete-posts'), 863 864 'strSettingsSaveIssue2' => __('Something went wrong and we couldn\'t save your settings. – Please check console for more info.', 'copy-delete-posts'), 864 865 'strTogglableName' => __('(Name of original)', 'copy-delete-posts'), -
copy-delete-posts/trunk/menu/configuration.php
r3455545 r3794746 51 51 $globals = get_option('_cdp_globals'); 52 52 $roles = get_editable_roles(); 53 54 // Only administrators can save settings (enforced in cdp_save_plugin_options) 55 $can_save_settings = current_user_can('manage_options'); 53 56 54 57 $isCoolInstalled = ''; … … 413 416 </div> 414 417 <div class="cdp-center cdp-padding cdp-p-35-b"> 415 < button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button>418 <?php if ($can_save_settings): ?><button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button><?php else: ?><p class="cdp-gray cdp-f-s-17"><?php _e('Only administrators can change these settings.', 'copy-delete-posts'); ?></p><?php endif; ?> 416 419 <div class="cdp-padding cdp-f-s-17"> 417 420 <a href="#" class="cdp-close-chapter"><?php _e('Close section', 'copy-delete-posts'); ?></a> … … 443 446 <div class="cdp-left cdp-names-input"> 444 447 <div strip-br="true" class="cdp-magic-input cdp-shadow cdp-sorts cdp-names-real-input cdp-names-prefix" wrap="off" contenteditable="true" style="margin-right: 0"> 445 <?php echo (isset($defaults['names']) && isset($defaults['names']['prefix']))?$defaults['names']['prefix']:''; ?>448 <?php echo esc_html((isset($defaults['names']) && isset($defaults['names']['prefix']))?$defaults['names']['prefix']:''); ?> 446 449 </div> 447 450 </div> … … 451 454 <div class="cdp-left cdp-names-input"> 452 455 <div strip-br="true" class="cdp-magic-input cdp-shadow cdp-sorts cdp-names-real-input cdp-names-suffix" wrap="off" contenteditable="true" style="margin-left: 0"> 453 <?php echo (isset($defaults['names']) && isset($defaults['names']['suffix']))?$defaults['names']['suffix']:''; ?>456 <?php echo esc_html((isset($defaults['names']) && isset($defaults['names']['suffix']))?$defaults['names']['suffix']:''); ?> 454 457 </div> 455 458 </div> … … 504 507 </div> 505 508 <div class="cdp-center"> 506 < button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button>509 <?php if ($can_save_settings): ?><button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button><?php else: ?><p class="cdp-gray cdp-f-s-17"><?php _e('Only administrators can change these settings.', 'copy-delete-posts'); ?></p><?php endif; ?> 507 510 <div class="cdp-padding cdp-f-s-17"> 508 511 <a href="#" class="cdp-close-chapter"><?php _e('Close section', 'copy-delete-posts'); ?></a> … … 661 664 </div> 662 665 <div class="cdp-center cdp-padding-15-h"> 663 < button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button>666 <?php if ($can_save_settings): ?><button class="cdp-button cdp-save-options"><?php _e('Save', 'copy-delete-posts'); ?></button><?php else: ?><p class="cdp-gray cdp-f-s-17"><?php _e('Only administrators can change these settings.', 'copy-delete-posts'); ?></p><?php endif; ?> 664 667 <div class="cdp-padding cdp-f-s-17"> 665 668 <a href="#" class="cdp-close-chapter"><?php _e('Close section', 'copy-delete-posts'); ?></a> -
copy-delete-posts/trunk/menu/variables.php
r3455545 r3794746 134 134 </script> 135 135 <div class="cdp-copy-alert-success" style="top: -28px; opacity: 0; display: none;"> 136 <img src="<?php echo $cdp_plug_url?>/assets/imgs/copy.png" alt="<?php _e('Successfull copy image', 'copy-delete-posts'); ?>">136 <img src="<?php echo esc_url($cdp_plug_url) ?>/assets/imgs/copy.png" alt="<?php _e('Successfull copy image', 'copy-delete-posts'); ?>"> 137 137 </div> 138 138 <?php do_action('cdp_notices_special'); ?> … … 148 148 <div class="cdp-spinner"></div> 149 149 </div> 150 <input type="text" hidden id="cdp-purl" style="display: none; visibility: hidden;" value="<?php echo $cdp_plug_url?>">150 <input type="text" hidden id="cdp-purl" style="display: none; visibility: hidden;" value="<?php echo esc_url($cdp_plug_url) ?>"> 151 151 <?php if ($hideTT == true): ?> 152 152 <input type="text" hidden id="cdp-hideTT" style="display: none; visibility: hidden;" value="true"> … … 154 154 155 155 <?php if ($post_id != false): ?> 156 <input type="text" hidden id="cdp-current-post-id" style="display: none; visibility: hidden;" value="<?php echo $post_id?>">156 <input type="text" hidden id="cdp-current-post-id" style="display: none; visibility: hidden;" value="<?php echo esc_attr(intval($post_id)) ?>"> 157 157 <?php endif;?> 158 158 159 <?php if ($parent != false ): ?>160 <input type="text" hidden id="cdp-original-post" style="display: none; visibility: hidden;" data-cdp-parent="<?php echo $parent['title'] ?>" data-cdp-parent-url="<?php echo $parent['link']?>">159 <?php if ($parent != false && is_array($parent)): ?> 160 <input type="text" hidden id="cdp-original-post" style="display: none; visibility: hidden;" data-cdp-parent="<?php echo esc_attr(isset($parent['title']) ? $parent['title'] : '') ?>" data-cdp-parent-url="<?php echo esc_url(isset($parent['link']) ? $parent['link'] : '') ?>"> 161 161 <?php endif;?> 162 162 -
copy-delete-posts/trunk/post/handler.php
r3709767 r3794746 222 222 function cdp_save_plugin_options($areWePro) { 223 223 224 // Only administrators/users with manage_options capability can save plugin global settings & profiles 225 if (!current_user_can('manage_options')) { 226 echo 'no_access'; 227 return; 228 } 229 224 230 // Get the info about our professionalness 225 231 $areWePro = $areWePro; … … 294 300 295 301 /** –– **\ 302 * Limits status and author of a copy to what the current user could set 303 * when creating a post of that type themselves. 304 * Must run on the destination site (after any multisite switch). 305 * @param $data (array of post data ready for wp_insert_post) 306 * @return array of post data 307 * @since 1.5.8 308 */ 309 function cdp_enforce_copy_capabilities($data) { 310 311 $type = isset($data['post_type']) ? $data['post_type'] : 'post'; 312 $pto = get_post_type_object($type); 313 if (!$pto) $pto = get_post_type_object('post'); 314 315 $publish_cap = $pto->cap->publish_posts; 316 $edit_others_cap = $pto->cap->edit_others_posts; 317 318 // Without publish capability only draft or pending are allowed 319 // (publish, future and private all require it) 320 $status = isset($data['post_status']) ? $data['post_status'] : 'draft'; 321 if (!in_array($status, array('draft', 'pending'), true) && !current_user_can($publish_cap)) { 322 $data['post_status'] = 'draft'; 323 } 324 325 // Assigning another author requires edit_others_posts 326 $current_user_id = get_current_user_id(); 327 $author = isset($data['post_author']) ? intval($data['post_author']) : $current_user_id; 328 if ($author !== $current_user_id && !current_user_can($edit_others_cap)) { 329 $data['post_author'] = $current_user_id; 330 } 331 332 return $data; 333 } 334 /** –– **/ 335 336 /** –– **\ 296 337 * This function will be fired when user want to save plugin options – again. 297 338 * @since 1.0.0 … … 350 391 if ($setting != 'names') 351 392 $settings[$setting] = (($val == 'true') ? true : false); 393 394 // Fill missing options (e.g. older saved profiles) as disabled to avoid undefined key warnings 395 foreach (cdp_default_options() as $setting => $val) 396 if ($setting != 'names' && !isset($settings[$setting])) 397 $settings[$setting] = false; 352 398 353 399 /** … … 507 553 if ($settings['slug']){ 508 554 $new['post_name'] = $post['post_name']; 509 if (isset($globals['others']['cdp-take-over-original-slug']) && $globals['others']['cdp-take-over-original-slug'] == 'true' ) {555 if (isset($globals['others']['cdp-take-over-original-slug']) && $globals['others']['cdp-take-over-original-slug'] == 'true' && current_user_can('edit_post', $post['ID'])) { 510 556 $original_new_slug = $post['post_name'] . '-old'; 511 557 wp_update_post(array( … … 616 662 617 663 /** 664 * Turn a user-supplied title prefix/suffix into plain text. 665 * Entities are decoded (repeatedly, to catch double encoding) before tags 666 * are stripped, so values like "<img onerror=...>" can't survive. 667 */ 668 function cdp_clean_title_affix($value) { 669 if (!is_string($value)) return ''; 670 671 for ($i = 0; $i < 5; $i++) { 672 $decoded = html_entity_decode($value, ENT_QUOTES | ENT_HTML5, 'UTF-8'); 673 if ($decoded === $value) break; 674 $value = $decoded; 675 } 676 677 $value = wp_strip_all_tags($value, true); 678 $value = str_replace(array('<', '>', '"', '`'), '', $value); 679 680 return sanitize_text_field($value); 681 } 682 683 /** 618 684 * This local function format title by user settings 619 685 * @param $title (string) … … 643 709 $time = date('H:i:s', $curr); 644 710 711 // Clean prefix and suffix so (entity-encoded) markup can't reach the title 712 $prefix = cdp_clean_title_affix(isset($settings['prefix']) ? $settings['prefix'] : ''); 713 $suffix = cdp_clean_title_affix(isset($settings['suffix']) ? $settings['suffix'] : ''); 714 645 715 // Concat whole title with prefix and suffix 646 $new_title = $ settings['prefix'] . ' ' . $title . ' ' . $settings['suffix'];716 $new_title = $prefix . ' ' . $title . ' ' . $suffix; 647 717 648 718 // Make replace of placeholders … … 781 851 } 782 852 853 // Never let the copy get a status or author the user couldn't set themselves 854 $data = cdp_enforce_copy_capabilities($data); 855 783 856 // Insert post with filtered data 784 857 $new = wp_insert_post($data, true); -
copy-delete-posts/trunk/readme.txt
r3709767 r3794746 3 3 Tags: Duplicate post, Copy posts, Copy pages, Duplicate posts, Duplicate pages 4 4 Requires at least: 4.6 5 Tested up to: 7.1. 26 Stable tag: 1.5. 75 Tested up to: 7.1.4 6 Stable tag: 1.5.8 7 7 License: GPLv3 8 8 Requires PHP: 5.6 … … 142 142 = ACF compatibility = 143 143 ACF is fully supported by Copy Delete Post Premium, as ACF is something more than a simple post. The plugin can only cop native posts and pages ( that are aligned with WordPress standards ). ACF does not stick with these standards as they put multiple posts attached to one post ID, which is visible on the list, while others are hidden. 144 145 = Where do I report security bugs found in this plugin? = 146 147 Please report security bugs found in the source code of the Duplicate Post plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/9e5fb67b-0e90-4bcd-bf4f-57eb37da201a). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 144 148 145 149 = Is the plugin also available in my language? = … … 178 182 == Changelog == 179 183 180 = 1.5.7 = 181 * Tested up to WordPress 7.1.2 182 * [SECURITY] Fixed stored XSS vulnerability in notifications by properly securing task token output. 184 = 1.5.8 = 185 * Tested up to WordPress 7.1.4 186 * [SECURITY] Fixed stored XSS (CVE-2026-120081) in the "duplicate of" notice by escaping the original post title and URL and rendering them as text 187 * [SECURITY] Sanitized title prefix/suffix settings on output and before they are added to duplicated post titles 188 * [SECURITY] Restricted saving plugin settings and profiles to administrators (`manage_options`) 189 * [SECURITY] Copies can no longer get a post status or author the current user isn't allowed to set 190 * [SECURITY] Added an `edit_post` capability check before taking over the original post's slug 191 * [IMPROVEMENT] Non-administrators now see a notice instead of the Save button on the settings screen 192 * [FIX] Fixed "Undefined array key" PHP warnings when copying posts with profiles saved by older plugin versions. 183 193 184 194 == Upgrade Notice == 185 = 1.5.7 = 186 What's new in 1.5.7? 187 * Tested up to WordPress 7.1.2 188 * [SECURITY] Fixed stored XSS vulnerability in notifications by properly securing task token output. 195 = 1.5.8 = 196 What's new in 1.5.8? 197 * Tested up to WordPress 7.1.4 198 * [SECURITY] Fixed stored XSS (CVE-2026-120081) in the "duplicate of" notice by escaping the original post title and URL and rendering them as text 199 * [SECURITY] Sanitized title prefix/suffix settings on output and before they are added to duplicated post titles 200 * [SECURITY] Restricted saving plugin settings and profiles to administrators (`manage_options`) 201 * [SECURITY] Copies can no longer get a post status or author the current user isn't allowed to set 202 * [SECURITY] Added an `edit_post` capability check before taking over the original post's slug 203 * [IMPROVEMENT] Non-administrators now see a notice instead of the Save button on the settings screen 204 * [FIX] Fixed "Undefined array key" PHP warnings when copying posts with profiles saved by older plugin versions.
Note:
See TracChangeset
for help on using the changeset viewer.