├── .gitignore ├── LICENSE ├── README.md ├── assets ├── css │ ├── admin-fix.css │ ├── admin-fix.min.css │ ├── dashboard.css │ ├── dashboard.min.css │ ├── editor-rtl.css │ ├── editor-rtl.min.css │ ├── editor.css │ ├── editor.min.css │ ├── fonts │ │ ├── imrc-datetime-picker-icons.eot │ │ ├── imrc-datetime-picker-icons.svg │ │ ├── imrc-datetime-picker-icons.ttf │ │ ├── imrc-datetime-picker-icons.woff │ │ └── imrc-datetime-picker-icons.woff2 │ ├── gutenberg-jalali-calendar.build.css │ ├── images │ │ ├── ui-icons_444444_256x240.png │ │ ├── ui-icons_555555_256x240.png │ │ ├── ui-icons_777620_256x240.png │ │ ├── ui-icons_777777_256x240.png │ │ ├── ui-icons_cc0000_256x240.png │ │ └── ui-icons_ffffff_256x240.png │ ├── integrations.css │ ├── integrations.min.css │ ├── jalalidatepicker.css │ ├── jalalidatepicker.min.css │ ├── jquery-ui.css │ ├── jquery-ui.min.css │ ├── keen-slider.css │ ├── keen-slider.min.css │ ├── settings.css │ ├── settings.min.css │ ├── timepicki.css │ ├── timepicki.min.css │ ├── vazir-font.css │ └── vazir-font.min.css ├── fonts │ ├── Vazirmatn-Bold.woff2 │ └── Vazirmatn-Regular.woff2 ├── images │ ├── arrow-down.png │ ├── arrow-up.png │ ├── avatar.png │ ├── gravity-forms-logo.jpg │ ├── icon.svg │ ├── mellat-logo.png │ ├── parsian-logo.png │ └── pasargad-logo.png ├── js │ ├── admin.js │ ├── admin.min.js │ ├── city-select.js │ ├── city-select.min.js │ ├── dashboard.js │ ├── dashboard.min.js │ ├── gutenberg-jalali-calendar.build.js │ ├── integrations.js │ ├── integrations.min.js │ ├── jalalidatepicker.min.js │ ├── keen-slider.min.js │ ├── timepicki.js │ ├── timepicki.min.js │ ├── wc-pg-blocks │ │ ├── wpp-wc-mellat-pg.js │ │ ├── wpp-wc-mellat-pg.min.js │ │ ├── wpp-wc-mellat-pg.min.min.js │ │ ├── wpp-wc-parsian-pg.js │ │ ├── wpp-wc-parsian-pg.min.js │ │ ├── wpp-wc-parsian-pg.min.min.js │ │ ├── wpp-wc-pasargad-pg.js │ │ ├── wpp-wc-pasargad-pg.min.js │ │ └── wpp-wc-pasargad-pg.min.min.js │ ├── wpp-checkout-fields.js │ └── wpp-checkout-fields.min.js └── svg │ ├── behance-brands-solid.svg │ ├── codepen-brands-solid.svg │ ├── facebook-brands-solid.svg │ ├── github-brands-solid.svg │ ├── google-brands-solid.svg │ ├── instagram-brands-solid.svg │ ├── linkedin-brands-solid.svg │ ├── medium-brands-solid.svg │ ├── stack-overflow-brands-solid.svg │ ├── telegram-brands-solid.svg │ ├── tiktok-brands-solid.svg │ ├── whatsapp-brands-solid.svg │ ├── wordpress-brands-solid.svg │ ├── x-twitter-brands-solid.svg │ └── youtube-brands-solid.svg ├── includes ├── admin │ ├── gutenberg-jalali-calendar.php │ ├── lists-fix.php │ ├── styles-fix.php │ └── widgets.php ├── fixes-archive.php ├── fixes-archives.php ├── fixes-calendar.php ├── fixes-dates.php ├── fixes-misc.php ├── fixes-permalinks.php ├── general.php ├── install.php ├── integrations.php ├── parsidate.php ├── plugins │ ├── advanced-custom-fields │ │ ├── acf-fields │ │ │ ├── class-wpp-acf-datepicker-v4.php │ │ │ ├── class-wpp-acf-datepicker-v5.php │ │ │ ├── class-wpp-acf-timepicker-v4.php │ │ │ └── class-wpp-acf-timepicker-v5.php │ │ └── acf.php │ ├── disable.php │ ├── easy-digital-downloads │ │ └── easy-digital-downloads.php │ ├── elementor │ │ ├── class-jalali-date-time-control.php │ │ ├── class-jalali-elementor-integration.php │ │ └── elementor.php │ └── woocommerce │ │ ├── wc-cities │ │ ├── cities │ │ │ └── IR.php │ │ └── wc-city-select.php │ │ ├── wc-gateways │ │ ├── blocks │ │ │ ├── wpp-mellat-pg-block.php │ │ │ ├── wpp-parsian-pg-block.php │ │ │ └── wpp-pasargad-pg-block.php │ │ ├── index.php │ │ ├── lib │ │ │ ├── class-rsa.php │ │ │ ├── index.php │ │ │ ├── nusoap.php │ │ │ └── pasargad-certificate.xml │ │ ├── wc-gateways.php │ │ ├── wpp-mellat-gateway.php │ │ ├── wpp-parsian-gateway.php │ │ └── wpp-pasargad-gateway.php │ │ └── woocommerce.php ├── settings.php ├── tools.php ├── views │ ├── html-about.php │ └── html-settings-sidebar.php └── widget │ ├── widget_archive.php │ └── widget_calendar.php ├── languages ├── common-strings.php ├── fa_IR.mo └── fa_IR.po ├── readme.txt ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png ├── screenshot-5.png ├── screenshot-6.png └── wp-parsidate.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .ftpconfig 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Parsi Date 2 | 3 | ![Version](https://img.shields.io/badge/version-5.1.2-blue) 4 | ![WordPress Compatible](https://img.shields.io/badge/WordPress-5.3%20to%206.7.1-blue) 5 | 6 | **Contributors:** [lord_viper](https://profiles.wordpress.org/lord_viper), [man4toman](https://profiles.wordpress.org/man4toman), [parselearn](https://profiles.wordpress.org/parselearn), [yazdaniwp](https://profiles.wordpress.org/yazdaniwp), [saeedfard](https://profiles.wordpress.org/saeedfard), [iehsanir](https://profiles.wordpress.org/iehsanir) 7 | **Donate link:** [https://wp-parsi.com/support/](https://wp-parsi.com/support/) 8 | **Tags:** shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, iran, iranian, parsidate, rtl, gutenberg, acf, woocommerce 9 | **Requires at least:** 5.3 10 | **Tested up to:** 6.7.1 11 | **Stable tag:** 5.1.2 12 | 13 | Persian date support for WordPress. 14 | 15 | ## Description 16 | 17 | This package, created by Persian developers, enhances the Persian experience on WordPress by adding Shamsi (Jalali) calendar support, character issue fixes, and RTL compatibility for the WordPress back-end. 18 | 19 | ### Key Features 20 | 21 | - Shamsi (Jalali) day-picker in Block Editor (Gutenberg) 22 | - Shamsi (Jalali) jQuery UI date-picker 23 | - [WP-Planet.ir](https://wp-planet.ir) Widget 24 | - Shamsi (Jalali) dates in posts, comments, pages, archives, search, categories 25 | - Shamsi (Jalali) dates in permalinks 26 | - Shamsi (Jalali) dates in admin sections 27 | - Shamsi (Jalali) calendar and archive widgets 28 | - RTL support and tinymce editor adjustments 29 | - Persian features in WooCommerce and ACF 30 | - Functions for converting Arabic characters and numbers to Persian 31 | - Low resource usage 32 | 33 | ## Installation 34 | 35 | 1. Upload the plugin folder to the `/wp-content/plugins/` directory. 36 | 2. Activate the plugin through the 'Plugins' menu in WordPress. 37 | 3. To use the archive widget, go to 'Widgets' and select 'بایگانی تاریخ خورشیدی'. 38 | 4. For the calendar widget, go to 'Widgets' and select 'گاه‌شمار تاریخ خورشیدی'. 39 | 40 | ## Screenshots 41 | 42 | 1. Plugin main settings 43 | 2. Conversions settings 44 | 3. Tools 45 | 4. Other plugin compatibility 46 | 5. Persian datepicker in WooCommerce 47 | 6. Persian date type in ACF 48 | 49 | ## Changelog 50 | 51 | ### 5.1.0 52 | - Added HPOS compatibility and block-based gateways in WooCommerce 53 | - Added Iranian cities for WooCommerce 54 | - Introduced Persian datepicker in Block Editor 55 | - Fixed conflicts with Jetpack and DATE_W3C format 56 | - Resolved warnings and errors related to ACF, comments feed, and archive pages 57 | - Improved Persian date support in WooCommerce 58 | - Updated settings panel design and added Vazir font to admin area 59 | - Compatibility with WordPress 6.5x and WooCommerce 8.7x 60 | 61 | 62 | ## Development Log 63 | 64 | - Improved handling of `$wp_query` in `posts_where` filter. 65 | - Fixed month dropdown bug in admin edit post date picker. 66 | 67 | ## License 68 | 69 | This project is licensed under the GPLv2 License - see the [LICENSE.md](LICENSE.md) file for details. 70 | -------------------------------------------------------------------------------- /assets/css/admin-fix.css: -------------------------------------------------------------------------------- 1 | .wrap #template textarea { 2 | direction: ltr; 3 | text-align: left; 4 | } 5 | -------------------------------------------------------------------------------- /assets/css/admin-fix.min.css: -------------------------------------------------------------------------------- 1 | .wrap #template textarea{direction:ltr;text-align:left} -------------------------------------------------------------------------------- /assets/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* Dashboard WordPress news */ 2 | #wpp_dashboard_primary .inside { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | #wpp_dashboard_primary .widget-loading { 8 | padding: 12px 12px 0; 9 | margin-bottom: 1em !important; /* Needs to override `.postbox .inside > p:last-child` in common.css */ 10 | } 11 | 12 | /* Notice when JS is off. */ 13 | #wpp_dashboard_primary .inside .notice { 14 | margin: 0; 15 | } 16 | 17 | #wpp_dashboard_primary .rss-widget { 18 | font-size: 13px; 19 | padding: 0 12px; 20 | } 21 | 22 | #wpp_dashboard_primary .rss-widget:last-child { 23 | border-bottom: none; 24 | padding-bottom: 8px; 25 | } 26 | 27 | #wpp_dashboard_primary .rss-widget a { 28 | font-weight: 400; 29 | } 30 | 31 | #wpp_dashboard_primary .rss-widget span, 32 | #wpp_dashboard_primary .rss-widget span.rss-date { 33 | color: #646970; 34 | } 35 | 36 | #wpp_dashboard_primary .rss-widget span.rss-date { 37 | margin-right: 12px; 38 | } 39 | 40 | #wpp_dashboard_primary .rss-widget ul li { 41 | padding: 4px 0; 42 | margin: 0; 43 | } 44 | 45 | #wpp_dashboard_primary a.rsswidget { 46 | font-weight: 400; 47 | } 48 | 49 | #wpp_sponsorship_placeholder { 50 | padding: 10px; 51 | background: #e1e1e1; 52 | position: relative; 53 | overflow: hidden; 54 | } 55 | 56 | #wpp_sponsorship_placeholder::before { 57 | position: absolute; 58 | top: 0; 59 | right: 0; 60 | bottom: 0; 61 | left: 0; 62 | transform: translateX(-100%); 63 | background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0)); 64 | -webkit-animation: shimmer 5s infinite; 65 | animation: shimmer 1.5s infinite; 66 | content: ""; 67 | } 68 | 69 | @-webkit-keyframes shimmer { 70 | 100% { 71 | transform: translateX(100%); 72 | } 73 | } 74 | 75 | @keyframes shimmer { 76 | 100% { 77 | transform: translateX(100%); 78 | } 79 | } 80 | 81 | #wpp_sponsorship_placeholder img { 82 | width: 90px; 83 | margin: 0 auto; 84 | display: block; 85 | } 86 | 87 | #wpp_sponsorship img { 88 | width: 100%; 89 | height: auto; 90 | } 91 | 92 | #sponsorship-guide { 93 | position: absolute; 94 | z-index: 999; 95 | top: 5px; 96 | left: 5px; 97 | } 98 | 99 | #sponsorship-guide .question { 100 | display: flex; 101 | align-items: center; 102 | cursor: pointer; 103 | width: 22px; 104 | height: 22px; 105 | justify-content: center; 106 | border-radius: 50%; 107 | background: rgba(0, 0, 0, 0.6); 108 | backdrop-filter: blur(5px); 109 | transition: width 0.3s ease-in-out, height 0.3s ease-in-out; 110 | overflow: hidden; 111 | color: #fff; 112 | padding: 3px; 113 | position: absolute; 114 | left: 0; 115 | } 116 | 117 | #sponsorship-guide .question span:nth-child(2) { 118 | width: 0; 119 | transition: ease-in-out .3s; 120 | margin: 0; 121 | overflow: hidden; 122 | } 123 | 124 | #sponsorship-guide .question:hover { 125 | width: auto; 126 | height: auto; 127 | padding: 3px 0 3px 10px; 128 | border-radius: 36px; 129 | } 130 | 131 | #sponsorship-guide .question:hover span { 132 | display: inline; 133 | width: auto; 134 | margin-right: 5px; 135 | white-space: nowrap; 136 | } 137 | 138 | #sponsorship-guide ul { 139 | display: none; 140 | position: relative; 141 | list-style: none; 142 | margin: 37px 0 0 0; 143 | opacity: 0; 144 | transition: opacity 0.3s ease-in-out; 145 | background: #fff; 146 | padding: 3px; 147 | border-radius: 5px; 148 | box-shadow: 0 0 8px #444; 149 | } 150 | 151 | #sponsorship-guide ul:before { 152 | content: ""; 153 | position: absolute; 154 | border-color: rgba(194, 225, 245, 0); 155 | border: solid transparent; 156 | border-bottom-color: white; 157 | border-width: 11px; 158 | margin-left: -10px; 159 | top: -21px; 160 | left: 14px; 161 | z-index: 1; 162 | } 163 | 164 | #sponsorship-guide ul.show { 165 | display: block; 166 | opacity: 1; 167 | } 168 | 169 | #sponsorship-guide ul li { 170 | margin: 5px 0; 171 | } 172 | 173 | #sponsorship-guide ul li a { 174 | text-decoration: none; 175 | background: #fff; 176 | padding: 5px 10px; 177 | border-radius: 5px; 178 | transition: background 0.3s; 179 | } 180 | 181 | #sponsorship-guide ul li a:hover { 182 | background: #f0f0f0; 183 | } 184 | 185 | .navigation-wrapper { 186 | position: relative; 187 | } 188 | 189 | .dots { 190 | display: flex; 191 | justify-content: center; 192 | } 193 | 194 | .dot { 195 | border: none; 196 | width: 3px; 197 | height: 3px; 198 | background: #c5c5c5; 199 | border-radius: 50%; 200 | margin: 0 5px; 201 | padding: 5px; 202 | cursor: pointer; 203 | } 204 | 205 | .dot:focus { 206 | outline: none; 207 | } 208 | 209 | .dot--active { 210 | background: #000; 211 | } 212 | 213 | .arrow { 214 | width: 30px; 215 | height: 30px; 216 | position: absolute; 217 | bottom: 5px; 218 | transform: translateY(-50%); 219 | fill: #fff; 220 | cursor: pointer; 221 | margin: 0; 222 | } 223 | 224 | .arrow:after { 225 | display: none; 226 | } 227 | 228 | .arrow--left { 229 | right: 33px; 230 | fill: #fff; 231 | background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z' %3E%3C/path%3E%3C/svg%3E"); 232 | } 233 | 234 | .arrow--right { 235 | right: 7px; 236 | background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z'%3E%3C/path%3E%3C/svg%3E"); 237 | } 238 | 239 | .arrow--disabled.arrow--left { 240 | background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' fill='grey' viewBox='0 0 24 24' %3E%3Cpath d='M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z' %3E%3C/path%3E%3C/svg%3E"); 241 | } 242 | 243 | .arrow--disabled.arrow--right { 244 | background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' fill='grey' viewBox='0 0 24 24' %3E%3Cpath d='M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z'%3E%3C/path%3E%3C/svg%3E"); 245 | } 246 | 247 | .wpps_modal { 248 | display: none; 249 | position: fixed; 250 | z-index: 1; 251 | left: 0; 252 | top: 0; 253 | width: 100%; 254 | height: 100%; 255 | overflow: auto; 256 | background-color: rgba(0, 0, 0, 0.5); 257 | } 258 | 259 | .wpps_modal-content { 260 | background-color: #fff; 261 | margin: 15% auto; 262 | padding: 20px; 263 | border: 1px solid #888; 264 | width: 80%; 265 | } 266 | 267 | .wpps_close { 268 | color: #aaa; 269 | float: right; 270 | font-size: 28px; 271 | font-weight: bold; 272 | } 273 | 274 | .wpps_close:hover, .wpps_close:focus { 275 | color: black; 276 | text-decoration: none; 277 | cursor: pointer; 278 | } 279 | 280 | .wpps_modal-btn { 281 | position: absolute; 282 | top: 10px; 283 | left: 10px; 284 | padding: 10px 20px; 285 | background-color: #007BFF; 286 | color: white; 287 | border: none; 288 | cursor: pointer; 289 | } -------------------------------------------------------------------------------- /assets/css/dashboard.min.css: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes shimmer{to{transform:translateX(100%)}}@keyframes shimmer{to{transform:translateX(100%)}}#wpp_dashboard_primary .inside{margin:0;padding:0}#wpp_dashboard_primary .widget-loading{padding:12px 12px 0;margin-bottom:1em!important}#wpp_dashboard_primary .inside .notice{margin:0}#wpp_dashboard_primary .rss-widget{font-size:13px;padding:0 12px}#wpp_dashboard_primary .rss-widget:last-child{border-bottom:none;padding-bottom:8px}#wpp_dashboard_primary .rss-widget a,#wpp_dashboard_primary a.rsswidget{font-weight:400}#wpp_dashboard_primary .rss-widget span,#wpp_dashboard_primary .rss-widget span.rss-date{color:#646970}#wpp_dashboard_primary .rss-widget span.rss-date{margin-right:12px}#wpp_dashboard_primary .rss-widget ul li{padding:4px 0;margin:0}#wpp_sponsorship_placeholder{padding:10px;background:#e1e1e1;position:relative;overflow:hidden}#wpp_sponsorship_placeholder::before{position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0)0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0));-webkit-animation:shimmer 5s infinite;animation:shimmer 1.5s infinite;content:""}#wpp_sponsorship_placeholder img{width:90px;margin:0 auto;display:block}#wpp_sponsorship img{width:100%;height:auto}#sponsorship-guide{position:absolute;z-index:999;top:5px;left:5px}#sponsorship-guide .question{display:flex;align-items:center;cursor:pointer;width:22px;height:22px;justify-content:center;border-radius:50%;background:rgba(0,0,0,.6);backdrop-filter:blur(5px);transition:width .3s ease-in-out,height .3s ease-in-out;overflow:hidden;color:#fff;padding:3px;position:absolute;left:0}#sponsorship-guide .question span:nth-child(2){width:0;transition:ease-in-out .3s;margin:0;overflow:hidden}#sponsorship-guide .question:hover{width:auto;height:auto;padding:3px 0 3px 10px;border-radius:36px}#sponsorship-guide .question:hover span{display:inline;width:auto;margin-right:5px;white-space:nowrap}#sponsorship-guide ul{display:none;position:relative;list-style:none;margin:37px 0 0;opacity:0;transition:opacity .3s ease-in-out;background:#fff;padding:3px;border-radius:5px;box-shadow:0 0 8px #444}#sponsorship-guide ul:before{content:"";position:absolute;border:solid transparent;border-color:transparent transparent #fff;border-width:11px;margin-left:-10px;top:-21px;left:14px;z-index:1}#sponsorship-guide ul.show{display:block;opacity:1}#sponsorship-guide ul li{margin:5px 0}#sponsorship-guide ul li a{text-decoration:none;background:#fff;padding:5px 10px;border-radius:5px;transition:background .3s}#sponsorship-guide ul li a:hover{background:#f0f0f0}.navigation-wrapper{position:relative}.dots{display:flex;justify-content:center}.dot{border:0;width:3px;height:3px;background:#c5c5c5;border-radius:50%;margin:0 5px;padding:5px;cursor:pointer}.dot:focus{outline:0}.dot--active{background:#000}.arrow{width:30px;height:30px;position:absolute;bottom:5px;transform:translateY(-50%);fill:#fff;cursor:pointer;margin:0}.arrow:after{display:none}.arrow--left{right:33px;fill:#fff;background-image:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z' %3E%3C/path%3E%3C/svg%3E")}.arrow--right{right:7px;background-image:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z'%3E%3C/path%3E%3C/svg%3E")}.arrow--disabled.arrow--left{background-image:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' fill='grey' viewBox='0 0 24 24' %3E%3Cpath d='M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z' %3E%3C/path%3E%3C/svg%3E")}.arrow--disabled.arrow--right{background-image:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' fill='grey' viewBox='0 0 24 24' %3E%3Cpath d='M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z'%3E%3C/path%3E%3C/svg%3E")}.wpps_modal{display:none;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.5)}.wpps_modal-content{background-color:#fff;margin:15%auto;padding:20px;border:1px solid #888;width:80%}.wpps_close{color:#aaa;float:right;font-size:28px;font-weight:700}.wpps_close:focus,.wpps_close:hover{color:#000;text-decoration:none;cursor:pointer}.wpps_modal-btn{position:absolute;top:10px;left:10px;padding:10px 20px;background-color:#007bff;color:#fff;border:0;cursor:pointer} -------------------------------------------------------------------------------- /assets/css/editor-rtl.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Vazir; 3 | src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); 4 | font-weight: normal; 5 | font-style: normal; 6 | font-display: swap 7 | } 8 | 9 | @font-face { 10 | font-family: Vazir; 11 | src: url('../fonts/Vazirmatn-Bold.woff2') format("woff2"); 12 | font-weight: bold; 13 | font-style: normal; 14 | font-display: swap 15 | } 16 | 17 | body, 18 | #tinymce { 19 | font-family: Vazir, tahoma, arial, serif; 20 | direction: rtl; 21 | font-size: 15px; 22 | line-height: 1.7 23 | } 24 | 25 | p { 26 | margin-top: 13px; 27 | margin-bottom: 13px 28 | } 29 | 30 | h1, 31 | h2, 32 | h3, 33 | h4, 34 | h5, 35 | h6 { 36 | margin-top: 15px; 37 | margin-bottom: 15px 38 | } -------------------------------------------------------------------------------- /assets/css/editor-rtl.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Vazir;src:url(../fonts/Vazirmatn-Regular.woff2)format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Vazir;src:url(../fonts/Vazirmatn-Bold.woff2)format("woff2");font-weight:700;font-style:normal;font-display:swap}#tinymce,body{font-family:Vazir,tahoma,arial,serif;direction:rtl;font-size:15px;line-height:1.7}p{margin-top:13px;margin-bottom:13px}h1,h2,h3,h4,h5,h6{margin-top:15px;margin-bottom:15px} -------------------------------------------------------------------------------- /assets/css/editor.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: tahoma, sans-serif; 3 | font-size: 12px; 4 | } 5 | 6 | #tinymce { 7 | font-family: tahoma, sans-serif; 8 | font-size: 12px; 9 | } 10 | -------------------------------------------------------------------------------- /assets/css/editor.min.css: -------------------------------------------------------------------------------- 1 | #tinymce,body{font-family:tahoma,sans-serif;font-size:12px} -------------------------------------------------------------------------------- /assets/css/fonts/imrc-datetime-picker-icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/fonts/imrc-datetime-picker-icons.eot -------------------------------------------------------------------------------- /assets/css/fonts/imrc-datetime-picker-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2018 by original authors @ fontello.com 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /assets/css/fonts/imrc-datetime-picker-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/fonts/imrc-datetime-picker-icons.ttf -------------------------------------------------------------------------------- /assets/css/fonts/imrc-datetime-picker-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/fonts/imrc-datetime-picker-icons.woff -------------------------------------------------------------------------------- /assets/css/fonts/imrc-datetime-picker-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/fonts/imrc-datetime-picker-icons.woff2 -------------------------------------------------------------------------------- /assets/css/gutenberg-jalali-calendar.build.css: -------------------------------------------------------------------------------- 1 | .wpp-post-scheduler .rmdp-day.rmdp-selected span:not(.highlight), 2 | .wpp-post-scheduler .rmdp-toolbar div:last-child { 3 | background-color: var(--wp-admin-theme-color) !important; 4 | box-shadow: none !important; 5 | transition: all ease-in-out .2s !important; 6 | } 7 | 8 | .wpp-post-scheduler .rmdp-day.rmdp-selected span:not(.highlight):hover, 9 | .wpp-post-scheduler .rmdp-toolbar div:last-child:hover, 10 | .wpp-post-scheduler .rmdp-arrow-container:hover { 11 | background-color: var(--wp-admin-theme-color-darker-10) !important; 12 | box-shadow: none !important 13 | } 14 | 15 | .wpp-post-scheduler .rmdp-toolbar div:first-child { 16 | white-space: nowrap; 17 | color: var(--wp-admin-theme-color); 18 | background: transparent; 19 | outline: 1px solid transparent; 20 | min-width: 0px; 21 | text-decoration: none; 22 | font-family: inherit; 23 | font-weight: 400; 24 | font-size: 13px; 25 | border: 0; 26 | transition: box-shadow .1s linear; 27 | box-sizing: border-box; 28 | border-radius: 2px; 29 | text-align: center; 30 | } 31 | 32 | .wpp-post-scheduler .rmdp-toolbar div:first-child:hover { 33 | color: var(--wp-admin-theme-color-darker-10); 34 | box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color-darker-10); 35 | } 36 | 37 | .wpp-post-scheduler .rmdp-week-day { 38 | color: rgb(117, 117, 117) !important 39 | } 40 | 41 | .wpp-post-scheduler .wpp-right, 42 | .wpp-post-scheduler .wpp-left { 43 | color: var(--wp-admin-theme-color) !important; 44 | background: url('data:image/svg+xml;charset=UTF-8,') center center no-repeat !important; 45 | 46 | } 47 | 48 | .wpp-post-scheduler .wpp-right { 49 | transform: rotate(180deg); 50 | } 51 | 52 | .wpp-post-scheduler .rmdp-arrow { 53 | border-color: var(--wp-admin-theme-color) !important; 54 | } 55 | 56 | .rmdp-arrow-container { 57 | border-radius: 2px !important; 58 | } 59 | 60 | .wpp-post-scheduler .rmdp-arrow-container:hover .rmdp-arrow { 61 | border-color: #fff !important 62 | } 63 | 64 | .wpp-post-scheduler .rmdp-header-values { 65 | font-weight: bold; 66 | } 67 | 68 | .wpp-post-scheduler .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover { 69 | background-color: transparent !important; 70 | color: var(--wp-admin-theme-color) !important; 71 | } 72 | 73 | .components-panel__row.edit-post-post-schedule { 74 | display: none !important; 75 | } 76 | 77 | .editor-post-panel__section.editor-post-summary > div > .components-flex.components-h-stack.components-v-stack:has(.components-panel__row.wpp-calendar-edit-post-post-schedule) { 78 | padding-top: 42px; 79 | position: relative; 80 | } 81 | 82 | .components-panel__row.wpp-calendar-edit-post-post-schedule { 83 | position: absolute; 84 | top: 0; 85 | left: 0; 86 | right: 0; 87 | } 88 | 89 | .components-flex.components-h-stack.editor-post-panel__row:has(.components-dropdown.editor-post-schedule__panel-dropdown) { 90 | display: none; 91 | } 92 | 93 | body[class^="version-6-"] .components-panel__body.edit-post-post-status.is-opened h2.components-panel__body-title { 94 | margin-bottom: 42px; 95 | } 96 | 97 | body[class^="version-6-"] .components-panel__row.wpp-calendar-edit-post-post-schedule { 98 | top: 41px; 99 | left: 15px; 100 | right: 15px; 101 | } -------------------------------------------------------------------------------- /assets/css/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /assets/css/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /assets/css/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /assets/css/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /assets/css/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /assets/css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /assets/css/integrations.css: -------------------------------------------------------------------------------- 1 | #wpbody-content > div.notice { 2 | display: none 3 | } 4 | 5 | .wpp-header { 6 | position: sticky; 7 | left: 0; 8 | top: 32px; 9 | background: #ffffffd6; 10 | padding: 10px 20px; 11 | margin-left: -20px; 12 | box-shadow: 0 4px 7px 0 #8080803d; 13 | backdrop-filter: blur(10px); 14 | z-index: 9; 15 | } 16 | 17 | body.rtl .wpp-header { 18 | margin-right: -20px; 19 | margin-left: 0; 20 | } 21 | 22 | .wpp-integrations-container { 23 | max-width: 1200px; 24 | margin: 0 auto; 25 | padding: 20px; 26 | } 27 | 28 | .integrations-search-container { 29 | margin-bottom: 30px; 30 | text-align: center; 31 | } 32 | 33 | #wpp-plugin-search { 34 | width: 100%; 35 | max-width: 500px; 36 | padding: 10px 15px; 37 | border: 2px solid #e0e0e0; 38 | border-radius: 8px; 39 | font-size: 16px; 40 | transition: all 0.3s ease; 41 | } 42 | 43 | #wpp-plugin-search:focus { 44 | outline: none; 45 | border-color: #4a90e2; 46 | } 47 | 48 | .integrations-grid { 49 | display: grid; 50 | grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 51 | gap: 20px; 52 | } 53 | 54 | .plugin-card { 55 | background-color: #fff; 56 | border: 1px solid #e0e0e0; 57 | border-radius: 12px; 58 | overflow: hidden; 59 | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 60 | transition: transform 0.3s ease, box-shadow 0.3s ease; 61 | width: 100%; 62 | height: 100%; 63 | margin: 0 !important; 64 | } 65 | 66 | .plugin-card:hover { 67 | transform: translateY(-5px); 68 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); 69 | } 70 | 71 | .plugin-logo { 72 | background-color: #f4f4f4; 73 | display: flex; 74 | justify-content: center; 75 | align-items: center; 76 | } 77 | 78 | .plugin-logo img { 79 | width: 100%; 80 | max-height: 100%; 81 | object-fit: contain; 82 | } 83 | 84 | .plugin-details { 85 | display: flex; 86 | flex-direction: column; 87 | flex-grow: 1; 88 | position: relative; 89 | } 90 | 91 | .plugin-content-wrapper { 92 | flex-grow: 1; 93 | padding: 15px; 94 | } 95 | 96 | .plugin-toggle-container { 97 | padding: 15px; 98 | border-top: 1px solid #e0e0e0; 99 | display: flex; 100 | justify-content: space-between; 101 | align-items: center; 102 | width: 100%; 103 | user-select: none; 104 | } 105 | 106 | .plugin-toggle { 107 | display: flex; 108 | align-items: center; 109 | gap: 10px; 110 | } 111 | 112 | .plugin-toggle-container .plugin-options-btn { 113 | margin-left: 10px; 114 | } 115 | 116 | .plugin-content-wrapper { 117 | flex-grow: 1; 118 | padding: 0 15px; 119 | } 120 | 121 | .plugin-details h3 { 122 | margin: 0 0 10px; 123 | color: #333; 124 | } 125 | 126 | .plugin-details p { 127 | color: #666; 128 | margin-bottom: 15px; 129 | } 130 | 131 | .plugin-toggle-container { 132 | padding: 15px; 133 | border-top: 1px solid #e0e0e0; 134 | display: flex; 135 | justify-content: space-between; 136 | align-items: center; 137 | } 138 | 139 | .plugin-toggle { 140 | display: flex; 141 | align-items: center; 142 | gap: 10px; 143 | } 144 | 145 | .plugin-toggle-container .plugin-options-btn { 146 | margin-left: 10px; 147 | } 148 | 149 | .plugin-notice { 150 | background-color: #f8f8f8; 151 | padding: 15px; 152 | border-radius: 8px; 153 | text-align: center; 154 | } 155 | 156 | .plugin-notice .button { 157 | margin-top: 10px; 158 | } 159 | 160 | /* Toggle Switch Styles */ 161 | .switch { 162 | position: relative; 163 | display: inline-block; 164 | width: 60px; 165 | height: 34px; 166 | } 167 | 168 | .switch input { 169 | opacity: 0; 170 | width: 0; 171 | height: 0; 172 | } 173 | 174 | .slider { 175 | position: absolute; 176 | cursor: pointer; 177 | top: 0; 178 | left: 0; 179 | right: 0; 180 | bottom: 0; 181 | background-color: #fff; 182 | transition: .4s; 183 | border: 1px solid #000; 184 | } 185 | 186 | .slider:before { 187 | position: absolute; 188 | content: ""; 189 | height: 13px; 190 | width: 13px; 191 | left: 2px; 192 | bottom: 2px; 193 | transition: .4s; 194 | background: #000; 195 | } 196 | 197 | .plugin-card { 198 | display: flex; 199 | flex-direction: column; 200 | height: 100%; 201 | } 202 | 203 | .plugin-details { 204 | flex-grow: 1; 205 | display: flex; 206 | flex-direction: column; 207 | } 208 | 209 | .plugin-content-wrapper { 210 | flex-grow: 1; 211 | padding: 15px; 212 | } 213 | 214 | .plugin-toggle-container { 215 | padding: 15px; 216 | border-top: 1px solid #e0e0e0; 217 | display: flex; 218 | justify-content: space-between; 219 | align-items: center; 220 | position: sticky; 221 | bottom: 0; 222 | background-color: #fff; 223 | } 224 | 225 | .plugin-toggle { 226 | display: flex; 227 | align-items: center; 228 | gap: 10px; 229 | cursor: pointer; 230 | } 231 | 232 | .plugin-toggle-container .plugin-options-btn { 233 | margin-right: 30px; 234 | } 235 | 236 | body.is-rtl .plugin-toggle-container .plugin-options-btn { 237 | margin-right: 0; 238 | margin-left: 30px; 239 | } 240 | 241 | input:checked + .slider { 242 | background-color: var(--e-context-primary-color) !important; 243 | border: 1px solid var(--e-context-primary-color) !important; 244 | } 245 | 246 | input:checked + .slider:before { 247 | transform: translateX(16px); 248 | background: #fff; 249 | } 250 | 251 | .slider.round { 252 | border-radius: 34px; 253 | } 254 | 255 | .slider.round:before { 256 | border-radius: 50%; 257 | } 258 | 259 | .plugin-toggle.force-enable, 260 | .plugin-toggle.force-enable .slider { 261 | cursor: no-drop; 262 | } 263 | 264 | /* Skeleton Loader */ 265 | .skeleton-loader { 266 | background-color: #f0f0f0; 267 | animation: pulse 1.5s infinite; 268 | } 269 | 270 | .skeleton-logo { 271 | height: 200px; 272 | background-color: #e0e0e0; 273 | } 274 | 275 | .skeleton-details { 276 | padding: 15px; 277 | } 278 | 279 | .skeleton-name { 280 | height: 20px; 281 | background-color: #d0d0d0; 282 | margin-bottom: 10px; 283 | } 284 | 285 | .skeleton-actions { 286 | height: 40px; 287 | background-color: #c0c0c0; 288 | } 289 | 290 | .toggle-wrapper { 291 | position: relative; 292 | width: 35px; 293 | display: inline-block; 294 | } 295 | 296 | .plugin-toggle.force-enable .toggle-wrapper, 297 | .toggle-wrapper.is-disabled { 298 | opacity: .3; 299 | pointer-events: none; 300 | } 301 | 302 | .toggle-wrapper input { 303 | opacity: 0; 304 | } 305 | 306 | /* Snackbar Styles */ 307 | .wpp-snackbar { 308 | position: fixed; 309 | bottom: 20px; 310 | right: 20px; 311 | background-color: #333; 312 | color: white; 313 | padding: 15px; 314 | border-radius: 8px; 315 | display: flex; 316 | align-items: center; 317 | opacity: 0; 318 | transform: translateY(20px); 319 | transition: all 0.3s ease-in-out; 320 | z-index: 9999; 321 | } 322 | 323 | .wpp-snackbar.show { 324 | opacity: 1; 325 | transform: translateY(0); 326 | } 327 | 328 | .wpp-snackbar.hide { 329 | opacity: 0; 330 | transform: translateY(20px); 331 | } 332 | 333 | .wpp-snackbar-content { 334 | display: flex; 335 | align-items: center; 336 | gap: 10px; 337 | } 338 | 339 | .wpp-snackbar.success { 340 | background-color: #137717; 341 | box-shadow: 0 0 20px 0 #48a813; 342 | } 343 | 344 | .wpp-snackbar.error { 345 | background-color: #bf171f; 346 | box-shadow: 0 0 20px 0 #f7455e; 347 | } 348 | 349 | @keyframes pulse { 350 | 0% { 351 | opacity: 1; 352 | } 353 | 50% { 354 | opacity: 0.5; 355 | } 356 | 100% { 357 | opacity: 1; 358 | } 359 | } 360 | 361 | @media (max-width: 768px) { 362 | .integrations-grid { 363 | grid-template-columns: 1fr; 364 | } 365 | } -------------------------------------------------------------------------------- /assets/css/integrations.min.css: -------------------------------------------------------------------------------- 1 | @keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}#wpbody-content>div.notice{display:none}.wpp-header{position:sticky;left:0;top:32px;background:#ffffffd6;padding:10px 20px;margin-left:-20px;box-shadow:0 4px 7px 0#8080803d;backdrop-filter:blur(10px);z-index:9}body.rtl .wpp-header{margin-right:-20px;margin-left:0}.wpp-integrations-container{max-width:1200px;margin:0 auto;padding:20px}.integrations-search-container{margin-bottom:30px;text-align:center}#wpp-plugin-search{width:100%;max-width:500px;padding:10px 15px;border:2px solid #e0e0e0;border-radius:8px;font-size:16px;transition:all .3s ease}#wpp-plugin-search:focus{outline:0;border-color:#4a90e2}.integrations-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}.plugin-card{background-color:#fff;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden;box-shadow:0 4px 6px rgba(0,0,0,.1);transition:transform .3s ease,box-shadow .3s ease;width:100%;margin:0!important}.plugin-card:hover{transform:translateY(-5px);box-shadow:0 6px 12px rgba(0,0,0,.15)}.plugin-logo{background-color:#f4f4f4;display:flex;justify-content:center;align-items:center}.plugin-logo img{width:100%;max-height:100%;object-fit:contain}.plugin-details{position:relative}.plugin-toggle-container{width:100%;user-select:none}.plugin-toggle-container .plugin-options-btn{margin-left:10px}.plugin-details h3{margin:0 0 10px;color:#333}.plugin-details p{color:#666;margin-bottom:15px}.plugin-notice{background-color:#f8f8f8;padding:15px;border-radius:8px;text-align:center}.plugin-notice .button{margin-top:10px}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider,.slider:before{position:absolute;transition:.4s}.slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#fff;border:1px solid #000}.slider:before{content:"";height:13px;width:13px;left:2px;bottom:2px;background:#000}.plugin-card,.plugin-details{display:flex;flex-direction:column}.plugin-card{height:100%}.plugin-details{flex-grow:1}.plugin-content-wrapper{flex-grow:1;padding:15px}.plugin-toggle-container{padding:15px;border-top:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center;position:sticky;bottom:0;background-color:#fff}.plugin-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}.plugin-toggle-container .plugin-options-btn{margin-right:30px}body.is-rtl .plugin-toggle-container .plugin-options-btn{margin-right:0;margin-left:30px}input:checked+.slider{background-color:var(--e-context-primary-color)!important;border:1px solid var(--e-context-primary-color)!important}input:checked+.slider:before{transform:translateX(16px);background:#fff}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}.plugin-toggle.force-enable,.plugin-toggle.force-enable .slider{cursor:no-drop}.skeleton-loader{background-color:#f0f0f0;animation:pulse 1.5s infinite}.skeleton-logo{height:200px;background-color:#e0e0e0}.skeleton-details{padding:15px}.skeleton-name{height:20px;background-color:#d0d0d0;margin-bottom:10px}.skeleton-actions{height:40px;background-color:silver}.toggle-wrapper{position:relative;width:35px;display:inline-block}.plugin-toggle.force-enable .toggle-wrapper,.toggle-wrapper.is-disabled{opacity:.3;pointer-events:none}.toggle-wrapper input{opacity:0}.wpp-snackbar{position:fixed;bottom:20px;right:20px;background-color:#333;color:#fff;padding:15px;border-radius:8px;display:flex;align-items:center;transition:all .3s ease-in-out;z-index:9999}.wpp-snackbar.show{opacity:1;transform:translateY(0)}.wpp-snackbar,.wpp-snackbar.hide{opacity:0;transform:translateY(20px)}.wpp-snackbar-content{display:flex;align-items:center;gap:10px}.wpp-snackbar.success{background-color:#137717;box-shadow:0 0 20px 0#48a813}.wpp-snackbar.error{background-color:#bf171f;box-shadow:0 0 20px 0#f7455e}@media (max-width:768px){.integrations-grid{grid-template-columns:1fr}} -------------------------------------------------------------------------------- /assets/css/jalalidatepicker.css: -------------------------------------------------------------------------------- 1 | /*!********************************************************************************************************************************************!*\ 2 | !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js!./src/styles/index.scss ***! 3 | \********************************************************************************************************************************************/ 4 | jdp-container { 5 | position: absolute; 6 | max-width: 307.875px; 7 | background: #fff; 8 | display: block; 9 | direction: rtl; 10 | padding: 0.5rem 0; 11 | box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24); 12 | border-radius: 4px; 13 | overflow: hidden; 14 | -ms-touch-action: manipulation; 15 | touch-action: manipulation; 16 | -moz-user-select: none; 17 | -webkit-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | -moz-animation: jdpOpenAnimation 300ms cubic-bezier(0.23, 1, 0.32, 1); 21 | -webkit-animation: jdpOpenAnimation 300ms cubic-bezier(0.23, 1, 0.32, 1); 22 | animation: jdpOpenAnimation 300ms cubic-bezier(0.23, 1, 0.32, 1); 23 | } 24 | 25 | jdp-container, jdp-container *, jdp-container *::after, jdp-container *::before { 26 | -moz-box-sizing: border-box; 27 | -webkit-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | 31 | jdp-container .jdp-icon-plus, jdp-container .jdp-icon-minus { 32 | display: inline-block; 33 | text-align: center; 34 | cursor: pointer; 35 | vertical-align: middle; 36 | overflow: hidden; 37 | flex: none; 38 | text-decoration: none; 39 | border: 1px solid #e6e6e6; 40 | border-radius: 4px; 41 | } 42 | 43 | jdp-container .jdp-icon-plus svg, jdp-container .jdp-icon-minus svg { 44 | width: 1.5rem; 45 | height: 1.5rem; 46 | padding: 0.375rem; 47 | } 48 | 49 | jdp-container .jdp-icon-plus.not-in-range, jdp-container .jdp-icon-minus.not-in-range { 50 | cursor: not-allowed; 51 | } 52 | 53 | jdp-container .jdp-icon-plus.not-in-range svg, jdp-container .jdp-icon-minus.not-in-range svg { 54 | opacity: 0.3; 55 | } 56 | 57 | jdp-container .jdp-years, jdp-container .jdp-months { 58 | display: inline-flex; 59 | margin: 0 2.5%; 60 | font-size: 120%; 61 | color: rgba(0, 0, 0, 0.8); 62 | fill: rgba(0, 0, 0, 0.8); 63 | } 64 | 65 | jdp-container .jdp-months { 66 | width: 55%; 67 | } 68 | 69 | jdp-container .jdp-years { 70 | width: 35%; 71 | } 72 | 73 | jdp-container .jdp-year, jdp-container .jdp-year input, jdp-container .jdp-year select, jdp-container .jdp-month, jdp-container .jdp-month input, jdp-container .jdp-month select { 74 | width: 100%; 75 | height: auto; 76 | text-align: center; 77 | background: transparent; 78 | border: none; 79 | border-radius: 0; 80 | padding: 0; 81 | margin: 0; 82 | display: inline-block; 83 | font-size: inherit; 84 | font-family: inherit; 85 | vertical-align: initial; 86 | font-weight: 300; 87 | color: inherit; 88 | line-height: inherit; 89 | outline: none; 90 | } 91 | 92 | jdp-container .jdp-year:focus, jdp-container .jdp-year:active, jdp-container .jdp-year input:focus, jdp-container .jdp-year input:active, jdp-container .jdp-year select:focus, jdp-container .jdp-year select:active, jdp-container .jdp-month:focus, jdp-container .jdp-month:active, jdp-container .jdp-month input:focus, jdp-container .jdp-month input:active, jdp-container .jdp-month select:focus, jdp-container .jdp-month select:active { 93 | outline: none; 94 | } 95 | 96 | jdp-container .jdp-year:hover, jdp-container .jdp-year input:hover, jdp-container .jdp-year select:hover, jdp-container .jdp-month:hover, jdp-container .jdp-month input:hover, jdp-container .jdp-month select:hover { 97 | background: rgba(0, 0, 0, 0.05); 98 | } 99 | 100 | jdp-container .jdp-year input, jdp-container .jdp-month input { 101 | cursor: text; 102 | -webkit-appearance: none; 103 | -moz-appearance: textfield; 104 | } 105 | 106 | jdp-container .jdp-year input::-webkit-outer-spin-button, jdp-container .jdp-year input::-webkit-inner-spin-button, jdp-container .jdp-month input::-webkit-outer-spin-button, jdp-container .jdp-month input::-webkit-inner-spin-button { 107 | -webkit-appearance: none; 108 | } 109 | 110 | jdp-container .jdp-year select, jdp-container .jdp-month select { 111 | cursor: pointer; 112 | position: relative; 113 | -webkit-appearance: menulist; 114 | -moz-appearance: menulist; 115 | } 116 | 117 | jdp-container .jdp-days { 118 | padding: 0.5rem 0 0 0; 119 | outline: 0; 120 | text-align: left; 121 | width: 100%; 122 | display: inline-block; 123 | display: -ms-flexbox; 124 | display: flex; 125 | flex-wrap: wrap; 126 | -ms-flex-wrap: wrap; 127 | -ms-flex-pack: justify; 128 | justify-content: space-around; 129 | } 130 | 131 | jdp-container .jdp-day, jdp-container .jdp-day-name { 132 | background: none; 133 | border: 1px solid transparent; 134 | font-weight: 400; 135 | width: 14.2857143%; 136 | flex-basis: 14.2857143%; 137 | height: 31px; 138 | line-height: 31px; 139 | margin: 2px 0; 140 | display: inline-block; 141 | position: relative; 142 | justify-content: center; 143 | text-align: center; 144 | color: rgba(0, 0, 0, 0.8); 145 | } 146 | 147 | jdp-container .jdp-day.today, jdp-container .jdp-day-name.today { 148 | border-color: rgba(0, 0, 0, 0.3); 149 | } 150 | 151 | jdp-container .jdp-day.selected, jdp-container .jdp-day-name.selected { 152 | background-color: #569ff7 !important; 153 | color: #fff !important; 154 | } 155 | 156 | jdp-container .jdp-day.last-week, jdp-container .jdp-day-name.last-week { 157 | color: #f44336; 158 | } 159 | 160 | jdp-container .jdp-day:empty { 161 | background: rgba(0, 0, 0, 0.05); 162 | border-color: #fff; 163 | } 164 | 165 | jdp-container .jdp-day:not(:empty) { 166 | cursor: pointer; 167 | border-radius: 4px; 168 | transition: linear 0.1s; 169 | } 170 | 171 | jdp-container .jdp-day:not(:empty):hover { 172 | background: rgba(0, 0, 0, 0.1); 173 | transform: scale(1.15); 174 | z-index: 1; 175 | } 176 | 177 | jdp-container .jdp-day-name { 178 | border-radius: 0; 179 | font-weight: 900; 180 | font-size: 90%; 181 | background-color: rgba(0, 0, 0, 0.1); 182 | cursor: default; 183 | } 184 | 185 | jdp-container .jdp-footer { 186 | padding: 0.5rem 0.5rem 0 0.5rem; 187 | outline: 0; 188 | width: 100%; 189 | display: inline-block; 190 | display: -ms-flexbox; 191 | display: flex; 192 | flex-wrap: nowrap; 193 | -ms-flex-wrap: nowrap; 194 | -ms-flex-pack: justify; 195 | justify-content: space-between; 196 | } 197 | 198 | jdp-container .jdp-btn-today, jdp-container .jdp-btn-empty { 199 | background: #569ff7; 200 | font-size: 90%; 201 | padding: 0.3em 0.6em; 202 | border-radius: 5px; 203 | font-weight: 400; 204 | display: inline-block; 205 | text-align: center; 206 | color: #fff; 207 | cursor: pointer; 208 | } 209 | 210 | @-webkit-keyframes jdpOpenAnimation { 211 | from { 212 | opacity: 0; 213 | transform: scale(0.8); 214 | } 215 | to { 216 | opacity: 1; 217 | transform: scale(1); 218 | } 219 | } 220 | 221 | @keyframes jdpOpenAnimation { 222 | from { 223 | opacity: 0; 224 | transform: scale(0.8); 225 | } 226 | to { 227 | opacity: 1; 228 | transform: scale(1); 229 | } 230 | } 231 | 232 | @media only screen and (max-width: 307.875px) { 233 | jdp-container { 234 | max-width: 90%; 235 | } 236 | } 237 | 238 | #ui-datepicker-div { 239 | display: none !important 240 | } -------------------------------------------------------------------------------- /assets/css/jalalidatepicker.min.css: -------------------------------------------------------------------------------- 1 | /*!********************************************************************************************************************************************!*\ 2 | !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js!./src/styles/index.scss ***! 3 | \********************************************************************************************************************************************/ 4 | @-webkit-keyframes jdpOpenAnimation{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes jdpOpenAnimation{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}jdp-container{position:absolute;max-width:307.875px;background:#fff;display:block;direction:rtl;padding:.5rem 0;box-shadow:0 1px 6px rgba(0,0,0,.12),0 1px 4px rgba(0,0,0,.24);border-radius:4px;overflow:hidden;-ms-touch-action:manipulation;touch-action:manipulation;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-moz-animation:jdpOpenAnimation 300ms cubic-bezier(.23,1,.32,1);-webkit-animation:jdpOpenAnimation 300ms cubic-bezier(.23,1,.32,1);animation:jdpOpenAnimation 300ms cubic-bezier(.23,1,.32,1)}jdp-container,jdp-container *,jdp-container ::after,jdp-container ::before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}jdp-container .jdp-icon-minus,jdp-container .jdp-icon-plus{display:inline-block;text-align:center;cursor:pointer;vertical-align:middle;overflow:hidden;flex:none;text-decoration:none;border:1px solid #e6e6e6;border-radius:4px}jdp-container .jdp-icon-minus svg,jdp-container .jdp-icon-plus svg{width:1.5rem;height:1.5rem;padding:.375rem}jdp-container .jdp-icon-minus.not-in-range,jdp-container .jdp-icon-plus.not-in-range{cursor:not-allowed}jdp-container .jdp-icon-minus.not-in-range svg,jdp-container .jdp-icon-plus.not-in-range svg{opacity:.3}jdp-container .jdp-months,jdp-container .jdp-years{display:inline-flex;margin:0 2.5%;font-size:120%;color:rgba(0,0,0,.8);fill:rgba(0,0,0,.8)}jdp-container .jdp-months{width:55%}jdp-container .jdp-years{width:35%}jdp-container .jdp-month,jdp-container .jdp-month input,jdp-container .jdp-month select,jdp-container .jdp-year,jdp-container .jdp-year input,jdp-container .jdp-year select{width:100%;height:auto;text-align:center;background:0 0;border:0;border-radius:0;padding:0;margin:0;display:inline-block;font-size:inherit;font-family:inherit;vertical-align:initial;font-weight:300;color:inherit;line-height:inherit;outline:0}jdp-container .jdp-month input:active,jdp-container .jdp-month input:focus,jdp-container .jdp-month select:active,jdp-container .jdp-month select:focus,jdp-container .jdp-month:active,jdp-container .jdp-month:focus,jdp-container .jdp-year input:active,jdp-container .jdp-year input:focus,jdp-container .jdp-year select:active,jdp-container .jdp-year select:focus,jdp-container .jdp-year:active,jdp-container .jdp-year:focus{outline:0}jdp-container .jdp-month input:hover,jdp-container .jdp-month select:hover,jdp-container .jdp-month:hover,jdp-container .jdp-year input:hover,jdp-container .jdp-year select:hover,jdp-container .jdp-year:hover{background:rgba(0,0,0,.05)}jdp-container .jdp-month input,jdp-container .jdp-year input{cursor:text;-webkit-appearance:none;-moz-appearance:textfield}jdp-container .jdp-month input::-webkit-inner-spin-button,jdp-container .jdp-month input::-webkit-outer-spin-button,jdp-container .jdp-year input::-webkit-inner-spin-button,jdp-container .jdp-year input::-webkit-outer-spin-button{-webkit-appearance:none}jdp-container .jdp-month select,jdp-container .jdp-year select{cursor:pointer;position:relative;-webkit-appearance:menulist;-moz-appearance:menulist}jdp-container .jdp-days{padding:.5rem 0 0;outline:0;text-align:left;width:100%;display:inline-block;display:-ms-flexbox;display:flex;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-around}jdp-container .jdp-day{font-weight:400}jdp-container .jdp-day,jdp-container .jdp-day-name{background:0 0;border:1px solid transparent;width:14.2857143%;flex-basis:14.2857143%;height:31px;line-height:31px;margin:2px 0;display:inline-block;position:relative;justify-content:center;text-align:center;color:rgba(0,0,0,.8)}jdp-container .jdp-day-name.today,jdp-container .jdp-day.today{border-color:rgba(0,0,0,.3)}jdp-container .jdp-day-name.selected,jdp-container .jdp-day.selected{background-color:#569ff7!important;color:#fff!important}jdp-container .jdp-day-name.last-week,jdp-container .jdp-day.last-week{color:#f44336}jdp-container .jdp-day:empty{background:rgba(0,0,0,.05);border-color:#fff}jdp-container .jdp-day:not(:empty){cursor:pointer;border-radius:4px;transition:linear .1s}jdp-container .jdp-day:not(:empty):hover{background:rgba(0,0,0,.1);transform:scale(1.15);z-index:1}jdp-container .jdp-day-name{border-radius:0;font-weight:900;font-size:90%;background-color:rgba(0,0,0,.1);cursor:default}jdp-container .jdp-footer{padding:.5rem .5rem 0;outline:0;width:100%;display:inline-block;display:-ms-flexbox;display:flex;flex-wrap:nowrap;-ms-flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between}jdp-container .jdp-btn-empty,jdp-container .jdp-btn-today{background:#569ff7;font-size:90%;padding:.3em .6em;border-radius:5px;font-weight:400;display:inline-block;text-align:center;color:#fff;cursor:pointer}@media only screen and (max-width:307.875px){jdp-container{max-width:90%}}#ui-datepicker-div{display:none!important} -------------------------------------------------------------------------------- /assets/css/keen-slider.css: -------------------------------------------------------------------------------- 1 | .keen-slider:not([data-keen-slider-disabled]) { 2 | align-content: flex-start; 3 | display: flex; 4 | overflow: hidden; 5 | position: relative; 6 | -webkit-user-select: none; 7 | -moz-user-select: none; 8 | -ms-user-select: none; 9 | user-select: none; 10 | -webkit-touch-callout: none; 11 | -khtml-user-select: none; 12 | touch-action: pan-y; 13 | -webkit-tap-highlight-color: transparent; 14 | width: 100%; 15 | } 16 | .keen-slider:not([data-keen-slider-disabled]) .keen-slider__slide { 17 | position: relative; 18 | overflow: hidden; 19 | width: 100%; 20 | min-height: 100%; 21 | } 22 | .keen-slider:not([data-keen-slider-disabled])[data-keen-slider-reverse] { 23 | flex-direction: row-reverse; 24 | } 25 | .keen-slider:not([data-keen-slider-disabled])[data-keen-slider-v] { 26 | flex-wrap: wrap; 27 | } -------------------------------------------------------------------------------- /assets/css/keen-slider.min.css: -------------------------------------------------------------------------------- 1 | .keen-slider:not([data-keen-slider-disabled]){align-content:flex-start;display:flex;overflow:hidden;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;touch-action:pan-y;-webkit-tap-highlight-color:transparent;width:100%}.keen-slider:not([data-keen-slider-disabled]) .keen-slider__slide{position:relative;overflow:hidden;width:100%;min-height:100%}.keen-slider:not([data-keen-slider-disabled])[data-keen-slider-reverse]{flex-direction:row-reverse}.keen-slider:not([data-keen-slider-disabled])[data-keen-slider-v]{flex-wrap:wrap} -------------------------------------------------------------------------------- /assets/css/settings.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Icons by: https://fontawesome.com/ 3 | */ 4 | .wpp-team { 5 | text-align: center; 6 | padding: 50px 0; 7 | } 8 | 9 | .wpp-team h1 { 10 | font-size: 2.5em; 11 | margin-bottom: 20px; 12 | } 13 | 14 | .wpp-team p { 15 | text-align: right; 16 | } 17 | 18 | .follow-us .social-links, 19 | .wpp-team-member .social-links { 20 | display: flex; 21 | gap: 10px; 22 | justify-content: center; 23 | } 24 | 25 | .follow-us .social-links a, 26 | .wpp-team-member .social-links a { 27 | transition: transform 0.3s; 28 | } 29 | 30 | .follow-us .social-links img, 31 | .wpp-team-member .social-links img { 32 | width: 20px; 33 | } 34 | 35 | 36 | .contributor-list { 37 | position: relative; 38 | z-index: 2; 39 | margin: 0 auto; 40 | } 41 | 42 | .contributor-list__track { 43 | width: fit-content; 44 | margin: 0 auto; 45 | } 46 | 47 | .contributor-list__grid { 48 | display: grid; 49 | grid-auto-columns: min-content; 50 | grid-auto-flow: column; 51 | width: fit-content; 52 | gap: 24px 53 | } 54 | 55 | .contributor-list-item { 56 | position: relative; 57 | width: 120px; 58 | height: 150px; 59 | } 60 | 61 | .contributor-list-title { 62 | margin-top: 5px; 63 | margin-bottom: 5px; 64 | } 65 | 66 | .contributor-list-name { 67 | font-weight: bold; 68 | font-size: 15px; 69 | margin-top: 7px; 70 | color: #000 71 | } 72 | 73 | .contributor-list-title { 74 | color: #777 75 | } 76 | 77 | .contributor-list-image { 78 | display: flex; 79 | position: relative; 80 | z-index: 1; 81 | width: 100%; 82 | height: 100%; 83 | overflow: hidden; 84 | border-radius: 10px; 85 | } 86 | 87 | .contributor-list-image img { 88 | width: 100%; 89 | height: 100%; 90 | object-fit: cover; 91 | object-position: center center 92 | } 93 | 94 | .contributor-list-info { 95 | position: absolute; 96 | z-index: 2; 97 | top: 0; 98 | right: 0; 99 | bottom: 0; 100 | left: 0; 101 | align-content: flex-end; 102 | padding: 15px; 103 | background: linear-gradient(180deg, rgba(0, 0, 0, 0) 51.91%, rgba(0, 0, 0, 0.3) 75.88%); 104 | overflow: hidden; 105 | border-radius: 10px; 106 | } 107 | 108 | .contributor-list-info > * { 109 | display: flex; 110 | width: fit-content 111 | } 112 | 113 | .contributor-list-tags { 114 | display: grid; 115 | grid-auto-columns: min-content; 116 | grid-auto-flow: column; 117 | gap: 8px; 118 | margin: 30px auto 0; 119 | padding: 0 120 | } 121 | 122 | .contributor-list-tag { 123 | display: flex; 124 | -ms-flex-align: center; 125 | align-items: center; 126 | padding: 0; 127 | font-size: 11px; 128 | white-space: nowrap; 129 | margin: 0 130 | } 131 | 132 | .contributor-list-tag img { 133 | filter: invert(100%) sepia(46%) saturate(2%) hue-rotate(74deg) brightness(119%) contrast(100%); 134 | } 135 | 136 | 137 | .wpp-contributors { 138 | text-align: center; 139 | padding: 50px 0; 140 | } 141 | 142 | .wpp-contributors h2 { 143 | font-size: 2em; 144 | margin-bottom: 20px; 145 | } 146 | 147 | #wpp-contributors-list { 148 | display: flex; 149 | justify-content: center; 150 | flex-wrap: wrap; 151 | } 152 | 153 | .wpp-contributor { 154 | position: relative; 155 | margin: 1px; 156 | text-align: center; 157 | } 158 | 159 | .wpp-contributor img { 160 | width: 32px; 161 | height: 32px; 162 | border-radius: 50%; 163 | transition: transform 0.3s; 164 | } 165 | 166 | .wpp-contributor .tooltip { 167 | visibility: hidden; 168 | width: 120px; 169 | background-color: #333; 170 | color: #fff; 171 | text-align: center; 172 | border-radius: 5px; 173 | padding: 5px 0; 174 | position: absolute; 175 | z-index: 1; 176 | bottom: 125%; 177 | left: 50%; 178 | margin-left: -60px; 179 | opacity: 0; 180 | transition: opacity 0.3s; 181 | } 182 | 183 | .wpp-contributor .tooltip::after { 184 | content: ""; 185 | position: absolute; 186 | top: 100%; 187 | left: 50%; 188 | margin-left: -5px; 189 | border-width: 5px; 190 | border-style: solid; 191 | border-color: #333 transparent transparent transparent; 192 | } 193 | 194 | .wpp-contributor:hover .tooltip { 195 | visibility: visible; 196 | opacity: 1; 197 | } 198 | 199 | .wpp-checkout-fields-wrapper { 200 | margin: 20px 0; 201 | } 202 | 203 | .wpp-checkout-section { 204 | background: #fff; 205 | border: 1px solid #ccd0d4; 206 | margin-bottom: 20px; 207 | padding: 15px; 208 | } 209 | 210 | .wpp-checkout-section h3 { 211 | margin-top: 0; 212 | padding-bottom: 10px; 213 | border-bottom: 1px solid #eee; 214 | } 215 | 216 | .wpp-checkout-field { 217 | background: #f9f9f9; 218 | border: 1px solid #e5e5e5; 219 | margin-bottom: 10px; 220 | } 221 | 222 | .wpp-checkout-field .field-header { 223 | padding: 10px 15px; 224 | cursor: move; 225 | display: flex; 226 | align-items: center; 227 | background: #fff; 228 | } 229 | 230 | .wpp-checkout-field .field-header .dashicons-menu { 231 | margin-left: 10px; 232 | color: #666; 233 | } 234 | 235 | .wpp-checkout-field .field-header .field-title { 236 | flex-grow: 1; 237 | font-weight: 500; 238 | } 239 | 240 | .wpp-checkout-field .field-settings { 241 | padding: 15px; 242 | border-top: 1px solid #e5e5e5; 243 | display: none; 244 | } 245 | 246 | .wpp-checkout-field.active .field-settings { 247 | display: block; 248 | } 249 | 250 | .wpp-checkout-field .field-settings label { 251 | display: block; 252 | margin-bottom: 10px; 253 | } 254 | 255 | .wpp-checkout-field .field-width, 256 | .wpp-checkout-field .field-position { 257 | margin-top: 15px; 258 | } 259 | 260 | .wpp-checkout-field .field-width select, 261 | .wpp-checkout-field .field-position select { 262 | width: 200px; 263 | margin-top: 5px; 264 | } 265 | 266 | .wpp-checkout-fields-list { 267 | min-height: 50px; 268 | } 269 | 270 | .wpp-checkout-field.ui-sortable-placeholder { 271 | visibility: visible !important; 272 | background: #f1f1f1; 273 | border: 1px dashed #b4b9be; 274 | } 275 | 276 | .wpp-checkout-field.ui-sortable-helper { 277 | background: #fff; 278 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 279 | } -------------------------------------------------------------------------------- /assets/css/settings.min.css: -------------------------------------------------------------------------------- 1 | .wpp-team{text-align:center;padding:50px 0}.wpp-team h1{font-size:2.5em;margin-bottom:20px}.wpp-team p{text-align:right}.follow-us .social-links,.wpp-team-member .social-links{display:flex;gap:10px;justify-content:center}.follow-us .social-links a,.wpp-team-member .social-links a{transition:transform .3s}.follow-us .social-links img,.wpp-team-member .social-links img{width:20px}.contributor-list{position:relative;z-index:2;margin:0 auto}.contributor-list__track{width:fit-content;margin:0 auto}.contributor-list__grid{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;width:fit-content;gap:24px}.contributor-list-item{position:relative;width:120px;height:150px}.contributor-list-title{margin-top:5px;margin-bottom:5px}.contributor-list-name{font-weight:700;font-size:15px;margin-top:7px;color:#000}.contributor-list-title{color:#777}.contributor-list-image{display:flex;position:relative;z-index:1;width:100%;height:100%;overflow:hidden;border-radius:10px}.contributor-list-image img{width:100%;height:100%;object-fit:cover;object-position:center center}.contributor-list-info{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0;align-content:flex-end;padding:15px;background:linear-gradient(180deg,transparent 51.91%,rgba(0,0,0,.3) 75.88%);overflow:hidden;border-radius:10px}.contributor-list-info>*{display:flex;width:fit-content}.contributor-list-tags{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;gap:8px;margin:30px auto 0;padding:0}.contributor-list-tag{display:flex;-ms-flex-align:center;align-items:center;padding:0;font-size:11px;white-space:nowrap;margin:0}.contributor-list-tag img{filter:invert(100%) sepia(46%) saturate(2%) hue-rotate(74deg) brightness(119%) contrast(100%)}.wpp-contributors{text-align:center;padding:50px 0}.wpp-contributors h2{font-size:2em;margin-bottom:20px}#wpp-contributors-list{display:flex;justify-content:center;flex-wrap:wrap}.wpp-contributor{position:relative;margin:1px;text-align:center}.wpp-contributor img{width:32px;height:32px;border-radius:50%;transition:transform .3s}.wpp-contributor .tooltip{visibility:hidden;width:120px;background-color:#333;color:#fff;text-align:center;border-radius:5px;padding:5px 0;position:absolute;z-index:1;bottom:125%;left:50%;margin-left:-60px;opacity:0;transition:opacity .3s}.wpp-contributor .tooltip::after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#333 transparent transparent}.wpp-contributor:hover .tooltip{visibility:visible;opacity:1}.wpp-checkout-fields-wrapper{margin:20px 0}.wpp-checkout-section{background:#fff;border:1px solid #ccd0d4;margin-bottom:20px;padding:15px}.wpp-checkout-section h3{margin-top:0;padding-bottom:10px;border-bottom:1px solid #eee}.wpp-checkout-field{background:#f9f9f9;border:1px solid #e5e5e5;margin-bottom:10px}.wpp-checkout-field .field-header{padding:10px 15px;cursor:move;display:flex;align-items:center;background:#fff}.wpp-checkout-field .field-header .dashicons-menu{margin-left:10px;color:#666}.wpp-checkout-field .field-header .field-title{flex-grow:1;font-weight:500}.wpp-checkout-field .field-settings{padding:15px;border-top:1px solid #e5e5e5;display:none}.wpp-checkout-field.active .field-settings{display:block}.wpp-checkout-field .field-settings label{display:block;margin-bottom:10px}.wpp-checkout-field .field-position,.wpp-checkout-field .field-width{margin-top:15px}.wpp-checkout-field .field-position select,.wpp-checkout-field .field-width select{width:200px;margin-top:5px}.wpp-checkout-fields-list{min-height:50px}.wpp-checkout-field.ui-sortable-placeholder{visibility:visible!important;background:#f1f1f1;border:1px dashed #b4b9be}.wpp-checkout-field.ui-sortable-helper{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1)} -------------------------------------------------------------------------------- /assets/css/timepicki.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Created on: 17 Sep, 2014, 4:29:37 PM 4 | Author: senthil 5 | */ 6 | 7 | .ti_tx, 8 | .mi_tx, 9 | .mer_tx { 10 | width: 100%; 11 | text-align: center; 12 | margin: 10px 0; 13 | } 14 | 15 | .time, 16 | .mins, 17 | .meridian { 18 | width: 60px; 19 | float: left; 20 | margin: 0 10px; 21 | font-size: 20px; 22 | color: #2d2e2e; 23 | font-family: arial; 24 | font-weight: 700; 25 | } 26 | 27 | .prev, 28 | .next { 29 | cursor: pointer; 30 | padding: 18px; 31 | width: 28%; 32 | border: 1px solid #ccc; 33 | margin: auto; 34 | background: url(../images/arrow-down.png) no-repeat; 35 | border-radius: 5px; 36 | } 37 | 38 | .prev:hover, 39 | .next:hover { 40 | background-color: #ccc; 41 | } 42 | 43 | .next { 44 | background-position: 50% 150%; 45 | } 46 | 47 | .prev { 48 | background-position: 50% -50%; 49 | } 50 | 51 | .time_pick { 52 | position: relative; 53 | } 54 | 55 | .timepicker_wrap { 56 | padding: 10px; 57 | border-radius: 5px; 58 | z-index: 998; 59 | display: none; 60 | box-shadow: 2px 2px 5px 0 rgba(50,50,50,0.35); 61 | background: #f6f6f6; 62 | border: 1px solid #ccc; 63 | float: left; 64 | position: absolute; 65 | top: 27px; 66 | left: 0; 67 | } 68 | 69 | .arrow_top { 70 | position: absolute; 71 | top: -10px; 72 | left: 20px; 73 | background: url(../images/arrow-up.png) no-repeat; 74 | width: 18px; 75 | height: 10px; 76 | z-index: 999; 77 | } 78 | input.timepicki-input { 79 | background: none repeat scroll 0 0 #FFFFFF; 80 | border: 1px solid #CCCCCC; 81 | border-radius: 5px 5px 5px 5px; 82 | float: none; 83 | margin: 0; 84 | text-align: center; 85 | width: 70%; 86 | } 87 | a.reset_time { 88 | float: left; 89 | margin-top: 5px; 90 | color: #000; 91 | } 92 | -------------------------------------------------------------------------------- /assets/css/timepicki.min.css: -------------------------------------------------------------------------------- 1 | .mer_tx,.mi_tx,.ti_tx{width:100%;text-align:center;margin:10px 0}.meridian,.mins,.time{width:60px;float:left;margin:0 10px;font-size:20px;color:#2d2e2e;font-family:arial;font-weight:700}.next,.prev{cursor:pointer;padding:18px;width:28%;border:1px solid #ccc;margin:auto;background:url(../images/arrow-down.png)no-repeat;border-radius:5px}.next:hover,.prev:hover{background-color:#ccc}.next{background-position:50% 150%}.prev{background-position:50% -50%}.time_pick{position:relative}.timepicker_wrap{padding:10px;border-radius:5px;z-index:998;display:none;box-shadow:2px 2px 5px 0 rgba(50,50,50,.35);background:#f6f6f6;border:1px solid #ccc;float:left;position:absolute;top:27px;left:0}.arrow_top{position:absolute;top:-10px;left:20px;background:url(../images/arrow-up.png)no-repeat;width:18px;height:10px;z-index:999}input.timepicki-input{background:0 0#fff;border:1px solid #ccc;border-radius:5px 5px 5px 5px;float:none;margin:0;text-align:center;width:70%}a.reset_time{float:left;margin-top:5px;color:#000} -------------------------------------------------------------------------------- /assets/css/vazir-font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Vazir; 3 | src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); 4 | font-weight: normal; 5 | font-style: normal; 6 | font-display: swap 7 | } 8 | 9 | @font-face { 10 | font-family: Vazir; 11 | src: url('../fonts/Vazirmatn-Bold.woff2') format("woff2"); 12 | font-weight: bold; 13 | font-style: normal; 14 | font-display: swap 15 | } 16 | 17 | body, 18 | #order_data h2, 19 | .rtl #wpadminbar *:not(.ab-icon), 20 | .components-menu-item__item, 21 | .components-menu-item__info, 22 | .components-menu-group__label, 23 | .wc-addons-wrap .products li * { 24 | font-family: Vazir, tahoma, arial, serif !important 25 | } 26 | 27 | pre, 28 | kbd, 29 | code { 30 | font-family: Tahoma, Arial, sans-serif !important 31 | } 32 | 33 | body#tinymce.wp-editor, 34 | .rtl .editor-styles-wrapper, 35 | .rtl .edit-post-visual-editor *, 36 | .rtl .components-notice__content, 37 | #wpseo_meta *, 38 | .edit-post-sidebar *, 39 | #wpbody, .woocommerce-layout *, 40 | #tinymce, 41 | .rtl h1, 42 | .rtl h2, 43 | .rtl h3, 44 | .rtl h4, 45 | .rtl h5, 46 | .rtl h6, 47 | .rtl .media-frame, 48 | .rtl .media-frame .search, 49 | .rtl .media-frame input[type="email"], 50 | .rtl .media-frame input[type="number"], 51 | .rtl .media-frame input[type="password"], 52 | .rtl .media-frame input[type="search"], 53 | .rtl .media-frame input[type="tel"], 54 | .rtl .media-frame input[type="text"], 55 | .rtl .media-frame input[type="url"], 56 | .rtl .media-frame select, 57 | .rtl .media-frame textarea, 58 | .rtl .media-modal { 59 | font-family: Vazir, tahoma, arial 60 | } 61 | 62 | .edit-post-visual-editor .components-button { 63 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif !important; 64 | font-size: 13px; 65 | } 66 | 67 | .dashicons, 68 | .dashicons-before:before, 69 | .wpseo-metabox-menu ul li span.dashicons:before { 70 | font-family: dashicons !important; 71 | } 72 | 73 | .wooocommerce-task-card__header p, 74 | .woocommerce-summary__item-label p, 75 | .components-card__header p, 76 | .rtl .quicktags-toolbar input, 77 | .rtl .wp-switch-editor { 78 | font-family: Vazir, tahoma, arial !important 79 | } 80 | 81 | #tinymce { 82 | font-size: 12px; 83 | } 84 | -------------------------------------------------------------------------------- /assets/css/vazir-font.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Vazir;src:url(../fonts/Vazirmatn-Regular.woff2)format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Vazir;src:url(../fonts/Vazirmatn-Bold.woff2)format("woff2");font-weight:700;font-style:normal;font-display:swap}#order_data h2,.components-menu-group__label,.components-menu-item__info,.components-menu-item__item,.rtl #wpadminbar :not(.ab-icon),.wc-addons-wrap .products li *,body{font-family:Vazir,tahoma,arial,serif!important}code,kbd,pre{font-family:Tahoma,Arial,sans-serif!important}#tinymce,#wpbody,#wpseo_meta *,.edit-post-sidebar *,.rtl .components-notice__content,.rtl .edit-post-visual-editor *,.rtl .editor-styles-wrapper,.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=email],.rtl .media-frame input[type=number],.rtl .media-frame input[type=password],.rtl .media-frame input[type=search],.rtl .media-frame input[type=tel],.rtl .media-frame input[type=text],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal,.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6,.woocommerce-layout *,body#tinymce.wp-editor{font-family:Vazir,tahoma,arial}.edit-post-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important;font-size:13px}.dashicons,.dashicons-before:before,.wpseo-metabox-menu ul li span.dashicons:before{font-family:dashicons!important}.components-card__header p,.rtl .quicktags-toolbar input,.rtl .wp-switch-editor,.woocommerce-summary__item-label p,.wooocommerce-task-card__header p{font-family:Vazir,tahoma,arial!important}#tinymce{font-size:12px} -------------------------------------------------------------------------------- /assets/fonts/Vazirmatn-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/fonts/Vazirmatn-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/Vazirmatn-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/fonts/Vazirmatn-Regular.woff2 -------------------------------------------------------------------------------- /assets/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/arrow-down.png -------------------------------------------------------------------------------- /assets/images/arrow-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/arrow-up.png -------------------------------------------------------------------------------- /assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/avatar.png -------------------------------------------------------------------------------- /assets/images/gravity-forms-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/gravity-forms-logo.jpg -------------------------------------------------------------------------------- /assets/images/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 21 | 25 | 40 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /assets/images/mellat-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/mellat-logo.png -------------------------------------------------------------------------------- /assets/images/parsian-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/parsian-logo.png -------------------------------------------------------------------------------- /assets/images/pasargad-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-parsi/wp-parsidate/1cc0a3641a49aaa858a6df7a32715425c8c9da6b/assets/images/pasargad-logo.png -------------------------------------------------------------------------------- /assets/js/admin.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function ($) { 2 | //var wpp_months_name = WPP_I18N.months; 3 | var wpp_months_name = ['', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند']; 4 | 5 | 6 | $('.wp-editor-wrap.html-active #content').css("direction", "ltr"); 7 | 8 | function IsLeapYear(year) { 9 | if (((year % 4) === 0 && (year % 100) !== 0) || (year % 400) === 0 && (year % 100) === 0) 10 | return true; 11 | else 12 | return false; 13 | } 14 | 15 | function persian_to_gregorian(jy, jm, jd) { 16 | var j_days_sum_month = [0, 0, 31, 62, 93, 124, 155, 186, 216, 246, 276, 306, 336, 365]; 17 | var g_days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 18 | var g_days_leap_month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 19 | var gd = j_days_sum_month[parseInt(jm)] + parseInt(jd), gm, gy = parseInt(jy) + 621; 20 | if (gd > 286) gy++; 21 | if (IsLeapYear(gy - 1) && 286 < gd) gd--; 22 | if (gd > 286) gd -= 286; else gd += 79; 23 | if (IsLeapYear(gy)) { 24 | for (gm = 0; gd > g_days_leap_month[gm]; gm++) { 25 | gd -= g_days_leap_month[gm]; 26 | } 27 | } else { 28 | for (gm = 0; gd > g_days_in_month[gm]; gm++) gd -= g_days_in_month[gm]; 29 | } 30 | gm++; 31 | if (gm < 10) gm = '0' + gm; 32 | return [gy, gm, gd]; 33 | } 34 | 35 | function gregorian_to_persian(gy, gm, gd) { 36 | var j_days_in_month = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29]; 37 | var g_days_sum_month = [0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; 38 | var day_of_year = g_days_sum_month[parseInt(gm)] + parseInt(gd); 39 | var leab = IsLeapYear(gy); 40 | var leap = IsLeapYear(gy - 1); 41 | var jd, jm, jy, i; 42 | if (day_of_year > 79) { 43 | jd = (leab ? day_of_year - 78 : day_of_year - 79); 44 | jy = gy - 621; 45 | for (i = 0; jd > j_days_in_month[i]; i++) jd -= j_days_in_month[i]; 46 | } else { 47 | jd = ((leap || (leab && gm > 2)) ? 287 + day_of_year : 286 + day_of_year); 48 | jy = gy - 622; 49 | if (leap === false && jd === 366) return [jy, 12, 30]; 50 | for (i = 0; jd > j_days_in_month[i]; i++) jd -= j_days_in_month[i]; 51 | } 52 | jm = ++i; 53 | jm = (jm < 10 ? jm = '0' + jm : jm); 54 | return [jy, jm, jd]; 55 | } 56 | 57 | /* 58 | * Edit inline 59 | */ 60 | function create_stampdiv(year, mon, day, hour, minu) { 61 | var div = '
' + 62 | '' + 70 | ',' + 71 | ' در ' + 72 | ' : ' + 73 | '' + 74 | '
'; 75 | return div; 76 | } 77 | 78 | $('a.edit-timestamp').on('click', function () { 79 | $('.persian').remove(); 80 | var date = gregorian_to_persian($('#aa').val(), $('#mm').val(), $('#jj').val()); 81 | var div = create_stampdiv(date[0], date[1], date[2], $('#hh').val(), $('#mn').val()); 82 | $('#timestampdiv').prepend(div); 83 | $('#timestampdiv .timestamp-wrap:eq(1)').hide(); 84 | }); 85 | 86 | $('#the-list').on('click', '.editinline', function () { 87 | var tr = $(this).closest('td'); 88 | var year = tr.find('.aa').html(); 89 | if (year > 1400) { 90 | var month = tr.find('.mm').html(); 91 | var day = tr.find('.jj').html(); 92 | var hour = tr.find('.hh').html(); 93 | var minu = tr.find('.mn').html(); 94 | var date = gregorian_to_persian(year, month, day); 95 | $('.persian').remove(); 96 | $('.inline-edit-date').prepend(create_stampdiv(date[0], date[1], date[2], hour, minu)); 97 | $('.inline-edit-date div:eq(1)').hide(); 98 | } 99 | }); 100 | 101 | $('#timestampdiv,.inline-edit-date').on('keyup', '#hha', function () { 102 | $('input[name=hh]').val($(this).val()); 103 | 104 | }).on('keyup', '#mna', function () { 105 | $('input[name=mn]').val($(this).val()); 106 | 107 | }).on('keyup', '#aaa , #jja', function () { 108 | var year = $('#aaa').val(); 109 | var mon = $('#mma').val(); 110 | var day = $('#jja').val(); 111 | date = persian_to_gregorian(year, mon, day); 112 | $('input[name=aa]').val(date[0]); 113 | $('select[name=mm]').val(date[1]); 114 | $('input[name=jj]').val(date[2]); 115 | 116 | }).on('change', '#mma', function () { 117 | var year = $('#aaa').val(); 118 | var mon = $('#mma').val(); 119 | var day = $('#jja').val(); 120 | date = persian_to_gregorian(year, mon, day); 121 | $('input[name=aa]').val(date[0]); 122 | $('select[name=mm]').val(date[1]); 123 | $('input[name=jj]').val(date[2]); 124 | }); 125 | 126 | /* 127 | * Filter on post screen dates 128 | */ 129 | $('select[name=m]').hide() 130 | var timer; 131 | 132 | function change_date() { 133 | var old = $('#timestamp b').text(); 134 | var info = $('#mma option:selected').text() + ' ' + $('#jja').val() + ', ' + $('#aaa').val() + ' در ' + $('#hha').val() + ':' + $('#mna').val(); 135 | info = info.replace(/\d+/g, function (digit) { 136 | var ret = ''; 137 | for (var i = 0, len = digit.length; i < len; i++) { 138 | ret += String.fromCharCode(digit.charCodeAt(i) + 1728); 139 | } 140 | return ret; 141 | }); 142 | if (old != info) { 143 | $('#timestamp b').html(info); 144 | clearInterval(timer); 145 | } 146 | } 147 | 148 | $('#timestampdiv').on('keypress', function (e) { 149 | if (e.which == 13) 150 | timer = setInterval(function () { 151 | change_date(); 152 | }, 50); 153 | }); 154 | 155 | $('.save-timestamp , .cancel-timestamp , #publish').on('click', function () { 156 | if ($('#aaa').length) 157 | timer = setInterval(function () { 158 | change_date(); 159 | }, 50); 160 | }); 161 | }); -------------------------------------------------------------------------------- /assets/js/admin.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){var wpp_months_name=["","فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"];$(".wp-editor-wrap.html-active #content").css("direction","ltr");function IsLeapYear(year){if(year%4===0&&year%100!==0||year%400===0&&year%100===0)return true;else return false}function persian_to_gregorian(jy,jm,jd){var j_days_sum_month=[0,0,31,62,93,124,155,186,216,246,276,306,336,365];var g_days_in_month=[31,28,31,30,31,30,31,31,30,31,30,31];var g_days_leap_month=[31,29,31,30,31,30,31,31,30,31,30,31];var gd=j_days_sum_month[parseInt(jm)]+parseInt(jd),gm,gy=parseInt(jy)+621;if(gd>286)gy++;if(IsLeapYear(gy-1)&&286286)gd-=286;else gd+=79;if(IsLeapYear(gy)){for(gm=0;gd>g_days_leap_month[gm];gm++){gd-=g_days_leap_month[gm]}}else{for(gm=0;gd>g_days_in_month[gm];gm++)gd-=g_days_in_month[gm]}gm++;if(gm<10)gm="0"+gm;return[gy,gm,gd]}function gregorian_to_persian(gy,gm,gd){var j_days_in_month=[31,31,31,31,31,31,30,30,30,30,30,29];var g_days_sum_month=[0,0,31,59,90,120,151,181,212,243,273,304,334,365];var day_of_year=g_days_sum_month[parseInt(gm)]+parseInt(gd);var leab=IsLeapYear(gy);var leap=IsLeapYear(gy-1);var jd,jm,jy,i;if(day_of_year>79){jd=leab?day_of_year-78:day_of_year-79;jy=gy-621;for(i=0;jd>j_days_in_month[i];i++)jd-=j_days_in_month[i]}else{jd=leap||leab&&gm>2?287+day_of_year:286+day_of_year;jy=gy-622;if(leap===false&&jd===366)return[jy,12,30];for(i=0;jd>j_days_in_month[i];i++)jd-=j_days_in_month[i]}jm=++i;jm=jm<10?jm="0"+jm:jm;return[jy,jm,jd]}function create_stampdiv(year,mon,day,hour,minu){var div='
'+'"+','+' در '+' : '+''+"
";return div}$("a.edit-timestamp").on("click",function(){$(".persian").remove();var date=gregorian_to_persian($("#aa").val(),$("#mm").val(),$("#jj").val());var div=create_stampdiv(date[0],date[1],date[2],$("#hh").val(),$("#mn").val());$("#timestampdiv").prepend(div);$("#timestampdiv .timestamp-wrap:eq(1)").hide()});$("#the-list").on("click",".editinline",function(){var tr=$(this).closest("td");var year=tr.find(".aa").html();if(year>1400){var month=tr.find(".mm").html();var day=tr.find(".jj").html();var hour=tr.find(".hh").html();var minu=tr.find(".mn").html();var date=gregorian_to_persian(year,month,day);$(".persian").remove();$(".inline-edit-date").prepend(create_stampdiv(date[0],date[1],date[2],hour,minu));$(".inline-edit-date div:eq(1)").hide()}});$("#timestampdiv,.inline-edit-date").on("keyup","#hha",function(){$("input[name=hh]").val($(this).val())}).on("keyup","#mna",function(){$("input[name=mn]").val($(this).val())}).on("keyup","#aaa , #jja",function(){var year=$("#aaa").val();var mon=$("#mma").val();var day=$("#jja").val();date=persian_to_gregorian(year,mon,day);$("input[name=aa]").val(date[0]);$("select[name=mm]").val(date[1]);$("input[name=jj]").val(date[2])}).on("change","#mma",function(){var year=$("#aaa").val();var mon=$("#mma").val();var day=$("#jja").val();date=persian_to_gregorian(year,mon,day);$("input[name=aa]").val(date[0]);$("select[name=mm]").val(date[1]);$("input[name=jj]").val(date[2])});$("select[name=m]").hide();var timer;function change_date(){var old=$("#timestamp b").text();var info=$("#mma option:selected").text()+" "+$("#jja").val()+", "+$("#aaa").val()+" در "+$("#hha").val()+":"+$("#mna").val();info=info.replace(/\d+/g,function(digit){var ret="";for(var i=0,len=digit.length;i' ); 140 | } 141 | 142 | function disableCity( $citybox ) { 143 | $citybox.val( '' ).change(); 144 | $citybox.prop( 'disabled', true ); 145 | } 146 | 147 | function cityToSelect( $citybox, current_cities ) { 148 | var value = $citybox.val(); 149 | 150 | if ( $citybox.is('input') ) { 151 | var input_name = $citybox.attr( 'name' ); 152 | var input_id = $citybox.attr( 'id' ); 153 | var placeholder = $citybox.attr( 'placeholder' ); 154 | 155 | $citybox.replaceWith( '' ); 156 | //we have to assign the new object, because of replaceWith 157 | $citybox = $('#'+input_id); 158 | } else { 159 | $citybox.prop( 'disabled', false ); 160 | } 161 | 162 | var options = ''; 163 | for( var index in current_cities ) { 164 | if ( current_cities.hasOwnProperty( index ) ) { 165 | var cityName = current_cities[ index ]; 166 | options = options + ''; 167 | } 168 | } 169 | 170 | $citybox.html( '' + options ); 171 | 172 | if ( $('option[value="'+value+'"]', $citybox).length ) { 173 | $citybox.val( value ).change(); 174 | } else { 175 | $citybox.val( '' ).change(); 176 | } 177 | 178 | $( document.body ).trigger( 'city_to_select' ); 179 | } 180 | }); 181 | -------------------------------------------------------------------------------- /assets/js/city-select.min.js: -------------------------------------------------------------------------------- 1 | jQuery(function($){if(typeof wc_country_select_params==="undefined"||typeof wc_city_select_params==="undefined"){return false}function getEnhancedSelectFormatString(){var formatString={formatMatches:function(matches){if(1===matches){return wc_country_select_params.i18n_matches_1}return wc_country_select_params.i18n_matches_n.replace("%qty%",matches)},formatNoMatches:function(){return wc_country_select_params.i18n_no_matches},formatAjaxError:function(){return wc_country_select_params.i18n_ajax_error},formatInputTooShort:function(input,min){var number=min-input.length;if(1===number){return wc_country_select_params.i18n_input_too_short_1}return wc_country_select_params.i18n_input_too_short_n.replace("%qty%",number)},formatInputTooLong:function(input,max){var number=input.length-max;if(1===number){return wc_country_select_params.i18n_input_too_long_1}return wc_country_select_params.i18n_input_too_long_n.replace("%qty%",number)},formatSelectionTooBig:function(limit){if(1===limit){return wc_country_select_params.i18n_selection_too_long_1}return wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",limit)},formatLoadMore:function(){return wc_country_select_params.i18n_load_more},formatSearching:function(){return wc_country_select_params.i18n_searching}};return formatString}if($().select2){var wc_city_select_select2=function(){$("select.city_select:visible").each(function(){var select2_args=$.extend({placeholderOption:"first",width:"100%"},getEnhancedSelectFormatString());$(this).select2(select2_args)})};wc_city_select_select2();$(document.body).bind("city_to_select",function(){wc_city_select_select2()})}var cities_json=wc_city_select_params.cities.replace(/"/g,'"');var cities=$.parseJSON(cities_json);$("body").on("country_to_state_changing",function(e,country,$container){var $statebox=$container.find("#billing_state, #shipping_state, #calc_shipping_state");var state=$statebox.val();$(document.body).trigger("state_changing",[country,state,$container])});$("body").on("change","select.state_select, #calc_shipping_state",function(){var $container=$(this).closest("div");var country=$container.find("#billing_country, #shipping_country, #calc_shipping_country").val();var state=$(this).val();$(document.body).trigger("state_changing",[country,state,$container])});$("body").on("state_changing",function(e,country,state,$container){var $citybox=$container.find("#billing_city, #shipping_city, #calc_shipping_city");if(cities[country]){if(cities[country]instanceof Array){cityToSelect($citybox,cities[country])}else if(state){if(cities[country][state]){cityToSelect($citybox,cities[country][state])}else{cityToInput($citybox)}}else{disableCity($citybox)}}else{cityToInput($citybox)}});if($(".cart-collaterals").length&&$("#calc_shipping_state").length){var calc_observer=new MutationObserver(function(){$("#calc_shipping_state").change()});calc_observer.observe(document.querySelector(".cart-collaterals"),{childList:true})}function cityToInput($citybox){if($citybox.is("input")){$citybox.prop("disabled",false);return}var input_name=$citybox.attr("name");var input_id=$citybox.attr("id");var placeholder=$citybox.attr("placeholder");$citybox.parent().find(".select2-container").remove();$citybox.replaceWith('')}function disableCity($citybox){$citybox.val("").change();$citybox.prop("disabled",true)}function cityToSelect($citybox,current_cities){var value=$citybox.val();if($citybox.is("input")){var input_name=$citybox.attr("name");var input_id=$citybox.attr("id");var placeholder=$citybox.attr("placeholder");$citybox.replaceWith('');$citybox=$("#"+input_id)}else{$citybox.prop("disabled",false)}var options="";for(var index in current_cities){if(current_cities.hasOwnProperty(index)){var cityName=current_cities[index];options=options+'"}}$citybox.html('"+options);if($('option[value="'+value+'"]',$citybox).length){$citybox.val(value).change()}else{$citybox.val("").change()}$(document.body).trigger("city_to_select")}}); -------------------------------------------------------------------------------- /assets/js/integrations.min.js: -------------------------------------------------------------------------------- 1 | jQuery(function($){const $searchInput=$("#wpp-plugin-search");const $pluginsGrid=$("#wpp-plugins-grid");function showSnackbar(message,type="success"){$(".wpp-snackbar").remove();const $snackbar=$(` 2 |
3 |
4 | 5 | ${message} 6 |
7 |
8 | `).appendTo("body");$snackbar.addClass("show");setTimeout(()=>{$snackbar.addClass("hide");setTimeout(()=>$snackbar.remove(),300)},3e3)}function createPluginSkeletonLoader(){return` 9 |
10 | 11 |
12 |
13 |
14 |
15 |
16 | `}function createPluginCard(plugin){const isInstalled=plugin.is_installed;const isActive=plugin.is_active;const isIntegrated=plugin.integrated;const hasOptions=plugin.has_options;const $card=$(` 17 |
21 | 24 |
25 |
26 |

${plugin.name}

27 |

${plugin.description}

28 | 29 | ${!isInstalled?` 30 |
31 |

${wppIntegrations.i18n.notInstalled}

32 | ${wppIntegrations.i18n.installPlugin} 33 |
34 | `:!isActive?` 35 |
36 |

${wppIntegrations.i18n.notActivated}

37 | ${wppIntegrations.i18n.activePlugin} 38 |
39 | `:``} 40 |
41 | 42 | ${isInstalled&&isActive?` 43 | 65 | `:``} 66 |
67 |
68 | `);$card.find(".plugin-logo img").on("load",function(){$(this).closest(".plugin-card").removeClass("skeleton-loading");if($(".plugin-card.skeleton-loading").length===0){$(".skeleton-loader").remove()}});$card.find(".plugin-logo img").on("error",function(){$(this).closest(".plugin-card").removeClass("skeleton-loading");if($(".plugin-card.skeleton-loading").length===0){$(".skeleton-loader").remove()}});$card.find(".integration-toggle").on("change",function(){const $toggle=$(this);const $wrapper=$toggle.closest(".toggle-wrapper");const pluginSlug=$toggle.data("plugin");const isEnabled=$toggle.is(":checked");$toggle.prop("disabled",true);$wrapper.addClass("is-disabled");$.ajax({url:wppIntegrations.ajax_url,method:"POST",data:{action:"wpp_toggle_integration",nonce:wppIntegrations.nonce,plugin_slug:pluginSlug,is_enabled:isEnabled},success:function(response){$toggle.prop("disabled",false);$wrapper.removeClass("is-disabled");showSnackbar(response.data.message);const $optionsBtn=$toggle.closest(".plugin-toggle-container").find(".plugin-options-btn");if(response.data.status&&wppIntegrations.supportedPlugins[pluginSlug]?.has_options){if($optionsBtn.length===0){$toggle.closest(".plugin-toggle-container").append(` 69 | 71 | Options 72 | 73 | `)}}else{$optionsBtn.remove()}},error:function(){$toggle.prop("disabled",false);$wrapper.removeClass("is-disabled");showSnackbar("Error processing integration","error")}})});return $card}function renderPlugins(plugins){const pluginArray=Array.isArray(plugins)?plugins:Object.values(plugins||{});pluginArray.forEach(plugin=>{const $pluginCard=createPluginCard(plugin);$pluginsGrid.append($pluginCard)})}for(let i=0;i<8;i++){$pluginsGrid.append(createPluginSkeletonLoader())}renderPlugins(wppIntegrations.supportedPlugins);$searchInput.on("input",function(){const searchTerm=$(this).val().toLowerCase();if(searchTerm===""){$pluginsGrid.find(".plugin-card").show().animate({opacity:1,transform:"translateY(0)"},300);return}$pluginsGrid.find(".plugin-card").each(function(){const $card=$(this);const tags=$card.attr("data-tags").toLowerCase();if(tags.includes(searchTerm)){$card.show().animate({opacity:1,transform:"translateY(0)"},300)}else{$card.animate({opacity:0,transform:"translateY(20px)"},300,function(){$card.hide()})}})})}); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-mellat-pg.js: -------------------------------------------------------------------------------- 1 | const wppMellatPG_data = window.wc.wcSettings.getSetting( 'mellat_data', {} ); 2 | const wppMellatPG_label = window.wp.htmlEntities.decodeEntities( wppMellatPG_data.title ) 3 | || window.wp.i18n.__( 'Mellat Bank', 'wp-parsidate' ); 4 | const wppMellatPG_content = ( wppMellatPG_data ) => { 5 | return window.wp.htmlEntities.decodeEntities( wppMellatPG_data.description ); 6 | }; 7 | const wppMellatPG = { 8 | name: 'mellat', 9 | label: wppMellatPG_label, 10 | content: Object( window.wp.element.createElement )( wppMellatPG_content, null ), 11 | edit: Object( window.wp.element.createElement )( wppMellatPG_content, null ), 12 | canMakePayment: () => true, 13 | placeOrderButtonLabel: window.wp.i18n.__( 'Continue', 'wp-parsidate' ), 14 | ariaLabel: wppMellatPG_label, 15 | supports: { 16 | features: wppMellatPG_data.supports, 17 | }, 18 | }; 19 | window.wc.wcBlocksRegistry.registerPaymentMethod( wppMellatPG ); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-mellat-pg.min.js: -------------------------------------------------------------------------------- 1 | const wppMellatPG_data=window.wc.wcSettings.getSetting("mellat_data",{});const wppMellatPG_label=window.wp.htmlEntities.decodeEntities(wppMellatPG_data.title)||window.wp.i18n.__("Mellat Bank","wp-parsidate");const wppMellatPG_content=wppMellatPG_data=>{return window.wp.htmlEntities.decodeEntities(wppMellatPG_data.description)};const wppMellatPG={name:"mellat",label:wppMellatPG_label,content:Object(window.wp.element.createElement)(wppMellatPG_content,null),edit:Object(window.wp.element.createElement)(wppMellatPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppMellatPG_label,supports:{features:wppMellatPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppMellatPG); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-mellat-pg.min.min.js: -------------------------------------------------------------------------------- 1 | const wppMellatPG_data=window.wc.wcSettings.getSetting("mellat_data",{});const wppMellatPG_label=window.wp.htmlEntities.decodeEntities(wppMellatPG_data.title)||window.wp.i18n.__("Mellat Bank","wp-parsidate");const wppMellatPG_content=wppMellatPG_data=>{return window.wp.htmlEntities.decodeEntities(wppMellatPG_data.description)};const wppMellatPG={name:"mellat",label:wppMellatPG_label,content:Object(window.wp.element.createElement)(wppMellatPG_content,null),edit:Object(window.wp.element.createElement)(wppMellatPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppMellatPG_label,supports:{features:wppMellatPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppMellatPG); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-parsian-pg.js: -------------------------------------------------------------------------------- 1 | const wppParsianPG_data = window.wc.wcSettings.getSetting( 'parsian_data', {} ); 2 | const wppParsianPG_label = window.wp.htmlEntities.decodeEntities( wppParsianPG_data.title ) 3 | || window.wp.i18n.__( 'Parsian Bank', 'wp-parsidate' ); 4 | const wppParsianPG_content = ( wppParsianPG_data ) => { 5 | return window.wp.htmlEntities.decodeEntities( wppParsianPG_data.description ); 6 | }; 7 | const wppParsianPG = { 8 | name: 'parsian', 9 | label: wppParsianPG_label, 10 | content: Object( window.wp.element.createElement )( wppParsianPG_content, null ), 11 | edit: Object( window.wp.element.createElement )( wppParsianPG_content, null ), 12 | canMakePayment: () => true, 13 | placeOrderButtonLabel: window.wp.i18n.__( 'Continue', 'wp-parsidate' ), 14 | ariaLabel: wppParsianPG_label, 15 | supports: { 16 | features: wppParsianPG_data.supports, 17 | }, 18 | }; 19 | window.wc.wcBlocksRegistry.registerPaymentMethod( wppParsianPG ); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-parsian-pg.min.js: -------------------------------------------------------------------------------- 1 | const wppParsianPG_data=window.wc.wcSettings.getSetting("parsian_data",{});const wppParsianPG_label=window.wp.htmlEntities.decodeEntities(wppParsianPG_data.title)||window.wp.i18n.__("Parsian Bank","wp-parsidate");const wppParsianPG_content=wppParsianPG_data=>{return window.wp.htmlEntities.decodeEntities(wppParsianPG_data.description)};const wppParsianPG={name:"parsian",label:wppParsianPG_label,content:Object(window.wp.element.createElement)(wppParsianPG_content,null),edit:Object(window.wp.element.createElement)(wppParsianPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppParsianPG_label,supports:{features:wppParsianPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppParsianPG); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-parsian-pg.min.min.js: -------------------------------------------------------------------------------- 1 | const wppParsianPG_data=window.wc.wcSettings.getSetting("parsian_data",{});const wppParsianPG_label=window.wp.htmlEntities.decodeEntities(wppParsianPG_data.title)||window.wp.i18n.__("Parsian Bank","wp-parsidate");const wppParsianPG_content=wppParsianPG_data=>{return window.wp.htmlEntities.decodeEntities(wppParsianPG_data.description)};const wppParsianPG={name:"parsian",label:wppParsianPG_label,content:Object(window.wp.element.createElement)(wppParsianPG_content,null),edit:Object(window.wp.element.createElement)(wppParsianPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppParsianPG_label,supports:{features:wppParsianPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppParsianPG); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-pasargad-pg.js: -------------------------------------------------------------------------------- 1 | const wppPasargadPG_data = window.wc.wcSettings.getSetting( 'pasargad_data', {} ); 2 | const wppPasargadPG_label = window.wp.htmlEntities.decodeEntities( wppPasargadPG_data.title ) 3 | || window.wp.i18n.__( 'Pasargad Bank', 'wp-parsidate' ); 4 | const wppPasargadPG_content = ( wppPasargadPG_data ) => { 5 | return window.wp.htmlEntities.decodeEntities( wppPasargadPG_data.description ); 6 | }; 7 | const wppPasargadPG = { 8 | name: 'pasargad', 9 | label: wppPasargadPG_label, 10 | content: Object( window.wp.element.createElement )( wppPasargadPG_content, null ), 11 | edit: Object( window.wp.element.createElement )( wppPasargadPG_content, null ), 12 | canMakePayment: () => true, 13 | placeOrderButtonLabel: window.wp.i18n.__( 'Continue', 'wp-parsidate' ), 14 | ariaLabel: wppPasargadPG_label, 15 | supports: { 16 | features: wppPasargadPG_data.supports, 17 | }, 18 | }; 19 | window.wc.wcBlocksRegistry.registerPaymentMethod( wppPasargadPG ); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-pasargad-pg.min.js: -------------------------------------------------------------------------------- 1 | const wppPasargadPG_data=window.wc.wcSettings.getSetting("pasargad_data",{});const wppPasargadPG_label=window.wp.htmlEntities.decodeEntities(wppPasargadPG_data.title)||window.wp.i18n.__("Pasargad Bank","wp-parsidate");const wppPasargadPG_content=wppPasargadPG_data=>{return window.wp.htmlEntities.decodeEntities(wppPasargadPG_data.description)};const wppPasargadPG={name:"pasargad",label:wppPasargadPG_label,content:Object(window.wp.element.createElement)(wppPasargadPG_content,null),edit:Object(window.wp.element.createElement)(wppPasargadPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppPasargadPG_label,supports:{features:wppPasargadPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppPasargadPG); -------------------------------------------------------------------------------- /assets/js/wc-pg-blocks/wpp-wc-pasargad-pg.min.min.js: -------------------------------------------------------------------------------- 1 | const wppPasargadPG_data=window.wc.wcSettings.getSetting("pasargad_data",{});const wppPasargadPG_label=window.wp.htmlEntities.decodeEntities(wppPasargadPG_data.title)||window.wp.i18n.__("Pasargad Bank","wp-parsidate");const wppPasargadPG_content=wppPasargadPG_data=>{return window.wp.htmlEntities.decodeEntities(wppPasargadPG_data.description)};const wppPasargadPG={name:"pasargad",label:wppPasargadPG_label,content:Object(window.wp.element.createElement)(wppPasargadPG_content,null),edit:Object(window.wp.element.createElement)(wppPasargadPG_content,null),canMakePayment:()=>true,placeOrderButtonLabel:window.wp.i18n.__("Continue","wp-parsidate"),ariaLabel:wppPasargadPG_label,supports:{features:wppPasargadPG_data.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(wppPasargadPG); -------------------------------------------------------------------------------- /assets/js/wpp-checkout-fields.js: -------------------------------------------------------------------------------- 1 | jQuery(function ($) { 2 | // Initialize sortable 3 | $('.wpp-checkout-fields-list').sortable({ 4 | handle: '.field-header', 5 | placeholder: 'wpp-checkout-field ui-sortable-placeholder', 6 | axis: 'y', 7 | update: function (event, ui) { 8 | // Update priorities after sorting 9 | $(this).find('.wpp-checkout-field').each(function (index) { 10 | $(this).find('.priority-input').val((index + 1) * 10); 11 | }); 12 | } 13 | }); 14 | 15 | // Toggle field settings 16 | $(document).on('click', '.wpp-checkout-field .field-header', function (e) { 17 | if (!$(e.target).hasClass('dashicons-menu')) { 18 | var $field = $(this).closest('.wpp-checkout-field'); 19 | $field.toggleClass('active'); 20 | $field.find('.dashicons-arrow-down-alt2').toggleClass('dashicons-arrow-up-alt2'); 21 | } 22 | }); 23 | 24 | // Toggle position select based on width 25 | $(document).on('change', '.field-width select', function () { 26 | const $positionField = $(this).closest('.field-settings').find('.field-position'); 27 | 28 | if ($(this).val() === 'half') { 29 | $positionField.show(); 30 | } else { 31 | $positionField.hide(); 32 | } 33 | }); 34 | 35 | // Initialize position fields visibility 36 | $('.field-width select').each(function () { 37 | const $positionField = $(this).closest('.field-settings').find('.field-position'); 38 | 39 | if ($(this).val() === 'half') { 40 | $positionField.show(); 41 | } else { 42 | $positionField.hide(); 43 | } 44 | }); 45 | }); -------------------------------------------------------------------------------- /assets/js/wpp-checkout-fields.min.js: -------------------------------------------------------------------------------- 1 | jQuery(function($){$(".wpp-checkout-fields-list").sortable({handle:".field-header",placeholder:"wpp-checkout-field ui-sortable-placeholder",axis:"y",update:function(event,ui){$(this).find(".wpp-checkout-field").each(function(index){$(this).find(".priority-input").val((index+1)*10)})}});$(document).on("click",".wpp-checkout-field .field-header",function(e){if(!$(e.target).hasClass("dashicons-menu")){var $field=$(this).closest(".wpp-checkout-field");$field.toggleClass("active");$field.find(".dashicons-arrow-down-alt2").toggleClass("dashicons-arrow-up-alt2")}});$(document).on("change",".field-width select",function(){const $positionField=$(this).closest(".field-settings").find(".field-position");if($(this).val()==="half"){$positionField.show()}else{$positionField.hide()}});$(".field-width select").each(function(){const $positionField=$(this).closest(".field-settings").find(".field-position");if($(this).val()==="half"){$positionField.show()}else{$positionField.hide()}})}); -------------------------------------------------------------------------------- /assets/svg/behance-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/codepen-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/facebook-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/github-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/google-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/instagram-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/linkedin-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/medium-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/stack-overflow-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/telegram-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/tiktok-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/whatsapp-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/wordpress-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/x-twitter-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/svg/youtube-brands-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/admin/gutenberg-jalali-calendar.php: -------------------------------------------------------------------------------- 1 | =' ) && wpp_is_active( 'persian_date' ) ) { 61 | add_action( 'enqueue_block_editor_assets', 'wpp_gutenberg_jalali_calendar_editor_assets' ); 62 | } 63 | -------------------------------------------------------------------------------- /includes/admin/lists-fix.php: -------------------------------------------------------------------------------- 1 | $wpp_months_name 30 | ) 31 | ); 32 | } 33 | 34 | add_action( 'admin_enqueue_scripts', 'wpp_enqueue_admin_scripts' ); 35 | 36 | /** 37 | * Hooks admin functions for restrict posts in edit pages 38 | * 39 | * @return void 40 | */ 41 | function wpp_backend_init() { 42 | add_action( 'restrict_manage_posts', 'wpp_restrict_posts' ); 43 | add_filter( 'posts_where', 'wpp_admin_posts_where' ); 44 | } 45 | 46 | add_action( 'load-edit.php', 'wpp_backend_init' ); 47 | 48 | /** 49 | * Limits posts to a certain date, if date setted 50 | * 51 | * @param string $where Query pointer 52 | * 53 | * @return string New Pointer 54 | */ 55 | function wpp_admin_posts_where( $where ) { 56 | global $wp_query; 57 | 58 | if ( isset( $_GET['mfa'] ) && $_GET['mfa'] != '0' ) { 59 | $wp_query->query_vars['m'] = $_GET['mfa']; 60 | $where = wpp_posts_where( $where, $wp_query ); 61 | } 62 | 63 | return $where; 64 | } 65 | 66 | /** 67 | * Restrict posts to given date 68 | * @return void 69 | * @author Parsa Kafi 70 | * @author Mobin Ghasempoor 71 | */ 72 | function wpp_restrict_posts() { 73 | global $post_type, $post_status, $wpdb, $wpp_months_name; 74 | 75 | if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) { 76 | return; 77 | } 78 | 79 | $post_status_w = "AND post_status <> 'auto-draft'"; 80 | 81 | if ( $post_status != "" ) { 82 | if ( is_string( $post_status ) ) { 83 | $post_status_w .= " AND post_status = '$post_status'"; 84 | } 85 | } else { 86 | $post_status_w .= " AND post_status <> 'trash'"; 87 | } 88 | 89 | $sql = " 90 | SELECT DISTINCT date( post_date ) AS date 91 | FROM $wpdb->posts 92 | WHERE post_type='$post_type' $post_status_w AND date( post_date ) <> '0000-00-00' 93 | ORDER BY post_date 94 | "; 95 | 96 | $list = $wpdb->get_col( $sql ); 97 | 98 | if ( empty( $list ) ) { 99 | return; 100 | } 101 | 102 | $m = isset( $_GET['mfa'] ) ? (int) $_GET['mfa'] : 0; 103 | $predate = ''; 104 | 105 | echo ''; 122 | } 123 | -------------------------------------------------------------------------------- /includes/admin/styles-fix.php: -------------------------------------------------------------------------------- 1 | query; 27 | 28 | if ( ! is_archive() || ! wpp_is_active( 'persian_date' ) ) { 29 | return $title; 30 | } 31 | 32 | if ( $sep_location === 'right' ) { 33 | $query = array_reverse( $query ); 34 | } 35 | 36 | if ( isset( $query['monthnum'] ) ) { 37 | $query['monthnum'] = $wpp_months_name[ (int) $query['monthnum'] ]; 38 | $title = implode( " ", $query ) . " $sep " . get_bloginfo( "name" ); 39 | } 40 | 41 | if ( wpp_is_active( 'conv_page_title' ) ) { 42 | $title = fix_number( $title ); 43 | } 44 | 45 | return $title; 46 | } 47 | 48 | add_filter( 'wp_title', 'wpp_fix_title', PHP_INT_MAX, 2 ); 49 | add_filter( 'pre_get_document_title', 'wpp_fix_title', PHP_INT_MAX ); // WP 4.4+ -------------------------------------------------------------------------------- /includes/fixes-archives.php: -------------------------------------------------------------------------------- 1 | 'monthly', 15 | 'limit' => '', 16 | 'format' => 'html', 17 | 'before' => '', 18 | 'after' => '', 19 | 'show_post_count' => false, 20 | 'echo' => 1, 21 | 'order' => 'DESC', 22 | 'post_type' => 'post' 23 | ); 24 | 25 | $r = wp_parse_args( $args, $defaults ); 26 | $post_type_object = get_post_type_object( $r['post_type'] ); 27 | 28 | if ( ! is_post_type_viewable( $post_type_object ) ) { 29 | return; 30 | } 31 | 32 | $r['post_type'] = $post_type_object->name; 33 | $results = $wpdb->get_results( 34 | $wpdb->prepare( 35 | " 36 | SELECT date( post_date ) AS date, 37 | COUNT( ID ) AS count 38 | FROM $wpdb->posts 39 | WHERE post_date < NOW() 40 | AND post_type = '%s' 41 | AND post_status = 'publish' 42 | group by date 43 | ORDER BY post_date DESC 44 | ", 45 | $r['post_type'] 46 | ) 47 | ); 48 | 49 | if ( ! empty( $results ) ) { 50 | wpp_print_archive( $results, $r ); 51 | } 52 | } 53 | 54 | /** 55 | * @param $year 56 | * @param $format 57 | * @param $before 58 | * @param $count 59 | * @param $show_post_count 60 | * @param $r 61 | */ 62 | function echo_yarchive( $year, $format, $before, $count, $show_post_count, $r ) { 63 | if ( $show_post_count ) { 64 | $count = ' (' . fix_number( $count ) . ')'; 65 | } else { 66 | $count = ''; 67 | } 68 | 69 | $url = get_year_link( $year ); 70 | 71 | if ( 'post' !== $r['post_type'] ) { 72 | $url = add_query_arg( 'post_type', $r['post_type'], $url ); 73 | } 74 | 75 | echo get_archives_link( $url, fix_number( $year ), $format, $before, $count ); 76 | } 77 | 78 | /** 79 | * @param $old_date 80 | * @param $format 81 | * @param $before 82 | * @param $count 83 | * @param $show_post_count 84 | * @param $r 85 | */ 86 | function echo_marchive( $old_date, $format, $before, $count, $show_post_count, $r ) { 87 | global $wpp_months_name; 88 | 89 | $year = substr( $old_date, 0, 4 ); 90 | $month = substr( $old_date, 4, 2 ); 91 | 92 | if ( $show_post_count ) { 93 | $count = ' (' . fix_number( $count ) . ')'; 94 | } else { 95 | $count = ''; 96 | } 97 | 98 | $url = get_month_link( $year, $month ); 99 | 100 | if ( 'post' !== $r['post_type'] ) { 101 | $url = add_query_arg( 'post_type', $r['post_type'], $url ); 102 | } 103 | 104 | echo get_archives_link( $url, $wpp_months_name[ (int) $month ] . ' ' . fix_number( $year ), $format, $before, $count ); 105 | } 106 | 107 | /** 108 | * @param string $args 109 | */ 110 | function wp_get_parchives( $args = '' ) { 111 | global $wpdb; 112 | 113 | $defaults = array( 114 | 'type' => 'monthly', 115 | 'limit' => '', 116 | 'format' => 'html', 117 | 'before' => '', 118 | 'after' => '', 119 | 'show_post_count' => false, 120 | 'echo' => 1, 121 | 'order' => 'DESC' 122 | ); 123 | 124 | $r = wp_parse_args( $args, $defaults ); 125 | 126 | $results = $wpdb->get_results( 127 | " 128 | SELECT date ( post_date ) AS date, 129 | COUNT( ID ) AS count 130 | FROM $wpdb->posts 131 | WHERE post_date < NOW() 132 | AND post_type = 'post' 133 | AND post_status = 'publish' 134 | GROUP BY date 135 | ORDER BY post_date DESC 136 | " 137 | ); 138 | 139 | if ( ! empty( $results ) ) { 140 | wpp_print_archive( $results, $r ); 141 | } 142 | } 143 | 144 | /** 145 | * @param $results 146 | * @param $args 147 | */ 148 | function wpp_print_archive( $results, $args ) { 149 | global $wpp_months_name; 150 | 151 | if ( $args['type'] === 'yearly' ) { 152 | $old_date = parsidate( 'Y', $results[0]->date, 'eng' ); 153 | $count = $results[0]->count; 154 | $c = count( $results ); 155 | 156 | for ( $i = 1; $i < $c; $i ++ ) { 157 | $dt = $results[ $i ]; 158 | $date = parsidate( 'Y', $dt->date, 'eng' ); 159 | 160 | if ( $date === $old_date ) { 161 | $count += $dt->count; 162 | } else { 163 | echo_yarchive( $old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args ); 164 | 165 | $old_date = $date; 166 | $count = $dt->count; 167 | } 168 | } 169 | 170 | echo_yarchive( $old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args ); 171 | } elseif ( $args['type'] === 'monthly' ) { 172 | $old_date = parsidate( 'Ym', $results[0]->date, 'eng' ); 173 | $count = $results[0]->count; 174 | $c = count( $results ); 175 | 176 | for ( $i = 1; $i < $c; $i ++ ) { 177 | $dt = $results[ $i ]; 178 | $date = parsidate( 'Ym', $dt->date, 'eng' ); 179 | 180 | if ( $date === $old_date ) { 181 | $count += $dt->count; 182 | } else { 183 | echo_marchive( $old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args ); 184 | $old_date = $date; 185 | $count = $dt->count; 186 | } 187 | } 188 | 189 | echo_marchive( $old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args ); 190 | } elseif ( $args['type'] === 'daily' ) { 191 | foreach ( $results as $row ) { 192 | $date = parsidate( 'Y,m,d', $row->date, 'eng' ); 193 | $date = explode( ',', $date ); 194 | 195 | if ( $args['show_post_count'] ) { 196 | $count = ' (' . fix_number( $row->count ) . ')'; 197 | } else { 198 | $count = ''; 199 | } 200 | 201 | $text = fix_number( $date[2] ) . ' ' . $wpp_months_name[ (int) $date[1] ] . ' ' . fix_number( $date[0] ); 202 | 203 | echo get_archives_link( get_day_link( $date[0], $date[1], $date[2] ), $text, $args['format'], $args['before'], $count ); 204 | } 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /includes/fixes-dates.php: -------------------------------------------------------------------------------- 1 | post_modified ) ); 66 | } 67 | 68 | return parsidate( $format, date( 'Y-m-d H:i:s', strtotime( $post->post_date ) ), ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 69 | } 70 | 71 | /** 72 | * Fixes post date and returns to Jalali format 73 | * 74 | * @param string $time Post time 75 | * @param string $format Date format 76 | * @param bool $gmt retrieve the GMT time. Default false. 77 | * 78 | * @return string Formatted date 79 | * @author Parsa Kafi 80 | */ 81 | function wpp_fix_post_modified_time( $time, $format, $gmt ) { 82 | if ( ! disable_wpp() ) { 83 | return $time; 84 | } 85 | 86 | return parsidate( $format, $time, ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 87 | } 88 | 89 | /** 90 | * Fixes the_time hook and returns to Jalali format 91 | * 92 | * @param string $time Post time 93 | * @param string $format Date format 94 | * 95 | * @return string Formatted date 96 | */ 97 | function wpp_fix_the_time( $time, $format = '' ) { 98 | if ( empty( $time ) ) { 99 | return $time; 100 | } 101 | 102 | if ( empty( $format ) ) { 103 | $format = get_option( 'time_format' ); 104 | } 105 | 106 | if ( ! disable_wpp() ) { 107 | return date( $format, strtotime( $time ) ); 108 | } 109 | 110 | return parsidate( $format, $time, wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 111 | } 112 | 113 | /** 114 | * Fixes get_the_time hook and returns to Jalali format 115 | * 116 | * @param string $time Post time 117 | * @param string $format Date format 118 | * @param string $post WP Post 119 | * 120 | * @return string Formatted date 121 | */ 122 | function wpp_fix_get_the_time( $time, $format = '', $post = null ) { 123 | $post = get_post( $post ); 124 | 125 | if ( ! $post ) { 126 | global $post; 127 | } 128 | 129 | if ( empty( $post ) ) { 130 | return $time; 131 | } 132 | 133 | if ( empty( $format ) ) { 134 | $format = get_option( 'time_format' ); 135 | } 136 | 137 | if ( ! disable_wpp() ) { 138 | return date( $format, strtotime( $post->post_date ) ); 139 | } 140 | 141 | return parsidate( $format, $post->post_date, wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 142 | } 143 | 144 | /** 145 | * Fixes comment time and returns to Jalali format 146 | * 147 | * @param string $time Comment time 148 | * @param string $format Date format 149 | * 150 | * @return string Formatted date 151 | */ 152 | function wpp_fix_comment_time( $time, $format = '' ) { 153 | global $comment; 154 | 155 | if ( empty( $comment ) ) { 156 | return $time; 157 | } 158 | 159 | if ( empty( $format ) ) { 160 | $format = get_option( 'time_format' ); 161 | } 162 | if ( ! disable_wpp() ) { 163 | return date( $format, strtotime( $comment->comment_date ) ); 164 | } 165 | 166 | return parsidate( $format, $comment->comment_date, ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 167 | } 168 | 169 | /** 170 | * Fixes comment date and returns in Jalali format 171 | * 172 | * @param string $time Comment time 173 | * @param string $format Date format 174 | * 175 | * @return string Formatted date 176 | */ 177 | function wpp_fix_comment_date( $time, $format = '' ) { 178 | global $comment; 179 | 180 | if ( empty( $comment ) ) { 181 | return $time; 182 | } 183 | 184 | if ( empty( $format ) ) { 185 | $format = get_option( 'date_format' ); 186 | } 187 | if ( ! disable_wpp() ) { 188 | return date( $format, strtotime( $comment->comment_date ) ); 189 | } 190 | 191 | return parsidate( $format, $comment->comment_date, ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 192 | } 193 | 194 | /** 195 | * Fixes i18n date formatting and convert them to Jalali 196 | * 197 | * @param string $date Formatted date string. 198 | * @param string $format Format to display the date. 199 | * @param int $timestamp A sum of Unix timestamp and timezone offset in seconds. 200 | * Might be without offset if input omitted timestamp but requested GMT. 201 | * @param bool $gmt Whether to use GMT timezone. Only applies if timestamp was not provided. 202 | * Default false. 203 | * 204 | * @return string Formatted time 205 | */ 206 | function wpp_fix_i18n( $date, $format, $timestamp, $gmt ) { 207 | global $post; 208 | 209 | //$post_id = ( is_object( $post ) && isset( $post->ID ) ) ? $post->ID : null; 210 | 211 | if ( ! disable_wpp() ) { 212 | return $format; 213 | } 214 | 215 | return parsidate( $format, $timestamp, ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 216 | } 217 | 218 | /** 219 | * Convert date to Jalali 220 | * 221 | * @param $date 222 | * @param $format 223 | * @param $timestamp 224 | * @param $timezone 225 | * 226 | * @return int|mixed|string 227 | */ 228 | function wpp_fix_wp_date( $date, $format, $timestamp, $timezone ) { 229 | if ( ! disable_wpp() ) { 230 | return $format; 231 | } 232 | 233 | return parsidate( $format, $timestamp, ! wpp_is_active( 'conv_dates' ) ? 'eng' : 'per' ); 234 | } 235 | 236 | function array_key_exists_r( $needle, $haystack, $value = null ) { 237 | $result = array_key_exists( $needle, $haystack ); 238 | 239 | if ( $result ) { 240 | if ( $value != null && $haystack[ $needle ] ) { 241 | return 1; 242 | } 243 | 244 | return true; 245 | } 246 | 247 | foreach ( $haystack as $v ) { 248 | if ( is_array( $v ) || is_object( $v ) ) { 249 | $result = array_key_exists_r( $needle, $v ); 250 | } 251 | 252 | if ( $result ) { 253 | return $result; 254 | } 255 | } 256 | 257 | return $result; 258 | } -------------------------------------------------------------------------------- /includes/fixes-misc.php: -------------------------------------------------------------------------------- 1 | name = 'jalali_datepicker'; 19 | 20 | $this->label = __( 'Date', 'wp-parsidate' ); 21 | 22 | $this->category = __( 'Parsidate', 'wp-parsidate' ); 23 | 24 | $this->defaults = array( 25 | 'placeholder' => 'YYYY-MM-DD', 26 | ); 27 | 28 | parent::__construct(); 29 | 30 | $this->settings = $settings; 31 | } 32 | 33 | /** 34 | * Create extra settings for your field. These are visible when editing a field 35 | * 36 | * @param $field (array) the $field being edited 37 | * 38 | * @since 4.0.0 39 | */ 40 | public function create_options( $field ) { 41 | $key = $field['name']; 42 | ?> 43 | 44 | 45 | 46 |

47 | 48 | 49 | 'text', 52 | 'name' => 'fields[' . $key . '][placeholder]', 53 | 'value' => $field['placeholder'], 54 | 'layout' => 'horizontal' 55 | ) ); 56 | ?> 57 | 58 | 59 | 71 |
72 | 75 |
76 | settings ); -------------------------------------------------------------------------------- /includes/plugins/advanced-custom-fields/acf-fields/class-wpp-acf-datepicker-v5.php: -------------------------------------------------------------------------------- 1 | name = 'jalali_datepicker'; 20 | 21 | $this->label = __( 'Date', 'wp-parsidate' ); 22 | 23 | $this->category = __( 'Parsidate', 'wp-parsidate' ); 24 | 25 | $this->defaults = array( 26 | 'placeholder' => 'YYYY-MM-DD', 27 | ); 28 | 29 | $this->l10n = array( 30 | 'error' => __( 'Error! Please select a valid date.', 'wp-parsidate' ), 31 | ); 32 | 33 | $this->settings = $settings; 34 | 35 | parent::__construct(); 36 | } 37 | 38 | /** 39 | * Create extra settings for your field. These are visible when editing a field 40 | * 41 | * @param $field (array) the $field being edited 42 | * 43 | * @since 4.0.0 44 | */ 45 | function render_field_settings( $field ) { 46 | acf_render_field_setting( $field, array( 47 | 'label' => __( 'Placeholder', 'wp-parsidate' ), 48 | 'instructions' => __( 'Show custom placeholder', 'wp-parsidate' ), 49 | 'type' => 'text', 50 | 'name' => 'placeholder', 51 | ) ); 52 | } 53 | 54 | /** 55 | * Create the HTML interface for your field 56 | * 57 | * @param $field (array) the $field being edited 58 | * 59 | * @since 4.0.0 60 | */ 61 | function render_field( $field ) { ?> 62 | 65 | settings ); 183 | -------------------------------------------------------------------------------- /includes/plugins/advanced-custom-fields/acf-fields/class-wpp-acf-timepicker-v4.php: -------------------------------------------------------------------------------- 1 | name = 'wpp_timepicker'; 19 | 20 | $this->label = __( 'Date', 'wp-parsidate' ); 21 | 22 | $this->category = __( 'Date', 'wp-parsidate' ); 23 | 24 | $this->defaults = array( 25 | 'placeholder' => 'YYYY-MM-DD', 26 | ); 27 | 28 | parent::__construct(); 29 | 30 | $this->settings = $settings; 31 | } 32 | 33 | /** 34 | * Create extra settings for your field. These are visible when editing a field 35 | * 36 | * @param $field (array) the $field being edited 37 | * 38 | * @since 4.0.0 39 | */ 40 | function create_options( $field ) { 41 | $key = $field['name']; 42 | ?> 43 | 44 | 45 | 46 |

47 | 48 | 49 | 'text', 52 | 'name' => 'fields[' . $key . '][placeholder]', 53 | 'value' => $field['placeholder'], 54 | 'layout' => 'horizontal' 55 | ) ); 56 | ?> 57 | 58 | 59 | 71 |
72 | 75 |
76 | settings ); -------------------------------------------------------------------------------- /includes/plugins/advanced-custom-fields/acf-fields/class-wpp-acf-timepicker-v5.php: -------------------------------------------------------------------------------- 1 | name = 'wpp_timepicker'; 20 | 21 | $this->label = __( 'Time', 'wp-parsidate' ); 22 | 23 | $this->category = __( 'Parsidate', 'wp-parsidate' ); 24 | 25 | $this->defaults = array( 26 | 'time-format' => '12 hours', 27 | 'placeholder' => 'HH:MM', 28 | ); 29 | 30 | $this->l10n = array( 31 | 'error' => __( 'Error! Please select a valid time.', 'wp-parsidate' ), 32 | ); 33 | 34 | $this->settings = $settings; 35 | 36 | parent::__construct(); 37 | } 38 | 39 | /** 40 | * Create extra settings for your field. These are visible when editing a field 41 | * 42 | * @param $field (array) the $field being edited 43 | * 44 | * @since 4.0.0 45 | */ 46 | function render_field_settings( $field ) { 47 | acf_render_field_setting( $field, array( 48 | 'label' => __( 'Time Format', 'wp-parsidate' ), 49 | 'instructions' => __( 'Display time picker in 24 or 12 hours format', 'wp-parsidate' ), 50 | 'type' => 'select', 51 | 'name' => 'time-format', 52 | 'choices' => array( 53 | '12hours' => '12 hours', 54 | '24hours' => '24 hours', 55 | ) 56 | ) ); 57 | 58 | acf_render_field_setting( $field, array( 59 | 'label' => __( 'Placeholder', 'wp-parsidate' ), 60 | 'instructions' => __( 'Show custom placeholder', 'wp-parsidate' ), 61 | 'type' => 'text', 62 | 'name' => 'placeholder', 63 | ) ); 64 | } 65 | 66 | /** 67 | * Create the HTML interface for your field 68 | * 69 | * @param $field (array) the $field being edited 70 | * 71 | * @since 4.0.0 72 | */ 73 | function render_field( $field ) { ?> 74 |
75 | 79 | 87 |
88 | settings ); -------------------------------------------------------------------------------- /includes/plugins/advanced-custom-fields/acf.php: -------------------------------------------------------------------------------- 1 | settings = array( 23 | 'version' => '1.0.0', 24 | 'url' => WP_PARSI_URL . 'includes/plugins/', 25 | 'path' => WP_PARSI_DIR . 'includes/plugins/' 26 | ); 27 | 28 | add_filter( 'wpp_settings_tabs', array( $this, 'add_tab' ) ); 29 | add_filter( 'wpp_registered_settings', array( $this, 'add_settings' ) ); 30 | 31 | if ( wpp_is_active( 'acf_fix_date' ) ) { 32 | add_action( 'acf/include_field_types', array( $this, 'include_files' ) ); // v5 33 | add_action( 'acf/register_fields', array( $this, 'include_files' ) ); // v4 34 | } 35 | } 36 | 37 | /** 38 | * Returns an instance of class 39 | * 40 | * @return WPP_ACF 41 | * @since 4.0.0 42 | */ 43 | public static function getInstance() { 44 | if ( self::$instance == null ) { 45 | self::$instance = new WPP_ACF(); 46 | } 47 | 48 | return self::$instance; 49 | } 50 | 51 | /** 52 | * This function will include the field type class 53 | * 54 | * @param $version (int) major ACF version. Defaults to false 55 | * 56 | * @return void 57 | * @since 4.0.0 58 | */ 59 | public function include_files( $version = false ) { 60 | $version = $version ? (float) $version : 4; 61 | 62 | include_once( 'acf-fields/class-wpp-acf-datepicker-v' . (float) $version . '.php' ); 63 | include_once( 'acf-fields/class-wpp-acf-timepicker-v' . (float) $version . '.php' ); 64 | } 65 | 66 | 67 | /** 68 | * Add ACF settings tab 69 | * 70 | * @param $tabs 71 | * 72 | * @return mixed 73 | * @sicne 5.1.3 74 | */ 75 | public function add_tab( $tabs ) { 76 | $about_tab = $tabs['about']; 77 | 78 | unset( $tabs['about'] ); 79 | 80 | $tabs['acf'] = __( 'Advanced Custom Fields', 'wp-parsidate' ); 81 | $tabs['about'] = $about_tab; 82 | 83 | return $tabs; 84 | } 85 | 86 | /** 87 | * Adds settings for toggle fixing 88 | * 89 | * @param array $old_settings Old settings 90 | * 91 | * @return array New settings 92 | */ 93 | public function add_settings( $old_settings ) { 94 | $settings['acf'] = apply_filters( 'wpp_acf_settings', array( 95 | 'acf_header' => array( 96 | 'id' => 'acf_header', 97 | 'name' => __( 'Localization', 'wp-parsidate' ), 98 | 'type' => 'header', 99 | ), 100 | 'acf_fix_date' => array( 101 | 'id' => 'acf_fix_date', 102 | 'name' => __( 'Jalali Datepicker', 'wp-parsidate' ), 103 | 'type' => 'checkbox', 104 | 'options' => 1, 105 | 'std' => 0, 106 | ), 107 | 'acf_persian_date' => array( 108 | 'id' => 'acf_persian_date', 109 | 'name' => __( 'Save dates in Jalali format (Not recommended)', 'wp-parsidate' ), 110 | 'type' => 'checkbox', 111 | 'options' => 1, 112 | 'std' => 0, 113 | ), 114 | 'acf_footer' => array( 115 | 'id' => 'acf_footer', 116 | 'type' => 'footer', 117 | ), 118 | ) ); 119 | 120 | return array_merge( $old_settings, $settings ); 121 | } 122 | } 123 | 124 | return WPP_ACF::getInstance(); 125 | } -------------------------------------------------------------------------------- /includes/plugins/disable.php: -------------------------------------------------------------------------------- 1 | $list[1], 'class' => ( $list[2] ?? '' ) ); 19 | } 20 | } 21 | 22 | /** 23 | * @return bool 24 | */ 25 | function disable_wpp() { 26 | global $dis_hook; 27 | 28 | if ( wpp_is_feed() ) { 29 | return false; 30 | } 31 | 32 | $calls = debug_backtrace(); 33 | unset( $calls[0], $calls[1], $calls[2] ); 34 | 35 | foreach ( $calls as $i => $call ) { 36 | unset( $calls[ $i ] ); 37 | 38 | if ( $call['function'] === 'apply_filters' && empty( $call['class'] ) ) { 39 | break; 40 | } 41 | } 42 | 43 | $func = $calls[ ++ $i ]['function']; 44 | 45 | if ( empty( $dis_hook[ $func ] ) ) { 46 | return true; 47 | } 48 | 49 | $hooks = $dis_hook[ $func ]; 50 | 51 | unset( $calls[ $i ] ); 52 | 53 | foreach ( $calls as $i => $call ) { 54 | foreach ( $hooks as $hook ) { 55 | $hook['class'] = trim( $hook['class'] ); 56 | 57 | if ( ( isset( $call['class'] ) && empty( $hook['class'] ) ) || ( ! isset( $call['class'] ) && ! empty( $hook['class'] ) ) ) { 58 | continue; 59 | } 60 | 61 | if ( ! empty( $hook['func'] ) && ( $call['function'] !== trim( $hook['func'] ) ) ) { 62 | continue; 63 | } 64 | 65 | if ( ( ! isset( $call['class'] ) && empty( $hook['class'] ) ) || $call['class'] === $hook['class'] ) { 66 | return false; 67 | } 68 | } 69 | } 70 | 71 | return true; 72 | } 73 | 74 | 75 | /** 76 | * @param $report_data 77 | * 78 | * @return mixed 79 | */ 80 | function wpp_woocommerce_admin_report_data( $report_data ) { 81 | $report_data['where'] = preg_replace_callback( "/posts.post_date\s.=?\s'([^']+)'/i", 'fix_date_woo_report', $report_data['where'] ); 82 | 83 | return $report_data; 84 | } 85 | 86 | /** 87 | * @param $date 88 | * 89 | * @return array|mixed|string|string[] 90 | */ 91 | function fix_date_woo_report( $date ) { 92 | if ( empty( $_GET['start_date'] ) || empty( $_GET['end_date'] ) ) { 93 | return $date[0]; 94 | } 95 | 96 | if ( strpos( $date[0], '=' ) === false ) { 97 | if ( (int) $_GET['end_date'] > 1900 ) { 98 | return $date[0]; 99 | } 100 | 101 | $dt = gregdate( 'Y-m-d', $_GET['end_date'] ); 102 | $dt = date( 'Y-m-d', strtotime( "$dt +1 day" ) ); 103 | } else { 104 | if ( (int) $_GET['start_date'] > 1900 ) { 105 | return $date[0]; 106 | } 107 | 108 | $dt = gregdate( 'Y-m-d', $_GET['start_date'] ); 109 | } 110 | 111 | return substr_replace( $date[0], $dt, - 20, 10 ); 112 | } 113 | 114 | // add the filter 115 | add_filter( 'woocommerce_reports_get_order_report_query', 'wpp_woocommerce_admin_report_data', 10, 1 ); 116 | 117 | 118 | /** 119 | * Makes EDD compatible with WP-Parsidate plugin 120 | * 121 | * @package WP-Parsidate 122 | * @subpackage Plugins/EDD 123 | * @author Ehsaan 124 | */ 125 | class WPP_Disable { 126 | public static $instance = null; 127 | 128 | /** 129 | * Hooks required tags 130 | */ 131 | private function __construct() { 132 | add_filter( 'wpp_plugins_compatibility_settings', array( $this, 'add_settings' ) ); 133 | 134 | if ( ! wpp_is_active( 'dis_prices' ) ) { 135 | add_filter( 'dis_rial_currency_filter_after', 'per_number', 10, 2 ); 136 | } 137 | 138 | if ( ! wpp_is_active( 'dis_rial_fix' ) ) { 139 | add_filter( 'dis_rial_currency_filter_after', array( $this, 'rial_fix' ), 10, 2 ); 140 | } 141 | } 142 | 143 | /** 144 | * Returns an instance of class 145 | * 146 | * @return WPP_Disable 147 | */ 148 | public static function getInstance() { 149 | if ( self::$instance == null ) { 150 | self::$instance = new WPP_Disable(); 151 | } 152 | 153 | return self::$instance; 154 | } 155 | 156 | /** 157 | * RIAL fix for EDD 158 | * 159 | * @param integer|string $price Price Number 160 | * @param $did 161 | * 162 | * @return string 163 | */ 164 | public function rial_fix( $price, $did ) { 165 | return str_replace( 'RIAL', 'ریال', $price ); 166 | } 167 | 168 | /** 169 | * Adds settings for toggle fixing 170 | * 171 | * @param array $old_settings Old settings 172 | * 173 | * @return array New settings 174 | */ 175 | public function add_settings( $old_settings ) { 176 | $options = array( 177 | 'enable' => __( 'Enable', 'wp-parsidate' ), 178 | 'disable' => __( 'Disable', 'wp-parsidate' ) 179 | ); 180 | 181 | $settings = array( 182 | 'dis' => array( 183 | 'id' => 'dis', 184 | 'name' => __( 'Hook deactivator', 'wp-parsidate' ), 185 | 'type' => 'header' 186 | ), 187 | 'dis_prices' => array( 188 | 'id' => 'dis_input', 189 | 'name' => __( 'Hook list', 'wp-parsidate' ), 190 | 'type' => 'textarea', 191 | 'options' => $options, 192 | 'std' => '', 193 | 'desc' => __( 'Enter hook,class,function to remove parsidate filter from it', 'wp-parsidate' ) 194 | ) 195 | ); 196 | 197 | return array_merge( $old_settings, $settings ); 198 | } 199 | } 200 | 201 | return WPP_Disable::getInstance(); -------------------------------------------------------------------------------- /includes/plugins/easy-digital-downloads/easy-digital-downloads.php: -------------------------------------------------------------------------------- 1 | array( 76 | 'id' => 'edd_header', 77 | 'name' => __( 'Localization', 'wp-parsidate' ), 78 | 'type' => 'header' 79 | ), 80 | 'edd_prices' => array( 81 | 'id' => 'edd_prices', 82 | 'name' => __( 'Fix prices', 'wp-parsidate' ), 83 | 'type' => 'checkbox', 84 | 'options' => 1, 85 | 'std' => 0, 86 | ), 87 | 'edd_rial_fix' => array( 88 | 'id' => 'edd_rial_fix', 89 | 'name' => __( 'Replace ریال with RIAL', 'wp-parsidate' ), 90 | 'type' => 'checkbox', 91 | 'options' => 1, 92 | 'std' => 0, 93 | ), 94 | 'edd_footer' => array( 95 | 'id' => 'edd_footer', 96 | 'type' => 'footer' 97 | ), 98 | ) ); 99 | 100 | return array_merge( $old_settings, $settings ); 101 | } 102 | 103 | /** 104 | * RIAL fix for EDD 105 | */ 106 | public function rial_fix( $price, $did ) { 107 | return str_replace( 'RIAL', 'ریال', $price ); 108 | } 109 | } 110 | 111 | return WPP_EDD::getInstance(); 112 | } -------------------------------------------------------------------------------- /includes/plugins/elementor/class-jalali-date-time-control.php: -------------------------------------------------------------------------------- 1 | true, 24 | 'picker_options' => array( 25 | 'locale' => 'fa', 26 | 'altFormat' => 'Y/m/d H:i', 27 | 'dateFormat' => 'Y/m/d H:i', 28 | 'enableTime' => true, 29 | 'time_24hr' => true, 30 | ), 31 | 'dynamic' => array( 32 | 'categories' => array( 33 | TagsModule::DATETIME_CATEGORY, 34 | ), 35 | ), 36 | ); 37 | } 38 | 39 | /** 40 | * Render our control to replace it with the Elementor's date_time control 41 | * 42 | * @return void 43 | * @sicne 5.1.3 44 | */ 45 | public function content_template() { 46 | ?> 47 |
48 | 49 |
50 | 58 |
59 |
60 | <# if ( data.description ) { #> 61 |
{{{ data.description }}}
62 | <# } #> 63 | unregister( 'date_time' ); 26 | 27 | // Register your custom date_time control 28 | $controls_manager->register( new \JalaliElementor\Controls\WPP_Elementor_Date_Time_Control() ); 29 | } 30 | 31 | /** 32 | * Enqueue scripts for Jalali date picker 33 | */ 34 | public function enqueue_editor_scripts() { 35 | global $wpp_months_name; 36 | 37 | $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpp_is_active( 'dev_mode' ) ? '' : '.min'; 38 | 39 | wp_enqueue_script( 'wpp_jalali_datepicker', WP_PARSI_URL . 'assets/js/jalalidatepicker.min.js', array(), WP_PARSI_VER ); 40 | wp_enqueue_style( 'wpp_jalali_datepicker', WP_PARSI_URL . "assets/css/jalalidatepicker$suffix.css", array(), WP_PARSI_VER ); 41 | 42 | do_action( 'wpp_jalali_datepicker_enqueued', 'elementor' ); 43 | 44 | $months_name = $wpp_months_name; 45 | 46 | // Remove first item (nulled string) from name of months array 47 | array_shift( $months_name ); 48 | 49 | wp_localize_script( 'wpp_jalali_datepicker', 'WPP_I18N', 50 | array( 51 | 'months' => $months_name, 52 | ), 53 | ); 54 | } 55 | } 56 | 57 | new WPP_Elementor_Integration(); -------------------------------------------------------------------------------- /includes/plugins/elementor/elementor.php: -------------------------------------------------------------------------------- 1 | include_files(); 15 | 16 | add_filter( 'wpp_settings_tabs', array( $this, 'add_tab' ) ); 17 | add_filter( 'wpp_registered_settings', array( $this, 'add_settings' ) ); 18 | add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'add_styles' ) ); 19 | } 20 | 21 | /** 22 | * Returns an instance of class 23 | * 24 | * @return WPP_Elementor 25 | */ 26 | public static function getInstance() { 27 | if ( self::$instance == null ) { 28 | self::$instance = new WPP_Elementor(); 29 | } 30 | 31 | return self::$instance; 32 | } 33 | 34 | private function include_files() { 35 | if ( wpp_is_active( 'elem_date_picker' ) ) { 36 | require_once __DIR__ . '/class-jalali-date-time-control.php'; 37 | require_once __DIR__ . '/class-jalali-elementor-integration.php'; 38 | } 39 | } 40 | 41 | /** 42 | * Add Elementor settings tab 43 | * 44 | * @param $tabs 45 | * 46 | * @return mixed 47 | * @sicne 5.1.3 48 | */ 49 | public function add_tab( $tabs ) { 50 | $about_tab = $tabs['about']; 51 | 52 | unset( $tabs['about'] ); 53 | 54 | $tabs['elementor'] = __( 'Elementor', 'wp-parsidate' ); 55 | $tabs['about'] = $about_tab; 56 | 57 | return $tabs; 58 | } 59 | 60 | /** 61 | * Add Elementor settings 62 | * 63 | * @param array $old_settings Old settings 64 | * 65 | * @return array New settings 66 | * @since 4.0.0 67 | */ 68 | public function add_settings( $old_settings ) { 69 | $settings['elementor'] = apply_filters( 'wpp_elementor_settings', array( 70 | 'elem_date_header' => array( 71 | 'id' => 'elem_date_header', 72 | 'name' => __( 'Date Picker', 'wp-parsidate' ), 73 | 'type' => 'header', 74 | ), 75 | 'elem_date_picker' => array( 76 | 'id' => 'elem_date_picker', 77 | 'name' => __( 'Enable Jalali date-picker', 'wp-parsidate' ), 78 | 'type' => 'checkbox', 79 | 'options' => 1, 80 | 'std' => 0, 81 | ), 82 | 'elem_date_footer' => array( 83 | 'id' => 'elem_date_footer', 84 | 'type' => 'footer', 85 | ), 86 | ) ); 87 | 88 | return array_merge( $old_settings, $settings ); 89 | } 90 | 91 | public function add_styles( $value = '' ) { 92 | $wpp_elementor_css = " 93 | body, .tipsy-inner, .elementor-button, .elementor-panel { 94 | font-family: Vazir,Tahoma,Arial,Helvetica,Verdana,sans-serif; 95 | } 96 | .flatpickr-calendar.open{left:-20000px!important;} 97 | .tipsy-inner { 98 | font-size: small; 99 | }"; 100 | $wpp_elementor_css = apply_filters( "wpp_elementor_css", $wpp_elementor_css ); 101 | 102 | wp_add_inline_style( "elementor-editor", $wpp_elementor_css ); 103 | } 104 | } 105 | 106 | return WPP_Elementor::getInstance(); 107 | } -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-cities/wc-city-select.php: -------------------------------------------------------------------------------- 1 | plugin_path = WP_PARSI_DIR . 'includes/plugins/wc-cities'; 30 | $this->plugin_url = WP_PARSI_URL; 31 | 32 | add_filter( 'woocommerce_billing_fields', array( $this, 'billing_fields' ), 10, 2 ); 33 | add_filter( 'woocommerce_shipping_fields', array( $this, 'shipping_fields' ), 10, 2 ); 34 | add_filter( 'woocommerce_form_field_city', array( $this, 'form_field_city' ), 10, 4 ); 35 | 36 | //js scripts 37 | add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) ); 38 | } 39 | 40 | public function billing_fields( $fields, $country ) { 41 | $fields['billing_city']['type'] = 'city'; 42 | 43 | return $fields; 44 | } 45 | 46 | public function shipping_fields( $fields, $country ) { 47 | $fields['shipping_city']['type'] = 'city'; 48 | 49 | return $fields; 50 | } 51 | 52 | public function get_cities( $cc = null ) { 53 | if ( empty( $this->cities ) ) { 54 | $this->load_country_cities(); 55 | } 56 | 57 | if ( ! is_null( $cc ) ) { 58 | return isset( $this->cities[ $cc ] ) ? $this->cities[ $cc ] : false; 59 | } else { 60 | return $this->cities; 61 | } 62 | } 63 | 64 | public function load_country_cities() { 65 | global $cities; 66 | 67 | // Load only the city files the shop owner wants/needs. 68 | $allowed = array_merge( WC()->countries->get_allowed_countries(), WC()->countries->get_shipping_countries() ); 69 | 70 | if ( $allowed ) { 71 | foreach ( $allowed as $code => $country ) { 72 | if ( ! isset( $cities[ $code ] ) && file_exists( $this->get_plugin_path() . '/cities/' . $code . '.php' ) ) { 73 | include( $this->get_plugin_path() . '/cities/' . $code . '.php' ); 74 | } 75 | } 76 | } 77 | 78 | $this->cities = apply_filters( 'wc_city_select_cities', $cities ); 79 | } 80 | 81 | private function add_to_dropdown( $item ) { 82 | $this->dropdown_cities[] = $item; 83 | } 84 | 85 | public function form_field_city( $field, $key, $args, $value ) { 86 | // Do we need a clear div? 87 | if ( ( ! empty( $args['clear'] ) ) ) { 88 | $after = '
'; 89 | } else { 90 | $after = ''; 91 | } 92 | 93 | // Required markup 94 | if ( $args['required'] ) { 95 | $args['class'][] = 'validate-required'; 96 | $required = ' *'; 97 | } else { 98 | $required = ''; 99 | } 100 | 101 | // Custom attribute handling 102 | $custom_attributes = array(); 103 | 104 | if ( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) { 105 | foreach ( $args['custom_attributes'] as $attribute => $attribute_value ) { 106 | $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"'; 107 | } 108 | } 109 | 110 | // Validate classes 111 | if ( ! empty( $args['validate'] ) ) { 112 | foreach ( $args['validate'] as $validate ) { 113 | $args['class'][] = 'validate-' . $validate; 114 | } 115 | } 116 | 117 | // field p and label 118 | $field = '

'; 119 | 120 | if ( $args['label'] ) { 121 | $field .= ''; 122 | } 123 | 124 | // Get Country 125 | $country_key = $key == 'billing_city' ? 'billing_country' : 'shipping_country'; 126 | $current_cc = WC()->checkout->get_value( $country_key ); 127 | $state_key = $key == 'billing_city' ? 'billing_state' : 'shipping_state'; 128 | $current_sc = WC()->checkout->get_value( $state_key ); 129 | 130 | // Get country cities 131 | $cities = $this->get_cities( $current_cc ); 132 | 133 | if ( is_array( $cities ) ) { 134 | $field .= ''; 150 | 151 | } else { 152 | $field .= ''; 153 | } 154 | 155 | // field description and close wrapper 156 | if ( $args['description'] ) { 157 | $field .= '' . esc_attr( $args['description'] ) . ''; 158 | } 159 | 160 | $field .= '

' . $after; 161 | 162 | return $field; 163 | } 164 | 165 | public function load_scripts() { 166 | if ( is_cart() || is_checkout() || is_wc_endpoint_url( 'edit-address' ) ) { 167 | $city_select_path = $this->get_plugin_url() . 'assets/js/city-select.js'; 168 | 169 | wp_enqueue_script( 'wc-city-select', $city_select_path, array( 'jquery', 'woocommerce' ), self::VERSION, true ); 170 | 171 | $cities = json_encode( $this->get_cities() ); 172 | 173 | wp_localize_script( 'wc-city-select', 174 | 'wc_city_select_params', 175 | array( 176 | 'cities' => $cities, 177 | 'i18n_select_city_text' => esc_attr__( 'Select an option…', 'woocommerce' ) 178 | ) 179 | ); 180 | } 181 | } 182 | 183 | public function get_plugin_path() { 184 | if ( $this->plugin_path ) { 185 | return $this->plugin_path; 186 | } 187 | 188 | return $this->plugin_path = plugin_dir_path( __FILE__ ); 189 | } 190 | 191 | public function get_plugin_url() { 192 | if ( $this->plugin_url ) { 193 | return $this->plugin_url; 194 | } 195 | 196 | return $this->plugin_url = plugin_dir_url( __FILE__ ); 197 | } 198 | } 199 | 200 | $GLOBALS['wc_city_select'] = new WC_City_Select(); 201 | } -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-gateways/blocks/wpp-mellat-pg-block.php: -------------------------------------------------------------------------------- 1 | settings = get_option( "woocommerce_{$this->name}_settings", [] ); 26 | $this->gateway = new $class_name; 27 | } 28 | 29 | /** 30 | * Returns if this payment method should be active. If false, the scripts will not be enqueued. 31 | * 32 | * @return boolean 33 | */ 34 | public function is_active() { 35 | return filter_var( $this->get_setting( 'enabled', true ), FILTER_VALIDATE_BOOLEAN ); 36 | } 37 | 38 | /** 39 | * Returns an array of scripts/handles to be registered for this payment method. 40 | * 41 | * @return array 42 | */ 43 | public function get_payment_method_script_handles() { 44 | $script_id = "wpp-wc-$this->name-blocks-integration"; 45 | $script_name = "wpp-wc-$this->name-pg.js"; 46 | 47 | wp_register_script( 48 | $script_id, 49 | WP_PARSI_URL . "assets/js/wc-pg-blocks/$script_name", 50 | array( 51 | 'wc-blocks-registry', 52 | 'wc-settings', 53 | 'wp-element', 54 | 'wp-html-entities', 55 | 'wp-i18n', 56 | ), 57 | false, 58 | true 59 | ); 60 | 61 | if ( function_exists( 'wp_set_script_translations' ) ) { 62 | wp_set_script_translations( $script_id, 'wp-parsidate', WP_PARSI_DIR . 'languages/' ); 63 | } 64 | 65 | return array( $script_id ); 66 | } 67 | 68 | /** 69 | * Returns an array of key=>value pairs of data made available to the payment methods script. 70 | * 71 | * @return array 72 | */ 73 | public function get_payment_method_data() { 74 | return array( 75 | 'title' => $this->get_setting( 'title' ), 76 | 'description' => $this->get_setting( 'description' ), 77 | 'supports' => $this->get_supported_features(), 78 | ); 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-gateways/blocks/wpp-parsian-pg-block.php: -------------------------------------------------------------------------------- 1 | settings = get_option( "woocommerce_{$this->name}_settings", [] ); 26 | $this->gateway = new $class_name; 27 | } 28 | 29 | /** 30 | * Returns if this payment method should be active. If false, the scripts will not be enqueued. 31 | * 32 | * @return boolean 33 | */ 34 | public function is_active() { 35 | return filter_var( $this->get_setting( 'enabled', true ), FILTER_VALIDATE_BOOLEAN ); 36 | } 37 | 38 | /** 39 | * Returns an array of scripts/handles to be registered for this payment method. 40 | * 41 | * @return array 42 | */ 43 | public function get_payment_method_script_handles() { 44 | $script_id = "wpp-wc-$this->name-blocks-integration"; 45 | $script_name = "wpp-wc-$this->name-pg"; 46 | $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || wpp_is_active( 'dev_mode' ) ? '' : '.min'; 47 | 48 | 49 | wp_register_script( 50 | $script_id, 51 | WP_PARSI_URL . "assets/js/wc-pg-blocks/$script_name$suffix.js", 52 | array( 53 | 'wc-blocks-registry', 54 | 'wc-settings', 55 | 'wp-element', 56 | 'wp-html-entities', 57 | 'wp-i18n', 58 | ), 59 | false, 60 | true 61 | ); 62 | 63 | if ( function_exists( 'wp_set_script_translations' ) ) { 64 | wp_set_script_translations( $script_id, 'wp-parsidate', WP_PARSI_DIR . 'languages/' ); 65 | } 66 | 67 | return array( $script_id ); 68 | } 69 | 70 | /** 71 | * Returns an array of key=>value pairs of data made available to the payment methods script. 72 | * 73 | * @return array 74 | */ 75 | public function get_payment_method_data() { 76 | return array( 77 | 'title' => $this->get_setting( 'title' ), 78 | 'description' => $this->get_setting( 'description' ), 79 | 'supports' => $this->get_supported_features(), 80 | ); 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-gateways/blocks/wpp-pasargad-pg-block.php: -------------------------------------------------------------------------------- 1 | settings = get_option( "woocommerce_{$this->name}_settings", [] ); 26 | $this->gateway = new $class_name; 27 | } 28 | 29 | /** 30 | * Returns if this payment method should be active. If false, the scripts will not be enqueued. 31 | * 32 | * @return boolean 33 | */ 34 | public function is_active() { 35 | return filter_var( $this->get_setting( 'enabled', true ), FILTER_VALIDATE_BOOLEAN ); 36 | } 37 | 38 | /** 39 | * Returns an array of scripts/handles to be registered for this payment method. 40 | * 41 | * @return array 42 | */ 43 | public function get_payment_method_script_handles() { 44 | $script_id = "wpp-wc-$this->name-blocks-integration"; 45 | $script_name = "wpp-wc-$this->name-pg.js"; 46 | 47 | wp_register_script( 48 | $script_id, 49 | WP_PARSI_URL . "assets/js/wc-pg-blocks/$script_name", 50 | array( 51 | 'wc-blocks-registry', 52 | 'wc-settings', 53 | 'wp-element', 54 | 'wp-html-entities', 55 | 'wp-i18n', 56 | ), 57 | false, 58 | true 59 | ); 60 | 61 | if ( function_exists( 'wp_set_script_translations' ) ) { 62 | wp_set_script_translations( $script_id, 'wp-parsidate', WP_PARSI_DIR . 'languages/' ); 63 | } 64 | 65 | return array( $script_id ); 66 | } 67 | 68 | /** 69 | * Returns an array of key=>value pairs of data made available to the payment methods script. 70 | * 71 | * @return array 72 | */ 73 | public function get_payment_method_data() { 74 | return array( 75 | 'title' => $this->get_setting( 'title' ), 76 | 'description' => $this->get_setting( 'description' ), 77 | 'supports' => $this->get_supported_features(), 78 | ); 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-gateways/index.php: -------------------------------------------------------------------------------- 1 | nEWZmLeK0zgEWysFFcpcT6lnYpzYcXFf+r43wD73ko+CjR5EmwDsmlKqKS5y3rpIHQrj+xE+yiNGlcPFNwFl3cCcHPkeI0hqaPPYxE2XeP6Wa0keegny2AWWK2Cuv61YHVz4XgxTPBX7B/19ClN4wzI5CoNc9jkx0PIXEo5iWLk=AQAB

0b5D6oI3mOKKIHgfCrl03vfUTo91UeJyvpZ1l6F6NzUzPDhCG3Sin5dXtxEFejPayLsgLOIMMuqobOzI9wJpBQ==

vrxvorDFE3g1cj2kWWWZc2BS7UMf+xxnPhtBR3x3T/DyTEnkEXvGLdRBuUGWKhxUpRcBkcBfAadJjhYUqYBvJQ==SKYKiDPKZh4xkcWJmwFZxdE5rGxsSoyRCgq7eGXqGy1GLdmerDveCEE3lKVErGtBoL2QC3vQleJJrFDn2wbusQ==sIoTPd8lmd6ygVnCq6fZPywRtV9i03a3rIlng3YVrN1UNv5RZUlN5g9HAeRNzA5K3j8MCc6nYQ1ojGWtnDGvLQ==rQzqbkXZ9Tmno3ElcliX57Xv4AXyF6yFO1kH4LHwkc8jN5dB9XYEdBIgm43yHFIznvOdc2L9Nkl2nHbFCeAKmg==XA7IN+XP2zPBpS9HlJmcHbWO2NHK07FVODH8R70QPP9bieRNx/4YY6TU5uOc+cZFGw7CVLHJCm0TdMBaGlgxeC/GTwMrCJigxUgaxbvDmxuSpqYqkjoZhgoZAuUct8RaZUN8zNdEsXCqRhbU61U2Ey587RyPQ7varg9hkPicVHE= -------------------------------------------------------------------------------- /includes/plugins/woocommerce/wc-gateways/wc-gateways.php: -------------------------------------------------------------------------------- 1 | include_files(); 20 | 21 | add_filter( 'wpp_woocommerce_settings', array( $this, 'add_settings' ) ); 22 | add_filter( 'woocommerce_payment_gateways', array( $this, 'register_selected_gateways' ) ); 23 | add_action( 'woocommerce_blocks_loaded', array( $this, 'register_order_approval_payment_method_type' ) ); 24 | } 25 | 26 | /** 27 | * Includes files for plugin 28 | * 29 | * @return void 30 | * @since 2.0 31 | */ 32 | public function include_files() { 33 | $implemented_gateways = array( 34 | 'parsian', 35 | 'pasargad', 36 | 'mellat' 37 | ); 38 | 39 | $selected_gateways = $this->get_selected_gateways(); 40 | $maybe_include = array_intersect( $implemented_gateways, $selected_gateways ); 41 | 42 | foreach ( $maybe_include as $filename ) { 43 | $file_path = WP_PARSI_DIR . "includes/plugins/wc-gateways/wpp-$filename-gateway.php"; 44 | 45 | if ( file_exists( $file_path ) ) { 46 | require_once( $file_path ); 47 | } 48 | } 49 | } 50 | 51 | /** 52 | * Returns an instance of class 53 | * 54 | * @return WPP_WC_Gateways 55 | */ 56 | public static function getInstance() { 57 | if ( self::$instance == null ) { 58 | self::$instance = new WPP_WC_Gateways(); 59 | } 60 | 61 | return self::$instance; 62 | } 63 | 64 | /** 65 | * Adds settings for toggle fixing 66 | * 67 | * @param array $old_settings Old settings 68 | * 69 | * @return array New settings 70 | * @since 4.0.0 71 | */ 72 | public function add_settings( $old_settings ) { 73 | $settings = array( 74 | 'wc_pg_header' => array( 75 | 'id' => 'wc_pg_header', 76 | 'name' => __( 'Payment Gateways', 'wp-parsidate' ), 77 | 'type' => 'header', 78 | ), 79 | 'woo_gateways' => array( 80 | 'id' => 'woo_gateways', 81 | 'name' => __( 'Payment gateways', 'wp-parsidate' ), 82 | 'type' => 'multicheck', 83 | 'options' => array( 84 | 'parsian' => __( 'Parsian Bank', 'wp-parsidate' ), 85 | 'pasargad' => __( 'Pasargad Bank', 'wp-parsidate' ), 86 | 'mellat' => __( 'Mellat Bank', 'wp-parsidate' ), 87 | ), 88 | 'std' => array( ), 89 | ), 90 | 'wc_pg_footer' => array( 91 | 'id' => 'wc_pg_footer', 92 | 'type' => 'footer', 93 | ), 94 | ); 95 | 96 | return array_merge( $old_settings, $settings ); 97 | } 98 | 99 | /** 100 | * @param $methods 101 | * 102 | * @return mixed 103 | * @since 5.0.0 104 | */ 105 | public function register_selected_gateways( $methods ) { 106 | $selected_pgs = self::get_selected_gateways(); 107 | 108 | if ( empty( $selected_pgs ) ) { 109 | return $methods; 110 | } 111 | 112 | foreach ( $selected_pgs as $method ) { 113 | $methods[] = 'WPP_WC_' . ucfirst( $method ) . '_Gateway'; 114 | } 115 | 116 | return $methods; 117 | } 118 | 119 | public function register_order_approval_payment_method_type() { 120 | if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { 121 | return; 122 | } 123 | 124 | add_action( 'woocommerce_blocks_payment_method_type_registration', 125 | function ( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { 126 | $implemented_gateways = array( 127 | 'parsian', 128 | 'pasargad', 129 | 'mellat' 130 | ); 131 | 132 | $selected_gateways = self::get_selected_gateways(); 133 | $maybe_include = array_intersect( $implemented_gateways, $selected_gateways ); 134 | 135 | foreach ( $maybe_include as $gateway ) { 136 | $block_path = WP_PARSI_DIR . "includes/plugins/wc-gateways/blocks/wpp-$gateway-pg-block.php"; 137 | 138 | if ( file_exists( $block_path ) ) { 139 | require_once( $block_path ); 140 | 141 | $class_name = 'WPP_WC_' . ucfirst( $gateway ) . '_Gateway_Blocks'; 142 | 143 | $payment_method_registry->register( new $class_name ); 144 | } 145 | } 146 | } 147 | ); 148 | } 149 | 150 | public function is_soap_enabled() { 151 | return extension_loaded( 'soap' ); 152 | } 153 | 154 | private function get_selected_gateways() { 155 | global $wpp_settings; 156 | 157 | return apply_filters( 'wpp_get_selected_wc_payment_gateways', $wpp_settings['woo_gateways'] ?? array() ); 158 | } 159 | } 160 | 161 | return WPP_WC_Gateways::getInstance(); 162 | } 163 | -------------------------------------------------------------------------------- /includes/tools.php: -------------------------------------------------------------------------------- 1 | 'wpp_current_date', 27 | 'title' => esc_html__( 'Today: ', 'wp-parsidate' ) . $current_date, 28 | 'meta' => array( 'class' => 'wpp-admin-bar-date' ), 29 | ); 30 | 31 | $wp_admin_bar->add_node( $args ); 32 | } 33 | 34 | add_action( 'admin_bar_menu', 'wpp_add_date_to_admin_bar', PHP_INT_MAX ); 35 | } 36 | 37 | /** 38 | * Style Wp-Parsidate admin bar date 39 | */ 40 | if ( ! function_exists( 'wpp_admin_bar_date_style' ) ) { 41 | function wpp_admin_bar_date_style( $wp_admin_bar ) { 42 | echo ''; 50 | } 51 | 52 | add_action( 'admin_head', 'wpp_admin_bar_date_style' ); 53 | } 54 | } 55 | 56 | if ( wpp_is_active( 'disable_copy' ) ) { 57 | if ( ! function_exists( 'wpp_disable_copy' ) ) { 58 | function wpp_disable_copy() { 59 | echo ''; 68 | } 69 | 70 | add_action( 'wp_footer', 'wpp_disable_copy' ); 71 | } 72 | } 73 | 74 | if ( wpp_is_active( 'disable_right_click' ) ) { 75 | if ( ! function_exists( 'wpp_disable_right_click' ) ) { 76 | function wpp_disable_right_click() { 77 | echo ''; 82 | } 83 | 84 | add_action( 'wp_footer', 'wpp_disable_right_click' ); 85 | } 86 | } -------------------------------------------------------------------------------- /includes/views/html-settings-sidebar.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |

Useful links

9 |
10 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /includes/widget/widget_calendar.php: -------------------------------------------------------------------------------- 1 | =' ) ) { 14 | parent::__construct( false, __( 'Jalali Date Calender', 'wp-parsidate' ), 'description=' . __( 'Jalali Date Calender', 'wp-parsidate' ) ); 15 | } else { 16 | parent::WP_Widget( false, __( 'Jalali Date Calender', 'wp-parsidate' ), 'description=' . __( 'Jalali Date Calender', 'wp-parsidate' ) ); 17 | } 18 | } 19 | 20 | /** 21 | * Outputs the settings update form. 22 | * 23 | * @param array $instance Current settings. 24 | * 25 | * @return void Default return is 'noform'. 26 | * @since 2.8.0 27 | * 28 | */ 29 | public function form( $instance ) { 30 | $title = ! empty( $instance['parsidate_calendar_title'] ) ? $instance['parsidate_calendar_title'] : __( 'Jalali Date Calender', 'wp-parsidate' ); 31 | $theme = ! empty( $instance['theme_color'] ) ? $instance['theme_color'] : 'light-mode'; 32 | 33 | if ( ! wpp_is_active( 'conv_permalinks' ) ) { 34 | echo "

" . __( 'For use widget, active "Fix permalinks dates" option in plugin settings.', 'wp-parsidate' ) . "

"; 35 | } 36 | ?> 37 |

38 | 40 | 41 | 45 |

46 | 47 |

48 | 50 | 51 | 60 |

61 | #$widget_id{background:#141414;border-radius:8px 8px 4px 4px;" . 119 | "overflow:hidden;box-shadow:0 0 5px 0 #000;text-align:center;padding-top:15px;color:#dcdcdc}" . 120 | "#$widget_id table{direction:rtl;border-radius:12px;overflow:hidden;" . 121 | "background:#1d1d1d;box-shadow:inset 0 0 0 6px #141414}#$widget_id table th," . 122 | "#$widget_id table td{border:0}#$widget_id table th:last-child," . 123 | "#$widget_id table tr td:last-child{color:#f28a8a}"; 124 | } else { 125 | echo ""; 131 | } 132 | } 133 | } -------------------------------------------------------------------------------- /languages/common-strings.php: -------------------------------------------------------------------------------- 1 |