Duplicate Post - Version 1.0.7

Version Description

  • [Premium] Automatic Cleanup
  • Updated banner tooltips
  • Added more info to Admin Bar entries
  • Added new type to Admin Bar notifications "Auto Cleanup"
  • Changed logic of filter (More title options -> option "Yes")
Download this release

Release Info

Developer copydelete
Plugin Icon wp plugin Duplicate Post
Version 1.0.7
Comparing to
See all releases

Code changes from version 1.0.6 to 1.0.7

assets/css/cdp-global.min.css CHANGED
@@ -1 +1 @@
1
- @import url('https://fonts.googleapis.com/css?family=Montserrat:200,300,400,400i,500,600,700,800,900&display=swap');.cdp-admin-bar-icon-noti::before{font-family: dashicons;content: '\f465';top: 5px;position: relative;color: rgba(240,245,250,.6);margin-right: 3px;font-size: 18px}.cdp-admin-bar-icon-noti{line-height: 1!important}.cdp-admin-bar-copy{line-height: 1!important}.cdp-ab-sub .ab-item[target="_self"]{display: none!important}.cdp-dropdown-submenu{padding-top: 0!important;padding: 0!important}.cdp-dropdown-submenu *{line-height: 25px!important}.cdp-dropdown-left-header{height: 25px!important;display: inline-block!important;width: calc(100% - 35px)!important;color: #eee!important;font-weight: bolder!important}.cdp-undone-notis .cdp-dropdown-left{cursor: progress}.cdp-dropdown-left{height: 25px!important;display: inline-block!important;width: calc(100% - 35px)!important}.cdp-dropdown-right{height: 25px!important;display: inline-block!important;width: 35px!important;text-align: right!important;cursor: pointer}.cdp-dropdown-hr{display: block;background: #035baa;border-color: #aaa;border-width: 1;margin-top: 4px;margin-bottom: 3px}.cdp-bnew-notis{font-style: italic}.cdp-tooltip-content{display: none}.cdp-text-overlay h1{margin: 0!important;margin-bottom: 10px!important}.cdp-copy-loader-overlay .cdp-text-overlay{position: absolute;left: calc(50% - 200px);top: calc(50% - 50px);height: 130px;width: 400px;margin: 0px auto;font-weight: bolder;overflow: hidden;color: #fff;text-align: center;font-size: 15px!important;line-height: 1.5!important}.cdp-copy-loader-overlay{display: none;position: fixed;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0,0,0,.4);z-index: 199999}.cdp-modal{display: none;position: fixed;width: 100vw;height: 100vh;top: 0;left: 0;background: rgba(80,182,168,.32);z-index: 100000}.cdp-modal input,.cdp-tooltip-content input{box-shadow: none!important;outline: 0!important}.cdp-modal input:focus,.cdp-tooltip-content input:focus{border-color: #50b6a8!important;box-shadow: none!important;outline: 0!important}.cdp-modal-content{position: absolute;top: 50%;left: 50%;line-height: normal;transform: translate(-50%,-50%);color: #333;background: #fff;z-index: 200000;min-width: 720px;max-width: 80vw;width: 35%;overflow-y: auto;max-height: 70vh}.cdp-modal-content .cdp-button{border-radius: 3px!important;font-size: 18px!important}.cdp-button.cdp-d-real-delete{border-radius: 3px;font-weight: 600;font-size: 19px!important;width: 569px!important;height: 53px!important}.cdp-modal-padding{padding: 10px 15px}.cdp-modal-title{color: #000;text-align: center;font-size: 22px;font-weight: bolder;background: #f2f2f2;border-bottom: 1px solid #31538f;min-width: 300px}.cdp-modal-bottom-margin{margin-bottom: 10px}.cdp-notification-box{position: fixed;top: 15px;right: 15px;min-width: 100px;max-width: 40vw;z-index: 1000000}.cdp-notification.is-info,.cdp-title.is-info{background-color: rgb(12,150,183)}.cdp-notification.is-danger,.cdp-title.is-danger{background-color: rgb(228,112,111)}.cdp-notification.is-success,.cdp-title.is-success{background-color: rgb(109,183,153)}.cdp-alert-icon{height: 100%;width: 25px}.cdp-alert-icon .cdp-icon-bg{width: 25px;height: 25px}.cdp-alert-msg-title{padding-left: 40px!important}.cdp-notification .cdp-icon-bg{background-position: center;background-repeat: no-repeat;position: absolute;height: calc(100% - 36px)}.cdp-notification.is-success .cdp-icon-bg{background-image: url('../imgs/alert_success.png')}.cdp-notification.is-warning .cdp-icon-bg{background-image: url('../imgs/alert_warning.png')}.cdp-notification.is-info .cdp-icon-bg{background-image: url('../imgs/alert_info.png')}.cdp-notification.is-danger .cdp-icon-bg{background-image: url('../imgs/alert_error.png')}.cdp-notification.is-warning,.cdp-title.is-warning{background-color: rgb(236,177,53)}.cdp-title{margin-bottom: 3px;font-weight: 500;font-size: 15px!important}.cdp-notification{border-radius: 3px;padding: 18px 36px 18px 20px!important;position: relative;margin-bottom: 15px;padding-left: 3px;font-family: 'Montserrat',sans-serif!important;font-size: 15px!important;font-weight: 300;color: white}.cdp-times-button{top: 2px;right: 1px;position: absolute;background: none!important;border: none;font-size: 24px;cursor: pointer;font-weight: 500;color: white;opacity: .6;transition: opacity .2s;padding: 2px 9px!important}.cdp-times-button:hover{cursor: pointer;opacity: 1}.cdp-noti-hide{display: none}.cdp-modal-times{position: absolute;top: 10px;right: 10px;transition: all .3s;cursor: pointer;background: url('../imgs/close.png');width: 20px;height: 20px;background-position: center;background-repeat: no-repeat;background-size: cover;opacity: .4}.cdp-modal-times.cdp-no-border{border: 0!important}.cdp-modal-times:hover{opacity: 1}.cdp-modal *{font-family: 'Montserrat',sans-serif!important;font-weight: 400}.cdp-modal a{color: #50b6a8}.cdp-modal a:hover{color: #48a598}.cdp-modal a:active{color: #429388}.cdp-modal-checkboxes,.cdp-modal-checkboxes-r{width: 100%}.cdp-modal-checkboxes span,.cdp-modal-checkboxes-r span{font-weight: 400!important;font-size: 15px;line-height: 33px!important;cursor: pointer;color: black}.cdp-modal-checkboxes label,.cdp-modal-checkboxes-r label{display: inline-block;width: calc(25% - 4px);line-height: 2.5}.cdp-modal-checkboxes-three label:nth-child(1){width: calc(25% - 4px)!important}.cdp-modal-checkboxes-three label:nth-child(2):not(.cdp-yoast){width: calc(25% - 4px)!important}.cdp-modal-checkboxes-three label:nth-child(3),label.cdp-yoast{width: calc(25% - 4px)!important;max-width: 175px}.cdp-modal-copy-times{margin-top: 10px;text-align: center}.cdp-modal-copy-times-tooltip{text-align: center}.cdp-modal-copy-times-content{position: relative;padding: 17px;background: #f9f9f9}.cdp-copy-modal .cdp-modal-content{width: 850px!important;min-width: 850px!important;border-radius: 3px}.cdp-cp-pad{padding: 20px 65px}.cdp-modal-content h2{font-size: 16px;font-weight: 600}.cdp-modal-input-times{min-height: 36px!important;max-height: 36px!important;max-width: 60px!important;font-size: 15px!important;line-height: 36px!important}.cdp-modal-input-times{width: 55px;text-align: center;font-family: 'Montserrat',sans-serif;box-shadow: 0 0 0 transparent;padding: 5px 2px;border-radius: 3px;border: 1px solid #7e8993!important;background-color: #fff;color: #32373c;-webkit-appearance: none;-moz-appearance: textfield}.cdp-modal-input-times::-webkit-outer-spin-button,.cdp-modal-input-times::-webkit-inner-spin-button{-webkit-appearance: none;-moz-appearance: textfield}.cdp-modal-input-times-tooltip{width: 59px!important;font-family: 'Montserrat',sans-serif;margin: 0}.cdp-p-right-l{margin-left: 7px}.cdp-p-right-h{margin-left: 15px}.cdp-low-round{border-radius: 5px!important}.cdp-rl-round{border-radius: 2px!important}.cdp-no-round{border-radius: 0px!important}.cdp-copy-now-btn-tooltip{max-width: 88px;max-height: 13px;font-size: 16px!important;line-height: 14px;font-weight: 400!important}.cdp-f-w-thin{font-weight: 100!important}.cdp-f-w-extra-light{font-weight: 200!important}.cdp-f-w-light{font-weight: 300!important}.cdp-f-w-regular{font-weight: 400!important}.cdp-f-w-medium{font-weight: 500!important}.cdp-f-w-semi-bold{font-weight: 600!important}.cdp-f-w-bold{font-weight: 600!important}.cdp-f-w-extra-bold{font-weight: 700!important}.cdp-f-w-black{font-weight: 800!important}.cdp-f-s-10{font-size: 10px!important}.cdp-f-s-11{font-size: 11px!important}.cdp-f-s-12{font-size: 12px!important}.cdp-f-s-13{font-size: 13px!important}.cdp-f-s-14{font-size: 14px!important}.cdp-f-s-15{font-size: 15px!important}.cdp-f-s-16{font-size: 16px!important}.cdp-f-s-17{font-size: 17px!important}.cdp-f-s-18{font-size: 18px!important}.cdp-f-s-19{font-size: 19px!important}.cdp-f-s-20{font-size: 20px!important}.cdp-f-s-21{font-size: 21px!important}.cdp-f-s-22{font-size: 22px!important}.cdp-f-s-30{font-size: 30px!important}.cdp-tooltip-before{height: calc(190px - 20px - 16px);width: calc(246px - 6px - 20px);padding: 10px 3px}.cdp-below-tooltip-before{font-size: 12px}.cdp-sizes-profile-tooltip{width: 118px!important;max-width: 118px!important}.cdp-info-icon{position: absolute;top: calc(50% - 8px);width: 16px;height: 16px;background: url('../imgs/info.png');display: inline-block;line-height: 16px;background-repeat: no-repeat;background-position: center;background-size: cover;margin: 0;margin-left: 3px;cursor: pointer}.cdp-tbody-of-settings .cdp-info-icon{display: none!important;visibility: hidden}.cdp-premium-icon{position: absolute;width: 16px;height: 16px;top: calc(50% - 8px);background: url('../imgs/premium.png');display: inline-block;line-height: 16px;background-repeat: no-repeat;background-position: center;background-size: cover;padding: 0;margin-left: 7px;cursor: pointer}.cdp-big-icon{width: 22px;height: 22px;top: calc(50% - 11px);line-height: 22px}.cdp-relative{position: relative}.cdp-padding-20-h{padding-top: 20px;padding-bottom: 20px}.cdp-padding-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-padding-5-h{padding-top: 5px;padding-bottom: 5px}.cdp-input-border{border-width: 1px!important;border-color: rgb(198,201,206)!important;outline: 0!important;box-shadow: none!important}.cdp-input-border:focus{border-color: #50b6a8!important;outline: 0!important;box-shadow: none!important}.cdp-lh-24{line-height: 24px}.cdp-lh-30{line-height: 30px}.cdp-lh-42{line-height: 42px}.cdp-lh-48{line-height: 48px}.cdp-p-20-b{padding-bottom: 20px!important}.cdp-p-35-b{padding-bottom: 35px!important}.cdp-checkboxes [type="checkbox"]{color: #555;clear: none;cursor: pointer;display: inline-block;margin: -.25rem .25rem 0 0;outline: 0;padding: 0;text-align: center;vertical-align: middle;-webkit-appearance: none;box-shadow: inset 0 1px 2px rgba(0,0,0,.1);border: 1px solid #50b6a8;height: 22px;width: 22px;margin-right: 5px;margin-top: -2px;background: #fff;transition: all .3s;border-radius: 6px;margin-right: 5px}.cdp-checkboxes [type="checkbox"]:checked{background: #50b6a8}.cdp-checkboxes [type="checkbox"]:checked::before{content: '';border-top: 2px solid white;border-left: 2px solid white;height: 9px!important;width: 5px!important;margin: -.1875rem 0 0 -.25rem;margin-top: 3px;margin-left: 7px;transform: rotate(220deg);float: left;display: inline-block;vertical-align: middle;position: relative!important;box-sizing: content-box!important}.cdp-p-25-h{padding-top: 25px;padding-bottom: 25px}.cdp-tooltip-c-t{margin-left: -20px;width: calc(100% + 40px)}#toplevel_page_copy-delete-posts img{height: 21px!important;max-height: 22px;margin-left: 6px;margin-top: -1px}.cdp-copy-alert-success{display: block!important;position: fixed;left: 50%;text-align: center;z-index: 99998;transform: translate(-50%)}.cdp-original-info-b{max-width: calc(76vw - 340px - 180px);text-overflow: ellipsis;word-wrap: break-word;overflow: hidden;max-height: 36px}.cdp-black{color: black!important}.cdp-black-all *{color: black!important}#cdp-review-sad{opacity: 0;transition: all .3s}
1
+ @font-face{font-family: 'Montserrat';font-style: italic;font-weight: 400;font-display: swap;src: local('Montserrat Italic'),local('Montserrat-Italic'),url('../fonts/Montserrat-Italic.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 200;font-display: swap;src: local('Montserrat ExtraLight'),local('Montserrat-ExtraLight'),url('../fonts/Montserrat-ExtraLight.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 300;font-display: swap;src: local('Montserrat Light'),local('Montserrat-Light'),url('../fonts/Montserrat-Light.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 400;font-display: swap;src: local('Montserrat Regular'),local('Montserrat-Regular'),url('../fonts/Montserrat-Regular.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 500;font-display: swap;src: local('Montserrat Medium'),local('Montserrat-Medium'),url('../fonts/Montserrat-Medium.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 600;font-display: swap;src: local('Montserrat SemiBold'),local('Montserrat-SemiBold'),url('../fonts/Montserrat-SemiBold.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 700;font-display: swap;src: local('Montserrat Bold'),local('Montserrat-Bold'),url('../fonts/Montserrat-Bold.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family: 'Montserrat';font-style: normal;font-weight: 800;font-display: swap;src: local('Montserrat ExtraBold'),local('Montserrat-ExtraBold'),url('../fonts/Montserrat-ExtraBold.woff2') format('woff2');unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.cdp-admin-bar-icon-noti::before{font-family: dashicons;content: '\f465';top: 5px;position: relative;color: rgba(240,245,250,.6);margin-right: 3px;font-size: 18px}.cdp-admin-bar-icon-noti{line-height: 1!important}.cdp-admin-bar-copy{line-height: 1!important}.cdp-ab-sub .ab-item[target="_self"]{display: none!important}.cdp-dropdown-submenu{padding-top: 0!important;padding: 0!important}.cdp-dropdown-submenu *{line-height: 25px!important}.cdp-dropdown-left-header{height: 25px!important;display: inline-block!important;width: calc(100% - 35px)!important;color: #eee!important;font-weight: bolder!important}.cdp-undone-notis .cdp-dropdown-left{cursor: progress}.cdp-dropdown-left{height: 25px!important;display: inline-block!important;width: calc(100% - 35px)!important}.cdp-dropdown-right{height: 25px!important;display: inline-block!important;width: 35px!important;text-align: right!important;cursor: pointer}.cdp-dropdown-hr{display: block;background: #035baa;border-color: #aaa;border-width: 1;margin-top: 4px;margin-bottom: 3px}.cdp-bnew-notis{font-style: italic}.cdp-tooltip-content{display: none}.cdp-text-overlay h1{margin: 0!important;margin-bottom: 10px!important}.cdp-copy-loader-overlay .cdp-text-overlay{position: absolute;left: calc(50% - 200px);top: calc(50% - 50px);height: 130px;width: 400px;margin: 0px auto;font-weight: bolder;overflow: hidden;color: #fff;text-align: center;font-size: 15px!important;line-height: 1.5!important}.cdp-copy-loader-overlay{display: none;position: fixed;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0,0,0,.4);z-index: 199999}.cdp-modal{display: none;position: fixed;width: 100vw;height: 100vh;top: 0;left: 0;background: rgba(80,182,168,.32);z-index: 100000}.cdp-modal input,.cdp-tooltip-content input{box-shadow: none!important;outline: 0!important}.cdp-modal input:focus,.cdp-tooltip-content input:focus{border-color: #50b6a8!important;box-shadow: none!important;outline: 0!important}.cdp-modal-content{position: absolute;top: 50%;left: 50%;line-height: normal;transform: translate(-50%,-50%);color: #333;background: #fff;z-index: 200000;min-width: 720px;max-width: 80vw;width: 35%;overflow-y: auto;max-height: 70vh}.cdp-modal-content .cdp-button{border-radius: 3px!important;font-size: 18px!important}.cdp-button.cdp-d-real-delete{border-radius: 3px;font-weight: 600;font-size: 19px!important;width: 569px!important;height: 53px!important}.cdp-button.cdp-d-real-cleanup-save{border-radius: 3px;font-weight: 600;font-size: 19px!important;width: 200px!important;height: 45px!important}.cdp-modal-padding{padding: 10px 15px}.cdp-modal-title{color: #000;text-align: center;font-size: 22px;font-weight: bolder;background: #f2f2f2;border-bottom: 1px solid #31538f;min-width: 300px}.cdp-modal-bottom-margin{margin-bottom: 10px}.cdp-notification-box{position: fixed;top: 15px;right: 15px;min-width: 100px;max-width: 40vw;z-index: 1000000}.cdp-notification.is-info,.cdp-title.is-info{background-color: rgb(12,150,183)}.cdp-notification.is-danger,.cdp-title.is-danger{background-color: rgb(228,112,111)}.cdp-notification.is-success,.cdp-title.is-success{background-color: rgb(109,183,153)}.cdp-alert-icon{height: 100%;width: 25px}.cdp-alert-icon .cdp-icon-bg{width: 25px;height: 25px}.cdp-alert-msg-title{padding-left: 40px!important}.cdp-notification .cdp-icon-bg{background-position: center;background-repeat: no-repeat;position: absolute;height: calc(100% - 36px)}.cdp-notification.is-success .cdp-icon-bg{background-image: url('../imgs/alert_success.png')}.cdp-notification.is-warning .cdp-icon-bg{background-image: url('../imgs/alert_warning.png')}.cdp-notification.is-info .cdp-icon-bg{background-image: url('../imgs/alert_info.png')}.cdp-notification.is-danger .cdp-icon-bg{background-image: url('../imgs/alert_error.png')}.cdp-notification.is-warning,.cdp-title.is-warning{background-color: rgb(236,177,53)}.cdp-title{margin-bottom: 3px;font-weight: 500;font-size: 15px!important}.cdp-notification{border-radius: 3px;padding: 18px 36px 18px 20px!important;position: relative;margin-bottom: 15px;padding-left: 3px;font-family: 'Montserrat',sans-serif!important;font-size: 15px!important;font-weight: 300;color: white}.cdp-times-button{top: 2px;right: 1px;position: absolute;background: none!important;border: none;font-size: 24px;cursor: pointer;font-weight: 500;color: white;opacity: .6;transition: opacity .2s;padding: 2px 9px!important}.cdp-times-button:hover{cursor: pointer;opacity: 1}.cdp-noti-hide{display: none}.cdp-modal-times{position: absolute;top: 10px;right: 10px;transition: all .3s;cursor: pointer;background: url('../imgs/close.png');width: 20px;height: 20px;background-position: center;background-repeat: no-repeat;background-size: cover;opacity: .4}.cdp-modal-times.cdp-no-border{border: 0!important}.cdp-modal-times:hover{opacity: 1}.cdp-modal *{font-family: 'Montserrat',sans-serif!important;font-weight: 400}.cdp-modal a{color: #50b6a8}.cdp-modal a:hover{color: #48a598}.cdp-modal a:active{color: #429388}.cdp-modal-checkboxes,.cdp-modal-checkboxes-r{width: 100%}.cdp-modal-checkboxes span,.cdp-modal-checkboxes-r span{font-weight: 400!important;font-size: 15px;line-height: 33px!important;cursor: pointer;color: black}.cdp-modal-checkboxes label,.cdp-modal-checkboxes-r label{display: inline-block;width: calc(25% - 4px);line-height: 2.5}.cdp-modal-checkboxes-three label:nth-child(1){width: calc(25% - 4px)!important}.cdp-modal-checkboxes-three label:nth-child(2):not(.cdp-yoast){width: calc(25% - 4px)!important}.cdp-modal-checkboxes-three label:nth-child(3),label.cdp-yoast{width: calc(25% - 4px)!important;max-width: 175px}.cdp-modal-copy-times{margin-top: 10px;text-align: center}.cdp-modal-copy-times-tooltip{text-align: center}.cdp-modal-copy-times-content{position: relative;padding: 17px;background: #f9f9f9}.cdp-copy-modal .cdp-modal-content{width: 850px!important;min-width: 850px!important;border-radius: 3px}.cdp-cp-pad{padding: 20px 65px}.cdp-modal-content h2{font-size: 16px;font-weight: 600}.cdp-modal-input-times{min-height: 36px!important;max-height: 36px!important;max-width: 60px!important;font-size: 15px!important;line-height: 36px!important}.cdp-modal-input-times{width: 55px;text-align: center;font-family: 'Montserrat',sans-serif;box-shadow: 0 0 0 transparent;padding: 5px 2px;border-radius: 3px;border: 1px solid #7e8993!important;background-color: #fff;color: #32373c;-webkit-appearance: none;-moz-appearance: textfield}.cdp-modal-input-times::-webkit-outer-spin-button,.cdp-modal-input-times::-webkit-inner-spin-button{-webkit-appearance: none;-moz-appearance: textfield}.cdp-modal-input-times-tooltip{width: 59px!important;font-family: 'Montserrat',sans-serif;margin: 0}.cdp-p-right-l{margin-left: 7px}.cdp-p-right-h{margin-left: 15px}.cdp-low-round{border-radius: 5px!important}.cdp-rl-round{border-radius: 2px!important}.cdp-no-round{border-radius: 0px!important}.cdp-copy-now-btn-tooltip{max-width: 88px;max-height: 13px;font-size: 16px!important;line-height: 14px;font-weight: 400!important}.cdp-f-w-thin{font-weight: 100!important}.cdp-f-w-extra-light{font-weight: 200!important}.cdp-f-w-light{font-weight: 300!important}.cdp-f-w-regular{font-weight: 400!important}.cdp-f-w-medium{font-weight: 500!important}.cdp-f-w-semi-bold{font-weight: 600!important}.cdp-f-w-bold{font-weight: 600!important}.cdp-f-w-extra-bold{font-weight: 700!important}.cdp-f-w-black{font-weight: 800!important}.cdp-f-s-10{font-size: 10px!important}.cdp-f-s-11{font-size: 11px!important}.cdp-f-s-12{font-size: 12px!important}.cdp-f-s-13{font-size: 13px!important}.cdp-f-s-14{font-size: 14px!important}.cdp-f-s-15{font-size: 15px!important}.cdp-f-s-16{font-size: 16px!important}.cdp-f-s-17{font-size: 17px!important}.cdp-f-s-18{font-size: 18px!important}.cdp-f-s-19{font-size: 19px!important}.cdp-f-s-20{font-size: 20px!important}.cdp-f-s-21{font-size: 21px!important}.cdp-f-s-22{font-size: 22px!important}.cdp-f-s-30{font-size: 30px!important}.cdp-tooltip-before{height: calc(190px - 20px - 16px);width: calc(246px - 6px - 20px);padding: 10px 3px}.cdp-below-tooltip-before{font-size: 12px}.cdp-sizes-profile-tooltip{width: 118px!important;max-width: 118px!important}.cdp-info-icon{position: absolute;top: calc(50% - 8px);width: 16px;height: 16px;background: url('../imgs/info.png');display: inline-block;line-height: 16px;background-repeat: no-repeat;background-position: center;background-size: cover;margin: 0;margin-left: 3px;cursor: pointer}.cdp-tbody-of-settings .cdp-info-icon{display: none!important;visibility: hidden}.cdp-premium-icon{position: absolute;width: 16px;height: 16px;top: calc(50% - 8px);background: url('../imgs/premium.png');display: inline-block;line-height: 16px;background-repeat: no-repeat;background-position: center;background-size: cover;padding: 0;margin-left: 7px;cursor: pointer}.cdp-big-icon{width: 22px;height: 22px;top: calc(50% - 11px);line-height: 22px}.cdp-relative{position: relative}.cdp-padding-20-h{padding-top: 20px;padding-bottom: 20px}.cdp-padding-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-padding-5-h{padding-top: 5px;padding-bottom: 5px}.cdp-input-border{border-width: 1px!important;border-color: rgb(198,201,206)!important;outline: 0!important;box-shadow: none!important}.cdp-input-border:focus{border-color: #50b6a8!important;outline: 0!important;box-shadow: none!important}.cdp-lh-24{line-height: 24px}.cdp-lh-30{line-height: 30px}.cdp-lh-42{line-height: 42px}.cdp-lh-48{line-height: 48px}.cdp-p-20-b{padding-bottom: 20px!important}.cdp-p-35-b{padding-bottom: 35px!important}.cdp-checkboxes [type="checkbox"]{color: #555;clear: none;cursor: pointer;display: inline-block;margin: -.25rem .25rem 0 0;outline: 0;padding: 0;text-align: center;vertical-align: middle;-webkit-appearance: none;box-shadow: inset 0 1px 2px rgba(0,0,0,.1);border: 1px solid #50b6a8;height: 22px;width: 22px;margin-right: 5px;margin-top: -2px;background: #fff;transition: all .3s;border-radius: 6px;margin-right: 5px}.cdp-checkboxes [type="checkbox"]:checked{background: #50b6a8}.cdp-checkboxes [type="checkbox"]:checked::before{content: '';border-top: 2px solid white;border-left: 2px solid white;height: 9px!important;width: 5px!important;margin: -.1875rem 0 0 -.25rem;margin-top: 3px;margin-left: 7px;transform: rotate(220deg);float: left;display: inline-block;vertical-align: middle;position: relative!important;box-sizing: content-box!important}.cdp-p-25-h{padding-top: 25px;padding-bottom: 25px}.cdp-tooltip-c-t{margin-left: -20px;width: calc(100% + 40px)}#toplevel_page_copy-delete-posts img{height: 21px!important;max-height: 22px;margin-left: 6px;margin-top: -1px}.cdp-copy-alert-success{display: block!important;position: fixed;left: 50%;text-align: center;z-index: 99998;transform: translate(-50%)}.cdp-original-info-b{max-width: calc(76vw - 340px - 180px);text-overflow: ellipsis;word-wrap: break-word;overflow: hidden;max-height: 36px}.cdp-black{color: black!important}.cdp-black-all *{color: black!important}#cdp-review-sad{opacity: 0;transition: all .3s}.cdp-pi-7{padding-left: 7px;padding-right: 7px}.cdp-pi-15{padding-left: 15px;padding-right: 15px}
assets/css/cdp-select.min.css CHANGED
@@ -1 +1 @@
1
- .nice-select{-webkit-tap-highlight-color: transparent;background-color: #fff;border-radius: 3px;border: solid 2px rgb(198,201,206);box-sizing: border-box;cursor: pointer;font-family: inherit;font-size: 14px;font-weight: 400;height: 32px;line-height: 30px;outline: none;padding-left: 28px;padding-right: 37px;padding-top: 0px!important;padding-bottom: 0px!important;position: relative;-webkit-transition: all 0.2s ease-in-out;transition: all 0.2s ease-in-out;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;white-space: nowrap;width: auto;outline: 0!important;display: inline-block!important;box-shadow: none!important;text-align: center;overflow: hidden!important;text-overflow: ellipsis;color: black!important}.nice-select:hover{border-color: #48a598!important}.nice-select:active,.nice-select.open,.nice-select:focus{border-color: #50b6a8!important}.nice-select.open{border-bottom-left-radius: 0;border-bottom-right-radius: 0}.cdp-sel-separat::before{content: '';border-left: 1px solid #c1c1c1;height: 34px;position: absolute;top: 9px;right: 38px}.nice-select:not(.cdpp-input-c):not(.cdp-select-padding):not(.cdp-redirect-select):not(.cdp-redirect-select2):not(.cdp-modal-select):not(.cdp-tooltip-select):not(.cdp-per-page-select-show) .list,.cdp-sel-separat .list{margin-left: -29px!important}.nice-select:not(.cdp-select-padding):not(.cdp-redirect-select):not(.cdp-redirect-select2):not(.cdp-tooltip-select):not(.cdp-dis-en-opt):not(.cdp-per-page-select-show):not(.cdp-pad-60-list) .option,.cdp-sel-separat:not(.cdp-pad-60-list) .option{padding-right: 40px}.nice-select:after{border-bottom: 1px solid #50b6a8;border-right: 1px solid #50b6a8;content: '';display: block;height: 8px;width: 8px;margin-top: -6px;pointer-events: none;position: absolute;right: 18px;top: 50%;-webkit-transform-origin: 66% 66%;-ms-transform-origin: 66% 66%;transform-origin: 66% 66%;-webkit-transform: rotate(45deg);-ms-transform: rotate(45deg);transform: rotate(45deg);-webkit-transition: all 0.15s ease-in-out;transition: all 0.15s ease-in-out}.nice-select:not(.cdp-select-padding):not(.cdp-tooltip-select):not(.cdp-per-page-select-show):not(.cdp-pad-49-list):not(.cdp-pad-60-list) .option{padding-left: 29px;padding-right: 34px}.nice-select.open:after{-webkit-transform: rotate(135deg);-ms-transform: rotate(135deg);transform: rotate(135deg)}.nice-select.open .list{opacity: 1;pointer-events: auto;-webkit-transform: scale(1) translateY(0);-ms-transform: scale(1) translateY(0);transform: scale(1) translateY(0)}.nice-select.disabled{border-color: rgba(198,201,206,0.5)!important;color: rgba(198,201,206,0.5)!important;pointer-events: none}.nice-select.disabled::before{border-color: rgba(198,201,206,0.7)!important}.nice-select.disabled:after{border-color: rgba(198,201,206,0.5)!important}.nice-select.wide{width: 100%}.nice-select.wide .list{left: 0!important;right: 0!important}.nice-select.right{float: right}.nice-select.right .list{left: auto;right: 0}.nice-select.small{font-size: 12px;height: 36px;line-height: 34px}.nice-select.small:after{height: 4px;width: 4px}.nice-select.small .option{line-height: 34px;min-height: 34px}.nice-select .list{background-color: #fff;border-radius: 5px;box-shadow: 0 0 0 1px rgba(68,68,68,0.11);box-sizing: border-box;margin-top: -2px;opacity: 0;padding: 0;pointer-events: none;position: fixed;margin-left: -10px;-webkit-transform-origin: 50% 0;-ms-transform-origin: 50% 0;transform-origin: 50% 0;-webkit-transform: scale(0.75) translateY(-21px);-ms-transform: scale(0.75) translateY(-21px);transform: scale(0.75) translateY(-21px);-webkit-transition: all 0.2s cubic-bezier(0.5,0,0,1.25),opacity 0.15s ease-out;transition: all 0.2s cubic-bezier(0.5,0,0,1.25),opacity 0.15s ease-out;z-index: 10000!important;max-height: 600px;overflow: auto;border-top-left-radius: 0;border-top-right-radius: 0;border: 1px solid #50b6a8;border-top: 1px solid #50b6a8}.nice-select .list:hover .option:not(:hover){background-color: transparent!important}.nice-select .option{cursor: pointer;font-weight: 400;line-height: 42px;list-style: none;min-height: 43px;outline: none;padding-left: 20px;padding-right: 44px;margin: 0!important;text-align: left;-webkit-transition: all 0.2s;transition: all 0.2s;border-bottom: 1px solid rgb(234,234,234)!important}.cdp-dd-p-43 .option{padding-right: 43px}.cdp-dd-p-40 .option{padding-right: 40px!important}.nice-select .option:last-child{border-bottom: 0}.nice-select .option:hover,.nice-select .option.focus,.nice-select .option.selected.focus{background-color: rgb(247,247,247);border-bottom: rgb(235,235,235)}.nice-select .option.selected{font-weight: 400}.nice-select .option.disabled{background-color: transparent;color: #999;cursor: default}.no-csspointerevents .nice-select .list{display: none}.no-csspointerevents .nice-select.open .list{display: block}.cdp-m-l-9-d .list{margin-left: -10px!important}.cdp-ow-border{border-width: 1px!important}.cdp-ow-border .list{border-width: 1px!important;margin-left: -21px}.cdp-select-black{color: black!important;font-size: 18px!important}.cdp-select-large{font-size: 18px!important;height: 56px!important;line-height: 56px!important;border-width: 1px!important;padding-right: 58px!important}.cdp-select-large .list{border-width: 1px!important;margin-left: 29px!important}.cdp-select-large:not(.cdp-pad-60-list):not(.cdp-tooltip-select) .list li{padding-right: 35px}.cdp-pad-49-list .option{padding-left: 49px!important}.cdp-pad-60-list .option{padding-right: 70px!important}.cdp-per-page-select-show{color: #292929!important}.cdp-per-page-select-show .list{margin-left: -21px!important;color: #292929!important}.cdp-per-page-select-show .option{padding-left: 21px!important}.cdp-dis-en-opt{width: 189px!important;height: 42px!important;text-align: center;line-height: 42px!important;font-size: 17px!important}.cdp-dis-en-opt:not(.cdp-tooltip-select) .option{padding-left: 52px!important;padding-right: 60px!important}.cdp-tooltip-select{min-height: 32px;max-height: 32px;max-width: 96px;min-width: 96px;border: 1px solid #d7d9dd!important;line-height: 30px!important;margin-top: 1px;padding-left: 10px!important;padding-right: 25px!important;text-align: left}.cdp-tooltip-select::before{content: '';border-left: 1px solid #c1c1c1;height: 20px;position: absolute;top: 5px;right: 20px}.cdp-tooltip-select::after{height: 5px;width: 5px;margin-top: -6px;right: 8px;top: calc(50% + 2px)}.cdp-tooltip-select .option{padding-left: 10px!important;padding-right: 28px!important;line-height: 30px!important;min-height: 30px!important}.cdp-tooltip-select .list{margin-left: -11px!important}.cdp-modal-select{min-height: 38px;max-height: 38px;max-width: 250px;border: 1px solid #d7d9dd!important;line-height: 38px!important;margin-top: 1px;padding-left: 10px!important;padding-right: 45px!important;text-align: left;margin-left: 5px;width: auto!important}.cdp-modal-select::before{content: '';border-left: 1px solid #c1c1c1;height: 26px;position: absolute;top: 6px;right: 30px}.cdp-modal-select::after{height: 5px;width: 5px;margin-top: -6px;right: 13px;top: calc(50% + 2px)}.cdp-modal-select .option{padding-left: 10px!important;padding-right: 12px!important;line-height: 29px!important;min-height: 29px!important}.cdp-modal-select-2 .option{min-width: 89px}.cdp-modal-select .list{margin-left: -11px!important}.cdp-max-600 .option{padding-left: 60px!important;padding-right: 85px!important}.cdp-premium-modal-dropdown .option{padding-right: 50px!important;text-align: center!important}.cdp-redirect-select{height: 42px!important;line-height: 42px!important;width: 149px!important;padding-left: 20px!important;font-size: 17px!important;padding-right: 50px!important}.cdp-redirect-select .list{margin-left: -21px!important}.cdp-redirect-select .option{padding-left: 24px!important;padding-right: 48px!important}.cdp-redirect-select2 .option{padding-left: 24px!important;padding-right: 60px!important}
1
+ .nice-select{-webkit-tap-highlight-color: transparent;background-color: #fff;border-radius: 3px;border: solid 2px rgb(198,201,206);box-sizing: border-box;cursor: pointer;font-family: inherit;font-size: 14px;font-weight: 400;height: 32px;line-height: 30px;outline: none;padding-left: 28px;padding-right: 37px;padding-top: 0px!important;padding-bottom: 0px!important;position: relative;-webkit-transition: all 0.2s ease-in-out;transition: all 0.2s ease-in-out;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;white-space: nowrap;width: auto;outline: 0!important;display: inline-block!important;box-shadow: none!important;text-align: center;overflow: hidden!important;text-overflow: ellipsis;color: black!important}.nice-select:hover{border-color: #48a598!important}.nice-select:active,.nice-select.open,.nice-select:focus{border-color: #50b6a8!important}.nice-select.open{border-bottom-left-radius: 0;border-bottom-right-radius: 0}.cdp-sel-separat::before{content: '';border-left: 1px solid #c1c1c1;height: 34px;position: absolute;top: 9px;right: 38px}.nice-select:not(.cdpp-input-c):not(.cdp-select-padding):not(.cdp-redirect-select):not(.cdp-cool-select):not(.cdp-redirect-select2):not(.cdp-modal-select):not(.cdp-tooltip-select):not(.cdp-per-page-select-show) .list,.cdp-sel-separat .list{margin-left: -29px!important}.nice-select:not(.cdp-select-padding):not(.cdp-redirect-select):not(.cdp-cool-select):not(.cdp-redirect-select2):not(.cdp-tooltip-select):not(.cdp-dis-en-opt):not(.cdp-per-page-select-show):not(.cdp-pad-60-list) .option,.cdp-sel-separat:not(.cdp-pad-60-list) .option{padding-right: 40px}.nice-select:after{border-bottom: 1px solid #50b6a8;border-right: 1px solid #50b6a8;content: '';display: block;height: 8px;width: 8px;margin-top: -6px;pointer-events: none;position: absolute;right: 18px;top: 50%;-webkit-transform-origin: 66% 66%;-ms-transform-origin: 66% 66%;transform-origin: 66% 66%;-webkit-transform: rotate(45deg);-ms-transform: rotate(45deg);transform: rotate(45deg);-webkit-transition: all 0.15s ease-in-out;transition: all 0.15s ease-in-out}.nice-select:not(.cdp-select-padding):not(.cdp-tooltip-select):not(.cdp-per-page-select-show):not(.cdp-pad-49-list):not(.cdp-pad-60-list) .option{padding-left: 29px;padding-right: 34px}.nice-select.open:after{-webkit-transform: rotate(135deg);-ms-transform: rotate(135deg);transform: rotate(135deg)}.nice-select.open .list{opacity: 1;pointer-events: auto;-webkit-transform: scale(1) translateY(0);-ms-transform: scale(1) translateY(0);transform: scale(1) translateY(0)}.nice-select.disabled{border-color: rgba(198,201,206,0.5)!important;color: rgba(198,201,206,0.5)!important;pointer-events: none}.nice-select.disabled::before{border-color: rgba(198,201,206,0.7)!important}.nice-select.disabled:after{border-color: rgba(198,201,206,0.5)!important}.nice-select.wide{width: 100%}.nice-select.wide .list{left: 0!important;right: 0!important}.nice-select.right{float: right}.nice-select.right .list{left: auto;right: 0}.nice-select.small{font-size: 12px;height: 36px;line-height: 34px}.nice-select.small:after{height: 4px;width: 4px}.nice-select.small .option{line-height: 34px;min-height: 34px}.nice-select .list{background-color: #fff;border-radius: 5px;box-shadow: 0 0 0 1px rgba(68,68,68,0.11);box-sizing: border-box;margin-top: -2px;opacity: 0;padding: 0;pointer-events: none;position: fixed;margin-left: -10px;-webkit-transform-origin: 50% 0;-ms-transform-origin: 50% 0;transform-origin: 50% 0;-webkit-transform: scale(0.75) translateY(-21px);-ms-transform: scale(0.75) translateY(-21px);transform: scale(0.75) translateY(-21px);-webkit-transition: all 0.2s cubic-bezier(0.5,0,0,1.25),opacity 0.15s ease-out;transition: all 0.2s cubic-bezier(0.5,0,0,1.25),opacity 0.15s ease-out;z-index: 10000!important;max-height: 300px;overflow: auto;border-top-left-radius: 0;border-top-right-radius: 0;border: 1px solid #50b6a8;border-top: 1px solid #50b6a8}.nice-select .list:hover .option:not(:hover){background-color: transparent!important}.nice-select .option{cursor: pointer;font-weight: 400;line-height: 42px;list-style: none;min-height: 43px;outline: none;padding-left: 20px;padding-right: 44px;margin: 0!important;text-align: left;-webkit-transition: all 0.2s;transition: all 0.2s;border-bottom: 1px solid rgb(234,234,234)!important}.cdp-dd-p-43 .option{padding-right: 43px}.cdp-dd-p-40 .option{padding-right: 40px!important}.nice-select .option:last-child{border-bottom: 0}.nice-select .option:hover,.nice-select .option.focus,.nice-select .option.selected.focus{background-color: rgb(247,247,247);border-bottom: rgb(235,235,235)}.nice-select .option.selected{font-weight: 400}.nice-select .option.disabled{background-color: transparent;color: #999;cursor: default}.no-csspointerevents .nice-select .list{display: none}.no-csspointerevents .nice-select.open .list{display: block}.cdp-m-l-9-d .list{margin-left: -10px!important}.cdp-ow-border{border-width: 1px!important}.cdp-ow-border .list{border-width: 1px!important;margin-left: -21px}.cdp-select-black{color: black!important;font-size: 18px!important}.cdp-select-large{font-size: 18px!important;height: 56px!important;line-height: 56px!important;border-width: 1px!important;padding-right: 58px!important}.cdp-select-large .list{border-width: 1px!important;margin-left: 29px!important}.cdp-select-large:not(.cdp-pad-60-list):not(.cdp-tooltip-select) .list li{padding-right: 35px}.cdp-pad-49-list .option{padding-left: 49px!important}.cdp-pad-60-list .option{padding-right: 70px!important}.cdp-per-page-select-show{color: #292929!important}.cdp-per-page-select-show .list{margin-left: -21px!important;color: #292929!important}.cdp-per-page-select-show .option{padding-left: 21px!important}.cdp-dis-en-opt{width: 189px!important;height: 42px!important;text-align: center;line-height: 42px!important;font-size: 17px!important}.cdp-dis-en-opt:not(.cdp-tooltip-select) .option{padding-left: 52px!important;padding-right: 60px!important}.cdp-tooltip-select{min-height: 32px;max-height: 32px;max-width: 96px;min-width: 96px;border: 1px solid #d7d9dd!important;line-height: 30px!important;margin-top: 1px;padding-left: 10px!important;padding-right: 25px!important;text-align: left}.cdp-tooltip-select::before{content: '';border-left: 1px solid #c1c1c1;height: 20px;position: absolute;top: 5px;right: 20px}.cdp-tooltip-select::after{height: 5px;width: 5px;margin-top: -6px;right: 8px;top: calc(50% + 2px)}.cdp-tooltip-select .option{padding-left: 10px!important;padding-right: 28px!important;line-height: 30px!important;min-height: 30px!important}.cdp-tooltip-select .list{margin-left: -11px!important}.cdp-modal-select{min-height: 38px;max-height: 38px;max-width: 250px;border: 1px solid #d7d9dd!important;line-height: 38px!important;margin-top: 1px;padding-left: 10px!important;padding-right: 45px!important;text-align: left;margin-left: 5px;width: auto!important}.cdp-modal-select::before{content: '';border-left: 1px solid #c1c1c1;height: 26px;position: absolute;top: 6px;right: 30px}.cdp-modal-select::after{height: 5px;width: 5px;margin-top: -6px;right: 13px;top: calc(50% + 2px)}.cdp-modal-select .option{padding-left: 10px!important;padding-right: 12px!important;line-height: 29px!important;min-height: 29px!important}.cdp-modal-select-2 .option{min-width: 89px}.cdp-modal-select .list{margin-left: -11px!important}.cdp-max-600 .option{padding-left: 60px!important;padding-right: 85px!important}.cdp-premium-modal-dropdown .option{padding-right: 50px!important;text-align: center!important}.cdp-cool-select,.cdp-redirect-select{height: 42px!important;line-height: 42px!important;width: 149px!important;padding-left: 20px!important;font-size: 17px!important;padding-right: 50px!important}.cdp-cool-select .list,.cdp-redirect-select .list{margin-left: -21px!important}.cdp-cool-select .option,.cdp-redirect-select .option{padding-left: 24px!important;padding-right: 48px!important}.cdp-redirect-select2 .option{padding-left: 24px!important;padding-right: 60px!important}.cdp-cool-hour{width: 130px!important}.cdp-cool-hour .option{padding-left: 28px!important;padding-right: 64px!important}.cdp-cool-day{width: 110px!important}.cdp-cool-day .option{padding-left: 29px!important;padding-right: 50px!important}.cdp-cool-week{width: 140px!important;padding-left: 10px!important;padding-right: 40px!important}.cdp-cool-week .option{padding-left: 20px!important;padding-right: 51px!important}.cdp-cool-month{width: 130px!important;padding-left: 10px!important;padding-right: 40px!important}.cdp-cool-month .list{margin-left: -11px!important}.cdp-cool-month .option{padding-left: 20px!important;padding-right: 51px!important}.cdp-cool-do-not .option{padding-left: 22px!important;padding-right: 51px!important}
assets/css/cdp.min.css CHANGED
@@ -1 +1 @@
1
- [contenteditable]{-webkit-user-select: text;user-select: text}.cdp-preloader{width: 90%;height: 4px;background: linear-gradient(to right,#429388,#429388);background-color: #ccc;position: absolute;margin-top: 3px;padding-top: 2px;top: 60px;left: 0;right: 0;margin: auto;border-radius: 4px;background-size: 20%;background-repeat: repeat-y;background-position: -25% 0;animation: cdpscroll 1.2s ease-in-out infinite}@keyframes cdpscroll{50%{background-size: 80%}100%{background-position: 125% 0}}.cdp-content *{outline: 0;font-weight: 300}.cdp-preloader-c{padding: 30px!important}.cdp-container,.cdp-preloader-c{width: calc(100% - 40px);padding: 0 20px;max-width: 1286px;margin: 0 auto;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none}.cdp-f20{font-size: 20px;padding-bottom: 10px}.cdp-box{border-radius: 3px;margin-top: 23px}.cdp-cf::after{content: '';clear: both;display: block}.cdp-bg-green{background: #e1efd8}.cdp-bg-green-title{background: #00b050;border-bottom: 1px solid #31538f;color: white}.cdp-nm{margin: 0!important}.cdp-center{text-align: center}.cdp-left{float: left}.cdp-right{float: right}.cdp-text-left{text-align: left}.cdp-text-right{text-align: right}.cdp-inline{display: inline-block}.cdp-showcase-3{width: calc(100% / 3 - 37px - 32px);margin-right: 37px}.cdp-showcase-3:first-child{margin-left: 67px}.cdp-showcase-3:last-child{margin-right: 0}.cfg-img-sc-3{width: 100%;object-fit: cover;object-position: center}.cfg-img-sc-3-special{width: 93%!important;object-fit: cover;object-position: center}.cdp-font-heading{font-size: 24px;line-height: 1;padding-top: 50px;padding-left: 67px;padding-bottom: 66px}.cdp-font-title{color: black;padding-bottom: 25px}.cdp-font-footer{font-size: 18px;color: black;padding-top: calc(42px + 20px);padding-bottom: 26px}.cdp-ff-i{font-weight: 400;font-style: italic}.cdp-ff-b1{font-weight: 200}.cdp-ff-b2{font-weight: 400}.cdp-ff-b3{font-weight: 500}.cdp-ff-b4{font-weight: 600}.cdp-ff-b5{font-weight: 700}.cdp-ff-b6{font-weight: 800}.cdp-welcome-title{padding-top: 35px;padding-bottom: 10px}.cdp-welcome-title-after{padding: 0;margin: 0;padding-top: 40px;line-height: 53px}.cdp-welcome-title-after h1{padding: 0;margin: 0;line-height: normal}.cdp-intro{font-family: 'Montserrat',sans-serif!important;margin-bottom: 70px}.cdp-intro-options{padding-bottom: 50px}.cdp-intro-button{background: #50b6a8;border: 0;color: white;font-size: 24px;padding: 17px 117px;border-radius: 30px;transition: .3s;cursor: pointer}.cdp-button{background: #50b6a8!important;border: 0!important;color: white!important;font-size: 23px;padding: 12px 66px;font-weight: 600;border-radius: 29px;height: 58px;width: 317px;transition: .3s!important;cursor: pointer!important}.cdp-intro-button:hover,.cdp-button:hover{background: #48a598!important}.cdp-intro-button:active,.cdp-button:active{background: #429388!important;transition: 0s!important}.cdp-pointer{cursor: pointer}.cdp-manager-btns{line-height: 2}.cdp-arrow{border: solid #50b6a8;display: inline-block;border-width: 0 4px 4px 0;padding: 5px;border-radius: 2px;transition: all .3s;display: block}.cdp-arrow-down{transform: rotate(135deg);-webkit-transform: rotate(135deg);margin-top: 2px}.cdp-arrow-right{transform: rotate(-135deg);-webkit-transform: rotate(-135deg);margin-right: 3px}.cdp-arrow-left{transform: rotate(45deg);-webkit-transform: rotate(45deg)}.cdp-collapsibles{padding: 20px 0}.cdp-collapsible{margin-bottom: 15px}.cdp-collapsible-title{border: 0;font-size: 21px;background-color: #fff;padding: 24px 44px;color: black;transition: all .2s;cursor: pointer;border-radius: 3px}.cdp-collapsible-title:hover{background-color: #48a598;color: white}.cdp-collapsible-title:hover *{border-color: white}.cdp-collapsible-title:active{transition: all 0s;background-color: #429388}.cdpp-more-filters-wrapper{overflow: hidden}.cdp-collapsible-content{transition: height .3s ease-out,max-height .5s ease-out,border-bottom .5s .3s,padding .3s;border-bottom: 0!important;overflow: hidden;padding: 0 10px;border-top: 0;max-height: 0;background: #fff}.cdp-collapsible-content.cdp-active{padding: 10px;max-height: unset;border-bottom: 0!important}.cdp-collapsible-title.cdp-active *{border-color: white}.cdp-collapsible-title.cdp-active{background: #50b6a8;color: white}.cdp-collapsible:last-child{margin-bottom: 0}.cdp-supports{padding: 10px 0}.cdp-support-box{border: 1px solid #31538f;background: #ddeaf6;padding: 10px;color: black;min-height: 84px}.cdp-s-i-a{line-height: 53px}.cdp-third{width: calc(100% / 3 - 29px);margin-right: 10px}.cdp-third:not(.cdp-ignore):last-child{margin-right: 0}.cdp-fourth{width: calc(100% / 4 - 30px);margin-right: 10px}.cdp-fourth:not(.cdp-ignore):last-child{margin-right: 0}.cdp-projects{background: #fff;border: 1px solid #44546a;color: black;padding: 25px 30px;padding-top: 5px;margin-top: 10px}.cdp-project-box{padding: 10px;border: 1px solid #44546a;min-height: 261.78125px}.cdp-support-title{position: absolute;top: 50%;transform: translateY(-50%);width: calc(100% - 50px - 20px);padding: 0px 10px;margin-left: 50px}.cdp-support-header{position: relative}.cdp-support-img{height: 50px;width: 50px;object-position: center;object-fit: cover}.cdp-support-img-rd{height: 50px;width: 50px;object-position: center;object-fit: cover}.cdp-support-desc{padding: 5px 0}.cdp-tool{position: relative}.cdp-animated{transition: .3s all}.cdp-half-opacity{opacity: .5}span.cdp-green,.cdp-green{color: #50b6a8;transition: color .3s}.cdp-green.cdp-hover:hover{color: #48a598}.cdp-green.cdp-hover:active{transition: all 0s;color: #429388}.cdp-table{width: 100%;border-spacing: 0px;color: black}.cdp-table tr td:nth-child(1),.cdp-table tr th:nth-child(1),.cdp-table tr th:nth-child(2),.cdp-table tr th:nth-child(3),.cdp-table tr td:nth-child(2),.cdp-table tr td:nth-child(3){padding: 3px 20px}.cdp-table tr td:nth-child(1),.cdp-table tr th:nth-child(1){min-width: 192px;text-align: left;padding-left: 44px!important}.cdp-table tr td:nth-child(3),.cdp-table tr th:nth-child(3){padding-right: 44px!important}.cdp-table tr th:nth-child(2),.cdp-table tr th:nth-child(3),.cdp-table tr td:nth-child(2),.cdp-table tr td:nth-child(3){width: 50%;text-align: left}.cdp-table tr th:nth-child(2),.cdp-table tr td:nth-child(2){width: 50%;text-align: left;padding-right:}.cdp-table tr:nth-child(1) td{padding-top: 35px!important}.cdp-table tr td{padding: 16px 20px!important;line-height: 24px}.cdp-table .cdp-thead{background: #f7f7f7}.cdp-table tr th{border-bottom: 1px solid #e1e1e1;font-weight: 400;height: 33px;padding: 5px 10px;height: 58px}.cdp-padding{padding: 15px 20px}.cdp-nbp{padding-bottom: 0!important}.cdp-ntp{padding-top: 0!important}.cdp-padding-10{padding: 10px}.cdp-padding-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-np{padding: 0!important}.cdp-nlh{line-height: inherit!important}.cdp-green-bg{background: #f7f7f7}.cdp-shadow{-moz-box-shadow: 3px 3px 15px 10px #eee!important;-webkit-box-shadow: 3px 3px 15px 10px #eee!important;box-shadow: 3px 3px 15px 10px #eee!important}.cdp-white-bg{background: #fff}.cdp-names-input{width: calc(50% - 97.5px)}.cdp-names-input input{width: 100%}.cdp-names-divider{font-size: 16px;line-height: 49px;padding: 0 10px;width: 175px;color: black;margin-top: 14px}.cdp-name-box{background-color: #50b6a8;width: 165px;padding: 5px;font-weight: 200;border-radius: 1px;text-align: center;color: white;font-size: 18px;cursor: pointer;transition: background-color .3s;height: 29px;line-height: 29px;border-radius: 3px}.cdp-name-box:hover{background-color: #48a598;cursor: pointer}.cdp-name-box-small{background: #50b6a8;font-size: 18px;font-weight: 200;border-radius: 1px;text-align: left;display: inline-block;position: relative;cursor: pointer;pointer-events: none;color: white;padding: 0px 19px!important;padding-right: 63px!important;margin-left: 1px;margin-right: 1px;height: 38px;border-radius: 3px}.cdp-name-box-small[data-cdp-val="0"]{width: 68px}.cdp-name-box-small[data-cdp-val="1"]{width: 108px}.cdp-name-box-small[data-cdp-val="2"]{width: 109px}.cdp-name-box-small::after{content: '\00d7';position: absolute;right: 0px;top: 0px;height: 100%;width: 22px;font-size: 28px;line-height: 38px;padding-right: 3px;padding-left: 9px;pointer-events: auto;background: #42a89a;border-top-right-radius: 3px;border-bottom-right-radius: 3px}.cdp-names-text-info{padding-left: 30px;line-height: 40px}.cdp-magic-input{text-align: left;line-height: 39px;font-size: 17px;box-shadow: 0 0 0 transparent;border-radius: 1px;background-color: #fff;color: #32373c;overflow-x: hidden;word-wrap: unset;white-space: nowrap;resize: none;padding: 6px;min-height: 39px;width: 100%;width: calc(100% - 12px);margin: 0 auto;margin-top: 14px;margin-bottom: 14px;border-radius: 3px}.cdp-magic-input br{display: none!important}.cdp-magic-input *:not(.cdp-drag){display: inline;white-space: nowrap}.cdp-magic-input i{font-style: normal}.cdp-magic-input:focus{border-color: #50b6a8;box-shadow: 0 0 0 1px #50b6a8;outline: 2px solid transparent}.cdp-novis{visibility: hidden}.tb-close-icon,.tb-close-icon:focus{outline: 0!important;outline-style: none}.cdp-gray-button{background: #f2f2f2;border: 1px solid #31538f;color: #000;padding: 5px 40px}.cdp-gray{color: #666}.cdp-h2{font-size: 16px;margin: 10px 0}.cdp-white{color: #fff!important}.cdp-error-span-tooltip{display: none;color: #991111;font-size: 10px}.tooltipster-box{border-color: #888!important;-webkit-box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2);-moz-box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2);box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2)}.cdp-spinner{position: absolute;left: calc(50% - 40px);top: calc(50% - 120px);height: 60px;width: 60px;margin: 0px auto;-webkit-animation: cdp-rotation .9s infinite linear;-moz-animation: cdp-rotation .9s infinite linear;-o-animation: cdp-rotation .9s infinite linear;animation: cdp-rotation .9s infinite linear;border-left: 6px solid rgba(55,190,190,0.48);border-right: 6px solid rgba(55,190,190,0.48);border-bottom: 6px solid rgba(74,255,255,0.77);border-top: 6px solid rgba(74,255,255,0.77);border-radius: 100%;z-index: 200000}@-webkit-keyframes cdp-rotation{from {-webkit-transform: rotate(0deg)} to {-webkit-transform: rotate(359deg)}}@-moz-keyframes cdp-rotation{from {-moz-transform: rotate(0deg)} to {-moz-transform: rotate(359deg)}}@-o-keyframes cdp-rotation{from {-o-transform: rotate(0deg)} to {-o-transform: rotate(359deg)}}@keyframes cdp-rotation{from {transform: rotate(0deg)} to {transform: rotate(359deg)}}.cdp-blue-circle{background: #50b6a8;color: white;font-weight: 400;font-size: 14px;border-radius: 50%;width: 27px;height: 27px;text-align: center;margin-bottom: 20px;margin-right: 7px;line-height: 27px}.cdp-low-margin-bot{margin-bottom: 5px}.cdp-margin-left{margin-left: 5px}.cdp-margin-left-25{margin-left: 25px}.cdp-red-bg{background: #bf0000}.cdp-button.cdp-red-bg:hover{background: #ae0000}.cdp-button.cdp-red-bg:active{background: #9d0000}.cdp-d-header{font-size: 16px;font-weight: 600;margin-top: 13px;margin-bottom: 0px}.cdp-d-header-2{font-size: 14px;margin-top: 33px;margin-bottom: 18px}.cdp-delete-table{border-spacing: 0;padding-bottom: 20px!important}.cdp-delete-table tbody td{}.cdp-delete-table .cdp-h-tbe{padding-top: 15px;min-height: 15px;background: rgb(245,245,245)}.cdp-delete-table tbody td,.cdp-delete-table thead th{padding-bottom: 20px!important;padding-top: 20px;padding-left: 20px!important;padding-right: 10px;font-size: 19px!important;text-align: left!important}.cdp-delete-table thead th{padding: 20px!important;border-bottom: 2px solid rgb(223,223,223)!important;font-weight: 600}.cdp-delete-table tbody td{background: rgb(245,245,245)!important}.cdp-delete-table tbody td:nth-child(1),.cdp-delete-table thead th:nth-child(1){padding-left: 40px!important;width: 32px}.cdp-delete-table tbody td:nth-child(2),.cdp-delete-table thead th:nth-child(2){text-align: left!important}.cdp-delete-table tbody td:nth-child(3),.cdp-delete-table thead th:nth-child(3){text-align: left!important}.cdp-delete-table tbody td:nth-child(4),.cdp-delete-table thead th:nth-child(4){min-width: 110px;width: 110px}.cdp-delete-table tbody td:nth-child(5),.cdp-delete-table thead th:nth-child(5){min-width: 165px;width: 165px}.cdp-delete-table tbody td:nth-child(6),.cdp-delete-table thead th:nth-child(6){min-width: 88px;width: 88px;padding-right: 40px!important}.cdp-delete-table tbody{background: rgb(245,245. 245)!important}.cdp-delete-table tbody td:nth-child(2),.cdp-delete-table thead th:nth-child(2){padding-left: 7px!important}.cdp-delete-table tbody td:nth-child(1),.cdp-delete-table thead th:nth-child(1){padding-right: 0px!important}.cdp-table-cont{overflow-x: auto;max-width: 100%;width: 100%;overflow-y: hidden!important}.cdp-table-cont table{width: 100%}.cdp-multiple-tooltip-count{opacity: 0}.cdp-hide{display: none}.cdp-no-style{list-style: none}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#3273dc}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px rgba(10,10,10,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{white-space:nowrap}.pagination-link.is-current{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}.cdp-pagination .page-btn.active a{transition: background-color .3s,color .3s;color: white}.cdp-pagination .page-btn{transition: background-color .3s,color .3s}.cdp-pagination .page-btn.active{transition: background-color .3s,color .3s;border-color: #50b6a8;background: #50b6a8;color: white}#cdp-d-table-tbody tr.cdp-del td:not(td:nth-child(1)),#cdp-d-table-tbody tr.cdp-del td:not(td:nth-child(1)) a{color: #c50000!important;text-decoration: none!important;text-decoration: line-through!important}.cdp-del td,.cdp-del a{text-decoration: line-through!important;color: red!important}.cdp-tab-list{width: 100%;margin: 0 auto;text-align: center;margin-top: 10px}.cdp-tab-element:not(:last-child){border-right: 0!important}.cdp-tab-element{width: calc(100% / 3 - 16px);color: black;background: #f6f6f6;padding: 8px;text-align: center;border-bottom: 4px solid #50b6a8;cursor: pointer;transition: all .3s;height: 25px;line-height: 25px;font-size: 20px}.cdp-tab-element span{font-weight: 500}.cdp-tab-element:hover:not(.cdp-tab-active):not([data-disabled="true"]){background: #eee}.cdp-tab-element[data-disabled="true"]{cursor: not-allowed}.cdp-tab-element:first-child{border-top-left-radius: 3px}.cdp-tab-element:last-child{border-top-right-radius: 3px}.cdp-tab-active{background: #50b6a8;color: white}.cdp-content *:not(.cdp-normal-font),.cdp-tooltip-content *:not(.cdp-normal-font){font-family: 'Montserrat',sans-serif!important}.cdp-content b{font-weight: 600}.cdp-content a{color: #50b6a8}.cdp-content a:hover{color: #48a598}.cdp-content a:active{color: #429388}.cdp-profile-bar{margin-bottom: 24px;margin-top: 16px}.cdp-select-styled,.cdp-select{font-size: 14px;color: #666;border-color: rgb(198,201,206);background: #fff}.cdp-select-padding{padding: 0 45px 0 20px!important;height: 48px;line-height: 48px!important;margin: 0 13px}.cdp-content [type="checkbox"],.cdp-other-inputs[type="checkbox"],.cdp-checkbox,input[type="checkbox"].cdp-data-set{color: #555;clear: none;cursor: pointer;display: inline-block;margin: -.25rem .25rem 0 0;outline: 0;padding: 0;text-align: center;vertical-align: middle;-webkit-appearance: none;box-shadow: inset 0 1px 2px rgba(0,0,0,.1);border: 1px solid #50b6a8;height: 29px;width: 29px;margin-right: 5px;margin-top: -2px;background: #fff;transition: all .3s;border-radius: 6px;margin-right: 12px}.cdp-content [type="checkbox"]:checked,.cdp-other-inputs[type="checkbox"]:checked,.cdp-checkbox:checked,input[type="checkbox"].cdp-data-set:checked{background: #50b6a8}.cdp-content [type="checkbox"]:checked::before,.cdp-other-inputs[type="checkbox"]:checked::before,.cdp-checkbox:checked::before,input[type="checkbox"].cdp-data-set:checked::before{content: '';border-top: 2px solid white;border-left: 2px solid white;height: 13px!important;width: 7px!important;margin: -.1875rem 0 0 -.25rem;margin-top: 4px;margin-left: 9px;transform: rotate(220deg);float: left;display: inline-block;vertical-align: middle}.cdp-table tbody td{color: gray}.cdp-table tbody td:nth-child(1){font-weight: 300}.cdp-table tbody td:nth-child(3){color: black;font-weight: 500}tr.cdp-selected-tr-opt td:nth-child(2){color: black!important;font-weight: 500!important}tr.cdp-selected-tr-opt td:nth-child(2) span{font-weight: 500!important}tr.cdp-selected-tr-opt td:nth-child(3){color: gray!important;font-weight: 300!important}tr.cdp-selected-tr-opt td:nth-child(1) span{font-weight: 500!important;color: black!important}.cdp-d-search{height: 110px;width: 644px;font-size: 30px}.cdp-d-searchbox-c{line-height: 30px!important;margin-left: 3px;padding-left: 15px!important;position: relative!important;background: url('../imgs/search.png');background-position: calc(100% - 13px) center;background-repeat: no-repeat;width: 193px;height: 42px;padding-right: 28px;background-size: 16px;font-size: 18px!important;border-radius: 3px!important;border-color: rgb(198,201,206)!important}.cdp-d-searchbox-c:focus,.cdp-content input:focus{border-color: #50b6a8!important;box-shadow: none!important;outline: 0!important}.cdp-padding-23{padding: 23px}.cdp-padding-23-h{padding-top: 23px;padding-bottom: 23px}.cdp-padding-15-h{padding-top: 15px;padding-bottom: 15px}.cdp-pad-lin{padding: 28px 44px}.cdp-curr-cont{padding-left: 3px;text-align: center;width: 90%;margin: 0 auto;margin-top: 7px!important}.cdp-con-cen{margin: 0 auto;text-align: center}.cdp-select-centered{width: 100%!important;max-width: 637px;text-align: center!important;margin: 0 auto;margin-bottom: 5px}.cdp-c-x-a-v{max-width: 661px!important}.cdp-special-cb-p label{margin-right: 60px;display: inline-block;line-height: 44px}.cdp-special-cb-p input[type="checkbox"]{margin-right: 8px!important}.cdp-special-cb-p label:last-child{margin-right: 0px!important}.cdp-special-cb-p h2{margin-bottom: 5px}.cdp-cont-d-box-tabed{background: #f9f9f9}.cdp-radio{border: 1px solid #50b6a8!important;transition: all .3s;margin-right: 15px;width: 25px!important;height: 25px!important}.cdp-radio:checked::before{margin: 0;content: "";border-radius: 50%;width: 13px!important;height: 13px!important;background-color: #1e8cbe;line-height: 1.14285714;margin-top: 5px!important;margin-left: 5px!important}.cdp-radio:checked::before{background-color: #50b6a8!important}.cdp-sm-d{font-size: 12px}.cdp-ff-20{font-size: 20px}.cdp-d-sel-all-con{display: inline-block;width: 305px;max-width: 305px;line-height: 30px}.cdp-d-pagi-cent{display: inline-block;padding-right: 334px;width: calc(100% - 394px - 245px)}.pagination-pages-section{margin: 0;margin-bottom: 25px;width: auto;float: right!important}.pagination-next{margin: 0;float: right!important}.pagination-previous{margin: 0;float: left;margin: 0 1px}.pagination-pages{display: inline-block;text-align: center;margin: 0 1px}#cdp-d-table-pagi{text-align: center}.page-btn{border: 1px solid #aaa;font-size: 18px;background: #fff;top: -0.5px;font-weight: 400;float: left;margin: 0 1px;min-width: 28px!important;text-align: center;height: 28px;line-height: 29px;color: #969696;cursor: not-allowed}.page-btn:not(.active){cursor: pointer!important}.page-btn:not(.active):hover{border: 1px solid #48a598;background: #48a598}.page-btn:not(.active):active{border: 1px solid #429388;background: #429388}.page-btn:not(.active):hover a{color: white!important}.page-btn:not(.active):active a{color: white!important}.page-btn a{color: #555;padding: 3px 10px!important}.cdp-pagi-arrows{width: 28px!important;border: 1px solid #aaa!important;height: 28px!important;font-size: 40px!important;position: relative!important;background: #fff;font-weight: 400!important;line-height: 26px!important;margin-left: 1px}.cdp-pagi-arrows a{position: absolute!important;right: 0!important;left: 0px!important;top: -2px!important;bottom: 0!important;color: #969696;height: 28px!important;width: 28px!important}.cdp-separator-dis{pointer-events: none;float: left;width: 28px;border: 1px solid #b8b8b8!important;height: 28px!important;font-size: 33px;position: relative;background: #fff;top: 0px;font-weight: 400;margin: 0 1px;line-height: 27px;cursor: not-allowed!important}.cdp-separator-dis a{color: #b8b8b8!important;position: absolute;right: 0;left: 2px;top: -2px;bottom: 0;height: 19px;width: 19px}.cdp-pagi-arrows .prev_page{left: 0px!important}.cdp-pagi-arrows .next_page{left: 1px!important}.cdp-width-166{width: 68px!important}.cdp-vtop-pad{vertical-align: top;padding-top: 15px;min-width: 230px;padding-left: 13px}.cdp-d-tp-pad{padding-top: 15px;padding-bottom: 45px}.cdp-even-more-th-info{padding-top: 7px}.cdp-number-field-styled{width: 70px!important;text-align: center;font-family: 'Montserrat',sans-serif;box-shadow: 0 0 0 transparent;padding: 5px 7px;appearance: none!important;-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-number-field-styled::-webkit-inner-spin-button{-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-number-field-styled::-webkit-outer-spin-button{-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-custom-date-picking{border-color: rgb(198,201,206)!important;line-height: 48px!important;border-radius: 3px!important;height: 48px;font-size: 18px;width: 160px;margin-left: 15px}.cdp-color-p-i{}.cdp-p-hh{padding-bottom: 25px;padding-top: 25px}.cdp-p-25-40{padding-top: 25px;padding-bottom: 40px}.cdp-p-40-b{padding-bottom: 40px}.cdp-p-10-b{padding-bottom: 10px}.cdp-p-20-b{padding-bottom: 20px}.cdp-p-25-t{padding-top: 25px}.cdp-p-15-25{padding-top: 15px}.cdp-p-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-p-15-h{padding-top: 15px;padding-bottom: 15px}.cdp-p-20-h{padding-top: 20px;padding-bottom: 20px}.cdp-p-30-h{padding-top: 30px;padding-bottom: 30px}.cdp-max-600{max-width: 637px!important;min-width: 637px!important;margin-left: 49px}.cdp-per-page-select-show{width: 96px!important;height: 42px;font-size: 17px!important;padding-right: 44px!important;padding: 0 45px 0 20px!important;line-height: 42px!important;text-align: left;margin-left: 10px;margin-right: 10px}.cdp-d-pad-sp{padding: 0 40px}.cdp-hr{border: 1px solid #dfdfdf!important;margin-bottom: 20px}.cdp-d-throttling-count{width: 85px!important;height: 42px!important;line-height: 40px!important;color: #32373c;border-color: rgb(198,201,206)!important;font-size: 17px!important}.cdp-date-picked{margin-right: 0px!important}.cdp-option-premium .option[data-value="3"],.cdp-premium-in-select .option[data-value="premium"],.cdp-premium-in-select-m [data-value="2"]{position: relative}.cdp-option-premium .option[data-value="3"]::after,.cdp-premium-in-select .option[data-value="premium"]::after,.cdp-premium-in-select-m [data-value="2"]::after{content: '';display: inline-block;position: absolute;width: 19px;height: 19px;top: calc(50% - 10px);background: url('../imgs/premium.png');display: inline-block;line-height: 19px;background-repeat: no-repeat;background-position: center;background-size: cover;padding: 0;margin-left: 7px;cursor: pointer}.cdp-cont-d-box-tabed{display: none;overflow: hidden}.cdp-tbody-of-settings a{text-decoration: none}.cdp-tbody-of-settings a:hover,.cdp-tbody-of-settings a:hover span{color: #429388!important}.cdp-content ::placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-moz-placeholder{color: #ddd!important;opacity: 1}.cdp-content :-moz-placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-webkit-input-placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-ms-input-placeholder{color: #ddd!important;opacity: 1}.cdp-content :-ms-input-placeholder{color: #ddd!important;opacity: 1}.cdp-backup-alert{background: #fcecec;color: black;border-radius: 1px;text-align: center;line-height: 23px;padding: 38px;font-size: 14px;border-radius: 3px}.cdp-delete-btn{margin-top: 10px;border: 0;border-radius: 7px}.cdp-delete-info b{font-weight: 500}.cdp-final-ask{background: #fbe4d4;line-height: 1.9;margin-top: 10px;margin-bottom: 0px;padding: 1px 5px;cursor: default}.cdp-small-btn{border: 0;border-radius: 2px}.cdp-delete-info{background: #e2edf7;text-align: center;padding: 10px;color: black;margin: 0 auto;font-weight: 300;width: 663px!important;height: 33px!important;line-height: 33px}.cdp-intro-image{width: 100%;border-radius: 6px;transition: all .3s;cursor: zoom-in}.cdp-intro-image:hover{-ms-transform: scale(2);-webkit-transform: scale(2);transform: scale(2)}.cdp-intro-img-1:hover{margin-left: calc(6vw + 5px)}.cdp-intro-img-1{background-image: url('../imgs/intro_1.gif');background-position: 41% 61%;background-size: 120% auto}.cdp-intro-img-2{background-image: url('../imgs/intro_2.gif');background-position: 44% 61%;background-size: 120% auto}.cdp-intro-img-3:hover{margin-left: calc(-6vw - 5px)}.cdp-intro-img-3{background-image: url('../imgs/intro_3.gif');background-position: 45% 15%;background-size: 102% auto}.cdp-no-vis{visibility: hidden}.cdp-togglable-name-b{cursor: pointer}.cdp-tooltip-premium-spc-2{margin-bottom: 0;padding-bottom: 0;max-height: 32px}
1
+ [contenteditable]{-webkit-user-select: text;user-select: text}.cdp-preloader{width: 90%;height: 4px;background: linear-gradient(to right,#429388,#429388);background-color: #ccc;position: absolute;margin-top: 3px;padding-top: 2px;top: 60px;left: 0;right: 0;margin: auto;border-radius: 4px;background-size: 20%;background-repeat: repeat-y;background-position: -25% 0;animation: cdpscroll 1.2s ease-in-out infinite}@keyframes cdpscroll{50%{background-size: 80%}100%{background-position: 125% 0}}.cdp-content *{outline: 0;font-weight: 300}.cdp-preloader-c{padding: 30px!important}.cdp-container,.cdp-preloader-c{width: calc(100% - 40px);padding: 0 20px;max-width: 1286px;margin: 0 auto;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none}.cdp-f20{font-size: 20px;padding-bottom: 10px}.cdp-box{border-radius: 3px;margin-top: 23px}.cdp-cf::after{content: '';clear: both;display: block}.cdp-bg-green{background: #e1efd8}.cdp-bg-green-title{background: #00b050;border-bottom: 1px solid #31538f;color: white}.cdp-nm{margin: 0!important}.cdp-center{text-align: center}.cdp-left{float: left}.cdp-right{float: right}.cdp-text-left{text-align: left}.cdp-text-right{text-align: right}.cdp-inline{display: inline-block}.cdp-showcase-3{width: calc(100% / 3 - 37px - 32px);margin-right: 37px}.cdp-showcase-3:first-child{margin-left: 67px}.cdp-showcase-3:last-child{margin-right: 0}.cfg-img-sc-3{width: 100%;object-fit: cover;object-position: center}.cfg-img-sc-3-special{width: 93%!important;object-fit: cover;object-position: center}.cdp-font-heading{font-size: 24px;line-height: 1;padding-top: 50px;padding-left: 67px;padding-bottom: 66px}.cdp-font-title{color: black;padding-bottom: 25px}.cdp-font-footer{font-size: 18px;color: black;padding-top: calc(42px + 20px);padding-bottom: 26px}.cdp-ff-i{font-weight: 400;font-style: italic}.cdp-ff-b1{font-weight: 200}.cdp-ff-b2{font-weight: 400}.cdp-ff-b3{font-weight: 500}.cdp-ff-b4{font-weight: 600}.cdp-ff-b5{font-weight: 700}.cdp-ff-b6{font-weight: 800}.cdp-welcome-title{padding-top: 35px;padding-bottom: 10px}.cdp-welcome-title-after{padding: 0;margin: 0;padding-top: 40px;line-height: 53px}.cdp-welcome-title-after h1{padding: 0;margin: 0;line-height: normal}.cdp-intro{font-family: 'Montserrat',sans-serif!important;margin-bottom: 70px}.cdp-intro-options{padding-bottom: 50px}.cdp-intro-button{background: #50b6a8;border: 0;color: white;font-size: 24px;padding: 17px 117px;border-radius: 30px;transition: .3s;cursor: pointer}.cdp-button{background: #50b6a8!important;border: 0!important;color: white!important;font-size: 23px;padding: 12px 66px;font-weight: 600;border-radius: 29px;height: 58px;width: 317px;transition: .3s!important;cursor: pointer!important}.cdp-intro-button:hover,.cdp-button:hover{background: #48a598!important}.cdp-intro-button:active,.cdp-button:active{background: #429388!important;transition: 0s!important}.cdp-pointer{cursor: pointer}.cdp-manager-btns{line-height: 2}.cdp-arrow{border: solid #50b6a8;display: inline-block;border-width: 0 4px 4px 0;padding: 5px;border-radius: 2px;transition: all .3s;display: block}.cdp-arrow-down{transform: rotate(135deg);-webkit-transform: rotate(135deg);margin-top: 2px}.cdp-arrow-right{transform: rotate(-135deg);-webkit-transform: rotate(-135deg);margin-right: 3px}.cdp-arrow-left{transform: rotate(45deg);-webkit-transform: rotate(45deg)}.cdp-collapsibles{padding: 20px 0}.cdp-collapsible{margin-bottom: 15px}.cdp-collapsible-title{border: 0;font-size: 21px;background-color: #fff;padding: 24px 44px;color: black;transition: all .2s;cursor: pointer;border-radius: 3px}.cdp-collapsible-title:hover{background-color: #48a598;color: white}.cdp-collapsible-title:hover *{border-color: white}.cdp-collapsible-title:active{transition: all 0s;background-color: #429388}.cdpp-more-filters-wrapper{overflow: hidden}.cdp-collapsible-content{transition: height .3s ease-out,max-height .5s ease-out,border-bottom .5s .3s,padding .3s;border-bottom: 0!important;overflow: hidden;padding: 0 10px;border-top: 0;max-height: 0;background: #fff}.cdp-collapsible-content.cdp-active{padding: 10px;max-height: unset;border-bottom: 0!important}.cdp-collapsible-title.cdp-active *{border-color: white}.cdp-collapsible-title.cdp-active{background: #50b6a8;color: white}.cdp-collapsible:last-child{margin-bottom: 0}.cdp-supports{padding: 10px 0}.cdp-support-box{border: 1px solid #31538f;background: #ddeaf6;padding: 10px;color: black;min-height: 84px}.cdp-s-i-a{line-height: 53px}.cdp-third{width: calc(100% / 3 - 29px);margin-right: 10px}.cdp-third:not(.cdp-ignore):last-child{margin-right: 0}.cdp-fourth{width: calc(100% / 4 - 30px);margin-right: 10px}.cdp-fourth:not(.cdp-ignore):last-child{margin-right: 0}.cdp-projects{background: #fff;border: 1px solid #44546a;color: black;padding: 25px 30px;padding-top: 5px;margin-top: 10px}.cdp-project-box{padding: 10px;border: 1px solid #44546a;min-height: 261.78125px}.cdp-support-title{position: absolute;top: 50%;transform: translateY(-50%);width: calc(100% - 50px - 20px);padding: 0px 10px;margin-left: 50px}.cdp-support-header{position: relative}.cdp-support-img{height: 50px;width: 50px;object-position: center;object-fit: cover}.cdp-support-img-rd{height: 50px;width: 50px;object-position: center;object-fit: cover}.cdp-support-desc{padding: 5px 0}.cdp-tool{position: relative}.cdp-animated{transition: .3s all}.cdp-half-opacity{opacity: .5}span.cdp-green,.cdp-green{color: #50b6a8;transition: color .3s}.cdp-green.cdp-hover:hover{color: #48a598}.cdp-green.cdp-hover:active{transition: all 0s;color: #429388}.cdp-table{width: 100%;border-spacing: 0px;color: black}.cdp-table tr td:nth-child(1),.cdp-table tr th:nth-child(1),.cdp-table tr th:nth-child(2),.cdp-table tr th:nth-child(3),.cdp-table tr td:nth-child(2),.cdp-table tr td:nth-child(3){padding: 3px 20px}.cdp-table tr td:nth-child(1),.cdp-table tr th:nth-child(1){min-width: 192px;text-align: left;padding-left: 44px!important}.cdp-table tr td:nth-child(3),.cdp-table tr th:nth-child(3){padding-right: 44px!important}.cdp-table tr th:nth-child(2),.cdp-table tr th:nth-child(3),.cdp-table tr td:nth-child(2),.cdp-table tr td:nth-child(3){width: 50%;text-align: left}.cdp-table tr th:nth-child(2),.cdp-table tr td:nth-child(2){width: 50%;text-align: left;padding-right:}.cdp-table tr:nth-child(1) td{padding-top: 35px!important}.cdp-table tr td{padding: 16px 20px!important;line-height: 24px}.cdp-table .cdp-thead{background: #f7f7f7}.cdp-table tr th{border-bottom: 1px solid #e1e1e1;font-weight: 400;height: 33px;padding: 5px 10px;height: 58px}.cdp-padding{padding: 15px 20px}.cdp-nbp{padding-bottom: 0!important}.cdp-ntp{padding-top: 0!important}.cdp-padding-10{padding: 10px}.cdp-padding-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-np{padding: 0!important}.cdp-nlh{line-height: inherit!important}.cdp-green-bg{background: #f7f7f7}.cdp-shadow{-moz-box-shadow: 3px 3px 15px 10px #eee!important;-webkit-box-shadow: 3px 3px 15px 10px #eee!important;box-shadow: 3px 3px 15px 10px #eee!important}.cdp-white-bg{background: #fff}.cdp-names-input{width: calc(50% - 97.5px)}.cdp-names-input input{width: 100%}.cdp-names-divider{font-size: 16px;line-height: 49px;padding: 0 10px;width: 175px;color: black;margin-top: 14px}.cdp-name-box{background-color: #50b6a8;width: 165px;padding: 5px;font-weight: 200;border-radius: 1px;text-align: center;color: white;font-size: 18px;cursor: pointer;transition: background-color .3s;height: 29px;line-height: 29px;border-radius: 3px}.cdp-name-box:hover{background-color: #48a598;cursor: pointer}.cdp-name-box-small{background: #50b6a8;font-size: 18px;font-weight: 200;border-radius: 1px;text-align: left;display: inline-block;position: relative;cursor: pointer;pointer-events: none;color: white;padding: 0px 19px!important;padding-right: 63px!important;margin-left: 1px;margin-right: 1px;height: 38px;border-radius: 3px}.cdp-name-box-small[data-cdp-val="0"]{width: 68px}.cdp-name-box-small[data-cdp-val="1"]{width: 108px}.cdp-name-box-small[data-cdp-val="2"]{width: 109px}.cdp-name-box-small::after{content: '\00d7';position: absolute;right: 0px;top: 0px;height: 100%;width: 22px;font-size: 28px;line-height: 38px;padding-right: 3px;padding-left: 9px;pointer-events: auto;background: #42a89a;border-top-right-radius: 3px;border-bottom-right-radius: 3px}.cdp-names-text-info{padding-left: 30px;line-height: 40px}.cdp-magic-input{text-align: left;line-height: 39px;font-size: 17px;box-shadow: 0 0 0 transparent;border-radius: 1px;background-color: #fff;color: #32373c;overflow-x: hidden;word-wrap: unset;white-space: nowrap;resize: none;padding: 6px;min-height: 39px;width: 100%;width: calc(100% - 12px);margin: 0 auto;margin-top: 14px;margin-bottom: 14px;border-radius: 3px}.cdp-magic-input br{display: none!important}.cdp-magic-input *:not(.cdp-drag){display: inline;white-space: nowrap}.cdp-magic-input i{font-style: normal}.cdp-magic-input:focus{border-color: #50b6a8;box-shadow: 0 0 0 1px #50b6a8;outline: 2px solid transparent}.cdp-novis{visibility: hidden}.tb-close-icon,.tb-close-icon:focus{outline: 0!important;outline-style: none}.cdp-gray-button{background: #f2f2f2;border: 1px solid #31538f;color: #000;padding: 5px 40px}.cdp-gray{color: #666}.cdp-h2{font-size: 16px;margin: 10px 0}.cdp-white{color: #fff!important}.cdp-error-span-tooltip{display: none;color: #991111;font-size: 10px}.tooltipster-box{border-color: #888!important;-webkit-box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2);-moz-box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2);box-shadow: 0px 0px 10px 3px rgba(0,0,0,.2)}.cdp-spinner{position: absolute;left: calc(50% - 40px);top: calc(50% - 120px);height: 60px;width: 60px;margin: 0px auto;-webkit-animation: cdp-rotation .9s infinite linear;-moz-animation: cdp-rotation .9s infinite linear;-o-animation: cdp-rotation .9s infinite linear;animation: cdp-rotation .9s infinite linear;border-left: 6px solid rgba(55,190,190,0.48);border-right: 6px solid rgba(55,190,190,0.48);border-bottom: 6px solid rgba(74,255,255,0.77);border-top: 6px solid rgba(74,255,255,0.77);border-radius: 100%;z-index: 200000}@-webkit-keyframes cdp-rotation{from {-webkit-transform: rotate(0deg)} to {-webkit-transform: rotate(359deg)}}@-moz-keyframes cdp-rotation{from {-moz-transform: rotate(0deg)} to {-moz-transform: rotate(359deg)}}@-o-keyframes cdp-rotation{from {-o-transform: rotate(0deg)} to {-o-transform: rotate(359deg)}}@keyframes cdp-rotation{from {transform: rotate(0deg)} to {transform: rotate(359deg)}}.cdp-blue-circle{background: #50b6a8;color: white;font-weight: 400;font-size: 14px;border-radius: 50%;width: 27px;height: 27px;text-align: center;margin-bottom: 20px;margin-right: 7px;line-height: 27px}.cdp-low-margin-bot{margin-bottom: 5px}.cdp-margin-left{margin-left: 5px}.cdp-margin-left-25{margin-left: 25px}.cdp-red-bg{background: #bf0000}.cdp-button.cdp-red-bg:hover{background: #ae0000}.cdp-button.cdp-red-bg:active{background: #9d0000}.cdp-d-header{font-size: 16px;font-weight: 600;margin-top: 13px;margin-bottom: 0px}.cdp-d-header-2{font-size: 14px;margin-top: 33px;margin-bottom: 18px}.cdp-delete-table{border-spacing: 0;padding-bottom: 20px!important}.cdp-delete-table tbody td{}.cdp-delete-table .cdp-h-tbe{padding-top: 15px;min-height: 15px;background: rgb(245,245,245)}.cdp-delete-table tbody td,.cdp-delete-table thead th{padding-bottom: 20px!important;padding-top: 20px;padding-left: 20px!important;padding-right: 10px;font-size: 19px!important;text-align: left!important}.cdp-delete-table thead th{padding: 20px!important;border-bottom: 2px solid rgb(223,223,223)!important;font-weight: 600}.cdp-delete-table tbody td{background: rgb(245,245,245)!important}.cdp-delete-table tbody td:nth-child(1),.cdp-delete-table thead th:nth-child(1){padding-left: 40px!important;width: 32px}.cdp-delete-table tbody td:nth-child(2),.cdp-delete-table thead th:nth-child(2){text-align: left!important}.cdp-delete-table tbody td:nth-child(3),.cdp-delete-table thead th:nth-child(3){text-align: left!important}.cdp-delete-table tbody td:nth-child(4),.cdp-delete-table thead th:nth-child(4){min-width: 110px;width: 110px}.cdp-delete-table tbody td:nth-child(5),.cdp-delete-table thead th:nth-child(5){min-width: 165px;width: 165px}.cdp-delete-table tbody td:nth-child(6),.cdp-delete-table thead th:nth-child(6){min-width: 104px;width: 104px;padding-right: 40px!important}.cdp-delete-table tbody{background: rgb(245,245. 245)!important}.cdp-delete-table tbody td:nth-child(2),.cdp-delete-table thead th:nth-child(2){padding-left: 7px!important}.cdp-delete-table tbody td:nth-child(1),.cdp-delete-table thead th:nth-child(1){padding-right: 0px!important}.cdp-table-cont{overflow-x: auto;max-width: 100%;width: 100%;overflow-y: hidden!important}.cdp-table-cont table{width: 100%}.cdp-multiple-tooltip-count{opacity: 0}.cdp-hide{display: none}.cdp-no-style{list-style: none}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#3273dc}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px rgba(10,10,10,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{white-space:nowrap}.pagination-link.is-current{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}.cdp-pagination .page-btn.active a{transition: background-color .3s,color .3s;color: white}.cdp-pagination .page-btn{transition: background-color .3s,color .3s}.cdp-pagination .page-btn.active{transition: background-color .3s,color .3s;border-color: #50b6a8;background: #50b6a8;color: white}#cdp-d-table-tbody tr,#cdp-d-table-tbody td{word-break: break-word}#cdp-d-table-tbody tr.cdp-del td:not(td:nth-child(1)),#cdp-d-table-tbody tr.cdp-del td:not(td:nth-child(1)) a{color: #c50000!important;text-decoration: none!important;text-decoration: line-through!important}.cdp-del td,.cdp-del a{text-decoration: line-through!important;color: red!important}.cdp-tab-list{width: 100%;margin: 0 auto;text-align: center;margin-top: 10px}.cdp-tab-element:not(:last-child){border-right: 0!important}.cdp-tab-element{width: calc(100% / 3 - 16px);color: black;background: #f6f6f6;padding: 8px;text-align: center;border-bottom: 4px solid #50b6a8;cursor: pointer;transition: all .3s;height: 25px;line-height: 25px;font-size: 20px}.cdp-tab-element span{font-weight: 500}.cdp-tab-element:hover:not(.cdp-tab-active):not([data-disabled="true"]){background: #eee}.cdp-tab-element[data-disabled="true"]{cursor: not-allowed}.cdp-tab-element:first-child{border-top-left-radius: 3px}.cdp-tab-element:last-child{border-top-right-radius: 3px}.cdp-tab-active{background: #50b6a8;color: white}.cdp-content *:not(.cdp-normal-font),.cdp-tooltip-content *:not(.cdp-normal-font){font-family: 'Montserrat',sans-serif!important}.cdp-content b{font-weight: 600}.cdp-content a{color: #50b6a8}.cdp-content a:hover{color: #48a598}.cdp-content a:active{color: #429388}.cdp-profile-bar{margin-bottom: 24px;margin-top: 16px}.cdp-select-styled,.cdp-select{font-size: 14px;color: #666;border-color: rgb(198,201,206);background: #fff}.cdp-select-padding{padding: 0 45px 0 20px!important;height: 48px;line-height: 48px!important;margin: 0 13px}.cdp-content [type="checkbox"],.cdp-other-inputs[type="checkbox"],.cdp-checkbox,input[type="checkbox"].cdp-data-set{color: #555;clear: none;cursor: pointer;display: inline-block;margin: -.25rem .25rem 0 0;outline: 0;padding: 0;text-align: center;vertical-align: middle;-webkit-appearance: none;box-shadow: inset 0 1px 2px rgba(0,0,0,.1);border: 1px solid #50b6a8;height: 29px;width: 29px;margin-right: 5px;margin-top: -2px;background: #fff;transition: all .3s;border-radius: 6px;margin-right: 12px}.cdp-content [type="checkbox"]:checked,.cdp-other-inputs[type="checkbox"]:checked,.cdp-checkbox:checked,input[type="checkbox"].cdp-data-set:checked{background: #50b6a8}.cdp-content [type="checkbox"]:checked::before,.cdp-other-inputs[type="checkbox"]:checked::before,.cdp-checkbox:checked::before,input[type="checkbox"].cdp-data-set:checked::before{content: '';border-top: 2px solid white;border-left: 2px solid white;height: 13px!important;width: 7px!important;margin: -.1875rem 0 0 -.25rem;margin-top: 4px;margin-left: 9px;transform: rotate(220deg);float: left;display: inline-block;vertical-align: middle}.cdp-table tbody td{color: gray}.cdp-table tbody td:nth-child(1){font-weight: 300}.cdp-table tbody td:nth-child(3){color: black;font-weight: 500}tr.cdp-selected-tr-opt td:nth-child(2){color: black!important;font-weight: 500!important}tr.cdp-selected-tr-opt td:nth-child(2) span{font-weight: 500!important}tr.cdp-selected-tr-opt td:nth-child(3){color: gray!important;font-weight: 300!important}tr.cdp-selected-tr-opt td:nth-child(1) span{font-weight: 500!important;color: black!important}.cdp-d-search{height: 110px;width: 644px;font-size: 30px}.cdp-d-searchbox-c{line-height: 30px!important;margin-left: 3px;padding-left: 15px!important;position: relative!important;background: url('../imgs/search.png');background-position: calc(100% - 13px) center;background-repeat: no-repeat;width: 193px;height: 42px;padding-right: 28px;background-size: 16px;font-size: 18px!important;border-radius: 3px!important;border-color: rgb(198,201,206)!important}.cdp-d-searchbox-c:focus,.cdp-content input:focus{border-color: #50b6a8!important;box-shadow: none!important;outline: 0!important}.cdp-padding-23{padding: 23px}.cdp-padding-23-h{padding-top: 23px;padding-bottom: 23px}.cdp-padding-15-h{padding-top: 15px;padding-bottom: 15px}.cdp-pad-lin{padding: 28px 44px}.cdp-curr-cont{padding-left: 3px;text-align: center;width: 90%;margin: 0 auto;margin-top: 7px!important}.cdp-con-cen{margin: 0 auto;text-align: center}.cdp-select-centered{width: 100%!important;max-width: 637px;text-align: center!important;margin: 0 auto;margin-bottom: 5px}.cdp-c-x-a-v{max-width: 661px!important}.cdp-special-cb-p label{margin-right: 60px;display: inline-block;line-height: 44px}.cdp-special-cb-p input[type="checkbox"]{margin-right: 8px!important}.cdp-special-cb-p label:last-child{margin-right: 0px!important}.cdp-special-cb-p h2{margin-bottom: 5px}.cdp-cont-d-box-tabed{background: #f9f9f9}.cdp-radio{border: 1px solid #50b6a8!important;transition: all .3s;margin-right: 15px;width: 25px!important;height: 25px!important}.cdp-radio:checked::before{margin: 0;content: "";border-radius: 50%;width: 13px!important;height: 13px!important;background-color: #1e8cbe;line-height: 1.14285714;margin-top: 5px!important;margin-left: 5px!important}.cdp-radio:checked::before{background-color: #50b6a8!important}.cdp-sm-d{font-size: 12px}.cdp-ff-20{font-size: 20px}.cdp-d-sel-all-con{display: inline-block;width: 305px;max-width: 305px;line-height: 30px}.cdp-d-pagi-cent{display: inline-block;padding-right: 334px;width: calc(100% - 394px - 245px)}.pagination-pages-section{margin: 0;margin-bottom: 25px;width: auto;float: right!important}.pagination-next{margin: 0;float: right!important}.pagination-previous{margin: 0;float: left;margin: 0 1px}.pagination-pages{display: inline-block;text-align: center;margin: 0 1px}#cdp-d-table-pagi{text-align: center}.page-btn{border: 1px solid #aaa;font-size: 18px;background: #fff;top: -0.5px;font-weight: 400;float: left;margin: 0 1px;min-width: 28px!important;text-align: center;height: 28px;line-height: 29px;color: #969696;cursor: not-allowed}.page-btn:not(.active){cursor: pointer!important}.page-btn:not(.active):hover{border: 1px solid #48a598;background: #48a598}.page-btn:not(.active):active{border: 1px solid #429388;background: #429388}.page-btn:not(.active):hover a{color: white!important}.page-btn:not(.active):active a{color: white!important}.page-btn a{color: #555;padding: 3px 10px!important}.cdp-pagi-arrows{width: 28px!important;border: 1px solid #aaa!important;height: 28px!important;font-size: 40px!important;position: relative!important;background: #fff;font-weight: 400!important;line-height: 26px!important;margin-left: 1px}.cdp-pagi-arrows a{position: absolute!important;right: 0!important;left: 0px!important;top: -2px!important;bottom: 0!important;color: #969696;height: 28px!important;width: 28px!important}.cdp-separator-dis{pointer-events: none;float: left;width: 28px;border: 1px solid #b8b8b8!important;height: 28px!important;font-size: 33px;position: relative;background: #fff;top: 0px;font-weight: 400;margin: 0 1px;line-height: 27px;cursor: not-allowed!important}.cdp-separator-dis a{color: #b8b8b8!important;position: absolute;right: 0;left: 2px;top: -2px;bottom: 0;height: 19px;width: 19px}.cdp-pagi-arrows .prev_page{left: 0px!important}.cdp-pagi-arrows .next_page{left: 1px!important}.cdp-width-166{width: 68px!important}.cdp-vtop-pad{vertical-align: top;padding-top: 15px;min-width: 230px;padding-left: 13px}.cdp-d-tp-pad{padding-top: 15px;padding-bottom: 45px}.cdp-even-more-th-info{padding-top: 7px}.cdp-number-field-styled{width: 70px!important;text-align: center;font-family: 'Montserrat',sans-serif;box-shadow: 0 0 0 transparent;padding: 5px 7px;appearance: none!important;-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-number-field-styled::-webkit-inner-spin-button{-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-number-field-styled::-webkit-outer-spin-button{-webkit-appearance: none!important;-moz-appearance: textfield!important}.cdp-custom-date-picking{border-color: rgb(198,201,206)!important;line-height: 48px!important;border-radius: 3px!important;height: 48px;font-size: 18px;width: 160px;margin-left: 15px}.cdp-color-p-i{}.cdp-p-hh{padding-bottom: 25px;padding-top: 25px}.cdp-p-25-40{padding-top: 25px;padding-bottom: 40px}.cdp-p-40-b{padding-bottom: 40px}.cdp-p-10-b{padding-bottom: 10px}.cdp-p-20-b{padding-bottom: 20px}.cdp-p-25-t{padding-top: 25px}.cdp-p-15-25{padding-top: 15px}.cdp-p-10-h{padding-top: 10px;padding-bottom: 10px}.cdp-p-15-h{padding-top: 15px;padding-bottom: 15px}.cdp-p-20-h{padding-top: 20px;padding-bottom: 20px}.cdp-p-30-h{padding-top: 30px;padding-bottom: 30px}.cdp-max-600{max-width: 637px!important;min-width: 637px!important;margin-left: 49px}.cdp-per-page-select-show{width: 96px!important;height: 42px;font-size: 17px!important;padding-right: 44px!important;padding: 0 45px 0 20px!important;line-height: 42px!important;text-align: left;margin-left: 10px;margin-right: 10px}.cdp-d-pad-sp{padding: 0 40px}.cdp-hr{border: 1px solid #dfdfdf!important;margin-bottom: 20px}.cdp-d-throttling-count{width: 85px!important;height: 42px!important;line-height: 40px!important;color: #32373c;border-color: rgb(198,201,206)!important;font-size: 17px!important}.cdp-date-picked{margin-right: 0px!important}.cdp-option-premium .option[data-value="3"],.cdp-premium-in-select .option[data-value="premium"],.cdp-premium-in-select-m [data-value="2"]{position: relative}.cdp-option-premium .option[data-value="3"]::after,.cdp-premium-in-select .option[data-value="premium"]::after,.cdp-premium-in-select-m [data-value="2"]::after{content: '';display: inline-block;position: absolute;width: 19px;height: 19px;top: calc(50% - 10px);background: url('../imgs/premium.png');display: inline-block;line-height: 19px;background-repeat: no-repeat;background-position: center;background-size: cover;padding: 0;margin-left: 7px;cursor: pointer}.cdp-cont-d-box-tabed{display: none;overflow: hidden}.cdp-tbody-of-settings a{text-decoration: none}.cdp-tbody-of-settings a:hover,.cdp-tbody-of-settings a:hover span{color: #429388!important}.cdp-content ::placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-moz-placeholder{color: #ddd!important;opacity: 1}.cdp-content :-moz-placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-webkit-input-placeholder{color: #ddd!important;opacity: 1}.cdp-content ::-ms-input-placeholder{color: #ddd!important;opacity: 1}.cdp-content :-ms-input-placeholder{color: #ddd!important;opacity: 1}.cdp-backup-alert{background: #fcecec;color: black;border-radius: 1px;text-align: center;line-height: 23px;padding: 38px;font-size: 14px;border-radius: 3px}.cdp-delete-btn{margin-top: 10px;border: 0;border-radius: 7px}.cdp-delete-info b{font-weight: 500}.cdp-final-ask{background: #fbe4d4;line-height: 1.9;margin-top: 10px;margin-bottom: 0px;padding: 1px 5px;cursor: default}.cdp-small-btn{border: 0;border-radius: 2px}.cdp-delete-info{background: #e2edf7;text-align: center;padding: 10px;color: black;margin: 0 auto;font-weight: 300;width: 663px!important;height: 33px!important;line-height: 33px}.cdp-intro-image{width: 100%;border-radius: 6px;transition: all .3s;cursor: zoom-in}.cdp-intro-image:hover{-ms-transform: scale(2);-webkit-transform: scale(2);transform: scale(2)}.cdp-intro-img-1:hover{margin-left: calc(6vw + 5px)}.cdp-intro-img-1{background-image: url('../imgs/intro_1.gif');background-position: 41% 61%;background-size: 120% auto}.cdp-intro-img-2{background-image: url('../imgs/intro_2.gif');background-position: 44% 61%;background-size: 120% auto}.cdp-intro-img-3:hover{margin-left: calc(-6vw - 5px)}.cdp-intro-img-3{background-image: url('../imgs/intro_3.gif');background-position: 45% 15%;background-size: 102% auto}.cdp-no-vis{visibility: hidden}.cdp-togglable-name-b{cursor: pointer}.cdp-tooltip-premium-spc-2{margin-bottom: 0;padding-bottom: 0;max-height: 32px}
assets/fonts/Montserrat-Bold.woff2 ADDED
Binary file
assets/fonts/Montserrat-ExtraBold.woff2 ADDED
Binary file
assets/fonts/Montserrat-ExtraLight.woff2 ADDED
Binary file
assets/fonts/Montserrat-Italic.woff2 ADDED
Binary file
assets/fonts/Montserrat-Light.woff2 ADDED
Binary file
assets/fonts/Montserrat-Medium.woff2 ADDED
Binary file
assets/fonts/Montserrat-Regular.woff2 ADDED
Binary file
assets/fonts/Montserrat-SemiBold.woff2 ADDED
Binary file
assets/js/cdp-global.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(t){let e=t("#cdp-purl").val(),i=[];function n(){setTimeout(()=>{t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_saw_this_noti",noti_token:token}).done(()=>{delete i[i.findIndex(t=>t===token)]}).fail(()=>{n(token)})},500*i.length)}function o(){let e=t(".cdp-dd-item").length,i=t(".cdp-dd-d").length,n=t(".cdp-dd-ud").length;i<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr").show()),n<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr").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)}if(t("body").on("click",".cdp-notification .cdp-times-button",t.cdpRemoveNotifiaction),t("body").on("mouseover",".cdp-bnew-notis",function(){let e=parseInt(t(".cdp-notis-counter").text()),o=t(".cdp-bnew-notis").length,s=t(this).attr("data-token");t(this).hasClass("cdp-bnew-notis")&&e-1>=0&&(t(this).removeClass("cdp-bnew-notis"),t(".cdp-notis-counter").text(e-1));(e>0||o>0)&&(i.push(s),setTimeout(()=>{t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_saw_this_noti",noti_token:s}).done(()=>{delete i[i.findIndex(t=>t===s)]}).fail(()=>{n()})},500*i.length))}),t("body").on("click",".cdp-dropdown-clear-all-notis",function(e){e.preventDefault(),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"clear_crons"}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){let e=t(".cdp-dd-item");e.hide(300),setTimeout(()=>{e.remove(),o()},300),t.cdpNotification("success","Tasks cleared!")}else"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","We couldn't update task list, please try again later or kill tasks individualy.")}).fail(e=>{t.cdpNotification("error","We couldn't update task list, please try again later or kill tasks individualy.")})}),t("body").on("click",".cdp-noti-hide-btn",function(){let e=t(this).parents(".ab-item").attr("data-token");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"try_to_hide_the_tasks",task:e}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status?(t(this).parents(".ab-item").hide(300),setTimeout(()=>{t(this).parents(".ab-item").remove(),o()},300),t.cdpNotification("success","The task has been hidden")):"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","There was an error and we couldn't hide the task.")}).fail(()=>{t.cdpNotification("error","There was an error and we couldn't hide the task.")})}),t("body").on("click",".cdp-noti-kill-btn",function(){let e=t(this).parents(".ab-item").attr("data-token");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"try_to_kill_the_tasks",task:e}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status?(t(this).parents(".ab-item").hide(300),setTimeout(()=>{t(this).parents(".ab-item").remove(),o()},300),t.cdpNotification("success","The task has been killed")):"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","There was an error and we couldn't kill the task.")}).fail(()=>{t.cdpNotification("error","There was an error and we couldn't kill the task.")})}),t("body").on("click",".cdp-review-button",function(){function e(){t("#cdp-review-notice").css({"max-height":`${t("#cdp-review-notice").height()}px`,opacity:1}),t("#cdp-review-notice").animate({"max-height":"0px",opacity:0},300)}function i(i){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"review_dismiss",decision:i}).done(i=>{t.isJsonString(i)&&(i=t.cdpParse(i)),"success"!=i.status&&t.cdpNotification("warning","There was an issue while dismissing banner, please do it next time again."),e()}).fail(i=>{t.cdpNotification("error","Cannot send dismiss request. Are you connected to the internet?"),e()})}"cdp-review-review"==t(this).attr("id")?(i("hide"),t.cdpNotification("success","Thank you very much for the review, this banner will not appear again!")):"cdp-review-already"==t(this).attr("id")?(i("hide"),t.cdpNotification("success","Thank you very much for the review, this banner will not appear again!")):"cdp-review-later"==t(this).attr("id")?(i("remind"),t.cdpNotification("success","Alright! We will ask you again in 14 days!")):(i("hide"),t.cdpNotification("success","This banner will not appear again, if any feature is missing you can ask for it on our support forum!"))}),t("body").on("mouseenter","#cdp-review-no",function(){t("#cdp-review-sad").css({opacity:1})}),t("body").on("mouseleave","#cdp-review-no",function(){t("#cdp-review-sad").css({opacity:0})}),t(".cdp-copy-loader-overlay").length>0&&t(".cdp-copy-loader-overlay").prependTo("body"),t("#cdp-show-copy-banner").length>0&&(t(".cdp-copy-alert-success").prependTo("body"),setTimeout(()=>{"-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)},110)),t(".cdp-preloader-c").hasClass("cdp_is_cool_installed")&&setTimeout(()=>{t.cdpNotification("info","Plugin has been installed successfully, feel free to check those awesome features!")},500),"undefined"!=typeof pagenow&&["toplevel_page_copy-delete-posts","plugins"].includes(pagenow)){let i=`background:url('${`${e}/assets/imgs/stars.gif`}')`;t('[data-slug="copy-delete-posts-premium"]').find("strong").html(`<span style="">Copy & Delete Posts <b style="color: orange; ${i}">Premium</b></span>`)}t.cdpTooltipsTop(),t("#cdp-review-notice").find(".notice-dismiss").tooltipster({delay:30,animationDuration:350,debug:!1,timer:30,delayTouch:[100,200],interactive:!1,distance:-4,side:"top",contentAsHTML:!0,maxWidth:800,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},content:"It will hide this banner just for now.",theme:["tooltipster-noir","tooltipster-noir-customized","cdp-banner","cdp-center"],repositionOnScroll:!0,functionReady:function(){setTimeout(()=>{t.tooltipReposition()},150)}}),t("#cdp-copy-modal-global").length>0&&t("#cdp-copy-modal-global").appendTo("body")}),function(t){t.extend({cdpNotification:function(e="default",i="There was an error with this notification.",n=7e3){t(".cdp-notification-box").length<=0&&t("body").prepend(t('<div class="cdp-notification-box"></div>')),e="default"==e?"":"success"==e?" is-success":"warning"==e?" is-warning":"error"==e?" is-danger":" is-info";let o=Math.floor(Math.random()*Math.floor(64e3)),s=`<div style="display: none;" id="ntf-${o}" class="cdp-notification${e}">\n <button class="cdp-times-button">&times;</button>\n <div class="cdp-cf">\n <div class="cdp-left cdp-alert-icon"><div class="cdp-icon-bg"></div></div>\n <div class="cdp-left cdp-alert-msg-title">\n <div class="cdp-title${e}">Copy & Delete Posts</div>\n <div>${i}</div>\n </div>\n </div>\n </div>`;t(".cdp-notification-box").prepend(s);let a=t(`#ntf-${o}`);a.css({opacity:0,display:"block"});let c=a.outerWidth();a.outerHeight();a.css({right:"-35vw","font-size":"0px",width:0,padding:0,opacity:"0"}),a.animate({right:"15px",width:c,padding:"1rem 2rem 1rem 1.5rem",opacity:"1"},{duration:200,queue:!1}),a.animate({"font-size":"16px"},{duration:300,queue:!1}),setTimeout(()=>{t(`#ntf-${o}`).css({width:""})},250),setTimeout(()=>{a.animate({"font-size":"0px"},{duration:200,queue:!1}),a.animate({right:"-35vw",height:0,width:0,margin:0,padding:0,opacity:"0"},300,function(){a.remove()})},n)},cdpRemoveNotifiaction:function(){let e=t(this).parents(".cdp-notification");e.animate({"font-size":"0px"},{duration:200,queue:!1}),e.animate({right:"-35vw",height:0,width:0,margin:0,padding:0,opacity:"0"},300,function(){e.remove()})},tooltipReposition:function(){setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].reposition()},10)},cdpTooltipsTop:function(){t(".cdp-tooltip-top").tooltipster({delay:30,animationDuration:350,debug:!1,timer:30,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,maxWidth:340,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["tooltipster-noir","tooltipster-noir-customized","cdp-center"],repositionOnScroll:!0,functionReady:function(){setTimeout(()=>{t.tooltipReposition()},150)}})},isJsonString:function(e){try{JSON.parse(e)}catch(i){if("string"==typeof e){let i=t.cdpReverseString(e).indexOf("}");i=0==i?e.length:-i,e=e.slice(e.indexOf("{"),i);try{JSON.parse(e)}catch(t){return!1}return!0}return!1}return!0},cdpReverseString:function(e){return"string"==typeof e?""===e?"":t.cdpReverseString(e.substr(1))+e.charAt(0):e},cdpParse:function(e){try{JSON.parse(e)}catch(i){if("string"==typeof e){let i=t.cdpReverseString(e).indexOf("}");i=0==i?e.length:-i,e=e.slice(e.indexOf("{"),i);try{JSON.parse(e)}catch(t){return!1}return JSON.parse(e)}return!1}return JSON.parse(e)},cdpModal:function(e){let i;(i=t("string"==typeof e?`#${e}`:`#${t(this).attr("data-modal-name")}`)).is(":hidden")&&($content=t(i.find(".cdp-modal-content")),i.css({opacity:0}),$content.css({opacity:0,top:"60%"}),i.show(),i.animate({opacity:1},300),$content.animate({opacity:1,top:"50%"},300))},cdpModalClose:function(e){let i,n=e.target,o="string"==typeof e;(n&&(t(n).hasClass("cdp-modal-times")||t(n).hasClass("cdp-modal"))||o)&&((i=o?t(`#${e}`):t(this).hasClass("cdp-modal")?t(this):t(this).parents(".cdp-modal")).is(":hidden")||($content=t(i.find(".cdp-modal-content")),i.animate({opacity:0},300),$content.animate({opacity:0,top:"60%"},300,function(){i.hide()})))}})}(jQuery);
1
+ jQuery(document).ready(function(t){let e=t("#cdp-purl").val(),i=[];function o(){setTimeout(()=>{t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_saw_this_noti",noti_token:token}).done(()=>{delete i[i.findIndex(t=>t===token)]}).fail(()=>{o(token)})},500*i.length)}function n(){let e=t(".cdp-dd-item").length,i=t(".cdp-dd-d").length,o=t(".cdp-dd-ud").length;i<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr").show()),o<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr").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)}if(t("body").on("click",".cdp-notification .cdp-times-button",t.cdpRemoveNotifiaction),t("body").on("mouseover",".cdp-bnew-notis",function(){let e=parseInt(t(".cdp-notis-counter").text()),n=t(".cdp-bnew-notis").length,s=t(this).attr("data-token");t(this).hasClass("cdp-bnew-notis")&&e-1>=0&&(t(this).removeClass("cdp-bnew-notis"),t(".cdp-notis-counter").text(e-1));(e>0||n>0)&&(i.push(s),setTimeout(()=>{t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_saw_this_noti",noti_token:s}).done(()=>{delete i[i.findIndex(t=>t===s)]}).fail(()=>{o()})},500*i.length))}),t("body").on("mouseover",".cdp-dropdown-left",function(){if(!t(this).hasClass("tooltipstered")){let e=t(t(this).parents(".cdp-dd-d")[0]),i=e.attr("data-fdate");if(fdate=e.attr("data-ftext"),!fdate)return;i=i?`<br>${i}`:"",t(this).tooltipster({delay:30,animationDuration:350,debug:!1,timer:30,delayTouch:[100,200],interactive:!0,distance:6,side:"left",contentAsHTML:!0,maxWidth:340,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},content:`${fdate}${i}`,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-center"],repositionOnScroll:!0,functionReady:function(){setTimeout(()=>{t.tooltipReposition()},150)}}),t(this).tooltipster("open")}}),t("body").on("click",".cdp-dropdown-clear-all-notis",function(e){e.preventDefault(),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"clear_crons"}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){let e=t(".cdp-dd-item");e.hide(300),setTimeout(()=>{e.remove(),n()},300),t.cdpNotification("success","Tasks cleared!")}else"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","We couldn't update task list, please try again later or kill tasks individualy.")}).fail(e=>{t.cdpNotification("error","We couldn't update task list, please try again later or kill tasks individualy.")})}),t("body").on("click",".cdp-noti-hide-btn",function(){let e=t(this).parents(".ab-item").attr("data-token");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"try_to_hide_the_tasks",task:e}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status?(t(this).parents(".ab-item").hide(300),setTimeout(()=>{t(this).parents(".ab-item").remove(),n()},300),t.cdpNotification("success","The task has been hidden")):"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","There was an error and we couldn't hide the task.")}).fail(()=>{t.cdpNotification("error","There was an error and we couldn't hide the task.")})}),t("body").on("click",".cdp-noti-kill-btn",function(){let e=t(this).parents(".ab-item").attr("data-token");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"try_to_kill_the_tasks",task:e}).done(e=>{t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status?(t(this).parents(".ab-item").hide(300),setTimeout(()=>{t(this).parents(".ab-item").remove(),n()},300),t.cdpNotification("success","The task has been killed")):"fail"==e.status?t.cdpNotification(e.type,e.msg):t.cdpNotification("error","There was an error and we couldn't kill the task.")}).fail(()=>{t.cdpNotification("error","There was an error and we couldn't kill the task.")})}),t("body").on("click",".cdp-review-button",function(){function e(){t("#cdp-review-notice").css({"max-height":`${t("#cdp-review-notice").height()}px`,opacity:1}),t("#cdp-review-notice").animate({"max-height":"0px",opacity:0},300)}function i(i){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"review_dismiss",decision:i}).done(i=>{t.isJsonString(i)&&(i=t.cdpParse(i)),"success"!=i.status&&t.cdpNotification("warning","There was an issue while dismissing banner, please do it next time again."),e()}).fail(i=>{t.cdpNotification("error","Cannot send dismiss request. Are you connected to the internet?"),e()})}"cdp-review-review"==t(this).attr("id")?(i("hide"),t.cdpNotification("success","Thank you very much for the review, this banner will not appear again!")):"cdp-review-already"==t(this).attr("id")?(i("hide"),t.cdpNotification("success","Thank you very much for the review, this banner will not appear again!")):"cdp-review-later"==t(this).attr("id")?(i("remind"),t.cdpNotification("success","Alright! We will ask you again in 14 days!")):(i("hide"),t.cdpNotification("success","This banner will not appear again, if any feature is missing you can ask for it on our support forum!"))}),t("body").on("mouseenter","#cdp-review-no",function(){t("#cdp-review-sad").css({opacity:1})}),t("body").on("mouseleave","#cdp-review-no",function(){t("#cdp-review-sad").css({opacity:0})}),t(".cdp-copy-loader-overlay").length>0&&t(".cdp-copy-loader-overlay").prependTo("body"),t("#cdp-show-copy-banner").length>0&&(t(".cdp-copy-alert-success").prependTo("body"),setTimeout(()=>{"-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)},110)),t(".cdp-preloader-c").hasClass("cdp_is_cool_installed")&&setTimeout(()=>{t.cdpNotification("info","Plugin has been installed successfully, feel free to check those awesome features!",3e3)},500),"undefined"!=typeof pagenow&&["toplevel_page_copy-delete-posts","plugins"].includes(pagenow)){let i=`background:url('${`${e}/assets/imgs/stars.gif`}')`;t('[data-slug="copy-delete-posts-premium"]').find("strong").html(`<span style="">Copy & Delete Posts <b style="color: orange; ${i}">Premium</b></span>`)}t.cdpTooltipsTop(),t("#cdp-review-notice").find(".notice-dismiss").tooltipster({delay:30,animationDuration:350,debug:!1,timer:30,delayTouch:[100,200],interactive:!1,distance:-4,side:"top",contentAsHTML:!0,maxWidth:800,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},content:"It will hide this banner just for now.",theme:["tooltipster-noir","tooltipster-noir-customized","cdp-banner","cdp-center"],repositionOnScroll:!0,functionReady:function(){setTimeout(()=>{t.tooltipReposition()},150)}}),t("#cdp-copy-modal-global").length>0&&t("#cdp-copy-modal-global").appendTo("body")}),function(t){t.extend({cdpNotification:function(e="default",i="There was an error with this notification.",o=7e3){t(".cdp-notification-box").length<=0&&t("body").prepend(t('<div class="cdp-notification-box"></div>')),e="default"==e?"":"success"==e?" is-success":"warning"==e?" is-warning":"error"==e?" is-danger":" is-info";let n=Math.floor(Math.random()*Math.floor(64e3)),s=`<div style="display: none;" id="ntf-${n}" class="cdp-notification${e}">\n <button class="cdp-times-button">&times;</button>\n <div class="cdp-cf">\n <div class="cdp-left cdp-alert-icon"><div class="cdp-icon-bg"></div></div>\n <div class="cdp-left cdp-alert-msg-title">\n <div class="cdp-title${e}">Copy & Delete Posts</div>\n <div>${i}</div>\n </div>\n </div>\n </div>`;t(".cdp-notification-box").prepend(s);let a=t(`#ntf-${n}`);a.css({opacity:0,display:"block"});let c=a.outerWidth();a.outerHeight();a.css({right:"-35vw","font-size":"0px",width:0,padding:0,opacity:"0"}),a.animate({right:"15px",width:c,padding:"1rem 2rem 1rem 1.5rem",opacity:"1"},{duration:200,queue:!1}),a.animate({"font-size":"16px"},{duration:300,queue:!1}),setTimeout(()=>{t(`#ntf-${n}`).css({width:""})},250),setTimeout(()=>{a.animate({"font-size":"0px"},{duration:200,queue:!1}),a.animate({right:"-35vw",height:0,width:0,margin:0,padding:0,opacity:"0"},300,function(){a.remove()})},o)},cdpRemoveNotifiaction:function(){let e=t(this).parents(".cdp-notification");e.animate({"font-size":"0px"},{duration:200,queue:!1}),e.animate({right:"-35vw",height:0,width:0,margin:0,padding:0,opacity:"0"},300,function(){e.remove()})},tooltipReposition:function(){setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].reposition()},10)},cdpTooltipsTop:function(){t(".cdp-tooltip-top").tooltipster({delay:30,animationDuration:350,debug:!1,timer:30,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,maxWidth:340,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["tooltipster-noir","tooltipster-noir-customized","cdp-center"],repositionOnScroll:!0,functionReady:function(){setTimeout(()=>{t.tooltipReposition()},150)}})},isJsonString:function(e){try{JSON.parse(e)}catch(i){if("string"==typeof e){let i=t.cdpReverseString(e).indexOf("}");i=0==i?e.length:-i,e=e.slice(e.indexOf("{"),i);try{JSON.parse(e)}catch(t){return!1}return!0}return!1}return!0},cdpReverseString:function(e){return"string"==typeof e?""===e?"":t.cdpReverseString(e.substr(1))+e.charAt(0):e},cdpParse:function(e){try{JSON.parse(e)}catch(i){if("string"==typeof e){let i=t.cdpReverseString(e).indexOf("}");i=0==i?e.length:-i,e=e.slice(e.indexOf("{"),i);try{JSON.parse(e)}catch(t){return!1}return JSON.parse(e)}return!1}return JSON.parse(e)},cdpModal:function(e){let i;(i=t("string"==typeof e?`#${e}`:`#${t(this).attr("data-modal-name")}`)).is(":hidden")&&($content=t(i.find(".cdp-modal-content")),i.css({opacity:0}),$content.css({opacity:0,top:"60%"}),i.show(),i.animate({opacity:1},300),$content.animate({opacity:1,top:"50%"},300))},cdpModalClose:function(e){let i,o=e.target,n="string"==typeof e;(o&&(t(o).hasClass("cdp-modal-times")||t(o).hasClass("cdp-modal"))||n)&&((i=n?t(`#${e}`):t(this).hasClass("cdp-modal")?t(this):t(this).parents(".cdp-modal")).is(":hidden")||($content=t(i.find(".cdp-modal-content")),i.animate({opacity:0},300),$content.animate({opacity:0,top:"60%"},300,function(){i.hide()})))}})}(jQuery);
assets/js/cdp.min.js CHANGED
@@ -1 +1 @@
1
- function cdp_tooltips_update_content(){if(jQuery("select").niceSelect("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],o=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(o=parseInt(jQuery(e).attr("data-top"))),jQuery(e).tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:o,side:"top",content:'This feature will come soon as part of the Premium Plugin. You can <a href="https://sellcodes.com/CylMIdJD" target="_blank">pre-order now</a> at a <b>huge discount</b>.',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This feature will come soon as part of the Premium Plugin. You can <a href="https://sellcodes.com/CylMIdJD" target="_blank">pre-order now</a> at a <b>huge discount</b>.',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return"Are you REALLY sure?";console.log("You're crazy! – Here is the output:");let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"debug_function"}).done(t=>{console.log(t),console.log("–––––––––––––- END OF THE DEBUG OUTPUT –––––––––––––- ")})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,o="default",i=null,c=null,n=null,d=null,p=null,s=null,a=null;const l=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function r(e=null,o=!1){let i=this;"string"==typeof e&&(i=`.${e}`),0!=o&&(i=o),$parent=t(t(i).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 u(){let e=t(".cdp-names-prefix").text(),o=t(".cdp-names-suffix").text(),i={year:(c=new Date).getFullYear(),month:("0"+(c.getMonth()+1)).slice(-2),day:c.getDate()<=9?"0"+c.getDate():c.getDate(),hour:c.getHours()<=9?"0"+c.getHours():c.getHours(),minute:c.getMinutes()<=9?"0"+c.getMinutes():c.getMinutes(),second:c.getSeconds()<=9?"0"+c.getSeconds():c.getSeconds(),week:c.getDay()};var c;let n="(blank)"==t(".cdp-togglable-name-b").text()?"":"(Name of original)",d=`${e.trim()} ${n} ${o.trim()}`;d=d.replace(/\[Counter\]/g,"2");let p=t(".cdp-date-picked").val();"1"==p?d=d.replace(/\[CurrentDate\]/g,`${i.month}/${i.day}/${i.year}`):"2"==p?d=d.replace(/\[CurrentDate\]/g,`${i.day}/${i.month}/${i.year}`):"3"==p&&function(e){let o=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_formatted_time",format:o}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{d=d.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(d),d=(d=d.replace(/\[CurrentTime\]/g,`${i.hour}:${i.minute}:${i.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(d)}),"3"!=p&&(d=(d=d.replace(/\[CurrentTime\]/g,`${i.hour}:${i.minute}:${i.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(d))}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 m(){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 f(i=!1){let c=t(this).attr("data-cdp-btn");1==i&&(c="copy-quick");let n=["copy-quick","copy-custom","copy-custom-link"],d=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(n.includes(c)){let i={type:c};if(c==n[0]){if(i.times=t(".cdp-modal-input-times-tooltip").val(),i.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),i.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),i.swap="2"==t(".cdp-swap").val()?"true":"false",!i.profile||"custom"==i.profile)return t.cdpNotification("warning","Please select settings for this copy."),void w()}else if(c==n[1]||c==n[2]){i.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),i.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),i.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val(),i.swap="2"==t(".cdp-swap").val()?"true":"false",i.custom={};for(let e=0;e<d.length;++e)i.custom[t(d[e]).attr("name")]=t(d[e]).is(":checked")}if(isNaN(parseInt(i.times))||parseInt(i.times)<=0)return void t.cdpNotification("warning","You need to insert positive number for copies.");i.profile&&!["custom","clear","custom_named"].includes(i.profile)||(i.profile=o),z(),function(e=(()=>{})){window.onbeforeunload=(()=>"Copy in progress..."),$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",origin:"tooltip",id:[e],data:i},timeout:0}).done(function(e){w(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error","Something went wrong and we couldn't copy this post – please try again!"):c==n[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",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)):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error","Something went wrong and we couldn't copy this post. – See dev console for more info."),w(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification("Couldn't recognize that button, please try again.")}function g(e,i=!1){let c=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),n=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),d=c.length>1?t(t(c[1])):t(t(c[0]));t(c[1])&&t(c[1])||(null==t(c[1])&&t(c[0])?d=t(t(c[0])):null==t(c[0])&&t(c[1])&&(d=t(t(c[1]))));let p=d.val();0==e&&(p=i),"custom_named"==p?c.val("custom_named"):"custom"==p||null==p||null==p?c.val("custom"):"clear"==p?(0!=e&&e.preventDefault(),n.prop("checked",!1),c.val("custom")):!["clear","custom","custom_named"].includes(p)&&p.length>=1?v(p,function(e){for(let o in e)"object"!=typeof o&&t(`.cdp-input-dynamic[name="${o}"]`).prop("checked",y(e[o]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning","Unable to recognize selected profile, please try again.")),0==e&&c.val(p),["clear","custom","custom_named"].includes(p)||(o=p),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function v(e="default",o){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",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","Profile you selected is just empty, please update this profile or use custom settings!");let e={},i=t(".cdp-modal-option-r");for(let o=0;o<i.length;o++)e[t(i[o]).attr("name")]=t(i[o]).is(":checked");o(!1)}else o(e)}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't get profile settings. – Check console for more details"),console.log("Copy & Delete Post – Error"),console.log(e),console.log("––––––––––––––––––––––––––"),o(!1)})}function b(){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 w(e=(()=>{})){window.onbeforeunload=null,$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),e(!0)})}function x(){let e=t(".cdp-profile-selected").val();var o,i;v(e,c=>{if(t.isJsonString(c)||"object"==typeof c){"object"!=typeof c&&(c=JSON.parse(c));let n=["usmplugin","yoast","woo"];for(k in c)"names"==k?(t(".cdp-names-prefix").html(c[k].prefix),t(".cdp-names-suffix").html(c[k].suffix),"3"!=c[k].format||l||(c[k].format="1"),t(".cdp-date-picked").val(c[k].format),t(".cdp-custom-date-picking").val(c[k].custom)):(!n.includes(k)||n.includes(k)&&l&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==c[k]);cdp_tooltips_update_content(),u(),m(),l&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),T(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),o=e,i=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"set_default_profile",selection:o}).done(t=>{i(t)}).fail(()=>{i(!1)})}else t.cdpNotification("warning","There was an error while getting data from server, please try again.")})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,o=t(".cdp-input-d-id:checked").length;o==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(o),$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"),o=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),o.addClass("cdp-del")}()}function _(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"give_me_current_tasks"}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),"success"==o.status&&e(o.tasks)})}function C(e){let o=0,i=+new Date/1e3,c=t(".cdp-dd-item");for(let i=0;i<c.length;++i){e[t(c[i]).attr("data-token")]||t(c[i]).remove(),o++}for(task in e){let c=e[task],n=t(t(`.cdp-dd-item[data-token="${task}"]`)[0]);if(0==c.done){if(n.hasClass("cdp-dd-ud"))continue;{n.remove();let e=i-c.done>=86400;t(".cdp-dd-undone-list").append(D(c.shown,task,e,c.f)),o++}}else{if(n.hasClass("cdp-dd-d"))continue;n.remove(),t(".cdp-dd-done-list").append(S(c.shown,task,c.f)),o++}}(o>0||0==c.length)&&function(){let e=t(".cdp-dd-item").length,o=t(".cdp-dd-d").length,i=t(".cdp-dd-ud").length;o<=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()),i<=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 T(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let o=t($trs[e]);o.find("input").is(":checked")?o.addClass("cdp-selected-tr-opt"):o.removeClass("cdp-selected-tr-opt")}}function j(e){if(t(".cdp-modal").is(":visible"))return;let o=window;0!=t("#wpbody").scrollTop()&&(o="#wpbody");let i=t(o).scrollTop()+2;i<=0&&(i=2),"click"!=e.type&&t(".nice-select, .nice-select .list").css({transition:"all 0s"}),t(".nice-select .list").css({"margin-top":`${-i}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(d),d=setTimeout(()=>{t(".nice-select .list").css({transition:""})},100),clearTimeout(n),n=setTimeout(()=>{let i=t(o).scrollTop()+2;i<=0&&(i=2),"click"!=e.type&&t(".nice-select .list").css({transition:"all 0s !important"}),t(".nice-select .list").css({"margin-top":`${-i}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(d),d=setTimeout(()=>{t(".nice-select .list").css({transition:""})},100)},100)}function P(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),o=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||o?t(".cdp-no-empty-text").html("<b>including</b> empty"):t(".cdp-no-empty-text").html("only if <u><b>not</b></u> empty")}function N(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),r("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"}).done(e=>{"error"==e&&t.cdpNotification("error","Something went wrong and we couldn't save intro settings!")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't save intro settings.")})}),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"),o=t(".cdp-other-inputs"),i=t(".cdp-profile-selected").val(),c=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),n=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),d={names:{prefix:c,suffix:n,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:{}},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 o=0;o<e.length;o++)d[t(e[o]).attr("data-cdp-opt")]=!!t(e[o]).is(":checked");for(let e=0;e<o.length;e++)p.others[t(o[e]).attr("name")]=!!t(o[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"save_options",options:d,profile:i,entire:p}).done(e=>{"success"==e?t.cdpNotification("success","All your settings were saved!",2e3):"error"==e?t.cdpNotification("error","Something went wrong and we couldn't save your settings."):t.cdpNotification("success","All your settings were saved!",2e3)}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't save your settings. – Please check console for more info."),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again"}).done(e=>{"error"==e&&t.cdpNotification("error","Something went wrong and we couldn't update intro settings – try again!")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't update intro settings. – Please check console for more info.")}),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",r),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,o){if(o)return;let i=t(this).text();" "!=i[0]&&(i="&nbsp;"+i);" "!=i[i.length-1]&&(i+="&nbsp;");t(this).html(i),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),u()},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")]),u(),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"),o=t(this).text(),i="12";"V"==o[0]?i="-51":"D"==o[0]&&(i="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning","Please enter license key, currently it is empty.");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_love_squirrels",rat:e.val(),m:i}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),console.log(o),"success"==o.status?"valid"==o.data.license?(t.cdpNotification("success","License is already active, let us reload the page!"),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==o.data.license?(t.cdpNotification("success","License is valid, press the button again to activate!"),e.prop("disabled",!0),t(this).text("Activate")):void 0!==o.data&&void 0!==o.data.msg?(t.cdpNotification("success",o.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning","Unknown response, please try refresh the page!"):"fail"==o.status?t.cdpNotification(o.fail.type,o.fail.msg):t.cdpNotification("error","Something went wrong and we couldn't send request, please try refresh page and try again.")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't send request, are you connected to the internet?")})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",u),t('.cdp-other-options[name="after_copy"]').on("change",m),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")&&g(!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"),o=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==o.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html('Change the type of this copy <span class="cdp-premium-icon cdp-big-icon"></span>')):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&g(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{O()},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",f),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){g(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val("custom_named"),cdp_tooltips_update_content(),g(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",b),t("body").on("change",".cdp-modal-input-times",b),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",x),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,o=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,i=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+o+i>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,o=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,n=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+o+n<=0?t.cdpNotification("error","Please, check for: which duplicates you are looking for"):null==c?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_all_posts"}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),e(o)}).fail(o=>{t.cdpNotification("error","Something went wrong and we couldn't get post list. – Please check console for more info."),console.log(o),e(!1)})}(t=>{0!=t&&p(t)}):p(c);function d(t,e){let o=parseInt(e[e.length-1]);for(let i=e.length;i>=0&&(o=parseInt(e[i-1]),ext=!1,t.posts.findIndex(t=>t.ID==o)>=0?ext=!0:t.pages.findIndex(t=>t.ID==o)>=0?ext=!0:t.custom.findIndex(t=>t.ID==o)>=0?ext=!0:o=!1,1!=ext);--i);return o}function p(e){let o={posts:[],pages:[],custom:[]},n={},p={};null!=c&&(o=c);let h=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),m=!!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"),y=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),v=!!t('.cdp-d-option[name="cdp-d-c-excerpt"]').is(":checked"),b=!!t('.cdp-d-option[name="cdp-d-c-count"]').is(":checked"),w=t('.cdp-d-option-select[name="cdp-d-d-sel-which"]').val(),x=null,k=null;if(h+m+f>1&&(x=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(k="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==c)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 i=e.meta[post.ID]._cdp_origin,c=e.meta[post.ID]._cdp_counter,n=r(post.post_content),s={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(n),origin:"object"==typeof i&&d(e,i),counter:"object"==typeof c&&c[c.length-1]};if(l&&t.cdp.isPremium()&&(s.content=t.cdp.premium.prepareAdvanced(n),s.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof i){let t=parseInt(i[i.length-1]);void 0===p[t]?p[t]=1:p[t]++}o[post_type].push(s)}o=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}(o),null==c&&(c=o);let _=[],C=[],T=!1,j=0,P=0,N=[],D=[],S=[];if("2"==x){j=1;let t=[],e=[],i=[];1==h&&(t=o.posts),1==m&&(e=o.pages),1==f&&(i=o.custom),_=(_=[].concat(t,e,i)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),C=M(_)}else{let t=[],e=[],i=[];1==h&&(j+=1),1==m&&(j+=1),1==f&&(j+=1),o.posts=o.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(t=M(o.posts)),o.pages=o.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(e=M(o.pages)),o.custom=o.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(i=M(o.custom)),C=[].concat(t,e,i)}function Q(e){1==++P&&(N=e),2==P&&(D=e),3==P&&(S=e),P==j&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((o=e[post],t(`<tr data-id="${o.id}">\n <td><input type="checkbox" id="cdp_in_${o.id}" class="cdp-input-d-id" name="${o.id}"/></td>\n <td><label for="cdp_in_${o.id}">${o.title}</label></td>\n <td><a href="${o.url}" target="_blank">${""!=o.slug?o.slug:o.url}</a></td>\n <td>${o.type}</td>\n <td>${o.date.slice(0,-8)}</td>\n <td>${o.words}</td>\n </tr>`)));var o;if("1"==w)for(parent in n)for(child in n[parent])t(`.cdp-input-d-id[name="${n[parent][child]}"]`).prop("checked",!0);else if("2"==w)for(parent in n){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...n[parent]);for(child in n[parent])n[parent][child]!=e&&t(`.cdp-input-d-id[name="${n[parent][child]}"]`).prop("checked",!0)}else"3"==w&&t(".cdp-input-d-id").prop("checked",!0);s=n,a=w;let c=!(g||y||v||b),d=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;c&&d+p+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),i.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html('You did not select any filter.<br>Click <a href="#" class="cdp-show-the-copies">here</a> to show all copies (of the selected post type) made by this plugin.'),t('[data-empty-info="true"]').addClass("cdp-customized")):i.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning","No posts/pages meeting the current filter conditions."),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))}(C=[].concat(N,D,S))}function M(e){let o=[],i=[],c=!(g||y||v||b);if(!e)return o;function d(t){for(let e=0;e<t.length;e++){let o=t[e];if(!i.includes(o.id))for(let n=c?0:e;n<t.length;n++){if(!t[n])continue;if(i.includes(t[n].id))continue;if(n==e)continue;let d=1==g&&(o.title==t[n].title||1==k&&o.id==t[n].origin&&t[n].date==t[n].edit),s=1==y&&I(o.slug,t[n].slug)>=.85,a=!1;a=1==d||1==s?1==v&&(""==o.excerpt||o.excerpt==t[n].excerpt):1==v&&""!=o.excerpt&&o.excerpt==t[n].excerpt;let l=1==b&&o.words==t[n].words,r=1==c&&o.id==t[n].origin&&t.findIndex(e=>e.origin==t[n].id)<=-1;!d&&g||!s&&y||!a&&v||!l&&b||!r&&c||(p(o,!0,!1),p(t[n],!1,o.id))}}Q(o)}function p(t,e=!1,c=!1){i.includes(t.id)||(1==e?n[t.id]=[]:0!=c&&n[c].push(t.id),i.push(t.id),o.push(t))}l&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_authors"}).done(o=>{if(t.isJsonString(o)&&(o=t.cdpParse(o)),"success"===o.status){let i=o.users;d(e=t.cdp.premium.advancedfilter(e,i))}else!1===T&&(t.cdpNotification("info","Cannot connect to the server, premium filters will not be applied."),T=!0),d(e)}).fail(()=>{!1===T&&(t.cdpNotification("info","Cannot connect to the server, premium filters will not be applied."),T=!0),d(e)}):d(e)}}function r(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()),o=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(o++,t(this).parents("tr").addClass("cdp-del")):(o--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(o),o==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 o=0;o<e.length;++o){if(!t(e[o]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}o==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 o=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),i=t(".cdp-d-checkbox-all").is(":checked"),c=t(".cdp-input-d-id:visible"),n=0;for(let e=0;e<c.length;++e)t(c[e]).is(":checked")&&!i?n--:!t(c[e]).is(":checked")&&i&&n++,t(c[e]).prop("checked",i);let d=parseInt(t(".cdp-t-d-ct").text())+n;t(".cdp-t-d-ct").text(d),d==o?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()),o=parseInt(t(".cdp-t-d-ct").text()),i=!0;e==o&&(i=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",i);t(".cdp-t-d-ct").text(1==i?e:"0"),0==i?(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(o=!1,n=null,d=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning","Please check that you completed all steps, before this task!");let p=[];if(null===n){let e=t(".cdp-input-d-id:checked");for(let o=0;o<e.length;++o)p.push(parseInt(t(e[o]).attr("name")));if(0==p.length)return void t.cdpNotification("warning","Nothing to do here, please select at least one post to delete.")}else p=n;let u=t(".cdp-d-throttling").val(),h=t(".cdp-d-throttling-count").val(),m=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,y="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==u&&(!h||0==h||""==h))return void t.cdpNotification("warning","You have wrong count in throttling field, please fix.");l&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(p.length>801&&!0!==o){let t=Math.ceil(p.length/800);for(let o=0,i=!0;o<t;++o)o==t-1&&(i=!1),e(i,p.slice(800*o,800*o+800),o);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",ids:p,throttling:u,thc:h,redi:m,thrs:f,auit:y,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=c.posts.filter(t=>!p.includes(t.id)),n=c.pages.filter(t=>!p.includes(t.id)),s=c.custom.filter(t=>!p.includes(t.id));c={posts:e,pages:n,custom:s},!0!==o&&i.refresh(),$(),0==d&&t.cdpNotification("success","Deletion process started, you can close this page now and wait till the process ends!"),_(C),!0!==o&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),r("true",$col))}else!0!==o&&t.cdpNotification("error",`Something went wrong and we couldn't setup the deletion task. ${"1"==u?"– Please try without throttling.":""}`)}).fail(e=>{!0!==o&&t.cdpNotification("error","Something went wrong and we couldn't setup the deletion task. – Please check console for more info."),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",u),t("body").on("mouseover",".cdp-tooltip-copy",function(){t(this).hasClass("tooltipstered")||(t(this).tooltipster({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:Q,functionReady:M,functionAfter:A,functionFormat:L}),t(this).tooltipster("open"))}),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 o=0;o<$trs.length;++o){$tr=t($trs[o]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let i=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))i=!0;else{if(!$url.includes(e[t])){i=!1;break}i=!0}0==i&&$tr.attr("data-ignore","true")}clearTimeout(p),p=setTimeout(()=>{i.refresh()},20)}),t("body").on("change",".cdp-data-set",T),t("#wpbody").on("scroll",j),t(window).on("scroll",j),t("body").on("click",".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"),i.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();i.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',P),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',P),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]),o=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 i=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":i+"px",opacity:1},500,function(){let e=t(".cdp-d-section").height();t(".cdp-d-section").css({height:e+"px","max-height":e+"px"})}),t(".cdp-d-section").css({height:"","max-height":""}),o.css({"max-height":o.height()+"px",opacity:1}),o.animate({"max-height":"0px",opacity:0},500,function(){o.hide()}),setTimeout(()=>{o.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let c=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-c},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(),z(),r("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-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").tooltipster("content","Change it to (Name of original)")):(t(".cdp-togglable-name-b").text("(Name of original)"),t(".cdp-togglable-name-b").tooltipster("content","Change it to blank"));u()}),t(".cdp-select").niceSelect(),t(".cdp-tooltip").tooltipster({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:["tooltipster-noir","tooltipster-noir-customized"],repositionOnScroll:!0,functionReady:O}),t("#cdp-d-table").length>0&&(i=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">No items to show, try with other filters!</div>'})),t(".cdp-copy-button").on("mouseup",function(){f(!0)});let D=(e,o,i,c)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}" data-token="${o}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left${1==i?" cdp-red":""}">${"delete"==c?"Deleting Posts":"Copying Posts"}</div>\n <div class="cdp-dropdown-right cdp-noti-kill-btn">Kill</div>\n </div>\n </a>`),S=(e,o,i)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==e?" cdp-bnew-notis":""}" data-token="${o}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left">${"delete"==i?"Deleting Posts":"Copying Posts"}</div>\n <div class="cdp-dropdown-right cdp-noti-hide-btn">Hide</div>\n </div>\n </a>`);function I(t,e){let o=t,i=e;t.length<e.length&&(o=e,i=t);let c=o.length;return 0==c?1:(c-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let o=new Array;for(let i=0;i<=t.length;i++){let c=i;for(let n=0;n<=e.length;n++)if(0==i)o[n]=n;else if(n>0){let d=o[n-1];t.charAt(i-1)!=e.charAt(n-1)&&(d=Math.min(Math.min(d,c),o[n])+1),o[n-1]=c,c=d}i>0&&(o[e.length]=c)}return o[e.length]}(o,i))/parseFloat(c)}function Q(o,i){z(!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 o=t($inputs[e]);if("checkbox"==o.attr("type"))o.is(":checked")?o.attr("checked","checked"):o.removeAttr("checked");else if(t(o).is("select"))if("tooltip-which-profile-first"==t(o).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")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e)},50)}else o.attr("value",o.val())}return cdp_tooltips_update_content(),e=t(i.origin).attr("data-cdp-id"),!0}function M(e,o){$parent=t(o.origin).parents(".row-actions"),$parent.css({left:0});let i=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`Define your copy settings <a href="${i}">here</a>.`,maxWidth:400,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-center"],repositionOnScroll:!0}),l&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:"If you’re on a multisite you can copy it to other sites.",contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'If you’re on a multisite you can copy it to other sites with the Premium Plugin. <a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This feature will come soon as part of the Premium Plugin. You can <a href="https://sellcodes.com/CylMIdJD" target="_blank">pre-order now</a> at a <b>huge discount</b>.',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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-4").tooltipster("content",'You can copy it to other sites with the Premium Plugin.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>'),O(),cdp_tooltips_update_content())}function A(e,o){return $parent=t(o.origin).parents(".row-actions"),$parent.css({left:""}),!1}function L(){return t(t(".cdp-tooltip-content").html())}function O(){setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].reposition()},10)}function z(e=!1){if(e){let e=t.tooltipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{_(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,o){$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(o.helper).attr("data-cdp-val")]}`),u()}}),"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"),o=t("#cdp-original-post").attr("data-cdp-parent-url");t("#titlediv").find(".inside").append(t(`<div style="padding-left: 10px">This post is a duplicate of <a href="${o}" target="_blank">${e}</a></div>`))}t(".cdp-preloader-c").length>0&&(u(),m(),x(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let o=0;o<e.length;o++){let i=t(`#${t(e[o]).attr("data-box")}`);i.show(),i.css({"max-height":"",height:""});let c=i.height();t(c).css({"max-height":c+"px",height:c+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery(".cdp-container").animate({opacity:1},300);const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This feature will come soon as part of the Premium Plugin. You can <a href="https://sellcodes.com/CylMIdJD" target="_blank">pre-order now</a> at a <b>huge discount</b>.',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:"If you’re on a multisite you can copy it to other sites.",contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'If you’re on a multisite you can copy it to other sites with the Premium Plugin. <a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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").tooltipster("content",'You can copy it to other sites with the Premium Plugin.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>'),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",o=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(o=parseInt(jQuery(e).attr("data-top")));jQuery(e).tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:o,side:"top",content:'This feature will come soon as part of the Premium Plugin. You can <a href="https://sellcodes.com/CylMIdJD" target="_blank">pre-order now</a> at a <b>huge discount</b>.',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),i=e,jQuery(i).addClass("cdp-premium-element"),jQuery(i).find("input, select").prop("disabled",!0);var i}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let o=t.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(i)}}if(t.support.touch="ontouchend"in document,t.support.touch){let o,i=t.ui.mouse.prototype,c=i._mouseInit,n=i._mouseDestroy;i._touchStart=function(t){!o&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(o=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},i._touchMove=function(t){o&&(this._touchMoved=!0,e(t,"mousemove"))},i._touchEnd=function(t){o&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),o=!1)},i._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),c.call(e)},i._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)}}}(jQuery);
1
+ function cdp_tooltips_update_content(){if(jQuery("select").niceSelect("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],o=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(o=parseInt(jQuery(e).attr("data-top"))),jQuery(e).tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:o,side:"top",content:'This is a Premium Feature.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Check it out and upgrade today</a>,<br>we made it <b>really affordable!</b>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This is a Premium Feature.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Check it out and upgrade today</a>,<br>we made it <b>really affordable!</b>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return"Are you REALLY sure?";console.log("You're crazy! – Here is the output:");let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"debug_function"}).done(t=>{console.log(t),console.log("–––––––––––––- END OF THE DEBUG OUTPUT –––––––––––––- ")})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,o="default",i=null,c=null,n=null,d=null,p=null,s=null,a=null;const l=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function r(e=null,o=!1){let i=this;"string"==typeof e&&(i=`.${e}`),0!=o&&(i=o),$parent=t(t(i).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 u(){let e=t(".cdp-names-prefix").text(),o=t(".cdp-names-suffix").text(),i={year:(c=new Date).getFullYear(),month:("0"+(c.getMonth()+1)).slice(-2),day:c.getDate()<=9?"0"+c.getDate():c.getDate(),hour:c.getHours()<=9?"0"+c.getHours():c.getHours(),minute:c.getMinutes()<=9?"0"+c.getMinutes():c.getMinutes(),second:c.getSeconds()<=9?"0"+c.getSeconds():c.getSeconds(),week:c.getDay()};var c;let n="(blank)"==t(".cdp-togglable-name-b").text()?"":"(Name of original)",d=`${e.trim()} ${n} ${o.trim()}`;d=d.replace(/\[Counter\]/g,"2");let p=t(".cdp-date-picked").val();"1"==p?d=d.replace(/\[CurrentDate\]/g,`${i.month}/${i.day}/${i.year}`):"2"==p?d=d.replace(/\[CurrentDate\]/g,`${i.day}/${i.month}/${i.year}`):"3"==p&&function(e){let o=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_formatted_time",format:o}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{d=d.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(d),d=(d=d.replace(/\[CurrentTime\]/g,`${i.hour}:${i.minute}:${i.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(d)}),"3"!=p&&(d=(d=d.replace(/\[CurrentTime\]/g,`${i.hour}:${i.minute}:${i.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(d))}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 m(){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 f(i=!1){let c=t(this).attr("data-cdp-btn");1==i&&(c="copy-quick");let n=["copy-quick","copy-custom","copy-custom-link"],d=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(n.includes(c)){let i={type:c};if(c==n[0]){if(i.times=t(".cdp-modal-input-times-tooltip").val(),i.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),i.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),i.swap="2"==t(".cdp-swap").val()?"true":"false",!i.profile||"custom"==i.profile)return t.cdpNotification("warning","Please select settings for this copy."),void x()}else if(c==n[1]||c==n[2]){i.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),i.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),i.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val(),i.swap="2"==t(".cdp-swap").val()?"true":"false",i.custom={};for(let e=0;e<d.length;++e)i.custom[t(d[e]).attr("name")]=t(d[e]).is(":checked")}if(isNaN(parseInt(i.times))||parseInt(i.times)<=0)return void t.cdpNotification("warning","You need to insert positive number for copies.");i.profile&&!["custom","clear","custom_named"].includes(i.profile)||(i.profile=o),z(),function(e=(()=>{})){window.onbeforeunload=(()=>"Copy in progress..."),$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",origin:"tooltip",id:[e],data:i},timeout:0}).done(function(e){x(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error","Something went wrong and we couldn't copy this post – please try again!"):c==n[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",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)):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error","Something went wrong and we couldn't copy this post. – See dev console for more info."),x(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification("Couldn't recognize that button, please try again.")}function g(e,i=!1){let c=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),n=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),d=c.length>1?t(t(c[1])):t(t(c[0]));t(c[1])&&t(c[1])||(null==t(c[1])&&t(c[0])?d=t(t(c[0])):null==t(c[0])&&t(c[1])&&(d=t(t(c[1]))));let p=d.val();0==e&&(p=i),"custom_named"==p?c.val("custom_named"):"custom"==p||null==p||null==p?c.val("custom"):"clear"==p?(0!=e&&e.preventDefault(),n.prop("checked",!1),c.val("custom")):!["clear","custom","custom_named"].includes(p)&&p.length>=1?v(p,function(e){for(let o in e)"object"!=typeof o&&t(`.cdp-input-dynamic[name="${o}"]`).prop("checked",y(e[o]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning","Unable to recognize selected profile, please try again.")),0==e&&c.val(p),["clear","custom","custom_named"].includes(p)||(o=p),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function v(e="default",o){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",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","Profile you selected is just empty, please update this profile or use custom settings!");let e={},i=t(".cdp-modal-option-r");for(let o=0;o<i.length;o++)e[t(i[o]).attr("name")]=t(i[o]).is(":checked");o(!1)}else o(e)}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't get profile settings. – Check console for more details"),console.log("Copy & Delete Post – Error"),console.log(e),console.log("––––––––––––––––––––––––––"),o(!1)})}function b(){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(()=>{L()},310)}function x(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 o,i;v(e,c=>{if(t.isJsonString(c)||"object"==typeof c){"object"!=typeof c&&(c=JSON.parse(c));let n=["usmplugin","yoast","woo"];for(k in c)"names"==k?(t(".cdp-names-prefix").html(c[k].prefix),t(".cdp-names-suffix").html(c[k].suffix),"3"!=c[k].format||l||(c[k].format="1"),t(".cdp-date-picked").val(c[k].format),t(".cdp-custom-date-picking").val(c[k].custom)):(!n.includes(k)||n.includes(k)&&l&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==c[k]);cdp_tooltips_update_content(),u(),m(),l&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),T(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),o=e,i=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"set_default_profile",selection:o}).done(t=>{i(t)}).fail(()=>{i(!1)})}else t.cdpNotification("warning","There was an error while getting data from server, please try again.")})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,o=t(".cdp-input-d-id:checked").length;o==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(o),$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"),o=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),o.addClass("cdp-del")}()}function _(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"give_me_current_tasks"}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),"success"==o.status&&e(o.tasks)})}function C(e){let o=0,i=+new Date/1e3,c=t(".cdp-dd-item");for(let i=0;i<c.length;++i){e[t(c[i]).attr("data-token")]||t(c[i]).remove(),o++}for(task in e){let c=e[task],n=t(t(`.cdp-dd-item[data-token="${task}"]`)[0]);if(0==c.done){if(n.hasClass("cdp-dd-ud"))continue;{n.remove();let e=i-c.done>=86400;t(".cdp-dd-undone-list").append(P(c.shown,task,e,c.f)),o++}}else{if(n.hasClass("cdp-dd-d"))continue;n.remove(),t(".cdp-dd-done-list").append(S(c.data,c.shown,task,c.f)),o++}}(o>0||0==c.length)&&function(){let e=t(".cdp-dd-item").length,o=t(".cdp-dd-d").length,i=t(".cdp-dd-ud").length;o<=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()),i<=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 T(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let o=t($trs[e]);o.find("input").is(":checked")?o.addClass("cdp-selected-tr-opt"):o.removeClass("cdp-selected-tr-opt")}}function j(e){if(t(".cdp-modal").is(":visible"))return;let o=window;0!=t("#wpbody").scrollTop()&&(o="#wpbody");let i=t(o).scrollTop()+2;i<=0&&(i=2),"click"!=e.type&&t(".nice-select, .nice-select .list").css({transition:"all 0s"}),t(".nice-select .list").css({"margin-top":`${-i}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(d),d=setTimeout(()=>{t(".nice-select .list").css({transition:""})},100),clearTimeout(n),n=setTimeout(()=>{let i=t(o).scrollTop()+2;i<=0&&(i=2),"click"!=e.type&&t(".nice-select .list").css({transition:"all 0s !important"}),t(".nice-select .list").css({"margin-top":`${-i}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(d),d=setTimeout(()=>{t(".nice-select .list").css({transition:""})},100)},100)}function N(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),o=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||o?t(".cdp-no-empty-text").html("<b>including</b> empty"):t(".cdp-no-empty-text").html("only if <u><b>not</b></u> empty")}function D(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),r("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"}).done(e=>{"error"==e&&t.cdpNotification("error","Something went wrong and we couldn't save intro settings!")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't save intro settings.")})}),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"),o=t(".cdp-other-inputs"),i=t(".cdp-profile-selected").val(),c=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),n=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),d={names:{prefix:c,suffix:n,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:{}},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 o=0;o<e.length;o++)d[t(e[o]).attr("data-cdp-opt")]=!!t(e[o]).is(":checked");for(let e=0;e<o.length;e++)p.others[t(o[e]).attr("name")]=!!t(o[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"save_options",options:d,profile:i,entire:p}).done(e=>{"success"==e?t.cdpNotification("success","All your settings were saved!",2e3):"error"==e?t.cdpNotification("error","Something went wrong and we couldn't save your settings."):t.cdpNotification("success","All your settings were saved!",2e3)}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't save your settings. – Please check console for more info."),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again"}).done(e=>{"error"==e&&t.cdpNotification("error","Something went wrong and we couldn't update intro settings – try again!")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't update intro settings. – Please check console for more info.")}),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",r),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,o){if(o)return;let i=t(this).text();" "!=i[0]&&(i="&nbsp;"+i);" "!=i[i.length-1]&&(i+="&nbsp;");t(this).html(i),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),u()},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")]),u(),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"),o=t(this).text(),i="12";"V"==o[0]?i="-51":"D"==o[0]&&(i="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning","Please enter license key, currently it is empty.");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_love_squirrels",rat:e.val(),m:i}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),"success"==o.status?"valid"==o.data.license?(t.cdpNotification("success","License is already active, let us reload the page!"),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==o.data.license?(t.cdpNotification("success","License is valid, press the button again to activate!"),e.prop("disabled",!0),t(this).text("Activate")):void 0!==o.data&&void 0!==o.data.msg?(t.cdpNotification("success",o.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning","Unknown response, please try refresh the page!"):"fail"==o.status?t.cdpNotification(o.fail.type,o.fail.msg):t.cdpNotification("error","Something went wrong and we couldn't send request, please try refresh page and try again.")}).fail(e=>{t.cdpNotification("error","Something went wrong and we couldn't send request, are you connected to the internet?")})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",u),t('.cdp-other-options[name="after_copy"]').on("change",m),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")&&g(!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"),o=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==o.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html('Change the type of this copy <span class="cdp-premium-icon cdp-big-icon"></span>')):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&g(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{L()},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",f),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){g(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val("custom_named"),cdp_tooltips_update_content(),g(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",b),t("body").on("change",".cdp-modal-input-times",b),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,o=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,i=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+o+i>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,o=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,n=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+o+n<=0?t.cdpNotification("error","Please, check for: which duplicates you are looking for"):null==c?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_all_posts"}).done(o=>{t.isJsonString(o)&&(o=t.cdpParse(o)),e(o)}).fail(o=>{t.cdpNotification("error","Something went wrong and we couldn't get post list. – Please check console for more info."),console.log(o),e(!1)})}(t=>{0!=t&&p(t)}):p(c);function d(t,e){let o=parseInt(e[e.length-1]);for(let i=e.length;i>0&&(o=parseInt(e[i-1]),ext=!1,t.posts.findIndex(t=>t.ID==o)>=0?ext=!0:t.pages.findIndex(t=>t.ID==o)>=0?ext=!0:t.custom.findIndex(t=>t.ID==o)>=0?ext=!0:o=!1,1!=ext);--i);return o}function p(e){let o={posts:[],pages:[],custom:[]},n={},p={};null!=c&&(o=c);let h=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),m=!!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"),y=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),v=!!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,w=null;if(h+m+f>1&&(k=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(w="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==c)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 i=e.meta[post.ID]._cdp_origin,c=e.meta[post.ID]._cdp_counter,n=e.meta[post.ID]._cdp_origin_title,s=r(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 i&&d(e,i),counter:"object"==typeof c&&c[c.length-1],origin_title:"object"==typeof n&&n[0]};if(l&&t.cdp.isPremium()&&(a.content=t.cdp.premium.prepareAdvanced(s),a.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof i){let t=parseInt(i[i.length-1]);void 0===p[t]?p[t]=1:p[t]++}o[post_type].push(a)}o=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}(o),null==c&&(c=o);let _=[],C=[],T=!1,j=0,N=0,D=[],P=[],S=[];if("2"==k){j=1;let t=[],e=[],i=[];1==h&&(t=o.posts),1==m&&(e=o.pages),1==f&&(i=o.custom),_=(_=[].concat(t,e,i)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),C=M(_)}else{let t=[],e=[],i=[];1==h&&(j+=1),1==m&&(j+=1),1==f&&(j+=1),o.posts=o.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(t=M(o.posts)),o.pages=o.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(e=M(o.pages)),o.custom=o.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(i=M(o.custom)),C=[].concat(t,e,i)}function Q(e){1==++N&&(D=e),2==N&&(P=e),3==N&&(S=e),N==j&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((o=e[post],t(`<tr data-id="${o.id}">\n <td><input type="checkbox" id="cdp_in_${o.id}" class="cdp-input-d-id" name="${o.id}"/></td>\n <td><label for="cdp_in_${o.id}">${o.title}</label></td>\n <td><a href="${o.url}" target="_blank">${""!=o.slug?o.slug:o.url}</a></td>\n <td>${o.type}</td>\n <td>${o.date.slice(0,-8)}</td>\n <td>${o.words}</td>\n </tr>`)));var o;if("1"==x)for(parent in n)for(child in n[parent])t(`.cdp-input-d-id[name="${n[parent][child]}"]`).prop("checked",!0);else if("2"==x)for(parent in n){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...n[parent]);for(child in n[parent])n[parent][child]!=e&&t(`.cdp-input-d-id[name="${n[parent][child]}"]`).prop("checked",!0)}else"3"==x&&t(".cdp-input-d-id").prop("checked",!0);s=n,a=x;let c=!(g||y||v||b),d=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;c&&d+p+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),i.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html('You did not select any filter.<br>Click <a href="#" class="cdp-show-the-copies">here</a> to show all copies (of the selected post type) made by this plugin.'),t('[data-empty-info="true"]').addClass("cdp-customized")):i.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning","No posts/pages meeting the current filter conditions."),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))}(C=[].concat(D,P,S))}function M(e){let o=[],i=[],c=!(g||y||v||b);if(!e)return o;function d(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 o=t[e];if(!i.includes(o.id))for(let n=c?0:e;n<t.length;n++){if(!t[n])continue;if(i.includes(t[n].id))continue;if(n==e)continue;let p=1==g&&(o.title==t[n].title||1==w&&d(o,t[n])),a=1==y&&I(o.slug,t[n].slug)>=.85,l=!1;l=1==p||1==a?1==v&&(""==o.excerpt||o.excerpt==t[n].excerpt):1==v&&""!=o.excerpt&&o.excerpt==t[n].excerpt;let r=1==b&&o.words==t[n].words,u=1==c&&o.id==t[n].origin&&t.findIndex(e=>e.origin==t[n].id)<=-1;!p&&g||!a&&y||!l&&v||!r&&b||!u&&c||(s(o,!0,!1),s(t[n],!1,o.id))}}Q(o)}function s(t,e=!1,c=!1){i.includes(t.id)||(1==e?n[t.id]=[]:0!=c&&n[c].push(t.id),i.push(t.id),o.push(t))}l&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_authors"}).done(o=>{if(t.isJsonString(o)&&(o=t.cdpParse(o)),"success"===o.status){let i=o.users;p(e=t.cdp.premium.advancedfilter(e,i))}else!1===T&&(t.cdpNotification("info","Cannot connect to the server, premium filters will not be applied."),T=!0),p(e)}).fail(()=>{!1===T&&(t.cdpNotification("info","Cannot connect to the server, premium filters will not be applied."),T=!0),p(e)}):p(e)}}function r(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()),o=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(o++,t(this).parents("tr").addClass("cdp-del")):(o--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(o),o==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 o=0;o<e.length;++o){if(!t(e[o]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}o==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 o=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),i=t(".cdp-d-checkbox-all").is(":checked"),c=t(".cdp-input-d-id:visible"),n=0;for(let e=0;e<c.length;++e)t(c[e]).is(":checked")&&!i?n--:!t(c[e]).is(":checked")&&i&&n++,t(c[e]).prop("checked",i);let d=parseInt(t(".cdp-t-d-ct").text())+n;t(".cdp-t-d-ct").text(d),d==o?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()),o=parseInt(t(".cdp-t-d-ct").text()),i=!0;e==o&&(i=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",i);t(".cdp-t-d-ct").text(1==i?e:"0"),0==i?(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(o=!1,n=null,d=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning","Please check that you completed all steps, before this task!");let p=[];if(null===n){let e=t(".cdp-input-d-id:checked");for(let o=0;o<e.length;++o)p.push(parseInt(t(e[o]).attr("name")));if(0==p.length)return void t.cdpNotification("warning","Nothing to do here, please select at least one post to delete.")}else p=n;let u=t(".cdp-d-throttling").val(),h=t(".cdp-d-throttling-count").val(),m=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,y="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==u&&(!h||0==h||""==h))return void t.cdpNotification("warning","You have wrong count in throttling field, please fix.");l&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(p.length>801&&!0!==o){let t=Math.ceil(p.length/800);for(let o=0,i=!0;o<t;++o)o==t-1&&(i=!1),e(i,p.slice(800*o,800*o+800),o);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",ids:p,throttling:u,thc:h,redi:m,thrs:f,auit:y,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=c.posts.filter(t=>!p.includes(t.id)),n=c.pages.filter(t=>!p.includes(t.id)),s=c.custom.filter(t=>!p.includes(t.id));c={posts:e,pages:n,custom:s},!0!==o&&i.refresh(),$(),0==d&&t.cdpNotification("success","Deletion process started, you can close this page now and wait till the process ends!"),_(C),!0!==o&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),r("true",$col))}else!0!==o&&t.cdpNotification("error",`Something went wrong and we couldn't setup the deletion task. ${"1"==u?"– Please try without throttling.":""}`)}).fail(e=>{!0!==o&&t.cdpNotification("error","Something went wrong and we couldn't setup the deletion task. – Please check console for more info."),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",u),t("body").on("mouseover",".cdp-tooltip-copy",function(){t(this).hasClass("tooltipstered")||(t(this).tooltipster({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:Q,functionReady:M,functionAfter:A,functionFormat:O}),t(this).tooltipster("open"))}),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 o=0;o<$trs.length;++o){$tr=t($trs[o]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let i=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))i=!0;else{if(!$url.includes(e[t])){i=!1;break}i=!0}0==i&&$tr.attr("data-ignore","true")}clearTimeout(p),p=setTimeout(()=>{i.refresh()},20)}),t("body").on("change",".cdp-data-set",T),t("#wpbody").on("scroll",j),t(window).on("scroll",j),t("body").on("click",".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"),i.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();i.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',N),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',N),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]),o=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 i=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":i+"px",opacity:1},500,function(){let e=t(".cdp-d-section").height();t(".cdp-d-section").css({height:e+"px","max-height":e+"px"})}),t(".cdp-d-section").css({height:"","max-height":""}),o.css({"max-height":o.height()+"px",opacity:1}),o.animate({"max-height":"0px",opacity:0},500,function(){o.hide()}),setTimeout(()=>{o.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let c=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-c},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(),z(),r("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-close-chapter",D),t("body").on("click",".cdp-save-options",D),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").tooltipster("content","Change it to (Name of original)")):(t(".cdp-togglable-name-b").text("(Name of original)"),t(".cdp-togglable-name-b").tooltipster("content","Change it to blank"));u()}),t(".cdp-select").niceSelect(),t(".cdp-tooltip").tooltipster({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:["tooltipster-noir","tooltipster-noir-customized"],repositionOnScroll:!0,functionReady:L}),t("#cdp-d-table").length>0&&(i=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">No items to show, try with other filters!</div>'})),t(".cdp-copy-button").on("mouseup",function(){f(!0)});let P=(e,o,i,c)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}" data-token="${o}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left${1==i?" cdp-red":""}">${"delete"==c?"Deleting Posts":"Auto Cleaning-up"}</div>\n <div class="cdp-dropdown-right cdp-noti-kill-btn">Kill</div>\n </div>\n </a>`),S=(e,o,i,c)=>{let n="",d="";return void 0!==e&&(void 0!==e["formated-date"]&&(n=e["formated-date"]),void 0!==e.text&&(d=e.text),""!=d&&(d='data-ftext="'+d+'" '),""!=n&&(n='data-fdate="Completed at '+n+'" ')),t(`<a ${n}${d}class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==o?" cdp-bnew-notis":""}" data-token="${i}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left">${"delete"==c?"Deleted Posts":"Auto Cleaned-up"}</div>\n <div class="cdp-dropdown-right cdp-noti-hide-btn">Hide</div>\n </div>\n </a>`)};function I(t,e){let o=t,i=e;t.length<e.length&&(o=e,i=t);let c=o.length;return 0==c?1:(c-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let o=new Array;for(let i=0;i<=t.length;i++){let c=i;for(let n=0;n<=e.length;n++)if(0==i)o[n]=n;else if(n>0){let d=o[n-1];t.charAt(i-1)!=e.charAt(n-1)&&(d=Math.min(Math.min(d,c),o[n])+1),o[n-1]=c,c=d}i>0&&(o[e.length]=c)}return o[e.length]}(o,i))/parseFloat(c)}function Q(o,i){z(!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 o=t($inputs[e]);if("checkbox"==o.attr("type"))o.is(":checked")?o.attr("checked","checked"):o.removeAttr("checked");else if(t(o).is("select"))if("tooltip-which-profile-first"==t(o).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")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e)},50)}else o.attr("value",o.val())}return cdp_tooltips_update_content(),e=t(i.origin).attr("data-cdp-id"),!0}function M(e,o){$parent=t(o.origin).parents(".row-actions"),$parent.css({left:0});let i=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`Define your copy settings <a href="${i}">here</a>.`,maxWidth:400,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-center"],repositionOnScroll:!0}),l&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:"If you’re on a multisite you can copy it to other sites.",contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'If you’re on a multisite you can copy it to other sites with the Premium Plugin. <a href="https://sellcodes.com/CylMIdJD" target="_blank">Order it now!</a>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This is a Premium Feature.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Check it out and upgrade today</a>,<br>we made it <b>really affordable!</b>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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-4").tooltipster("content",'You can copy it to other sites with the Premium Plugin.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>'),L(),cdp_tooltips_update_content())}function A(e,o){return $parent=t(o.origin).parents(".row-actions"),$parent.css({left:""}),!1}function O(){return t(t(".cdp-tooltip-content").html())}function L(){setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].reposition()},10)}function z(e=!1){if(e){let e=t.tooltipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.tooltipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{_(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,o){$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(o.helper).attr("data-cdp-val")]}`),u()}}),"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"),o=t("#cdp-original-post").attr("data-cdp-parent-url");t("#titlediv").find(".inside").append(t(`<div style="padding-left: 10px">This post is a duplicate of <a href="${o}" target="_blank">${e}</a></div>`))}t(".cdp-preloader-c").length>0&&(u(),m(),w(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let o=0;o<e.length;o++){let i=t(`#${t(e[o]).attr("data-box")}`);i.show(),i.css({"max-height":"",height:""});let c=i.height();t(c).css({"max-height":c+"px",height:c+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery(".cdp-container").animate({opacity:1},300);const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'This is a Premium Feature.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Check it out and upgrade today</a>,<br>we made it <b>really affordable!</b>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:"If you’re on a multisite you can copy it to other sites.",contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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").tooltipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:'If you’re on a multisite you can copy it to other sites with the Premium Plugin. <a href="https://sellcodes.com/CylMIdJD" target="_blank">Order it now!</a>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-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").tooltipster("content",'You can copy it to other sites with the Premium Plugin.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Pre-order it now</a>'),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",o=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(o=parseInt(jQuery(e).attr("data-top")));jQuery(e).tooltipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:o,side:"top",content:'This is a Premium Feature.<br><a href="https://sellcodes.com/CylMIdJD" target="_blank">Check it out and upgrade today</a>,<br>we made it <b>really affordable!</b>',contentAsHTML:!0,maxWidth:290,theme:["tooltipster-noir","tooltipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),i=e,jQuery(i).addClass("cdp-premium-element"),jQuery(i).find("input, select").prop("disabled",!0);var i}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let o=t.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(i)}}if(t.support.touch="ontouchend"in document,t.support.touch){let o,i=t.ui.mouse.prototype,c=i._mouseInit,n=i._mouseDestroy;i._touchStart=function(t){!o&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(o=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},i._touchMove=function(t){o&&(this._touchMoved=!0,e(t,"mousemove"))},i._touchEnd=function(t){o&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),o=!1)},i._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),c.call(e)},i._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)}}}(jQuery);
copy-delete-posts.php CHANGED
@@ -1,773 +1,789 @@
1
- <?php
2
- /**
3
- * Plugin Name: Copy & Delete Posts
4
- * Plugin URI: https://copy-delete-posts.com
5
- * Description: The best solution to easily make duplicates of your posts & pages, and delete them in one go.
6
- * Version: 1.0.6
7
- * Author: Copy Delete Posts
8
- * Author URI: https://copy-delete-posts.com/
9
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
-
11
- // Exit if accessed directly.
12
- if (!defined('ABSPATH')) exit;
13
-
14
- /** –– **\
15
- * Global variables and constants.
16
- * @since 1.0.0
17
- */
18
-
19
- // Plugin constants
20
- define('CDP_VERSION', '1.0.6');
21
- define('CDP_WP_VERSION', get_bloginfo('version'));
22
- define('CDP_SCRIPT_DEBUG', false);
23
- $cdp_plug_url = plugins_url('', __FILE__);
24
-
25
- // Other only admin stuff
26
- if (is_admin()) {
27
-
28
- // Set constant variables for this file
29
- $cdp_dir = dirname(__FILE__);
30
- $cdp_globals = get_option('_cdp_globals');
31
- $cdp_premium = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
32
-
33
- // Try to show error while debugging
34
- if (CDP_SCRIPT_DEBUG === true) {
35
- error_reporting(E_ALL);
36
- ini_set('display_errors', 1);
37
- }
38
-
39
- }
40
-
41
- /** –– **/
42
-
43
- /** –– **\
44
- * Fired on plugin activation.
45
- * @since 1.0.0
46
- */
47
- register_activation_hook(__FILE__, function () {
48
- if (function_exists('activate_plugin')) {
49
- add_option('_cdp_redirect', true);
50
- $cdp_premium_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium';
51
- $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
52
- if (!is_plugin_active($plugin) && is_dir($cdp_premium_path)) activate_plugin($plugin);
53
- }
54
-
55
- if (get_option('_cdp_review', false) == false) {
56
- $review = array(
57
- 'installed' => time(),
58
- 'users' => array()
59
- );
60
-
61
- update_option('_cdp_review', $review);
62
- }
63
-
64
- do_action('cdp_plugin_setup');
65
- });
66
- /** –– **/
67
-
68
- /** –– **\
69
- * Fired on plugin deactivation.
70
- * @since 1.0.0
71
- */
72
- register_deactivation_hook(__FILE__, function () {
73
- if (function_exists('deactivate_plugins')) {
74
- $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
75
- if (is_plugin_active($plugin)) add_action('update_option_active_plugins', function () {
76
- $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
77
- deactivate_plugins($plugin);
78
- });
79
- }
80
- });
81
- /** –– **/
82
-
83
- /** –– **\
84
- * Fired on plugin load and check permissions.
85
- * @since 1.0.0
86
- */
87
- add_action('plugins_loaded', function () {
88
- do_action('cdp_loaded');
89
- });
90
- /** –– **/
91
-
92
- /** –– **\
93
- * Fired on any plugin upgrade (in case if it's ours)
94
- * @since 1.0.6
95
- */
96
- add_action('upgrader_process_complete', function () {
97
- if (get_option('_cdp_review', false) == false) {
98
- $review = array(
99
- 'installed' => time(),
100
- 'users' => array()
101
- );
102
-
103
- update_option('_cdp_review', $review);
104
- }
105
- });
106
- /** –– **/
107
-
108
- /** –– **\
109
- * Include all menus.
110
- * @since 1.0.0
111
- */
112
- add_action('cdp_loaded', function () {
113
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
114
- require_once plugin_dir_path(__FILE__) . 'menu/configuration.php';
115
- require_once plugin_dir_path(__FILE__) . 'menu/tooltips.php';
116
- require_once plugin_dir_path(__FILE__) . 'menu/variables.php';
117
- require_once plugin_dir_path(__FILE__) . 'menu/modal.php';
118
- require_once plugin_dir_path(__FILE__) . 'menu/notifications.php';
119
- require_once plugin_dir_path(__FILE__) . 'post/handler.php';
120
- });
121
- /** –– **/
122
-
123
- /** –– **\
124
- * Admin Init
125
- * @since 1.0.0
126
- */
127
- add_action('admin_init', function () {
128
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
129
-
130
- if (get_option('_cdp_redirect', false)) {
131
- delete_option('_cdp_redirect', false);
132
- wp_redirect(admin_url('admin.php?page=copy-delete-posts'));
133
- }
134
-
135
- global $cdp_premium;
136
- $cdp_premium_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium';
137
- $cdp_premium_ver_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium/version.txt';
138
- if (defined('CDP_PREMIUM_VERSION') && version_compare(CDP_PREMIUM_VERSION, CDP_VERSION, '!=')) {
139
- if (is_plugin_active($cdp_premium)) deactivate_plugins($cdp_premium);
140
- } else {
141
- if (is_dir($cdp_premium_path) && file_exists($cdp_premium_ver_path)) {
142
- $cdp_prem_ver_file = fopen($cdp_premium_ver_path, 'r') or false;
143
- $cdp_prem_ver = fgets($cdp_prem_ver_file);
144
- fclose($cdp_prem_ver_file);
145
-
146
- if ((trim($cdp_prem_ver) == CDP_VERSION) && !is_plugin_active($cdp_premium)) activate_plugin($cdp_premium);
147
- }
148
- }
149
- if (is_plugin_active($cdp_premium) && !file_exists($cdp_premium_ver_path)) {
150
- if (is_plugin_active($cdp_premium)) deactivate_plugins($cdp_premium, true);
151
- }
152
- });
153
- /** –– **/
154
-
155
- /** –– **\
156
- * Setup assets.
157
- * @since 1.0.0
158
- */
159
- add_action('admin_enqueue_scripts', function () {
160
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
161
- if (wp_doing_ajax()) return; global $cdp_plug_url;
162
-
163
- global $pagenow, $post;
164
- $screen = get_current_screen();
165
- $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
166
- $allowed = ['post', 'edit-post', 'toplevel_page_copy-delete-posts', 'edit-page', 'page'];
167
- $at = ($screen->id != 'attachment');
168
-
169
- $g = get_option('_cdp_globals');
170
- if ($g['others']) $g = $g['others'];
171
- else $g = cdp_default_global_options();
172
-
173
- if (is_object($post)) $type = $post->post_type;
174
- else $type = false;
175
-
176
- $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
177
- wp_enqueue_style('cdp-css-global', "{$cdp_plug_url}/assets/css/cdp-global{$min}.css", '', $ver);
178
- wp_enqueue_script('cdp-js-global', "{$cdp_plug_url}/assets/js/cdp-global{$min}.js", ['jquery'], $ver, true);
179
- wp_enqueue_style('cdp-css-select', "{$cdp_plug_url}/assets/css/cdp-select{$min}.css", '', $ver);
180
- wp_enqueue_script('cdp-js-select', "{$cdp_plug_url}/assets/js/cdp-select{$min}.js", '', $ver, true);
181
- wp_enqueue_style('cdp-tooltips-css', "{$cdp_plug_url}/assets/css/cdp.tooltip{$min}.css", '', $ver);
182
- wp_enqueue_script('cdp-tooltips', "{$cdp_plug_url}/assets/js/cdp.tooltip{$min}.js", '', $ver, true);
183
- if (!$screen->is_block_editor() && $pagenow == 'post.php' && $at) {
184
- if ($g['cdp-display-edit'] == 'true') {
185
- $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
186
- $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
187
- $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
188
- if (($a || $b || $c) && $pagenow != 'post-new.php') wp_enqueue_style('cdp-editor', "{$cdp_plug_url}/assets/css/cdp-editor{$min}.css", '', $ver);
189
- }
190
- }
191
-
192
- $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
193
- if ((!$screen || !in_array($screen->id, $allowed)) && !($pagenow == 'edit.php' || $pagenow == 'post.php')) return;
194
- wp_enqueue_style('cdp-css', "{$cdp_plug_url}/assets/css/cdp{$min}.css", '', $ver);
195
- wp_enqueue_style('cdp-css-user', "{$cdp_plug_url}/assets/css/cdp-user{$min}.css", '', $ver);
196
- wp_enqueue_script('cdp-icPagination', "{$cdp_plug_url}/assets/js/cdp-icPagination{$min}.js", '', $ver);
197
- wp_enqueue_script('cdp', "{$cdp_plug_url}/assets/js/cdp{$min}.js", '', $ver, true);
198
- wp_enqueue_script('cdp-modal', "{$cdp_plug_url}/assets/js/cdp-modal{$min}.js", '', $ver, true);
199
- wp_enqueue_script('cdp-bulk', "{$cdp_plug_url}/assets/js/cdp-bulk{$min}.js", '', $ver, true);
200
- });
201
- /** –– **/
202
-
203
- /** –– **\
204
- * Setup assets (not admin).
205
- * @since 1.0.0
206
- */
207
- add_action('wp_enqueue_scripts', function () {
208
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
209
- if (wp_doing_ajax() || (!(is_single() || is_page()))) return; global $cdp_plug_url;
210
-
211
- $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
212
- $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
213
- wp_enqueue_script('jquery-ui-draggable');
214
- wp_enqueue_script('jquery-ui-droppable');
215
- wp_enqueue_script('jquery-ui-sortable');
216
- wp_enqueue_style('cdp-css-global', "{$cdp_plug_url}/assets/css/cdp-global{$min}.css", '', $ver);
217
- wp_enqueue_script('cdp-js-global', "{$cdp_plug_url}/assets/js/cdp-global{$min}.js", ['jquery'], $ver, true);
218
- wp_enqueue_style('cdp-css', "{$cdp_plug_url}/assets/css/cdp{$min}.css", '', $ver);
219
- wp_enqueue_style('cdp-css-user', "{$cdp_plug_url}/assets/css/cdp-user{$min}.css", '', $ver);
220
- wp_enqueue_script('cdp', "{$cdp_plug_url}/assets/js/cdp{$min}.js", ['jquery'], $ver, true);
221
- wp_enqueue_script('cdp-tooltips', "{$cdp_plug_url}/assets/js/cdp.tooltip{$min}.js", '', $ver, true);
222
- wp_enqueue_style('cdp-tooltips-css', "{$cdp_plug_url}/assets/css/cdp.tooltip{$min}.css", '', $ver);
223
- wp_enqueue_script('cdp-modal', "{$cdp_plug_url}/assets/js/cdp-modal{$min}.js", ['jquery'], $ver, true);
224
- wp_enqueue_script('cdp-js-user', "{$cdp_plug_url}/assets/js/cdp-user{$min}.js", '', $ver, true);
225
- wp_enqueue_style('cdp-css-select', "{$cdp_plug_url}/assets/css/cdp-select{$min}.css", '', $ver);
226
- wp_enqueue_script('cdp-js-select', "{$cdp_plug_url}/assets/js/cdp-select{$min}.js", '', $ver, true);
227
- });
228
- /** –– **/
229
-
230
- /** –– **\
231
- * Setup assets (for gutenberg).
232
- * @since 1.0.0
233
- */
234
- add_action('enqueue_block_editor_assets', function () {
235
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
236
-
237
- global $post;
238
- global $cdp_plug_url;
239
- $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
240
-
241
- $g = get_option('_cdp_globals')['others'];
242
-
243
- $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
244
- if (is_object($post)) $type = $post->post_type; else $type = false;
245
- $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
246
- $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
247
- $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
248
- if ($g['cdp-display-gutenberg'] == 'true' && ($a || $b || $c)) {
249
- wp_enqueue_style('cdp-gutenberg', "{$cdp_plug_url}/assets/css/cdp-gutenberg{$min}.css", '', $ver);
250
- wp_enqueue_script('cdp-js-gutenberg', "{$cdp_plug_url}/assets/js/cdp-gutenberg{$min}.js", ['jquery'], $ver, true);
251
- }
252
- });
253
- /** –– **/
254
-
255
- /** –– **\
256
- * Settings and menu initializer.
257
- * @since 1.0.0
258
- */
259
- add_action('admin_menu', function () {
260
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
261
-
262
- // Menu icon
263
- $icon_url = plugin_dir_url(__FILE__) . 'assets/imgs/icon.png'; // TODO: Add icon URL here
264
-
265
- // Main menu slug
266
- $parentSlug = 'copy-delete-posts';
267
-
268
- // Main menu hook
269
- add_menu_page('Copy & Delete Posts', '<span id="cdp-menu">Copy & Delete Posts</span>', 'read', $parentSlug, 'cdp_configuration', $icon_url, $position = 98);
270
-
271
- // Remove default submenu by menu
272
- remove_submenu_page($parentSlug, $parentSlug);
273
- });
274
- /** –– **/
275
-
276
- /** –– **\
277
- * Add copy option to Quick Actions of Posts.
278
- * @since 1.0.0
279
- */
280
- add_filter('post_row_actions', function ($actions, $post) {
281
- if (cdp_check_permissions(wp_get_current_user()) == false) return $actions;
282
-
283
- // Get global options and post type
284
- $g = get_option('_cdp_globals')['others'];
285
- $type = $post->post_type;
286
-
287
- // If user want to see the copy buton here pass
288
- if ($g['cdp-display-posts'] == 'true')
289
- if (($type == 'post' && $g['cdp-content-posts'] == 'true') || ($type != 'post' && $g['cdp-content-custom'] == 'true'))
290
- $actions['cdp_copy'] = "<a href='#'><span class='cdp-copy-button cdp-tooltip-copy' x='".$type."' title='test' data-cdp-id='{$post->ID}'>Copy</span></a>";
291
-
292
- return $actions;
293
- }, 10, 2);
294
- /** –– **/
295
-
296
- /** –– **\
297
- * Add copy option to Quick Actions of Pages.
298
- * @since 1.0.0
299
- */
300
- add_filter('page_row_actions', function ($actions, $page) {
301
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
302
-
303
- // Get global options and post type
304
- $g = get_option('_cdp_globals')['others'];
305
- $type = $page->post_type;
306
-
307
- // If user want to see the copy buton here pass
308
- if ($g['cdp-display-posts'] == 'true')
309
- if (($type == 'page' && $g['cdp-content-pages'] == 'true') || ($type != 'page' && $g['cdp-content-custom'] == 'true'))
310
- $actions['cdp_copy'] = "<a href='#'><span class='cdp-copy-button cdp-tooltip-copy' title='test' data-cdp-id='{$page->ID}'>Copy</span></a>";
311
-
312
- return $actions;
313
- }, 10, 2);
314
- /** –– **/
315
-
316
- /** –– **\
317
- * Add copy option to Bulk Actions of Posts.
318
- * @since 1.0.0
319
- */
320
- add_filter('bulk_actions-edit-post', function ($bulk_actions) {
321
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
322
-
323
- $g = get_option('_cdp_globals')['others'];
324
- if ($g['cdp-display-bulk'] == 'true') $bulk_actions['cdp_bulk_copy'] = 'Copy';
325
-
326
- return $bulk_actions;
327
- });
328
- /** –– **/
329
-
330
- /** –– **\
331
- * Add copy option to Bulk Actions of Pages.
332
- * @since 1.0.0
333
- */
334
- add_filter('bulk_actions-edit-page', function ($bulk_actions) {
335
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
336
-
337
- $g = get_option('_cdp_globals')['others'];
338
- if ($g['cdp-display-bulk'] == 'true') $bulk_actions['cdp_bulk_copy'] = 'Copy';
339
-
340
- return $bulk_actions;
341
- });
342
- /** –– **/
343
-
344
- /** –– **\
345
- * Add copy option to admin bar inside preview.
346
- * @since 1.0.0
347
- */
348
- add_action('admin_bar_menu', function ($admin_bar) {
349
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
350
- $screen = ((function_exists('get_current_screen')?get_current_screen():false));
351
- $screens = ['post', 'page'];
352
-
353
- if (!(is_single() || is_page() || (isset($screen) && ($screen != false && in_array($screen->id, $screens))))) return;
354
-
355
- $g = get_option('_cdp_globals')['others'];
356
-
357
- global $post;
358
- if (is_object($post)) $type = $post->post_type; else $type = false;
359
- $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
360
- $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
361
- $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
362
-
363
- if ($g['cdp-display-admin'] == 'false') return;
364
- global $cdp_plug_url;
365
-
366
- if ($a || $b || $c) {
367
- $icon = '<span class="cdp-admin-bar-icon" data-plug-path="' . $cdp_plug_url . '" data-this-id="' . get_the_ID() . '"></span>';
368
- $admin_bar->add_menu(array(
369
- 'id' => '#cdp-copy-bar-x',
370
- 'parent' => null,
371
- 'group' => null,
372
- 'title' => $icon . 'Copy this',
373
- 'href' => '#',
374
- 'meta' => array('class' => 'cdp-admin-bar-copy', 'target' => '_self')
375
- ));
376
- }
377
- }, 80);
378
- /** –– **/
379
-
380
- /** –– **\
381
- * Add notification to admin bar.
382
- * @since 1.0.0
383
- */
384
- add_action('admin_bar_menu', function ($admin_bar) {
385
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
386
- if (!is_admin()) return;
387
-
388
- $data = cdp_notifications_menu();
389
- $admin_bar->add_menu(array(
390
- 'id' => 'wp-admin-copy-and-delete-posts',
391
- 'parent' => null,
392
- 'group' => null,
393
- 'title' => $data['html'],
394
- 'href' => '#',
395
- 'meta' => array(
396
- 'class' => 'cdp-admin-bar-noti menupop' . (($data['in_list'] == 0)?' cdp-noti-hide':''),
397
- 'target' => '_self'
398
- )
399
- ));
400
- }, 80);
401
- /** –– **/
402
-
403
- /** –– **\
404
- * This function adds version info.
405
- * @since 1.0.0
406
- */
407
- add_action('wp_head', function () {
408
- echo '<meta name="cdp-version" content="' . CDP_VERSION . '" />';
409
- });
410
- /** –– **/
411
-
412
- /** –– **\
413
- * This function adds thickbox modal to preview and view pages.
414
- * @since 1.0.0
415
- */
416
- add_action('wp_footer', function () {
417
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
418
-
419
- $g = get_option('_cdp_globals')['others'];
420
- if ($g['cdp-display-admin'] == 'false') return;
421
-
422
- global $cdp_plug_url, $post;
423
-
424
- $post_id = false;
425
- if (isset($post->ID)) $post_id = $post->ID;
426
-
427
-
428
- $screen = ((function_exists('get_current_screen'))?get_current_screen():false);
429
- $profiles = get_option('_cdp_profiles');
430
-
431
- if (is_single() || is_page()) {
432
- cdp_vars($cdp_plug_url, $post_id);
433
- cdp_modal($screen, $profiles);
434
- }
435
- });
436
- /** –– **/
437
-
438
- /** –– **\
439
- * Add prepared HTML for tooltips and other info.
440
- * @since 1.0.0
441
- */
442
- add_action('admin_notices', function () {
443
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
444
-
445
- global $post, $cdp_plug_url, $cdp_globals, $pagenow;
446
- $post_id = false; $hasParent = false;
447
- $screen = get_current_screen();
448
- $profiles = get_option('_cdp_profiles');
449
- $deny = ['edit-page', 'edit-post'];
450
-
451
- if (!in_array($screen->id, $deny)) {
452
- if (isset($post->ID)) {
453
- $post_id = $post->ID;
454
- $meta = get_post_meta($post->ID, '_cdp_origin');
455
- $site = get_post_meta($post->ID, '_cdp_origin_site');
456
- if ($cdp_globals && array_key_exists('others', $cdp_globals) && array_key_exists('cdp-references-post', $cdp_globals['others'])) {
457
- if ($cdp_globals['others']['cdp-references-edit'] == 'true') {
458
- if (function_exists('switch_to_blog') && $site) switch_to_blog($site);
459
- if (array_key_exists(0, $meta) && get_post_status($meta[0])) {
460
- $parentTitle = get_the_title($meta[0]);
461
- $link = get_post_permalink($meta[0]);
462
- $hasParent = array(
463
- 'title' => $parentTitle,
464
- 'link' => $link
465
- );
466
- }
467
- if (function_exists('restore_current_blog') && $site) restore_current_blog();
468
- }
469
- }
470
- }
471
- }
472
-
473
- if (get_option('_cdp_show_copy', false)) {
474
- echo '<span style="display: none; visibility: hidden;" id="cdp-show-copy-banner" data-value="true"></span>';
475
- delete_option('_cdp_show_copy');
476
- }
477
-
478
- if ($pagenow == 'edit.php') $post_id = false;
479
- cdp_vars($cdp_plug_url, $post_id, $hasParent, true);
480
- cdp_tooltip_content($profiles);
481
- cdp_modal($screen, $profiles);
482
-
483
- });
484
- /** –– **/
485
-
486
- /** –– **\
487
- * Add button in standard editor.
488
- * @since 1.0.0
489
- */
490
- add_action('post_submitbox_start', function () {
491
- if (cdp_check_permissions(wp_get_current_user()) == false) return;
492
- $g = get_option('_cdp_globals')['others'];
493
- if ($g['cdp-display-edit'] == 'false') return;
494
-
495
- global $post, $pagenow;
496
- if (is_object($post)) $type = $post->post_type; else $type = false;
497
- $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
498
- $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
499
- $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
500
-
501
- if (($a || $b || $c) && $pagenow != 'post-new.php')
502
- echo '<div id="cdp-copy-btn"><a class="cdp-copy-btn-editor" href="#">Copy this post</a></div>';
503
-
504
- });
505
- /** –– **/
506
-
507
- /** –– **\
508
- * Add hook for cron (deletion).
509
- * @since 1.0.0
510
- */
511
- add_action('cdp_cron_delete', function ($args = false) {
512
-
513
- $ids = $args['ids'];
514
- $trash = $args['trash'];
515
- $site = (array_key_exists('site', $args)) ? $args['site'] : '-1';
516
- $tok = $args['token']['token'];
517
- $tsk = $args['token']['tsk'];
518
-
519
- if ($args == false) return;
520
-
521
- $cdp_cron = get_option('_cdp_crons');
522
-
523
- if (!isset($cdp_cron[$tok]) || !$cdp_cron[$tok]) return;
524
-
525
- $auit = $cdp_cron[$tok]['auit'];
526
- $auitd = $cdp_cron[$tok]['auitd'];
527
-
528
- $areWePro = areWePro(true, '/handler/crons.php');
529
-
530
- if ($auit == true && $areWePro && function_exists('cdpp_make_redirect')) cdpp_make_redirect($ids, $auitd);
531
- if ($trash == true && $areWePro && function_exists('cdpp_crons_trash_post')) cdpp_crons_trash_post($ids);
532
- else foreach ($ids as $i => $id) wp_delete_post($id, true);
533
-
534
- $cdp_cron[$tok]['tasks'][$tsk] = current_time('timestamp');
535
-
536
- $falsed = false; $last = false;
537
- $i = 0; $size = sizeof($cdp_cron[$tok]['tasks']);
538
- foreach ($cdp_cron[$tok]['tasks'] as $otsk => $val) {
539
- if ($val == false) $falsed = true; $i++;
540
- if ($i == ($size - 1)) $last = $otsk;
541
- }
542
-
543
- if ($tsk == '-0' || $last == $tsk || $falsed == false || $cdp_cron[$tok]['tasks'][$last] != false) {
544
- $cdp_cron[$tok]['done'] = current_time('timestamp');
545
- $cdp_cron[$tok]['shown'] = false;
546
- }
547
-
548
- update_option('_cdp_crons', $cdp_cron);
549
-
550
- });
551
- /** –– **/
552
-
553
- /** –– **\
554
- * Check if user is permmited to use this plugin.
555
- * @since 1.0.0
556
- * @param $user = current_user = object
557
- *
558
- * @return boolean
559
- */
560
- function cdp_check_permissions($user = array()) {
561
- if (!isset($user) || empty($user)) return false;
562
-
563
- $access = false;
564
- $access_roles = get_option('_cdp_globals');
565
- if (!isset($access_roles['roles'])) $access_roles = array();
566
-
567
- foreach ($user->roles as $role => $name) {
568
- if ($name == 'administrator' || (isset($access_roles['roles'][$name]) && $access_roles['roles'][$name] == 'true')) {
569
- $access = true;
570
- break;
571
- }
572
- }
573
-
574
- return $access;
575
- }
576
- /** –– **/
577
-
578
- /** –– **\
579
- * First run of the plugin setup default options for Default profile
580
- * @since 1.0.0
581
- */
582
- add_action('cdp_plugin_setup', 'cdp_setup_default_profile');
583
- function cdp_setup_default_profile() {
584
- $current = get_option('_cdp_globals');
585
- $isSetup = get_option('_cdp_default_setup');
586
- if (($current != false && array_key_exists('default', $current)) || $isSetup) return;
587
-
588
- $already = array(); $globals = array();
589
- $already['default'] = cdp_default_options();
590
- $globals['others'] = cdp_default_global_options();
591
-
592
- $s1 = update_option('_cdp_globals', $globals);
593
- $s2 = update_option('_cdp_profiles', $already);
594
-
595
- if ($s1 || $s2) update_option('_cdp_default_setup', true);
596
- }
597
- /** –– **/
598
-
599
- /** –– **\
600
- * Default settings for unset profiles
601
- * @since 1.0.0
602
- */
603
- function cdp_default_options() {
604
- return array(
605
- 'title' => 'true',
606
- 'date' => 'false',
607
- 'status' => 'false',
608
- 'slug' => 'true',
609
- 'excerpt' => 'true',
610
- 'content' => 'true',
611
- 'f_image' => 'true',
612
- 'template' => 'true',
613
- 'format' => 'true',
614
- 'author' => 'true',
615
- 'password' => 'true',
616
- 'attachments' => 'false',
617
- 'children' => 'false',
618
- 'comments' => 'false',
619
- 'menu_order' => 'true',
620
- 'category' => 'true',
621
- 'post_tag' => 'true',
622
- 'taxonomy' => 'true',
623
- 'nav_menu' => 'true',
624
- 'link_category' => 'true',
625
- 'names' => array(
626
- 'prefix' => '',
627
- 'suffix' => '#[Counter]',
628
- 'format' => '1',
629
- 'custom' => 'm/d/Y',
630
- 'display' => 'Default'
631
- ),
632
- 'usmplugin' => 'false',
633
- 'yoast' => 'false',
634
- 'woo' => 'false'
635
- );
636
- }
637
- function cdp_default_global_options() {
638
- return array(
639
- 'cdp-content-pages' => 'true',
640
- 'cdp-content-posts' => 'true',
641
- 'cdp-content-custom' => 'true',
642
- 'cdp-display-posts' => 'true',
643
- 'cdp-display-edit' => 'true',
644
- 'cdp-display-admin' => 'true',
645
- 'cdp-display-bulk' => 'true',
646
- 'cdp-display-gutenberg' => 'true',
647
- 'cdp-references-post' => 'false',
648
- 'cdp-references-edit' => 'false'
649
- );
650
- }
651
- /** –– **/
652
-
653
- /** –– **\
654
- * Add state info if user want it (the reference to original)
655
- * @since 1.0.0
656
- */
657
- if (is_admin()) {
658
- if ($cdp_globals && array_key_exists('others', $cdp_globals) && array_key_exists('cdp-references-post', $cdp_globals['others'])) {
659
- if ($cdp_globals['others']['cdp-references-post'] == 'true') add_filter('display_post_states', 'cdp_state_post_add', 1, 10 );
660
- }
661
- }
662
-
663
- function cdp_state_post_add($post_states, $post) {
664
- if (cdp_check_permissions(wp_get_current_user()) == false) return $post_states;
665
-
666
- $meta = get_post_meta($post->ID, '_cdp_origin');
667
- $site = get_post_meta($post->ID, '_cdp_origin_site');
668
-
669
- if (function_exists('switch_to_blog') && $site) switch_to_blog($site);
670
- for ($i = sizeof($meta); $i >= 0; --$i) {
671
- if (array_key_exists(($i-1), $meta) && get_post_status($meta[$i-1])) {
672
- $link = get_post_permalink($meta[$i-1]);
673
- $title = get_the_title($meta[$i-1]) . " – " . "ID: " . $meta[$i-1];
674
- $post_states['_cdp'] = "Copy of <a class='cdp-tooltip-top' title='$title' href='$link' target='_blank'>this</a> post";
675
- break;
676
- }
677
- }
678
- if (function_exists('restore_current_blog') && $site) restore_current_blog();
679
-
680
- return $post_states;
681
- }
682
- /** –– **/
683
-
684
- /** –– **\
685
- * Check the premium status and correction
686
- * @since 1.0.0
687
- */
688
- function areWePro($include = true, $file = '/content/premium.php') {
689
- if (cdp_check_permissions(wp_get_current_user()) == false) return false;
690
-
691
- // Get WP-Plugin path
692
- $premium_plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
693
- $premium_dir = WP_PLUGIN_DIR . '/' . 'copy-delete-posts-premium';
694
- $pplugin_path = $premium_dir . $file;
695
- $squirrel = 'cdpp_squirrelicense';
696
- $core = '/includes/core.php';
697
- $areWePro = false;
698
-
699
- // Load premium content if the plugin is here
700
- if (is_dir($premium_dir) && ((function_exists('is_plugin_active') && is_plugin_active($premium_plugin)) || (!function_exists('is_plugin_active')))) {
701
-
702
- // Include cool features
703
- if ($include && file_exists($pplugin_path)) require_once($pplugin_path);
704
-
705
- // Is premium function
706
- if (file_exists($pplugin_path)) $areWePro = true;
707
-
708
- // Has special functions
709
- if (file_exists($pplugin_path) && file_exists($premium_dir . $core)) {
710
- require_once($premium_dir . $core);
711
- if (function_exists($squirrel))
712
- $areWePro = $squirrel()['p'];
713
- else $areWePro = false;
714
- } else $areWePro = false;
715
-
716
- }
717
-
718
- // Return answer
719
- return $areWePro;
720
- }
721
- /** –– **/
722
-
723
- /** –– **\
724
- * It adds button on plugin list below plugin
725
- * @since 1.0.0
726
- */
727
- add_filter('plugin_action_links_' . plugin_basename(__FILE__), function ($links) {
728
- $links['cdp-settings-link'] = '<a href="' . admin_url('/admin.php?page=copy-delete-posts') . '">Settings</a>';
729
- return $links;
730
- });
731
- /** –– **/
732
-
733
- /** –– **\
734
- * This function fixes Wordpress wp_upload_dir function
735
- * @since 1.0.0
736
- */
737
- function cdp_fix_upload_paths($data) {
738
- // Check if the base URL matches the format
739
- $needs_fixing = preg_match("/wp-content\/blogs\.dir\/(\d+)\/files/", $data['baseurl'], $uri_part);
740
-
741
- if ($needs_fixing) {
742
- $data['url'] = str_replace($uri_part[0], 'files', $data['url']);
743
- $data['baseurl'] = str_replace($uri_part[0], 'files', $data['baseurl']);
744
- }
745
-
746
- return $data;
747
- }
748
- /** –– **/
749
-
750
- /** –– **\
751
- * This function will sanitize whole array with sanitize_text_field – by RECURSION
752
- * @since 1.0.0
753
- */
754
- function cdp_sanitize_array($data = null) {
755
- $array = array();
756
- if (is_array($data) || is_object($data))
757
- foreach ($data as $key => $value) {
758
- $key = ((is_numeric($key))?intval($key):sanitize_text_field($key));
759
- if (is_array($value) || is_object($value)) $array[$key] = cdp_sanitize_array($value);
760
- else $array[$key] = sanitize_text_field($value);
761
- }
762
- else if (is_string($data)) return sanitize_text_field($data);
763
- else if (is_bool($data)) return $data;
764
- else if (is_null($data)) return 'false';
765
- else {
766
- error_log('Copy & Delete Posts[copy-delete-posts.php:707]: Unknown AJaX datatype – ' . gettype($data));
767
- echo 'errorinvalid data';
768
- wp_die();
769
- }
770
-
771
- return $array;
772
- }
773
- /** –– **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Copy & Delete Posts
4
+ * Plugin URI: https://copy-delete-posts.com
5
+ * Description: The best solution to easily make duplicates of your posts & pages, and delete them in one go.
6
+ * Version: 1.0.7
7
+ * Author: Copy Delete Posts
8
+ * Author URI: https://copy-delete-posts.com/
9
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
+
11
+ // Exit if accessed directly.
12
+ if (!defined('ABSPATH')) exit;
13
+
14
+ /** –– **\
15
+ * Global variables and constants.
16
+ * @since 1.0.0
17
+ */
18
+
19
+ // Plugin constants
20
+ define('CDP_VERSION', '1.0.7');
21
+ define('CDP_WP_VERSION', get_bloginfo('version'));
22
+ define('CDP_SCRIPT_DEBUG', false);
23
+ $cdp_plug_url = plugins_url('', __FILE__);
24
+
25
+ // Other only admin stuff
26
+ if (is_admin()) {
27
+
28
+ // Set constant variables for this file
29
+ $cdp_dir = dirname(__FILE__);
30
+ $cdp_globals = get_option('_cdp_globals');
31
+ $cdp_premium = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
32
+
33
+ // Try to show error while debugging
34
+ if (CDP_SCRIPT_DEBUG === true) {
35
+ error_reporting(E_ALL);
36
+ ini_set('display_errors', 1);
37
+ }
38
+
39
+ }
40
+
41
+ /** –– **/
42
+
43
+ /** –– **\
44
+ * Fired on plugin activation.
45
+ * @since 1.0.0
46
+ */
47
+ register_activation_hook(__FILE__, function () {
48
+ if (function_exists('activate_plugin')) {
49
+ add_option('_cdp_redirect', true);
50
+ $cdp_premium_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium';
51
+ $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
52
+ if (!is_plugin_active($plugin) && is_dir($cdp_premium_path)) activate_plugin($plugin);
53
+ }
54
+
55
+ if (get_option('_cdp_review', false) == false) {
56
+ $review = array(
57
+ 'installed' => time(),
58
+ 'users' => array()
59
+ );
60
+
61
+ update_option('_cdp_review', $review);
62
+ }
63
+
64
+ do_action('cdp_plugin_setup');
65
+ });
66
+ /** –– **/
67
+
68
+ /** –– **\
69
+ * Fired on plugin deactivation.
70
+ * @since 1.0.0
71
+ */
72
+ register_deactivation_hook(__FILE__, function () {
73
+ if (function_exists('deactivate_plugins')) {
74
+ $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
75
+ if (is_plugin_active($plugin)) add_action('update_option_active_plugins', function () {
76
+ $plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
77
+ deactivate_plugins($plugin);
78
+ });
79
+ }
80
+ });
81
+ /** –– **/
82
+
83
+ /** –– **\
84
+ * Fired on plugin load and check permissions.
85
+ * @since 1.0.0
86
+ */
87
+ add_action('plugins_loaded', function () {
88
+ do_action('cdp_loaded');
89
+ });
90
+ /** –– **/
91
+
92
+ /** –– **\
93
+ * Fired on any plugin upgrade (in case if it's ours)
94
+ * @since 1.0.6
95
+ */
96
+ add_action('upgrader_process_complete', function () {
97
+ if (get_option('_cdp_review', false) == false) {
98
+ $review = array(
99
+ 'installed' => time(),
100
+ 'users' => array()
101
+ );
102
+
103
+ update_option('_cdp_review', $review);
104
+ }
105
+ });
106
+ /** –– **/
107
+
108
+ /** –– **\
109
+ * Include all menus.
110
+ * @since 1.0.0
111
+ */
112
+ add_action('cdp_loaded', function () {
113
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
114
+ require_once plugin_dir_path(__FILE__) . 'menu/configuration.php';
115
+ require_once plugin_dir_path(__FILE__) . 'menu/tooltips.php';
116
+ require_once plugin_dir_path(__FILE__) . 'menu/variables.php';
117
+ require_once plugin_dir_path(__FILE__) . 'menu/modal.php';
118
+ require_once plugin_dir_path(__FILE__) . 'menu/notifications.php';
119
+ require_once plugin_dir_path(__FILE__) . 'post/handler.php';
120
+ });
121
+ /** –– **/
122
+
123
+ /** –– **\
124
+ * Admin Init
125
+ * @since 1.0.0
126
+ */
127
+ add_action('admin_init', function () {
128
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
129
+
130
+ if (get_option('_cdp_redirect', false)) {
131
+ delete_option('_cdp_redirect', false);
132
+ wp_redirect(admin_url('admin.php?page=copy-delete-posts'));
133
+ }
134
+
135
+ global $cdp_premium;
136
+ $cdp_premium_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium';
137
+ $cdp_premium_ver_path = WP_PLUGIN_DIR . '/copy-delete-posts-premium/version.txt';
138
+ if (defined('CDP_PREMIUM_VERSION') && version_compare(CDP_PREMIUM_VERSION, CDP_VERSION, '!=')) {
139
+ update_option('_cdp_mishmash', true);
140
+ } else {
141
+ if (is_dir($cdp_premium_path) && file_exists($cdp_premium_ver_path)) {
142
+ $cdp_prem_ver_file = fopen($cdp_premium_ver_path, 'r') or false;
143
+ $cdp_prem_ver = fgets($cdp_prem_ver_file);
144
+ fclose($cdp_prem_ver_file);
145
+
146
+ if ((trim($cdp_prem_ver) == CDP_VERSION) && !is_plugin_active($cdp_premium)) {
147
+ activate_plugin($cdp_premium, '', false, true);
148
+ // add_option('_cdp_redirect', false);
149
+ }
150
+ if (trim($cdp_prem_ver) == CDP_VERSION) update_option('_cdp_mishmash', false);
151
+ }
152
+ }
153
+ if (is_plugin_active($cdp_premium) && !file_exists($cdp_premium_ver_path)) {
154
+ if (is_plugin_active($cdp_premium)) deactivate_plugins($cdp_premium, true);
155
+ }
156
+ });
157
+ /** –– **/
158
+
159
+ /** –– **\
160
+ * Setup assets.
161
+ * @since 1.0.0
162
+ */
163
+ add_action('admin_enqueue_scripts', function () {
164
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
165
+ if (wp_doing_ajax()) return; global $cdp_plug_url;
166
+
167
+ global $pagenow, $post;
168
+ $screen = get_current_screen();
169
+ $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
170
+ $allowed = ['post', 'edit-post', 'toplevel_page_copy-delete-posts', 'edit-page', 'page'];
171
+ $at = ($screen->id != 'attachment');
172
+
173
+ $g = get_option('_cdp_globals');
174
+ if ($g['others']) $g = $g['others'];
175
+ else $g = cdp_default_global_options();
176
+
177
+ if (is_object($post)) $type = $post->post_type;
178
+ else $type = false;
179
+
180
+ $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
181
+ wp_enqueue_style('cdp-css-global', "{$cdp_plug_url}/assets/css/cdp-global{$min}.css", '', $ver);
182
+ wp_enqueue_script('cdp-js-global', "{$cdp_plug_url}/assets/js/cdp-global{$min}.js", ['jquery'], $ver, true);
183
+ wp_enqueue_style('cdp-css-select', "{$cdp_plug_url}/assets/css/cdp-select{$min}.css", '', $ver);
184
+ wp_enqueue_script('cdp-js-select', "{$cdp_plug_url}/assets/js/cdp-select{$min}.js", '', $ver, true);
185
+ wp_enqueue_style('cdp-tooltips-css', "{$cdp_plug_url}/assets/css/cdp.tooltip{$min}.css", '', $ver);
186
+ wp_enqueue_script('cdp-tooltips', "{$cdp_plug_url}/assets/js/cdp.tooltip{$min}.js", '', $ver, true);
187
+ if (method_exists($screen, 'is_block_editor')) {
188
+ if (!$screen->is_block_editor() && $pagenow == 'post.php' && $at) {
189
+ if ($g['cdp-display-edit'] == 'true') {
190
+ $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
191
+ $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
192
+ $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
193
+ if (($a || $b || $c) && $pagenow != 'post-new.php') wp_enqueue_style('cdp-editor', "{$cdp_plug_url}/assets/css/cdp-editor{$min}.css", '', $ver);
194
+ }
195
+ }
196
+ }
197
+
198
+ $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
199
+ if ((!$screen || !in_array($screen->id, $allowed)) && !($pagenow == 'edit.php' || $pagenow == 'post.php')) return;
200
+ wp_enqueue_style('cdp-css', "{$cdp_plug_url}/assets/css/cdp{$min}.css", '', $ver);
201
+ wp_enqueue_style('cdp-css-user', "{$cdp_plug_url}/assets/css/cdp-user{$min}.css", '', $ver);
202
+ wp_enqueue_script('cdp-icPagination', "{$cdp_plug_url}/assets/js/cdp-icPagination{$min}.js", '', $ver);
203
+ wp_enqueue_script('cdp', "{$cdp_plug_url}/assets/js/cdp{$min}.js", '', $ver, true);
204
+ wp_enqueue_script('cdp-modal', "{$cdp_plug_url}/assets/js/cdp-modal{$min}.js", '', $ver, true);
205
+ wp_enqueue_script('cdp-bulk', "{$cdp_plug_url}/assets/js/cdp-bulk{$min}.js", '', $ver, true);
206
+ });
207
+ /** –– **/
208
+
209
+ /** –– **\
210
+ * Setup assets (not admin).
211
+ * @since 1.0.0
212
+ */
213
+ add_action('wp_enqueue_scripts', function () {
214
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
215
+ if (wp_doing_ajax() || (!(is_single() || is_page()))) return; global $cdp_plug_url;
216
+
217
+ $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
218
+ $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
219
+ wp_enqueue_script('jquery-ui-draggable');
220
+ wp_enqueue_script('jquery-ui-droppable');
221
+ wp_enqueue_script('jquery-ui-sortable');
222
+ wp_enqueue_style('cdp-css-global', "{$cdp_plug_url}/assets/css/cdp-global{$min}.css", '', $ver);
223
+ wp_enqueue_script('cdp-js-global', "{$cdp_plug_url}/assets/js/cdp-global{$min}.js", ['jquery'], $ver, true);
224
+ wp_enqueue_style('cdp-css', "{$cdp_plug_url}/assets/css/cdp{$min}.css", '', $ver);
225
+ wp_enqueue_style('cdp-css-user', "{$cdp_plug_url}/assets/css/cdp-user{$min}.css", '', $ver);
226
+ wp_enqueue_script('cdp', "{$cdp_plug_url}/assets/js/cdp{$min}.js", ['jquery'], $ver, true);
227
+ wp_enqueue_script('cdp-tooltips', "{$cdp_plug_url}/assets/js/cdp.tooltip{$min}.js", '', $ver, true);
228
+ wp_enqueue_style('cdp-tooltips-css', "{$cdp_plug_url}/assets/css/cdp.tooltip{$min}.css", '', $ver);
229
+ wp_enqueue_script('cdp-modal', "{$cdp_plug_url}/assets/js/cdp-modal{$min}.js", ['jquery'], $ver, true);
230
+ wp_enqueue_script('cdp-js-user', "{$cdp_plug_url}/assets/js/cdp-user{$min}.js", '', $ver, true);
231
+ wp_enqueue_style('cdp-css-select', "{$cdp_plug_url}/assets/css/cdp-select{$min}.css", '', $ver);
232
+ wp_enqueue_script('cdp-js-select', "{$cdp_plug_url}/assets/js/cdp-select{$min}.js", '', $ver, true);
233
+ });
234
+ /** –– **/
235
+
236
+ /** –– **\
237
+ * Setup assets (for gutenberg).
238
+ * @since 1.0.0
239
+ */
240
+ add_action('enqueue_block_editor_assets', function () {
241
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
242
+
243
+ global $post;
244
+ global $cdp_plug_url;
245
+ $min = defined('CDP_SCRIPT_DEBUG') && CDP_SCRIPT_DEBUG ? '' : '.min';
246
+
247
+ $g = get_option('_cdp_globals')['others'];
248
+
249
+ $ver = preg_replace('#[^\pL\pN/-]+#', '', CDP_VERSION);
250
+ if (is_object($post)) $type = $post->post_type; else $type = false;
251
+ $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
252
+ $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
253
+ $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
254
+ if ($g['cdp-display-gutenberg'] == 'true' && ($a || $b || $c)) {
255
+ wp_enqueue_style('cdp-gutenberg', "{$cdp_plug_url}/assets/css/cdp-gutenberg{$min}.css", '', $ver);
256
+ wp_enqueue_script('cdp-js-gutenberg', "{$cdp_plug_url}/assets/js/cdp-gutenberg{$min}.js", ['jquery'], $ver, true);
257
+ }
258
+ });
259
+ /** –– **/
260
+
261
+ /** –– **\
262
+ * Settings and menu initializer.
263
+ * @since 1.0.0
264
+ */
265
+ add_action('admin_menu', function () {
266
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
267
+
268
+ // Menu icon
269
+ $icon_url = plugin_dir_url(__FILE__) . 'assets/imgs/icon.png';
270
+
271
+ // Main menu slug
272
+ $parentSlug = 'copy-delete-posts';
273
+
274
+ // Main menu hook
275
+ add_menu_page('Copy & Delete Posts', '<span id="cdp-menu">Copy & Delete Posts</span>', 'read', $parentSlug, 'cdp_configuration', $icon_url, $position = 98);
276
+
277
+ // Remove default submenu by menu
278
+ remove_submenu_page($parentSlug, $parentSlug);
279
+ });
280
+ /** –– **/
281
+
282
+ /** –– **\
283
+ * Add copy option to Quick Actions of Posts.
284
+ * @since 1.0.0
285
+ */
286
+ add_filter('post_row_actions', function ($actions, $post) {
287
+ if (cdp_check_permissions(wp_get_current_user()) == false) return $actions;
288
+
289
+ // Get global options and post type
290
+ $g = get_option('_cdp_globals')['others'];
291
+ $type = $post->post_type;
292
+
293
+ // If user want to see the copy buton here pass
294
+ if ($g['cdp-display-posts'] == 'true')
295
+ if (($type == 'post' && $g['cdp-content-posts'] == 'true') || ($type != 'post' && $g['cdp-content-custom'] == 'true'))
296
+ $actions['cdp_copy'] = "<a href='#'><span class='cdp-copy-button cdp-tooltip-copy' x='".$type."' title='test' data-cdp-id='{$post->ID}'>Copy</span></a>";
297
+
298
+ return $actions;
299
+ }, 10, 2);
300
+ /** –– **/
301
+
302
+ /** –– **\
303
+ * Add copy option to Quick Actions of Pages.
304
+ * @since 1.0.0
305
+ */
306
+ add_filter('page_row_actions', function ($actions, $page) {
307
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
308
+
309
+ // Get global options and post type
310
+ $g = get_option('_cdp_globals')['others'];
311
+ $type = $page->post_type;
312
+
313
+ // If user want to see the copy buton here pass
314
+ if ($g['cdp-display-posts'] == 'true')
315
+ if (($type == 'page' && $g['cdp-content-pages'] == 'true') || ($type != 'page' && $g['cdp-content-custom'] == 'true'))
316
+ $actions['cdp_copy'] = "<a href='#'><span class='cdp-copy-button cdp-tooltip-copy' title='test' data-cdp-id='{$page->ID}'>Copy</span></a>";
317
+
318
+ return $actions;
319
+ }, 10, 2);
320
+ /** –– **/
321
+
322
+ /** –– **\
323
+ * Add copy option to Bulk Actions of Posts.
324
+ * @since 1.0.0
325
+ */
326
+ add_filter('bulk_actions-edit-post', function ($bulk_actions) {
327
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
328
+
329
+ $g = get_option('_cdp_globals')['others'];
330
+ if ($g['cdp-display-bulk'] == 'true') $bulk_actions['cdp_bulk_copy'] = 'Copy';
331
+
332
+ return $bulk_actions;
333
+ });
334
+ /** –– **/
335
+
336
+ /** –– **\
337
+ * Add copy option to Bulk Actions of Pages.
338
+ * @since 1.0.0
339
+ */
340
+ add_filter('bulk_actions-edit-page', function ($bulk_actions) {
341
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
342
+
343
+ $g = get_option('_cdp_globals')['others'];
344
+ if ($g['cdp-display-bulk'] == 'true') $bulk_actions['cdp_bulk_copy'] = 'Copy';
345
+
346
+ return $bulk_actions;
347
+ });
348
+ /** –– **/
349
+
350
+ /** –– **\
351
+ * Add copy option to admin bar inside preview.
352
+ * @since 1.0.0
353
+ */
354
+ add_action('admin_bar_menu', function ($admin_bar) {
355
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
356
+ $screen = ((function_exists('get_current_screen')?get_current_screen():false));
357
+ $screens = ['post', 'page'];
358
+
359
+ if (!(is_single() || is_page() || (isset($screen) && ($screen != false && in_array($screen->id, $screens))))) return;
360
+
361
+ $g = get_option('_cdp_globals')['others'];
362
+
363
+ global $post;
364
+ if (is_object($post)) $type = $post->post_type; else $type = false;
365
+ $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
366
+ $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
367
+ $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
368
+
369
+ if ($g['cdp-display-admin'] == 'false') return;
370
+ global $cdp_plug_url;
371
+
372
+ if ($a || $b || $c) {
373
+ $icon = '<span class="cdp-admin-bar-icon" data-plug-path="' . $cdp_plug_url . '" data-this-id="' . get_the_ID() . '"></span>';
374
+ $admin_bar->add_menu(array(
375
+ 'id' => '#cdp-copy-bar-x',
376
+ 'parent' => null,
377
+ 'group' => null,
378
+ 'title' => $icon . 'Copy this',
379
+ 'href' => '#',
380
+ 'meta' => array('class' => 'cdp-admin-bar-copy', 'target' => '_self')
381
+ ));
382
+ }
383
+ }, 80);
384
+ /** –– **/
385
+
386
+ /** –– **\
387
+ * Add notification to admin bar.
388
+ * @since 1.0.0
389
+ */
390
+ add_action('admin_bar_menu', function ($admin_bar) {
391
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
392
+ if (!is_admin()) return;
393
+
394
+ if (!function_exists('cdp_notifications_menu'))
395
+ require_once plugin_dir_path(__FILE__) . 'menu/notifications.php';
396
+
397
+ if (function_exists('cdp_notifications_menu')) {
398
+ $data = cdp_notifications_menu();
399
+ $admin_bar->add_menu(array(
400
+ 'id' => 'wp-admin-copy-and-delete-posts',
401
+ 'parent' => null,
402
+ 'group' => null,
403
+ 'title' => $data['html'],
404
+ 'href' => '#',
405
+ 'meta' => array(
406
+ 'class' => 'cdp-admin-bar-noti menupop' . (($data['in_list'] == 0)?' cdp-noti-hide':''),
407
+ 'target' => '_self'
408
+ )
409
+ ));
410
+ }
411
+ }, 80);
412
+ /** –– **/
413
+
414
+ /** –– **\
415
+ * This function adds version info.
416
+ * @since 1.0.0
417
+ */
418
+ add_action('wp_head', function () {
419
+ echo '<meta name="cdp-version" content="' . CDP_VERSION . '" />';
420
+ });
421
+ /** –– **/
422
+
423
+ /** –– **\
424
+ * This function adds thickbox modal to preview and view pages.
425
+ * @since 1.0.0
426
+ */
427
+ add_action('wp_footer', function () {
428
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
429
+
430
+ $g = get_option('_cdp_globals')['others'];
431
+ if ($g['cdp-display-admin'] == 'false') return;
432
+
433
+ global $cdp_plug_url, $post;
434
+
435
+ $post_id = false;
436
+ if (isset($post->ID)) $post_id = $post->ID;
437
+
438
+
439
+ $screen = ((function_exists('get_current_screen'))?get_current_screen():false);
440
+ $profiles = get_option('_cdp_profiles');
441
+
442
+ if (is_single() || is_page()) {
443
+ cdp_vars($cdp_plug_url, $post_id);
444
+ cdp_modal($screen, $profiles);
445
+ }
446
+ });
447
+ /** –– **/
448
+
449
+ /** –– **\
450
+ * Add prepared HTML for tooltips and other info.
451
+ * @since 1.0.0
452
+ */
453
+ add_action('admin_notices', function () {
454
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
455
+
456
+ global $post, $cdp_plug_url, $cdp_globals, $pagenow;
457
+ $post_id = false; $hasParent = false;
458
+ $screen = get_current_screen();
459
+ $profiles = get_option('_cdp_profiles');
460
+ $deny = ['edit-page', 'edit-post'];
461
+
462
+ if (!in_array($screen->id, $deny)) {
463
+ if (isset($post->ID)) {
464
+ $post_id = $post->ID;
465
+ $meta = get_post_meta($post->ID, '_cdp_origin');
466
+ $site = get_post_meta($post->ID, '_cdp_origin_site');
467
+ if ($cdp_globals && array_key_exists('others', $cdp_globals) && array_key_exists('cdp-references-post', $cdp_globals['others'])) {
468
+ if ($cdp_globals['others']['cdp-references-edit'] == 'true') {
469
+ if (function_exists('switch_to_blog') && $site) switch_to_blog($site);
470
+ if (array_key_exists(0, $meta) && get_post_status($meta[0])) {
471
+ $parentTitle = get_the_title($meta[0]);
472
+ $link = get_post_permalink($meta[0]);
473
+ $hasParent = array(
474
+ 'title' => $parentTitle,
475
+ 'link' => $link
476
+ );
477
+ }
478
+ if (function_exists('restore_current_blog') && $site) restore_current_blog();
479
+ }
480
+ }
481
+ }
482
+ }
483
+
484
+ if (get_option('_cdp_show_copy', false)) {
485
+ echo '<span style="display: none; visibility: hidden;" id="cdp-show-copy-banner" data-value="true"></span>';
486
+ delete_option('_cdp_show_copy');
487
+ }
488
+
489
+ if ($pagenow == 'edit.php') $post_id = false;
490
+ cdp_vars($cdp_plug_url, $post_id, $hasParent, true);
491
+ cdp_tooltip_content($profiles);
492
+ cdp_modal($screen, $profiles);
493
+
494
+ });
495
+ /** –– **/
496
+
497
+ /** –– **\
498
+ * Add button in standard editor.
499
+ * @since 1.0.0
500
+ */
501
+ add_action('post_submitbox_start', function () {
502
+ if (cdp_check_permissions(wp_get_current_user()) == false) return;
503
+ $g = get_option('_cdp_globals')['others'];
504
+ if ($g['cdp-display-edit'] == 'false') return;
505
+
506
+ global $post, $pagenow;
507
+ if (is_object($post)) $type = $post->post_type; else $type = false;
508
+ $a = ($type == 'post' && $g['cdp-content-posts'] == 'true');
509
+ $b = ($type == 'page' && $g['cdp-content-pages'] == 'true');
510
+ $c = ($type != 'post' && $type != 'page' && $g['cdp-content-custom'] == 'true');
511
+
512
+ if (($a || $b || $c) && $pagenow != 'post-new.php')
513
+ echo '<div id="cdp-copy-btn"><a class="cdp-copy-btn-editor" href="#">Copy this post</a></div>';
514
+
515
+ });
516
+ /** –– **/
517
+
518
+ /** –– **\
519
+ * Add hook for cron (deletion).
520
+ * @since 1.0.0
521
+ */
522
+ add_action('cdp_cron_delete', function ($args = false) {
523
+
524
+ $ids = $args['ids'];
525
+ $trash = $args['trash'];
526
+ $site = (array_key_exists('site', $args)) ? $args['site'] : '-1';
527
+ $tok = $args['token']['token'];
528
+ $tsk = $args['token']['tsk'];
529
+
530
+ if ($args == false) return;
531
+
532
+ $cdp_cron = get_option('_cdp_crons');
533
+
534
+ if (!isset($cdp_cron[$tok]) || !$cdp_cron[$tok]) return;
535
+
536
+ $auit = $cdp_cron[$tok]['auit'];
537
+ $auitd = $cdp_cron[$tok]['auitd'];
538
+
539
+ $areWePro = areWePro(true, '/handler/crons.php', true);
540
+
541
+ if ($auit == true && $areWePro && function_exists('cdpp_make_redirect')) cdpp_make_redirect($ids, $auitd);
542
+ if ($trash == true && $areWePro && function_exists('cdpp_crons_trash_post')) cdpp_crons_trash_post($ids);
543
+ else foreach ($ids as $i => $id) wp_delete_post($id, true);
544
+
545
+ $cdp_cron[$tok]['tasks'][$tsk] = current_time('timestamp');
546
+
547
+ $falsed = false; $last = false;
548
+ $i = 0; $size = sizeof($cdp_cron[$tok]['tasks']);
549
+ foreach ($cdp_cron[$tok]['tasks'] as $otsk => $val) {
550
+ if ($val == false) $falsed = true; $i++;
551
+ if ($i == ($size - 1)) $last = $otsk;
552
+ }
553
+
554
+ if ($tsk == '-0' || $last == $tsk || $falsed == false || $cdp_cron[$tok]['tasks'][$last] != false) {
555
+ $cdp_cron[$tok]['done'] = current_time('timestamp');
556
+ $cdp_cron[$tok]['data'] = array('formated-date' => date('d M Y, H:i:s'));
557
+ if (array_key_exists('del_size', $cdp_cron[$tok])) {
558
+ $cdp_cron[$tok]['data']['amount'] = $cdp_cron[$tok]['del_size'];
559
+ $cdp_cron[$tok]['data']['text'] = 'Manual Cleanup removed ' . $cdp_cron[$tok]['del_size'] . ' post(s).';
560
+ }
561
+ $cdp_cron[$tok]['shown'] = false;
562
+ }
563
+
564
+ update_option('_cdp_crons', $cdp_cron);
565
+
566
+ });
567
+ /** –– **/
568
+
569
+ /** –– **\
570
+ * Check if user is permmited to use this plugin.
571
+ * @since 1.0.0
572
+ * @param $user = current_user = object
573
+ *
574
+ * @return boolean
575
+ */
576
+ function cdp_check_permissions($user = array()) {
577
+ if (!isset($user) || empty($user)) return false;
578
+
579
+ $access = false;
580
+ $access_roles = get_option('_cdp_globals');
581
+ if (!isset($access_roles['roles'])) $access_roles = array();
582
+
583
+ foreach ($user->roles as $role => $name) {
584
+ if ($name == 'administrator' || (isset($access_roles['roles'][$name]) && $access_roles['roles'][$name] == 'true')) {
585
+ $access = true;
586
+ break;
587
+ }
588
+ }
589
+
590
+ return $access;
591
+ }
592
+ /** –– **/
593
+
594
+ /** –– **\
595
+ * First run of the plugin setup default options for Default profile
596
+ * @since 1.0.0
597
+ */
598
+ add_action('cdp_plugin_setup', 'cdp_setup_default_profile');
599
+ function cdp_setup_default_profile() {
600
+ $current = get_option('_cdp_globals');
601
+ $isSetup = get_option('_cdp_default_setup');
602
+ if (($current != false && array_key_exists('default', $current)) || $isSetup) return;
603
+
604
+ $already = array(); $globals = array();
605
+ $already['default'] = cdp_default_options();
606
+ $globals['others'] = cdp_default_global_options();
607
+
608
+ $s1 = update_option('_cdp_globals', $globals);
609
+ $s2 = update_option('_cdp_profiles', $already);
610
+
611
+ if ($s1 || $s2) update_option('_cdp_default_setup', true);
612
+ }
613
+ /** –– **/
614
+
615
+ /** –– **\
616
+ * Default settings for unset profiles
617
+ * @since 1.0.0
618
+ */
619
+ function cdp_default_options() {
620
+ return array(
621
+ 'title' => 'true',
622
+ 'date' => 'false',
623
+ 'status' => 'false',
624
+ 'slug' => 'true',
625
+ 'excerpt' => 'true',
626
+ 'content' => 'true',
627
+ 'f_image' => 'true',
628
+ 'template' => 'true',
629
+ 'format' => 'true',
630
+ 'author' => 'true',
631
+ 'password' => 'true',
632
+ 'attachments' => 'false',
633
+ 'children' => 'false',
634
+ 'comments' => 'false',
635
+ 'menu_order' => 'true',
636
+ 'category' => 'true',
637
+ 'post_tag' => 'true',
638
+ 'taxonomy' => 'true',
639
+ 'nav_menu' => 'true',
640
+ 'link_category' => 'true',
641
+ 'names' => array(
642
+ 'prefix' => '',
643
+ 'suffix' => '#[Counter]',
644
+ 'format' => '1',
645
+ 'custom' => 'm/d/Y',
646
+ 'display' => 'Default'
647
+ ),
648
+ 'usmplugin' => 'false',
649
+ 'yoast' => 'false',
650
+ 'woo' => 'false'
651
+ );
652
+ }
653
+ function cdp_default_global_options() {
654
+ return array(
655
+ 'cdp-content-pages' => 'true',
656
+ 'cdp-content-posts' => 'true',
657
+ 'cdp-content-custom' => 'true',
658
+ 'cdp-display-posts' => 'true',
659
+ 'cdp-display-edit' => 'true',
660
+ 'cdp-display-admin' => 'true',
661
+ 'cdp-display-bulk' => 'true',
662
+ 'cdp-display-gutenberg' => 'true',
663
+ 'cdp-references-post' => 'false',
664
+ 'cdp-references-edit' => 'false',
665
+ 'cdp-premium-import' => 'false'
666
+ );
667
+ }
668
+ /** –– **/
669
+
670
+ /** –– **\
671
+ * Add state info if user want it (the reference to original)
672
+ * @since 1.0.0
673
+ */
674
+ if (is_admin()) {
675
+ if ($cdp_globals && array_key_exists('others', $cdp_globals) && array_key_exists('cdp-references-post', $cdp_globals['others'])) {
676
+ if ($cdp_globals['others']['cdp-references-post'] == 'true') add_filter('display_post_states', 'cdp_state_post_add', 1, 10 );
677
+ }
678
+ }
679
+
680
+ function cdp_state_post_add($post_states, $post) {
681
+ if (cdp_check_permissions(wp_get_current_user()) == false) return $post_states;
682
+
683
+ $meta = get_post_meta($post->ID, '_cdp_origin');
684
+ $site = get_post_meta($post->ID, '_cdp_origin_site');
685
+
686
+ if (function_exists('switch_to_blog') && $site) switch_to_blog($site);
687
+ for ($i = sizeof($meta); $i >= 0; --$i) {
688
+ if (array_key_exists(($i-1), $meta) && get_post_status($meta[$i-1])) {
689
+ $link = get_post_permalink($meta[$i-1]);
690
+ $title = get_the_title($meta[$i-1]) . " – " . "ID: " . $meta[$i-1];
691
+ $post_states['_cdp'] = "Copy of <a class='cdp-tooltip-top' title='$title' href='$link' target='_blank'>this</a> post";
692
+ break;
693
+ }
694
+ }
695
+ if (function_exists('restore_current_blog') && $site) restore_current_blog();
696
+
697
+ return $post_states;
698
+ }
699
+ /** –– **/
700
+
701
+ /** –– **\
702
+ * Check the premium status and correction
703
+ * @since 1.0.0
704
+ */
705
+ function areWePro($include = true, $file = '/content/premium.php', $ignore_perms = false) {
706
+ if (!$ignore_perms && cdp_check_permissions(wp_get_current_user()) == false) return false;
707
+
708
+ // Get WP-Plugin path
709
+ $premium_plugin = 'copy-delete-posts-premium/copy-delete-posts-premium.php';
710
+ $premium_dir = WP_PLUGIN_DIR . '/' . 'copy-delete-posts-premium';
711
+ $pplugin_path = $premium_dir . $file;
712
+ $squirrel = 'cdpp_squirrelicense';
713
+ $core = '/includes/core.php';
714
+ $areWePro = false;
715
+
716
+ // Load premium content if the plugin is here
717
+ if (is_dir($premium_dir) && ((function_exists('is_plugin_active') && is_plugin_active($premium_plugin)) || (!function_exists('is_plugin_active')))) {
718
+
719
+ // Include cool features
720
+ if ($include && file_exists($pplugin_path)) require_once($pplugin_path);
721
+
722
+ // Is premium function
723
+ if (file_exists($pplugin_path)) $areWePro = true;
724
+
725
+ // Has special functions
726
+ if (file_exists($pplugin_path) && file_exists($premium_dir . $core)) {
727
+ require_once($premium_dir . $core);
728
+ if (function_exists($squirrel)) $areWePro = $squirrel()['p'];
729
+ else $areWePro = false;
730
+ } else $areWePro = false;
731
+
732
+ }
733
+
734
+ // Return answer
735
+ return $areWePro;
736
+ }
737
+ /** –– **/
738
+
739
+ /** –– **\
740
+ * It adds button on plugin list below plugin
741
+ * @since 1.0.0
742
+ */
743
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), function ($links) {
744
+ $links['cdp-settings-link'] = '<a href="' . admin_url('/admin.php?page=copy-delete-posts') . '">Settings</a>';
745
+ return $links;
746
+ });
747
+ /** –– **/
748
+
749
+ /** –– **\
750
+ * This function fixes Wordpress wp_upload_dir function
751
+ * @since 1.0.0
752
+ */
753
+ function cdp_fix_upload_paths($data) {
754
+ // Check if the base URL matches the format
755
+ $needs_fixing = preg_match("/wp-content\/blogs\.dir\/(\d+)\/files/", $data['baseurl'], $uri_part);
756
+
757
+ if ($needs_fixing) {
758
+ $data['url'] = str_replace($uri_part[0], 'files', $data['url']);
759
+ $data['baseurl'] = str_replace($uri_part[0], 'files', $data['baseurl']);
760
+ }
761
+
762
+ return $data;
763
+ }
764
+ /** –– **/
765
+
766
+ /** –– **\
767
+ * This function will sanitize whole array with sanitize_text_field by RECURSION
768
+ * @since 1.0.0
769
+ */
770
+ function cdp_sanitize_array($data = null) {
771
+ $array = array();
772
+ if (is_array($data) || is_object($data))
773
+ foreach ($data as $key => $value) {
774
+ $key = ((is_numeric($key))?intval($key):sanitize_text_field($key));
775
+ if (is_array($value) || is_object($value)) $array[$key] = cdp_sanitize_array($value);
776
+ else $array[$key] = sanitize_text_field($value);
777
+ }
778
+ else if (is_string($data)) return sanitize_text_field($data);
779
+ else if (is_bool($data)) return $data;
780
+ else if (is_null($data)) return 'false';
781
+ else {
782
+ error_log('Copy & Delete Posts[copy-delete-posts.php:707]: Unknown AJaX datatype – ' . gettype($data));
783
+ echo 'error – invalid data';
784
+ wp_die();
785
+ }
786
+
787
+ return $array;
788
+ }
789
+ /** –– **/
menu/configuration.php CHANGED
@@ -204,7 +204,7 @@ function cdp_configuration() {
204
  <tbody class="cdp-ff-b1 cdp-f-s-18 cdp-tbody-of-settings">
205
  <tr>
206
  <td><label class="cdp-relative"><input <?php echo $defaults['title']=='true'?'checked ':''; ?>class="cdp-data-set" data-cdp-opt="title" type="checkbox" /><span>Title <span class="cdp-info-icon"></span></span></label></td>
207
- <td>…get the title as defined in the <a href="#" class="cdp-go-to-names-chapter"><span class="cdp-green">next chapter</span></a>.</td>
208
  <td>…be titled “Untitled”.</td>
209
  </tr>
210
  <tr>
@@ -374,7 +374,7 @@ function cdp_configuration() {
374
  <div class="cdp-center cdp-padding cdp-p-35-b">
375
  <button class="cdp-button cdp-save-options">Save</button>
376
  <div class="cdp-padding cdp-f-s-17">
377
- <a href="#" class="cdp-close-chapter">Close chapter</a>
378
  </div>
379
  </div>
380
  </div>
@@ -465,7 +465,7 @@ function cdp_configuration() {
465
  <div class="cdp-center">
466
  <button class="cdp-button cdp-save-options">Save</button>
467
  <div class="cdp-padding cdp-f-s-17">
468
- <a href="#" class="cdp-close-chapter">Close chapter</a>
469
  </div>
470
  </div>
471
  </div>
@@ -528,7 +528,7 @@ function cdp_configuration() {
528
  if (isset($globals['roles'][$rn]) && $globals['roles'][$rn] == 'true')
529
  $checked = ' checked';
530
 
531
- echo('<label for="cdp-roles-'.$rn.'"><input class="cdp-other-roles" id="cdp-roles-'.$rn.'"'.$checked.' type="checkbox"'.$d.' name="'.$rn.'">'.$role.'</label>&nbsp;');
532
  }
533
  ?>
534
  </div>
@@ -552,10 +552,18 @@ function cdp_configuration() {
552
  <label for="cdp-o-posts2"><input <?php echo ($gos['cdp-references-post'] == 'true')?'checked ':''; ?>id="cdp-o-posts2" type="checkbox" class="cdp-other-inputs" name="cdp-references-post">Posts/pages lists</label>
553
  <label for="cdp-o-edits2"><input <?php echo ($gos['cdp-references-edit'] == 'true')?'checked ':''; ?>id="cdp-o-edits2" type="checkbox" class="cdp-other-inputs" name="cdp-references-edit">Edit screens</label>
554
  </div>
 
 
 
 
 
 
 
 
555
  <div class="cdp-center cdp-padding-15-h">
556
  <button class="cdp-button cdp-save-options">Save</button>
557
  <div class="cdp-padding cdp-f-s-17">
558
- <a href="#" class="cdp-close-chapter">Close chapter</a>
559
  </div>
560
  </div>
561
  </div>
@@ -567,7 +575,7 @@ function cdp_configuration() {
567
 
568
  <!-- DELETE SECTION -->
569
  <div class="cdp-collapsible" data-cdp-group="mains">
570
- <div class="cdp-collapsible-title">
571
  <div class="cdp-cf">
572
  <div class="cdp-left cdp-ff-b1"><b class="cdp-ff-b4">Delete duplicate posts/pages</b></div>
573
  <div class="cdp-right"><i class="cdp-arrow cdp-arrow-left"></i></div>
@@ -584,7 +592,7 @@ function cdp_configuration() {
584
  <div class="cdp-left cdp-tab-element cdp-tab-active" data-box="cdp-tabox-manual">
585
  <span>Manual Cleanup</span>
586
  </div>
587
- <div class="cdp-left cdp-tab-element cdp-tooltip-premium cdpp-not-yet" data-top="-4" data-box="cdp-tabox-automatic" data-disabled="true">
588
  <span class="cdp-relative">Automatic Cleanup <span class="cdp-premium-icon cdp-big-icon"></span></span>
589
  </div>
590
  <div class="cdp-left cdp-tab-element" data-box="cdp-tabox-redirects">
@@ -621,7 +629,9 @@ function cdp_configuration() {
621
  <?php } ?>
622
  </div>
623
  <div class="cdp-cont-d-box-tabed" id="cdp-tabox-automatic">
624
- TEST TEST 2
 
 
625
  </div>
626
  <div class="cdp-cont-d-box-tabed" id="cdp-tabox-manual">
627
 
@@ -660,7 +670,7 @@ function cdp_configuration() {
660
  <div class="cdp-cf">
661
  <label class="cdp-left cdp-f-s-18"><input type="radio" class="cdp-d-option cdp-radio" value="0" name="cdp-radio-btn-dtitles" checked>No</label>
662
  <label class="cdp-left cdp-f-s-18"><input type="radio" class="cdp-d-option cdp-radio" value="1" name="cdp-radio-btn-dtitles">Yes</label>
663
- <span class="cdp-green cdp-f-s-17 cdp-tooltip-top cdp-left" title="The copies you created may have been given different titles automatically (according to the rules in <a href='#' class='cdp-go-to-names-chapter'>this chapter</a>) and therefore would not count as duplicates as they have different titles.<br /><br />To remedy this, you can select “Yes” here so that those posts/pages also get considered as duplicates." style="line-height: 44px;">When does “yes” make sense here?</span>
664
  </div>
665
  </div>
666
  <!-- <div class="cdp-padding-15-h cdp-f-s-18">
@@ -703,7 +713,7 @@ function cdp_configuration() {
703
  </div>
704
  <div class="cdp-relative cdp-f-s-19">
705
  <span class="cdp-tooltip-premium" data-top="0">
706
- <b>More filters (optional)</b>: Only list them (as candidate for deletion) if they<span id="cdpp-switch-mf"> […]</span> <span class="cdp-premium-icon cdp-big-icon"></span>
707
  </span>
708
  </div>
709
  <?php if ($areWePro && function_exists('cdpp_more_filters')) cdpp_more_filters(); ?>
@@ -753,7 +763,7 @@ function cdp_configuration() {
753
  <th>Slug/URL</th>
754
  <th>Type</th>
755
  <th>Date created</th>
756
- <th># Words</th>
757
  </tr>
758
  </thead>
759
  <thead>
@@ -876,7 +886,7 @@ function cdp_configuration() {
876
  </div>
877
  </div>
878
  <div class="cdp-padding cdp-f-s-17 cdp-center">
879
- <a href="#" class="cdp-close-chapter">Close chapter</a>
880
  </div>
881
  </div>
882
  </div>
204
  <tbody class="cdp-ff-b1 cdp-f-s-18 cdp-tbody-of-settings">
205
  <tr>
206
  <td><label class="cdp-relative"><input <?php echo $defaults['title']=='true'?'checked ':''; ?>class="cdp-data-set" data-cdp-opt="title" type="checkbox" /><span>Title <span class="cdp-info-icon"></span></span></label></td>
207
+ <td>…get the title as defined in the <a href="#" class="cdp-go-to-names-chapter"><span class="cdp-green">next section</span></a>.</td>
208
  <td>…be titled “Untitled”.</td>
209
  </tr>
210
  <tr>
374
  <div class="cdp-center cdp-padding cdp-p-35-b">
375
  <button class="cdp-button cdp-save-options">Save</button>
376
  <div class="cdp-padding cdp-f-s-17">
377
+ <a href="#" class="cdp-close-chapter">Close section</a>
378
  </div>
379
  </div>
380
  </div>
465
  <div class="cdp-center">
466
  <button class="cdp-button cdp-save-options">Save</button>
467
  <div class="cdp-padding cdp-f-s-17">
468
+ <a href="#" class="cdp-close-chapter">Close section</a>
469
  </div>
470
  </div>
471
  </div>
528
  if (isset($globals['roles'][$rn]) && $globals['roles'][$rn] == 'true')
529
  $checked = ' checked';
530
 
531
+ echo('<label for="cdp-roles-'.$rn.'"><input class="cdp-other-roles" id="cdp-roles-'.$rn.'"'.$checked.' type="checkbox"'.$d.' name="'.$rn.'">'.$role.'</label>');
532
  }
533
  ?>
534
  </div>
552
  <label for="cdp-o-posts2"><input <?php echo ($gos['cdp-references-post'] == 'true')?'checked ':''; ?>id="cdp-o-posts2" type="checkbox" class="cdp-other-inputs" name="cdp-references-post">Posts/pages lists</label>
553
  <label for="cdp-o-edits2"><input <?php echo ($gos['cdp-references-edit'] == 'true')?'checked ':''; ?>id="cdp-o-edits2" type="checkbox" class="cdp-other-inputs" name="cdp-references-edit">Edit screens</label>
554
  </div>
555
+ <div><h2><b class="cdp-f-s-18 cdp-f-w-bold">Additional features</b></h2></div>
556
+ <div class="cdp-p-25-40 cdp-f-s-18 cdp-f-w-light">
557
+ <label for="cdp-o-premium-import">
558
+ <?php if (!isset($gos['cdp-premium-import'])) $gos['cdp-premium-import'] = false; ?>
559
+ <input id="cdp-o-premium-import"<?php echo ((!$areWePro)?' disabled="true"':''); ?> <?php echo ($areWePro && $gos['cdp-premium-import'] == 'true')?'checked ':''; ?> type="checkbox" class="cdp-other-inputs" name="cdp-premium-import" />
560
+ <span class="cdp-relative cdp-tooltip-premium" data-top="5">Show post export & import buttons <span class="cdp-premium-icon cdp-big-icon" style="top: calc(50% - 12px)"></span></span>
561
+ </label>
562
+ </div>
563
  <div class="cdp-center cdp-padding-15-h">
564
  <button class="cdp-button cdp-save-options">Save</button>
565
  <div class="cdp-padding cdp-f-s-17">
566
+ <a href="#" class="cdp-close-chapter">Close section</a>
567
  </div>
568
  </div>
569
  </div>
575
 
576
  <!-- DELETE SECTION -->
577
  <div class="cdp-collapsible" data-cdp-group="mains">
578
+ <div class="cdp-d-xclicked cdp-collapsible-title">
579
  <div class="cdp-cf">
580
  <div class="cdp-left cdp-ff-b1"><b class="cdp-ff-b4">Delete duplicate posts/pages</b></div>
581
  <div class="cdp-right"><i class="cdp-arrow cdp-arrow-left"></i></div>
592
  <div class="cdp-left cdp-tab-element cdp-tab-active" data-box="cdp-tabox-manual">
593
  <span>Manual Cleanup</span>
594
  </div>
595
+ <div class="cdp-left cdp-tab-element cdp-tooltip-premium" data-top="-4" data-box="cdp-tabox-automatic"<?php echo ((!$areWePro)?' data-disabled="true"':''); ?>>
596
  <span class="cdp-relative">Automatic Cleanup <span class="cdp-premium-icon cdp-big-icon"></span></span>
597
  </div>
598
  <div class="cdp-left cdp-tab-element" data-box="cdp-tabox-redirects">
629
  <?php } ?>
630
  </div>
631
  <div class="cdp-cont-d-box-tabed" id="cdp-tabox-automatic">
632
+ <?php if ($areWePro && function_exists('cdpp_automated_deletion')) { ?>
633
+ <?php cdpp_automated_deletion($cdp_plug_url); ?>
634
+ <?php } ?>
635
  </div>
636
  <div class="cdp-cont-d-box-tabed" id="cdp-tabox-manual">
637
 
670
  <div class="cdp-cf">
671
  <label class="cdp-left cdp-f-s-18"><input type="radio" class="cdp-d-option cdp-radio" value="0" name="cdp-radio-btn-dtitles" checked>No</label>
672
  <label class="cdp-left cdp-f-s-18"><input type="radio" class="cdp-d-option cdp-radio" value="1" name="cdp-radio-btn-dtitles">Yes</label>
673
+ <span class="cdp-green cdp-f-s-17 cdp-tooltip-top cdp-left" title="The copies you created may have been given different titles automatically (according to the rules in <a href='#' class='cdp-go-to-names-chapter'>this section</a>) and therefore would not count as duplicates as they have different titles.<br /><br />To remedy this, you can select “Yes” here so that those posts/pages also get considered as duplicates." style="line-height: 44px;">When does “yes” make sense here?</span>
674
  </div>
675
  </div>
676
  <!-- <div class="cdp-padding-15-h cdp-f-s-18">
713
  </div>
714
  <div class="cdp-relative cdp-f-s-19">
715
  <span class="cdp-tooltip-premium" data-top="0">
716
+ <b>Filter results (optional)</b>: Only list them, if they<span id="cdpp-switch-mf"> […]</span> <span class="cdp-premium-icon cdp-big-icon"></span>
717
  </span>
718
  </div>
719
  <?php if ($areWePro && function_exists('cdpp_more_filters')) cdpp_more_filters(); ?>
763
  <th>Slug/URL</th>
764
  <th>Type</th>
765
  <th>Date created</th>
766
+ <th># of words</th>
767
  </tr>
768
  </thead>
769
  <thead>
886
  </div>
887
  </div>
888
  <div class="cdp-padding cdp-f-s-17 cdp-center">
889
+ <a href="#" class="cdp-close-chapter">Close section</a>
890
  </div>
891
  </div>
892
  </div>
menu/modal.php CHANGED
@@ -191,7 +191,7 @@ function cdp_modal($screen = '', $profiles = array()) {
191
 
192
  <div class="cdp-modal-copy-times cdp-f-s-15">
193
  <div class="cdp-modal-copy-times-content">
194
- <?php if (function_exists('cdpp_change_post_type')) cdpp_change_post_type(); ?>
195
  <div class="cdp-cf cdp-inline">
196
  <div class="cdp-left" style="line-height: 40px;">Copy&nbsp;</div>
197
  <div class="cdp-left" style="line-height: 40px;">
191
 
192
  <div class="cdp-modal-copy-times cdp-f-s-15">
193
  <div class="cdp-modal-copy-times-content">
194
+ <?php if ($areWePro && function_exists('cdpp_change_post_type')) cdpp_change_post_type(); ?>
195
  <div class="cdp-cf cdp-inline">
196
  <div class="cdp-left" style="line-height: 40px;">Copy&nbsp;</div>
197
  <div class="cdp-left" style="line-height: 40px;">
menu/notifications.php CHANGED
@@ -25,6 +25,7 @@ if (!defined('ABSPATH')) exit;
25
  if (sizeof($cdp_cron) > 0) {
26
  foreach ($cdp_cron as $cron => $val) {
27
  $entry = array('t' => $cron, 's' => $val['shown'], 'f' => $val['f'], 'st' => $val['start']);
 
28
 
29
  if ($val['done'] == false) array_push($sorts['undone'], $entry);
30
  else if ($val['done'] == true) array_push($sorts['done'], $entry);
@@ -51,7 +52,7 @@ if (!defined('ABSPATH')) exit;
51
  $red = (($current - $val['st']) >= 86400) ? true : false;
52
  $html .= '<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud' . (($val['s'] == false)?' cdp-bnew-notis':'') . '" data-token="' . $val['t'] . '">
53
  <div style="display: block; width: calc(100% - 3px);">
54
- <div class="cdp-dropdown-left' . (($red)?' cdp-red':'') . '">' . (($val['f'] == 'delete')?'Deleting Posts':'Copying Posts') . '</div>
55
  <div class="cdp-dropdown-right cdp-noti-kill-btn">Kill</div>
56
  </div>
57
  </a>';
@@ -71,9 +72,18 @@ if (!defined('ABSPATH')) exit;
71
  <li class="cdp-dd-done-list">';
72
 
73
  foreach ($sorts['done'] as $index => $val) {
74
- $html .= '<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d' . (($val['s'] == false)?' cdp-bnew-notis':'') . '" data-token="' . $val['t'] . '">
 
 
 
 
 
 
 
 
 
75
  <div style="display: block; width: calc(100% - 3px);">
76
- <div class="cdp-dropdown-left">' . (($val['f'] == 'delete')?'Deleted Posts':'Copied Posts') . '</div>
77
  <div class="cdp-dropdown-right cdp-noti-hide-btn">Hide</div>
78
  </div>
79
  </a>';
25
  if (sizeof($cdp_cron) > 0) {
26
  foreach ($cdp_cron as $cron => $val) {
27
  $entry = array('t' => $cron, 's' => $val['shown'], 'f' => $val['f'], 'st' => $val['start']);
28
+ if (isset($val['data'])) $entry['data'] = $val['data'];
29
 
30
  if ($val['done'] == false) array_push($sorts['undone'], $entry);
31
  else if ($val['done'] == true) array_push($sorts['done'], $entry);
52
  $red = (($current - $val['st']) >= 86400) ? true : false;
53
  $html .= '<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud' . (($val['s'] == false)?' cdp-bnew-notis':'') . '" data-token="' . $val['t'] . '">
54
  <div style="display: block; width: calc(100% - 3px);">
55
+ <div class="cdp-dropdown-left' . (($red)?' cdp-red':'') . '">' . (($val['f'] == 'delete')?'Deleting Posts':'Auto Cleaning-up') . '</div>
56
  <div class="cdp-dropdown-right cdp-noti-kill-btn">Kill</div>
57
  </div>
58
  </a>';
72
  <li class="cdp-dd-done-list">';
73
 
74
  foreach ($sorts['done'] as $index => $val) {
75
+ $format = ''; $ftext = '';
76
+ if (isset($val['data'])) {
77
+ if (array_key_exists('formated-date', $val['data'])) $format = $val['data']['formated-date'];
78
+ if (array_key_exists('text', $val['data'])) $ftext = $val['data']['text'];
79
+
80
+ if ($ftext != '') $ftext = 'data-ftext="' . $ftext . '" ';
81
+ if ($format != '') $format = 'data-fdate="Completed at ' . $format . '" ';
82
+ }
83
+
84
+ $html .= '<a ' . $ftext . $format . 'class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d' . (($val['s'] == false)?' cdp-bnew-notis':'') . '" data-token="' . $val['t'] . '">
85
  <div style="display: block; width: calc(100% - 3px);">
86
+ <div class="cdp-dropdown-left">' . (($val['f'] == 'delete')?'Deleted Posts':'Auto Cleaned-up') . '</div>
87
  <div class="cdp-dropdown-right cdp-noti-hide-btn">Hide</div>
88
  </div>
89
  </a>';
menu/tooltips.php CHANGED
@@ -252,7 +252,7 @@ function cdp_tooltip_content($profiles = array()) {
252
  <div class="cdp-relative">
253
  <div class="cdp-modal-copy-times cdp-tooltip-c-t cdp-f-s-15">
254
  <div class="cdp-modal-copy-times-content">
255
- <?php if (function_exists('cdpp_change_post_type')) cdpp_change_post_type(); ?>
256
  <div class="cdp-cf cdp-inline">
257
  <div class="cdp-left" style="line-height: 40px;">Copy&nbsp;</div>
258
  <div class="cdp-left" style="line-height: 40px;">
252
  <div class="cdp-relative">
253
  <div class="cdp-modal-copy-times cdp-tooltip-c-t cdp-f-s-15">
254
  <div class="cdp-modal-copy-times-content">
255
+ <?php if ($areWePro && function_exists('cdpp_change_post_type')) cdpp_change_post_type(); ?>
256
  <div class="cdp-cf cdp-inline">
257
  <div class="cdp-left" style="line-height: 40px;">Copy&nbsp;</div>
258
  <div class="cdp-left" style="line-height: 40px;">
menu/variables.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
- /**
3
- * Copy & Delete Posts – default menu.
4
- *
5
- * @package CDP
6
- * @subpackage SendingVariables
7
- * @author CopyDeletePosts
8
- * @since 1.0.0
9
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
-
11
- // Exit if accessed directly.
12
- if (!defined('ABSPATH')) exit;
13
-
14
- /** –– **\
15
- * There are constant (but dynamic per blog) variables.
16
- * @since 1.0.0
17
- */
18
- function cdp_vars($cdp_plug_url = 'x', $post_id = false, $parent = false, $notify = false) {
19
-
20
- // $minutes = ((defined('CDP_SCRIPT_DEBUG'))?CDP_SCRIPT_DEBUG:false);
21
- $shouldShowNotify = false;
22
- $daysfrom = 0;
23
- $totalDays = 0;
24
- $textRev = '';
25
- if ($notify == true) {
26
- $reviews = get_option('_cdp_review', false);
27
-
28
- if ($reviews != false) {
29
- $now = time();
30
- $isMinutes = false; // Use below as minutes not hours
31
- $howMuchDaysMinutes = 30; // days/minutes number
32
- $remindDaysMins = 14; // days/minutes reminder
33
- $day = ((!$isMinutes)?60*60*24:60);
34
- $days = (60 * ((!$isMinutes)?(60*24):(1)) * $howMuchDaysMinutes);
35
- $reminds = (60 * ((!$isMinutes)?(60*24):(1)) * $remindDaysMins);
36
- $totalDays = floor(($now - $reviews['installed']) / $day);
37
-
38
- if (array_key_exists(get_current_user_id(), $reviews['users'])) {
39
- if (array_key_exists('dismiss', $reviews['users'][get_current_user_id()])) {
40
- if ($reviews['users'][get_current_user_id()]['dismiss'] !== true) {
41
- $dismissedon = $now - intval($reviews['users'][get_current_user_id()]['dismiss']);
42
- $daysfrom = floor($dismissedon / $reminds);
43
- if ($daysfrom >= $remindDaysMins) {
44
- $shouldShowNotify = true;
45
- $textRev = 'Because you wanted us to remind about it later, we did. ';
46
- }
47
- }
48
- }
49
- } else {
50
- $daysfrom = floor(($now - $reviews['installed']) / $day);
51
- if ($daysfrom >= $howMuchDaysMinutes) $shouldShowNotify = true;
52
- }
53
-
54
- }
55
- }
56
-
57
- ?>
58
-
59
- <?php if ($shouldShowNotify == true) { ?>
60
- <div id="cdp-review-notice" class="notice is-dismissible notice-success" style="margin-top:10px; overflow: hidden;">
61
- <p>We noticed you've been using the Copy & Delete Posts plugin for over <?php echo $totalDays; ?> <?php echo ((!$isMinutes)?'days':'minutes'); ?>. <?php echo $textRev; ?>Could you please do us a BIG favor and give us a nice review?</p>
62
- <p class="actions">
63
- <a id="cdp-review-review" href="https://bit.ly/2VeAf2E" target="_blank" class="button button-primary cdp-review-button cdp-tooltip-top" title="It will open WordPress review's page and dismiss this banner forever!">Yes, sounds fair!</a>
64
- <a id="cdp-review-already" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="Thank you, it will dismiss this banner forerver!">I already did!</a>
65
- <a id="cdp-review-later" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="It will show the banner again in 14 days">Remind me later</a>
66
- <a id="cdp-review-no" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="It will dismiss this banner forever!">No, not good enough<span id="cdp-review-sad"> :(</span></a>
67
- </p>
68
- <button type="button" class="notice-dismiss">
69
- <span class="screen-reader-text">Dismiss this notice.</span>
70
- </button>
71
- </div>
72
- <?php } ?>
73
-
74
- <script>
75
- if (typeof ajaxurl === 'undefined') ajaxurl = '<?php echo esc_url(admin_url('admin-ajax.php')); ?>';
76
- </script>
77
- <div class="cdp-copy-alert-success" style="top: -28px; opacity: 0; display: none;">
78
- <img src="<?php echo $cdp_plug_url ?>/assets/imgs/copy.png" alt="Successfull copy image">
79
- </div>
80
- <div class="cdp-copy-loader-overlay" style="opacity: 0">
81
- <div class="cdp-text-overlay">
82
- <h1 style="color: white; font-size: 25px;">Please wait, copying in progress...</h1>
83
- <p>
84
- If you’re making a lot of copies it can take a while
85
- <br>(up to 5 minutes if you’re on a slow server).
86
- </p>
87
- <span>Average time is 8 copies per second.</span>
88
- </div>
89
- <div class="cdp-spinner"></div>
90
- </div>
91
- <input type="text" hidden id="cdp-purl" style="display: none; visibility: hidden;" value="<?php echo $cdp_plug_url ?>">
92
-
93
- <?php if ($post_id != false): ?>
94
- <input type="text" hidden id="cdp-current-post-id" style="display: none; visibility: hidden;" value="<?php echo $post_id ?>">
95
- <?php endif;?>
96
-
97
- <?php if ($parent != false): ?>
98
- <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'] ?>">
99
- <?php endif;?>
100
-
101
- <?php
102
- }
103
- /** –– **/
1
+ <?php
2
+ /**
3
+ * Copy & Delete Posts – default menu.
4
+ *
5
+ * @package CDP
6
+ * @subpackage SendingVariables
7
+ * @author CopyDeletePosts
8
+ * @since 1.0.0
9
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
+
11
+ // Exit if accessed directly.
12
+ if (!defined('ABSPATH')) exit;
13
+
14
+ /** –– **\
15
+ * There are constant (but dynamic per blog) variables.
16
+ * @since 1.0.0
17
+ */
18
+ function cdp_vars($cdp_plug_url = 'x', $post_id = false, $parent = false, $notify = false) {
19
+
20
+ // $minutes = ((defined('CDP_SCRIPT_DEBUG'))?CDP_SCRIPT_DEBUG:false);
21
+ $shouldShowNotify = false;
22
+ $daysfrom = 0;
23
+ $totalDays = 0;
24
+ $textRev = '';
25
+ if ($notify == true) {
26
+ $reviews = get_option('_cdp_review', false);
27
+
28
+ if ($reviews != false) {
29
+ $now = time();
30
+ $isMinutes = false; // Use below as minutes not hours
31
+ $howMuchDaysMinutes = 30; // days/minutes number
32
+ $remindDaysMins = 14; // days/minutes reminder
33
+ $day = ((!$isMinutes)?60*60*24:60);
34
+ $days = (60 * ((!$isMinutes)?(60*24):(1)) * $howMuchDaysMinutes);
35
+ $reminds = (60 * ((!$isMinutes)?(60*24):(1)) * $remindDaysMins);
36
+ $totalDays = floor(($now - $reviews['installed']) / $day);
37
+
38
+ if (array_key_exists(get_current_user_id(), $reviews['users'])) {
39
+ if (array_key_exists('dismiss', $reviews['users'][get_current_user_id()])) {
40
+ if ($reviews['users'][get_current_user_id()]['dismiss'] !== true) {
41
+ $dismissedon = $now - intval($reviews['users'][get_current_user_id()]['dismiss']);
42
+ $daysfrom = floor($dismissedon / $reminds);
43
+ if ($daysfrom >= $remindDaysMins) {
44
+ $shouldShowNotify = true;
45
+ $textRev = 'Because you wanted us to remind about it later, we did. ';
46
+ }
47
+ }
48
+ }
49
+ } else {
50
+ $daysfrom = floor(($now - $reviews['installed']) / $day);
51
+ if ($daysfrom >= $howMuchDaysMinutes) $shouldShowNotify = true;
52
+ }
53
+
54
+ }
55
+ }
56
+
57
+ ?>
58
+
59
+ <?php if ($shouldShowNotify == true) { ?>
60
+ <div id="cdp-review-notice" class="notice is-dismissible notice-success" style="margin-top:10px; overflow: hidden;">
61
+ <p>We noticed you've been using the Copy & Delete Posts plugin for over <?php echo $totalDays; ?> <?php echo ((!$isMinutes)?'days':'minutes'); ?>. <?php echo $textRev; ?>Could you please do us a BIG favor and give us a nice review?</p>
62
+ <p class="actions">
63
+ <a id="cdp-review-review" href="https://bit.ly/2VeAf2E" target="_blank" class="button button-primary cdp-review-button cdp-tooltip-top" title="It will open WordPress review's page and dismiss this banner forever!">Yes, sounds fair!</a>
64
+ <a id="cdp-review-already" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="Thank you, it will dismiss this banner forerver!">I already did!</a>
65
+ <a id="cdp-review-later" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="It will show the banner again in 14 days">Remind me later</a>
66
+ <a id="cdp-review-no" href="#" style="margin-left:10px" class="cdp-review-button cdp-tooltip-top" title="It will dismiss this banner forever!">No, not good enough<span id="cdp-review-sad"> :(</span></a>
67
+ </p>
68
+ <button type="button" class="notice-dismiss">
69
+ <span class="screen-reader-text">Dismiss this notice.</span>
70
+ </button>
71
+ </div>
72
+ <?php } ?>
73
+
74
+ <script>
75
+ if (typeof ajaxurl === 'undefined') ajaxurl = '<?php echo esc_url(admin_url('admin-ajax.php')); ?>';
76
+ </script>
77
+ <div class="cdp-copy-alert-success" style="top: -28px; opacity: 0; display: none;">
78
+ <img src="<?php echo $cdp_plug_url ?>/assets/imgs/copy.png" alt="Successfull copy image">
79
+ </div>
80
+ <div class="cdp-copy-loader-overlay" style="opacity: 0">
81
+ <div class="cdp-text-overlay">
82
+ <h1 style="color: white; font-size: 25px;">Please wait, copying in progress...</h1>
83
+ <p>
84
+ If you’re making a lot of copies it can take a while
85
+ <br>(up to 5 minutes if you’re on a slow server).
86
+ </p>
87
+ <span>Average time is 8 copies per second.</span>
88
+ </div>
89
+ <div class="cdp-spinner"></div>
90
+ </div>
91
+ <input type="text" hidden id="cdp-purl" style="display: none; visibility: hidden;" value="<?php echo $cdp_plug_url ?>">
92
+
93
+ <?php if ($post_id != false): ?>
94
+ <input type="text" hidden id="cdp-current-post-id" style="display: none; visibility: hidden;" value="<?php echo $post_id ?>">
95
+ <?php endif;?>
96
+
97
+ <?php if ($parent != false): ?>
98
+ <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'] ?>">
99
+ <?php endif;?>
100
+
101
+ <?php
102
+ }
103
+ /** –– **/
post/handler.php CHANGED
@@ -48,7 +48,7 @@
48
  // Pointers
49
  if ($_POST['f'] == 'no_intro') cdp_add_new_no_intro();
50
  else if ($_POST['f'] == 'intro_again') cdp_add_new_intro();
51
- else if ($_POST['f'] == 'save_options') cdp_save_plugin_options();
52
  else if ($_POST['f'] == 'copy_post') cdp_insert_new_post($areWePro);
53
  else if ($_POST['f'] == 'get_settings') cdp_get_profile();
54
  else if ($_POST['f'] == 'get_all_settings') cdp_get_all_profiles();
@@ -72,6 +72,12 @@
72
  else if ($_POST['f'] == 'delete_redirect' && $areWePro) cdpp_delete_redirection();
73
  else if ($_POST['f'] == 'switch_redirects' && $areWePro) cdpp_switch_redirects();
74
  else if ($_POST['f'] == 'get_authors' && $areWePro) cdpp_get_authors();
 
 
 
 
 
 
75
  else if ($_POST['f'] == 'i_love_squirrels' && $areWePro) cdpp_squirrel();
76
  else echo 'error';
77
 
@@ -167,10 +173,10 @@
167
  * This function will be fired when user want to save plugin options – again.
168
  * @since 1.0.0
169
  */
170
- function cdp_save_plugin_options() {
171
 
172
  // Get the info about our professionalness
173
- global $areWePro;
174
 
175
  // Get new options and current profile.
176
  $options = ((isset($_POST['options']))?cdp_sanitize_array($_POST['options']):false);
@@ -332,7 +338,7 @@
332
  * @param $settings (array of preselected settings of profile or by user)
333
  * @return array with metadata values for post || false on wrong $metas
334
  */
335
- function cdp_filter_meta($metas, $settings, $id, $areWePro, $site) {
336
 
337
  // If $metas has wrong format return false
338
  if (!(is_array($metas) || is_object($metas))) return false;
@@ -342,6 +348,7 @@
342
  // Add or replace ours copy tracker
343
  array('_cdp_origin' => $id),
344
  array('_cdp_origin_site' => $site),
 
345
  array('_cdp_counter' => '0')
346
  );
347
 
@@ -712,7 +719,7 @@
712
  // Run process and validate response
713
  $childrens = cdp_check_childs($id); // if sizeof($this) == has childs
714
  $post_data = cdp_filter_post($post, $swap, $pConv, $settings, $taxonomies, $areWePro, $swap); // can be false
715
- $meta_data = cdp_filter_meta($meta, $settings, $id, $areWePro, $site); // can be false
716
  $inserted_posts = cdp_insert_post($id, $post_data, $times, $areWePro, $isChild, $p_ids, $site); // $res['error'] must be == 0
717
  $inserted_metas = cdp_insert_post_meta($inserted_posts['ids'], $meta_data, $areWePro, $inserted_posts['counter'], $site); // sizeof($res['error']) must be == 0
718
 
@@ -871,6 +878,7 @@
871
  'done' => false,
872
  'shown' => false,
873
  'f' => 'delete',
 
874
  'handler' => 'cdp_cron_delete',
875
  'auit' => $auit,
876
  'auitd' => $auitd
@@ -921,13 +929,15 @@
921
  $cdp_cron = get_option('_cdp_crons');
922
 
923
  foreach ($cdp_cron as $cron => $val) {
924
- if ($val['done'] != true) {
925
- echo json_encode(array(
926
- 'status' => 'fail',
927
- 'type' => 'warning',
928
- 'msg' => 'You can\'t clear messages when tasks are in progress, please firstly kill tasks or wait till the end.'
929
- ));
930
- return;
 
 
931
  }
932
  }
933
 
@@ -1000,9 +1010,9 @@
1000
  $token = ((isset($_POST['task']))?sanitize_text_field($_POST['task']):false);
1001
  $cdp_cron = get_option('_cdp_crons', array());
1002
  $handler = $cdp_cron[$token]['handler'];
1003
- $args = $cdp_cron[$token]['args'];
1004
 
1005
- if ($cdp_cron[$token]['done'] == true) {
1006
  echo json_encode(array('status' => 'fail', 'type' => 'error', 'msg' => 'This task has already ended this work, please wait for list refresh and try again.'));
1007
  return;
1008
  }
@@ -1013,7 +1023,7 @@
1013
  if ($sres == false) $status = false;
1014
  }
1015
 
1016
- if ($cdp_cron[$token]['done'] == true) $status = true;
1017
 
1018
  if ($status == true) {
1019
  unset($cdp_cron[$token]);
@@ -1045,12 +1055,15 @@
1045
  */
1046
  function cdp_debug_function() {
1047
 
1048
- // $taxonomies = get_taxonomies();
1049
- // $terms = get_terms();
1050
- $post = get_post(9574)->to_array();
 
 
1051
 
 
1052
  $things_to_debug = array(
1053
- '$post' => $post
1054
  );
1055
  var_export($things_to_debug);
1056
 
48
  // Pointers
49
  if ($_POST['f'] == 'no_intro') cdp_add_new_no_intro();
50
  else if ($_POST['f'] == 'intro_again') cdp_add_new_intro();
51
+ else if ($_POST['f'] == 'save_options') cdp_save_plugin_options($areWePro);
52
  else if ($_POST['f'] == 'copy_post') cdp_insert_new_post($areWePro);
53
  else if ($_POST['f'] == 'get_settings') cdp_get_profile();
54
  else if ($_POST['f'] == 'get_all_settings') cdp_get_all_profiles();
72
  else if ($_POST['f'] == 'delete_redirect' && $areWePro) cdpp_delete_redirection();
73
  else if ($_POST['f'] == 'switch_redirects' && $areWePro) cdpp_switch_redirects();
74
  else if ($_POST['f'] == 'get_authors' && $areWePro) cdpp_get_authors();
75
+ else if ($_POST['f'] == 'get_curr_time' && $areWePro) cdpp_get_curr_s_time();
76
+ else if ($_POST['f'] == 'get_post_export' && $areWePro) cdpp_get_for_export();
77
+ else if ($_POST['f'] == 'import_posts' && $areWePro) cdpp_take_for_import();
78
+ else if ($_POST['f'] == 'save_aci' && $areWePro) cdpp_save_cleanup_settings();
79
+ else if ($_POST['f'] == 'get_aci' && $areWePro) cdpp_get_cleanup_settings();
80
+ else if ($_POST['f'] == 'turn_off_aci' && $areWePro) cdpp_turn_the_acii_off();
81
  else if ($_POST['f'] == 'i_love_squirrels' && $areWePro) cdpp_squirrel();
82
  else echo 'error';
83
 
173
  * This function will be fired when user want to save plugin options – again.
174
  * @since 1.0.0
175
  */
176
+ function cdp_save_plugin_options($areWePro) {
177
 
178
  // Get the info about our professionalness
179
+ $areWePro = $areWePro;
180
 
181
  // Get new options and current profile.
182
  $options = ((isset($_POST['options']))?cdp_sanitize_array($_POST['options']):false);
338
  * @param $settings (array of preselected settings of profile or by user)
339
  * @return array with metadata values for post || false on wrong $metas
340
  */
341
+ function cdp_filter_meta($metas, $settings, $id, $areWePro, $site, $title) {
342
 
343
  // If $metas has wrong format return false
344
  if (!(is_array($metas) || is_object($metas))) return false;
348
  // Add or replace ours copy tracker
349
  array('_cdp_origin' => $id),
350
  array('_cdp_origin_site' => $site),
351
+ array('_cdp_origin_title' => $title),
352
  array('_cdp_counter' => '0')
353
  );
354
 
719
  // Run process and validate response
720
  $childrens = cdp_check_childs($id); // if sizeof($this) == has childs
721
  $post_data = cdp_filter_post($post, $swap, $pConv, $settings, $taxonomies, $areWePro, $swap); // can be false
722
+ $meta_data = cdp_filter_meta($meta, $settings, $id, $areWePro, $site, $post_data['post_title']); // can be false
723
  $inserted_posts = cdp_insert_post($id, $post_data, $times, $areWePro, $isChild, $p_ids, $site); // $res['error'] must be == 0
724
  $inserted_metas = cdp_insert_post_meta($inserted_posts['ids'], $meta_data, $areWePro, $inserted_posts['counter'], $site); // sizeof($res['error']) must be == 0
725
 
878
  'done' => false,
879
  'shown' => false,
880
  'f' => 'delete',
881
+ 'del_size' => sizeof($ids),
882
  'handler' => 'cdp_cron_delete',
883
  'auit' => $auit,
884
  'auitd' => $auitd
929
  $cdp_cron = get_option('_cdp_crons');
930
 
931
  foreach ($cdp_cron as $cron => $val) {
932
+ if (array_key_exists('done', $val)) {
933
+ if ($val['done'] != true) {
934
+ echo json_encode(array(
935
+ 'status' => 'fail',
936
+ 'type' => 'warning',
937
+ 'msg' => 'You can\'t clear messages when tasks are in progress, please firstly kill tasks or wait till the end.'
938
+ ));
939
+ return;
940
+ }
941
  }
942
  }
943
 
1010
  $token = ((isset($_POST['task']))?sanitize_text_field($_POST['task']):false);
1011
  $cdp_cron = get_option('_cdp_crons', array());
1012
  $handler = $cdp_cron[$token]['handler'];
1013
+ $args = (array_key_exists('args', $cdp_cron[$token])?$cdp_cron[$token]['args']:array());
1014
 
1015
+ if ($cdp_cron[$token]['done'] != false) {
1016
  echo json_encode(array('status' => 'fail', 'type' => 'error', 'msg' => 'This task has already ended this work, please wait for list refresh and try again.'));
1017
  return;
1018
  }
1023
  if ($sres == false) $status = false;
1024
  }
1025
 
1026
+ if ($cdp_cron[$token]['done'] != false) $status = true;
1027
 
1028
  if ($status == true) {
1029
  unset($cdp_cron[$token]);
1055
  */
1056
  function cdp_debug_function() {
1057
 
1058
+ // require_once('C:/Developer/Web/wordpress/wp-content/plugins/copy-delete-posts-premium/classes/methods.php');
1059
+ // $settings = get_option('cdpp_aci_settings', false);
1060
+ // $meth = new CDP_Premium($settings);
1061
+ // $posts = $meth->load_posts($settings['scan']);
1062
+ // $filtred = $meth->filter_posts($posts);
1063
 
1064
+ $cdp_cron = get_option('_cdp_crons', false);
1065
  $things_to_debug = array(
1066
+ '$cdp_cron' => $cdp_cron
1067
  );
1068
  var_export($things_to_debug);
1069
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: CopyDeletePosts, copydelete
3
  Tags: Copy post, Copy page, Duplicate posts, Duplicate pages, Clone posts, Clone pages, Delete posts, Delete pages, Duplicate post, Duplicator, Copy posts, Copy pages
4
  Requires at least: 4.9
5
- Tested up to: 5.4.1
6
- Stable tag: 1.0.6
7
  License: GPLv3
8
  Requires PHP: 7.0
9
 
@@ -112,19 +112,19 @@ Does it work if you try to delete posts then? If not, please reach out to us in
112
  If you copy posts or copy pages and want the new versions to have exactly the same title as the original post, make sure that prefix and suffix fields are blank in the “What name(s) should the copies have?” section of the Copy Delete Posts plugin area in the WordPress Dashboard.
113
 
114
  = If I duplicate posts, how do I know what their original page was? =
115
- It can be a challenge to keep track of the original content if you duplicate posts.To prevent this we suggest to not leave the prefix and suffix fields empty (which define the name of the new posts) if you duplicate posts. However, even if you want to duplicate posts without any prefix or suffix, you can solve the issue as follows: Go to section “Other options” (on the duplicate post plugin configuration page), and at the bottom of this section you will find the option “Show reference to original item?”. Check this to ensure you can always keep track of original posts when duplicate pages or posts.
116
 
117
  = Can I limit who can duplicate posts on my site? =
118
  By default only Administrators can access the plugin and copy posts or copy pages. You can extend these permissions to other user roles by going to the section “Other options”, and then tick boxes next to WP user roles that you want to give permission to. Then also those roles can duplicate posts (or delete posts).
119
 
120
  = I want to duplicate posts *only*, i.e. not duplicate pages. Is that possible? =
121
- You can limit the features to duplicate posts only by going to the “Other options”-chapter and select where it says “Content types which can be copied” to only copy posts, copy pages, copy custom posts or all of these.
122
 
123
  = How can I make bulk copies? =
124
  If you want to duplicate posts en masse, select the copy posts option in the “Bulk actions” menu. You’ll see the lightbox asking you to specify your duplicate post options (i.e. which elements to copy).
125
 
126
  = I can duplicate posts but it takes a long time. Why? =
127
- If you duplicate posts and it takes long, then you may have selected to include attachments in the duplicate posts configurations. Go to the second chapter titled “Which elements should be copied?” and de-select the attachments option to exclude those when you duplicate posts.
128
 
129
  = Can I bulk delete posts created by this plugin? =
130
  To easily clean posts or delete duplicate pages that were created by this plugin, go to ”Delete duplicate posts or pages” section, tab “Manual cleanup”. Select Posts, Pages and Custom Posts, and uncheck all other filters, then hit the Scan button. In the empty results list, you will see the message “Click here to show all copies…” - “here” link will show you all posts and pages created by our multiplier plugin.
@@ -148,6 +148,13 @@ Copy Delete Posts WordPress plugin doesn’t store any site visitor information
148
 
149
  == Changelog ==
150
 
 
 
 
 
 
 
 
151
  = 1.0.6 =
152
  * [Premium] WooCommerce integration
153
  * [Premium] Advanced Filters for deletion process
2
  Contributors: CopyDeletePosts, copydelete
3
  Tags: Copy post, Copy page, Duplicate posts, Duplicate pages, Clone posts, Clone pages, Delete posts, Delete pages, Duplicate post, Duplicator, Copy posts, Copy pages
4
  Requires at least: 4.9
5
+ Tested up to: 5.4.2
6
+ Stable tag: 1.0.7
7
  License: GPLv3
8
  Requires PHP: 7.0
9
 
112
  If you copy posts or copy pages and want the new versions to have exactly the same title as the original post, make sure that prefix and suffix fields are blank in the “What name(s) should the copies have?” section of the Copy Delete Posts plugin area in the WordPress Dashboard.
113
 
114
  = If I duplicate posts, how do I know what their original page was? =
115
+ It can be a challenge to keep track of the original content if you duplicate posts. To prevent this we suggest to not leave the prefix and suffix fields empty (which define the name of the new posts) if you duplicate posts. However, even if you want to duplicate posts without any prefix or suffix, you can solve the issue as follows: Go to section “Other options” (on the duplicate post plugin configuration page), and at the bottom of this section you will find the option “Show reference to original item?”. Check this to ensure you can always keep track of original posts when duplicate pages or posts.
116
 
117
  = Can I limit who can duplicate posts on my site? =
118
  By default only Administrators can access the plugin and copy posts or copy pages. You can extend these permissions to other user roles by going to the section “Other options”, and then tick boxes next to WP user roles that you want to give permission to. Then also those roles can duplicate posts (or delete posts).
119
 
120
  = I want to duplicate posts *only*, i.e. not duplicate pages. Is that possible? =
121
+ You can limit the features to duplicate posts only by going to the “Other options - section and select where it says “Content types which can be copied” to only copy posts, copy pages, copy custom posts or all of these.
122
 
123
  = How can I make bulk copies? =
124
  If you want to duplicate posts en masse, select the copy posts option in the “Bulk actions” menu. You’ll see the lightbox asking you to specify your duplicate post options (i.e. which elements to copy).
125
 
126
  = I can duplicate posts but it takes a long time. Why? =
127
+ If you duplicate posts and it takes long, then you may have selected to include attachments in the duplicate posts configurations. Go to the second section titled “Which elements should be copied?” and de-select the attachments option to exclude those when you duplicate posts.
128
 
129
  = Can I bulk delete posts created by this plugin? =
130
  To easily clean posts or delete duplicate pages that were created by this plugin, go to ”Delete duplicate posts or pages” section, tab “Manual cleanup”. Select Posts, Pages and Custom Posts, and uncheck all other filters, then hit the Scan button. In the empty results list, you will see the message “Click here to show all copies…” - “here” link will show you all posts and pages created by our multiplier plugin.
148
 
149
  == Changelog ==
150
 
151
+ = 1.0.7 =
152
+ * [Premium] Automatic Cleanup
153
+ * Updated banner tooltips
154
+ * Added more info to Admin Bar entries
155
+ * Added new type to Admin Bar notifications "Auto Cleanup"
156
+ * Changed logic of filter (More title options -> option "Yes")
157
+
158
  = 1.0.6 =
159
  * [Premium] WooCommerce integration
160
  * [Premium] Advanced Filters for deletion process