Version Description
Download this release
Release Info
Developer | sswells |
Plugin | Business Directory Plugin |
Version | 5.14.3 |
Comparing to | |
See all releases |
Code changes from version 5.14.2 to 5.14.3
- README.TXT +14 -34
- assets/css/admin.min.css +1 -1
- assets/css/wpbdp.min.css +1 -1
- business-directory-plugin.php +1 -1
- includes/abstracts/class-form-field-type.php +8 -2
- includes/admin/admin-pages.php +2 -2
- includes/admin/class-admin-csv.php +2 -52
- includes/admin/class-admin.php +38 -12
- includes/admin/class-csv-exporter.php +2 -453
- includes/admin/class-csv-import.php +2 -912
- includes/admin/class-data-formatter.php +2 -30
- includes/admin/class-personal-data-eraser.php +1 -0
- includes/admin/class-personal-data-privacy.php +1 -1
- includes/admin/controllers/class-admin-csv.php +56 -0
- includes/admin/controllers/class-admin-fees.php +187 -0
- includes/admin/controllers/class-admin-payments.php +157 -0
- includes/admin/controllers/class-settings-admin.php +803 -0
- includes/admin/csv-export.php +2 -1
- includes/admin/csv-import.php +1 -1
- includes/admin/fees.php +2 -186
- includes/admin/helpers/class-data-formatter.php +31 -0
- includes/admin/helpers/class-variable-pricing-configurator.php +1 -1
- includes/admin/helpers/csv/class-csv-exporter.php +454 -0
- includes/admin/helpers/csv/class-csv-import.php +913 -0
- includes/admin/helpers/tables/class-payments-table.php +1 -1
- includes/admin/payments.php +2 -134
- includes/admin/settings/class-settings-admin.php +2 -802
- includes/admin/settings/class-settings.php +4 -2
- includes/admin/tracking.php +1 -0
- includes/admin/upgrades/class-themes-updater.php +2 -1
- includes/admin/upgrades/migrations/migration-18_0.php +1 -1
- includes/admin/upgrades/migrations/migration-2_1.php +1 -1
- includes/admin/upgrades/migrations/migration-3_2.php +3 -2
- includes/admin/upgrades/migrations/migration-5_0.php +2 -0
- includes/admin/views/review.php +100 -0
- includes/class-abandoned-payment-notification.php +46 -43
- includes/class-assets.php +28 -4
- includes/class-fee-plan.php +2 -374
- includes/class-fees-api.php +1 -1
- includes/class-listing-subscription.php +2 -179
- includes/class-listing.php +2 -1126
- includes/class-meta.php +4 -3
- includes/class-module.php +2 -65
- includes/class-modules.php +1 -1
- includes/class-payment.php +2 -389
- includes/class-recaptcha.php +2 -2
- includes/class-rewrite.php +6 -6
- includes/class-shortcodes.php +3 -2
- includes/class-wordpress-template-integration.php +5 -6
- includes/class-wpbdp.php +16 -35
- includes/compatibility/class-navxt-integration.php +9 -5
- includes/compatibility/deprecated.php +14 -10
- includes/compatibility/deprecated/class-db-model2.php +2 -1
- includes/controllers/pages/class-renew-listing.php +1 -0
- includes/controllers/pages/class-submit-listing.php +25 -23
- includes/db/class-db-query-set.php +3 -2
- includes/debugging.php +3 -3
- includes/fields/class-fieldtypes-date.php +1 -1
- includes/fields/class-fieldtypes-image.php +1 -1
- includes/fields/class-fieldtypes-textarea.php +3 -2
- includes/fields/class-form-field.php +3 -2
- includes/form-fields.php +1 -1
- includes/functions.php +2 -1322
- includes/helpers/class-app.php +47 -0
- includes/helpers/class-authenticated-listing-view.php +38 -12
- includes/helpers/class-listing-display-helper.php +11 -2
- includes/helpers/class-seo.php +50 -0
- includes/helpers/class-wp-taxonomy-term-list.php +2 -2
- includes/helpers/functions/general.php +1384 -0
- includes/helpers/functions/listings.php +253 -0
- includes/helpers/functions/logging.php +88 -0
- includes/helpers/functions/templates-ui.php +780 -0
- includes/helpers/listing_flagging.php +4 -4
- includes/installer.php +12 -5
- includes/listings.php +2 -252
- includes/logging.php +2 -87
- includes/models/class-fee-plan.php +375 -0
- includes/models/class-listing-subscription.php +180 -0
- includes/models/class-listing.php +1132 -0
- includes/models/class-module.php +67 -0
- includes/models/class-payment.php +391 -0
- includes/models/class-reviews.php +226 -0
- includes/payment.php +2 -1
- includes/seo.php +2 -49
- includes/templates-ui.php +2 -779
- includes/themes.php +1 -0
- includes/utils.php +54 -30
- includes/widgets/widget-featured-listings.php +1 -0
- includes/widgets/widget-latest-listings.php +1 -0
- includes/widgets/widget-random-listings.php +1 -0
- includes/widgets/widget-search.php +5 -4
- languages/business-directory-plugin-ar.mo +0 -0
- languages/business-directory-plugin-ar.po +3294 -3251
- languages/business-directory-plugin-de_DE.mo +0 -0
- languages/business-directory-plugin-de_DE.po +623 -606
README.TXT
CHANGED
@@ -4,7 +4,7 @@ Tags: business directory, listings, directory plugin, staff directory, member di
|
|
4 |
Requires at least: 4.8
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8.1
|
7 |
-
Stable tag: 5.14.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The best WordPress Business Directory Plugin. Build an easy team directory, member directory, staff directory, church directory, and more.
|
@@ -77,7 +77,7 @@ For a detailed list of features, please visit: [BusinessDirectoryPlugin.com](htt
|
|
77 |
|
78 |
* [Stripe Gateway](https://businessdirectoryplugin.com/downloads/stripe-payment-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) - Accept paid listings with Stripe payments.
|
79 |
* [PayPal Gateway](https://businessdirectoryplugin.com/downloads/paypal-gateway-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) - Accept payments using PayPal.
|
80 |
-
*
|
81 |
* [Authorize.net Gateway](https://businessdirectoryplugin.com/knowledge-base/authorize-net-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion).
|
82 |
|
83 |
== Premium Directory Themes ==
|
@@ -91,16 +91,14 @@ Transform your WP directory site the easy way with a few clicks. Our business di
|
|
91 |
* [Mobile Compact Theme](https://businessdirectoryplugin.com/downloads/mobile-compact-theme/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
92 |
* [Restaurant Directory Theme](https://businessdirectoryplugin.com/downloads/restaurant-theme/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
93 |
|
94 |
-
For more information please visit [businessdirectoryplugin.com](https://businessdirectoryplugin.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
95 |
-
|
96 |
== Docs ==
|
97 |
|
98 |
-
Please see our [Documentation](https://businessdirectoryplugin.com/knowledge-base/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
99 |
|
100 |
== Installation ==
|
101 |
-
Please see our detailed [Installation Guide](https://businessdirectoryplugin.com/knowledge-base/installation-guide/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
102 |
|
103 |
-
[Full documentation](https://businessdirectoryplugin.com/knowledge-base/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
104 |
|
105 |
== Screenshots ==
|
106 |
|
@@ -108,8 +106,6 @@ Please see our detailed [Installation Guide](https://businessdirectoryplugin.com
|
|
108 |
|
109 |
== Frequently Asked Questions ==
|
110 |
|
111 |
-
For the definitive FAQ section, please visit the [FAQ Section](https://businessdirectoryplugin.com/article-categories/faqs/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion), or our [Getting Started](https://businessdirectoryplugin.com/article-categories/getting-started/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) guide.
|
112 |
-
|
113 |
= What types of directories can I build? =
|
114 |
Our directory website builder software combined with our add-on modules is the most powerful directory plugin on the market. The options are limitless. Here are a few types of directories you can create:
|
115 |
|
@@ -132,7 +128,7 @@ Our directory website builder software combined with our add-on modules is the m
|
|
132 |
* Book review sites
|
133 |
|
134 |
= Can I accept paid and free listings? =
|
135 |
-
Yes it can. You can do this by creating fee plans for 0.00 and some other paid amount at the same time.
|
136 |
|
137 |
= Do you have video tutorials for building WordPress directories? =
|
138 |
Yes we do. They can be found [here](https://businessdirectoryplugin.com/video-tutorials/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion).
|
@@ -162,6 +158,14 @@ Yes it is. However, you cannot "network activate" the plugin (as this will share
|
|
162 |
This can be done under Plugins -> Add New as the Administrator user. Do not "network activate" as the "super admin".
|
163 |
|
164 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
= 5.14.2 =
|
166 |
* Fix: Adding images to a listing from the back-end was causing js errors.
|
167 |
|
@@ -191,28 +195,4 @@ This can be done under Plugins -> Add New as the Administrator user. Do not "net
|
|
191 |
* Fix: Don't show a back button when on the first page of the form.
|
192 |
* Reorganize a few files, including javascript.
|
193 |
|
194 |
-
= 5.13.3 =
|
195 |
-
* Fix: An warning message was showing in the admin area when it shouldn't.
|
196 |
-
* Update for code styling and more escaping.
|
197 |
-
|
198 |
-
= 5.13.2 =
|
199 |
-
* New: Added support for using id=# in several shortcodes. ie [businessdirectory-socials id=251], [businessdirectory-buttons id=251], [businessdirectory-details id=251], [businessdirectory-images id=251]
|
200 |
-
* Fix: Check template override locations more consistently
|
201 |
-
* Fix: Payment gateway errors when checking out with 100% off code
|
202 |
-
* Fix: PHP error when viewing a category page with children
|
203 |
-
* Fix: Non-BD plugin were getting deactivated when activating a module from the Modules page
|
204 |
-
* Removed: The Ajax compatibility mode has been removed
|
205 |
-
* Removed: The 'title' option in businessdirectory-listings shortcode wasn't being processed
|
206 |
-
|
207 |
-
= 5.13.1 =
|
208 |
-
* New: Allow the part/templates to be overridden
|
209 |
-
* New: Include the author column on the admin listings page
|
210 |
-
* New: Show the count in the search results
|
211 |
-
* Fix: Get rid of a couple PHP warnings
|
212 |
-
|
213 |
-
= 5.13 =
|
214 |
-
* New: Add settings to change the words "Directory", "Listings", and "Listing" under Listings -> General Settings.
|
215 |
-
* New: Add wpbdp_custom_strings hook to replace additional strings.
|
216 |
-
* Security: Sanitize and escape more settings (fees, fields, general settings)
|
217 |
-
|
218 |
<a href="https://businessdirectoryplugin.com/plugins/business-directory/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">See changelog for all versions</a>
|
4 |
Requires at least: 4.8
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8.1
|
7 |
+
Stable tag: 5.14.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The best WordPress Business Directory Plugin. Build an easy team directory, member directory, staff directory, church directory, and more.
|
77 |
|
78 |
* [Stripe Gateway](https://businessdirectoryplugin.com/downloads/stripe-payment-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) - Accept paid listings with Stripe payments.
|
79 |
* [PayPal Gateway](https://businessdirectoryplugin.com/downloads/paypal-gateway-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) - Accept payments using PayPal.
|
80 |
+
* PayFast Gateway - Accept payments using PayFast.
|
81 |
* [Authorize.net Gateway](https://businessdirectoryplugin.com/knowledge-base/authorize-net-module/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion).
|
82 |
|
83 |
== Premium Directory Themes ==
|
91 |
* [Mobile Compact Theme](https://businessdirectoryplugin.com/downloads/mobile-compact-theme/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
92 |
* [Restaurant Directory Theme](https://businessdirectoryplugin.com/downloads/restaurant-theme/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion)
|
93 |
|
|
|
|
|
94 |
== Docs ==
|
95 |
|
96 |
+
Please see our [Documentation](https://businessdirectoryplugin.com/knowledge-base/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) and the [Quick Start](https://businessdirectoryplugin.com/article-categories/getting-started/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) guide.
|
97 |
|
98 |
== Installation ==
|
99 |
+
Please see our detailed [Installation Guide](https://businessdirectoryplugin.com/knowledge-base/installation-guide/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) for instructions on how to get going quickly with our business directory software.
|
100 |
|
101 |
+
[Full documentation](https://businessdirectoryplugin.com/knowledge-base/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) is also available.
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
106 |
|
107 |
== Frequently Asked Questions ==
|
108 |
|
|
|
|
|
109 |
= What types of directories can I build? =
|
110 |
Our directory website builder software combined with our add-on modules is the most powerful directory plugin on the market. The options are limitless. Here are a few types of directories you can create:
|
111 |
|
128 |
* Book review sites
|
129 |
|
130 |
= Can I accept paid and free listings? =
|
131 |
+
Yes it can. You can do this by creating fee plans for 0.00 and some other paid amount at the same time.
|
132 |
|
133 |
= Do you have video tutorials for building WordPress directories? =
|
134 |
Yes we do. They can be found [here](https://businessdirectoryplugin.com/video-tutorials/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion).
|
158 |
This can be done under Plugins -> Add New as the Administrator user. Do not "network activate" as the "super admin".
|
159 |
|
160 |
== Changelog ==
|
161 |
+
= 5.14.3 =
|
162 |
+
* Allow the directory shortcodes in private pages and drafts.
|
163 |
+
* Improve the performance a bit when showing listing images.
|
164 |
+
* Remove the review request in the sidebar and replace it with asking a few different times.
|
165 |
+
* Fix: Fix the button alignment in the search form in the Twenty TwentyOne theme.
|
166 |
+
* Fix: The buttons to select a plan were missing when renewing.
|
167 |
+
* Fix: PHP errors were showing in some cases when payments were deleted.
|
168 |
+
|
169 |
= 5.14.2 =
|
170 |
* Fix: Adding images to a listing from the back-end was causing js errors.
|
171 |
|
195 |
* Fix: Don't show a back button when on the first page of the form.
|
196 |
* Reorganize a few files, including javascript.
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
<a href="https://businessdirectoryplugin.com/plugins/business-directory/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">See changelog for all versions</a>
|
assets/css/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpdbp-wrap{--darkest-grey:#282f36;--dark-grey:rgba(40,47,54,0.85);--medium-grey:rgba(40,47,54,0.65);--grey:rgba(40,47,54,0.45);--grey-border:rgba(40,47,54,0.2);--lightest-grey:#fafafa;--green:#3fac25;--orange:#F15A24}.wpbdp-tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.wpbdp-display-block{display:block}.wpbdp-smaller{font-size:90%}.wpbdp-no-bold{font-weight:normal}.wpbdpfont{text-decoration:none;text-shadow:none;font-weight:normal;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;line-height:1;-moz-transition:color .1s ease-in-out,opacity .1s ease-in-out;-webkit-transition:color .1s ease-in-out,opacity .1s ease-in-out;transition:color .1s ease-in-out,opacity .1s ease-in-out;font-size:18px}i.wpbdpfont{font-style:normal;font-variant:normal;speak:none}.wpbdpfont:before,select.wpbdpfont{text-align:center}.wpbdpfont,a.wpbdpfont,.wpbdpfont:hover{text-decoration:none !important;box-shadow:none}.wpbdpfont:focus{box-shadow:none;-webkit-box-shadow:none}.wpbdpfont:active{outline:none}.wpbdpsvg{fill:currentColor;width:18px;height:18px;vertical-align:text-bottom}#wpbdp-admin-smtp *,#wpbdp-admin-smtp *::before,#wpbdp-admin-smtp *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbdp-admin-smtp{width:700px;margin:0 auto}#wpbdp-admin-smtp p{font-size:15px}#wpbdp-admin-smtp section{margin:50px 0;text-align:left;clear:both}#wpbdp-admin-smtp .top{text-align:center}#wpbdp-admin-smtp .top h1{font-size:26px;font-weight:600;margin-bottom:0;padding:0}#wpbdp-admin-smtp .top p{font-size:17px;color:#777;margin-top:.5em}#wpbdp-admin-smtp .top .error,#wpbdp-admin-smtp .top .notice{display:none}#wpbdp-admin-smtp .screenshot ul{display:inline-block;margin:0 0 0 30px;list-style-type:none;max-width:calc(100% - 350px)}#wpbdp-admin-smtp .screenshot li{margin:16px 0;padding:0;font-size:15px;color:#777}#wpbdp-admin-smtp .screenshot .cont img{max-width:100%;display:block}#wpbdp-admin-smtp .screenshot .cont{display:inline-block;position:relative;width:315px;padding:5px;background-color:#fff;border-radius:3px}#wpbdp-admin-smtp .step,#wpbdp-admin-smtp .screenshot .cont{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);box-shadow:0 2px 5px 0 rgba(0,0,0,0.05)}#wpbdp-admin-smtp .step{background-color:#F9F9F9;border:1px solid #E5E5E5;margin:0 0 25px}#wpbdp-admin-smtp .step p{font-size:16px;color:#777777}#wpbdp-admin-smtp .step .num{display:inline-block;position:relative;width:100px;height:50px;text-align:center}#wpbdp-admin-smtp .step div{display:inline-block;width:calc( 100% - 104px );background-color:#fff;padding:30px;border-left:1px solid #eee}#wpbdp-admin-smtp .step h2{font-size:24px;line-height:22px;margin-top:0;margin-bottom:15px}#wpbdp-admin-smtp .screenshot>*,#wpbdp-admin-smtp .step>*{vertical-align:middle}#wpbdp-admin-smtp .grey{opacity:.5;background:#F6F6F6 !important;border-color:#ddd !important;color:#9FA5AA !important}#wpbdp-admin-smtp .button.disabled{cursor:default}.wpbdp-smtp-logos{margin-bottom:38px}.wpbdp-smtp-logos img,.wpbdp-smtp-logos svg{vertical-align:middle}.wpbdp-addons{margin-top:30px;display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:30px 2%}.wpbdp-addons,.wpbdp-addons h2,.wpbdp-addons h3{color:var(--dark-grey)}.wpbdp-addons h2{font-size:17px}.wpbdp-addons h3{margin-top:0}.wpbdp-card{width:100%;border-radius:10px;border:1px solid var(--grey-border);opacity:1;transition:opacity 1s;background:#fff}.wpbdp-addons .wpbdp-card.wpbdp-addon-not-installed{position:relative}.wpbdp-addons .plugin-card-top{height:140px;padding-top:30px;overflow:hidden}.wpbdp-addons .plugin-card-top h2{margin-top:0;font-weight:400}.wpbdp-template-row p,.wpbdp-addons .plugin-card-top p{opacity:.8}.wpbdp-addons .plugin-card-bottom{padding:5px 20px 20px;text-align:center;background:transparent;border-top:none}.wpbdp-addons .plugin-card-bottom,.wpbdp-addons .plugin-card-bottom .button{font-size:15px}.wpbdp-addons .button{float:right}.wpbdp-addons .addon-status{float:left;padding-top:4px}.wpbdp-addon-active .button{visibility:hidden}.addon-status-label{opacity:.7}.wpbdp-addon-active .addon-status-label{color:var(--green);opacity:1}.wpbdp-addon-error{position:absolute;top:55px;left:10px;right:10px;font-weight:bold;text-align:center}.wpbdp-ribbon{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);border:25px solid transparent;border-bottom:25px solid var(--orange);position:absolute;top:-31px;right:-74px;padding:0 10px;width:30px;color:white;font-family:sans-serif;size:11px}.wpbdp-ribbon span{position:absolute;left:25px;font-size:15px;top:4px}@media only screen and (max-width:1200px){.wpbdp-addons{grid-template-columns:1fr 1fr}}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.button-primary.next-to-secondary{margin-left:30px}.wpbdp-error.error{border-left-color:#6D87B9;display:flex;align-items:center}.wpbdp-error.error p:first-of-type{flex:1}.wpbdp-pro-tip,.wpbdp-upgrade-bar{background-color:rgba(227,230,243,0.64)}.wpbdp-pro-tip a,.wpbdp-upgrade-bar a{color:#6D87B9;font-weight:600;text-decoration:none}.wpbdp-pro-tip{display:flex;align-items:center;border-radius:6px;padding:11px 22px}.wpbdp-pro-tip svg{color:#6D87B9;margin-right:13px}.wpbdp-pro-tip a{margin-left:5px}.wpbdp-upgrade-bar{background-color:rgba(227,230,243,0.4);text-align:center;margin-left:-20px;border-bottom:2px solid #6D87B9;padding:8px 22px}.wpbdp-admin-content .wpbdp-upgrade-bar{display:none}.wpbdp-admin h1 img{vertical-align:middle}.wpbdp-admin-content.with-sidebar{margin-top:20px;clear:left;float:left;width:78%}.wpbdp-admin .sidebar{margin-top:20px;float:right;clear:right;width:20%}.wpbdp-admin .sidebar .postbox{min-width:0 !important}.wp-list-table tr.wpbdp-item-message-tr td{padding-top:0}.wp-list-table tr.wpbdp-item-message-tr td div{margin:0 15px;padding:6px 12px 8px 12px;background-color:#fef7f1;font-size:12px}.wpbdp-admin-page-fees .tablenav{display:none}#wpbdp-admin-admin-page-fees .column-attributes .wpbdp-tag{background:green;color:#fff}.wpbdp-admin-page-fees .wp-list-table .wpbdp-drag-handle{margin-right:15px;display:none}.wpbdp-admin-page-fees .purchase-gateways{text-align:center}.wpbdp-admin-page-fees .purchase-gateways .gateway{float:left;width:45%;margin:30px 2% 20px 0}.wpbdp-admin-page-fees .purchase-gateways .gateway.installed{opacity:.5}.wpbdp-admin-page-fees .purchase-gateways .gateway a img.gateway-logo{height:40px;margin:0;padding:0;border:none}.wpbdp-admin-page-fees .purchase-gateways .gateway a.price{margin-top:10px;display:block;color:green;font-size:22px;font-weight:bold}.wpbdp-admin-page-fees .purchase-gateways .gateway .check-mark{font-size:150%;font-weight:bold;color:green}#wpbdp-fee-form #limit-categories-list{font-size:90%}#wpbdp-fee-form #limit-categories-list p{margin:10px 0}#wpbdp-fee-form #limit-categories-list select{width:100%}#wpbdp-fee-form #limit-categories-list .select2-selection{padding:0 0 2px 0;margin:0;border-radius:5px;border-color:#ddd;min-height:26px}#wpbdp-fee-form #limit-categories-list .select2-selection__choice{border:none;padding:0;margin:2px 4px 0 0;background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-completed{background:green}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-canceled,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-failed{background:red}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-admin-posted,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-on-hold,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-refunded{background:orange}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-reported{background:#d64226;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice .select2-selection__choice__remove{color:#fff}#wpbdp-fee-form #limit-categories-list .select2-search{margin-bottom:0}#wpbdp-fee-form #limit-categories-list .wpbdp-category-item{width:33.33%;float:left;padding:2px 0}#wpbdp-fee-form .pricing-details-variable>td{padding-top:0}#wpbdp-fee-form .pricing-details-variable table th{font-weight:normal}#wpbdp-fee-form .pricing-details-variable table td:last-child{width:100%}#wpbdp-fee-form .pricing-details-variable table td{font-size:90%;padding:0}#wpbdp-fee-form .pricing-details-variable table td.category-name-col{padding-right:20px;text-align:right}#wpbdp-fee-form .pricing-details-variable .wpbdp-variable-pricing-configurator-row input{width:100px}#wpbdp-fee-form .pricing-options label{display:block}#wpbdp-fee-form .fee-pricing-details input[type="text"]{width:100px}#wpbdp-admin-page-settings .nav-tab.tab-error{border-top:solid 1px red}#wpbdp-admin-page-settings .nav-tab.tab-warning{border-top:solid 1px yellow}#wpbdp-admin-page-settings .form-table tr>th{min-width:250px}#wpbdp-admin-page-settings .form-table tr>th>h3{font-size:1.2em;margin:0 auto}#wpbdp-admin-page-settings .wpbdp-setting-description{color:#666;font-style:italic;display:block}#wpbdp-admin-page-settings .wpbdp-setting-tooltip{height:18px;width:18px;font-size:18px;line-height:18px;vertical-align:middle;margin-right:5px;color:#666;cursor:help}#wpbdp-admin-page-settings input[type="text"],#wpbdp-admin-page-settings input[type="url"],#wpbdp-admin-page-settings textarea{width:85%}#wpbdp-admin-page-settings textarea{min-height:150px}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activate-btn,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-deactivate-btn{margin-left:10px;display:none}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activate-btn{display:inline-block}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .howto,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .wpbdp-license-key-activate-btn{display:none}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .wpbdp-license-key-deactivate-btn{display:inline-block}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-not-verified input[type=text]{border-color:#d64226}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-input{width:70%}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg{font-size:90%;border-radius:4px;padding:8px;margin:3px 0;box-sizing:border-box}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg.status-success{border-color:#27a533}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg.status-error{border-color:#d64226}#wpbdp-admin-page-settings tr.wpbdp-setting-disabled{display:none}#wpbdp-admin-page-settings .wpbdp_upgrade_to_pro{text-align:center;margin-top:80px}.form-table .wpbdp-collapse-row-last td,.form-table .wpbdp-collapse-row-last th,.form-table .wpbdp-collapse-row th,.form-table .wpbdp-collapse-row td{padding-bottom:0;padding-top:0}.form-table .wpbdp-collapse-row-first td,.form-table .wpbdp-collapse-row-first th{padding-bottom:0}.wpbdp-tooltip-msg{background:#333 !important;border-width:1px !important;border-radius:3px !important;box-shadow:1px 1px 2px 1px rgba(214,214,214,0.5) !important;color:#dedede !important;max-width:300px !important;padding:7px !important;text-rendering:optimizeLegibility;text-shadow:none !important;z-index:9999 !important}#wpbdp-admin-page-settings select{display:block}#wpbdp-admin-page-settings .wpbdp-settings-choice-radio{margin:0 0 5px 0}#wpbdp-admin-page-settings tr.disabled{opacity:.7}#wpbdp-admin-page-settings .text-fields-warning{font-size:90%;display:block;margin-bottom:2px}#wpbdp-admin-page-settings .wpbdp-expiration-notice-email-schedule-summary{background:#d2d2d2;font-size:85%;padding:5px}#wpbdp-admin-page-settings .wpbdp-settings-email{margin:10px 0 0 0;border:solid 1px #d2d2d2;padding:5px;background:#fff}#wpbdp-admin-page-settings .wpbdp-settings-email.wpbdp-expiration-notice-email{border-bottom:none}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview{color:#999;font-size:90%;height:45px;cursor:pointer;overflow:hidden}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview h4,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview h4{margin:0 0 10px 0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview a.wpbdp-settings-email-edit-btn,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview a.wpbdp-settings-email-edit-btn,#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview .edit-toggle,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview .edit-toggle{float:right;color:#fff}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl{margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl dt,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl dt{font-weight:bold;margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl dd,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl dd{margin:0;padding:0 0 0 10px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor{display:none;margin-left:10px;font-size:90%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor table.form-table,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor table.form-table{margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .editor table.form-table th,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor table.form-table th{padding-left:4px;padding-right:0;min-width:0;width:20%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor input[type="text"],#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor input[type="text"]{width:100%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor textarea,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor textarea{width:100%;min-height:150px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholders,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholders{margin:10px 0 0 0}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder{font-size:90%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder .placeholder-code,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder .placeholder-code{font-family:monospace;font-weight:bold}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder .placeholder-description,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder .placeholder-description{font-style:italic}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder-separator,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder-separator{margin-top:10px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons{margin:30px 0 0 0;text-align:right}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons .preview-email,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons .preview-email{float:left}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons .cancel,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons .cancel{margin-right:10px}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices #wpbdp-settings-expiration-notices-add-btn{margin:0 0 5px 0}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices #wpbdp-settings-expiration-notices-add .wpbdp-expiration-notice-email{display:none;border-bottom:1px solid #d2d2d2}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices .buttons .delete{color:#a00;float:left;font-size:13px}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices .buttons .delete:hover{color:red}#wpbdp-admin-page-settings .wpbdp-settings-type-checkbox input[type="checkbox"]{vertical-align:bottom}#wpbdp-admin-page-settings .wpbdp-settings-radio-options,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options{grid-gap:0}#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option,#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option{margin:0 0 5px 0}#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option input[type="checkbox"]{vertical-align:bottom}#wpbdp-admin-page-settings .wpbdp-settings-radio-options+.wpbdp-setting-description,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options+.wpbdp-setting-description{margin:10px 0 0 0}.wpbdp-settings-radio-option .wpbdp-img-opt{display:block;margin:0 auto 10px}#wpbdp-settings-list-layout .wpbdp-settings-radio-option{float:left;text-align:center;margin-right:1% !important;width:32%;min-width:173px}#wpbdp-settings-list-layout input{display:none}#wpbdp-settings-list-layout label span{border:2px solid transparent;display:inline-block;padding-bottom:10px;border-radius:3px}#wpbdp-settings-list-layout input:checked+label span{border-color:#4199FD}td.column-payment_status .status,td.column-sticky_status .status{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:90%}td.column-payment_status .status.ok{background:green}td.column-payment_status .paymentdata{font-size:85%}td.column-payment_status .paymentdata b{font-weight:normal}td.column-payment_status .paymentdata span{font-style:italic}td.column-sticky_status .status.notpaid{background:orange}td.column-sticky_status .status.pending{background:red;font-weight:bold}td.column-sticky_status .status.sticky{background:green}table.wp-list-table td .tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:90%;margin-right:2px;display:inline-block}table.wp-list-table.formfields th.column-label{width:40%}table.wp-list-table.formfields th.column-tags,table.wp-list-table.formfields td.column-tags{width:200px}table.wp-list-table.formfields th.column-order,table.wp-list-table.formfields td.column-order{width:55px}table.wp-list-table.formfields td.column-order .wpbdp-drag-handle{visibility:hidden}table.wp-list-table.formfields tr:hover .wpbdp-drag-handle{visibility:visible}table.wp-list-table.formfields .tag.private{background:red}table.wp-list-table.formfields .tag.privacy{background:blue}table.wp-list-table.formfields .tag.required{background:orange}table.wp-list-table.formfields .tag.in-excerpt{background:green}table.wp-list-table.formfields .tag.in-listing{background:green}table.wp-list-table.formfields tr.wpbdp-draggable-highlight{height:54px}table.wp-list-table.formfields tr.ui-sortable-helper{background:#fff;border:1px dashed #c1c1c1}#wpbdp-admin-page-field-form .iframe-confirm{display:none}#wpbdp-admin-page-field-form .iframe-confirm p{font-size:90%}#wpbdp-admin-page-field-form .wpbdp-setting-description{color:#666;font-style:italic;display:block}#wpbdp-settings-currency .wpbdp-setting-description{display:none}.wpbdp-settings-type-file .preview img{margin-right:10px}.wpbdp-settings-type-file .preview,.wpbdp-form-field-type-social-network .preview,.wpbdp-form-field-type-image .preview{float:none}.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel{display:block}table.wpbdp-debug-section{width:90%}table.wpbdp-debug-section tbody tr{background:#efefef}table.wpbdp-debug-section tbody tr td{padding:3px 8px}table.wpbdp-debug-section tbody tr:nth-child(2n){background:#f5f5f5}.wpbdp-page-admin-transactions .tag{font-size:95%}.wpbdp-page-admin-transactions .tag.approved{background:green}.wpbdp-page-admin-transactions .tag.pending{background:red}.wpbdp-page-admin-transactions .column-actions a.delete{color:#bc0b0b}.wpbdp-page-admin-transactions tr.more-details-row{background:#fff}.wpbdp-page-admin-transactions tr.more-details-row td{padding-left:40px;font-size:95%}.wpbdp-page-admin-transactions tr.more-details-row td dl dt{font-weight:bold}body.taxonomy-wpbdp_category .column-id{width:35px}.transaction-status-container{text-align:right;padding:5px}.wpbdp-progress-bar .progress-bar{margin-left:10px;display:inline-block;vertical-align:middle}.wpbdp-progress-bar .progress-bar-outer{min-width:200px;height:12px;border:solid 1px #3366CC;padding:0}.wpbdp-progress-bar .progress-bar-inner{height:100%;background:#99CCFF}.wpbdp-note{padding:5px 10px;background:#d7f5ff;margin:5px 0 20px 0;border:solid 1px #bad5df;border-radius:4px}.wpbdp-note p{margin:0}.wpbdp-note h1,.wpbdp-note h2,.wpbdp-note h3,.wpbdp-note h4{margin:0 0 8px 0}.wpbdp-note.error,.wpbdp-note.warning{background-color:#FFEBE8;border-color:#C00}.wpbdp-notice.dismissible{position:relative}.tag.paymentstatus{text-transform:capitalize}.tag.paymentstatus.ok{background:green}.tag.paymentstatus.completed{background:green}.tag.paymentstatus.pending,.tag.paymentstatus.pending-abandonment{background:red}.wpbdp-listing-metabox-tab dl{margin:0}.wpbdp-payment-details .tag{float:right}.wpbdp-payment-details .details,.wpbdp-payment-details .invoice,.wpbdp-payment-details .actions{clear:both;margin:20px 0}.wpbdp-payment-details .details dl dt{font-weight:bold}.wpbdp-payment-details table.wpbdp-payment-items-table{width:100%}.wpbdp-payment-details table.wpbdp-payment-items-table th{text-transform:uppercase}.wpbdp-payment-details table.wpbdp-payment-items-table td{border-top:1px solid #bbb;padding:6px 10px 6px 0}.wpbdp-payment-details .actions a.button-primary{color:#fff !important}.wp-core-ui .wpbdp-loading-button.button-primary,.wpbdp-loading-button{position:relative !important;opacity:.8;color:transparent !important;text-shadow:none !important}.wpbdp-loading-button:hover,.wpbdp-loading-button:active,.wpbdp-loading-button:focus{cursor:not-allowed;color:transparent !important;outline:none !important;box-shadow:none}.wpbdp-loading-button:before{content:'';display:inline-block;position:absolute;background:transparent;border:1px solid #fff;border-top-color:transparent;border-left-color:transparent;border-radius:50%;box-sizing:border-box;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;-o-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.listing-fee-change .fee-selection .fee{padding-bottom:5px;margin-bottom:10px;border-bottom:dotted 1px #d2d2d2;opacity:.85}.listing-fee-change .fee-selection .fee:hover{opacity:1}.listing-fee-change .fee-selection .fee .details{margin-left:10px}.listing-fee-change .fee-selection .fee .tag{float:right}.listing-fee-change .fee-selection .fee .choose-this{float:right}.wpbdp-draggable-highlight{background:#bbb}.wpbdp-module-compat-check .module-info{margin-bottom:3px}.wpbdp-module-compat-check .module-info .module-version,.wpbdp-module-compat-check .module-info .module-required{color:#666}.wpbdp-module-compat-check .module-info .module-version{margin-left:15px}.wpbdp-module-compat-check .module-info .module-version b{color:#333}.wpbdp-module-compat-check .module-info .module-required b{color:#900000}#wpbdp-admin-page-admin .welcome-message{padding:10px;font-size:105%}#wpbdp-admin-page-admin .welcome-message p{font-size:inherit}#wpbdp-admin-page-admin .welcome-message h4{font-size:120%}#wpbdp-admin-page-admin .welcome-message ul{list-style-position:inside;list-style-type:disc}#wpbdp-admin-page-admin .shortcuts{margin:auto}#wpbdp-admin-page-admin .shortcuts li{float:left;margin-right:10px}#wpbdp-admin-page-admin .shortcuts li.clear{margin:0}#wpbdp-admin-page-uninstall .wpbdp-admin-content{box-sizing:border-box;margin:20px 0 0 0;padding:16px;background:#fff;border-radius:4px}#wpbdp-admin-page-uninstall .wpbdp-validation-error{font-size:80%;color:#d64226;margin:0 0 10px 0}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion{float:left;box-sizing:border-box}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning ul,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion ul{margin-left:10px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning ul li,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion ul li{list-style-type:disc;list-style-position:inside}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning{width:60%;padding-right:20px;color:#d64226}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-margin{float:left}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-margin .dashicons{width:30px;height:30px;font-size:30px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-content{margin-left:50px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion{width:40%;padding-left:20px;border-left:1px solid #efefef}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form{display:none}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .reasons{margin-left:15px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .reasons .reason{margin-bottom:5px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .custom-reason{display:none}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form textarea{margin:10px 0 0 0;width:50%;min-height:100px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form textarea.invalid{border-color:#d64226}#wpbdp-admin-page-uninstall #wpbdp-uninstall-proceed-btn{margin-top:20px;color:#d64226}#wpbdp-licensing-issues-warning ul li{list-style-position:inside;list-style-type:disc}#wpbdp-licensing-issues-warning span.item-name{background:#fff9aa;padding:2px 5px;margin:0 0 0 4px;border-radius:4px}.wp-admin.widgets-php .widget-content span.help{color:#666}.wpbdp-admin-tab-nav{float:none;margin:0 0 .5em 0}.wpbdp-admin-tab-content{padding:5px 0 0 0;display:none}.wpbdp-admin-tab-content .wpbdp-form-field{margin:0}.wpbdp-admin-tab-content .wpbdp-form-field .wpbdp-form-field-inner{padding:0}.wpbdp-admin-box label{vertical-align:top}a.wpbdp-admin-delete-link{color:#a00;text-decoration:none}a.wpbdp-admin-delete-link:hover{color:red}#wpbdp-admin-payment-info-box .inside{margin:0;padding:0}#wpbdp-admin-payment-info-box .wpbdp-admin-box-row{border-bottom:1px solid #eee;clear:both;padding:6px 12px;margin:0;line-height:1.5}#wpbdp-admin-payment-info-box label{font-weight:bold}#wpbdp-admin-payment-items-box .payment-item,#wpbdp-admin-payment-items-box .payment-item-header{margin:0 12px;padding:6px 0}#wpbdp-admin-payment-items-box .payment-item .payment-item-type,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-type{display:block;width:20%;float:left}#wpbdp-admin-payment-items-box .payment-item .payment-item-description,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-description{display:block;width:60%;float:left}#wpbdp-admin-payment-items-box .payment-item .payment-item-amount,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-amount{display:block;width:20%;float:left}#wpbdp-admin-payment-items-box .payment-item.payment-totals,#wpbdp-admin-payment-items-box .payment-item-header.payment-totals{border-top:1px solid #eee;font-weight:bold}#wpbdp-admin-payment-items-box .payment-item-header{font-weight:bold}#wpbdp-admin-payment-details-box *{box-sizing:border-box}#wpbdp-admin-payment-details-box .wpbdp-admin-box-row>div{padding:6px 0}#wpbdp-admin-payment-details-box label{display:block}#wpbdp-admin-payment-details-box .customer-email,#wpbdp-admin-payment-details-box .customer-address-line1,#wpbdp-admin-payment-details-box .customer-address-line2{clear:both;width:100%}#wpbdp-admin-payment-details-box .customer-email input,#wpbdp-admin-payment-details-box .customer-address-line1 input,#wpbdp-admin-payment-details-box .customer-address-line2 input{width:100%}#wpbdp-admin-payment-details-box .customer-first-name,#wpbdp-admin-payment-details-box .customer-address-country,#wpbdp-admin-payment-details-box .customer-address-city{padding-right:3px !important}#wpbdp-admin-payment-details-box .customer-last-name,#wpbdp-admin-payment-details-box .customer-address-state,#wpbdp-admin-payment-details-box .customer-address-zipcode{padding-left:3px !important}#wpbdp-admin-payment-details-box .customer-first-name,#wpbdp-admin-payment-details-box .customer-last-name,#wpbdp-admin-payment-details-box .customer-address-country,#wpbdp-admin-payment-details-box .customer-address-state,#wpbdp-admin-payment-details-box .customer-address-city,#wpbdp-admin-payment-details-box .customer-address-zipcode{float:left;width:50%}#wpbdp-admin-payment-details-box .customer-first-name input,#wpbdp-admin-payment-details-box .customer-last-name input,#wpbdp-admin-payment-details-box .customer-address-country input,#wpbdp-admin-payment-details-box .customer-address-state input,#wpbdp-admin-payment-details-box .customer-address-city input,#wpbdp-admin-payment-details-box .customer-address-zipcode input{width:100%}#wpbdp-payment-notes .wpbdp-payment-note{margin-bottom:12px;line-height:1.5}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-payment-note-meta-user{font-weight:bold}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-payment-note-meta-date{color:#666}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-admin-delete-link{float:right;display:none}#wpbdp-payment-notes .wpbdp-payment-note:hover .wpbdp-admin-delete-link{display:block}span.tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}span.tag.wpbdp-listing-attr-payment-completed{background:green}span.tag.wpbdp-listing-attr-payment-canceled,span.tag.wpbdp-listing-attr-payment-failed{background:red}span.tag.wpbdp-listing-attr-admin-posted,span.tag.wpbdp-listing-attr-payment-on-hold,span.tag.wpbdp-listing-attr-payment-refunded{background:orange}span.tag.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}span.tag.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}span.tag.wpbdp-listing-attr-reported{background:#d64226;color:#fff}.wpbdp-tag.wpbdp-listing-attr-payment-completed,span.tag.wpbdp-listing-attr-payment-completed{background:green}.wpbdp-tag.wpbdp-listing-attr-payment-canceled,span.tag.wpbdp-listing-attr-payment-canceled,.wpbdp-tag.wpbdp-listing-attr-payment-failed,span.tag.wpbdp-listing-attr-payment-failed{background:red}.wpbdp-tag.wpbdp-listing-attr-admin-posted,span.tag.wpbdp-listing-attr-admin-posted,.wpbdp-tag.wpbdp-listing-attr-payment-on-hold,span.tag.wpbdp-listing-attr-payment-on-hold,.wpbdp-tag.wpbdp-listing-attr-payment-refunded,span.tag.wpbdp-listing-attr-payment-refunded{background:orange}.wpbdp-tag.wpbdp-listing-attr-post-status-pending,span.tag.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}.wpbdp-tag.wpbdp-listing-attr-no-fee-plan,span.tag.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}.wpbdp-tag.wpbdp-listing-attr-reported,span.tag.wpbdp-listing-attr-reported{background:#d64226;color:#fff}.wp-list-table td .wpbdp-tag{display:inline-block}body.post-type-wpbdp_listing .wp-list-table .wpbdp-tag{font-size:10px !important;text-transform:none !important}#wpbdp-listing-form-preview{padding:25px;border:1px solid #d2d2d2;background:#fff}.wpbdp-user-select .select2.select2-container{max-width:84.9%}.select2-container,.select2-search--inline,.select2-search__field{width:100% !important}
|
1 |
+
.wpdbp-wrap{--darkest-grey:#282f36;--dark-grey:rgba(40,47,54,0.85);--medium-grey:rgba(40,47,54,0.65);--grey:rgba(40,47,54,0.45);--grey-border:rgba(40,47,54,0.2);--lightest-grey:#fafafa;--green:#3fac25;--orange:#F15A24}.wpbdp-tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.wpbdp-display-block{display:block}.wpbdp-smaller{font-size:90%}.wpbdp-no-bold{font-weight:normal}.wpbdp-wait{margin:20px;width:20px;height:20px;position:relative;display:inline-block}.wpbdp-wait:before{content:'';display:inline-block;position:absolute;background:transparent;border:1px solid #fff;border-top-color:transparent;border-left-color:transparent;border-bottom-color:#607297;border-right-color:#607297;border-radius:50%;box-sizing:border-box;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;-o-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.wpbdp-wait.wpbdp_visible_spinner{margin-bottom:10px}.wpbdp-wait.wpbdp_visible_spinner .spinner{visibility:visible;float:none}.wpbdpfont{text-decoration:none;text-shadow:none;font-weight:normal;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;line-height:1;-moz-transition:color .1s ease-in-out,opacity .1s ease-in-out;-webkit-transition:color .1s ease-in-out,opacity .1s ease-in-out;transition:color .1s ease-in-out,opacity .1s ease-in-out;font-size:18px}i.wpbdpfont{font-style:normal;font-variant:normal;speak:none}.wpbdpfont:before,select.wpbdpfont{text-align:center}.wpbdpfont,a.wpbdpfont,.wpbdpfont:hover{text-decoration:none !important;box-shadow:none}.wpbdpfont:focus{box-shadow:none;-webkit-box-shadow:none}.wpbdpfont:active{outline:none}.wpbdpsvg{fill:currentColor;width:18px;height:18px;vertical-align:text-bottom}.wpbdp-admin-page .wpbdp-button-primary,.wpbdp-admin-page .wpbdp-button-secondary{text-shadow:none;box-shadow:none;border-radius:30px;border:1px solid #7e92bc !important;font-size:1em;transition:all .2s ease;height:28px;min-height:28px;outline:none;line-height:26px;min-width:100px;display:inline-block;text-align:center;padding:2px 10px;text-decoration:none}.wpbdp-admin-page .page-title-action,.wpbdp-admin-page .wpbdp-button-primary,.wpbdp-admin-page .button-primary{background-color:#7e92bc !important;border-color:#7e92bc !important;color:#fff !important}.wpbdp-admin-page .page-title-action:hover,.wpbdp-admin-page .wpbdp-button-primary:hover,.wpbdp-admin-page .button-primary:hover,.wpbdp-admin-page .page-title-action:focus,.wpbdp-admin-page .wpbdp-button-primary:focus,.wpbdp-admin-page .button-primary:focus{background:#607297 !important;border-color:#607297 !important}.wpbdp-admin-page .add-new-h2,.wpbdp-admin-page .wpbdp-button-secondary,.wpbdp-admin-page .button-secondary,.wpbdp-admin-page .button{background-color:#fff;border-color:#7e92bc !important;color:#607297}.wpbdp-admin-page .add-new-h2:hover,.wpbdp-admin-page .wpbdp-button-secondary:hover,.wpbdp-admin-page .button-secondary:hover,.wpbdp-admin-page .button:hover,.wpbdp-admin-page .add-new-h2:focus,.wpbdp-admin-page .wpbdp-button-secondary:focus,.wpbdp-admin-page .button-secondary:focus,.wpbdp-admin-page .button:focus{border-color:#607297 !important;background:#607297 !important;color:#fff;box-shadow:none}#wpbdp-admin-smtp *,#wpbdp-admin-smtp *::before,#wpbdp-admin-smtp *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbdp-admin-smtp{width:700px;margin:0 auto}#wpbdp-admin-smtp p{font-size:15px}#wpbdp-admin-smtp section{margin:50px 0;text-align:left;clear:both}#wpbdp-admin-smtp .top{text-align:center}#wpbdp-admin-smtp .top h1{font-size:26px;font-weight:600;margin-bottom:0;padding:0}#wpbdp-admin-smtp .top p{font-size:17px;color:#777;margin-top:.5em}#wpbdp-admin-smtp .top .error,#wpbdp-admin-smtp .top .notice{display:none}#wpbdp-admin-smtp .screenshot ul{display:inline-block;margin:0 0 0 30px;list-style-type:none;max-width:calc(100% - 350px)}#wpbdp-admin-smtp .screenshot li{margin:16px 0;padding:0;font-size:15px;color:#777}#wpbdp-admin-smtp .screenshot .cont img{max-width:100%;display:block}#wpbdp-admin-smtp .screenshot .cont{display:inline-block;position:relative;width:315px;padding:5px;background-color:#fff;border-radius:3px}#wpbdp-admin-smtp .step,#wpbdp-admin-smtp .screenshot .cont{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);box-shadow:0 2px 5px 0 rgba(0,0,0,0.05)}#wpbdp-admin-smtp .step{background-color:#F9F9F9;border:1px solid #E5E5E5;margin:0 0 25px}#wpbdp-admin-smtp .step p{font-size:16px;color:#777777}#wpbdp-admin-smtp .step .num{display:inline-block;position:relative;width:100px;height:50px;text-align:center}#wpbdp-admin-smtp .step div{display:inline-block;width:calc( 100% - 104px );background-color:#fff;padding:30px;border-left:1px solid #eee}#wpbdp-admin-smtp .step h2{font-size:24px;line-height:22px;margin-top:0;margin-bottom:15px}#wpbdp-admin-smtp .screenshot>*,#wpbdp-admin-smtp .step>*{vertical-align:middle}#wpbdp-admin-smtp .grey{opacity:.5;background:#F6F6F6 !important;border-color:#ddd !important;color:#9FA5AA !important}#wpbdp-admin-smtp .button.disabled{cursor:default}.wpbdp-smtp-logos{margin-bottom:38px}.wpbdp-smtp-logos img,.wpbdp-smtp-logos svg{vertical-align:middle}.wpbdp-addons{margin-top:30px;display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:30px 2%}.wpbdp-addons,.wpbdp-addons h2,.wpbdp-addons h3{color:var(--dark-grey)}.wpbdp-addons h2{font-size:17px}.wpbdp-addons h3{margin-top:0}.wpbdp-card{width:100%;border-radius:10px;border:1px solid var(--grey-border);opacity:1;transition:opacity 1s;background:#fff}.wpbdp-addons .wpbdp-card.wpbdp-addon-not-installed{position:relative}.wpbdp-addons .plugin-card-top{height:140px;padding-top:30px;overflow:hidden}.wpbdp-addons .plugin-card-top h2{margin-top:0;font-weight:400}.wpbdp-template-row p,.wpbdp-addons .plugin-card-top p{opacity:.8}.wpbdp-addons .plugin-card-bottom{padding:5px 20px 20px;text-align:center;background:transparent;border-top:none}.wpbdp-addons .plugin-card-bottom,.wpbdp-addons .plugin-card-bottom .button{font-size:15px}.wpbdp-addons .button{float:right}.wpbdp-addons .addon-status{float:left;padding-top:4px}.wpbdp-addon-active .button{visibility:hidden}.addon-status-label{opacity:.7}.wpbdp-addon-active .addon-status-label{color:var(--green);opacity:1}.wpbdp-addon-error{position:absolute;top:55px;left:10px;right:10px;font-weight:bold;text-align:center}.wpbdp-ribbon{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);border:25px solid transparent;border-bottom:25px solid var(--orange);position:absolute;top:-31px;right:-74px;padding:0 10px;width:30px;color:white;font-family:sans-serif;size:11px}.wpbdp-ribbon span{position:absolute;left:25px;font-size:15px;top:4px}@media only screen and (max-width:1200px){.wpbdp-addons{grid-template-columns:1fr 1fr}}.wpbdp-review-notice.notice{border:1px solid #ddd;text-align:center;position:fixed !important;z-index:999;bottom:0;right:0;width:400px;margin-bottom:0;padding-bottom:15px}.wpbdp-review-notice.notice form,.wpbdp-review-notice.notice p{font-size:14px;max-width:600px;margin-left:auto;margin-right:auto}.wpbdp-review-notice a{margin:5px}.wpbdp-review-notice p>span{font-size:13px;opacity:.75}.wpbdp-review-notice .wpbdp_error,.wpbdp-review-notice label{color:#444;text-align:left}.wpbdp-review-notice label{font-size:14px}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.button-primary.next-to-secondary{margin-left:30px}.wpbdp-error.error{border-left-color:#6D87B9;display:flex;align-items:center}.wpbdp-error.error p:first-of-type{flex:1}.wpbdp-pro-tip,.wpbdp-upgrade-bar{background-color:rgba(227,230,243,0.64)}.wpbdp-pro-tip a,.wpbdp-upgrade-bar a{color:#6D87B9;font-weight:600;text-decoration:none}.wpbdp-pro-tip{display:flex;align-items:center;border-radius:6px;padding:11px 22px}.wpbdp-pro-tip svg{color:#6D87B9;margin-right:13px}.wpbdp-pro-tip a{margin-left:5px}.wpbdp-upgrade-bar{background-color:rgba(227,230,243,0.4);text-align:center;margin-left:-20px;border-bottom:2px solid #6D87B9;padding:8px 22px}.wpbdp-admin-content .wpbdp-upgrade-bar{display:none}.wpbdp-admin h1 img{vertical-align:middle}.wpbdp-admin-content.with-sidebar{margin-top:20px;clear:left;float:left;width:78%}.wpbdp-admin .sidebar{margin-top:20px;float:right;clear:right;width:20%}.wpbdp-admin .sidebar .postbox{min-width:0 !important}.wp-list-table tr.wpbdp-item-message-tr td{padding-top:0}.wp-list-table tr.wpbdp-item-message-tr td div{margin:0 15px;padding:6px 12px 8px 12px;background-color:#fef7f1;font-size:12px}.wpbdp-admin-page-fees .tablenav{display:none}#wpbdp-admin-admin-page-fees .column-attributes .wpbdp-tag{background:green;color:#fff}.wpbdp-admin-page-fees .wp-list-table .wpbdp-drag-handle{margin-right:15px;display:none}.wpbdp-admin-page-fees .purchase-gateways{text-align:center}.wpbdp-admin-page-fees .purchase-gateways .gateway{float:left;width:45%;margin:30px 2% 20px 0}.wpbdp-admin-page-fees .purchase-gateways .gateway.installed{opacity:.5}.wpbdp-admin-page-fees .purchase-gateways .gateway a img.gateway-logo{height:40px;margin:0;padding:0;border:none}.wpbdp-admin-page-fees .purchase-gateways .gateway a.price{margin-top:10px;display:block;color:green;font-size:22px;font-weight:bold}.wpbdp-admin-page-fees .purchase-gateways .gateway .check-mark{font-size:150%;font-weight:bold;color:green}#wpbdp-fee-form #limit-categories-list{font-size:90%}#wpbdp-fee-form #limit-categories-list p{margin:10px 0}#wpbdp-fee-form #limit-categories-list select{width:100%}#wpbdp-fee-form #limit-categories-list .select2-selection{padding:0 0 2px 0;margin:0;border-radius:5px;border-color:#ddd;min-height:26px}#wpbdp-fee-form #limit-categories-list .select2-selection__choice{border:none;padding:0;margin:2px 4px 0 0;background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-completed{background:green}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-canceled,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-failed{background:red}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-admin-posted,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-on-hold,#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-payment-refunded{background:orange}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice.wpbdp-listing-attr-reported{background:#d64226;color:#fff}#wpbdp-fee-form #limit-categories-list .select2-selection__choice .select2-selection__choice__remove{color:#fff}#wpbdp-fee-form #limit-categories-list .select2-search{margin-bottom:0}#wpbdp-fee-form #limit-categories-list .wpbdp-category-item{width:33.33%;float:left;padding:2px 0}#wpbdp-fee-form .pricing-details-variable>td{padding-top:0}#wpbdp-fee-form .pricing-details-variable table th{font-weight:normal}#wpbdp-fee-form .pricing-details-variable table td:last-child{width:100%}#wpbdp-fee-form .pricing-details-variable table td{font-size:90%;padding:0}#wpbdp-fee-form .pricing-details-variable table td.category-name-col{padding-right:20px;text-align:right}#wpbdp-fee-form .pricing-details-variable .wpbdp-variable-pricing-configurator-row input{width:100px}#wpbdp-fee-form .pricing-options label{display:block}#wpbdp-fee-form .fee-pricing-details input[type="text"]{width:100px}#wpbdp-admin-page-settings .nav-tab.tab-error{border-top:solid 1px red}#wpbdp-admin-page-settings .nav-tab.tab-warning{border-top:solid 1px yellow}#wpbdp-admin-page-settings .form-table tr>th{min-width:250px}#wpbdp-admin-page-settings .form-table tr>th>h3{font-size:1.2em;margin:0 auto}#wpbdp-admin-page-settings .wpbdp-setting-description{color:#666;font-style:italic;display:block}#wpbdp-admin-page-settings .wpbdp-setting-tooltip{height:18px;width:18px;font-size:18px;line-height:18px;vertical-align:middle;margin-right:5px;color:#666;cursor:help}#wpbdp-admin-page-settings input[type="text"],#wpbdp-admin-page-settings input[type="url"],#wpbdp-admin-page-settings textarea{width:85%}#wpbdp-admin-page-settings textarea{min-height:150px}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activate-btn,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-deactivate-btn{margin-left:10px;display:none}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activate-btn{display:inline-block}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .howto,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .wpbdp-license-key-activate-btn{display:none}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-valid .wpbdp-license-key-deactivate-btn{display:inline-block}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui.wpbdp-license-status-not-verified input[type=text]{border-color:#d64226}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg,#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-input{width:70%}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg{font-size:90%;border-radius:4px;padding:8px;margin:3px 0;box-sizing:border-box}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg.status-success{border-color:#27a533}#wpbdp-admin-page-settings .wpbdp-license-key-activation-ui .wpbdp-license-key-activation-status-msg.status-error{border-color:#d64226}#wpbdp-admin-page-settings tr.wpbdp-setting-disabled{display:none}#wpbdp-admin-page-settings .wpbdp_upgrade_to_pro{text-align:center;margin-top:80px}.form-table .wpbdp-collapse-row-last td,.form-table .wpbdp-collapse-row-last th,.form-table .wpbdp-collapse-row th,.form-table .wpbdp-collapse-row td{padding-bottom:0;padding-top:0}.form-table .wpbdp-collapse-row-first td,.form-table .wpbdp-collapse-row-first th{padding-bottom:0}.wpbdp-tooltip-msg{background:#333 !important;border-width:1px !important;border-radius:3px !important;box-shadow:1px 1px 2px 1px rgba(214,214,214,0.5) !important;color:#dedede !important;max-width:300px !important;padding:7px !important;text-rendering:optimizeLegibility;text-shadow:none !important;z-index:9999 !important}#wpbdp-admin-page-settings select{display:block}#wpbdp-admin-page-settings .wpbdp-settings-choice-radio{margin:0 0 5px 0}#wpbdp-admin-page-settings tr.disabled{opacity:.7}#wpbdp-admin-page-settings .text-fields-warning{font-size:90%;display:block;margin-bottom:2px}#wpbdp-admin-page-settings .wpbdp-expiration-notice-email-schedule-summary{background:#d2d2d2;font-size:85%;padding:5px}#wpbdp-admin-page-settings .wpbdp-settings-email{margin:10px 0 0 0;border:solid 1px #d2d2d2;padding:5px;background:#fff}#wpbdp-admin-page-settings .wpbdp-settings-email.wpbdp-expiration-notice-email{border-bottom:none}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview{color:#999;font-size:90%;height:45px;cursor:pointer;overflow:hidden}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview h4,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview h4{margin:0 0 10px 0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview a.wpbdp-settings-email-edit-btn,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview a.wpbdp-settings-email-edit-btn,#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview .edit-toggle,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview .edit-toggle{float:right;color:#fff}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl{margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl dt,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl dt{font-weight:bold;margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .short-preview dl dd,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-preview dl dd{margin:0;padding:0 0 0 10px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor{display:none;margin-left:10px;font-size:90%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor table.form-table,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor table.form-table{margin:0;padding:0}#wpbdp-admin-page-settings .wpbdp-settings-email .editor table.form-table th,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor table.form-table th{padding-left:4px;padding-right:0;min-width:0;width:20%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor input[type="text"],#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor input[type="text"]{width:100%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor textarea,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor textarea{width:100%;min-height:150px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholders,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholders{margin:10px 0 0 0}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder{font-size:90%}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder .placeholder-code,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder .placeholder-code{font-family:monospace;font-weight:bold}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder .placeholder-description,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder .placeholder-description{font-style:italic}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .placeholder-separator,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .placeholder-separator{margin-top:10px}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons{margin:30px 0 0 0;text-align:right}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons .preview-email,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons .preview-email{float:left}#wpbdp-admin-page-settings .wpbdp-settings-email .editor .buttons .cancel,#wpbdp-admin-page-settings .wpbdp-settings-email .wpbdp-settings-email-editor .buttons .cancel{margin-right:10px}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices #wpbdp-settings-expiration-notices-add-btn{margin:0 0 5px 0}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices #wpbdp-settings-expiration-notices-add .wpbdp-expiration-notice-email{display:none;border-bottom:1px solid #d2d2d2}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices .buttons .delete{color:#a00;float:left;font-size:13px}#wpbdp-admin-page-settings .wpbdp-settings-expiration-notices .buttons .delete:hover{color:red}#wpbdp-admin-page-settings .wpbdp-settings-type-checkbox input[type="checkbox"]{vertical-align:bottom}#wpbdp-admin-page-settings .wpbdp-settings-radio-options,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options{grid-gap:0}#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option,#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option{margin:0 0 5px 0}#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option input[type="radio"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-radio-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-radio-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-radio-options .wpbdp-settings-multicheck-option input[type="checkbox"],#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options .wpbdp-settings-multicheck-option input[type="checkbox"]{vertical-align:bottom}#wpbdp-admin-page-settings .wpbdp-settings-radio-options+.wpbdp-setting-description,#wpbdp-admin-page-settings .wpbdp-settings-multicheck-options+.wpbdp-setting-description{margin:10px 0 0 0}.wpbdp-settings-radio-option .wpbdp-img-opt{display:block;margin:0 auto 10px}#wpbdp-settings-list-layout .wpbdp-settings-radio-option{float:left;text-align:center;margin-right:1% !important;width:32%;min-width:173px}#wpbdp-settings-list-layout input{display:none}#wpbdp-settings-list-layout label span{border:2px solid transparent;display:inline-block;padding-bottom:10px;border-radius:3px}#wpbdp-settings-list-layout input:checked+label span{border-color:#4199FD}td.column-payment_status .status,td.column-sticky_status .status{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:90%}td.column-payment_status .status.ok{background:green}td.column-payment_status .paymentdata{font-size:85%}td.column-payment_status .paymentdata b{font-weight:normal}td.column-payment_status .paymentdata span{font-style:italic}td.column-sticky_status .status.notpaid{background:orange}td.column-sticky_status .status.pending{background:red;font-weight:bold}td.column-sticky_status .status.sticky{background:green}table.wp-list-table td .tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:90%;margin-right:2px;display:inline-block}table.wp-list-table.formfields th.column-label{width:40%}table.wp-list-table.formfields th.column-tags,table.wp-list-table.formfields td.column-tags{width:200px}table.wp-list-table.formfields th.column-order,table.wp-list-table.formfields td.column-order{width:55px}table.wp-list-table.formfields td.column-order .wpbdp-drag-handle{visibility:hidden}table.wp-list-table.formfields tr:hover .wpbdp-drag-handle{visibility:visible}table.wp-list-table.formfields .tag.private{background:red}table.wp-list-table.formfields .tag.privacy{background:blue}table.wp-list-table.formfields .tag.required{background:orange}table.wp-list-table.formfields .tag.in-excerpt{background:green}table.wp-list-table.formfields .tag.in-listing{background:green}table.wp-list-table.formfields tr.wpbdp-draggable-highlight{height:54px}table.wp-list-table.formfields tr.ui-sortable-helper{background:#fff;border:1px dashed #c1c1c1}#wpbdp-admin-page-field-form .iframe-confirm{display:none}#wpbdp-admin-page-field-form .iframe-confirm p{font-size:90%}#wpbdp-admin-page-field-form .wpbdp-setting-description{color:#666;font-style:italic;display:block}#wpbdp-settings-currency .wpbdp-setting-description{display:none}.wpbdp-settings-type-file .preview img{margin-right:10px}.wpbdp-settings-type-file .preview,.wpbdp-form-field-type-social-network .preview,.wpbdp-form-field-type-image .preview{float:none}.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel{display:block}table.wpbdp-debug-section{width:90%}table.wpbdp-debug-section tbody tr{background:#efefef}table.wpbdp-debug-section tbody tr td{padding:3px 8px}table.wpbdp-debug-section tbody tr:nth-child(2n){background:#f5f5f5}.wpbdp-page-admin-transactions .tag{font-size:95%}.wpbdp-page-admin-transactions .tag.approved{background:green}.wpbdp-page-admin-transactions .tag.pending{background:red}.wpbdp-page-admin-transactions .column-actions a.delete{color:#bc0b0b}.wpbdp-page-admin-transactions tr.more-details-row{background:#fff}.wpbdp-page-admin-transactions tr.more-details-row td{padding-left:40px;font-size:95%}.wpbdp-page-admin-transactions tr.more-details-row td dl dt{font-weight:bold}body.taxonomy-wpbdp_category .column-id{width:35px}.transaction-status-container{text-align:right;padding:5px}.wpbdp-progress-bar .progress-bar{margin-left:10px;display:inline-block;vertical-align:middle}.wpbdp-progress-bar .progress-bar-outer{min-width:200px;height:12px;border:solid 1px #3366CC;padding:0}.wpbdp-progress-bar .progress-bar-inner{height:100%;background:#99CCFF}.wpbdp-note{padding:5px 10px;background:#d7f5ff;margin:5px 0 20px 0;border:solid 1px #bad5df;border-radius:4px}.wpbdp-note p{margin:0}.wpbdp-note h1,.wpbdp-note h2,.wpbdp-note h3,.wpbdp-note h4{margin:0 0 8px 0}.wpbdp-note.error,.wpbdp-note.warning{background-color:#FFEBE8;border-color:#C00}.wpbdp-notice.dismissible{position:relative}.tag.paymentstatus{text-transform:capitalize}.tag.paymentstatus.ok{background:green}.tag.paymentstatus.completed{background:green}.tag.paymentstatus.pending,.tag.paymentstatus.pending-abandonment{background:red}.wpbdp-listing-metabox-tab dl{margin:0}.wpbdp-payment-details .tag{float:right}.wpbdp-payment-details .details,.wpbdp-payment-details .invoice,.wpbdp-payment-details .actions{clear:both;margin:20px 0}.wpbdp-payment-details .details dl dt{font-weight:bold}.wpbdp-payment-details table.wpbdp-payment-items-table{width:100%}.wpbdp-payment-details table.wpbdp-payment-items-table th{text-transform:uppercase}.wpbdp-payment-details table.wpbdp-payment-items-table td{border-top:1px solid #bbb;padding:6px 10px 6px 0}.wpbdp-payment-details .actions a.button-primary{color:#fff !important}.wp-core-ui .wpbdp-loading-button.button-primary,.wpbdp-loading-button{position:relative !important;opacity:.8;color:transparent !important;text-shadow:none !important}.wpbdp-loading-button:hover,.wpbdp-loading-button:active,.wpbdp-loading-button:focus{cursor:not-allowed;color:transparent !important;outline:none !important;box-shadow:none}.wpbdp-loading-button:before{content:'';display:inline-block;position:absolute;background:transparent;border:1px solid #fff;border-top-color:transparent;border-left-color:transparent;border-radius:50%;box-sizing:border-box;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;-o-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.listing-fee-change .fee-selection .fee{padding-bottom:5px;margin-bottom:10px;border-bottom:dotted 1px #d2d2d2;opacity:.85}.listing-fee-change .fee-selection .fee:hover{opacity:1}.listing-fee-change .fee-selection .fee .details{margin-left:10px}.listing-fee-change .fee-selection .fee .tag{float:right}.listing-fee-change .fee-selection .fee .choose-this{float:right}.wpbdp-draggable-highlight{background:#bbb}.wpbdp-module-compat-check .module-info{margin-bottom:3px}.wpbdp-module-compat-check .module-info .module-version,.wpbdp-module-compat-check .module-info .module-required{color:#666}.wpbdp-module-compat-check .module-info .module-version{margin-left:15px}.wpbdp-module-compat-check .module-info .module-version b{color:#333}.wpbdp-module-compat-check .module-info .module-required b{color:#900000}#wpbdp-admin-page-admin .welcome-message{padding:10px;font-size:105%}#wpbdp-admin-page-admin .welcome-message p{font-size:inherit}#wpbdp-admin-page-admin .welcome-message h4{font-size:120%}#wpbdp-admin-page-admin .welcome-message ul{list-style-position:inside;list-style-type:disc}#wpbdp-admin-page-admin .shortcuts{margin:auto}#wpbdp-admin-page-admin .shortcuts li{float:left;margin-right:10px}#wpbdp-admin-page-admin .shortcuts li.clear{margin:0}#wpbdp-admin-page-uninstall .wpbdp-admin-content{box-sizing:border-box;margin:20px 0 0 0;padding:16px;background:#fff;border-radius:4px}#wpbdp-admin-page-uninstall .wpbdp-validation-error{font-size:80%;color:#d64226;margin:0 0 10px 0}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion{float:left;box-sizing:border-box}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning ul,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion ul{margin-left:10px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning ul li,#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion ul li{list-style-type:disc;list-style-position:inside}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning{width:60%;padding-right:20px;color:#d64226}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-margin{float:left}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-margin .dashicons{width:30px;height:30px;font-size:30px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-warning .wpbdp-warning-content{margin-left:50px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-messages #wpbdp-uninstall-reinstall-suggestion{width:40%;padding-left:20px;border-left:1px solid #efefef}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form{display:none}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .reasons{margin-left:15px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .reasons .reason{margin-bottom:5px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form .custom-reason{display:none}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form textarea{margin:10px 0 0 0;width:50%;min-height:100px}#wpbdp-admin-page-uninstall #wpbdp-uninstall-capture-form textarea.invalid{border-color:#d64226}#wpbdp-admin-page-uninstall #wpbdp-uninstall-proceed-btn{margin-top:20px;color:#d64226}#wpbdp-licensing-issues-warning ul li{list-style-position:inside;list-style-type:disc}#wpbdp-licensing-issues-warning span.item-name{background:#fff9aa;padding:2px 5px;margin:0 0 0 4px;border-radius:4px}.wp-admin.widgets-php .widget-content span.help{color:#666}.wpbdp-admin-tab-nav{float:none;margin:0 0 .5em 0}.wpbdp-admin-tab-content{padding:5px 0 0 0;display:none}.wpbdp-admin-tab-content .wpbdp-form-field{margin:0}.wpbdp-admin-tab-content .wpbdp-form-field .wpbdp-form-field-inner{padding:0}.wpbdp-admin-box label{vertical-align:top}a.wpbdp-admin-delete-link{color:#a00;text-decoration:none}a.wpbdp-admin-delete-link:hover{color:red}#wpbdp-admin-payment-info-box .inside{margin:0;padding:0}#wpbdp-admin-payment-info-box .wpbdp-admin-box-row{border-bottom:1px solid #eee;clear:both;padding:6px 12px;margin:0;line-height:1.5}#wpbdp-admin-payment-info-box label{font-weight:bold}#wpbdp-admin-payment-items-box .payment-item,#wpbdp-admin-payment-items-box .payment-item-header{margin:0 12px;padding:6px 0}#wpbdp-admin-payment-items-box .payment-item .payment-item-type,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-type{display:block;width:20%;float:left}#wpbdp-admin-payment-items-box .payment-item .payment-item-description,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-description{display:block;width:60%;float:left}#wpbdp-admin-payment-items-box .payment-item .payment-item-amount,#wpbdp-admin-payment-items-box .payment-item-header .payment-item-amount{display:block;width:20%;float:left}#wpbdp-admin-payment-items-box .payment-item.payment-totals,#wpbdp-admin-payment-items-box .payment-item-header.payment-totals{border-top:1px solid #eee;font-weight:bold}#wpbdp-admin-payment-items-box .payment-item-header{font-weight:bold}#wpbdp-admin-payment-details-box *{box-sizing:border-box}#wpbdp-admin-payment-details-box .wpbdp-admin-box-row>div{padding:6px 0}#wpbdp-admin-payment-details-box label{display:block}#wpbdp-admin-payment-details-box .customer-email,#wpbdp-admin-payment-details-box .customer-address-line1,#wpbdp-admin-payment-details-box .customer-address-line2{clear:both;width:100%}#wpbdp-admin-payment-details-box .customer-email input,#wpbdp-admin-payment-details-box .customer-address-line1 input,#wpbdp-admin-payment-details-box .customer-address-line2 input{width:100%}#wpbdp-admin-payment-details-box .customer-first-name,#wpbdp-admin-payment-details-box .customer-address-country,#wpbdp-admin-payment-details-box .customer-address-city{padding-right:3px !important}#wpbdp-admin-payment-details-box .customer-last-name,#wpbdp-admin-payment-details-box .customer-address-state,#wpbdp-admin-payment-details-box .customer-address-zipcode{padding-left:3px !important}#wpbdp-admin-payment-details-box .customer-first-name,#wpbdp-admin-payment-details-box .customer-last-name,#wpbdp-admin-payment-details-box .customer-address-country,#wpbdp-admin-payment-details-box .customer-address-state,#wpbdp-admin-payment-details-box .customer-address-city,#wpbdp-admin-payment-details-box .customer-address-zipcode{float:left;width:50%}#wpbdp-admin-payment-details-box .customer-first-name input,#wpbdp-admin-payment-details-box .customer-last-name input,#wpbdp-admin-payment-details-box .customer-address-country input,#wpbdp-admin-payment-details-box .customer-address-state input,#wpbdp-admin-payment-details-box .customer-address-city input,#wpbdp-admin-payment-details-box .customer-address-zipcode input{width:100%}#wpbdp-payment-notes .wpbdp-payment-note{margin-bottom:12px;line-height:1.5}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-payment-note-meta-user{font-weight:bold}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-payment-note-meta-date{color:#666}#wpbdp-payment-notes .wpbdp-payment-note .wpbdp-admin-delete-link{float:right;display:none}#wpbdp-payment-notes .wpbdp-payment-note:hover .wpbdp-admin-delete-link{display:block}span.tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}span.tag.wpbdp-listing-attr-payment-completed{background:green}span.tag.wpbdp-listing-attr-payment-canceled,span.tag.wpbdp-listing-attr-payment-failed{background:red}span.tag.wpbdp-listing-attr-admin-posted,span.tag.wpbdp-listing-attr-payment-on-hold,span.tag.wpbdp-listing-attr-payment-refunded{background:orange}span.tag.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}span.tag.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}span.tag.wpbdp-listing-attr-reported{background:#d64226;color:#fff}.wpbdp-tag.wpbdp-listing-attr-payment-completed,span.tag.wpbdp-listing-attr-payment-completed{background:green}.wpbdp-tag.wpbdp-listing-attr-payment-canceled,span.tag.wpbdp-listing-attr-payment-canceled,.wpbdp-tag.wpbdp-listing-attr-payment-failed,span.tag.wpbdp-listing-attr-payment-failed{background:red}.wpbdp-tag.wpbdp-listing-attr-admin-posted,span.tag.wpbdp-listing-attr-admin-posted,.wpbdp-tag.wpbdp-listing-attr-payment-on-hold,span.tag.wpbdp-listing-attr-payment-on-hold,.wpbdp-tag.wpbdp-listing-attr-payment-refunded,span.tag.wpbdp-listing-attr-payment-refunded{background:orange}.wpbdp-tag.wpbdp-listing-attr-post-status-pending,span.tag.wpbdp-listing-attr-post-status-pending{background:blue;color:#fff}.wpbdp-tag.wpbdp-listing-attr-no-fee-plan,span.tag.wpbdp-listing-attr-no-fee-plan{background:#d64226;color:#fff}.wpbdp-tag.wpbdp-listing-attr-reported,span.tag.wpbdp-listing-attr-reported{background:#d64226;color:#fff}.wp-list-table td .wpbdp-tag{display:inline-block}body.post-type-wpbdp_listing .wp-list-table .wpbdp-tag{font-size:10px !important;text-transform:none !important}#wpbdp-listing-form-preview{padding:25px;border:1px solid #d2d2d2;background:#fff}.wpbdp-user-select .select2.select2-container{max-width:84.9%}.select2-container,.select2-search--inline,.select2-search__field{width:100% !important}
|
assets/css/wpbdp.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpbdp-tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.wpbdp-display-block{display:block}.wpbdp-smaller{font-size:90%}.wpbdp-no-bold{font-weight:normal}.wpbdp-cf:before,.wpbdp-cf:after,.cf:before,.cf:after{content:" ";display:table}.wpbdp-cf:after,.cf:after{clear:both}form#wpbdmsearchform{padding:12px 0;text-align:center}form#wpbdmsearchform input{display:inline}form#wpbdmsearchform .wpbdmsearchbutton{margin-top:5px}form#wpbdmsearchform a.advanced-search-link{font-size:70%;display:block}#wpbdp-search-form{padding-left:10px}#wpbdp-search-form .wpbdp-search-filter{margin-bottom:10px;clear:both}#wpbdp-search-form .wpbdp-search-filter>.wpbdp-search-field-label{display:block;width:40%;float:left}#wpbdp-search-form .wpbdp-search-filter>div.field{display:block;width:60%;margin-left:40%;padding-left:5px}#wpbdp-search-form .wpbdp-search-filter>div.field>input[type="text"]{box-sizing:border-box;width:90%}#wpbdp-search-form .wpbdp-search-filter>div.field>select{box-sizing:border-box;width:90%}#wpbdp-search-form input[type="submit"]{float:none;margin:auto}.wpbdp-clearfix:after,.cf:before,.cf:after{content:" ";display:table}.wpbdp-clearfix:after,.cf:after{clear:both}.wpbdp-pagination{margin:25px 0 0 0}.wpbdp-pagination .next{float:right}.listing-actions form{margin:0;padding:0;display:inline}.listing-actions input{margin:0 0 5px;font-size:80%}.listing-actions .delete-listing,.listing-actions a.delete-listing{margin-left:20px;margin-right:30px;color:#d64226 !important;background-color:transparent;border:none}.listing-actions .back-to-dir{float:right}.listing-actions a.button{padding:5px 10px;font-size:11px;text-decoration:none;margin-right:3px}.wpbdp-listing .listing-details .field-value{margin-bottom:10px;width:100%;float:none}.wpbdmsingledetails .singledetailsview .field-value{margin-bottom:10px}.field-value label,.field-value .field-label{color:#444;font-weight:bold}.field-value .value{display:inline}.wpbdp-listing-excerpt{padding:10px}.wpbdp-listing-excerpt.sticky{background:#fff0cf;background:var(--bd-main-color-8)}.wpbdp-listing-excerpt .listing-thumbnail{float:right;margin:0 10px 0 0}.wpbdp-listing-excerpt .listing-actions{margin-top:15px}.wpbdp-listing-single .listing-actions{margin-bottom:25px}.wpbdp-listing-single.sticky{margin-top:30px}.wpbdp-listing-excerpt .stickytag,.wpbdp-listing-single .stickytag{float:right;margin-top:-20px}.wpbdp-listing-excerpt .stickytag img,.wpbdp-listing-single .stickytag img{border:0;box-shadow:none;background:transparent;max-height:102px}.wpbdp-listing-single .stickytag{position:absolute;bottom:0;right:0}.wpbdp-sticky-tag{background:var(--bd-main-color);color:#fff;padding:6px 15px;margin:0 15px;border-radius:4px;text-transform:uppercase;font-weight:600;vertical-align:text-bottom;display:inline-block;font-size:12px}.wpbdp-is-table .wpbdp-listing-excerpt>.wpbdp-sticky-tag{display:none !important}.wpbdp-listing-excerpt .wpbdp-sticky-tag{float:right;margin-top:10px;margin-right:0}.wpbdp-listing-excerpt.wpbdp-has-ribbon{position:relative;overflow:hidden}.wpbdp-listing-excerpt.wpbdp-has-ribbon .wpbdp-sticky-tag{transform:rotate(45deg);text-align:center;position:relative;top:7px;right:-50px;width:150px;margin:0 0 50px;border-radius:0}.wpbdp-listing-excerpt.wpbdp-has-ribbon .wpbdp-claim-listings{display:none}.wpbdp-listing-single .listing-title{margin-bottom:7px;position:relative}.wpbdp-listing-single .listing-title h1,.wpbdp-listing-single .listing-title h2,.wpbdp-listing-single .listing-title h3{display:inline-block}.wpbdp-listing-single .listing-title h2{clear:none;margin:0}.wpbdp-listing-single .main-image{float:right;margin-left:10px;padding:5px}.wpbdp-listing-single .main-image a{position:relative !important}.wpbdp-listing-single .main-image img{border:solid 1px #d2d2d2}.single-wpbdp_listing .extra-images,.wpbdp-listing-single .extra-images{margin-top:10px;clear:both}.single-wpbdp_listing .extra-images ul,.wpbdp-listing-single .extra-images ul{margin:0 auto;padding:0;width:100%}.single-wpbdp_listing .extra-images ul li,.wpbdp-listing-single .extra-images ul li{list-style-type:none;display:inline-block;margin-left:5px;margin-bottom:5px}.single-wpbdp_listing .extra-images ul li img,.wpbdp-listing-single .extra-images ul li img{display:inline;vertical-align:top;margin:0 auto;max-width:150px;border:solid 1px #d2d2d2}.single-wpbdp_listing .social-fields,.wpbdp-listing .social-fields{margin:20px 0;vertical-align:top}.social-field-link,.single-wpbdp_listing .social-field,.wpbdp-listing .social-field{display:inline-block;margin-right:10px;height:20px;vertical-align:text-top}.social-field-link iframe,.single-wpbdp_listing .social-field iframe,.wpbdp-listing .social-field iframe{margin-bottom:0}.social-field-link img,.single-wpbdp_listing .social-field img,.wpbdp-listing .social-field img{vertical-align:initial}.social-field-link .social-icon,.single-wpbdp_listing .social-field .social-icon,.wpbdp-listing .social-field .social-icon{display:inline-block;background-color:transparent;color:#1a1a1a}.social-field-link .social-text,.single-wpbdp_listing .social-field .social-text,.wpbdp-listing .social-field .social-text{font-size:90%}.social-field-link a,.single-wpbdp_listing .social-field a,.wpbdp-listing .social-field a{box-shadow:none}.social-field-link a img,.single-wpbdp_listing .social-field a img,.wpbdp-listing .social-field a img{height:20px;width:auto}.social-field-link a object,.single-wpbdp_listing .social-field a object,.wpbdp-listing .social-field a object{height:20px;margin-bottom:0}.social-field-link.icon_first .social-icon,.single-wpbdp_listing .social-field.icon_first .social-icon,.wpbdp-listing .social-field.icon_first .social-icon{margin-right:5px}.social-field-link.text_first .social-text,.single-wpbdp_listing .social-field.text_first .social-text,.wpbdp-listing .social-field.text_first .social-text{margin-right:5px}.wpbdp-listing-contact-form{margin-top:20px;padding-top:20px}.wpbdp-listing-contact-form #wpbdp-contact-form-recaptcha{margin-bottom:20px}.wpbdp-listing-contact-form textarea{width:100%}.wpbdp-listing .comments{margin-top:20px}.wpbdp-bar .wpbdp-search-form{margin:0;padding:0 !important;margin-left:50%}.wpbdp-main-links a{margin-right:15px}.wpbdp-bar .left{float:left;text-align:center}.wpbdp-bar .right{width:300px;float:right}.wpbdp-listings-sort-options{font-size:90%;margin:5px 0 10px}.wpbdp-listings-sort-options label{font-weight:normal}.wpbdp-listings-sort-options select{margin:0 4px}#wpbdp-categories{clear:both}.wpbdp-categories{margin:0;padding-left:20px}.wpbdp-categories .cat-item{box-sizing:border-box;float:left;margin:0 0 20px;width:50%}.wpbdp-categories .cat-item:nth-child(2n+1){clear:left}.wpbdp-categories .cat-item .cat-item{margin:0;width:100%}.wpbdp-categories-tiny .cat-item{float:none;width:100%}.wpbdp-categories-tiny .cat-item:nth-child(2n+1){clear:none}#wpbdp-checkout-form-fields,.wpbdp-form-field{margin:14px 0}#wpbdp-checkout-form-fields label,.wpbdp-form-field label{font-weight:500}#wpbdp-checkout-form-fields label .wpbdp-form-field-required-indicator,.wpbdp-form-field label .wpbdp-form-field-required-indicator{margin-left:3px;font-size:90%}#wpbdp-checkout-form-fields.wpbdp-form-field-has-description .wpbdp-form-field-label,.wpbdp-form-field.wpbdp-form-field-has-description .wpbdp-form-field-label{margin-bottom:0}#wpbdp-checkout-form-fields.wpbdp-form-field-has-description .wpbdp-form-field-description,.wpbdp-form-field.wpbdp-form-field-has-description .wpbdp-form-field-description{margin-bottom:3px}#wpbdp-checkout-form-fields .wpbdp-description,.wpbdp-form-field .wpbdp-description,#wpbdp-checkout-form-fields .wpbdp-form-field-description,.wpbdp-form-field .wpbdp-form-field-description{opacity:.8;font-size:14px;display:block}#wpbdp-checkout-form-fields .wpbdp-form-field-inner,.wpbdp-form-field .wpbdp-form-field-inner{padding-left:6px}#wpbdp-checkout-form-fields textarea,.wpbdp-form-field textarea,#wpbdp-checkout-form-fields input[type="text"],.wpbdp-form-field input[type="text"],#wpbdp-checkout-form-fields input[type="tel"],.wpbdp-form-field input[type="tel"],#wpbdp-checkout-form-fields select,.wpbdp-form-field select{width:100%;box-sizing:border-box}#wpbdp-checkout-form-fields .field-description,.wpbdp-form-field .field-description{font-size:90%;color:#696969;float:right}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview{margin-bottom:20px}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview img,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview img{display:inline}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview a.delete,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview a.delete{color:#900000;margin-left:20px;display:none;vertical-align:top}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview:hover a.delete,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview:hover a.delete{display:inline}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network input[type="text"],.wpbdp-form-field.wpbdp-form-field-type-social-network input[type="text"]{width:100%}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel,.wpbdp-form-field.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel{display:block}.wpbdp-form-field-validation-error-wrapper{margin:24px 0}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors{font-size:80%;color:#d64226;position:relative;background:#fff;border:1px solid #d64226;border-radius:4px;padding:4px 6px;margin:0 12px 3px 6px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:after,.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:before{top:100%;left:12px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:after{border-color:rgba(255,255,255,0);border-top-color:#fff;border-width:4px;margin-left:-4px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:before{border-color:rgba(214,66,38,0);border-top-color:#d64226;border-width:5px;margin-left:-5px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field{margin:0}.wpbdp-form-field-validation-error-wrapper+label{color:#d64226}.wpbdp-checkout-section{margin:0 0 1.5em 0;padding:.7em 1.2em;border:solid 1px #efefef}.wpbdp-checkout-section.wpbdp-checkout-errors{padding:0;border:none}.wpbdp-checkout-section h3{margin:0 0 1em 0;padding:0}.wpbdp-checkout-gateway-selection label{margin:0 10px 0 0}.wpbdp-checkout-gateway-selection label:last-child{margin-right:0}.wpbdp-checkout-gateway-selection label input,.wpbdp-checkout-gateway-selection label img{vertical-align:middle}.wpbdp-checkout-gateway-selection label img{margin-bottom:10px}.wpbdp-billing-detail-field{margin:0 0 1.5em 0;font-size:95%}.wpbdp-billing-detail-field.wpbdp-required label:after{content:' *';color:#d64226}.wpbdp-exp-field select{width:auto}.wpbdp-exp-slash{padding:0 5px}.wpbdp-payment-receipt{border:1px solid #d2d2d2;padding:1em 1.5em;margin:1.5em 0;font-size:90%}.wpbdp-payment-receipt h4{margin:0;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-date{color:#666}.wpbdp-payment-receipt .wpbdp-payment-status{float:right}.wpbdp-payment-receipt .wpbdp-payment-receipt-details{margin:1.5em .5em}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl{margin:0;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl dt{margin:0;padding:0;float:left;min-width:50%}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl dd{margin:0 0 5px 50%;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-print{margin:1.5em 0 0 0}.wpbdp-checkout-invoice table.wpbdp-payment-items-table th,.wpbdp-checkout-invoice table.wpbdp-payment-items-table td{font-size:95%}.wpbdp-checkout-invoice table.wpbdp-payment-items-table tr.item td:first-of-type{width:80%}.wpbdp-checkout-invoice table.wpbdp-payment-items-table .item-fee-description{margin-left:10px;font-size:85%;max-width:90%}.wpbdp-grid{display:grid;grid-template-columns:repeat(12, 1fr);grid-auto-rows:max-content;grid-gap:20px 4%}.wpbdp-grid>*{grid-column:span 12 / span 12}.wpbdp6,.wpbdp-half{grid-column:span 6 / span 6}.wpbdp4{grid-column:span 4 / span 4}.wpbdp8{grid-column:span 8 / span 8}.wpbdp3{grid-column:span 3 / span 3}.wpbdp9{grid-column:span 9 / span 9}.wpbdp2{grid-column:span 2 / span 2}.wpbdp10{grid-column:span 10 / span 10}.wpbdp1{grid-column:span 1 / span 1}.wpbdp5{grid-column:span 5 / span 5}.wpbdp7{grid-column:span 7 / span 7}.wpbdp11{grid-column:span 11 / span 11}.wpbdp12,.wpbdp-full{width:100% !important;grid-column:span 12 / span 12;box-sizing:border-box}.wpbdp_first{grid-column-start:1}.wpbdp_last{grid-column-end:-1;grid-row-start:span 100;justify-content:end}@media only screen and (max-width:710px){.wpbdp-grid>.wpbdp-listing{grid-column:1 / span 12 !important}}@media only screen and (max-width:600px){.wpbdp-grid>.wpbdp-form-field{grid-column:1 / span 12 !important}}.wpbdp-submit-rootline{margin:30px auto;text-align:center;display:flex}.wpbdp-rootline-section{align-items:center;width:100%}.wpbdp-rootline-section:not(.wpbdp-submit-section-current).wpbdp-submit-checked .wpbdp-rootline-counter span{display:none}.wpbdp-rootline-section:last-of-type .wpbdp-rootline-bar{background-image:none}.wpbdp-rootline-section-name{margin:10px auto 0;font-size:12px;text-transform:uppercase;opacity:.6}.wpbdp-rootline-bar{background-image:linear-gradient(to left, rgba(255,255,255,0) 50%, #569AF6 50%);background-image:linear-gradient(to left, rgba(255,255,255,0) 50%, var(--bd-main-color) 50%);background-position:bottom;background-size:10px;background-repeat:repeat-x;position:relative;height:1px;width:calc(100% - 48px);top:24px;margin-left:calc(50% + 25px)}.wpbdp-rootline-circle{display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:48px;border:1px solid #569AF6;border-color:var(--bd-main-color);z-index:1}.wpbdp-rootline-circle svg{fill:none}.wpbdp-submit-checked .wpbdp-rootline-circle{background:#569AF6;background:var(--bd-main-color)}.wpbdp-rootline-counter{font-weight:bold;font-size:20px}.wpbdp-submit-checked .wpbdp-rootline-section-name{opacity:1}.wpbdp-submit-checked.wpbdp-submit-section-current svg{display:none}.wpbdp-submit-checked .wpbdp-rootline-circle{color:#fff}#wpbdp-submit-listing.wpbdp-submit-page{margin:auto}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section{margin:10px 0 0 0;display:block}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .collapse-indicator.expanded{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .collapse-indicator.collapsed{display:inline}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .wpbdp-submit-listing-section-content{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.hidden{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-content h4{margin:0 0 10px 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-form-actions{margin:10px 0;text-align:center}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-form-actions button{margin:15px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-messages{margin:0 0 12px 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-plan-selection-with-tip{margin:24px 0 0 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection ul.category-list{margin:0;padding:0;list-style-type:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection ul.category-list li{font-size:10px;margin:0 5px 0 0;padding:1px 6px;border-radius:3px;background:#569AF6;background:var(--bd-main-color);color:#fff;font-weight:700;text-align:center;white-space:nowrap;vertical-align:baseline;border:none;display:inline}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection .wpbdp_continue_to_fields_action{text-align:right}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-editor-area{height:422px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-listing_fields .wpbdp-submit-listing-form-actions{display:block}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-listing_fields.has-error .wpbdp-form-field-label{position:relative}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-inner{padding:0;width:100%}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-type-select:not(.wpbdp-form-field-association-category).wpbdp-form-field-association-region.wpbdp-regions-hidden{display:none;visibility:hidden}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-upload-widget{max-height:50px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-label .wpbdp-form-field-validation-error-wrapper{visibility:hidden;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:40%;left:-10px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-label:hover .wpbdp-form-field-validation-error-wrapper{visibility:visible}textarea.wpbdp-submit-listing-tos{min-height:100px}#change-plan-link{text-align:right;font-size:90%}#wpbdp-submit-listing-account-details{margin:10px 0 0 0}#wpbdp-submit-listing-account-details input[type="password"]{width:70%;display:inline-block}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter{float:right;width:20%;padding:4px;text-align:center;border:1px solid}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-0{background-color:#f1adad;border-color:#e35b5b}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-2{background-color:#fbc5a9;border-color:#f78b53}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-3{background-color:#ffe399;border-color:#ffc733}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-4{background-color:#c1e1b9;border-color:#83c373}@media only screen and (max-width:450px){.wpbdp-form-field.wpbdp-form-field-type-url .wpbdp-url-field-col{grid-column:span 12 / span 12}.wpbdp-submit-rootline .wpbdp-rootline-section:not(.wpbdp-submit-section-current),.wpbdp-submit-rootline .wpbdp-rootline-section .wpbdp-rootline-bar{display:none}.wpbdp-submit-rootline .wpbdp-rootline-section.wpbdp-submit-checked .wpbdp-rootline-circle .wpbdp-rootline-checkmark{display:none}.wpbdp-submit-rootline .wpbdp-rootline-section.wpbdp-submit-checked .wpbdp-rootline-circle .wpbdp-rootline-counter span{display:initial}}.wpbdp-form-field-type-image #image-upload-form,.wpbdp-submit-listing-section-listing_images #image-upload-form{margin:15px 10px}.wpbdp-form-field-type-image #wpbdp-uploaded-images,.wpbdp-submit-listing-section-listing_images #wpbdp-uploaded-images{margin:0 0 20px 0}.wpbdp-form-field-type-image .wpbdp-image,.wpbdp-submit-listing-section-listing_images .wpbdp-image{padding:10px 0;border-bottom:1px solid #d2d2d2;display:flex;align-items:center}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-img,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-img{margin:0 10px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-img img,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-img img{object-fit:cover;width:50px;height:50px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp_thumbnail_indicator,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp_thumbnail_indicator{font-size:.8em;display:none}.wpbdp-form-field-type-image .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator,.wpbdp-submit-listing-section-listing_images .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator{display:inline-block}.wpbdp-form-field-type-image .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator::before,.wpbdp-submit-listing-section-listing_images .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator::before{content:"✓"}.wpbdp-form-field-type-image .wpbdp-image:last-of-type,.wpbdp-submit-listing-section-listing_images .wpbdp-image:last-of-type{border:none}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-extra,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-extra{flex:1 0 auto}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-extra input[type="text"],.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-extra input[type="text"]{width:60%}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-delete-link,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-delete-link{font-size:12px;text-decoration:none;color:#900000;display:none;margin-left:10px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-delete-link:hover,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-delete-link:hover{text-decoration:underline}.wpbdp-form-field-type-image .wpbdp-image:hover .wpbdp-image-delete-link,.wpbdp-submit-listing-section-listing_images .wpbdp-image:hover .wpbdp-image-delete-link{display:inline}.wpbdp-form-field-type-image .wpbdp-drag-handle,.wpbdp-submit-listing-section-listing_images .wpbdp-drag-handle{visibility:hidden}.wpbdp-form-field-type-image:hover .wpbdp-drag-handle,.wpbdp-submit-listing-section-listing_images:hover .wpbdp-drag-handle{visibility:visible}.wpbdp-form-field-type-image .wpbdp-image-draggable-highlight,.wpbdp-submit-listing-section-listing_images .wpbdp-image-draggable-highlight{width:160px;height:160px;margin:0 10px;background:red;float:left}.wpbdp-form-field-type-image #image-upload-form-no-js,.wpbdp-submit-listing-section-listing_images #image-upload-form-no-js{width:0;height:0;overflow:hidden;visibility:hidden}.wpbdp-form-field-type-image .wpbdp-image{border:none}.wpbdp-submit-listing-section h3,.wpbdp-submit-listing-section .wpbdp-recaptcha{margin-top:40px}.wpbdp-submit-listing-section-header{display:none}.wpbdp-with-button-styles .submit-back-button.wpbdp-button{background:transparent !important;border:1px solid #569AF6;border-color:var(--bd-main-color);color:#569AF6;color:var(--bd-main-color) !important}.wpbdp-with-button-styles .submit-back-button.wpbdp-button:hover{background:#569AF6;background:var(--bd-main-color) !important;color:#fff !important}.wpbdp-with-button-styles .select2-container .select2-selection{border-color:#d2d2d2}.wpbdp-with-button-styles .select2-container .select2-results__option--highlighted[data-selected]{background-color:var(--bd-main-color)}#wpbdp-login-view .wpbdp-login-options{margin:30px 0 0 0;box-sizing:border-box}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option{width:50%;float:left;box-sizing:border-box}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option:first-child{padding:0 20px 0 0}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option:last-child{border-left:1px solid #d2d2d2;padding:0 0 0 20px}#wpbdp-login-view #loginform #user_login,#wpbdp-login-view #loginform #user_pass{display:block}#wpbdp-login-view h4{font-size:21px;margin-top:0}#wpbdp-login-view .access-key-message{font-size:13px}#wpbdp-login-view input[type=text],#wpbdp-login-view input[type=password]{width:100%}.wpbdp-wp-theme-twentyseventeen #wpbdp-login-access-key-form input[type=submit]{margin-top:49px}.wpbdp-wp-theme-twentyseventeen #wpbdp-login-form h4{margin-bottom:74px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view h4{font-size:24px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view .access-key-message{font-size:16px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view #wpbdp-login-access-key-form input[type=submit]{margin-top:60px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view #wpbdp-login-form h4{margin-bottom:72px}.wpbdp-wp-theme-twentytwenty #wpbdp-login-access-key-form input[type=submit]{margin-top:44px}.wpbdp-wp-theme-twentytwenty #wpbdp-login-form h4{margin-bottom:57px}.wpbdp-msg{padding:10px 12px;margin:5px 0;background:#FEF7D3;border:1px solid rgba(63,75,91,0.2);box-sizing:border-box;border-radius:4px;font-size:14px;color:rgba(63,75,91,0.6)}.wpbdp-msg ul{margin:0}.wpbdp-msg ul li{list-style-position:inside}.wpbdp-msg.error,.wpbdp-msg.wpbdp-error{color:#fff;background:#d64226}.wpbdp-submit-page table.fee-options{width:100%}.wpbdp-submit-page table.fee-options th,.wpbdp-submit-page table.fee-options td{text-align:center}.wpbdp-submit-page table.fee-options td.fee-label,.wpbdp-submit-page table.fee-options tr.fee-description td{text-align:left}.wpbdp-submit-page table.fee-options .fee-selection{width:5%}.wpbdp-submit-page table.fee-options tr.fee-option td.fee-label{font-weight:bold}.wpbdp-submit-page table.fee-options td.fee-description{font-size:90%;color:#666}#wpbdp-renewal-page .do-not-renew-listing{padding:15px 10px 10px;border-radius:2px;background-color:var(--bd-main-color-8)}#wpbdp-renewal-page .do-not-renew-listing p:last-child{margin-bottom:0}#wpbdp-renewal-page .do-not-renew-listing input[type="submit"]{background:#d64226}.wpbdp-recaptcha-error{color:#d64226}#wpbdp-delete-listing-page form.confirm-form{margin-top:30px}#wpbdp-delete-listing-page input.delete-listing-confirm{margin-right:20px;background:#d64226}.wpbdp-scroll-box{padding:10px;margin:30px 0;border:1px solid #d2d2d2;max-height:250px;overflow:auto}.wpbdp-checkout input[type="image"]{padding:0;border:none;box-shadow:none;width:auto}table#wpbdp-manage-recurring th.listing-title,table#wpbdp-manage-recurring td.listing-title{min-width:200px}table#wpbdp-manage-recurring a.cancel-subscription{color:#d64226}#wpbdp-manage-recurring-cancel dl dd{margin-left:10px}.wpbdp-cancel-subscription-form{padding:15px 10px 10px;border-radius:2px;background-color:var(--bd-main-color-8)}.wpbdp-cancel-subscription-form p:last-child{margin-bottom:0}.wpbdp-cancel-subscription-form input.button-primary[type="submit"]{background-color:#d64226}.wpbdp-cc-form{padding:0;width:90%}.wpbdp-cc-form h4{margin:0}.wpbdp-cc-field input{width:auto}.wpbdp-cc-field label{display:block;font-weight:bold;text-align:right;padding-right:10px}#wpbdp-billing-information .billing-info-section h4{margin:10px 0 5px 0}#wpbdp-billing-information .billing-info-section table{margin:1.75em 0}#wpbdp-billing-information #wpbdp-billing-field-exp,#wpbdp-billing-information #wpbdp-billing-field-exp-year{width:40%;display:inline}#wpbdp-billing-information .form-buttons{margin:15px 0}a.wpbdp-show-on-mobile,input[type="button"].wpbdp-show-on-mobile,.wpbdp-show-on-mobile{display:none}body.business-directory #TB_ImageOff .screen-reader-text,body.business-directory #TB_closeWindowButton .screen-reader-text{visibility:hidden}body.business-directory #TB_next{float:right}body.business-directory #TB_prev{float:left}body.business-directory #TB_caption{text-align:center;width:70%;height:auto}body.business-directory #TB_closeWindow{padding:0;height:0}body.business-directory #TB_closeWindow .screen-reader-text{display:none}body.business-directory #TB_secondLine{font-size:11px;color:#666}.wpbdp-form-row label{display:block}.wpbdp-form-row.wpbdp-form-textfield input[type="text"]{width:400px}.wpbdp-main-box,.wpbdp-main-box .box-row,.wpbdp-main-box .box-col{box-sizing:border-box;width:100%}.wpbdp-main-box{margin:10px 0 20px 0}.wpbdp-main-box .box-col{margin-bottom:4px}.wpbdp-main-box .box-col input{width:100%;min-width:150px}.distance-field-wrapper .box-row{display:flex;align-items:center}.wpbdp-main-box .submit-btn input[type="submit"]{margin-top:0}.wpbdp-main-box .advanced-search-link{border:none;box-shadow:none;display:block;font-size:11px;text-align:right;text-decoration:none}.wpbdp-main-box .search-fields .box-row,.wpbdp-main-box .main-fields.box-row form{width:100%;display:flex;gap:5px}.wpbdp-main-box .submit-btn{width:22%;min-width:150px}.wpbdp-main-box-tiny .submit-btn,.wpbdp-main-box-small .submit-btn{width:100%}.wpbdp-main-box-tiny .search-fields .box-row,.wpbdp-main-box-tiny .main-fields.box-row form,.wpbdp-main-box-small .search-fields .box-row,.wpbdp-main-box-small .main-fields.box-row form{display:block}.wpbdp-main-links{text-align:right}a.wpbdp-button{white-space:nowrap}.wpbdp-main-links .button,.wpbdp-main-links-large .button{margin:0 3px 6px;font-size:15px;display:inline-block}.wpbdp-main-links .button:first-child{margin-left:0}.wpbdp-main-links .button:last-child{margin-right:0}.wpbdp-main-links-tiny .wpbdp-main-links .button{padding-top:10px;padding-bottom:10px;width:100%;margin:0 0 4px}.wpbdp-main-links-small .button{width:100%;margin:0 0 4px;text-align:center}.wpbdp-main-links-small .wpbdp-main-links-2-buttons .button{width:49%}.wpbdp-main-links-small .wpbdp-main-links-2-buttons .button:first-child{margin-right:1%}.wpbdp-with-button-styles .wpbdp-checkout-submit input[type=submit],.wpbdp-with-button-styles .wpbdp-ratings-reviews input[type=submit],.wpbdp-with-button-styles .wpbdp-main-box input[type=submit],.wpbdp-with-button-styles .listing-actions a.wpbdp-button,.wpbdp-with-button-styles .wpbdp-button{background:#569AF6;background:var(--bd-main-color) !important;border:1px solid #569AF6;border-color:var(--bd-main-color)}.wpbdp-with-button-styles .wpbdp-checkout-submit input[type=submit]:hover,.wpbdp-with-button-styles .wpbdp-ratings-reviews input[type=submit]:hover,.wpbdp-with-button-styles .wpbdp-main-box input[type=submit]:hover,.wpbdp-with-button-styles .listing-actions a.wpbdp-button:hover,.wpbdp-with-button-styles .wpbdp-button:hover{opacity:.8;background:var(--bd-main-color)}.wpbdp-with-button-styles .wpbdp-main-links-tiny .wpbdp-main-links .button{padding-top:10px;padding-bottom:10px}.wpbdp-with-button-styles .wpbdp-main-links-small .button{padding-top:10px;padding-bottom:10px}.wpbdp-with-button-styles .wpbdp-main-links-medium .wpbdp-main-links .button{padding-top:8px;padding-bottom:8px}.single-wpbdp_listing .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-show_category .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-show_tag .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-search .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-submit_listing .wpbdp-view-content-wrapper header.entry-header{display:none}.wpbdp-wp-theme-graphene.single-wpbdp_listing h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-show_category h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-show_tag h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-search h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-submit_listing h1.post-title{display:none}.wpbdp-wp-theme-genesis.wpbdp-view-show_category .archive-description,.wpbdp-wp-theme-genesis.wpbdp-view-show_tag .archive-description{display:none}.wpbdp-wp-theme-hmtpro5.wpbdp-view-show_category .post-details,.wpbdp-wp-theme-hmtpro5.wpbdp-view-show_tag .post-details{display:none}.wpbdp-wp-theme-atahualpa.wpbdp-view-show_category .post-footer,.wpbdp-wp-theme-atahualpa.wpbdp-view-show_tag .post-footer,.wpbdp-wp-theme-atahualpa.wpbdp-view-show_listing .post-footer{display:none}.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_category .entry-content .featured-image,.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_tag .entry-content .featured-image,.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_listing .entry-content .featured-image{display:none}.wpbdp-plan-info-box{padding:10px;margin:0 0 6px 0;border:1px solid #d2d2d2;border-radius:2px;display:flex;align-items:center;flex-wrap:wrap}.wpbdp-plan-info-box .wpbdp-plan-details,.wpbdp-plan-info-box .wpbdp-plan-price{float:left;box-sizing:border-box}.wpbdp-plan-info-box .wpbdp-plan-details{width:55%;padding:0 10px}.wpbdp-plan-info-box .wpbdp-plan-price{width:40%;text-align:center}.wpbdp-plan-info-box .wpbdp-plan-price label{cursor:pointer;margin-top:15px;font-size:20px;display:block;padding:6px 12px}.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]{display:none}.wpbdp-plan-info-box .wpbdp-plan-description{margin:0 0 10px 0}.wpbdp-plan-info-box .wpbdp-plan-price-amount,.wpbdp-plan-info-box .wpbdp-plan-label{font-size:1.1em;font-weight:bold;margin-bottom:10px}.wpbdp-plan-info-box .wpbdp-plan-feature-list{margin:0 0 0 10px}.wpbdp-plan-info-box .wpbdp-plan-details p{margin:0}.wpbdp-plan-info-box .wpbdp-plan-feature-list li{list-style-position:inside;margin:0}.wpbdp-plan-info-box .wpbdp-plan-disabled-msg{clear:both}.wpbdp-plan-info-box .wpbdp-plan-private-msg{width:100%;display:inline-block;text-align:right}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-details,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-price{width:100%}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration-amount,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration-period{display:inline}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-details{padding:0 0 4pt}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-label{font-size:1.5em;margin-bottom:5px}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-description{margin-bottom:5px}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+label{background:transparent !important;border:1px solid #569AF6;border-color:var(--bd-main-color);color:#569AF6;color:var(--bd-main-color) !important}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+label:hover{background:#569AF6;background:var(--bd-main-color) !important;color:#fff !important}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]:checked+label{color:#fff !important;background:var(--bd-main-color) !important}.wpbdp-dnd-area{margin:0 auto;border:1px solid #ddd;width:100%}.wpbdp-dnd-area.dragging{background:#efefef}.wpbdp-dnd-area p{margin:0;font-size:16px;line-height:24px}.wpbdp-dnd-area p.dnd-message{font-size:24px;line-height:24px}.wpbdp-dnd-area .dnd-area-inside{letter-spacing:1px;margin:54px auto 38px;text-align:center}.wpbdp-dnd-area .dnd-area-inside-working{text-align:center;margin:50px auto 38px}.wpbdp-dnd-area .dnd-area-inside-working span{font-weight:bold}.wpbdp-dnd-area .dnd-area-inside-error{color:#900000;text-align:center;margin:50px 25px}.wpbdp-dnd-area .upload-button{position:relative;overflow:hidden}.wpbdp-dnd-area .upload-button a{text-decoration:none}.wpbdp-dnd-area .upload-button a:hover{cursor:pointer}.wpbdp-dnd-area .upload-button input{margin:0;padding:0;position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:0;border:none !important;z-index:-1}.area-and-conditions #image-upload-dnd-area{box-sizing:border-box;background-color:rgba(86,154,246,0.08);background-color:var(--bd-main-color-8);border-color:var(--bd-main-color-20);border-radius:4px}.area-and-conditions #image-upload-dnd-area .dnd-buttons a{letter-spacing:initial}#image-upload-conditions{font-size:12px;margin-bottom:6px;opacity:.8}#image-slots-available{float:right}.wpbdp-drag-handle{width:6px;height:10px;display:inline-block;background:url('../../assets/images/drag-handle.png') 0 0;cursor:move;float:left;margin:5px 5px 0 0;vertical-align:middle}.wpbdp-help-tip{margin:10px 0}.wpbdp-help-tip .dashicons{vertical-align:middle}.wpbdp-help-tip .message{display:inline-block}.wpbdp-help-tip.small{font-size:12px}.wpbdp-help-tip.small .dashicons{font-size:15px;width:15px;height:15px}.wpbdp-hidden{display:none}.wpbdp-form-field-association-category .wpbdp-form-field-checkbox-item.disabled,.wpbdp-form-field-association-category .wpbdp-form-field-radio-item.disabled{opacity:.65}.wpbdp-form-field-association-category select{width:100%}.wpbdp-form-field-association-category .select2{width:100%}.wpbdp-form-field-association-category .select2 .select2-selection{border-radius:0;padding-left:5px}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice{font-size:11px;padding:1px 6px;border-radius:3px;font-weight:normal;white-space:nowrap;vertical-align:baseline;border:none}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice .select2-selection__choice__remove{margin-right:5px}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice,.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-search--inline{margin:5px 5px 0 0}.wpbdp-form-field-association-category .select2 .select2-search .select2-search__field{font-size:11px}#wpbdp-listing-flagging-page textarea{width:90%;min-height:150px;margin-bottom:10px}.wpbdp-wp-theme-twentysixteen .wpbdp-listing .social-fields .social-field.linkedin{vertical-align:text-top}.wpbdp-wp-theme-twentyseventeen .single-featured-image-header{display:none}.wpbdp-wp-theme-twentyseventeen .wpbdp-listing .social-fields .twitter.twitter-handle{vertical-align:text-top;padding-top:1px}.wpbdp-wp-theme-twentynineteen .wpbdp-listing .social-fields .twitter.twitter-handle{vertical-align:text-top}.wpbdp-wp-theme-twentytwenty .wpbdp-main-links .wpbdp-button,.wpbdp-wp-theme-twentytwenty .box-col.submit-btn input,.wpbdp-wp-theme-twentytwenty .listing-actions{font-size:1.1rem}.wpbdp-wp-theme-twentytwenty .wpbdp-listing-excerpt{font-size:1.8rem}.wpbdp-wp-theme-twentytwenty .wpbdp-listing .social-fields .social-field.facebook,.wpbdp-wp-theme-twentytwenty .wpbdp-listing .social-fields .social-field.instagram{margin-top:-5px;vertical-align:top}@media screen and (max-width:560px){.wpbdp-show-on-mobile{display:inline !important}input[type="button"].wpbdp-hide-on-mobile{display:none}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar form.wpbdp-search-form{display:block;margin-left:0;margin-top:10px}.wpbdp-bar form.wpbdp-search-form #intextbox{margin-bottom:5px;padding:4px}.wpbdp-bar form.wpbdp-search-form input[type="text"]{padding:4px 0;margin:0 0 2px 0}.wpbdp-main-box .search-fields .box-row,.wpbdp-main-box .main-fields.box-row form{display:block}.wpbdp-main-box .submit-btn{width:100%}.wpbdp-main-links .button{width:100%}.wpbdp-listing.wpbdp-listing{font-size:90%}.wpbdp-listing.wpbdp-listing-excerpt .field-value>label{display:block}.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail,.wpbdp-listing.wpbdp-listing-single .listing-thumbnail{float:none;padding:5px}.wpbdp-listing.wpbdp-listing-excerpt .listing-details,.wpbdp-listing.wpbdp-listing-single .listing-details{margin:0 5px;float:none;display:block}.wpbdp-listing .listing-actions input{font-size:70%}.wpbdp-listing .listing-actions input.back-to-dir{float:right}.wpbdp-listing.wpbdp-listing-single .main-image{display:block;float:none;padding:0;margin:0 0 10px 0;text-align:center;max-width:90%}.wpbdp-listing.wpbdp-listing-single .field-value>label{display:block}.wpbdp-submit-page.step-images #image-upload-dnd-area{font-size:90%;float:none !important;width:100% !important}.wpbdp-submit-page.step-images .dnd-area-inside-error{margin-top:30px}.wpbdp-submit-page.step-images #image-upload-conditions{width:100% !important;float:none !important;font-size:90%}.wpbdp-submit-page.step-images #image-upload-conditions dl{margin:0;padding:0}.wpbdp-submit-page.step-images #image-upload-conditions dl dt{margin:0;margin-right:5px;padding:0;float:left}.wpbdp-submit-page.step-images #image-upload-conditions dl dd{margin:0;padding:0;display:block}.wpbdp-submit-page.step-images .wpbdp-image img{max-width:50%}}
|
1 |
+
.wpbdp-tag{background:#444;border-radius:2px;padding:2px 5px;color:#fff;font-size:10px !important;margin-right:2px;text-decoration:none !important;line-height:1.5 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.wpbdp-display-block{display:block}.wpbdp-smaller{font-size:90%}.wpbdp-no-bold{font-weight:normal}.wpbdp-wait{margin:20px;width:20px;height:20px;position:relative;display:inline-block}.wpbdp-wait:before{content:'';display:inline-block;position:absolute;background:transparent;border:1px solid #fff;border-top-color:transparent;border-left-color:transparent;border-bottom-color:#607297;border-right-color:#607297;border-radius:50%;box-sizing:border-box;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;-o-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.wpbdp-wait.wpbdp_visible_spinner{margin-bottom:10px}.wpbdp-wait.wpbdp_visible_spinner .spinner{visibility:visible;float:none}.wpbdp-wp-theme-twentytwentyone .wpbdp-main-box .submit-btn input[type="submit"]{padding:16px 12px;font-size:14px}.wpbdp-wp-theme-twentytwentyone .wpbdp-main-box .box-col .distance-field input{min-width:70px}.wpbdp-wp-theme-twentytwentyone .wpbdp-main-box .box-col .unit-label{font-size:14px}.wpbdp-cf:before,.wpbdp-cf:after,.cf:before,.cf:after{content:" ";display:table}.wpbdp-cf:after,.cf:after{clear:both}form#wpbdmsearchform{padding:12px 0;text-align:center}form#wpbdmsearchform input{display:inline}form#wpbdmsearchform .wpbdmsearchbutton{margin-top:5px}form#wpbdmsearchform a.advanced-search-link{font-size:70%;display:block}#wpbdp-search-form{padding-left:10px}#wpbdp-search-form .wpbdp-search-filter{margin-bottom:10px;clear:both}#wpbdp-search-form .wpbdp-search-filter>.wpbdp-search-field-label{display:block;width:40%;float:left}#wpbdp-search-form .wpbdp-search-filter>div.field{display:block;width:60%;margin-left:40%;padding-left:5px}#wpbdp-search-form .wpbdp-search-filter>div.field>input[type="text"]{box-sizing:border-box;width:90%}#wpbdp-search-form .wpbdp-search-filter>div.field>select{box-sizing:border-box;width:90%}#wpbdp-search-form input[type="submit"]{float:none;margin:auto}.wpbdp-clearfix:after,.cf:before,.cf:after{content:" ";display:table}.wpbdp-clearfix:after,.cf:after{clear:both}.wpbdp-pagination{margin:25px 0 0 0}.wpbdp-pagination .next{float:right}.listing-actions form{margin:0;padding:0;display:inline}.listing-actions input{margin:0 0 5px;font-size:80%}.listing-actions .delete-listing,.listing-actions a.delete-listing{margin-left:20px;margin-right:30px;color:#d64226 !important;background-color:transparent;border:none}.listing-actions .back-to-dir{float:right}.listing-actions a.button{padding:5px 10px;font-size:11px;text-decoration:none;margin-right:3px}.wpbdp-listing .listing-details .field-value{margin-bottom:10px;width:100%;float:none}.wpbdmsingledetails .singledetailsview .field-value{margin-bottom:10px}.field-value label,.field-value .field-label{color:#444;font-weight:bold}.field-value .value{display:inline}.wpbdp-listing-excerpt{padding:10px}.wpbdp-listing-excerpt.sticky{background:#fff0cf;background:var(--bd-main-color-8)}.wpbdp-listing-excerpt .listing-thumbnail{float:right;margin:0 10px 0 0}.wpbdp-listing-excerpt .listing-actions{margin-top:15px}.wpbdp-listing-single .listing-actions{margin-bottom:25px}.wpbdp-listing-single.sticky{margin-top:30px}.wpbdp-listing-excerpt .stickytag,.wpbdp-listing-single .stickytag{float:right;margin-top:-20px}.wpbdp-listing-excerpt .stickytag img,.wpbdp-listing-single .stickytag img{border:0;box-shadow:none;background:transparent;max-height:102px}.wpbdp-listing-single .stickytag{position:absolute;bottom:0;right:0}.wpbdp-sticky-tag{background:var(--bd-main-color);color:#fff;padding:6px 15px;margin:0 15px;border-radius:4px;text-transform:uppercase;font-weight:600;vertical-align:text-bottom;display:inline-block;font-size:12px}.wpbdp-is-table .wpbdp-listing-excerpt>.wpbdp-sticky-tag{display:none !important}.wpbdp-listing-excerpt .wpbdp-sticky-tag{float:right;margin-top:10px;margin-right:0}.wpbdp-listing-excerpt.wpbdp-has-ribbon{position:relative;overflow:hidden}.wpbdp-listing-excerpt.wpbdp-has-ribbon .wpbdp-sticky-tag{transform:rotate(45deg);text-align:center;position:relative;top:7px;right:-50px;width:150px;margin:0 0 50px;border-radius:0}.wpbdp-listing-excerpt.wpbdp-has-ribbon .wpbdp-claim-listings{display:none}.wpbdp-listing-single .listing-title{margin-bottom:7px;position:relative}.wpbdp-listing-single .listing-title h1,.wpbdp-listing-single .listing-title h2,.wpbdp-listing-single .listing-title h3{display:inline-block}.wpbdp-listing-single .listing-title h2{clear:none;margin:0}.wpbdp-listing-single .main-image{float:right;margin-left:10px;padding:5px}.wpbdp-listing-single .main-image a{position:relative !important}.wpbdp-listing-single .main-image img{border:solid 1px #d2d2d2}.single-wpbdp_listing .extra-images,.wpbdp-listing-single .extra-images{margin-top:10px;clear:both}.single-wpbdp_listing .extra-images ul,.wpbdp-listing-single .extra-images ul{margin:0 auto;padding:0;width:100%}.single-wpbdp_listing .extra-images ul li,.wpbdp-listing-single .extra-images ul li{list-style-type:none;display:inline-block;margin-left:5px;margin-bottom:5px}.single-wpbdp_listing .extra-images ul li img,.wpbdp-listing-single .extra-images ul li img{display:inline;vertical-align:top;margin:0 auto;max-width:150px;border:solid 1px #d2d2d2}.single-wpbdp_listing .social-fields,.wpbdp-listing .social-fields{margin:20px 0;vertical-align:top}.social-field-link,.single-wpbdp_listing .social-field,.wpbdp-listing .social-field{display:inline-block;margin-right:10px;height:20px;vertical-align:text-top}.social-field-link iframe,.single-wpbdp_listing .social-field iframe,.wpbdp-listing .social-field iframe{margin-bottom:0}.social-field-link img,.single-wpbdp_listing .social-field img,.wpbdp-listing .social-field img{vertical-align:initial}.social-field-link .social-icon,.single-wpbdp_listing .social-field .social-icon,.wpbdp-listing .social-field .social-icon{display:inline-block;background-color:transparent;color:#1a1a1a}.social-field-link .social-text,.single-wpbdp_listing .social-field .social-text,.wpbdp-listing .social-field .social-text{font-size:90%}.social-field-link a,.single-wpbdp_listing .social-field a,.wpbdp-listing .social-field a{box-shadow:none}.social-field-link a img,.single-wpbdp_listing .social-field a img,.wpbdp-listing .social-field a img{height:20px;width:auto}.social-field-link a object,.single-wpbdp_listing .social-field a object,.wpbdp-listing .social-field a object{height:20px;margin-bottom:0}.social-field-link.icon_first .social-icon,.single-wpbdp_listing .social-field.icon_first .social-icon,.wpbdp-listing .social-field.icon_first .social-icon{margin-right:5px}.social-field-link.text_first .social-text,.single-wpbdp_listing .social-field.text_first .social-text,.wpbdp-listing .social-field.text_first .social-text{margin-right:5px}.wpbdp-listing-contact-form{margin-top:20px;padding-top:20px}.wpbdp-listing-contact-form #wpbdp-contact-form-recaptcha{margin-bottom:20px}.wpbdp-listing-contact-form textarea{width:100%}.wpbdp-listing .comments{margin-top:20px}.wpbdp-bar .wpbdp-search-form{margin:0;padding:0 !important;margin-left:50%}.wpbdp-main-links a{margin-right:15px}.wpbdp-bar .left{float:left;text-align:center}.wpbdp-bar .right{width:300px;float:right}.wpbdp-listings-sort-options{font-size:90%;margin:5px 0 10px}.wpbdp-listings-sort-options label{font-weight:normal}.wpbdp-listings-sort-options select{margin:0 4px}#wpbdp-categories{clear:both}.wpbdp-categories{margin:0;padding-left:20px}.wpbdp-categories .cat-item{box-sizing:border-box;float:left;margin:0 0 20px;width:50%}.wpbdp-categories .cat-item:nth-child(2n+1){clear:left}.wpbdp-categories .cat-item .cat-item{margin:0;width:100%}.wpbdp-categories-tiny .cat-item{float:none;width:100%}.wpbdp-categories-tiny .cat-item:nth-child(2n+1){clear:none}#wpbdp-checkout-form-fields,.wpbdp-form-field{margin:14px 0}#wpbdp-checkout-form-fields label,.wpbdp-form-field label{font-weight:500}#wpbdp-checkout-form-fields label .wpbdp-form-field-required-indicator,.wpbdp-form-field label .wpbdp-form-field-required-indicator{margin-left:3px;font-size:90%}#wpbdp-checkout-form-fields.wpbdp-form-field-has-description .wpbdp-form-field-label,.wpbdp-form-field.wpbdp-form-field-has-description .wpbdp-form-field-label{margin-bottom:0}#wpbdp-checkout-form-fields.wpbdp-form-field-has-description .wpbdp-form-field-description,.wpbdp-form-field.wpbdp-form-field-has-description .wpbdp-form-field-description{margin-bottom:3px}#wpbdp-checkout-form-fields .wpbdp-description,.wpbdp-form-field .wpbdp-description,#wpbdp-checkout-form-fields .wpbdp-form-field-description,.wpbdp-form-field .wpbdp-form-field-description{opacity:.8;font-size:14px;display:block}#wpbdp-checkout-form-fields .wpbdp-form-field-inner,.wpbdp-form-field .wpbdp-form-field-inner{padding-left:6px}#wpbdp-checkout-form-fields textarea,.wpbdp-form-field textarea,#wpbdp-checkout-form-fields input[type="text"],.wpbdp-form-field input[type="text"],#wpbdp-checkout-form-fields input[type="tel"],.wpbdp-form-field input[type="tel"],#wpbdp-checkout-form-fields select,.wpbdp-form-field select{width:100%;box-sizing:border-box}#wpbdp-checkout-form-fields .field-description,.wpbdp-form-field .field-description{font-size:90%;color:#696969;float:right}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview{margin-bottom:20px}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview img,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview img{display:inline}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview a.delete,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview a.delete{color:#900000;margin-left:20px;display:none;vertical-align:top}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .preview:hover a.delete,.wpbdp-form-field.wpbdp-form-field-type-social-network .preview:hover a.delete{display:inline}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network input[type="text"],.wpbdp-form-field.wpbdp-form-field-type-social-network input[type="text"]{width:100%}#wpbdp-checkout-form-fields.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel,.wpbdp-form-field.wpbdp-form-field-type-social-network .wpbdp-social-type-field .sublabel{display:block}.wpbdp-form-field-validation-error-wrapper{margin:24px 0}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors{font-size:80%;color:#d64226;position:relative;background:#fff;border:1px solid #d64226;border-radius:4px;padding:4px 6px;margin:0 12px 3px 6px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:after,.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:before{top:100%;left:12px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:after{border-color:rgba(255,255,255,0);border-top-color:#fff;border-width:4px;margin-left:-4px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field-validation-errors:before{border-color:rgba(214,66,38,0);border-top-color:#d64226;border-width:5px;margin-left:-5px}.wpbdp-form-field-validation-error-wrapper .wpbdp-form-field{margin:0}.wpbdp-form-field-validation-error-wrapper+label{color:#d64226}.wpbdp-checkout-section{margin:0 0 1.5em 0;padding:.7em 1.2em;border:solid 1px #efefef}.wpbdp-checkout-section.wpbdp-checkout-errors{padding:0;border:none}.wpbdp-checkout-section h3{margin:0 0 1em 0;padding:0}.wpbdp-checkout-gateway-selection label{margin:0 10px 0 0}.wpbdp-checkout-gateway-selection label:last-child{margin-right:0}.wpbdp-checkout-gateway-selection label input,.wpbdp-checkout-gateway-selection label img{vertical-align:middle}.wpbdp-checkout-gateway-selection label img{margin-bottom:10px}.wpbdp-billing-detail-field{margin:0 0 1.5em 0;font-size:95%}.wpbdp-billing-detail-field.wpbdp-required label:after{content:' *';color:#d64226}.wpbdp-exp-field select{width:auto}.wpbdp-exp-slash{padding:0 5px}.wpbdp-payment-receipt{border:1px solid #d2d2d2;padding:1em 1.5em;margin:1.5em 0;font-size:90%}.wpbdp-payment-receipt h4{margin:0;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-date{color:#666}.wpbdp-payment-receipt .wpbdp-payment-status{float:right}.wpbdp-payment-receipt .wpbdp-payment-receipt-details{margin:1.5em .5em}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl{margin:0;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl dt{margin:0;padding:0;float:left;min-width:50%}.wpbdp-payment-receipt .wpbdp-payment-receipt-details dl dd{margin:0 0 5px 50%;padding:0}.wpbdp-payment-receipt .wpbdp-payment-receipt-print{margin:1.5em 0 0 0}.wpbdp-checkout-invoice table.wpbdp-payment-items-table th,.wpbdp-checkout-invoice table.wpbdp-payment-items-table td{font-size:95%}.wpbdp-checkout-invoice table.wpbdp-payment-items-table tr.item td:first-of-type{width:80%}.wpbdp-checkout-invoice table.wpbdp-payment-items-table .item-fee-description{margin-left:10px;font-size:85%;max-width:90%}.wpbdp-grid{display:grid;grid-template-columns:repeat(12, 1fr);grid-auto-rows:max-content;grid-gap:20px 4%}.wpbdp-grid>*{grid-column:span 12 / span 12}.wpbdp6,.wpbdp-half{grid-column:span 6 / span 6}.wpbdp4{grid-column:span 4 / span 4}.wpbdp8{grid-column:span 8 / span 8}.wpbdp3{grid-column:span 3 / span 3}.wpbdp9{grid-column:span 9 / span 9}.wpbdp2{grid-column:span 2 / span 2}.wpbdp10{grid-column:span 10 / span 10}.wpbdp1{grid-column:span 1 / span 1}.wpbdp5{grid-column:span 5 / span 5}.wpbdp7{grid-column:span 7 / span 7}.wpbdp11{grid-column:span 11 / span 11}.wpbdp12,.wpbdp-full{width:100% !important;grid-column:span 12 / span 12;box-sizing:border-box}.wpbdp_first{grid-column-start:1}.wpbdp_last{grid-column-end:-1;grid-row-start:span 100;justify-content:end}@media only screen and (max-width:710px){.wpbdp-grid>.wpbdp-listing{grid-column:1 / span 12 !important}}@media only screen and (max-width:600px){.wpbdp-grid>.wpbdp-form-field{grid-column:1 / span 12 !important}}.wpbdp-submit-rootline{margin:30px auto;text-align:center;display:flex}.wpbdp-rootline-section{align-items:center;width:100%}.wpbdp-rootline-section:not(.wpbdp-submit-section-current).wpbdp-submit-checked .wpbdp-rootline-counter span{display:none}.wpbdp-rootline-section:last-of-type .wpbdp-rootline-bar{background-image:none}.wpbdp-rootline-section-name{margin:10px auto 0;font-size:12px;text-transform:uppercase;opacity:.6}.wpbdp-rootline-bar{background-image:linear-gradient(to left, rgba(255,255,255,0) 50%, #569AF6 50%);background-image:linear-gradient(to left, rgba(255,255,255,0) 50%, var(--bd-main-color) 50%);background-position:bottom;background-size:10px;background-repeat:repeat-x;position:relative;height:1px;width:calc(100% - 48px);top:24px;margin-left:calc(50% + 25px)}.wpbdp-rootline-circle{display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:48px;border:1px solid #569AF6;border-color:var(--bd-main-color);z-index:1}.wpbdp-rootline-circle svg{fill:none}.wpbdp-submit-checked .wpbdp-rootline-circle{background:#569AF6;background:var(--bd-main-color)}.wpbdp-rootline-counter{font-weight:bold;font-size:20px}.wpbdp-submit-checked .wpbdp-rootline-section-name{opacity:1}.wpbdp-submit-checked.wpbdp-submit-section-current svg{display:none}.wpbdp-submit-checked .wpbdp-rootline-circle{color:#fff}#wpbdp-submit-listing.wpbdp-submit-page{margin:auto}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section{margin:10px 0 0 0;display:block}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .collapse-indicator.expanded{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .collapse-indicator.collapsed{display:inline}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.collapsed .wpbdp-submit-listing-section-content{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section.hidden{display:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-content h4{margin:0 0 10px 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-form-actions{margin:10px 0;text-align:center}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-form-actions button{margin:15px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-messages{margin:0 0 12px 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-plan-selection-with-tip{margin:24px 0 0 0}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection ul.category-list{margin:0;padding:0;list-style-type:none}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection ul.category-list li{font-size:10px;margin:0 5px 0 0;padding:1px 6px;border-radius:3px;background:#569AF6;background:var(--bd-main-color);color:#fff;font-weight:700;text-align:center;white-space:nowrap;vertical-align:baseline;border:none;display:inline}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-plan_selection .wpbdp_continue_to_fields_action{text-align:right}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-editor-area{height:422px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-listing_fields .wpbdp-submit-listing-form-actions{display:block}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-submit-listing-section-listing_fields.has-error .wpbdp-form-field-label{position:relative}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-inner{padding:0;width:100%}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-type-select:not(.wpbdp-form-field-association-category).wpbdp-form-field-association-region.wpbdp-regions-hidden{display:none;visibility:hidden}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-upload-widget{max-height:50px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-label .wpbdp-form-field-validation-error-wrapper{visibility:hidden;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:40%;left:-10px}#wpbdp-submit-listing.wpbdp-submit-page .wpbdp-form-field-label:hover .wpbdp-form-field-validation-error-wrapper{visibility:visible}textarea.wpbdp-submit-listing-tos{min-height:100px}#change-plan-link{text-align:right;font-size:90%}#wpbdp-submit-listing-account-details{margin:10px 0 0 0}#wpbdp-submit-listing-account-details input[type="password"]{width:70%;display:inline-block}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter{float:right;width:20%;padding:4px;text-align:center;border:1px solid}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-0{background-color:#f1adad;border-color:#e35b5b}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-2{background-color:#fbc5a9;border-color:#f78b53}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-3{background-color:#ffe399;border-color:#ffc733}#wpbdp-submit-listing-account-details .wpbdp-password-strength-meter.strength-4{background-color:#c1e1b9;border-color:#83c373}@media only screen and (max-width:450px){.wpbdp-form-field.wpbdp-form-field-type-url .wpbdp-url-field-col{grid-column:span 12 / span 12}.wpbdp-submit-rootline .wpbdp-rootline-section:not(.wpbdp-submit-section-current),.wpbdp-submit-rootline .wpbdp-rootline-section .wpbdp-rootline-bar{display:none}.wpbdp-submit-rootline .wpbdp-rootline-section.wpbdp-submit-checked .wpbdp-rootline-circle .wpbdp-rootline-checkmark{display:none}.wpbdp-submit-rootline .wpbdp-rootline-section.wpbdp-submit-checked .wpbdp-rootline-circle .wpbdp-rootline-counter span{display:initial}}.wpbdp-form-field-type-image #image-upload-form,.wpbdp-submit-listing-section-listing_images #image-upload-form{margin:15px 10px}.wpbdp-form-field-type-image #wpbdp-uploaded-images,.wpbdp-submit-listing-section-listing_images #wpbdp-uploaded-images{margin:0 0 20px 0}.wpbdp-form-field-type-image .wpbdp-image,.wpbdp-submit-listing-section-listing_images .wpbdp-image{padding:10px 0;border-bottom:1px solid #d2d2d2;display:flex;align-items:center}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-img,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-img{margin:0 10px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-img img,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-img img{object-fit:cover;width:50px;height:50px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp_thumbnail_indicator,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp_thumbnail_indicator{font-size:.8em;display:none}.wpbdp-form-field-type-image .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator,.wpbdp-submit-listing-section-listing_images .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator{display:inline-block}.wpbdp-form-field-type-image .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator::before,.wpbdp-submit-listing-section-listing_images .wpbdp-image:first-of-type .wpbdp_thumbnail_indicator::before{content:"✓"}.wpbdp-form-field-type-image .wpbdp-image:last-of-type,.wpbdp-submit-listing-section-listing_images .wpbdp-image:last-of-type{border:none}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-extra,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-extra{flex:1 0 auto}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-extra input[type="text"],.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-extra input[type="text"]{width:60%}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-delete-link,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-delete-link{font-size:12px;text-decoration:none;color:#900000;display:none;margin-left:10px}.wpbdp-form-field-type-image .wpbdp-image .wpbdp-image-delete-link:hover,.wpbdp-submit-listing-section-listing_images .wpbdp-image .wpbdp-image-delete-link:hover{text-decoration:underline}.wpbdp-form-field-type-image .wpbdp-image:hover .wpbdp-image-delete-link,.wpbdp-submit-listing-section-listing_images .wpbdp-image:hover .wpbdp-image-delete-link{display:inline}.wpbdp-form-field-type-image .wpbdp-drag-handle,.wpbdp-submit-listing-section-listing_images .wpbdp-drag-handle{visibility:hidden}.wpbdp-form-field-type-image:hover .wpbdp-drag-handle,.wpbdp-submit-listing-section-listing_images:hover .wpbdp-drag-handle{visibility:visible}.wpbdp-form-field-type-image .wpbdp-image-draggable-highlight,.wpbdp-submit-listing-section-listing_images .wpbdp-image-draggable-highlight{width:160px;height:160px;margin:0 10px;background:red;float:left}.wpbdp-form-field-type-image #image-upload-form-no-js,.wpbdp-submit-listing-section-listing_images #image-upload-form-no-js{width:0;height:0;overflow:hidden;visibility:hidden}.wpbdp-form-field-type-image .wpbdp-image{border:none}.wpbdp-submit-listing-section h3,.wpbdp-submit-listing-section .wpbdp-recaptcha{margin-top:40px}.wpbdp-submit-listing-section-header{display:none}.wpbdp-with-button-styles .submit-back-button.wpbdp-button{background:transparent !important;border:1px solid #569AF6;border-color:var(--bd-main-color);color:#569AF6;color:var(--bd-main-color) !important}.wpbdp-with-button-styles .submit-back-button.wpbdp-button:hover{background:#569AF6;background:var(--bd-main-color) !important;color:#fff !important}.wpbdp-with-button-styles .select2-container .select2-selection{border-color:#d2d2d2}.wpbdp-with-button-styles .select2-container .select2-results__option--highlighted[data-selected]{background-color:var(--bd-main-color)}#wpbdp-login-view .wpbdp-login-options{margin:30px 0 0 0;box-sizing:border-box}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option{width:50%;float:left;box-sizing:border-box}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option:first-child{padding:0 20px 0 0}#wpbdp-login-view .wpbdp-login-options.options-2 .wpbdp-login-option:last-child{border-left:1px solid #d2d2d2;padding:0 0 0 20px}#wpbdp-login-view #loginform #user_login,#wpbdp-login-view #loginform #user_pass{display:block}#wpbdp-login-view h4{font-size:21px;margin-top:0}#wpbdp-login-view .access-key-message{font-size:13px}#wpbdp-login-view input[type=text],#wpbdp-login-view input[type=password]{width:100%}.wpbdp-wp-theme-twentyseventeen #wpbdp-login-access-key-form input[type=submit]{margin-top:49px}.wpbdp-wp-theme-twentyseventeen #wpbdp-login-form h4{margin-bottom:74px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view h4{font-size:24px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view .access-key-message{font-size:16px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view #wpbdp-login-access-key-form input[type=submit]{margin-top:60px}.wpbdp-wp-theme-twentynineteen #wpbdp-login-view #wpbdp-login-form h4{margin-bottom:72px}.wpbdp-wp-theme-twentytwenty #wpbdp-login-access-key-form input[type=submit]{margin-top:44px}.wpbdp-wp-theme-twentytwenty #wpbdp-login-form h4{margin-bottom:57px}.wpbdp-msg{padding:10px 12px;margin:5px 0;background:#FEF7D3;border:1px solid rgba(63,75,91,0.2);box-sizing:border-box;border-radius:4px;font-size:14px;color:rgba(63,75,91,0.6)}.wpbdp-msg ul{margin:0}.wpbdp-msg ul li{list-style-position:inside}.wpbdp-msg.error,.wpbdp-msg.wpbdp-error{color:#fff;background:#d64226}.wpbdp-submit-page table.fee-options{width:100%}.wpbdp-submit-page table.fee-options th,.wpbdp-submit-page table.fee-options td{text-align:center}.wpbdp-submit-page table.fee-options td.fee-label,.wpbdp-submit-page table.fee-options tr.fee-description td{text-align:left}.wpbdp-submit-page table.fee-options .fee-selection{width:5%}.wpbdp-submit-page table.fee-options tr.fee-option td.fee-label{font-weight:bold}.wpbdp-submit-page table.fee-options td.fee-description{font-size:90%;color:#666}#wpbdp-renewal-page .do-not-renew-listing{padding:15px 10px 10px;border-radius:2px;background-color:var(--bd-main-color-8)}#wpbdp-renewal-page .do-not-renew-listing p:last-child{margin-bottom:0}#wpbdp-renewal-page .do-not-renew-listing input[type="submit"]{background:#d64226}.wpbdp-recaptcha-error{color:#d64226}#wpbdp-delete-listing-page form.confirm-form{margin-top:30px}#wpbdp-delete-listing-page input.delete-listing-confirm{margin-right:20px;background:#d64226}.wpbdp-scroll-box{padding:10px;margin:30px 0;border:1px solid #d2d2d2;max-height:250px;overflow:auto}.wpbdp-checkout input[type="image"]{padding:0;border:none;box-shadow:none;width:auto}table#wpbdp-manage-recurring th.listing-title,table#wpbdp-manage-recurring td.listing-title{min-width:200px}table#wpbdp-manage-recurring a.cancel-subscription{color:#d64226}#wpbdp-manage-recurring-cancel dl dd{margin-left:10px}.wpbdp-cancel-subscription-form{padding:15px 10px 10px;border-radius:2px;background-color:var(--bd-main-color-8)}.wpbdp-cancel-subscription-form p:last-child{margin-bottom:0}.wpbdp-cancel-subscription-form input.button-primary[type="submit"]{background-color:#d64226}.wpbdp-cc-form{padding:0;width:90%}.wpbdp-cc-form h4{margin:0}.wpbdp-cc-field input{width:auto}.wpbdp-cc-field label{display:block;font-weight:bold;text-align:right;padding-right:10px}#wpbdp-billing-information .billing-info-section h4{margin:10px 0 5px 0}#wpbdp-billing-information .billing-info-section table{margin:1.75em 0}#wpbdp-billing-information #wpbdp-billing-field-exp,#wpbdp-billing-information #wpbdp-billing-field-exp-year{width:40%;display:inline}#wpbdp-billing-information .form-buttons{margin:15px 0}a.wpbdp-show-on-mobile,input[type="button"].wpbdp-show-on-mobile,.wpbdp-show-on-mobile{display:none}body.business-directory #TB_ImageOff .screen-reader-text,body.business-directory #TB_closeWindowButton .screen-reader-text{visibility:hidden}body.business-directory #TB_next{float:right}body.business-directory #TB_prev{float:left}body.business-directory #TB_caption{text-align:center;width:70%;height:auto}body.business-directory #TB_closeWindow{padding:0;height:0}body.business-directory #TB_closeWindow .screen-reader-text{display:none}body.business-directory #TB_secondLine{font-size:11px;color:#666}.wpbdp-form-row label{display:block}.wpbdp-form-row.wpbdp-form-textfield input[type="text"]{width:400px}.wpbdp-main-box,.wpbdp-main-box .box-row,.wpbdp-main-box .box-col{box-sizing:border-box;width:100%}.wpbdp-main-box{margin:10px 0 20px 0}.wpbdp-main-box .box-col{margin-bottom:4px}.wpbdp-main-box .box-col input{width:100%;min-width:150px}.distance-field-wrapper .box-row{display:flex;align-items:center}.wpbdp-main-box .submit-btn input[type="submit"]{margin-top:0}.wpbdp-main-box .advanced-search-link{border:none;box-shadow:none;display:block;font-size:11px;text-align:right;text-decoration:none}.wpbdp-main-box .search-fields .box-row,.wpbdp-main-box .main-fields.box-row form{width:100%;display:flex;gap:5px}.wpbdp-main-box .submit-btn{width:22%;min-width:150px}.wpbdp-main-box-tiny .submit-btn,.wpbdp-main-box-small .submit-btn{width:100%}.wpbdp-main-box-tiny .search-fields .box-row,.wpbdp-main-box-tiny .main-fields.box-row form,.wpbdp-main-box-small .search-fields .box-row,.wpbdp-main-box-small .main-fields.box-row form{display:block}.wpbdp-main-links{text-align:right}a.wpbdp-button{white-space:nowrap}.wpbdp-main-links .button,.wpbdp-main-links-large .button{margin:0 3px 6px;font-size:15px;display:inline-block}.wpbdp-main-links .button:first-child{margin-left:0}.wpbdp-main-links .button:last-child{margin-right:0}.wpbdp-main-links-tiny .wpbdp-main-links .button{padding-top:10px;padding-bottom:10px;width:100%;margin:0 0 4px}.wpbdp-main-links-small .button{width:100%;margin:0 0 4px;text-align:center}.wpbdp-main-links-small .wpbdp-main-links-2-buttons .button{width:49%}.wpbdp-main-links-small .wpbdp-main-links-2-buttons .button:first-child{margin-right:1%}.wpbdp-with-button-styles .wpbdp-checkout-submit input[type=submit],.wpbdp-with-button-styles .wpbdp-ratings-reviews input[type=submit],.wpbdp-with-button-styles .wpbdp-main-box input[type=submit],.wpbdp-with-button-styles .listing-actions a.wpbdp-button,.wpbdp-with-button-styles .wpbdp-button{background:#569AF6;background:var(--bd-main-color) !important;border:1px solid #569AF6;border-color:var(--bd-main-color)}.wpbdp-with-button-styles .wpbdp-checkout-submit input[type=submit]:hover,.wpbdp-with-button-styles .wpbdp-ratings-reviews input[type=submit]:hover,.wpbdp-with-button-styles .wpbdp-main-box input[type=submit]:hover,.wpbdp-with-button-styles .listing-actions a.wpbdp-button:hover,.wpbdp-with-button-styles .wpbdp-button:hover{opacity:.8;background:var(--bd-main-color)}.wpbdp-with-button-styles .wpbdp-main-links-tiny .wpbdp-main-links .button{padding-top:10px;padding-bottom:10px}.wpbdp-with-button-styles .wpbdp-main-links-small .button{padding-top:10px;padding-bottom:10px}.wpbdp-with-button-styles .wpbdp-main-links-medium .wpbdp-main-links .button{padding-top:8px;padding-bottom:8px}.single-wpbdp_listing .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-show_category .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-show_tag .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-search .wpbdp-view-content-wrapper header.entry-header,.wpbdp-view-submit_listing .wpbdp-view-content-wrapper header.entry-header{display:none}.wpbdp-wp-theme-graphene.single-wpbdp_listing h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-show_category h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-show_tag h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-search h1.post-title,.wpbdp-wp-theme-graphene.wpbdp-view-submit_listing h1.post-title{display:none}.wpbdp-wp-theme-genesis.wpbdp-view-show_category .archive-description,.wpbdp-wp-theme-genesis.wpbdp-view-show_tag .archive-description{display:none}.wpbdp-wp-theme-hmtpro5.wpbdp-view-show_category .post-details,.wpbdp-wp-theme-hmtpro5.wpbdp-view-show_tag .post-details{display:none}.wpbdp-wp-theme-atahualpa.wpbdp-view-show_category .post-footer,.wpbdp-wp-theme-atahualpa.wpbdp-view-show_tag .post-footer,.wpbdp-wp-theme-atahualpa.wpbdp-view-show_listing .post-footer{display:none}.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_category .entry-content .featured-image,.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_tag .entry-content .featured-image,.wpbdp-wp-theme-ultimate-silostorm-pro.wpbdp-view-show_listing .entry-content .featured-image{display:none}.wpbdp-plan-info-box{padding:10px;margin:0 0 6px 0;border:1px solid #d2d2d2;border-radius:2px;display:flex;align-items:center;flex-wrap:wrap}.wpbdp-plan-info-box .wpbdp-plan-details,.wpbdp-plan-info-box .wpbdp-plan-price{float:left;box-sizing:border-box}.wpbdp-plan-info-box .wpbdp-plan-details{width:55%;padding:0 10px}.wpbdp-plan-info-box .wpbdp-plan-price{width:40%;text-align:center}.wpbdp-plan-info-box .wpbdp-plan-price label{cursor:pointer;margin-top:15px;font-size:20px;display:block;padding:6px 12px}.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]{display:none}.wpbdp-plan-info-box .wpbdp-plan-description{margin:0 0 10px 0}.wpbdp-plan-info-box .wpbdp-plan-price-amount,.wpbdp-plan-info-box .wpbdp-plan-label{font-size:1.1em;font-weight:bold;margin-bottom:10px}.wpbdp-plan-info-box .wpbdp-plan-feature-list{margin:0 0 0 10px}.wpbdp-plan-info-box .wpbdp-plan-details p{margin:0}.wpbdp-plan-info-box .wpbdp-plan-feature-list li{list-style-position:inside;margin:0}.wpbdp-plan-info-box .wpbdp-plan-disabled-msg{clear:both}.wpbdp-plan-info-box .wpbdp-plan-private-msg{width:100%;display:inline-block;text-align:right}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-details,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-price{width:100%}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration-amount,.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-duration-period{display:inline}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-details{padding:0 0 4pt}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-label{font-size:1.5em;margin-bottom:5px}.wpbdp-plan-selection-wrapper.wpbdp-size-tiny .wpbdp-plan-description{margin-bottom:5px}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+label{background:transparent !important;border:1px solid #569AF6;border-color:var(--bd-main-color);color:#569AF6;color:var(--bd-main-color) !important}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+label:hover{background:#569AF6;background:var(--bd-main-color) !important;color:#fff !important}.wpbdp-with-button-styles .wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]:checked+label{color:#fff !important;background:var(--bd-main-color) !important}.wpbdp-dnd-area{margin:0 auto;border:1px solid #ddd;width:100%}.wpbdp-dnd-area.dragging{background:#efefef}.wpbdp-dnd-area p{margin:0;font-size:16px;line-height:24px}.wpbdp-dnd-area p.dnd-message{font-size:24px;line-height:24px}.wpbdp-dnd-area .dnd-area-inside{letter-spacing:1px;margin:54px auto 38px;text-align:center}.wpbdp-dnd-area .dnd-area-inside-working{text-align:center;margin:50px auto 38px}.wpbdp-dnd-area .dnd-area-inside-working span{font-weight:bold}.wpbdp-dnd-area .dnd-area-inside-error{color:#900000;text-align:center;margin:50px 25px}.wpbdp-dnd-area .upload-button{position:relative;overflow:hidden}.wpbdp-dnd-area .upload-button a{text-decoration:none}.wpbdp-dnd-area .upload-button a:hover{cursor:pointer}.wpbdp-dnd-area .upload-button input{margin:0;padding:0;position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:0;border:none !important;z-index:-1}.area-and-conditions #image-upload-dnd-area{box-sizing:border-box;background-color:rgba(86,154,246,0.08);background-color:var(--bd-main-color-8);border-color:var(--bd-main-color-20);border-radius:4px}.area-and-conditions #image-upload-dnd-area .dnd-buttons a{letter-spacing:initial}#image-upload-conditions{font-size:12px;margin-bottom:6px;opacity:.8}#image-slots-available{float:right}.wpbdp-drag-handle{width:6px;height:10px;display:inline-block;background:url('../../assets/images/drag-handle.png') 0 0;cursor:move;float:left;margin:5px 5px 0 0;vertical-align:middle}.wpbdp-help-tip{margin:10px 0}.wpbdp-help-tip .dashicons{vertical-align:middle}.wpbdp-help-tip .message{display:inline-block}.wpbdp-help-tip.small{font-size:12px}.wpbdp-help-tip.small .dashicons{font-size:15px;width:15px;height:15px}.wpbdp-hidden{display:none}.wpbdp-form-field-association-category .wpbdp-form-field-checkbox-item.disabled,.wpbdp-form-field-association-category .wpbdp-form-field-radio-item.disabled{opacity:.65}.wpbdp-form-field-association-category select{width:100%}.wpbdp-form-field-association-category .select2{width:100%}.wpbdp-form-field-association-category .select2 .select2-selection{border-radius:0;padding-left:5px}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice{font-size:11px;padding:1px 6px;border-radius:3px;font-weight:normal;white-space:nowrap;vertical-align:baseline;border:none}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice .select2-selection__choice__remove{margin-right:5px}.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-selection__choice,.wpbdp-form-field-association-category .select2 ul.select2-selection__rendered li.select2-search--inline{margin:5px 5px 0 0}.wpbdp-form-field-association-category .select2 .select2-search .select2-search__field{font-size:11px}#wpbdp-listing-flagging-page textarea{width:90%;min-height:150px;margin-bottom:10px}.wpbdp-wp-theme-twentysixteen .wpbdp-listing .social-fields .social-field.linkedin{vertical-align:text-top}.wpbdp-wp-theme-twentyseventeen .single-featured-image-header{display:none}.wpbdp-wp-theme-twentyseventeen .wpbdp-listing .social-fields .twitter.twitter-handle{vertical-align:text-top;padding-top:1px}.wpbdp-wp-theme-twentynineteen .wpbdp-listing .social-fields .twitter.twitter-handle{vertical-align:text-top}.wpbdp-wp-theme-twentytwenty .wpbdp-main-links .wpbdp-button,.wpbdp-wp-theme-twentytwenty .box-col.submit-btn input,.wpbdp-wp-theme-twentytwenty .listing-actions{font-size:1.1rem}.wpbdp-wp-theme-twentytwenty .wpbdp-listing-excerpt{font-size:1.8rem}.wpbdp-wp-theme-twentytwenty .wpbdp-listing .social-fields .social-field.facebook,.wpbdp-wp-theme-twentytwenty .wpbdp-listing .social-fields .social-field.instagram{margin-top:-5px;vertical-align:top}@media screen and (max-width:560px){.wpbdp-show-on-mobile{display:inline !important}input[type="button"].wpbdp-hide-on-mobile{display:none}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar form.wpbdp-search-form{display:block;margin-left:0;margin-top:10px}.wpbdp-bar form.wpbdp-search-form #intextbox{margin-bottom:5px;padding:4px}.wpbdp-bar form.wpbdp-search-form input[type="text"]{padding:4px 0;margin:0 0 2px 0}.wpbdp-main-box .search-fields .box-row,.wpbdp-main-box .main-fields.box-row form{display:block}.wpbdp-main-box .submit-btn{width:100%}.wpbdp-main-links .button{width:100%}.wpbdp-listing.wpbdp-listing{font-size:90%}.wpbdp-listing.wpbdp-listing-excerpt .field-value>label{display:block}.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail,.wpbdp-listing.wpbdp-listing-single .listing-thumbnail{float:none;padding:5px}.wpbdp-listing.wpbdp-listing-excerpt .listing-details,.wpbdp-listing.wpbdp-listing-single .listing-details{margin:0 5px;float:none;display:block}.wpbdp-listing .listing-actions input{font-size:70%}.wpbdp-listing .listing-actions input.back-to-dir{float:right}.wpbdp-listing.wpbdp-listing-single .main-image{display:block;float:none;padding:0;margin:0 0 10px 0;text-align:center;max-width:90%}.wpbdp-listing.wpbdp-listing-single .field-value>label{display:block}.wpbdp-submit-page.step-images #image-upload-dnd-area{font-size:90%;float:none !important;width:100% !important}.wpbdp-submit-page.step-images .dnd-area-inside-error{margin-top:30px}.wpbdp-submit-page.step-images #image-upload-conditions{width:100% !important;float:none !important;font-size:90%}.wpbdp-submit-page.step-images #image-upload-conditions dl{margin:0;padding:0}.wpbdp-submit-page.step-images #image-upload-conditions dl dt{margin:0;margin-right:5px;padding:0;float:left}.wpbdp-submit-page.step-images #image-upload-conditions dl dd{margin:0;padding:0;display:block}.wpbdp-submit-page.step-images .wpbdp-image img{max-width:50%}}
|
business-directory-plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Business Directory Plugin
|
4 |
* Plugin URI: https://businessdirectoryplugin.com
|
5 |
* Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
|
6 |
-
* Version: 5.14.
|
7 |
* Author: Business Directory Team
|
8 |
* Author URI: https://businessdirectoryplugin.com
|
9 |
* Text Domain: business-directory-plugin
|
3 |
* Plugin Name: Business Directory Plugin
|
4 |
* Plugin URI: https://businessdirectoryplugin.com
|
5 |
* Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
|
6 |
+
* Version: 5.14.3
|
7 |
* Author: Business Directory Team
|
8 |
* Author URI: https://businessdirectoryplugin.com
|
9 |
* Text Domain: business-directory-plugin
|
includes/abstracts/class-form-field-type.php
CHANGED
@@ -38,6 +38,7 @@ class WPBDP_Form_Field_Type {
|
|
38 |
|
39 |
/**
|
40 |
* Called after a field of this type is constructed.
|
|
|
41 |
* @param object $field
|
42 |
*/
|
43 |
public function setup_field( &$field ) {
|
@@ -46,6 +47,7 @@ class WPBDP_Form_Field_Type {
|
|
46 |
|
47 |
/**
|
48 |
* Called before field validation takes place.
|
|
|
49 |
* @since 3.6.5
|
50 |
*/
|
51 |
public function setup_validation( $field, $validator, $value ) {
|
@@ -54,13 +56,13 @@ class WPBDP_Form_Field_Type {
|
|
54 |
|
55 |
/**
|
56 |
* Called before the listing is to be saved.
|
|
|
57 |
* @since 5.0.5
|
58 |
*/
|
59 |
public function before_field_update( $field ) {
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
-
* TODO: dodoc.
|
64 |
* @since 3.4
|
65 |
*/
|
66 |
public function get_behavior_flags( &$field ) {
|
@@ -254,7 +256,7 @@ class WPBDP_Form_Field_Type {
|
|
254 |
'<label for="%s">%s</label>',
|
255 |
'wpbdp-field-' . esc_attr( $field->get_id() ),
|
256 |
wp_kses_post( apply_filters( 'wpbdp_render_field_label', $field->get_label(), $field ) ) .
|
257 |
-
( ( $field->has_validator( 'required' ) && 'widget' !== $render_context
|
258 |
);
|
259 |
|
260 |
$html .= '</div>';
|
@@ -352,6 +354,7 @@ class WPBDP_Form_Field_Type {
|
|
352 |
|
353 |
/**
|
354 |
* Called after a field of this type is deleted.
|
|
|
355 |
* @param object $field the deleted WPBDP_FormField object.
|
356 |
*/
|
357 |
public function cleanup( &$field ) {
|
@@ -363,6 +366,7 @@ class WPBDP_Form_Field_Type {
|
|
363 |
|
364 |
/**
|
365 |
* Returns an array of valid associations for this field type.
|
|
|
366 |
* @return array
|
367 |
*/
|
368 |
public function get_supported_associations() {
|
@@ -373,6 +377,7 @@ class WPBDP_Form_Field_Type {
|
|
373 |
* Renders the field-specific settings area for fields of this type.
|
374 |
* It is recommended to use `render_admin_settings` here to keep an uniform look.
|
375 |
* `$_POST` values can be used here to populate things when needed.
|
|
|
376 |
* @param object $field might be NULL if field is new or the field that is being edited.
|
377 |
* @param string $association field association.
|
378 |
* @return string the HTML output.
|
@@ -384,6 +389,7 @@ class WPBDP_Form_Field_Type {
|
|
384 |
/**
|
385 |
* Called when saving fields of this type.
|
386 |
* It should be used by field types to store any field type specific configuration.
|
|
|
387 |
* @param object $field the field being saved.
|
388 |
* @return mixed WP_Error in case of error, anything else for success.
|
389 |
*/
|
38 |
|
39 |
/**
|
40 |
* Called after a field of this type is constructed.
|
41 |
+
*
|
42 |
* @param object $field
|
43 |
*/
|
44 |
public function setup_field( &$field ) {
|
47 |
|
48 |
/**
|
49 |
* Called before field validation takes place.
|
50 |
+
*
|
51 |
* @since 3.6.5
|
52 |
*/
|
53 |
public function setup_validation( $field, $validator, $value ) {
|
56 |
|
57 |
/**
|
58 |
* Called before the listing is to be saved.
|
59 |
+
*
|
60 |
* @since 5.0.5
|
61 |
*/
|
62 |
public function before_field_update( $field ) {
|
63 |
}
|
64 |
|
65 |
/**
|
|
|
66 |
* @since 3.4
|
67 |
*/
|
68 |
public function get_behavior_flags( &$field ) {
|
256 |
'<label for="%s">%s</label>',
|
257 |
'wpbdp-field-' . esc_attr( $field->get_id() ),
|
258 |
wp_kses_post( apply_filters( 'wpbdp_render_field_label', $field->get_label(), $field ) ) .
|
259 |
+
( ( $field->has_validator( 'required' ) && 'widget' !== $render_context ) ? '<span class="wpbdp-form-field-required-indicator">*</span>' : '' )
|
260 |
);
|
261 |
|
262 |
$html .= '</div>';
|
354 |
|
355 |
/**
|
356 |
* Called after a field of this type is deleted.
|
357 |
+
*
|
358 |
* @param object $field the deleted WPBDP_FormField object.
|
359 |
*/
|
360 |
public function cleanup( &$field ) {
|
366 |
|
367 |
/**
|
368 |
* Returns an array of valid associations for this field type.
|
369 |
+
*
|
370 |
* @return array
|
371 |
*/
|
372 |
public function get_supported_associations() {
|
377 |
* Renders the field-specific settings area for fields of this type.
|
378 |
* It is recommended to use `render_admin_settings` here to keep an uniform look.
|
379 |
* `$_POST` values can be used here to populate things when needed.
|
380 |
+
*
|
381 |
* @param object $field might be NULL if field is new or the field that is being edited.
|
382 |
* @param string $association field association.
|
383 |
* @return string the HTML output.
|
389 |
/**
|
390 |
* Called when saving fields of this type.
|
391 |
* It should be used by field types to store any field type specific configuration.
|
392 |
+
*
|
393 |
* @param object $field the field being saved.
|
394 |
* @return mixed WP_Error in case of error, anything else for success.
|
395 |
*/
|
includes/admin/admin-pages.php
CHANGED
@@ -55,7 +55,7 @@ function wpbdp_admin_header( $args_or_title = null, $id = null, $h2items = array
|
|
55 |
'echo' => false,
|
56 |
);
|
57 |
|
58 |
-
|
59 |
|
60 |
extract( $args );
|
61 |
|
@@ -71,7 +71,7 @@ function wpbdp_admin_header( $args_or_title = null, $id = null, $h2items = array
|
|
71 |
<?php WPBDP_App_Helper::show_logo( 55 ); ?>
|
72 |
<?php echo esc_html( $title ); ?>
|
73 |
|
74 |
-
|
75 |
<a href="<?php echo esc_url( $url ); ?>" class="add-new-h2">
|
76 |
<?php echo esc_html( $label ); ?>
|
77 |
</a>
|
55 |
'echo' => false,
|
56 |
);
|
57 |
|
58 |
+
$args = wp_parse_args( $args_or_title, $defaults );
|
59 |
|
60 |
extract( $args );
|
61 |
|
71 |
<?php WPBDP_App_Helper::show_logo( 55 ); ?>
|
72 |
<?php echo esc_html( $title ); ?>
|
73 |
|
74 |
+
<?php foreach ( $buttons as $label => $url ) : ?>
|
75 |
<a href="<?php echo esc_url( $url ); ?>" class="add-new-h2">
|
76 |
<?php echo esc_html( $label ); ?>
|
77 |
</a>
|
includes/admin/class-admin-csv.php
CHANGED
@@ -1,53 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
public function __construct() {
|
6 |
-
parent::__construct();
|
7 |
-
|
8 |
-
require_once WPBDP_INC . 'admin/csv-import.php';
|
9 |
-
$this->csv_import = new WPBDP_CSVImportAdmin();
|
10 |
-
|
11 |
-
require_once WPBDP_INC . 'admin/csv-export.php';
|
12 |
-
$this->csv_export = new WPBDP_Admin_CSVExport();
|
13 |
-
}
|
14 |
-
|
15 |
-
public function _dispatch() {
|
16 |
-
$tabs = array( 'csv_import', 'csv_export' );
|
17 |
-
|
18 |
-
$current_tab = wpbdp_get_var( array( 'param' => 'tab' ) );
|
19 |
-
if ( empty( $current_tab ) ) {
|
20 |
-
$current_tab = 'csv_import';
|
21 |
-
}
|
22 |
-
|
23 |
-
if ( ! in_array( $current_tab, $tabs ) ) {
|
24 |
-
wp_die();
|
25 |
-
}
|
26 |
-
|
27 |
-
ob_start();
|
28 |
-
call_user_func( array( $this->{$current_tab}, 'dispatch' ) );
|
29 |
-
$output = ob_get_clean();
|
30 |
-
|
31 |
-
echo wpbdp_admin_header();
|
32 |
-
echo wpbdp_admin_notices();
|
33 |
-
?>
|
34 |
-
|
35 |
-
<?php if ( 'csv_import' == $current_tab ) : ?>
|
36 |
-
<div class="wpbdp-csv-import-top-buttons">
|
37 |
-
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&action=example-csv' ) ); ?>" class="button"><?php _ex( 'See an example CSV import file', 'admin csv-import', 'business-directory-plugin' ); ?></a>
|
38 |
-
<a href="#help" class="button"><?php esc_html_e( 'Help', 'business-directory-plugin' ); ?></a>
|
39 |
-
</div>
|
40 |
-
<?php endif; ?>
|
41 |
-
|
42 |
-
|
43 |
-
<h2 class="nav-tab-wrapper">
|
44 |
-
<a class="nav-tab <?php echo 'csv_import' == $current_tab ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&tab=csv_import' ) ); ?>"><span class="dashicons dashicons-download"></span> <?php _ex( 'Import', 'admin csv', 'business-directory-plugin' ); ?></a>
|
45 |
-
<a class="nav-tab <?php echo 'csv_export' == $current_tab ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&tab=csv_export' ) ); ?>"><span class="dashicons dashicons-upload"></span> <?php _ex( 'Export', 'admin csv', 'business-directory-plugin' ); ?></a>
|
46 |
-
</h2>
|
47 |
-
<?php
|
48 |
-
echo $output;
|
49 |
-
echo wpbdp_admin_footer();
|
50 |
-
}
|
51 |
-
|
52 |
-
}
|
53 |
-
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/controllers/class-admin-csv.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/controllers/class-admin-csv.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/class-admin.php
CHANGED
@@ -17,7 +17,7 @@ require_once WPBDP_PATH . 'includes/admin/controllers/class-admin-controller.php
|
|
17 |
require_once WPBDP_PATH . 'includes/admin/tracking.php';
|
18 |
require_once WPBDP_PATH . 'includes/admin/class-listings-with-no-fee-plan-view.php';
|
19 |
require_once WPBDP_PATH . 'includes/admin/helpers/class-modules-list.php';
|
20 |
-
|
21 |
|
22 |
if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
23 |
|
@@ -44,6 +44,8 @@ if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
|
44 |
add_action( 'admin_init', array( $this, 'register_listings_views' ) );
|
45 |
|
46 |
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
|
|
|
|
47 |
add_action( 'admin_enqueue_scripts', array( $this, 'init_scripts' ) );
|
48 |
|
49 |
// Adds admin menus.
|
@@ -101,7 +103,7 @@ if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
|
101 |
$this->post_install_migration = new WPBDP__Manual_Upgrade__18_0__Featured_Levels();
|
102 |
}
|
103 |
|
104 |
-
require_once WPBDP_INC . 'admin/
|
105 |
$this->settings_admin = new WPBDP__Settings_Admin();
|
106 |
|
107 |
add_action( 'wpbdp_settings_subtab_uninstall', array( $this, 'uninstall_plugin' ) );
|
@@ -451,16 +453,18 @@ if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
|
451 |
|
452 |
$id = str_replace( array( 'wpbdp-admin-', 'wpbdp_admin_' ), '', $slug );
|
453 |
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
|
|
|
|
464 |
|
465 |
// Maybe loading one of the candidate files made the callback available.
|
466 |
if ( $callback && is_callable( $callback ) ) {
|
@@ -682,6 +686,8 @@ if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
|
682 |
$this->check_setup();
|
683 |
$this->check_deprecation_warnings();
|
684 |
|
|
|
|
|
685 |
do_action( 'wpbdp_admin_notices' );
|
686 |
|
687 |
foreach ( $this->messages as $msg ) {
|
@@ -1068,6 +1074,26 @@ if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
|
1068 |
$this->messages[] = array( $message, 'error' );
|
1069 |
}
|
1070 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
/**
|
1072 |
* @since 3.6.10
|
1073 |
*/
|
17 |
require_once WPBDP_PATH . 'includes/admin/tracking.php';
|
18 |
require_once WPBDP_PATH . 'includes/admin/class-listings-with-no-fee-plan-view.php';
|
19 |
require_once WPBDP_PATH . 'includes/admin/helpers/class-modules-list.php';
|
20 |
+
require_once WPBDP_PATH . 'includes/models/class-reviews.php';
|
21 |
|
22 |
if ( ! class_exists( 'WPBDP_Admin' ) ) {
|
23 |
|
44 |
add_action( 'admin_init', array( $this, 'register_listings_views' ) );
|
45 |
|
46 |
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
47 |
+
add_action( 'wp_ajax_wpbdp_dismiss_review', array( &$this, 'maybe_dismiss_review' ) );
|
48 |
+
|
49 |
add_action( 'admin_enqueue_scripts', array( $this, 'init_scripts' ) );
|
50 |
|
51 |
// Adds admin menus.
|
103 |
$this->post_install_migration = new WPBDP__Manual_Upgrade__18_0__Featured_Levels();
|
104 |
}
|
105 |
|
106 |
+
require_once WPBDP_INC . 'admin/controllers/class-settings-admin.php';
|
107 |
$this->settings_admin = new WPBDP__Settings_Admin();
|
108 |
|
109 |
add_action( 'wpbdp_settings_subtab_uninstall', array( $this, 'uninstall_plugin' ) );
|
453 |
|
454 |
$id = str_replace( array( 'wpbdp-admin-', 'wpbdp_admin_' ), '', $slug );
|
455 |
|
456 |
+
$candidates = array(
|
457 |
+
$item['file'],
|
458 |
+
WPBDP_INC . 'admin/controllers/class-admin-' . $id . '.php',
|
459 |
+
WPBDP_INC . 'admin/class-admin-' . $id . '.php',
|
460 |
+
WPBDP_INC . 'admin/' . $id . '.php',
|
461 |
+
);
|
462 |
+
foreach ( $candidates as $c ) {
|
463 |
+
if ( $c && file_exists( $c ) ) {
|
464 |
+
require_once $c;
|
465 |
+
break; // Prevent loading deprecated files and looping for the same file once its found.
|
466 |
+
}
|
467 |
+
}
|
468 |
|
469 |
// Maybe loading one of the candidate files made the callback available.
|
470 |
if ( $callback && is_callable( $callback ) ) {
|
686 |
$this->check_setup();
|
687 |
$this->check_deprecation_warnings();
|
688 |
|
689 |
+
$this->maybe_request_review();
|
690 |
+
|
691 |
do_action( 'wpbdp_admin_notices' );
|
692 |
|
693 |
foreach ( $this->messages as $msg ) {
|
1074 |
$this->messages[] = array( $message, 'error' );
|
1075 |
}
|
1076 |
|
1077 |
+
/**
|
1078 |
+
* Request review.
|
1079 |
+
*/
|
1080 |
+
private function maybe_request_review() {
|
1081 |
+
WPBDP_Reviews::instance()->review_request();
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
/**
|
1085 |
+
* Dismiss review.
|
1086 |
+
* Action is only valid for an admin.
|
1087 |
+
*/
|
1088 |
+
public function maybe_dismiss_review() {
|
1089 |
+
check_ajax_referer( 'wpbdp_dismiss_review', 'nonce' );
|
1090 |
+
if ( ! is_admin() ) {
|
1091 |
+
wp_die();
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
WPBDP_Reviews::instance()->dismiss_review();
|
1095 |
+
}
|
1096 |
+
|
1097 |
/**
|
1098 |
* @since 3.6.10
|
1099 |
*/
|
includes/admin/class-csv-exporter.php
CHANGED
@@ -1,454 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package Includes/Admin/CSV Exporter
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* CSV export.
|
10 |
-
*
|
11 |
-
* @since 3.2
|
12 |
-
*/
|
13 |
-
class WPBDP_CSVExporter {
|
14 |
-
|
15 |
-
const BATCH_SIZE = 20;
|
16 |
-
|
17 |
-
private $settings = array(
|
18 |
-
'target-os' => 'windows',
|
19 |
-
'csv-file-separator' => ',',
|
20 |
-
'images-separator' => ';',
|
21 |
-
'category-separator' => ';',
|
22 |
-
|
23 |
-
'test-import' => false,
|
24 |
-
'export-images' => false,
|
25 |
-
'include-users' => false,
|
26 |
-
|
27 |
-
'generate-sequence-ids' => false,
|
28 |
-
|
29 |
-
'listing_status' => 'all',
|
30 |
-
);
|
31 |
-
|
32 |
-
private $workingdir = '';
|
33 |
-
|
34 |
-
private $columns = array();
|
35 |
-
private $listings = array(); // Listing IDs to be exported.
|
36 |
-
private $exported = 0; // # of already exported listings.
|
37 |
-
private $images = array();
|
38 |
-
|
39 |
-
public function __construct( $settings, $workingdir = null, $listings = array() ) {
|
40 |
-
global $wpdb;
|
41 |
-
|
42 |
-
$this->settings = array_merge( $this->settings, $settings );
|
43 |
-
|
44 |
-
if ( ! in_array( $this->settings['target-os'], array( 'windows', 'macos' ), true ) ) {
|
45 |
-
$this->settings['target-os'] = 'windows';
|
46 |
-
}
|
47 |
-
|
48 |
-
if ( $this->settings['target-os'] === 'macos' ) {
|
49 |
-
$this->settings['csv-file-separator'] = "\t";
|
50 |
-
}
|
51 |
-
|
52 |
-
// Setup columns.
|
53 |
-
if ( $this->settings['generate-sequence-ids'] ) {
|
54 |
-
$this->columns['sequence_id'] = 'sequence_id';
|
55 |
-
}
|
56 |
-
|
57 |
-
$fields = wpbdp_get_form_fields( array( 'field_type' => '-ratings' ) );
|
58 |
-
foreach ( $fields as &$f ) {
|
59 |
-
$this->columns[ $f->get_short_name() ] = $f;
|
60 |
-
}
|
61 |
-
|
62 |
-
if ( $this->settings['export-images'] ) {
|
63 |
-
$this->columns['images'] = 'images';
|
64 |
-
}
|
65 |
-
|
66 |
-
if ( $this->settings['include-users'] ) {
|
67 |
-
$this->columns['username'] = 'username';
|
68 |
-
}
|
69 |
-
|
70 |
-
$this->columns['fee_id'] = 'fee_id';
|
71 |
-
|
72 |
-
if ( ! empty( $this->settings['include-tos-acceptance-date'] ) ) {
|
73 |
-
$this->columns['terms_and_conditions_acceptance_date'] = 'terms_and_conditions_acceptance_date';
|
74 |
-
}
|
75 |
-
|
76 |
-
if ( $this->settings['include-expiration-date'] ) {
|
77 |
-
$this->columns['expires_on'] = 'expires_on';
|
78 |
-
}
|
79 |
-
|
80 |
-
if ( ! empty( $this->settings['include-created-date'] ) ) {
|
81 |
-
$this->columns['created_date'] = 'created_date';
|
82 |
-
}
|
83 |
-
|
84 |
-
if ( ! empty( $this->settings['include-modified-date'] ) ) {
|
85 |
-
$this->columns['modified_date'] = 'modified_date';
|
86 |
-
}
|
87 |
-
|
88 |
-
// Setup working directory.
|
89 |
-
if ( ! $workingdir ) {
|
90 |
-
|
91 |
-
$upload_dir = wp_upload_dir();
|
92 |
-
$id = uniqid();
|
93 |
-
|
94 |
-
if ( ! $upload_dir['error'] ) {
|
95 |
-
|
96 |
-
$folder_name = 'wpbdp-csv-exports/' . $id;
|
97 |
-
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
98 |
-
$create_folder = new WPBDP_Create_File(
|
99 |
-
array(
|
100 |
-
'file_name' => 'index.php',
|
101 |
-
'folder_name' => $folder_name
|
102 |
-
)
|
103 |
-
);
|
104 |
-
$create_folder->create_index( 'force' );
|
105 |
-
|
106 |
-
$csvexportsdir = rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . '/' . $folder_name;
|
107 |
-
if ( is_dir( $csvexportsdir ) ) {
|
108 |
-
$this->workingdir = $csvexportsdir . '/';
|
109 |
-
} else {
|
110 |
-
$direrror = _x( 'Could not create a temporary directory for handling this CSV export.', 'admin csv-export', 'business-directory-plugin' );
|
111 |
-
throw new Exception( sprintf( _x( 'Error while creating a temporary directory for CSV export: %s', 'admin csv-export', 'business-directory-plugin' ), $direrror ) );
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
} else {
|
116 |
-
$this->workingdir = $workingdir;
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( $listings ) {
|
120 |
-
$this->listings = $listings;
|
121 |
-
} else {
|
122 |
-
switch ( $this->settings['listing_status'] ) {
|
123 |
-
case 'publish+draft':
|
124 |
-
$post_status = array( 'publish', 'draft', 'pending' );
|
125 |
-
break;
|
126 |
-
case 'publish':
|
127 |
-
$post_status = 'publish';
|
128 |
-
break;
|
129 |
-
case 'all':
|
130 |
-
default:
|
131 |
-
$post_status = array( 'publish', 'draft', 'pending', 'private', 'future', 'trash' );
|
132 |
-
break;
|
133 |
-
}
|
134 |
-
|
135 |
-
$this->listings = get_posts(
|
136 |
-
array(
|
137 |
-
'post_status' => $post_status,
|
138 |
-
'posts_per_page' => -1,
|
139 |
-
'post_type' => WPBDP_POST_TYPE,
|
140 |
-
'fields' => 'ids',
|
141 |
-
)
|
142 |
-
);
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
public static function &from_state( $state ) {
|
147 |
-
$export = new self( $state['settings'], trailingslashit( $state['workingdir'] ), (array) $state['listings'] );
|
148 |
-
$export->exported = abs( intval( $state['exported'] ) );
|
149 |
-
|
150 |
-
// Setup columns.
|
151 |
-
$shortnames = wpbdp_formfields_api()->get_short_names();
|
152 |
-
|
153 |
-
foreach ( $state['columns'] as $fshortname ) {
|
154 |
-
if ( in_array( $fshortname, array( 'images', 'username', 'expires_on', 'sequence_id', 'fee_id', 'created_date', 'modified_date', 'terms_and_conditions_acceptance_date' ) ) ) {
|
155 |
-
$export->columns[ $fshortname ] = $fshortname;
|
156 |
-
continue;
|
157 |
-
}
|
158 |
-
|
159 |
-
$field_id = array_search( $fshortname, $shortnames );
|
160 |
-
|
161 |
-
if ( $field_id === false ) {
|
162 |
-
throw new Exception( 'Invalid field shortname.' );
|
163 |
-
}
|
164 |
-
|
165 |
-
$export->columns[ $fshortname ] = wpbdp_get_form_field( $field_id );
|
166 |
-
}
|
167 |
-
|
168 |
-
return $export;
|
169 |
-
}
|
170 |
-
|
171 |
-
public function get_state() {
|
172 |
-
return array(
|
173 |
-
'settings' => $this->settings,
|
174 |
-
'columns' => array_keys( $this->columns ),
|
175 |
-
'workingdir' => $this->workingdir,
|
176 |
-
'listings' => $this->listings,
|
177 |
-
'exported' => $this->exported,
|
178 |
-
'filesize' => file_exists( $this->get_file_path() ) ? filesize( $this->get_file_path() ) : 0,
|
179 |
-
'done' => $this->is_done(),
|
180 |
-
);
|
181 |
-
}
|
182 |
-
|
183 |
-
public function cleanup() {
|
184 |
-
$upload_dir = wp_upload_dir();
|
185 |
-
|
186 |
-
WPBDP_FS::rmdir( $this->workingdir );
|
187 |
-
|
188 |
-
if ( ! $upload_dir['error'] ) {
|
189 |
-
$csvexportsdir = rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'wpbdp-csv-exports';
|
190 |
-
$contents = wpbdp_scandir( $csvexportsdir );
|
191 |
-
|
192 |
-
if ( ! $contents ) {
|
193 |
-
WPBDP_FS::rmdir( $csvexportsdir );
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
public function advance() {
|
199 |
-
if ( $this->is_done() ) {
|
200 |
-
return;
|
201 |
-
}
|
202 |
-
|
203 |
-
$csvfile = $this->get_csvfile( $this->workingdir . 'export.csv' );
|
204 |
-
|
205 |
-
// Write header as first line.
|
206 |
-
if ( $this->exported === 0 ) {
|
207 |
-
fwrite( $csvfile, $this->prepare_header( $this->header() ) );
|
208 |
-
}
|
209 |
-
|
210 |
-
$nextlistings = array_slice( $this->listings, $this->exported, self::BATCH_SIZE );
|
211 |
-
|
212 |
-
foreach ( $nextlistings as $listing_id ) {
|
213 |
-
if ( $data = $this->extract_data( $listing_id ) ) {
|
214 |
-
$content = implode( $this->settings['csv-file-separator'], $data );
|
215 |
-
fwrite( $csvfile, $this->prepare_content( $content ) );
|
216 |
-
}
|
217 |
-
|
218 |
-
$this->exported++;
|
219 |
-
}
|
220 |
-
|
221 |
-
fclose( $csvfile );
|
222 |
-
|
223 |
-
if ( $this->is_done() ) {
|
224 |
-
if ( file_exists( $this->workingdir . 'images.zip' ) ) {
|
225 |
-
@unlink( $this->workingdir . 'export.zip' );
|
226 |
-
$zip = $this->get_pclzip_instance( $this->workingdir . 'export.zip' );
|
227 |
-
|
228 |
-
$files = array();
|
229 |
-
$files[] = $this->workingdir . 'export.csv';
|
230 |
-
$files[] = $this->workingdir . 'images.zip';
|
231 |
-
|
232 |
-
$zip->create( implode( ',', $files ), PCLZIP_OPT_REMOVE_ALL_PATH );
|
233 |
-
|
234 |
-
@unlink( $this->workingdir . 'export.csv' );
|
235 |
-
@unlink( $this->workingdir . 'images.zip' );
|
236 |
-
}
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
protected function get_csvfile( $path ) {
|
241 |
-
return fopen( $path, 'a' );
|
242 |
-
}
|
243 |
-
|
244 |
-
protected function get_pclzip_instance( $path ) {
|
245 |
-
if ( ! class_exists( 'PclZip' ) ) {
|
246 |
-
define( 'PCLZIP_TEMPORARY_DIR', $this->workingdir );
|
247 |
-
require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
|
248 |
-
}
|
249 |
-
|
250 |
-
return new PclZip( $path );
|
251 |
-
}
|
252 |
-
public function is_done() {
|
253 |
-
return $this->exported == count( $this->listings );
|
254 |
-
}
|
255 |
-
|
256 |
-
private function prepare_header( $header ) {
|
257 |
-
if ( $this->settings['target-os'] === 'windows' ) {
|
258 |
-
$bom = "\xEF\xBB\xBF"; /* UTF-8 BOM */
|
259 |
-
} elseif ( $this->settings['target-os'] === 'macos' ) {
|
260 |
-
$bom = "\xFF\xFE"; /* UTF-16LE BOM */
|
261 |
-
}
|
262 |
-
|
263 |
-
return $bom . $this->prepare_content( $header );
|
264 |
-
}
|
265 |
-
|
266 |
-
private function prepare_content( $content ) {
|
267 |
-
if ( $this->settings['target-os'] === 'windows' ) {
|
268 |
-
$encoded_content = $content . "\n";
|
269 |
-
} elseif ( $this->settings['target-os'] === 'macos' ) {
|
270 |
-
$encoded_content = iconv( 'UTF-8', 'UTF-16LE', $content . "\n" );
|
271 |
-
}
|
272 |
-
|
273 |
-
return $encoded_content;
|
274 |
-
}
|
275 |
-
|
276 |
-
public function get_file_path() {
|
277 |
-
if ( file_exists( $this->workingdir . 'export.zip' ) ) {
|
278 |
-
return $this->workingdir . 'export.zip';
|
279 |
-
} else {
|
280 |
-
return $this->workingdir . 'export.csv';
|
281 |
-
}
|
282 |
-
}
|
283 |
-
|
284 |
-
public function get_file_url() {
|
285 |
-
$uploaddir = wp_upload_dir();
|
286 |
-
$urldir = trailingslashit( untrailingslashit( $uploaddir['baseurl'] ) . '/' . ltrim( str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $uploaddir['basedir'], '', $this->workingdir ) ), '/' ) );
|
287 |
-
|
288 |
-
if ( file_exists( $this->workingdir . 'export.zip' ) ) {
|
289 |
-
return $urldir . 'export.zip';
|
290 |
-
} else {
|
291 |
-
return $urldir . 'export.csv';
|
292 |
-
}
|
293 |
-
}
|
294 |
-
|
295 |
-
private function header( $echo = false ) {
|
296 |
-
$out = '';
|
297 |
-
|
298 |
-
foreach ( $this->columns as $colname => &$col ) {
|
299 |
-
$out .= $colname;
|
300 |
-
$out .= $this->settings['csv-file-separator'];
|
301 |
-
}
|
302 |
-
|
303 |
-
$out = substr( $out, 0, -1 );
|
304 |
-
|
305 |
-
if ( $echo ) {
|
306 |
-
echo $out;
|
307 |
-
}
|
308 |
-
|
309 |
-
return $out;
|
310 |
-
}
|
311 |
-
|
312 |
-
private function extract_data( $post_id ) {
|
313 |
-
$listing = wpbdp_get_listing( $post_id );
|
314 |
-
|
315 |
-
if ( ! $listing ) {
|
316 |
-
return false;
|
317 |
-
}
|
318 |
-
|
319 |
-
$data = array();
|
320 |
-
|
321 |
-
foreach ( $this->columns as $column_name => $column_obj ) {
|
322 |
-
$value = '';
|
323 |
-
|
324 |
-
switch ( $column_name ) {
|
325 |
-
case 'sequence_id':
|
326 |
-
$value = $listing->get_sequence_id();
|
327 |
-
break;
|
328 |
-
case 'username':
|
329 |
-
$value = $listing->get_author_meta( 'login' );
|
330 |
-
break;
|
331 |
-
case 'images':
|
332 |
-
$images = array();
|
333 |
-
|
334 |
-
$image_ids = $listing->get_images( 'ids' );
|
335 |
-
|
336 |
-
if ( $image_ids ) {
|
337 |
-
$thumnail_id = $listing->get_thumbnail_id();
|
338 |
-
$has_thumbnail = array_search( $thumnail_id, $image_ids, true );
|
339 |
-
if ( $has_thumbnail ) {
|
340 |
-
unset( $image_ids[ $has_thumbnail ] );
|
341 |
-
array_unshift( $image_ids, $thumnail_id );
|
342 |
-
}
|
343 |
-
|
344 |
-
$upload_dir = wp_upload_dir();
|
345 |
-
|
346 |
-
foreach ( $image_ids as $image_id ) {
|
347 |
-
$img_meta = wp_get_attachment_metadata( $image_id );
|
348 |
-
|
349 |
-
if ( empty( $img_meta['file'] ) ) {
|
350 |
-
continue;
|
351 |
-
}
|
352 |
-
|
353 |
-
$img_path = realpath( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $img_meta['file'] );
|
354 |
-
|
355 |
-
if ( ! is_readable( $img_path ) ) {
|
356 |
-
continue;
|
357 |
-
}
|
358 |
-
|
359 |
-
$this->images_archive = ( ! isset( $this->images_archive ) ) ? $this->get_pclzip_instance( $this->workingdir . 'images.zip' ) : $this->images_archive;
|
360 |
-
if ( $success = $this->images_archive->add( $img_path, PCLZIP_OPT_REMOVE_ALL_PATH ) ) {
|
361 |
-
$images[] = basename( $img_path );
|
362 |
-
}
|
363 |
-
}
|
364 |
-
}
|
365 |
-
|
366 |
-
$value = implode( $this->settings['images-separator'], $images );
|
367 |
-
break;
|
368 |
-
case 'fee_id':
|
369 |
-
$plan = $listing->get_fee_plan();
|
370 |
-
|
371 |
-
if ( isset( $plan->fee_id ) ) {
|
372 |
-
$value = $plan->fee_id;
|
373 |
-
}
|
374 |
-
|
375 |
-
break;
|
376 |
-
case 'expires_on':
|
377 |
-
case 'expiration_date':
|
378 |
-
$plan = $listing->get_fee_plan();
|
379 |
-
|
380 |
-
if ( isset( $plan->expiration_date ) ) {
|
381 |
-
$value = $plan->expiration_date;
|
382 |
-
}
|
383 |
-
|
384 |
-
break;
|
385 |
-
case 'created_date':
|
386 |
-
$value = get_the_date(
|
387 |
-
get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
|
388 |
-
$post_id
|
389 |
-
);
|
390 |
-
break;
|
391 |
-
case 'modified_date':
|
392 |
-
$value = get_the_modified_date(
|
393 |
-
get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
|
394 |
-
$post_id
|
395 |
-
);
|
396 |
-
break;
|
397 |
-
case 'terms_and_conditions_acceptance_date':
|
398 |
-
$value = get_post_meta( $post_id, '_wpbdp_tos_acceptance_date', true );
|
399 |
-
break;
|
400 |
-
default:
|
401 |
-
if ( is_object( $column_obj ) ) {
|
402 |
-
$field = $column_obj;
|
403 |
-
|
404 |
-
switch ( $field->get_association() ) {
|
405 |
-
case 'category':
|
406 |
-
case 'tags':
|
407 |
-
$value = wp_get_post_terms( $listing->get_id(), ( 'tags' == $field->get_association() ? WPBDP_TAGS_TAX : WPBDP_CATEGORY_TAX ), 'fields=names' );
|
408 |
-
$value = array_map( 'html_entity_decode', $value );
|
409 |
-
$value = implode( $this->settings['category-separator'], $value );
|
410 |
-
break;
|
411 |
-
case 'meta':
|
412 |
-
default:
|
413 |
-
$value = $field->csv_value( $listing->get_id() );
|
414 |
-
|
415 |
-
if ( 'image' === $field->get_field_type_id() && $this->settings['export-images'] ) {
|
416 |
-
$image_id = $field->plain_value( $listing->get_id() );
|
417 |
-
|
418 |
-
if ( empty( $image_id ) ) {
|
419 |
-
break;
|
420 |
-
}
|
421 |
-
|
422 |
-
$img_meta = wp_get_attachment_metadata( $image_id );
|
423 |
-
|
424 |
-
if ( empty( $img_meta['file'] ) ) {
|
425 |
-
break;
|
426 |
-
}
|
427 |
-
|
428 |
-
$upload_dir = wp_upload_dir();
|
429 |
-
$img_path = realpath( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $img_meta['file'] );
|
430 |
-
|
431 |
-
if ( ! is_readable( $img_path ) ) {
|
432 |
-
break;
|
433 |
-
}
|
434 |
-
|
435 |
-
$this->images_archive = ( ! isset( $this->images_archive ) ) ? $this->get_pclzip_instance( $this->workingdir . 'images.zip' ) : $this->images_archive;
|
436 |
-
if ( $this->images_archive->add( $img_path, PCLZIP_OPT_REMOVE_ALL_PATH ) ) {
|
437 |
-
$value = sprintf( '%s,%s', $value, basename( $img_path ) );
|
438 |
-
}
|
439 |
-
}
|
440 |
-
break;
|
441 |
-
}
|
442 |
-
}
|
443 |
-
}
|
444 |
-
|
445 |
-
if ( ! is_string( $value ) && ! is_array( $value ) ) {
|
446 |
-
$value = strval( $value );
|
447 |
-
}
|
448 |
-
|
449 |
-
$data[ $column_name ] = '"' . str_replace( '"', '""', $value ) . '"';
|
450 |
-
}
|
451 |
-
|
452 |
-
return $data;
|
453 |
-
}
|
454 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/helpers/csv/class-csv-exporter.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/helpers/csv/class-csv-exporter.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/class-csv-import.php
CHANGED
@@ -1,913 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package Includes/Admin/CSV Import
|
6 |
-
*/
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
die( 'You are not allowed to call this page directly.' );
|
9 |
-
}
|
10 |
-
|
11 |
-
@ini_set( 'auto_detect_line_endings', true );
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Replaces `WPBDP_CSVImporter` (from 2.1) and adds support for sequential imports.
|
15 |
-
*
|
16 |
-
* @since 3.5.8
|
17 |
-
*/
|
18 |
-
class WPBDP_CSV_Import {
|
19 |
-
|
20 |
-
const UTF8_BOM = "\xEF\xBB\xBF";
|
21 |
-
const UTF16_LE_BOM = "\xFF\xFE";
|
22 |
-
|
23 |
-
private static $PERSISTENT = array( 'settings', 'header', 'total_lines', 'processed_lines', 'current_line', 'imported', 'rejected', 'errors', 'done' );
|
24 |
-
|
25 |
-
private $state_id = '';
|
26 |
-
private $working_dir = '';
|
27 |
-
|
28 |
-
private $state_file = '';
|
29 |
-
private $csv_file = '';
|
30 |
-
private $images_dir = '';
|
31 |
-
|
32 |
-
private $settings = array();
|
33 |
-
|
34 |
-
private $header = array();
|
35 |
-
private $fields = array();
|
36 |
-
|
37 |
-
private $total_lines = 0;
|
38 |
-
private $processed_lines = 0;
|
39 |
-
private $current_line = 0;
|
40 |
-
|
41 |
-
private $imported = 0;
|
42 |
-
private $rejected = 0;
|
43 |
-
private $errors = array();
|
44 |
-
private $done = false;
|
45 |
-
|
46 |
-
|
47 |
-
public function __construct( $state_id = '', $csv_file = '', $images_file = '', $settings = array() ) {
|
48 |
-
|
49 |
-
if ( $state_id ) {
|
50 |
-
$this->restore_state( $state_id );
|
51 |
-
} else {
|
52 |
-
if ( ! is_readable( $csv_file ) ) {
|
53 |
-
throw new Exception( 'Invalid CSV file.' );
|
54 |
-
}
|
55 |
-
|
56 |
-
$this->setup_working_dir( $csv_file, $images_file );
|
57 |
-
|
58 |
-
$this->setup_settings( $settings );
|
59 |
-
|
60 |
-
$file = $this->get_csv_file();
|
61 |
-
$file->seek( PHP_INT_MAX );
|
62 |
-
$this->total_lines = absint( $file->key() );
|
63 |
-
$file = null;
|
64 |
-
}
|
65 |
-
|
66 |
-
if ( ! $this->header ) {
|
67 |
-
$this->read_header();
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @since 5.11
|
73 |
-
*/
|
74 |
-
private function setup_settings( $settings ) {
|
75 |
-
$defaults = array(
|
76 |
-
'allow-partial-imports' => true,
|
77 |
-
'csv-file-separator' => ',',
|
78 |
-
'images-separator' => ';',
|
79 |
-
'category-separator' => ';',
|
80 |
-
'create-missing-categories' => true,
|
81 |
-
'assign-listings-to-user' => false,
|
82 |
-
'default-user' => '0',
|
83 |
-
'post-status' => 'publish',
|
84 |
-
'existing-post-status' => 'preserve_status',
|
85 |
-
'disable-email-notifications' => false,
|
86 |
-
'append-images' => false,
|
87 |
-
'test-import' => false,
|
88 |
-
'batch-size' => 40,
|
89 |
-
);
|
90 |
-
|
91 |
-
if ( $settings['csv-file-separator'] === 'tab' ) {
|
92 |
-
$settings['csv-file-separator'] = "\t";
|
93 |
-
}
|
94 |
-
|
95 |
-
$this->settings = array_merge( $defaults, $settings );
|
96 |
-
}
|
97 |
-
|
98 |
-
public function do_work() {
|
99 |
-
if ( $this->done ) {
|
100 |
-
return;
|
101 |
-
}
|
102 |
-
|
103 |
-
$file = $this->get_csv_file();
|
104 |
-
$file->seek( $this->current_line );
|
105 |
-
|
106 |
-
$n = 0;
|
107 |
-
while ( $n < (int)$this->settings['batch-size'] ) {
|
108 |
-
if ( $file->eof() && empty( $file->current() ) ) {
|
109 |
-
$this->done = true;
|
110 |
-
break;
|
111 |
-
}
|
112 |
-
|
113 |
-
$line = $this->get_current_line( $file );
|
114 |
-
|
115 |
-
// We can't use fgetcsv() directly due to https://bugs.php.net/bug.php?id=46569.
|
116 |
-
$line_data = str_getcsv( $line, $this->settings['csv-file-separator'] );
|
117 |
-
|
118 |
-
$file->next();
|
119 |
-
$n++;
|
120 |
-
$this->current_line = $file->key();
|
121 |
-
$this->processed_lines++;
|
122 |
-
|
123 |
-
if ( ! $line_data || ( count( $line_data ) == 1 && empty( $line_data[0] ) ) ) {
|
124 |
-
continue;
|
125 |
-
}
|
126 |
-
|
127 |
-
list( $listing_data, $errors ) = $this->sanitize_and_validate_row( $line_data );
|
128 |
-
|
129 |
-
if ( $errors ) {
|
130 |
-
foreach ( $errors as $e ) {
|
131 |
-
$this->errors[] = array(
|
132 |
-
'line' => $this->current_line,
|
133 |
-
'content' => $line,
|
134 |
-
'error' => $e,
|
135 |
-
);
|
136 |
-
}
|
137 |
-
|
138 |
-
$this->rejected++;
|
139 |
-
continue;
|
140 |
-
}
|
141 |
-
|
142 |
-
$result = $this->import_row( $listing_data );
|
143 |
-
@set_time_limit( 0 );
|
144 |
-
|
145 |
-
if ( is_wp_error( $result ) ) {
|
146 |
-
foreach ( $result->get_error_messages() as $e ) {
|
147 |
-
$this->errors[] = array(
|
148 |
-
'line' => $this->current_line,
|
149 |
-
'content' => $line,
|
150 |
-
'error' => $e,
|
151 |
-
);
|
152 |
-
}
|
153 |
-
|
154 |
-
$this->rejected++;
|
155 |
-
continue;
|
156 |
-
}
|
157 |
-
|
158 |
-
$this->imported++;
|
159 |
-
}
|
160 |
-
|
161 |
-
$file = null;
|
162 |
-
$this->state_persist();
|
163 |
-
}
|
164 |
-
|
165 |
-
private function get_csv_file() {
|
166 |
-
$file = new SplFileObject( $this->csv_file );
|
167 |
-
|
168 |
-
return $file;
|
169 |
-
}
|
170 |
-
private function get_current_line( $file ) {
|
171 |
-
$line = $file->current();
|
172 |
-
|
173 |
-
if ( empty( $line ) ) {
|
174 |
-
return '';
|
175 |
-
}
|
176 |
-
|
177 |
-
$converted_line = $this->maybe_convert_encoding( $line );
|
178 |
-
|
179 |
-
// Some code to circumvent limitations in str_getcsv() while PHP #46569 is fixed.
|
180 |
-
return str_replace( '\n', "\n", $converted_line );
|
181 |
-
}
|
182 |
-
|
183 |
-
private function maybe_convert_encoding( $line ) {
|
184 |
-
// Some UTF16-LE string may end with a '\n' character, encoded
|
185 |
-
// as \xOA, instead of \x0A\x00 (the last byte is missing)
|
186 |
-
// making it impossible for iconv to convert the encoding of the
|
187 |
-
// string
|
188 |
-
$line = rtrim( $line, "\n" );
|
189 |
-
// The last byte (\x00) ends up at the beginning of the next line,
|
190 |
-
// so me remove that too.
|
191 |
-
$line = ltrim( $line, "\x00" );
|
192 |
-
|
193 |
-
if ( isset( $this->settings['encoding'] ) ) {
|
194 |
-
$encoding = $this->settings['encoding'];
|
195 |
-
} else {
|
196 |
-
$encoding = wpbdp_detect_encoding( $line );
|
197 |
-
}
|
198 |
-
|
199 |
-
if ( 'UTF-8' != $encoding ) {
|
200 |
-
$converted_line = iconv( $encoding, 'UTF-8', $line );
|
201 |
-
} else {
|
202 |
-
$converted_line = $line;
|
203 |
-
}
|
204 |
-
|
205 |
-
return $converted_line;
|
206 |
-
}
|
207 |
-
|
208 |
-
public function get_import_id() {
|
209 |
-
return $this->state_id;
|
210 |
-
}
|
211 |
-
|
212 |
-
public function get_import_rows_count() {
|
213 |
-
return max( 0, $this->total_lines );
|
214 |
-
}
|
215 |
-
|
216 |
-
public function get_imported_rows_count() {
|
217 |
-
return $this->imported;
|
218 |
-
}
|
219 |
-
|
220 |
-
public function get_rejected_rows_count() {
|
221 |
-
return $this->rejected;
|
222 |
-
}
|
223 |
-
|
224 |
-
public function get_setting( $k ) {
|
225 |
-
return isset( $this->settings[ $k ] ) ? $this->settings[ $k ] : null;
|
226 |
-
}
|
227 |
-
|
228 |
-
public function get_settings() {
|
229 |
-
return $this->settings;
|
230 |
-
}
|
231 |
-
|
232 |
-
public function get_errors() {
|
233 |
-
return $this->errors;
|
234 |
-
}
|
235 |
-
|
236 |
-
public function get_progress( $format = 'n' ) {
|
237 |
-
$total = $this->get_import_rows_count();
|
238 |
-
$done = min( $total, $this->processed_lines );
|
239 |
-
|
240 |
-
switch ( $format ) {
|
241 |
-
case '%': // As a percentage.
|
242 |
-
return round( 100 * $this->get_progress( 'f' ) );
|
243 |
-
break;
|
244 |
-
case 'f': // As a fraction.
|
245 |
-
return round( $done / $total, 3 );
|
246 |
-
break;
|
247 |
-
case 'n': // As # of items read.
|
248 |
-
return $done;
|
249 |
-
break;
|
250 |
-
case 'r': // As # of items remaining.
|
251 |
-
return max( 0, $total - $done );
|
252 |
-
break;
|
253 |
-
}
|
254 |
-
}
|
255 |
-
|
256 |
-
public function in_test_mode() {
|
257 |
-
return (bool) $this->settings['test-import'];
|
258 |
-
}
|
259 |
-
|
260 |
-
public function done() {
|
261 |
-
return $this->done;
|
262 |
-
}
|
263 |
-
|
264 |
-
public function cleanup() {
|
265 |
-
WPBDP_FS::rmdir( $this->working_dir );
|
266 |
-
}
|
267 |
-
|
268 |
-
private function restore_state( $state_id ) {
|
269 |
-
$csv_imports_dir = $this->directory_path() . DIRECTORY_SEPARATOR . $state_id;
|
270 |
-
|
271 |
-
// TODO: validate $state_id is really an uniqid() string and does not contain other chars (maybe someone is
|
272 |
-
// trying to access parts that it shouldn't in the FS).
|
273 |
-
if ( ! is_dir( $csv_imports_dir ) ) {
|
274 |
-
throw new Exception( 'Invalid state ID' );
|
275 |
-
}
|
276 |
-
|
277 |
-
$this->working_dir = $csv_imports_dir;
|
278 |
-
$this->state_id = basename( $this->working_dir );
|
279 |
-
$this->csv_file = $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv';
|
280 |
-
$this->images_dir = is_dir( $this->working_dir . DIRECTORY_SEPARATOR . 'images' ) ? $this->working_dir . DIRECTORY_SEPARATOR . 'images' : '';
|
281 |
-
|
282 |
-
$state_file = $this->working_dir . DIRECTORY_SEPARATOR . 'import.state';
|
283 |
-
$this->state_file = $state_file;
|
284 |
-
|
285 |
-
$this->state_load();
|
286 |
-
}
|
287 |
-
|
288 |
-
private function setup_working_dir( $csv_file, $images_file = '' ) {
|
289 |
-
|
290 |
-
$csv_imports_dir = $this->directory_path();
|
291 |
-
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
292 |
-
|
293 |
-
$this->create_folders();
|
294 |
-
|
295 |
-
if ( ! $this->working_dir ) {
|
296 |
-
throw new Exception( 'Could not set working dir' );
|
297 |
-
}
|
298 |
-
|
299 |
-
if ( ! copy( $csv_file, $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv' ) ) {
|
300 |
-
throw new Exception( 'Could not copy CSV file to working directory' );
|
301 |
-
}
|
302 |
-
|
303 |
-
if ( $images_file && file_exists( $images_file ) ) {
|
304 |
-
$dest = $this->working_dir . DIRECTORY_SEPARATOR . 'images.zip';
|
305 |
-
if ( ! copy( $images_file, $dest ) ) { // XXX: maybe move?
|
306 |
-
throw new Exception( 'Could not copy images ZIP file to working directory' );
|
307 |
-
}
|
308 |
-
|
309 |
-
$image_folder = $this->working_dir . DIRECTORY_SEPARATOR . 'images';
|
310 |
-
|
311 |
-
require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
|
312 |
-
$zip = new PclZip( $dest );
|
313 |
-
$files = $zip->extract( PCLZIP_OPT_PATH, $image_folder, PCLZIP_OPT_REMOVE_ALL_PATH );
|
314 |
-
if ( $files ) {
|
315 |
-
$this->images_dir = $image_folder;
|
316 |
-
|
317 |
-
@unlink( $dest );
|
318 |
-
$this->delete_non_images( $files );
|
319 |
-
} else {
|
320 |
-
throw new Exception( 'Images ZIP file could not be uncompressed' );
|
321 |
-
}
|
322 |
-
}
|
323 |
-
|
324 |
-
$this->state_id = basename( $this->working_dir );
|
325 |
-
$this->csv_file = $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv';
|
326 |
-
$this->state_file = $this->working_dir . DIRECTORY_SEPARATOR . 'import.state';
|
327 |
-
|
328 |
-
$this->state_persist();
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Create folders and index.php
|
333 |
-
*
|
334 |
-
* @since 5.11.2
|
335 |
-
*/
|
336 |
-
private function create_folders() {
|
337 |
-
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
338 |
-
|
339 |
-
$id = uniqid();
|
340 |
-
$import_dir = rtrim( $this->directory_path(), DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . $id;
|
341 |
-
$create_index = new WPBDP_Create_File(
|
342 |
-
array(
|
343 |
-
'file_name' => 'index.php',
|
344 |
-
'folder_name' => 'wpbdp-csv-imports/' . $id
|
345 |
-
)
|
346 |
-
);
|
347 |
-
$create_index->create_index( 'force' );
|
348 |
-
|
349 |
-
if ( is_dir( $import_dir ) ) {
|
350 |
-
$this->working_dir = $import_dir;
|
351 |
-
}
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Check the file types after the zip is unzipped.
|
356 |
-
*
|
357 |
-
* @since 5.11
|
358 |
-
*/
|
359 |
-
private function delete_non_images( $files ) {
|
360 |
-
$allowed = array( 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'txt', 'rtf' );
|
361 |
-
foreach ( $files as $file ) {
|
362 |
-
$uploaded_type = strtolower( pathinfo( $file['filename'], PATHINFO_EXTENSION ) );
|
363 |
-
if ( ! in_array( $uploaded_type, $allowed, true ) ) {
|
364 |
-
@unlink( $file['filename'] );
|
365 |
-
}
|
366 |
-
}
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* @since 5.11
|
371 |
-
*
|
372 |
-
* @throws {Error}
|
373 |
-
*/
|
374 |
-
private function directory_path() {
|
375 |
-
$upload_dir = wp_upload_dir();
|
376 |
-
|
377 |
-
if ( $upload_dir['error'] ) {
|
378 |
-
throw new Exception();
|
379 |
-
}
|
380 |
-
|
381 |
-
return rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'wpbdp-csv-imports';
|
382 |
-
}
|
383 |
-
|
384 |
-
private function read_header() {
|
385 |
-
$file = new SplFileObject( $this->csv_file );
|
386 |
-
|
387 |
-
$this->detect_encoding_from_header( $file );
|
388 |
-
$this->parse_header( $file );
|
389 |
-
|
390 |
-
$file = null;
|
391 |
-
|
392 |
-
$this->state_persist();
|
393 |
-
}
|
394 |
-
|
395 |
-
private function detect_encoding_from_header( $file ) {
|
396 |
-
$line = $file->current();
|
397 |
-
|
398 |
-
if ( substr( $line, 0, 3 ) == self::UTF8_BOM ) {
|
399 |
-
$this->settings['encoding'] = 'UTF-8';
|
400 |
-
}
|
401 |
-
|
402 |
-
if ( substr( $line, 0, 2 ) == self::UTF16_LE_BOM ) {
|
403 |
-
$this->settings['encoding'] = 'UTF-16LE';
|
404 |
-
}
|
405 |
-
}
|
406 |
-
|
407 |
-
private function parse_header( $file ) {
|
408 |
-
$header_line = $this->remove_bom( $file->current() );
|
409 |
-
$header_line = $this->maybe_convert_encoding( $header_line );
|
410 |
-
|
411 |
-
$this->set_header( str_getcsv( $header_line, $this->settings['csv-file-separator'] ) );
|
412 |
-
|
413 |
-
$file->next();
|
414 |
-
$this->current_line = $file->key();
|
415 |
-
}
|
416 |
-
|
417 |
-
private function remove_bom( $str ) {
|
418 |
-
if ( substr( $str, 0, 3 ) == self::UTF8_BOM ) {
|
419 |
-
$str = substr( $str, 3 );
|
420 |
-
}
|
421 |
-
|
422 |
-
if ( substr( $str, 0, 2 ) == self::UTF16_LE_BOM ) {
|
423 |
-
$str = substr( $str, 2 );
|
424 |
-
}
|
425 |
-
|
426 |
-
return $str;
|
427 |
-
}
|
428 |
-
|
429 |
-
private function set_header( $header ) {
|
430 |
-
if ( ! $header || ( count( $header ) == 1 && is_null( $header[0] ) ) ) {
|
431 |
-
throw new Exception( 'Invalid header' );
|
432 |
-
}
|
433 |
-
|
434 |
-
$required_fields = wpbdp_get_form_fields( 'validators=required' );
|
435 |
-
$fields_in_header = array_map( 'trim', $header );
|
436 |
-
|
437 |
-
foreach ( $required_fields as $rf ) {
|
438 |
-
if ( ! in_array( $rf->get_short_name(), $fields_in_header, true ) ) {
|
439 |
-
throw new Exception( sprintf( 'Required header column "%s" missing', $rf->get_short_name() ) );
|
440 |
-
}
|
441 |
-
}
|
442 |
-
|
443 |
-
$this->header = array();
|
444 |
-
|
445 |
-
global $wpbdp;
|
446 |
-
$short_names = $wpbdp->formfields->get_short_names();
|
447 |
-
foreach ( $fields_in_header as $short_name ) {
|
448 |
-
$field_id = 0;
|
449 |
-
|
450 |
-
$key = array_search( $short_name, $short_names, true );
|
451 |
-
|
452 |
-
if ( false === $key ) {
|
453 |
-
$field_id = 0;
|
454 |
-
}
|
455 |
-
|
456 |
-
if ( $f = wpbdp_get_form_field( $key ) ) {
|
457 |
-
$field_id = $f->get_id();
|
458 |
-
}
|
459 |
-
|
460 |
-
$this->header[] = array(
|
461 |
-
'short_name' => $short_name,
|
462 |
-
'field_id' => $field_id,
|
463 |
-
);
|
464 |
-
}
|
465 |
-
}
|
466 |
-
|
467 |
-
private function state_load() {
|
468 |
-
if ( ! file_exists( $this->state_file ) ) {
|
469 |
-
return;
|
470 |
-
}
|
471 |
-
|
472 |
-
if ( ! is_readable( $this->state_file ) ) {
|
473 |
-
throw new Exception( 'XXX' );
|
474 |
-
}
|
475 |
-
|
476 |
-
$state = unserialize( file_get_contents( $this->state_file ) );
|
477 |
-
|
478 |
-
foreach ( self::$PERSISTENT as $key ) {
|
479 |
-
$this->{$key} = $state[ $key ];
|
480 |
-
}
|
481 |
-
}
|
482 |
-
|
483 |
-
private function state_persist() {
|
484 |
-
$state = array();
|
485 |
-
$state['settings'] = $this->settings;
|
486 |
-
$state['header'] = $this->header;
|
487 |
-
$state['current_line'] = $this->current_line;
|
488 |
-
$state['imported'] = $this->imported;
|
489 |
-
$state['errors'] = $this->errors;
|
490 |
-
$state['done'] = $this->done;
|
491 |
-
|
492 |
-
foreach ( self::$PERSISTENT as $key ) {
|
493 |
-
$state[ $key ] = $this->{$key};
|
494 |
-
}
|
495 |
-
|
496 |
-
if ( false === file_put_contents( $this->state_file, serialize( $state ) ) ) {
|
497 |
-
throw new Exception( 'Could not write persistent data' );
|
498 |
-
}
|
499 |
-
}
|
500 |
-
|
501 |
-
private function import_row( $data ) {
|
502 |
-
global $wpdb;
|
503 |
-
global $wpbdp;
|
504 |
-
|
505 |
-
if ( $this->settings['test-import'] ) {
|
506 |
-
return;
|
507 |
-
}
|
508 |
-
|
509 |
-
extract( $data );
|
510 |
-
|
511 |
-
$state = (object) array(
|
512 |
-
'fields' => array(),
|
513 |
-
'images' => array(),
|
514 |
-
'categories' => array(),
|
515 |
-
);
|
516 |
-
$errors = array();
|
517 |
-
|
518 |
-
// Create categories.
|
519 |
-
foreach ( $categories as &$c ) {
|
520 |
-
if ( $c['term_id'] ) {
|
521 |
-
$state->categories[] = intval( $c['term_id'] );
|
522 |
-
continue;
|
523 |
-
}
|
524 |
-
|
525 |
-
if ( $t = term_exists( str_replace( '&', '&', $c['name'] ), WPBDP_CATEGORY_TAX ) ) {
|
526 |
-
$c['term_id'] = $t['term_id'];
|
527 |
-
} else {
|
528 |
-
$t = wp_insert_term( str_replace( '&', '&', $c['name'] ), WPBDP_CATEGORY_TAX );
|
529 |
-
|
530 |
-
if ( is_array( $t ) && isset( $t['term_id'] ) ) {
|
531 |
-
$c['term_id'] = $t['term_id'];
|
532 |
-
} elseif ( is_wp_error( $t ) ) {
|
533 |
-
$message = _x( 'Could not create listing category "<category-name>". The operation failed with the following error: <error-message>.', 'admin csv-import', 'business-directory-plugin' );
|
534 |
-
$message = str_replace( '<category-name>', $c['name'], $message );
|
535 |
-
$message = str_replace( '<error-message>', $t->get_error_message(), $message );
|
536 |
-
|
537 |
-
$errors[] = $message;
|
538 |
-
} else {
|
539 |
-
$errors[] = sprintf( _x( 'Could not create listing category "%s"', 'admin csv-import', 'business-directory-plugin' ), $c['name'] );
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
if ( $c['term_id'] ) {
|
544 |
-
$state->categories[] = intval( $c['term_id'] );
|
545 |
-
}
|
546 |
-
}
|
547 |
-
|
548 |
-
$listing_id = 0;
|
549 |
-
|
550 |
-
// Support sequence_id.
|
551 |
-
if ( $meta['sequence_id'] ) {
|
552 |
-
$listing_id = intval(
|
553 |
-
$wpdb->get_var(
|
554 |
-
$wpdb->prepare(
|
555 |
-
"SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s LIMIT 1",
|
556 |
-
'_wpbdp[import_sequence_id]', $meta['sequence_id']
|
557 |
-
)
|
558 |
-
)
|
559 |
-
);
|
560 |
-
if ( WPBDP_POST_TYPE != get_post_type( $listing_id ) ) {
|
561 |
-
$listing_id = 0;
|
562 |
-
}
|
563 |
-
}
|
564 |
-
|
565 |
-
// Handle fields.
|
566 |
-
foreach ( $fields as $field_id => $field_data ) {
|
567 |
-
$f = wpbdp_get_form_field( $field_id );
|
568 |
-
|
569 |
-
if ( 'image' != $f->get_field_type_id() ) {
|
570 |
-
continue;
|
571 |
-
}
|
572 |
-
|
573 |
-
// $img = trim( $field_data );
|
574 |
-
$img = array_pop( $field_data );
|
575 |
-
|
576 |
-
if ( ! $img ) {
|
577 |
-
$field_data[] = $img;
|
578 |
-
continue;
|
579 |
-
}
|
580 |
-
|
581 |
-
$media_id = $this->upload_image( $img );
|
582 |
-
|
583 |
-
if ( $media_id ) {
|
584 |
-
$field_data[0] = $media_id;
|
585 |
-
}
|
586 |
-
|
587 |
-
$fields[ $field_id ] = $media_id ? $field_data : array();
|
588 |
-
}
|
589 |
-
|
590 |
-
$state->fields = $fields;
|
591 |
-
|
592 |
-
// Handle images.
|
593 |
-
foreach ( $data['images'] as $filename ) {
|
594 |
-
if ( $img_id = $this->upload_image( $filename ) ) {
|
595 |
-
$state->images[] = $img_id;
|
596 |
-
}
|
597 |
-
}
|
598 |
-
|
599 |
-
// Insert or update listing.
|
600 |
-
$listing_data = (array) $state;
|
601 |
-
$listing_data['listing_id'] = $listing_id;
|
602 |
-
$listing_data['append_images'] = $this->settings['append-images'];
|
603 |
-
$listing_data['post_status'] = $this->settings['post-status'];
|
604 |
-
|
605 |
-
if ( $listing_id ) {
|
606 |
-
$listing_data['post_status'] = $this->settings['existing-post-status'];
|
607 |
-
|
608 |
-
if ( 'preserve_status' === $this->settings['existing-post-status'] ) {
|
609 |
-
$listing_data['post_status'] = get_post_status( $listing_id );
|
610 |
-
}
|
611 |
-
}
|
612 |
-
|
613 |
-
if ( ! empty( $data['plan_id'] ) ) {
|
614 |
-
$listing_data['plan_id'] = $data['plan_id'];
|
615 |
-
}
|
616 |
-
|
617 |
-
if ( $data['expires_on'] ) {
|
618 |
-
$listing_data['expires_on'] = $data['expires_on'];
|
619 |
-
}
|
620 |
-
|
621 |
-
if ( $meta['sequence_id'] ) {
|
622 |
-
$listing_data['sequence_id'] = $meta['sequence_id'];
|
623 |
-
}
|
624 |
-
|
625 |
-
if ( $u = get_user_by( 'login', $meta['username'] ) ) {
|
626 |
-
$listing_data['user_id'] = $u->ID;
|
627 |
-
}
|
628 |
-
|
629 |
-
$listing = wpbdp_save_listing( $listing_data, true, 'csv-import' );
|
630 |
-
|
631 |
-
if ( is_wp_error( $listing ) ) {
|
632 |
-
$errors = array_merge( $errors, $listing->get_error_messages() );
|
633 |
-
}
|
634 |
-
|
635 |
-
if ( $errors ) {
|
636 |
-
$error = new WP_Error();
|
637 |
-
|
638 |
-
foreach ( $errors as $e ) {
|
639 |
-
$error->add( 'listing-add-error', $e );
|
640 |
-
}
|
641 |
-
|
642 |
-
return $error;
|
643 |
-
}
|
644 |
-
|
645 |
-
if ( ! empty( $data['terms_and_conditions_acceptance_date'] ) ) {
|
646 |
-
update_post_meta( $listing->get_id(), '_wpbdp_tos_acceptance_date', $data['terms_and_conditions_acceptance_date'] );
|
647 |
-
if ( empty( $meta['sequence_id'] ) ) {
|
648 |
-
wpbdp_insert_log(
|
649 |
-
array(
|
650 |
-
'log_type' => 'listing.terms_and_conditions_accepted',
|
651 |
-
'object_id' => $listing->get_id(),
|
652 |
-
'created_at' => $data['terms_and_conditions_acceptance_date']
|
653 |
-
)
|
654 |
-
);
|
655 |
-
}
|
656 |
-
}
|
657 |
-
|
658 |
-
if ( $state->images ) {
|
659 |
-
$listing->set_thumbnail_id( $state->images[0] );
|
660 |
-
}
|
661 |
-
|
662 |
-
$payment = $listing->get_latest_payment();
|
663 |
-
|
664 |
-
// A payment record created in the last minute means the plan of an existing
|
665 |
-
// listing changed or was just assigned for a new listing.
|
666 |
-
if ( $payment && current_time( 'timestamp' ) - strtotime( $payment->created_at ) < 60 ) {
|
667 |
-
$payment->status = 'completed';
|
668 |
-
$payment->context = 'csv-import';
|
669 |
-
$payment->save();
|
670 |
-
|
671 |
-
wpbdp_insert_log(
|
672 |
-
array(
|
673 |
-
'log_type' => 'payment.note',
|
674 |
-
'object_id' => $payment->id,
|
675 |
-
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
676 |
-
'message' => __( 'Listing imported by admin. Payment skipped.', 'business-directory-plugin' ),
|
677 |
-
)
|
678 |
-
);
|
679 |
-
}
|
680 |
-
|
681 |
-
return $listing->get_id();
|
682 |
-
}
|
683 |
-
|
684 |
-
private function sanitize_and_validate_row( $data ) {
|
685 |
-
global $wpbdp;
|
686 |
-
|
687 |
-
$errors = array();
|
688 |
-
|
689 |
-
$categories = array();
|
690 |
-
$fields = array();
|
691 |
-
$images = array();
|
692 |
-
$expires_on = '';
|
693 |
-
$plan_id = 0;
|
694 |
-
|
695 |
-
$terms_and_conditions_acceptance_date = '';
|
696 |
-
|
697 |
-
$meta = array();
|
698 |
-
$meta['sequence_id'] = 0;
|
699 |
-
$meta['username'] = '';
|
700 |
-
|
701 |
-
if ( $this->settings['assign-listings-to-user'] && $this->settings['default-user'] ) {
|
702 |
-
if ( $u = get_user_by( 'id', $this->settings['default-user'] ) ) {
|
703 |
-
$meta['username'] = $u->user_login;
|
704 |
-
}
|
705 |
-
}
|
706 |
-
|
707 |
-
foreach ( $this->get_header() as $i => $col_info ) {
|
708 |
-
$column = $col_info['short_name'];
|
709 |
-
$field = $col_info['field_id'] ? wpbdp_get_form_field( $col_info['field_id'] ) : null;
|
710 |
-
$value = stripslashes( trim( isset( $data[ $i ] ) ? $data[ $i ] : '' ) );
|
711 |
-
|
712 |
-
switch ( $column ) {
|
713 |
-
case 'image':
|
714 |
-
case 'images':
|
715 |
-
$file_names = explode( $this->settings['images-separator'], $value );
|
716 |
-
|
717 |
-
foreach ( $file_names as $f ) {
|
718 |
-
$f = trim( $f );
|
719 |
-
|
720 |
-
if ( $f ) {
|
721 |
-
$images[] = $f;
|
722 |
-
}
|
723 |
-
}
|
724 |
-
|
725 |
-
break;
|
726 |
-
|
727 |
-
case 'username':
|
728 |
-
if ( $this->settings['assign-listings-to-user'] && $value ) {
|
729 |
-
if ( ! username_exists( $value ) ) {
|
730 |
-
$errors[] = sprintf( _x( 'Username "%s" does not exist', 'admin csv-import', 'business-directory-plugin' ), $value );
|
731 |
-
} else {
|
732 |
-
$meta['username'] = $value;
|
733 |
-
}
|
734 |
-
}
|
735 |
-
|
736 |
-
break;
|
737 |
-
|
738 |
-
case 'expires_on':
|
739 |
-
$expires = $this->convert_to_date( $value, $errors );
|
740 |
-
|
741 |
-
if ( $expires ) {
|
742 |
-
$expires_on = $expires;
|
743 |
-
}
|
744 |
-
|
745 |
-
break;
|
746 |
-
|
747 |
-
case 'fee_id':
|
748 |
-
$submitted_fee_id = absint( $value );
|
749 |
-
|
750 |
-
if ( ! $submitted_fee_id ) {
|
751 |
-
break;
|
752 |
-
}
|
753 |
-
|
754 |
-
$plan = wpbdp_get_fee_plan( $submitted_fee_id );
|
755 |
-
|
756 |
-
if ( ! $plan ) {
|
757 |
-
$message = _x( 'There is no Fee Plan with ID = <fee-id>', 'admin csv-import', 'business-directory-plugin' );
|
758 |
-
$message = str_replace( '<fee-id>', $submitted_fee_id, $message );
|
759 |
-
|
760 |
-
$errors[] = $message;
|
761 |
-
|
762 |
-
break;
|
763 |
-
}
|
764 |
-
|
765 |
-
$plan_id = $plan->id;
|
766 |
-
|
767 |
-
break;
|
768 |
-
|
769 |
-
case 'terms_and_conditions_acceptance_date':
|
770 |
-
$tos_date = $this->convert_to_date( $value, $errors );
|
771 |
-
|
772 |
-
if ( $tos_date ) {
|
773 |
-
$terms_and_conditions_acceptance_date = $tos_date;
|
774 |
-
}
|
775 |
-
break;
|
776 |
-
|
777 |
-
case 'sequence_id':
|
778 |
-
$meta['sequence_id'] = absint( $value );
|
779 |
-
|
780 |
-
break;
|
781 |
-
|
782 |
-
default:
|
783 |
-
if ( ! $field ) {
|
784 |
-
break;
|
785 |
-
}
|
786 |
-
|
787 |
-
if ( $field->is_required() && $field->is_empty_value( $value ) ) {
|
788 |
-
$errors[] = sprintf( _x( 'Missing required field: %s', 'admin csv-import', 'business-directory-plugin' ), $column );
|
789 |
-
break;
|
790 |
-
}
|
791 |
-
|
792 |
-
if ( 'category' == $field->get_association() ) {
|
793 |
-
$this->prepare_categories( $value, $categories, $errors );
|
794 |
-
|
795 |
-
/* } else if ( 'tags' == $field->get_association() ) {
|
796 |
-
$tags = array_map( 'trim', explode( $this->settings['category-separator'], $value ) );
|
797 |
-
$fields[ $field->get_id() ] = $tags;
|
798 |
-
*/
|
799 |
-
} else {
|
800 |
-
$fields[ $field->get_id() ] = $field->convert_csv_input( $value, $this->settings );
|
801 |
-
}
|
802 |
-
|
803 |
-
break;
|
804 |
-
}
|
805 |
-
}
|
806 |
-
|
807 |
-
return array( compact( 'categories', 'fields', 'images', 'meta', 'expires_on', 'plan_id', 'terms_and_conditions_acceptance_date' ), $errors );
|
808 |
-
}
|
809 |
-
|
810 |
-
/**
|
811 |
-
* @since 5.11
|
812 |
-
*/
|
813 |
-
private function prepare_categories( $value, &$categories, &$errors ) {
|
814 |
-
$csv_categories = $this->split_categories( $value );
|
815 |
-
|
816 |
-
foreach ( $csv_categories as $csv_category_ ) {
|
817 |
-
$csv_category = $this->prepare_category_name( $csv_category_ );
|
818 |
-
if ( ! $csv_category ) {
|
819 |
-
continue;
|
820 |
-
}
|
821 |
-
|
822 |
-
$term = term_exists( $csv_category, WPBDP_CATEGORY_TAX );
|
823 |
-
|
824 |
-
if ( $term ) {
|
825 |
-
$categories[] = array(
|
826 |
-
'name' => $csv_category,
|
827 |
-
'term_id' => is_array( $term ) ? $term['term_id'] : $term,
|
828 |
-
);
|
829 |
-
continue;
|
830 |
-
}
|
831 |
-
|
832 |
-
if ( ! $this->settings['create-missing-categories'] ) {
|
833 |
-
$errors[] = sprintf( _x( 'Listing category "%s" does not exist', 'admin csv-import', 'business-directory-plugin' ), $csv_category );
|
834 |
-
continue;
|
835 |
-
}
|
836 |
-
|
837 |
-
if ( ! $this->settings['test-import'] ) {
|
838 |
-
$categories[] = array(
|
839 |
-
'name' => $csv_category,
|
840 |
-
'term_id' => 0,
|
841 |
-
);
|
842 |
-
}
|
843 |
-
}
|
844 |
-
}
|
845 |
-
|
846 |
-
/**
|
847 |
-
* Get rid of entities so ; can be used to separate.
|
848 |
-
*
|
849 |
-
* @since 5.11
|
850 |
-
*/
|
851 |
-
private function split_categories( $value ) {
|
852 |
-
$decoded_value = html_entity_decode( $value );
|
853 |
-
return array_map( 'trim', explode( $this->settings['category-separator'], $decoded_value ) );
|
854 |
-
}
|
855 |
-
|
856 |
-
/**
|
857 |
-
* Get some entities back after removing them.
|
858 |
-
*
|
859 |
-
* @since 5.11
|
860 |
-
*/
|
861 |
-
private function prepare_category_name( $csv_category ) {
|
862 |
-
$csv_category = str_replace( "\n", '-', $csv_category );
|
863 |
-
$csv_category = strip_tags( $csv_category );
|
864 |
-
$csv_category = str_replace( array( '"', "'" ), '', $csv_category );
|
865 |
-
return str_replace( '& ', '& ', $csv_category );
|
866 |
-
}
|
867 |
-
|
868 |
-
private function get_header() {
|
869 |
-
return $this->header;
|
870 |
-
}
|
871 |
-
|
872 |
-
private function upload_image( $filename ) {
|
873 |
-
$filepath = $this->images_dir . DIRECTORY_SEPARATOR . $filename;
|
874 |
-
if ( ! $this->images_dir || ! file_exists( $filepath ) ) {
|
875 |
-
return false;
|
876 |
-
}
|
877 |
-
|
878 |
-
// Make a copy of the file because wpbdp_media_upload() moves the original file.
|
879 |
-
copy( $filepath, $filepath . '.backup' );
|
880 |
-
$media_id = wpbdp_media_upload( $filepath, true, true );
|
881 |
-
rename( $filepath . '.backup', $filepath );
|
882 |
-
|
883 |
-
return $media_id;
|
884 |
-
}
|
885 |
-
|
886 |
-
private function convert_to_date( $value, &$errors ) {
|
887 |
-
$trimmed_value = trim( $value, "/ \t\n\r\0\x0B" );
|
888 |
-
|
889 |
-
if ( empty( $trimmed_value ) ) {
|
890 |
-
return false;
|
891 |
-
}
|
892 |
-
|
893 |
-
if ( preg_match( '#^(\d{1,4}/\d{1,2}/\d{1,4})(\s([0-1]?[0-9]|[2][0-3]):([0-5][0-9])(:[0-5][0-9])?)?$#', $trimmed_value ) ) {
|
894 |
-
$date = strtotime( $trimmed_value );
|
895 |
-
} else {
|
896 |
-
$dates = explode( '/', $trimmed_value );
|
897 |
-
$dates = array_map( 'strtotime', $dates );
|
898 |
-
$dates = array_filter( $dates );
|
899 |
-
|
900 |
-
$date = array_shift( $dates );
|
901 |
-
}
|
902 |
-
|
903 |
-
if ( ! $date ) {
|
904 |
-
$message = _x( "The string <string> couldn't be converted into a valid date.", 'admin csv-import', 'business-directory-plugin' );
|
905 |
-
$message = str_replace( '<string>', '"' . $value . '"', $message );
|
906 |
-
|
907 |
-
$errors[] = $message;
|
908 |
-
return false;
|
909 |
-
}
|
910 |
-
|
911 |
-
return date( 'Y-m-d H:i:s', $date );
|
912 |
-
}
|
913 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/helpers/csv/class-csv-import.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/helpers/csv/class-csv-import.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/class-data-formatter.php
CHANGED
@@ -1,31 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package BDP/Admin
|
6 |
-
* @since 5.5
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPBDP_DataFormatter
|
11 |
-
*/
|
12 |
-
class WPBDP_DataFormatter {
|
13 |
-
/**
|
14 |
-
* @param $items
|
15 |
-
* @param $properties
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public function format_data( $items, $properties ) {
|
19 |
-
$data = array();
|
20 |
-
foreach ( $items as $key => $name ) {
|
21 |
-
if ( empty( $properties[ $key ] ) ) {
|
22 |
-
continue;
|
23 |
-
}
|
24 |
-
$data[] = array(
|
25 |
-
'name' => $name,
|
26 |
-
'value' => $properties[ $key ],
|
27 |
-
);
|
28 |
-
}
|
29 |
-
return $data;
|
30 |
-
}
|
31 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/helpers/class-data-formatter.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/helpers/class-data-formatter.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/class-personal-data-eraser.php
CHANGED
@@ -13,6 +13,7 @@ class WPBDP_PersonalDataEraser {
|
|
13 |
|
14 |
/**
|
15 |
* WPBDP_PersonalDataEraser constructor.
|
|
|
16 |
* @param $data_eraser
|
17 |
*/
|
18 |
public function __construct( $data_eraser ) {
|
13 |
|
14 |
/**
|
15 |
* WPBDP_PersonalDataEraser constructor.
|
16 |
+
*
|
17 |
* @param $data_eraser
|
18 |
*/
|
19 |
public function __construct( $data_eraser ) {
|
includes/admin/class-personal-data-privacy.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
*/
|
8 |
|
9 |
require_once WPBDP_INC . 'admin/interface-personal-data-provider.php';
|
10 |
-
require_once WPBDP_INC . 'admin/class-data-formatter.php';
|
11 |
require_once WPBDP_INC . 'admin/class-personal-data-exporter.php';
|
12 |
require_once WPBDP_INC . 'admin/class-personal-data-eraser.php';
|
13 |
require_once WPBDP_INC . 'admin/class-listings-personal-data-provider.php';
|
7 |
*/
|
8 |
|
9 |
require_once WPBDP_INC . 'admin/interface-personal-data-provider.php';
|
10 |
+
require_once WPBDP_INC . 'admin/helpers/class-data-formatter.php';
|
11 |
require_once WPBDP_INC . 'admin/class-personal-data-exporter.php';
|
12 |
require_once WPBDP_INC . 'admin/class-personal-data-eraser.php';
|
13 |
require_once WPBDP_INC . 'admin/class-listings-personal-data-provider.php';
|
includes/admin/controllers/class-admin-csv.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Admin CSV import and export controller.
|
5 |
+
*/
|
6 |
+
class WPBDP__Admin__Csv extends WPBDP__Admin__Controller {
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
require_once WPBDP_INC . 'admin/csv-import.php';
|
12 |
+
$this->csv_import = new WPBDP_CSVImportAdmin();
|
13 |
+
|
14 |
+
require_once WPBDP_INC . 'admin/csv-export.php';
|
15 |
+
$this->csv_export = new WPBDP_Admin_CSVExport();
|
16 |
+
}
|
17 |
+
|
18 |
+
public function _dispatch() {
|
19 |
+
$tabs = array( 'csv_import', 'csv_export' );
|
20 |
+
|
21 |
+
$current_tab = wpbdp_get_var( array( 'param' => 'tab' ) );
|
22 |
+
if ( empty( $current_tab ) ) {
|
23 |
+
$current_tab = 'csv_import';
|
24 |
+
}
|
25 |
+
|
26 |
+
if ( ! in_array( $current_tab, $tabs ) ) {
|
27 |
+
wp_die();
|
28 |
+
}
|
29 |
+
|
30 |
+
ob_start();
|
31 |
+
call_user_func( array( $this->{$current_tab}, 'dispatch' ) );
|
32 |
+
$output = ob_get_clean();
|
33 |
+
|
34 |
+
echo wpbdp_admin_header();
|
35 |
+
echo wpbdp_admin_notices();
|
36 |
+
?>
|
37 |
+
|
38 |
+
<?php if ( 'csv_import' == $current_tab ) : ?>
|
39 |
+
<div class="wpbdp-csv-import-top-buttons">
|
40 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&action=example-csv' ) ); ?>" class="button"><?php _ex( 'See an example CSV import file', 'admin csv-import', 'business-directory-plugin' ); ?></a>
|
41 |
+
<a href="#help" class="button"><?php esc_html_e( 'Help', 'business-directory-plugin' ); ?></a>
|
42 |
+
</div>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
|
46 |
+
<h2 class="nav-tab-wrapper">
|
47 |
+
<a class="nav-tab <?php echo 'csv_import' == $current_tab ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&tab=csv_import' ) ); ?>"><span class="dashicons dashicons-download"></span> <?php _ex( 'Import', 'admin csv', 'business-directory-plugin' ); ?></a>
|
48 |
+
<a class="nav-tab <?php echo 'csv_export' == $current_tab ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=wpbdp_admin_csv&tab=csv_export' ) ); ?>"><span class="dashicons dashicons-upload"></span> <?php _ex( 'Export', 'admin csv', 'business-directory-plugin' ); ?></a>
|
49 |
+
</h2>
|
50 |
+
<?php
|
51 |
+
echo $output;
|
52 |
+
echo wpbdp_admin_footer();
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
includes/admin/controllers/class-admin-fees.php
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @since 5.0
|
4 |
+
*/
|
5 |
+
class WPBDP__Admin__Fees extends WPBDP__Admin__Controller {
|
6 |
+
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct();
|
9 |
+
$this->api = $this->wpbdp->fees;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @override
|
14 |
+
*/
|
15 |
+
function _enqueue_scripts() {
|
16 |
+
switch ( $this->current_view ) {
|
17 |
+
case 'add-fee':
|
18 |
+
case 'edit-fee':
|
19 |
+
wp_enqueue_style( 'wp-color-picker' );
|
20 |
+
wp_enqueue_style( 'wpbdp-js-select2-css' );
|
21 |
+
|
22 |
+
wp_enqueue_script(
|
23 |
+
'wpbdp-admin-fees-js',
|
24 |
+
WPBDP_ASSETS_URL . 'js/admin-fees.min.js',
|
25 |
+
array( 'wp-color-picker', 'wpbdp-js-select2' ),
|
26 |
+
WPBDP_VERSION,
|
27 |
+
true
|
28 |
+
);
|
29 |
+
|
30 |
+
break;
|
31 |
+
default:
|
32 |
+
break;
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! in_array( $this->current_view, array( 'add-fee', 'edit-fee' ), true ) )
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
|
39 |
+
function index() {
|
40 |
+
require_once( WPBDP_INC . 'admin/helpers/tables/class-fees-table.php' );
|
41 |
+
|
42 |
+
$table = new WPBDP__Admin__Fees_Table();
|
43 |
+
$table->prepare_items();
|
44 |
+
|
45 |
+
$order_options = array();
|
46 |
+
foreach ( array( 'label' => _x( 'Label', 'fees order', 'business-directory-plugin' ),
|
47 |
+
'amount' => __( 'Amount', 'business-directory-plugin' ),
|
48 |
+
'days' => _x( 'Duration', 'fees order', 'business-directory-plugin' ),
|
49 |
+
'images' => __( 'Images', 'business-directory-plugin' ),
|
50 |
+
'custom' => _x( 'Custom Order', 'fees order', 'business-directory-plugin' ) ) as $k => $l ) {
|
51 |
+
$order_options[ $k ] = $l;
|
52 |
+
}
|
53 |
+
|
54 |
+
return array(
|
55 |
+
'table' => $table,
|
56 |
+
'order_options' => $order_options,
|
57 |
+
'current_order' => wpbdp_get_option( 'fee-order' )
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
+
function add_fee() {
|
62 |
+
return $this->insert_or_update_fee( 'insert' );
|
63 |
+
}
|
64 |
+
|
65 |
+
function edit_fee() {
|
66 |
+
return $this->insert_or_update_fee( 'update' );
|
67 |
+
}
|
68 |
+
|
69 |
+
private function insert_or_update_fee( $mode ) {
|
70 |
+
if ( ! empty( $_POST ) ) {
|
71 |
+
$nonce = array( 'nonce' => 'wpbdp-fees' );
|
72 |
+
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( ! empty( $_POST['fee'] ) ) {
|
76 |
+
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
77 |
+
$posted_values = stripslashes_deep( $_POST['fee'] );
|
78 |
+
$posted_values = $this->sanitize_posted_values( $posted_values );
|
79 |
+
|
80 |
+
if ( 0 == intval( wpbdp_get_var( array( 'param' => 'limit_categories', 'default' => 0 ), 'post' ) ) ) {
|
81 |
+
$posted_values['supported_categories'] = 'all';
|
82 |
+
}
|
83 |
+
|
84 |
+
if ( ! isset( $posted_values['sticky'] ) ) {
|
85 |
+
$posted_values['sticky'] = 0;
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( ! isset( $posted_values['recurring'] ) ) {
|
89 |
+
$posted_values['recurring'] = 0;
|
90 |
+
}
|
91 |
+
} else {
|
92 |
+
$posted_values = array();
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( 'insert' == $mode ) {
|
96 |
+
$fee = new WPBDP__Fee_Plan( $posted_values );
|
97 |
+
} else {
|
98 |
+
$fee = $this->get_or_die();
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( $posted_values ) {
|
102 |
+
if ( $fee->exists() ) {
|
103 |
+
$result = $fee->update( $posted_values );
|
104 |
+
} else {
|
105 |
+
$result = $fee->save();
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( ! is_wp_error( $result ) ) {
|
109 |
+
if ( 'insert' == $mode ) {
|
110 |
+
wpbdp_admin_message( _x( 'Fee plan added.', 'fees admin', 'business-directory-plugin' ) );
|
111 |
+
} else {
|
112 |
+
wpbdp_admin_message( _x( 'Fee plan updated.', 'fees admin', 'business-directory-plugin' ) );
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
foreach ( $result->get_error_messages() as $msg ) {
|
116 |
+
wpbdp_admin_message( $msg, 'error' );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
return array( 'fee' => $fee );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Sanitize each field in the fee form.
|
126 |
+
*
|
127 |
+
* @since 5.11.2
|
128 |
+
*/
|
129 |
+
private function sanitize_posted_values( $posted_values ) {
|
130 |
+
$sanitizing = $this->sanitize_mapping();
|
131 |
+
foreach ( $posted_values as $k => $v ) {
|
132 |
+
$sanitize = isset( $sanitizing[ $k ] ) ? $sanitizing[ $k ] : 'sanitize_text_field';
|
133 |
+
wpbdp_sanitize_value( $sanitize, $posted_values[ $k ] );
|
134 |
+
}
|
135 |
+
return $posted_values;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* This shows how to sanitize each field in the fee form.
|
140 |
+
*
|
141 |
+
* @since 5.11.2
|
142 |
+
*/
|
143 |
+
private function sanitize_mapping() {
|
144 |
+
return array(
|
145 |
+
'description' => 'wp_kses_post',
|
146 |
+
'days' => 'absint',
|
147 |
+
'images' => 'absint',
|
148 |
+
);
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @since 5.9
|
153 |
+
*/
|
154 |
+
private function get_or_die() {
|
155 |
+
$fee = wpbdp_get_fee_plan( wpbdp_get_var( array( 'param' => 'id' ) ) );
|
156 |
+
|
157 |
+
if ( ! $fee ) {
|
158 |
+
wp_die();
|
159 |
+
}
|
160 |
+
return $fee;
|
161 |
+
}
|
162 |
+
|
163 |
+
function delete_fee() {
|
164 |
+
$fee = $this->get_or_die();
|
165 |
+
|
166 |
+
list( $do, $html ) = $this->_confirm_action( array(
|
167 |
+
'cancel_url' => remove_query_arg( array( 'wpbdp-view', 'id' ) ),
|
168 |
+
) );
|
169 |
+
|
170 |
+
if ( $do && $fee->delete() ) {
|
171 |
+
wpbdp_admin_message( sprintf( _x( 'Fee "%s" deleted.', 'fees admin', 'business-directory-plugin' ), $fee->label ) );
|
172 |
+
return $this->_redirect( 'index' );
|
173 |
+
}
|
174 |
+
|
175 |
+
return $html;
|
176 |
+
}
|
177 |
+
|
178 |
+
function toggle_fee() {
|
179 |
+
$fee = $this->get_or_die();
|
180 |
+
$fee->enabled = ! $fee->enabled;
|
181 |
+
$fee->save();
|
182 |
+
|
183 |
+
wpbdp_admin_message( _x( 'Fee disabled.', 'fees admin', 'business-directory-plugin' ) );
|
184 |
+
return $this->_redirect( 'index' );
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
includes/admin/controllers/class-admin-payments.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once WPBDP_PATH . 'includes/models/class-payment.php';
|
3 |
+
|
4 |
+
/**
|
5 |
+
* @since 5.0
|
6 |
+
*/
|
7 |
+
class WPBDP__Admin__Payments extends WPBDP__Admin__Controller {
|
8 |
+
|
9 |
+
function _enqueue_scripts() {
|
10 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
11 |
+
wpbdp_enqueue_jquery_ui_style();
|
12 |
+
parent::_enqueue_scripts();
|
13 |
+
}
|
14 |
+
|
15 |
+
function index() {
|
16 |
+
$_SERVER['REQUEST_URI'] = remove_query_arg( 'listing' );
|
17 |
+
|
18 |
+
if ( 'payment_delete' === wpbdp_get_var( array( 'param' => 'message' ) ) ) {
|
19 |
+
wpbdp_admin_message( _x( 'Payment deleted.', 'payments admin', 'business-directory-plugin' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
require_once WPBDP_INC . 'admin/helpers/tables/class-payments-table.php';
|
23 |
+
|
24 |
+
$table = new WPBDP__Admin__Payments_Table();
|
25 |
+
$table->prepare_items();
|
26 |
+
|
27 |
+
$listing_id = wpbdp_get_var( array( 'param' => 'listing' ) );
|
28 |
+
if ( ! empty( $listing_id ) ) {
|
29 |
+
$listing = WPBDP_Listing::get( $listing_id );
|
30 |
+
|
31 |
+
if ( $listing ) {
|
32 |
+
wpbdp_admin_message(
|
33 |
+
str_replace(
|
34 |
+
'<a>',
|
35 |
+
'<a href="' . esc_url( remove_query_arg( 'listing' ) ) . '">',
|
36 |
+
sprintf(
|
37 |
+
_x( 'You\'re seeing payments related to listing: "%1$s" (ID #%2$d). <a>Click here</a> to see all payments.', 'payments admin', 'business-directory-plugin' ),
|
38 |
+
esc_html( $listing->get_title() ),
|
39 |
+
esc_html( $listing->get_id() )
|
40 |
+
)
|
41 |
+
)
|
42 |
+
);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
return compact( 'table' );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Used to render the backend payments admin page.
|
51 |
+
* Payment object null is checked in templates/admin/payments-details.tpl.php file.
|
52 |
+
* Adding a redirect here will cause an indefinite loop.
|
53 |
+
*/
|
54 |
+
public function details() {
|
55 |
+
if ( 1 == wpbdp_get_var( array( 'param' => 'message' ) ) ) {
|
56 |
+
wpbdp_admin_message( _x( 'Payment details updated.', 'payments admin', 'business-directory-plugin' ) );
|
57 |
+
}
|
58 |
+
|
59 |
+
$payment_id = wpbdp_get_var( array( 'param' => 'payment-id' ) );
|
60 |
+
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
61 |
+
return compact( 'payment' );
|
62 |
+
}
|
63 |
+
|
64 |
+
public function payment_update() {
|
65 |
+
$data = wpbdp_get_var( array( 'param' => 'payment' ), 'post' );
|
66 |
+
$nonce = array( 'nonce' => 'payment-' . absint( $data['id'] ) );
|
67 |
+
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
68 |
+
|
69 |
+
$payment = WPBDP_Payment::objects()->get( absint( $data['id'] ) );
|
70 |
+
$this->handle_payment_not_found_redirect( $payment );
|
71 |
+
$payment->update( $data );
|
72 |
+
$payment->save();
|
73 |
+
|
74 |
+
wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wpbdp_admin_payments&wpbdp-view=details&payment-id=' . $payment->id . '&message=1' ) ) );
|
75 |
+
exit;
|
76 |
+
}
|
77 |
+
|
78 |
+
public function payment_delete() {
|
79 |
+
$payment_id = wpbdp_get_var( array( 'param' => 'payment-id', 'sanitize' => 'absint' ), 'request' );
|
80 |
+
$nonce = array( 'nonce' => 'payment-' . $payment_id );
|
81 |
+
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
82 |
+
|
83 |
+
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
84 |
+
$this->handle_payment_not_found_redirect( $payment );
|
85 |
+
$payment->delete();
|
86 |
+
|
87 |
+
wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wpbdp_admin_payments&message=payment_delete' ) ) );
|
88 |
+
exit;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function ajax_add_note() {
|
92 |
+
WPBDP_App_Helper::permission_check( 'edit_posts' );
|
93 |
+
check_ajax_referer( 'wpbdp_ajax', 'nonce' );
|
94 |
+
|
95 |
+
$payment_id = wpbdp_get_var( array( 'param' => 'payment_id', 'sanitize' => 'absint' ), 'post' );
|
96 |
+
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
97 |
+
$text = trim( wpbdp_get_var( array( 'param' => 'note', 'sanitize' => 'sanitize_textarea_field' ), 'post' ) );
|
98 |
+
|
99 |
+
$res = new WPBDP_Ajax_Response();
|
100 |
+
|
101 |
+
if ( ! $payment || ! $text ) {
|
102 |
+
$res->send_error();
|
103 |
+
}
|
104 |
+
|
105 |
+
$note = wpbdp_insert_log(
|
106 |
+
array(
|
107 |
+
'log_type' => 'payment.note',
|
108 |
+
'message' => $text,
|
109 |
+
'actor' => 'user:' . get_current_user_id(),
|
110 |
+
'object_id' => $payment_id,
|
111 |
+
)
|
112 |
+
);
|
113 |
+
if ( ! $note ) {
|
114 |
+
$res->send_error();
|
115 |
+
}
|
116 |
+
|
117 |
+
$res->add( 'note', $note );
|
118 |
+
$res->add( 'html', wpbdp_render_page( WPBDP_PATH . 'templates/admin/payments-note.tpl.php', compact( 'note', 'payment_id' ) ) );
|
119 |
+
$res->send();
|
120 |
+
}
|
121 |
+
|
122 |
+
public function ajax_delete_note() {
|
123 |
+
$nonce = array( 'nonce' => 'wpbdp_ajax' );
|
124 |
+
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
125 |
+
|
126 |
+
$payment_id = wpbdp_get_var( array( 'param' => 'payment_id', 'sanitize' => 'absint' ) );
|
127 |
+
$note_key = trim( wpbdp_get_var( array( 'param' => 'note', 'sanitize' => 'sanitize_textarea_field' ) ) );
|
128 |
+
|
129 |
+
$res = new WPBDP_Ajax_Response();
|
130 |
+
|
131 |
+
$note = wpbdp_get_log( $note_key );
|
132 |
+
if ( 'payment.note' != $note->log_type || $payment_id != $note->object_id ) {
|
133 |
+
$res->send_error();
|
134 |
+
}
|
135 |
+
|
136 |
+
wpbdp_delete_log( $note_key );
|
137 |
+
|
138 |
+
$res->add( 'note', $note );
|
139 |
+
$res->send();
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Redirect to error page if the payment object id not found.
|
144 |
+
*
|
145 |
+
* @param WPBDP_Payment|null $payment The payment object pulled from the database. If the object does not exist, null is returned.
|
146 |
+
*
|
147 |
+
* @since 5.14.3
|
148 |
+
*/
|
149 |
+
private function handle_payment_not_found_redirect( $payment ) {
|
150 |
+
if ( ! $payment ) {
|
151 |
+
// Not found.
|
152 |
+
wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wpbdp_admin_payments&wpbdp-view=details' ) ) );
|
153 |
+
exit;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
includes/admin/controllers/class-settings-admin.php
ADDED
@@ -0,0 +1,803 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class WPBDP__Settings_Admin
|
4 |
+
*
|
5 |
+
* @package BDP/Settings Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
class WPBDP__Settings_Admin {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Used to lookup sections by ID during the section callback execution.
|
12 |
+
*/
|
13 |
+
private $sections_by_id = array();
|
14 |
+
|
15 |
+
|
16 |
+
public function __construct() {
|
17 |
+
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
18 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
19 |
+
add_filter( 'wpbdp_admin_menu_items', array( $this, 'menu_item' ) );
|
20 |
+
|
21 |
+
// Reset settings action.
|
22 |
+
add_action( 'wpbdp_action_reset-default-settings', array( &$this, 'settings_reset_defaults' ) );
|
23 |
+
|
24 |
+
add_action( 'wp_ajax_wpbdp-file-upload', array( $this, '_ajax_file_upload' ) );
|
25 |
+
add_action( 'wp_ajax_nopriv_wpbdp-file-upload', array( $this, '_ajax_file_upload' ) );
|
26 |
+
|
27 |
+
add_filter( 'wpbdp_setting_type_pro_license', array( &$this, 'no_license' ), 20, 2 );
|
28 |
+
}
|
29 |
+
|
30 |
+
public function enqueue_scripts( $hook ) {
|
31 |
+
// strstr() until https://core.trac.wordpress.org/ticket/18857 is fixed.
|
32 |
+
if ( false !== strstr( $hook, 'wpbdp_settings' ) ) {
|
33 |
+
wp_enqueue_script(
|
34 |
+
'wpbdp-admin-settings',
|
35 |
+
WPBDP_ASSETS_URL . 'js/admin-settings.js',
|
36 |
+
array(),
|
37 |
+
WPBDP_VERSION,
|
38 |
+
true
|
39 |
+
);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
public function menu_item( $menu ) {
|
44 |
+
$menu['wpbdp_settings'] = array(
|
45 |
+
'title' => _x( 'Settings', 'admin menu', 'business-directory-plugin' ),
|
46 |
+
'callback' => array( $this, 'settings_page' ),
|
47 |
+
'priority' => 0,
|
48 |
+
);
|
49 |
+
return $menu;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function register_settings() {
|
53 |
+
$all_groups = wpbdp()->settings->get_registered_groups();
|
54 |
+
$non_tabs = wp_list_filter( $all_groups, array( 'type' => 'tab' ), 'NOT' );
|
55 |
+
|
56 |
+
foreach ( $non_tabs as $group_id => $group ) {
|
57 |
+
switch ( $group['type'] ) {
|
58 |
+
case 'subtab':
|
59 |
+
add_settings_section(
|
60 |
+
'wpbdp_settings_subtab_' . $group_id,
|
61 |
+
'',
|
62 |
+
'__return_false',
|
63 |
+
'wpbdp_settings_subtab_' . $group_id
|
64 |
+
);
|
65 |
+
break;
|
66 |
+
case 'section':
|
67 |
+
add_settings_section(
|
68 |
+
'wpbdp_settings_subtab_' . $group['parent'] . '_' . $group_id,
|
69 |
+
$group['title'],
|
70 |
+
array( $this, 'section_header_callback' ),
|
71 |
+
'wpbdp_settings_subtab_' . $group['parent']
|
72 |
+
);
|
73 |
+
break;
|
74 |
+
default:
|
75 |
+
break;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
foreach ( wpbdp()->settings->get_registered_settings() as $setting_id => $setting ) {
|
80 |
+
$args = array_merge(
|
81 |
+
array(
|
82 |
+
'label_for' => $setting['id'],
|
83 |
+
'class' => '',
|
84 |
+
'desc' => '',
|
85 |
+
'tooltip' => '',
|
86 |
+
),
|
87 |
+
$setting
|
88 |
+
);
|
89 |
+
|
90 |
+
if ( 'silent' == $setting['type'] ) {
|
91 |
+
continue;
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( isset( $all_groups[ $args['group'] ] ) ) {
|
95 |
+
switch ( $all_groups[ $args['group'] ]['type'] ) {
|
96 |
+
case 'subtab':
|
97 |
+
$subtab_group = 'wpbdp_settings_subtab_' . $args['group'];
|
98 |
+
$section_group = $subtab_group;
|
99 |
+
break;
|
100 |
+
case 'section':
|
101 |
+
$subtab_group = 'wpbdp_settings_subtab_' . $all_groups[ $args['group'] ]['parent'];
|
102 |
+
$section_group = $subtab_group . '_' . $args['group'];
|
103 |
+
break;
|
104 |
+
}
|
105 |
+
} else {
|
106 |
+
wpbdp_debug_e( 'group not found: ', $args );
|
107 |
+
}
|
108 |
+
|
109 |
+
add_settings_field(
|
110 |
+
'wpbdp_settings[' . $args['id'] . ']',
|
111 |
+
$args['name'],
|
112 |
+
array( $this, 'setting_callback' ),
|
113 |
+
$subtab_group,
|
114 |
+
$section_group,
|
115 |
+
$args
|
116 |
+
);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
public function section_header_callback( $wp_section ) {
|
121 |
+
return;
|
122 |
+
|
123 |
+
if ( ! empty( $section['desc'] ) ) {
|
124 |
+
echo '<p class="wpbdp-setting-description wpbdp-settings-section-description">';
|
125 |
+
echo $section['desc'];
|
126 |
+
echo '</p>';
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* @since 5.9.1
|
132 |
+
*/
|
133 |
+
private function add_requirement( $setting ) {
|
134 |
+
if ( ! empty( $setting['requirements'] ) ) {
|
135 |
+
$reqs_info = array();
|
136 |
+
|
137 |
+
foreach ( $setting['requirements'] as $r ) {
|
138 |
+
$reqs_info[] = array( $r, (bool) wpbdp_get_option( str_replace( '!', '', $r ) ) );
|
139 |
+
}
|
140 |
+
|
141 |
+
echo ' data-requirements="' . esc_attr( wp_json_encode( $reqs_info ) ) . '"';
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
public function setting_callback( $setting ) {
|
146 |
+
if ( 'callback' == $setting['type'] ) {
|
147 |
+
if ( ! empty( $setting['callback'] ) && is_callable( $setting['callback'] ) ) {
|
148 |
+
$callback_html = call_user_func( $setting['callback'], $setting );
|
149 |
+
} else {
|
150 |
+
$callback_html = 'Missing callback';
|
151 |
+
}
|
152 |
+
} else {
|
153 |
+
$value = wpbdp()->settings->get_option( $setting['id'] );
|
154 |
+
|
155 |
+
ob_start();
|
156 |
+
|
157 |
+
if ( method_exists( $this, 'setting_' . $setting['type'] . '_callback' ) ) {
|
158 |
+
call_user_func( array( $this, 'setting_' . $setting['type'] . '_callback' ), $setting, $value );
|
159 |
+
} else {
|
160 |
+
$this->setting_missing_callback( $setting, $value );
|
161 |
+
}
|
162 |
+
|
163 |
+
$callback_html = ob_get_clean();
|
164 |
+
}
|
165 |
+
|
166 |
+
echo '<div id="wpbdp-settings-' . esc_attr( $setting['id'] ) . '" class="wpbdp-settings-setting wpbdp-settings-type-' . esc_attr( $setting['type'] ) . '" ';
|
167 |
+
if ( ! empty( $setting['attrs'] ) ) {
|
168 |
+
wpbdp_html_attributes( $setting['attrs'], array( 'id', 'class' ), true );
|
169 |
+
}
|
170 |
+
|
171 |
+
echo ' data-setting-id="' . esc_attr( $setting['id'] ) . '" ';
|
172 |
+
$this->add_requirement( $setting );
|
173 |
+
echo '>';
|
174 |
+
|
175 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
176 |
+
echo apply_filters( 'wpbdp_admin_settings_render', $callback_html, $setting );
|
177 |
+
echo '<span id="' . esc_attr( $setting['id'] ) . '"></span>';
|
178 |
+
echo '</div>';
|
179 |
+
}
|
180 |
+
|
181 |
+
public function setting_tooltip( $tooltip = '' ) {
|
182 |
+
if ( ! $tooltip ) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
+
|
186 |
+
return '<span class="wpbdp-setting-tooltip wpbdp-tooltip dashicons dashicons-editor-help" title="' . esc_attr( $tooltip ) . '"></span>';
|
187 |
+
}
|
188 |
+
|
189 |
+
public function setting_missing_callback( $setting, $value ) {
|
190 |
+
if ( has_filter( 'wpbdp_setting_type_' . $setting['type'] ) ) {
|
191 |
+
echo apply_filters( 'wpbdp_setting_type_' . $setting['type'], $setting, $value );
|
192 |
+
} else {
|
193 |
+
echo 'Callback Missing';
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
public function setting_text_callback( $setting, $value ) {
|
198 |
+
echo '<input type="text" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '" />';
|
199 |
+
|
200 |
+
if ( ! empty( $setting['desc'] ) ) {
|
201 |
+
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
public function setting_number_callback( $setting, $value ) {
|
206 |
+
echo '<input type="number" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '"';
|
207 |
+
|
208 |
+
if ( isset( $setting['min'] ) ) {
|
209 |
+
echo 'min="' . $setting['min'] . '"';
|
210 |
+
}
|
211 |
+
|
212 |
+
if ( isset( $setting['step'] ) ) {
|
213 |
+
echo 'step="' . $setting['step'] . '"';
|
214 |
+
}
|
215 |
+
|
216 |
+
if ( isset( $setting['max'] ) ) {
|
217 |
+
echo 'max="' . $setting['max'] . '"';
|
218 |
+
}
|
219 |
+
echo '/>';
|
220 |
+
|
221 |
+
if ( ! empty( $setting['desc'] ) ) {
|
222 |
+
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
public function setting_textarea_callback( $setting, $value ) {
|
227 |
+
echo '<textarea id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '">';
|
228 |
+
echo esc_textarea( $value );
|
229 |
+
echo '</textarea>';
|
230 |
+
|
231 |
+
if ( ! empty( $setting['desc'] ) ) {
|
232 |
+
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
public function setting_checkbox_callback( $setting, $value ) {
|
237 |
+
$save = $this->checkbox_saved_value( $setting );
|
238 |
+
if ( 1 === $save ) {
|
239 |
+
$value = (bool) $value;
|
240 |
+
}
|
241 |
+
|
242 |
+
echo '<input type="hidden" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="0" />';
|
243 |
+
echo '<label>';
|
244 |
+
echo '<input type="checkbox" id="' . esc_attr( $setting['id'] ) . '" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="' . esc_attr( $save ) . '" ' . checked( $value, $save, false ) . ' />';
|
245 |
+
|
246 |
+
if ( ! empty( $setting['desc'] ) ) {
|
247 |
+
echo wp_kses_post( $setting['desc'] );
|
248 |
+
}
|
249 |
+
echo '</label>';
|
250 |
+
|
251 |
+
if ( ! empty( $setting['tooltip'] ) ) {
|
252 |
+
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['tooltip'] ) . '</span>';
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Allow a check box to have a value other than 1.
|
258 |
+
*/
|
259 |
+
private function checkbox_saved_value( $setting ) {
|
260 |
+
if ( empty( $setting['option'] ) ) {
|
261 |
+
return 1;
|
262 |
+
}
|
263 |
+
|
264 |
+
return $setting['option'];
|
265 |
+
}
|
266 |
+
|
267 |
+
public function setting_radio_callback( $setting, $value ) {
|
268 |
+
if ( empty( $setting['options'] ) ) {
|
269 |
+
return;
|
270 |
+
}
|
271 |
+
|
272 |
+
echo '<div class="wpbdp-settings-radio-options">';
|
273 |
+
foreach ( $setting['options'] as $option_value => $option_label ) {
|
274 |
+
echo '<div class="wpbdp-settings-radio-option">';
|
275 |
+
echo '<input type="radio" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $option_value ) . '" ' . checked( $option_value, $value, false ) . ' id="wpbdp-settings-' . $setting['id'] . '-radio-' . $option_value . '" />';
|
276 |
+
echo '<label for="wpbdp-settings-' . $setting['id'] . '-radio-' . $option_value . '">';
|
277 |
+
echo $option_label;
|
278 |
+
echo '</label>';
|
279 |
+
echo '</div>';
|
280 |
+
}
|
281 |
+
echo '</div>';
|
282 |
+
|
283 |
+
if ( ! empty( $setting['desc'] ) ) {
|
284 |
+
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Hide a field setting that is no longer used.
|
290 |
+
*
|
291 |
+
* @since 5.9.1
|
292 |
+
*/
|
293 |
+
public function setting_hidden_callback( $setting, $value ) {
|
294 |
+
?>
|
295 |
+
<input type="hidden" value="<?php echo esc_attr( $value ); ?>" name="wpbdp_settings[<?php echo esc_attr( $setting['id'] ); ?>]"/>
|
296 |
+
<?php
|
297 |
+
}
|
298 |
+
|
299 |
+
public function setting_multicheck_callback( $setting, $value ) {
|
300 |
+
if ( empty( $setting['options'] ) ) {
|
301 |
+
return;
|
302 |
+
}
|
303 |
+
|
304 |
+
$value = (array) $value;
|
305 |
+
|
306 |
+
echo '<input type="hidden" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . '][]" value="" />';
|
307 |
+
|
308 |
+
echo '<div class="wpbdp-settings-multicheck-options wpbdp-grid">';
|
309 |
+
$n = 0;
|
310 |
+
foreach ( $setting['options'] as $option_value => $option_label ) {
|
311 |
+
echo '<div class="wpbdp-settings-multicheck-option wpbdp-half wpbdp-settings-multicheck-option-no-' . esc_attr( $n ) . '">';
|
312 |
+
echo '<input type="checkbox" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . '][]" id="wpbdp-' . esc_attr( $setting['id'] . '-checkbox-no-' . $n ) . '" value="' . esc_attr( $option_value ) . '" ' . checked( in_array( $option_value, $value ), true, false ) . ' />';
|
313 |
+
echo '<label for="wpbdp-' . esc_attr( $setting['id'] . '-checkbox-no-' . $n ) . '">';
|
314 |
+
echo esc_html( $option_label );
|
315 |
+
echo '</label>';
|
316 |
+
echo '</div>';
|
317 |
+
|
318 |
+
$n++;
|
319 |
+
}
|
320 |
+
|
321 |
+
echo '</div>';
|
322 |
+
|
323 |
+
if ( ! empty( $setting['desc'] ) ) {
|
324 |
+
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
public function setting_select_callback( $setting, $value ) {
|
329 |
+
if ( empty( $setting['options'] ) ) {
|
330 |
+
return;
|
331 |
+
}
|
332 |
+
|
333 |
+
$multiple = ! empty( $setting['multiple'] ) && $setting['multiple'];
|
334 |
+
|
335 |
+
echo '<select id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']' . ( $multiple ? '[]' : '' ) . '" ' . ( $multiple ? 'multiple="multiple"' : '' ) . '>';
|
336 |
+
foreach ( $setting['options'] as $option_value => $option_label ) {
|
337 |
+
if ( $multiple ) {
|
338 |
+
$selected = in_array( $option_value, $value );
|
339 |
+
} else {
|
340 |
+
$selected = ( $option_value == $value );
|
341 |
+
}
|
342 |
+
|
343 |
+
echo '<option value="' . $option_value . '" ' . selected( $selected, true, false ) . '>' . $option_label . '</option>';
|
344 |
+
}
|
345 |
+
echo '</select>';
|
346 |
+
|
347 |
+
if ( ! empty( $setting['desc'] ) ) {
|
348 |
+
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
public function setting_file_callback( $setting, $value ) {
|
353 |
+
$html = '';
|
354 |
+
$html .= sprintf(
|
355 |
+
'<input id="%s" type="hidden" name="wpbdp_settings[%s]" value="%s" />',
|
356 |
+
$setting['id'],
|
357 |
+
$setting['id'],
|
358 |
+
$value
|
359 |
+
);
|
360 |
+
|
361 |
+
$html .= '<div class="preview">';
|
362 |
+
if ( $value ) {
|
363 |
+
$html .= wp_get_attachment_image( $value, 'wpbdp-thumb', false );
|
364 |
+
}
|
365 |
+
|
366 |
+
$html .= sprintf(
|
367 |
+
'<a href="http://google.com" class="delete" onclick="return WPBDP.fileUpload.deleteUpload(\'%s\', \'%s\');" style="%s">%s</a>',
|
368 |
+
$setting['id'],
|
369 |
+
'wpbdp_settings[' . $setting['id'] . ']',
|
370 |
+
empty( $value ) ? 'display: none;' : '',
|
371 |
+
_x( 'Remove', 'admin settings', 'business-directory-plugin' )
|
372 |
+
);
|
373 |
+
|
374 |
+
$html .= '</div>';
|
375 |
+
|
376 |
+
$nonce = wp_create_nonce( 'wpbdp-file-upload-' . $setting['id'] );
|
377 |
+
$ajax_url = add_query_arg(
|
378 |
+
array(
|
379 |
+
'action' => 'wpbdp-file-upload',
|
380 |
+
'setting_id' => $setting['id'],
|
381 |
+
'element' => 'wpbdp_settings[' . $setting['id'] . ']',
|
382 |
+
'nonce' => $nonce,
|
383 |
+
),
|
384 |
+
admin_url( 'admin-ajax.php' )
|
385 |
+
);
|
386 |
+
|
387 |
+
$html .= '<div class="wpbdp-upload-widget">';
|
388 |
+
$html .= sprintf(
|
389 |
+
'<iframe class="wpbdp-upload-iframe" name="upload-iframe-%s" id="wpbdp-upload-iframe-%s" src="%s" scrolling="no" seamless="seamless" border="0" frameborder="0"></iframe>',
|
390 |
+
$setting['id'],
|
391 |
+
$setting['id'],
|
392 |
+
$ajax_url
|
393 |
+
);
|
394 |
+
$html .= '</div>';
|
395 |
+
|
396 |
+
echo $html;
|
397 |
+
}
|
398 |
+
|
399 |
+
public function setting_url_callback( $setting, $value ) {
|
400 |
+
echo '<input type="url" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '" />';
|
401 |
+
|
402 |
+
if ( ! empty( $setting['desc'] ) ) {
|
403 |
+
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
public function setting_color_callback( $setting, $value ) {
|
408 |
+
wp_enqueue_script( 'wp-color-picker' );
|
409 |
+
wp_enqueue_style( 'wp-color-picker' );
|
410 |
+
|
411 |
+
echo '<input type="text" class="cpa-color-picker" id="' . esc_attr( $setting['id'] ) . '" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="' . esc_attr( $value ) . '"/>';
|
412 |
+
|
413 |
+
if ( ! empty( $setting['desc'] ) ) {
|
414 |
+
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
public function setting_text_template_callback( $setting, $value ) {
|
419 |
+
$original_description = $setting['desc'];
|
420 |
+
$placeholders = isset( $setting['placeholders'] ) ? $setting['placeholders'] : array();
|
421 |
+
|
422 |
+
if ( $placeholders ) {
|
423 |
+
foreach ( $placeholders as $pholder => $desc ) {
|
424 |
+
$placeholders[ $pholder ] = sprintf( '%s - %s', '[' . $pholder . ']', $desc );
|
425 |
+
}
|
426 |
+
|
427 |
+
$placeholders_text = implode( ', ', $placeholders ) . '.';
|
428 |
+
} else {
|
429 |
+
$placeholders_text = '';
|
430 |
+
}
|
431 |
+
|
432 |
+
if ( $setting['desc'] && $placeholders_text ) {
|
433 |
+
$setting['desc'] = $setting['desc'] . '<br/><br/>' . sprintf( _x( 'Valid placeholders: %s', 'admin settings', 'business-directory-plugin' ), $placeholders_text );
|
434 |
+
} elseif ( $placeholders_text ) {
|
435 |
+
$settings['desc'] = $placeholders_text;
|
436 |
+
}
|
437 |
+
|
438 |
+
// TODO: this is a proxy for _setting_text (for now).
|
439 |
+
ob_start();
|
440 |
+
$this->setting_text_callback( $setting, $value );
|
441 |
+
$html = ob_get_contents();
|
442 |
+
ob_end_clean();
|
443 |
+
|
444 |
+
$setting['desc'] = $original_description;
|
445 |
+
|
446 |
+
echo $html;
|
447 |
+
}
|
448 |
+
|
449 |
+
public function setting_email_template_callback( $setting, $value ) {
|
450 |
+
if ( ! is_array( $value ) ) {
|
451 |
+
$value = array(
|
452 |
+
'subject' => $setting['default']['subject'],
|
453 |
+
'body' => $value,
|
454 |
+
);
|
455 |
+
}
|
456 |
+
|
457 |
+
$args = array(
|
458 |
+
'setting_name' => 'wpbdp_settings[' . $setting['id'] . ']',
|
459 |
+
'email_subject' => $value['subject'],
|
460 |
+
'email_body' => $value['body'],
|
461 |
+
'placeholders' => ! empty( $setting['placeholders'] ) ? $setting['placeholders'] : array(),
|
462 |
+
);
|
463 |
+
|
464 |
+
if ( ! empty( $setting['desc'] ) ) {
|
465 |
+
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
466 |
+
}
|
467 |
+
|
468 |
+
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-email.tpl.php', $args );
|
469 |
+
}
|
470 |
+
|
471 |
+
/**
|
472 |
+
* @since 5.9.1
|
473 |
+
*/
|
474 |
+
public function no_license( $setting, $value ) {
|
475 |
+
$html = '<p class="howto">';
|
476 |
+
$html .= esc_html__( 'Your license key provides access to new features and updates.', 'business-directory-plugin' );
|
477 |
+
$html .= '</p>';
|
478 |
+
$html .= '<p>' . esc_html__( 'You\'re using Business Directory Plugin Lite. Enjoy!', 'business-directory-plugin' );
|
479 |
+
$html .= ' 🙂</p>';
|
480 |
+
|
481 |
+
return $html;
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Use for non-settings.
|
486 |
+
*
|
487 |
+
* @since 5.9
|
488 |
+
*/
|
489 |
+
public function setting_none_callback() {
|
490 |
+
return;
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* @since 5.9.1
|
495 |
+
*/
|
496 |
+
private function setting_education_callback( $setting ) {
|
497 |
+
WPBDP_Admin_Education::show_tip_message( $setting['desc'] ); // already escaped
|
498 |
+
}
|
499 |
+
|
500 |
+
public function setting_expiration_notices_callback( $setting, $value ) {
|
501 |
+
?>
|
502 |
+
<div class="wpbdp-settings-expiration-notices">
|
503 |
+
<button id="wpbdp-settings-expiration-notices-add-btn" class="button"><?php _ex( 'Add notice', 'expiration notices', 'business-directory-plugin' ); ?></button>
|
504 |
+
|
505 |
+
<div id="wpbdp-settings-expiration-notices-add">
|
506 |
+
<?php
|
507 |
+
$n = ! empty( $value ) ? max( array_keys( $value ) ) + 1 : 0;
|
508 |
+
echo wpbdp_render_page(
|
509 |
+
WPBDP_PATH . 'templates/admin/settings-email.tpl.php',
|
510 |
+
array(
|
511 |
+
'setting_name' => 'new_notice[' . $n . ']',
|
512 |
+
'uid' => '',
|
513 |
+
'container_class' => 'wpbdp-expiration-notice-email',
|
514 |
+
'extra_fields' => $this->setting_expiration_notices_email_extra_fields( 'new_notice[' . $n . ']', '', null ),
|
515 |
+
'editor_only' => true,
|
516 |
+
)
|
517 |
+
);
|
518 |
+
?>
|
519 |
+
</div>
|
520 |
+
|
521 |
+
<?php if ( ! $value ) : ?>
|
522 |
+
<p class="wpbdp-no-items"><?php _ex( 'No notices configured.', 'expiration notices', 'business-directory-plugin' ); ?></p>
|
523 |
+
<?php endif; ?>
|
524 |
+
|
525 |
+
<?php
|
526 |
+
foreach ( $value as $i => $notice ) {
|
527 |
+
$uid = uniqid( 'wpbdp-settings-email-' );
|
528 |
+
$vars = array(
|
529 |
+
'setting_name' => 'wpbdp_settings[' . $setting['id'] . '][' . $i . ']',
|
530 |
+
'uid' => $uid,
|
531 |
+
'container_class' => 'wpbdp-expiration-notice-email',
|
532 |
+
'email_subject' => $notice['subject'],
|
533 |
+
'email_body' => $notice['body'],
|
534 |
+
'extra_fields' => $this->setting_expiration_notices_email_extra_fields( 'wpbdp_settings[' . $setting['id'] . '][' . $i . ']', $uid, $notice ),
|
535 |
+
'after_container' => $this->setting_expiration_notices_email_summary( $notice ),
|
536 |
+
'before_buttons' => '<a href="#" class="delete">' . esc_html__( 'Delete', 'business-directory-plugin' ) . '</a>',
|
537 |
+
'placeholders' =>
|
538 |
+
array(
|
539 |
+
'site' => _x( 'Site title (with link)', 'settings', 'business-directory-plugin' ),
|
540 |
+
'author' => _x( 'Author\'s name', 'settings', 'business-directory-plugin' ),
|
541 |
+
'listing' => _x( 'Listing\'s name (with link)', 'settings', 'business-directory-plugin' ),
|
542 |
+
'expiration' => _x( 'Listing\'s expiration date', 'settings', 'business-directory-plugin' ),
|
543 |
+
'link' => _x( 'Listing\'s renewal link, formatted with an anchor tag', 'settings', 'business-directory-plugin' ),
|
544 |
+
'link-raw' => _x( 'Listing\'s renewal URL, unformatted by any tags', 'settings', 'business-directory-plugin' ),
|
545 |
+
'category' => _x( 'Listing\'s categories', 'settings', 'business-directory-plugin' ),
|
546 |
+
'payment_date' => _x( 'Listing\'s last payment date', 'settings', 'business-directory-plugin' ),
|
547 |
+
'access_key' => _x( 'Listing\'s access key', 'settings', 'business-directory-plugin' ),
|
548 |
+
),
|
549 |
+
);
|
550 |
+
|
551 |
+
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-email.tpl.php', $vars );
|
552 |
+
}
|
553 |
+
?>
|
554 |
+
</div>
|
555 |
+
<?php
|
556 |
+
}
|
557 |
+
|
558 |
+
private function setting_expiration_notices_email_summary( $notice ) {
|
559 |
+
$event = $notice['event'];
|
560 |
+
$listings = $notice['listings'];
|
561 |
+
$relative_time = ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : '';
|
562 |
+
|
563 |
+
if ( 'both' == $listings ) {
|
564 |
+
$recurring_modifier = _x( 'recurring and non-recurring', 'expiration notices', 'business-directory-plugin' );
|
565 |
+
} elseif ( 'recurring' == $listings ) {
|
566 |
+
$recurring_modifier = _x( 'recurring only', 'expiration notices', 'business-directory-plugin' );
|
567 |
+
} else {
|
568 |
+
$recurring_modifier = _x( 'non-recurring only', 'expiration notices', 'business-directory-plugin' );
|
569 |
+
}
|
570 |
+
|
571 |
+
if ( 'renewal' == $event ) {
|
572 |
+
$summary = sprintf( _x( 'Sent when a listing (%s) is renewed.', 'expiration notices', 'business-directory-plugin' ), $recurring_modifier );
|
573 |
+
}
|
574 |
+
|
575 |
+
if ( 'expiration' == $event ) {
|
576 |
+
if ( '0 days' == $relative_time ) {
|
577 |
+
$summary = sprintf( _x( 'Sent when a listing (%s) expires.', 'expiration notices', 'business-directory-plugin' ), $recurring_modifier );
|
578 |
+
} else {
|
579 |
+
$relative_time_parts = explode( ' ', $relative_time );
|
580 |
+
$relative_time_number = trim( str_replace( array( '+', '-' ), '', $relative_time_parts[0] ) );
|
581 |
+
$relative_time_units = $relative_time_parts[1];
|
582 |
+
|
583 |
+
switch ( $relative_time_units ) {
|
584 |
+
case 'days':
|
585 |
+
$relative_time_h = sprintf( _nx( '%d day', '%d days', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
586 |
+
break;
|
587 |
+
case 'weeks':
|
588 |
+
$relative_time_h = sprintf( _nx( '%d week', '%d weeks', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
589 |
+
break;
|
590 |
+
case 'months':
|
591 |
+
$relative_time_h = sprintf( _nx( '%d month', '%d months', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
592 |
+
break;
|
593 |
+
}
|
594 |
+
|
595 |
+
if ( $relative_time[0] == '+' ) {
|
596 |
+
/* translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g. non-recuring only) */
|
597 |
+
$summary = sprintf( _x( 'Sent %1$s before a listing (%2$s) expires.', 'expiration notices', 'business-directory-plugin' ), $relative_time_h, $recurring_modifier );
|
598 |
+
} else {
|
599 |
+
/* translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g. non-recuring only) */
|
600 |
+
$summary = sprintf( _x( 'Sent %1$s after a listing (%2$s) expires.', 'expiration notices', 'business-directory-plugin' ), $relative_time_h, $recurring_modifier );
|
601 |
+
}
|
602 |
+
}
|
603 |
+
}
|
604 |
+
|
605 |
+
ob_start();
|
606 |
+
?>
|
607 |
+
<div class="wpbdp-expiration-notice-email-schedule-summary">
|
608 |
+
<?php echo $summary; ?>
|
609 |
+
</div>
|
610 |
+
<?php
|
611 |
+
return ob_get_clean();
|
612 |
+
}
|
613 |
+
|
614 |
+
private function setting_expiration_notices_schedule() {
|
615 |
+
// Notices schedule.
|
616 |
+
$notices_schedule = array(
|
617 |
+
array( 'expiration', '0 days', _x( 'At the time of expiration', 'expiration notices', 'business-directory-plugin' ) ),
|
618 |
+
array( 'renewal', '0 days', _x( 'Right after a successful renewal', 'expiration notices', 'business-directory-plugin' ) ),
|
619 |
+
);
|
620 |
+
foreach ( array(
|
621 |
+
'days' => array( 1, 2, 3, 4, 5 ),
|
622 |
+
'weeks' => array( 1, 2 ),
|
623 |
+
'months' => array( 1, 2 ),
|
624 |
+
) as $unit => $periods ) {
|
625 |
+
foreach ( $periods as $i ) {
|
626 |
+
foreach ( array( '+', '-' ) as $sign ) {
|
627 |
+
switch ( $unit ) {
|
628 |
+
case 'days':
|
629 |
+
$label = sprintf( '+' == $sign ? _nx( '%d day before expiration', '%d days before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d day after expiration', '%d days after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
630 |
+
break;
|
631 |
+
case 'weeks':
|
632 |
+
$label = sprintf( '+' == $sign ? _nx( '%d week before expiration', '%d weeks before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d week after expiration', '%d weeks after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
633 |
+
break;
|
634 |
+
case 'months':
|
635 |
+
$label = sprintf( '+' == $sign ? _nx( '%d month before expiration', '%d months before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d month after expiration', '%d months after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
636 |
+
break;
|
637 |
+
}
|
638 |
+
|
639 |
+
$notices_schedule[] = array( 'expiration', $sign . $i . ' ' . $unit, $label );
|
640 |
+
}
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
return apply_filters( 'wpbdp_expiration_notices_schedule', $notices_schedule );
|
645 |
+
}
|
646 |
+
|
647 |
+
private function setting_expiration_notices_email_extra_fields( $name, $uid, $notice ) {
|
648 |
+
if ( is_null( $notice ) ) {
|
649 |
+
$notice = array(
|
650 |
+
'event' => 'expiration',
|
651 |
+
'listings' => 'both',
|
652 |
+
'relative_time' => '0 days',
|
653 |
+
'subject' => '',
|
654 |
+
'body' => '',
|
655 |
+
'placeholders' => array(),
|
656 |
+
);
|
657 |
+
}
|
658 |
+
|
659 |
+
ob_start();
|
660 |
+
?>
|
661 |
+
<tr>
|
662 |
+
<th scope="row"><label for="<?php echo $uid; ?>-listings"><?php _ex( 'Applies to', 'expiration notices', 'business-directory-plugin' ); ?></label></th>
|
663 |
+
<td>
|
664 |
+
<select id="<?php echo $uid; ?>-listings" name="<?php echo $name; ?>[listings]">
|
665 |
+
<option value="non-recurring" <?php selected( 'non-recurring', $notice['listings'] ); ?>><?php _ex( 'Non-recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
666 |
+
<option value="recurring" <?php selected( 'recurring', $notice['listings'] ); ?>><?php _ex( 'Recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
667 |
+
<option value="both" <?php selected( 'both', $notice['listings'] ); ?>><?php _ex( 'Recurring and non-recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
668 |
+
</select>
|
669 |
+
</td>
|
670 |
+
</tr>
|
671 |
+
<tr>
|
672 |
+
<th scope="row"><label for="<?php echo $uid; ?>-relative-time-and-event"><?php _ex( 'When to send?', 'expiration notices', 'business-directory-plugin' ); ?></label></th>
|
673 |
+
<td>
|
674 |
+
<input type="hidden" value="<?php echo $notice['event']; ?>" class="stored-notice-event" />
|
675 |
+
<input type="hidden" value="<?php echo ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : ''; ?>" class="stored-notice-relative-time" />
|
676 |
+
|
677 |
+
<input type="hidden" name="<?php echo $name; ?>[event]" value="<?php echo $notice['event']; ?>" class="notice-event" />
|
678 |
+
<input type="hidden" name="<?php echo $name; ?>[relative_time]" value="<?php echo ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : ''; ?>" class="notice-relative-time" />
|
679 |
+
|
680 |
+
<select id="<?php echo $uid; ?>-relative-time-and-event" class="relative-time-and-event">
|
681 |
+
<?php foreach ( $this->setting_expiration_notices_schedule() as $item ) : ?>
|
682 |
+
<?php if ( 'renewal' == $item[0] ) : ?>
|
683 |
+
<option value="<?php echo $item[0]; ?>,<?php echo $item[1]; ?>" <?php selected( $item[0], $notice['event'] ); ?>><?php echo $item[2]; ?></option>
|
684 |
+
<?php else : ?>
|
685 |
+
<option value="<?php echo $item[0]; ?>,<?php echo $item[1]; ?>" <?php selected( $item[0] == $notice['event'] && ! empty( $notice['relative_time'] ) && $item[1] == $notice['relative_time'], true ); ?>><?php echo $item[2]; ?></option>
|
686 |
+
<?php endif; ?>
|
687 |
+
<?php endforeach; ?>
|
688 |
+
</select>
|
689 |
+
</td>
|
690 |
+
</tr>
|
691 |
+
<?php
|
692 |
+
return ob_get_clean();
|
693 |
+
}
|
694 |
+
|
695 |
+
|
696 |
+
public function settings_page() {
|
697 |
+
if ( isset( $_REQUEST['reset_defaults'] ) && $_REQUEST['reset_defaults'] == 1 ) {
|
698 |
+
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-reset.tpl.php' );
|
699 |
+
return;
|
700 |
+
}
|
701 |
+
|
702 |
+
if ( isset( $_REQUEST['message'] ) && $_REQUEST['message'] == 'reset' ) {
|
703 |
+
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'settings-updated' ) );
|
704 |
+
wpbdp_admin_message( _x( 'Settings reset to default.', 'settings', 'business-directory-plugin' ) );
|
705 |
+
wpbdp()->admin->admin_notices();
|
706 |
+
}
|
707 |
+
|
708 |
+
$all_groups = wpbdp()->settings->get_registered_groups();
|
709 |
+
|
710 |
+
// Filter out empty groups.
|
711 |
+
$all_groups = wp_list_filter( $all_groups, array( 'count' => 0 ), 'NOT' );
|
712 |
+
|
713 |
+
$tabs = wp_list_filter( $all_groups, array( 'type' => 'tab' ) );
|
714 |
+
$active_tab = wpbdp_get_var( array( 'param' => 'tab' ) );
|
715 |
+
if ( ! isset( $tabs[ $active_tab ] ) ) {
|
716 |
+
$active_tab = 'general';
|
717 |
+
}
|
718 |
+
|
719 |
+
$subtabs = wp_list_filter( $all_groups, array( 'parent' => $active_tab ) );
|
720 |
+
$active_subtab = wpbdp_get_var( array( 'param' => 'subtab' ) );
|
721 |
+
if ( ! isset( $subtabs[ $active_subtab ] ) ) {
|
722 |
+
$subtabs_ids = array_keys( $subtabs );
|
723 |
+
$active_subtab = reset( $subtabs_ids );
|
724 |
+
}
|
725 |
+
|
726 |
+
$active_subtab_description = ! empty( $all_groups[ $active_subtab ]['desc'] ) ? $all_groups[ $active_subtab ]['desc'] : '';
|
727 |
+
$custom_form = ( ! empty( $all_groups[ $active_subtab ]['custom_form'] ) ) && $all_groups[ $active_subtab ]['custom_form'];
|
728 |
+
|
729 |
+
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-page.tpl.php', compact( 'tabs', 'subtabs', 'active_tab', 'active_subtab', 'active_subtab_description', 'custom_form' ) );
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
public function settings_reset_defaults() {
|
734 |
+
if ( wp_verify_nonce( wpbdp_get_var( array( 'param' => '_wpnonce' ), 'post' ), 'reset defaults' ) ) {
|
735 |
+
global $wpbdp;
|
736 |
+
$wpbdp->settings->reset_defaults();
|
737 |
+
|
738 |
+
$url = remove_query_arg( 'reset_defaults' );
|
739 |
+
$url = add_query_arg(
|
740 |
+
array(
|
741 |
+
'settings-updated' => 1,
|
742 |
+
'message' => 'reset',
|
743 |
+
), $url
|
744 |
+
);
|
745 |
+
wp_redirect( $url );
|
746 |
+
exit();
|
747 |
+
}
|
748 |
+
}
|
749 |
+
|
750 |
+
public function _ajax_file_upload() {
|
751 |
+
$setting_id = wpbdp_get_var( array( 'param' => 'setting_id' ), 'request' );
|
752 |
+
$nonce = wpbdp_get_var( array( 'param' => 'nonce' ), 'request' );
|
753 |
+
|
754 |
+
if ( ! $setting_id || ! $nonce ) {
|
755 |
+
die;
|
756 |
+
}
|
757 |
+
|
758 |
+
if ( ! wp_verify_nonce( $nonce, 'wpbdp-file-upload-' . $setting_id ) ) {
|
759 |
+
die;
|
760 |
+
}
|
761 |
+
|
762 |
+
$element = wpbdp_get_var( array( 'param' => 'element', 'default' => 'wpbdp_settings[' . $setting_id . ']' ), 'request' );
|
763 |
+
|
764 |
+
echo '<form action="" method="POST" enctype="multipart/form-data">';
|
765 |
+
echo '<input type="file" name="file" class="file-upload" onchange="return window.parent.WPBDP.fileUpload.handleUpload(this);"/>';
|
766 |
+
echo '</form>';
|
767 |
+
|
768 |
+
if ( isset( $_FILES['file']['error'] ) && $_FILES['file']['error'] == 0 ) {
|
769 |
+
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
770 |
+
$file = wp_unslash( $_FILES['file'] );
|
771 |
+
wpbdp_sanitize_value( 'sanitize_text_field', $file );
|
772 |
+
// TODO: we support only images for now but we could use this for anything later
|
773 |
+
$media_id = wpbdp_media_upload(
|
774 |
+
$file,
|
775 |
+
true,
|
776 |
+
true,
|
777 |
+
array(
|
778 |
+
'image' => true,
|
779 |
+
'min-size' => intval( wpbdp_get_option( 'image-min-filesize' ) ) * 1024,
|
780 |
+
'max-size' => intval( wpbdp_get_option( 'image-max-filesize' ) ) * 1024,
|
781 |
+
'min-width' => wpbdp_get_option( 'image-min-width' ),
|
782 |
+
'min-height' => wpbdp_get_option( 'image-min-height' ),
|
783 |
+
),
|
784 |
+
$errors
|
785 |
+
);
|
786 |
+
if ( $media_id ) {
|
787 |
+
echo '<div class="preview" style="display: none;">';
|
788 |
+
echo wp_get_attachment_image( $media_id, 'thumb', false );
|
789 |
+
echo '</div>';
|
790 |
+
|
791 |
+
echo '<script>';
|
792 |
+
echo sprintf( 'window.parent.WPBDP.fileUpload.finishUpload("%s", %d, "%s");', $setting_id, $media_id, $element );
|
793 |
+
echo '</script>';
|
794 |
+
} else {
|
795 |
+
print $errors;
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
echo sprintf( '<script>window.parent.WPBDP.fileUpload.resizeIFrame("%s", %d);</script>', $setting_id, 30 );
|
800 |
+
|
801 |
+
exit;
|
802 |
+
}
|
803 |
+
}
|
includes/admin/csv-export.php
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once( WPBDP_INC . 'admin/class-csv-exporter.php' );
|
4 |
|
5 |
/**
|
6 |
* CSV Export admin pages.
|
|
|
7 |
* @since 3.2
|
8 |
*/
|
9 |
class WPBDP_Admin_CSVExport {
|
1 |
<?php
|
2 |
|
3 |
+
require_once( WPBDP_INC . 'admin/helpers/csv/class-csv-exporter.php' );
|
4 |
|
5 |
/**
|
6 |
* CSV Export admin pages.
|
7 |
+
*
|
8 |
* @since 3.2
|
9 |
*/
|
10 |
class WPBDP_Admin_CSVExport {
|
includes/admin/csv-import.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package BDP/Includes/Admin
|
6 |
*/
|
7 |
|
8 |
-
require_once WPBDP_INC . 'admin/class-csv-import.php';
|
9 |
/**
|
10 |
* CSV Import admin pages.
|
11 |
*
|
5 |
* @package BDP/Includes/Admin
|
6 |
*/
|
7 |
|
8 |
+
require_once WPBDP_INC . 'admin/helpers/csv/class-csv-import.php';
|
9 |
/**
|
10 |
* CSV Import admin pages.
|
11 |
*
|
includes/admin/fees.php
CHANGED
@@ -1,187 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*/
|
5 |
-
class WPBDP__Admin__Fees extends WPBDP__Admin__Controller {
|
6 |
-
|
7 |
-
function __construct() {
|
8 |
-
parent::__construct();
|
9 |
-
$this->api = $this->wpbdp->fees;
|
10 |
-
}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @override
|
14 |
-
*/
|
15 |
-
function _enqueue_scripts() {
|
16 |
-
switch ( $this->current_view ) {
|
17 |
-
case 'add-fee':
|
18 |
-
case 'edit-fee':
|
19 |
-
wp_enqueue_style( 'wp-color-picker' );
|
20 |
-
wp_enqueue_style( 'wpbdp-js-select2-css' );
|
21 |
-
|
22 |
-
wp_enqueue_script(
|
23 |
-
'wpbdp-admin-fees-js',
|
24 |
-
WPBDP_ASSETS_URL . 'js/admin-fees.min.js',
|
25 |
-
array( 'wp-color-picker', 'wpbdp-js-select2' ),
|
26 |
-
WPBDP_VERSION,
|
27 |
-
true
|
28 |
-
);
|
29 |
-
|
30 |
-
break;
|
31 |
-
default:
|
32 |
-
break;
|
33 |
-
}
|
34 |
-
|
35 |
-
if ( ! in_array( $this->current_view, array( 'add-fee', 'edit-fee' ), true ) )
|
36 |
-
return;
|
37 |
-
}
|
38 |
-
|
39 |
-
function index() {
|
40 |
-
require_once( WPBDP_INC . 'admin/helpers/tables/class-fees-table.php' );
|
41 |
-
|
42 |
-
$table = new WPBDP__Admin__Fees_Table();
|
43 |
-
$table->prepare_items();
|
44 |
-
|
45 |
-
$order_options = array();
|
46 |
-
foreach ( array( 'label' => _x( 'Label', 'fees order', 'business-directory-plugin' ),
|
47 |
-
'amount' => __( 'Amount', 'business-directory-plugin' ),
|
48 |
-
'days' => _x( 'Duration', 'fees order', 'business-directory-plugin' ),
|
49 |
-
'images' => __( 'Images', 'business-directory-plugin' ),
|
50 |
-
'custom' => _x( 'Custom Order', 'fees order', 'business-directory-plugin' ) ) as $k => $l ) {
|
51 |
-
$order_options[ $k ] = $l;
|
52 |
-
}
|
53 |
-
|
54 |
-
return array(
|
55 |
-
'table' => $table,
|
56 |
-
'order_options' => $order_options,
|
57 |
-
'current_order' => wpbdp_get_option( 'fee-order' )
|
58 |
-
);
|
59 |
-
}
|
60 |
-
|
61 |
-
function add_fee() {
|
62 |
-
return $this->insert_or_update_fee( 'insert' );
|
63 |
-
}
|
64 |
-
|
65 |
-
function edit_fee() {
|
66 |
-
return $this->insert_or_update_fee( 'update' );
|
67 |
-
}
|
68 |
-
|
69 |
-
private function insert_or_update_fee( $mode ) {
|
70 |
-
if ( ! empty( $_POST ) ) {
|
71 |
-
$nonce = array( 'nonce' => 'wpbdp-fees' );
|
72 |
-
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
73 |
-
}
|
74 |
-
|
75 |
-
if ( ! empty( $_POST['fee'] ) ) {
|
76 |
-
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
77 |
-
$posted_values = stripslashes_deep( $_POST['fee'] );
|
78 |
-
$posted_values = $this->sanitize_posted_values( $posted_values );
|
79 |
-
|
80 |
-
if ( 0 == intval( wpbdp_get_var( array( 'param' => 'limit_categories', 'default' => 0 ), 'post' ) ) ) {
|
81 |
-
$posted_values['supported_categories'] = 'all';
|
82 |
-
}
|
83 |
-
|
84 |
-
if ( ! isset( $posted_values['sticky'] ) ) {
|
85 |
-
$posted_values['sticky'] = 0;
|
86 |
-
}
|
87 |
-
|
88 |
-
if ( ! isset( $posted_values['recurring'] ) ) {
|
89 |
-
$posted_values['recurring'] = 0;
|
90 |
-
}
|
91 |
-
} else {
|
92 |
-
$posted_values = array();
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( 'insert' == $mode ) {
|
96 |
-
$fee = new WPBDP__Fee_Plan( $posted_values );
|
97 |
-
} else {
|
98 |
-
$fee = $this->get_or_die();
|
99 |
-
}
|
100 |
-
|
101 |
-
if ( $posted_values ) {
|
102 |
-
if ( $fee->exists() ) {
|
103 |
-
$result = $fee->update( $posted_values );
|
104 |
-
} else {
|
105 |
-
$result = $fee->save();
|
106 |
-
}
|
107 |
-
|
108 |
-
if ( ! is_wp_error( $result ) ) {
|
109 |
-
if ( 'insert' == $mode ) {
|
110 |
-
wpbdp_admin_message( _x( 'Fee plan added.', 'fees admin', 'business-directory-plugin' ) );
|
111 |
-
} else {
|
112 |
-
wpbdp_admin_message( _x( 'Fee plan updated.', 'fees admin', 'business-directory-plugin' ) );
|
113 |
-
}
|
114 |
-
} else {
|
115 |
-
foreach ( $result->get_error_messages() as $msg ) {
|
116 |
-
wpbdp_admin_message( $msg, 'error' );
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
return array( 'fee' => $fee );
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Sanitize each field in the fee form.
|
126 |
-
*
|
127 |
-
* @since 5.11.2
|
128 |
-
*/
|
129 |
-
private function sanitize_posted_values( $posted_values ) {
|
130 |
-
$sanitizing = $this->sanitize_mapping();
|
131 |
-
foreach ( $posted_values as $k => $v ) {
|
132 |
-
$sanitize = isset( $sanitizing[ $k ] ) ? $sanitizing[ $k ] : 'sanitize_text_field';
|
133 |
-
wpbdp_sanitize_value( $sanitize, $posted_values[ $k ] );
|
134 |
-
}
|
135 |
-
return $posted_values;
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* This shows how to sanitize each field in the fee form.
|
140 |
-
*
|
141 |
-
* @since 5.11.2
|
142 |
-
*/
|
143 |
-
private function sanitize_mapping() {
|
144 |
-
return array(
|
145 |
-
'description' => 'wp_kses_post',
|
146 |
-
'days' => 'absint',
|
147 |
-
'images' => 'absint',
|
148 |
-
);
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* @since 5.9
|
153 |
-
*/
|
154 |
-
private function get_or_die() {
|
155 |
-
$fee = wpbdp_get_fee_plan( wpbdp_get_var( array( 'param' => 'id' ) ) );
|
156 |
-
|
157 |
-
if ( ! $fee ) {
|
158 |
-
wp_die();
|
159 |
-
}
|
160 |
-
return $fee;
|
161 |
-
}
|
162 |
-
|
163 |
-
function delete_fee() {
|
164 |
-
$fee = $this->get_or_die();
|
165 |
-
|
166 |
-
list( $do, $html ) = $this->_confirm_action( array(
|
167 |
-
'cancel_url' => remove_query_arg( array( 'wpbdp-view', 'id' ) ),
|
168 |
-
) );
|
169 |
-
|
170 |
-
if ( $do && $fee->delete() ) {
|
171 |
-
wpbdp_admin_message( sprintf( _x( 'Fee "%s" deleted.', 'fees admin', 'business-directory-plugin' ), $fee->label ) );
|
172 |
-
return $this->_redirect( 'index' );
|
173 |
-
}
|
174 |
-
|
175 |
-
return $html;
|
176 |
-
}
|
177 |
-
|
178 |
-
function toggle_fee() {
|
179 |
-
$fee = $this->get_or_die();
|
180 |
-
$fee->enabled = ! $fee->enabled;
|
181 |
-
$fee->save();
|
182 |
-
|
183 |
-
wpbdp_admin_message( _x( 'Fee disabled.', 'fees admin', 'business-directory-plugin' ) );
|
184 |
-
return $this->_redirect( 'index' );
|
185 |
-
}
|
186 |
-
|
187 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/controllers/class-admin-fees.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/controllers/class-admin-fees.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/helpers/class-data-formatter.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Formats data from a list of properties in format expected by the Data Exporter API.
|
4 |
+
*
|
5 |
+
* @package BDP/Admin
|
6 |
+
* @since 5.5
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class WPBDP_DataFormatter
|
11 |
+
*/
|
12 |
+
class WPBDP_DataFormatter {
|
13 |
+
/**
|
14 |
+
* @param $items
|
15 |
+
* @param $properties
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function format_data( $items, $properties ) {
|
19 |
+
$data = array();
|
20 |
+
foreach ( $items as $key => $name ) {
|
21 |
+
if ( empty( $properties[ $key ] ) ) {
|
22 |
+
continue;
|
23 |
+
}
|
24 |
+
$data[] = array(
|
25 |
+
'name' => $name,
|
26 |
+
'value' => $properties[ $key ],
|
27 |
+
);
|
28 |
+
}
|
29 |
+
return $data;
|
30 |
+
}
|
31 |
+
}
|
includes/admin/helpers/class-variable-pricing-configurator.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
require_once
|
3 |
|
4 |
/**
|
5 |
* @since 5.0
|
1 |
<?php
|
2 |
+
require_once( WPBDP_PATH . 'includes/helpers/class-wp-taxonomy-term-list.php' );
|
3 |
|
4 |
/**
|
5 |
* @since 5.0
|
includes/admin/helpers/csv/class-csv-exporter.php
ADDED
@@ -0,0 +1,454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CSV import class
|
4 |
+
*
|
5 |
+
* @package Includes/Admin/CSV Exporter
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* CSV export.
|
10 |
+
*
|
11 |
+
* @since 3.2
|
12 |
+
*/
|
13 |
+
class WPBDP_CSVExporter {
|
14 |
+
|
15 |
+
const BATCH_SIZE = 20;
|
16 |
+
|
17 |
+
private $settings = array(
|
18 |
+
'target-os' => 'windows',
|
19 |
+
'csv-file-separator' => ',',
|
20 |
+
'images-separator' => ';',
|
21 |
+
'category-separator' => ';',
|
22 |
+
|
23 |
+
'test-import' => false,
|
24 |
+
'export-images' => false,
|
25 |
+
'include-users' => false,
|
26 |
+
|
27 |
+
'generate-sequence-ids' => false,
|
28 |
+
|
29 |
+
'listing_status' => 'all',
|
30 |
+
);
|
31 |
+
|
32 |
+
private $workingdir = '';
|
33 |
+
|
34 |
+
private $columns = array();
|
35 |
+
private $listings = array(); // Listing IDs to be exported.
|
36 |
+
private $exported = 0; // # of already exported listings.
|
37 |
+
private $images = array();
|
38 |
+
|
39 |
+
public function __construct( $settings, $workingdir = null, $listings = array() ) {
|
40 |
+
global $wpdb;
|
41 |
+
|
42 |
+
$this->settings = array_merge( $this->settings, $settings );
|
43 |
+
|
44 |
+
if ( ! in_array( $this->settings['target-os'], array( 'windows', 'macos' ), true ) ) {
|
45 |
+
$this->settings['target-os'] = 'windows';
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( $this->settings['target-os'] === 'macos' ) {
|
49 |
+
$this->settings['csv-file-separator'] = "\t";
|
50 |
+
}
|
51 |
+
|
52 |
+
// Setup columns.
|
53 |
+
if ( $this->settings['generate-sequence-ids'] ) {
|
54 |
+
$this->columns['sequence_id'] = 'sequence_id';
|
55 |
+
}
|
56 |
+
|
57 |
+
$fields = wpbdp_get_form_fields( array( 'field_type' => '-ratings' ) );
|
58 |
+
foreach ( $fields as &$f ) {
|
59 |
+
$this->columns[ $f->get_short_name() ] = $f;
|
60 |
+
}
|
61 |
+
|
62 |
+
if ( $this->settings['export-images'] ) {
|
63 |
+
$this->columns['images'] = 'images';
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( $this->settings['include-users'] ) {
|
67 |
+
$this->columns['username'] = 'username';
|
68 |
+
}
|
69 |
+
|
70 |
+
$this->columns['fee_id'] = 'fee_id';
|
71 |
+
|
72 |
+
if ( ! empty( $this->settings['include-tos-acceptance-date'] ) ) {
|
73 |
+
$this->columns['terms_and_conditions_acceptance_date'] = 'terms_and_conditions_acceptance_date';
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( $this->settings['include-expiration-date'] ) {
|
77 |
+
$this->columns['expires_on'] = 'expires_on';
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( ! empty( $this->settings['include-created-date'] ) ) {
|
81 |
+
$this->columns['created_date'] = 'created_date';
|
82 |
+
}
|
83 |
+
|
84 |
+
if ( ! empty( $this->settings['include-modified-date'] ) ) {
|
85 |
+
$this->columns['modified_date'] = 'modified_date';
|
86 |
+
}
|
87 |
+
|
88 |
+
// Setup working directory.
|
89 |
+
if ( ! $workingdir ) {
|
90 |
+
|
91 |
+
$upload_dir = wp_upload_dir();
|
92 |
+
$id = uniqid();
|
93 |
+
|
94 |
+
if ( ! $upload_dir['error'] ) {
|
95 |
+
|
96 |
+
$folder_name = 'wpbdp-csv-exports/' . $id;
|
97 |
+
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
98 |
+
$create_folder = new WPBDP_Create_File(
|
99 |
+
array(
|
100 |
+
'file_name' => 'index.php',
|
101 |
+
'folder_name' => $folder_name
|
102 |
+
)
|
103 |
+
);
|
104 |
+
$create_folder->create_index( 'force' );
|
105 |
+
|
106 |
+
$csvexportsdir = rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . '/' . $folder_name;
|
107 |
+
if ( is_dir( $csvexportsdir ) ) {
|
108 |
+
$this->workingdir = $csvexportsdir . '/';
|
109 |
+
} else {
|
110 |
+
$direrror = _x( 'Could not create a temporary directory for handling this CSV export.', 'admin csv-export', 'business-directory-plugin' );
|
111 |
+
throw new Exception( sprintf( _x( 'Error while creating a temporary directory for CSV export: %s', 'admin csv-export', 'business-directory-plugin' ), $direrror ) );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
} else {
|
116 |
+
$this->workingdir = $workingdir;
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( $listings ) {
|
120 |
+
$this->listings = $listings;
|
121 |
+
} else {
|
122 |
+
switch ( $this->settings['listing_status'] ) {
|
123 |
+
case 'publish+draft':
|
124 |
+
$post_status = array( 'publish', 'draft', 'pending' );
|
125 |
+
break;
|
126 |
+
case 'publish':
|
127 |
+
$post_status = 'publish';
|
128 |
+
break;
|
129 |
+
case 'all':
|
130 |
+
default:
|
131 |
+
$post_status = array( 'publish', 'draft', 'pending', 'private', 'future', 'trash' );
|
132 |
+
break;
|
133 |
+
}
|
134 |
+
|
135 |
+
$this->listings = get_posts(
|
136 |
+
array(
|
137 |
+
'post_status' => $post_status,
|
138 |
+
'posts_per_page' => -1,
|
139 |
+
'post_type' => WPBDP_POST_TYPE,
|
140 |
+
'fields' => 'ids',
|
141 |
+
)
|
142 |
+
);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
public static function &from_state( $state ) {
|
147 |
+
$export = new self( $state['settings'], trailingslashit( $state['workingdir'] ), (array) $state['listings'] );
|
148 |
+
$export->exported = abs( intval( $state['exported'] ) );
|
149 |
+
|
150 |
+
// Setup columns.
|
151 |
+
$shortnames = wpbdp_formfields_api()->get_short_names();
|
152 |
+
|
153 |
+
foreach ( $state['columns'] as $fshortname ) {
|
154 |
+
if ( in_array( $fshortname, array( 'images', 'username', 'expires_on', 'sequence_id', 'fee_id', 'created_date', 'modified_date', 'terms_and_conditions_acceptance_date' ) ) ) {
|
155 |
+
$export->columns[ $fshortname ] = $fshortname;
|
156 |
+
continue;
|
157 |
+
}
|
158 |
+
|
159 |
+
$field_id = array_search( $fshortname, $shortnames );
|
160 |
+
|
161 |
+
if ( $field_id === false ) {
|
162 |
+
throw new Exception( 'Invalid field shortname.' );
|
163 |
+
}
|
164 |
+
|
165 |
+
$export->columns[ $fshortname ] = wpbdp_get_form_field( $field_id );
|
166 |
+
}
|
167 |
+
|
168 |
+
return $export;
|
169 |
+
}
|
170 |
+
|
171 |
+
public function get_state() {
|
172 |
+
return array(
|
173 |
+
'settings' => $this->settings,
|
174 |
+
'columns' => array_keys( $this->columns ),
|
175 |
+
'workingdir' => $this->workingdir,
|
176 |
+
'listings' => $this->listings,
|
177 |
+
'exported' => $this->exported,
|
178 |
+
'filesize' => file_exists( $this->get_file_path() ) ? filesize( $this->get_file_path() ) : 0,
|
179 |
+
'done' => $this->is_done(),
|
180 |
+
);
|
181 |
+
}
|
182 |
+
|
183 |
+
public function cleanup() {
|
184 |
+
$upload_dir = wp_upload_dir();
|
185 |
+
|
186 |
+
WPBDP_FS::rmdir( $this->workingdir );
|
187 |
+
|
188 |
+
if ( ! $upload_dir['error'] ) {
|
189 |
+
$csvexportsdir = rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'wpbdp-csv-exports';
|
190 |
+
$contents = wpbdp_scandir( $csvexportsdir );
|
191 |
+
|
192 |
+
if ( ! $contents ) {
|
193 |
+
WPBDP_FS::rmdir( $csvexportsdir );
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
public function advance() {
|
199 |
+
if ( $this->is_done() ) {
|
200 |
+
return;
|
201 |
+
}
|
202 |
+
|
203 |
+
$csvfile = $this->get_csvfile( $this->workingdir . 'export.csv' );
|
204 |
+
|
205 |
+
// Write header as first line.
|
206 |
+
if ( $this->exported === 0 ) {
|
207 |
+
fwrite( $csvfile, $this->prepare_header( $this->header() ) );
|
208 |
+
}
|
209 |
+
|
210 |
+
$nextlistings = array_slice( $this->listings, $this->exported, self::BATCH_SIZE );
|
211 |
+
|
212 |
+
foreach ( $nextlistings as $listing_id ) {
|
213 |
+
if ( $data = $this->extract_data( $listing_id ) ) {
|
214 |
+
$content = implode( $this->settings['csv-file-separator'], $data );
|
215 |
+
fwrite( $csvfile, $this->prepare_content( $content ) );
|
216 |
+
}
|
217 |
+
|
218 |
+
$this->exported++;
|
219 |
+
}
|
220 |
+
|
221 |
+
fclose( $csvfile );
|
222 |
+
|
223 |
+
if ( $this->is_done() ) {
|
224 |
+
if ( file_exists( $this->workingdir . 'images.zip' ) ) {
|
225 |
+
@unlink( $this->workingdir . 'export.zip' );
|
226 |
+
$zip = $this->get_pclzip_instance( $this->workingdir . 'export.zip' );
|
227 |
+
|
228 |
+
$files = array();
|
229 |
+
$files[] = $this->workingdir . 'export.csv';
|
230 |
+
$files[] = $this->workingdir . 'images.zip';
|
231 |
+
|
232 |
+
$zip->create( implode( ',', $files ), PCLZIP_OPT_REMOVE_ALL_PATH );
|
233 |
+
|
234 |
+
@unlink( $this->workingdir . 'export.csv' );
|
235 |
+
@unlink( $this->workingdir . 'images.zip' );
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
protected function get_csvfile( $path ) {
|
241 |
+
return fopen( $path, 'a' );
|
242 |
+
}
|
243 |
+
|
244 |
+
protected function get_pclzip_instance( $path ) {
|
245 |
+
if ( ! class_exists( 'PclZip' ) ) {
|
246 |
+
define( 'PCLZIP_TEMPORARY_DIR', $this->workingdir );
|
247 |
+
require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
|
248 |
+
}
|
249 |
+
|
250 |
+
return new PclZip( $path );
|
251 |
+
}
|
252 |
+
public function is_done() {
|
253 |
+
return $this->exported == count( $this->listings );
|
254 |
+
}
|
255 |
+
|
256 |
+
private function prepare_header( $header ) {
|
257 |
+
if ( $this->settings['target-os'] === 'windows' ) {
|
258 |
+
$bom = "\xEF\xBB\xBF"; /* UTF-8 BOM */
|
259 |
+
} elseif ( $this->settings['target-os'] === 'macos' ) {
|
260 |
+
$bom = "\xFF\xFE"; /* UTF-16LE BOM */
|
261 |
+
}
|
262 |
+
|
263 |
+
return $bom . $this->prepare_content( $header );
|
264 |
+
}
|
265 |
+
|
266 |
+
private function prepare_content( $content ) {
|
267 |
+
if ( $this->settings['target-os'] === 'windows' ) {
|
268 |
+
$encoded_content = $content . "\n";
|
269 |
+
} elseif ( $this->settings['target-os'] === 'macos' ) {
|
270 |
+
$encoded_content = iconv( 'UTF-8', 'UTF-16LE', $content . "\n" );
|
271 |
+
}
|
272 |
+
|
273 |
+
return $encoded_content;
|
274 |
+
}
|
275 |
+
|
276 |
+
public function get_file_path() {
|
277 |
+
if ( file_exists( $this->workingdir . 'export.zip' ) ) {
|
278 |
+
return $this->workingdir . 'export.zip';
|
279 |
+
} else {
|
280 |
+
return $this->workingdir . 'export.csv';
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
public function get_file_url() {
|
285 |
+
$uploaddir = wp_upload_dir();
|
286 |
+
$urldir = trailingslashit( untrailingslashit( $uploaddir['baseurl'] ) . '/' . ltrim( str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $uploaddir['basedir'], '', $this->workingdir ) ), '/' ) );
|
287 |
+
|
288 |
+
if ( file_exists( $this->workingdir . 'export.zip' ) ) {
|
289 |
+
return $urldir . 'export.zip';
|
290 |
+
} else {
|
291 |
+
return $urldir . 'export.csv';
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
private function header( $echo = false ) {
|
296 |
+
$out = '';
|
297 |
+
|
298 |
+
foreach ( $this->columns as $colname => &$col ) {
|
299 |
+
$out .= $colname;
|
300 |
+
$out .= $this->settings['csv-file-separator'];
|
301 |
+
}
|
302 |
+
|
303 |
+
$out = substr( $out, 0, -1 );
|
304 |
+
|
305 |
+
if ( $echo ) {
|
306 |
+
echo $out;
|
307 |
+
}
|
308 |
+
|
309 |
+
return $out;
|
310 |
+
}
|
311 |
+
|
312 |
+
private function extract_data( $post_id ) {
|
313 |
+
$listing = wpbdp_get_listing( $post_id );
|
314 |
+
|
315 |
+
if ( ! $listing ) {
|
316 |
+
return false;
|
317 |
+
}
|
318 |
+
|
319 |
+
$data = array();
|
320 |
+
|
321 |
+
foreach ( $this->columns as $column_name => $column_obj ) {
|
322 |
+
$value = '';
|
323 |
+
|
324 |
+
switch ( $column_name ) {
|
325 |
+
case 'sequence_id':
|
326 |
+
$value = $listing->get_sequence_id();
|
327 |
+
break;
|
328 |
+
case 'username':
|
329 |
+
$value = $listing->get_author_meta( 'login' );
|
330 |
+
break;
|
331 |
+
case 'images':
|
332 |
+
$images = array();
|
333 |
+
|
334 |
+
$image_ids = $listing->get_images( 'ids' );
|
335 |
+
|
336 |
+
if ( $image_ids ) {
|
337 |
+
$thumnail_id = $listing->get_thumbnail_id();
|
338 |
+
$has_thumbnail = array_search( $thumnail_id, $image_ids, true );
|
339 |
+
if ( $has_thumbnail ) {
|
340 |
+
unset( $image_ids[ $has_thumbnail ] );
|
341 |
+
array_unshift( $image_ids, $thumnail_id );
|
342 |
+
}
|
343 |
+
|
344 |
+
$upload_dir = wp_upload_dir();
|
345 |
+
|
346 |
+
foreach ( $image_ids as $image_id ) {
|
347 |
+
$img_meta = wp_get_attachment_metadata( $image_id );
|
348 |
+
|
349 |
+
if ( empty( $img_meta['file'] ) ) {
|
350 |
+
continue;
|
351 |
+
}
|
352 |
+
|
353 |
+
$img_path = realpath( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $img_meta['file'] );
|
354 |
+
|
355 |
+
if ( ! is_readable( $img_path ) ) {
|
356 |
+
continue;
|
357 |
+
}
|
358 |
+
|
359 |
+
$this->images_archive = ( ! isset( $this->images_archive ) ) ? $this->get_pclzip_instance( $this->workingdir . 'images.zip' ) : $this->images_archive;
|
360 |
+
if ( $success = $this->images_archive->add( $img_path, PCLZIP_OPT_REMOVE_ALL_PATH ) ) {
|
361 |
+
$images[] = basename( $img_path );
|
362 |
+
}
|
363 |
+
}
|
364 |
+
}
|
365 |
+
|
366 |
+
$value = implode( $this->settings['images-separator'], $images );
|
367 |
+
break;
|
368 |
+
case 'fee_id':
|
369 |
+
$plan = $listing->get_fee_plan();
|
370 |
+
|
371 |
+
if ( isset( $plan->fee_id ) ) {
|
372 |
+
$value = $plan->fee_id;
|
373 |
+
}
|
374 |
+
|
375 |
+
break;
|
376 |
+
case 'expires_on':
|
377 |
+
case 'expiration_date':
|
378 |
+
$plan = $listing->get_fee_plan();
|
379 |
+
|
380 |
+
if ( isset( $plan->expiration_date ) ) {
|
381 |
+
$value = $plan->expiration_date;
|
382 |
+
}
|
383 |
+
|
384 |
+
break;
|
385 |
+
case 'created_date':
|
386 |
+
$value = get_the_date(
|
387 |
+
get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
|
388 |
+
$post_id
|
389 |
+
);
|
390 |
+
break;
|
391 |
+
case 'modified_date':
|
392 |
+
$value = get_the_modified_date(
|
393 |
+
get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
|
394 |
+
$post_id
|
395 |
+
);
|
396 |
+
break;
|
397 |
+
case 'terms_and_conditions_acceptance_date':
|
398 |
+
$value = get_post_meta( $post_id, '_wpbdp_tos_acceptance_date', true );
|
399 |
+
break;
|
400 |
+
default:
|
401 |
+
if ( is_object( $column_obj ) ) {
|
402 |
+
$field = $column_obj;
|
403 |
+
|
404 |
+
switch ( $field->get_association() ) {
|
405 |
+
case 'category':
|
406 |
+
case 'tags':
|
407 |
+
$value = wp_get_post_terms( $listing->get_id(), ( 'tags' == $field->get_association() ? WPBDP_TAGS_TAX : WPBDP_CATEGORY_TAX ), 'fields=names' );
|
408 |
+
$value = array_map( 'html_entity_decode', $value );
|
409 |
+
$value = implode( $this->settings['category-separator'], $value );
|
410 |
+
break;
|
411 |
+
case 'meta':
|
412 |
+
default:
|
413 |
+
$value = $field->csv_value( $listing->get_id() );
|
414 |
+
|
415 |
+
if ( 'image' === $field->get_field_type_id() && $this->settings['export-images'] ) {
|
416 |
+
$image_id = $field->plain_value( $listing->get_id() );
|
417 |
+
|
418 |
+
if ( empty( $image_id ) ) {
|
419 |
+
break;
|
420 |
+
}
|
421 |
+
|
422 |
+
$img_meta = wp_get_attachment_metadata( $image_id );
|
423 |
+
|
424 |
+
if ( empty( $img_meta['file'] ) ) {
|
425 |
+
break;
|
426 |
+
}
|
427 |
+
|
428 |
+
$upload_dir = wp_upload_dir();
|
429 |
+
$img_path = realpath( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $img_meta['file'] );
|
430 |
+
|
431 |
+
if ( ! is_readable( $img_path ) ) {
|
432 |
+
break;
|
433 |
+
}
|
434 |
+
|
435 |
+
$this->images_archive = ( ! isset( $this->images_archive ) ) ? $this->get_pclzip_instance( $this->workingdir . 'images.zip' ) : $this->images_archive;
|
436 |
+
if ( $this->images_archive->add( $img_path, PCLZIP_OPT_REMOVE_ALL_PATH ) ) {
|
437 |
+
$value = sprintf( '%s,%s', $value, basename( $img_path ) );
|
438 |
+
}
|
439 |
+
}
|
440 |
+
break;
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
if ( ! is_string( $value ) && ! is_array( $value ) ) {
|
446 |
+
$value = strval( $value );
|
447 |
+
}
|
448 |
+
|
449 |
+
$data[ $column_name ] = '"' . str_replace( '"', '""', $value ) . '"';
|
450 |
+
}
|
451 |
+
|
452 |
+
return $data;
|
453 |
+
}
|
454 |
+
}
|
includes/admin/helpers/csv/class-csv-import.php
ADDED
@@ -0,0 +1,913 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CSV import class
|
4 |
+
*
|
5 |
+
* @package Includes/Admin/Helpers/CSV Import
|
6 |
+
*/
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
die( 'You are not allowed to call this page directly.' );
|
9 |
+
}
|
10 |
+
|
11 |
+
@ini_set( 'auto_detect_line_endings', true );
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Replaces `WPBDP_CSVImporter` (from 2.1) and adds support for sequential imports.
|
15 |
+
*
|
16 |
+
* @since 3.5.8
|
17 |
+
*/
|
18 |
+
class WPBDP_CSV_Import {
|
19 |
+
|
20 |
+
const UTF8_BOM = "\xEF\xBB\xBF";
|
21 |
+
const UTF16_LE_BOM = "\xFF\xFE";
|
22 |
+
|
23 |
+
private static $PERSISTENT = array( 'settings', 'header', 'total_lines', 'processed_lines', 'current_line', 'imported', 'rejected', 'errors', 'done' );
|
24 |
+
|
25 |
+
private $state_id = '';
|
26 |
+
private $working_dir = '';
|
27 |
+
|
28 |
+
private $state_file = '';
|
29 |
+
private $csv_file = '';
|
30 |
+
private $images_dir = '';
|
31 |
+
|
32 |
+
private $settings = array();
|
33 |
+
|
34 |
+
private $header = array();
|
35 |
+
private $fields = array();
|
36 |
+
|
37 |
+
private $total_lines = 0;
|
38 |
+
private $processed_lines = 0;
|
39 |
+
private $current_line = 0;
|
40 |
+
|
41 |
+
private $imported = 0;
|
42 |
+
private $rejected = 0;
|
43 |
+
private $errors = array();
|
44 |
+
private $done = false;
|
45 |
+
|
46 |
+
|
47 |
+
public function __construct( $state_id = '', $csv_file = '', $images_file = '', $settings = array() ) {
|
48 |
+
|
49 |
+
if ( $state_id ) {
|
50 |
+
$this->restore_state( $state_id );
|
51 |
+
} else {
|
52 |
+
if ( ! is_readable( $csv_file ) ) {
|
53 |
+
throw new Exception( 'Invalid CSV file.' );
|
54 |
+
}
|
55 |
+
|
56 |
+
$this->setup_working_dir( $csv_file, $images_file );
|
57 |
+
|
58 |
+
$this->setup_settings( $settings );
|
59 |
+
|
60 |
+
$file = $this->get_csv_file();
|
61 |
+
$file->seek( PHP_INT_MAX );
|
62 |
+
$this->total_lines = absint( $file->key() );
|
63 |
+
$file = null;
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( ! $this->header ) {
|
67 |
+
$this->read_header();
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @since 5.11
|
73 |
+
*/
|
74 |
+
private function setup_settings( $settings ) {
|
75 |
+
$defaults = array(
|
76 |
+
'allow-partial-imports' => true,
|
77 |
+
'csv-file-separator' => ',',
|
78 |
+
'images-separator' => ';',
|
79 |
+
'category-separator' => ';',
|
80 |
+
'create-missing-categories' => true,
|
81 |
+
'assign-listings-to-user' => false,
|
82 |
+
'default-user' => '0',
|
83 |
+
'post-status' => 'publish',
|
84 |
+
'existing-post-status' => 'preserve_status',
|
85 |
+
'disable-email-notifications' => false,
|
86 |
+
'append-images' => false,
|
87 |
+
'test-import' => false,
|
88 |
+
'batch-size' => 40,
|
89 |
+
);
|
90 |
+
|
91 |
+
if ( $settings['csv-file-separator'] === 'tab' ) {
|
92 |
+
$settings['csv-file-separator'] = "\t";
|
93 |
+
}
|
94 |
+
|
95 |
+
$this->settings = array_merge( $defaults, $settings );
|
96 |
+
}
|
97 |
+
|
98 |
+
public function do_work() {
|
99 |
+
if ( $this->done ) {
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
|
103 |
+
$file = $this->get_csv_file();
|
104 |
+
$file->seek( $this->current_line );
|
105 |
+
|
106 |
+
$n = 0;
|
107 |
+
while ( $n < (int) $this->settings['batch-size'] ) {
|
108 |
+
if ( $file->eof() && empty( $file->current() ) ) {
|
109 |
+
$this->done = true;
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
|
113 |
+
$line = $this->get_current_line( $file );
|
114 |
+
|
115 |
+
// We can't use fgetcsv() directly due to https://bugs.php.net/bug.php?id=46569.
|
116 |
+
$line_data = str_getcsv( $line, $this->settings['csv-file-separator'] );
|
117 |
+
|
118 |
+
$file->next();
|
119 |
+
$n++;
|
120 |
+
$this->current_line = $file->key();
|
121 |
+
$this->processed_lines++;
|
122 |
+
|
123 |
+
if ( ! $line_data || ( count( $line_data ) == 1 && empty( $line_data[0] ) ) ) {
|
124 |
+
continue;
|
125 |
+
}
|
126 |
+
|
127 |
+
list( $listing_data, $errors ) = $this->sanitize_and_validate_row( $line_data );
|
128 |
+
|
129 |
+
if ( $errors ) {
|
130 |
+
foreach ( $errors as $e ) {
|
131 |
+
$this->errors[] = array(
|
132 |
+
'line' => $this->current_line,
|
133 |
+
'content' => $line,
|
134 |
+
'error' => $e,
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
$this->rejected++;
|
139 |
+
continue;
|
140 |
+
}
|
141 |
+
|
142 |
+
$result = $this->import_row( $listing_data );
|
143 |
+
@set_time_limit( 0 );
|
144 |
+
|
145 |
+
if ( is_wp_error( $result ) ) {
|
146 |
+
foreach ( $result->get_error_messages() as $e ) {
|
147 |
+
$this->errors[] = array(
|
148 |
+
'line' => $this->current_line,
|
149 |
+
'content' => $line,
|
150 |
+
'error' => $e,
|
151 |
+
);
|
152 |
+
}
|
153 |
+
|
154 |
+
$this->rejected++;
|
155 |
+
continue;
|
156 |
+
}
|
157 |
+
|
158 |
+
$this->imported++;
|
159 |
+
}
|
160 |
+
|
161 |
+
$file = null;
|
162 |
+
$this->state_persist();
|
163 |
+
}
|
164 |
+
|
165 |
+
private function get_csv_file() {
|
166 |
+
$file = new SplFileObject( $this->csv_file );
|
167 |
+
|
168 |
+
return $file;
|
169 |
+
}
|
170 |
+
private function get_current_line( $file ) {
|
171 |
+
$line = $file->current();
|
172 |
+
|
173 |
+
if ( empty( $line ) ) {
|
174 |
+
return '';
|
175 |
+
}
|
176 |
+
|
177 |
+
$converted_line = $this->maybe_convert_encoding( $line );
|
178 |
+
|
179 |
+
// Some code to circumvent limitations in str_getcsv() while PHP #46569 is fixed.
|
180 |
+
return str_replace( '\n', "\n", $converted_line );
|
181 |
+
}
|
182 |
+
|
183 |
+
private function maybe_convert_encoding( $line ) {
|
184 |
+
// Some UTF16-LE string may end with a '\n' character, encoded
|
185 |
+
// as \xOA, instead of \x0A\x00 (the last byte is missing)
|
186 |
+
// making it impossible for iconv to convert the encoding of the
|
187 |
+
// string
|
188 |
+
$line = rtrim( $line, "\n" );
|
189 |
+
// The last byte (\x00) ends up at the beginning of the next line,
|
190 |
+
// so me remove that too.
|
191 |
+
$line = ltrim( $line, "\x00" );
|
192 |
+
|
193 |
+
if ( isset( $this->settings['encoding'] ) ) {
|
194 |
+
$encoding = $this->settings['encoding'];
|
195 |
+
} else {
|
196 |
+
$encoding = wpbdp_detect_encoding( $line );
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( 'UTF-8' != $encoding ) {
|
200 |
+
$converted_line = iconv( $encoding, 'UTF-8', $line );
|
201 |
+
} else {
|
202 |
+
$converted_line = $line;
|
203 |
+
}
|
204 |
+
|
205 |
+
return $converted_line;
|
206 |
+
}
|
207 |
+
|
208 |
+
public function get_import_id() {
|
209 |
+
return $this->state_id;
|
210 |
+
}
|
211 |
+
|
212 |
+
public function get_import_rows_count() {
|
213 |
+
return max( 0, $this->total_lines );
|
214 |
+
}
|
215 |
+
|
216 |
+
public function get_imported_rows_count() {
|
217 |
+
return $this->imported;
|
218 |
+
}
|
219 |
+
|
220 |
+
public function get_rejected_rows_count() {
|
221 |
+
return $this->rejected;
|
222 |
+
}
|
223 |
+
|
224 |
+
public function get_setting( $k ) {
|
225 |
+
return isset( $this->settings[ $k ] ) ? $this->settings[ $k ] : null;
|
226 |
+
}
|
227 |
+
|
228 |
+
public function get_settings() {
|
229 |
+
return $this->settings;
|
230 |
+
}
|
231 |
+
|
232 |
+
public function get_errors() {
|
233 |
+
return $this->errors;
|
234 |
+
}
|
235 |
+
|
236 |
+
public function get_progress( $format = 'n' ) {
|
237 |
+
$total = $this->get_import_rows_count();
|
238 |
+
$done = min( $total, $this->processed_lines );
|
239 |
+
|
240 |
+
switch ( $format ) {
|
241 |
+
case '%': // As a percentage.
|
242 |
+
return round( 100 * $this->get_progress( 'f' ) );
|
243 |
+
break;
|
244 |
+
case 'f': // As a fraction.
|
245 |
+
return round( $done / $total, 3 );
|
246 |
+
break;
|
247 |
+
case 'n': // As # of items read.
|
248 |
+
return $done;
|
249 |
+
break;
|
250 |
+
case 'r': // As # of items remaining.
|
251 |
+
return max( 0, $total - $done );
|
252 |
+
break;
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
public function in_test_mode() {
|
257 |
+
return (bool) $this->settings['test-import'];
|
258 |
+
}
|
259 |
+
|
260 |
+
public function done() {
|
261 |
+
return $this->done;
|
262 |
+
}
|
263 |
+
|
264 |
+
public function cleanup() {
|
265 |
+
WPBDP_FS::rmdir( $this->working_dir );
|
266 |
+
}
|
267 |
+
|
268 |
+
private function restore_state( $state_id ) {
|
269 |
+
$csv_imports_dir = $this->directory_path() . DIRECTORY_SEPARATOR . $state_id;
|
270 |
+
|
271 |
+
// TODO: validate $state_id is really an uniqid() string and does not contain other chars (maybe someone is
|
272 |
+
// trying to access parts that it shouldn't in the FS).
|
273 |
+
if ( ! is_dir( $csv_imports_dir ) ) {
|
274 |
+
throw new Exception( 'Invalid state ID' );
|
275 |
+
}
|
276 |
+
|
277 |
+
$this->working_dir = $csv_imports_dir;
|
278 |
+
$this->state_id = basename( $this->working_dir );
|
279 |
+
$this->csv_file = $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv';
|
280 |
+
$this->images_dir = is_dir( $this->working_dir . DIRECTORY_SEPARATOR . 'images' ) ? $this->working_dir . DIRECTORY_SEPARATOR . 'images' : '';
|
281 |
+
|
282 |
+
$state_file = $this->working_dir . DIRECTORY_SEPARATOR . 'import.state';
|
283 |
+
$this->state_file = $state_file;
|
284 |
+
|
285 |
+
$this->state_load();
|
286 |
+
}
|
287 |
+
|
288 |
+
private function setup_working_dir( $csv_file, $images_file = '' ) {
|
289 |
+
|
290 |
+
$csv_imports_dir = $this->directory_path();
|
291 |
+
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
292 |
+
|
293 |
+
$this->create_folders();
|
294 |
+
|
295 |
+
if ( ! $this->working_dir ) {
|
296 |
+
throw new Exception( 'Could not set working dir' );
|
297 |
+
}
|
298 |
+
|
299 |
+
if ( ! copy( $csv_file, $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv' ) ) {
|
300 |
+
throw new Exception( 'Could not copy CSV file to working directory' );
|
301 |
+
}
|
302 |
+
|
303 |
+
if ( $images_file && file_exists( $images_file ) ) {
|
304 |
+
$dest = $this->working_dir . DIRECTORY_SEPARATOR . 'images.zip';
|
305 |
+
if ( ! copy( $images_file, $dest ) ) { // XXX: maybe move?
|
306 |
+
throw new Exception( 'Could not copy images ZIP file to working directory' );
|
307 |
+
}
|
308 |
+
|
309 |
+
$image_folder = $this->working_dir . DIRECTORY_SEPARATOR . 'images';
|
310 |
+
|
311 |
+
require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
|
312 |
+
$zip = new PclZip( $dest );
|
313 |
+
$files = $zip->extract( PCLZIP_OPT_PATH, $image_folder, PCLZIP_OPT_REMOVE_ALL_PATH );
|
314 |
+
if ( $files ) {
|
315 |
+
$this->images_dir = $image_folder;
|
316 |
+
|
317 |
+
@unlink( $dest );
|
318 |
+
$this->delete_non_images( $files );
|
319 |
+
} else {
|
320 |
+
throw new Exception( 'Images ZIP file could not be uncompressed' );
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
$this->state_id = basename( $this->working_dir );
|
325 |
+
$this->csv_file = $this->working_dir . DIRECTORY_SEPARATOR . 'data.csv';
|
326 |
+
$this->state_file = $this->working_dir . DIRECTORY_SEPARATOR . 'import.state';
|
327 |
+
|
328 |
+
$this->state_persist();
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Create folders and index.php
|
333 |
+
*
|
334 |
+
* @since 5.11.2
|
335 |
+
*/
|
336 |
+
private function create_folders() {
|
337 |
+
require_once dirname( WPBDP_PLUGIN_FILE ) . '/includes/helpers/class-create-file.php';
|
338 |
+
|
339 |
+
$id = uniqid();
|
340 |
+
$import_dir = rtrim( $this->directory_path(), DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . $id;
|
341 |
+
$create_index = new WPBDP_Create_File(
|
342 |
+
array(
|
343 |
+
'file_name' => 'index.php',
|
344 |
+
'folder_name' => 'wpbdp-csv-imports/' . $id
|
345 |
+
)
|
346 |
+
);
|
347 |
+
$create_index->create_index( 'force' );
|
348 |
+
|
349 |
+
if ( is_dir( $import_dir ) ) {
|
350 |
+
$this->working_dir = $import_dir;
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Check the file types after the zip is unzipped.
|
356 |
+
*
|
357 |
+
* @since 5.11
|
358 |
+
*/
|
359 |
+
private function delete_non_images( $files ) {
|
360 |
+
$allowed = array( 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'txt', 'rtf' );
|
361 |
+
foreach ( $files as $file ) {
|
362 |
+
$uploaded_type = strtolower( pathinfo( $file['filename'], PATHINFO_EXTENSION ) );
|
363 |
+
if ( ! in_array( $uploaded_type, $allowed, true ) ) {
|
364 |
+
@unlink( $file['filename'] );
|
365 |
+
}
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* @since 5.11
|
371 |
+
*
|
372 |
+
* @throws {Error}
|
373 |
+
*/
|
374 |
+
private function directory_path() {
|
375 |
+
$upload_dir = wp_upload_dir();
|
376 |
+
|
377 |
+
if ( $upload_dir['error'] ) {
|
378 |
+
throw new Exception();
|
379 |
+
}
|
380 |
+
|
381 |
+
return rtrim( $upload_dir['basedir'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'wpbdp-csv-imports';
|
382 |
+
}
|
383 |
+
|
384 |
+
private function read_header() {
|
385 |
+
$file = new SplFileObject( $this->csv_file );
|
386 |
+
|
387 |
+
$this->detect_encoding_from_header( $file );
|
388 |
+
$this->parse_header( $file );
|
389 |
+
|
390 |
+
$file = null;
|
391 |
+
|
392 |
+
$this->state_persist();
|
393 |
+
}
|
394 |
+
|
395 |
+
private function detect_encoding_from_header( $file ) {
|
396 |
+
$line = $file->current();
|
397 |
+
|
398 |
+
if ( substr( $line, 0, 3 ) == self::UTF8_BOM ) {
|
399 |
+
$this->settings['encoding'] = 'UTF-8';
|
400 |
+
}
|
401 |
+
|
402 |
+
if ( substr( $line, 0, 2 ) == self::UTF16_LE_BOM ) {
|
403 |
+
$this->settings['encoding'] = 'UTF-16LE';
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
private function parse_header( $file ) {
|
408 |
+
$header_line = $this->remove_bom( $file->current() );
|
409 |
+
$header_line = $this->maybe_convert_encoding( $header_line );
|
410 |
+
|
411 |
+
$this->set_header( str_getcsv( $header_line, $this->settings['csv-file-separator'] ) );
|
412 |
+
|
413 |
+
$file->next();
|
414 |
+
$this->current_line = $file->key();
|
415 |
+
}
|
416 |
+
|
417 |
+
private function remove_bom( $str ) {
|
418 |
+
if ( substr( $str, 0, 3 ) == self::UTF8_BOM ) {
|
419 |
+
$str = substr( $str, 3 );
|
420 |
+
}
|
421 |
+
|
422 |
+
if ( substr( $str, 0, 2 ) == self::UTF16_LE_BOM ) {
|
423 |
+
$str = substr( $str, 2 );
|
424 |
+
}
|
425 |
+
|
426 |
+
return $str;
|
427 |
+
}
|
428 |
+
|
429 |
+
private function set_header( $header ) {
|
430 |
+
if ( ! $header || ( count( $header ) == 1 && is_null( $header[0] ) ) ) {
|
431 |
+
throw new Exception( 'Invalid header' );
|
432 |
+
}
|
433 |
+
|
434 |
+
$required_fields = wpbdp_get_form_fields( 'validators=required' );
|
435 |
+
$fields_in_header = array_map( 'trim', $header );
|
436 |
+
|
437 |
+
foreach ( $required_fields as $rf ) {
|
438 |
+
if ( ! in_array( $rf->get_short_name(), $fields_in_header, true ) ) {
|
439 |
+
throw new Exception( sprintf( 'Required header column "%s" missing', $rf->get_short_name() ) );
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
$this->header = array();
|
444 |
+
|
445 |
+
global $wpbdp;
|
446 |
+
$short_names = $wpbdp->formfields->get_short_names();
|
447 |
+
foreach ( $fields_in_header as $short_name ) {
|
448 |
+
$field_id = 0;
|
449 |
+
|
450 |
+
$key = array_search( $short_name, $short_names, true );
|
451 |
+
|
452 |
+
if ( false === $key ) {
|
453 |
+
$field_id = 0;
|
454 |
+
}
|
455 |
+
|
456 |
+
if ( $f = wpbdp_get_form_field( $key ) ) {
|
457 |
+
$field_id = $f->get_id();
|
458 |
+
}
|
459 |
+
|
460 |
+
$this->header[] = array(
|
461 |
+
'short_name' => $short_name,
|
462 |
+
'field_id' => $field_id,
|
463 |
+
);
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
private function state_load() {
|
468 |
+
if ( ! file_exists( $this->state_file ) ) {
|
469 |
+
return;
|
470 |
+
}
|
471 |
+
|
472 |
+
if ( ! is_readable( $this->state_file ) ) {
|
473 |
+
throw new Exception( 'XXX' );
|
474 |
+
}
|
475 |
+
|
476 |
+
$state = unserialize( file_get_contents( $this->state_file ) );
|
477 |
+
|
478 |
+
foreach ( self::$PERSISTENT as $key ) {
|
479 |
+
$this->{$key} = $state[ $key ];
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
private function state_persist() {
|
484 |
+
$state = array();
|
485 |
+
$state['settings'] = $this->settings;
|
486 |
+
$state['header'] = $this->header;
|
487 |
+
$state['current_line'] = $this->current_line;
|
488 |
+
$state['imported'] = $this->imported;
|
489 |
+
$state['errors'] = $this->errors;
|
490 |
+
$state['done'] = $this->done;
|
491 |
+
|
492 |
+
foreach ( self::$PERSISTENT as $key ) {
|
493 |
+
$state[ $key ] = $this->{$key};
|
494 |
+
}
|
495 |
+
|
496 |
+
if ( false === file_put_contents( $this->state_file, serialize( $state ) ) ) {
|
497 |
+
throw new Exception( 'Could not write persistent data' );
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
private function import_row( $data ) {
|
502 |
+
global $wpdb;
|
503 |
+
global $wpbdp;
|
504 |
+
|
505 |
+
if ( $this->settings['test-import'] ) {
|
506 |
+
return;
|
507 |
+
}
|
508 |
+
|
509 |
+
extract( $data );
|
510 |
+
|
511 |
+
$state = (object) array(
|
512 |
+
'fields' => array(),
|
513 |
+
'images' => array(),
|
514 |
+
'categories' => array(),
|
515 |
+
);
|
516 |
+
$errors = array();
|
517 |
+
|
518 |
+
// Create categories.
|
519 |
+
foreach ( $categories as &$c ) {
|
520 |
+
if ( $c['term_id'] ) {
|
521 |
+
$state->categories[] = intval( $c['term_id'] );
|
522 |
+
continue;
|
523 |
+
}
|
524 |
+
|
525 |
+
if ( $t = term_exists( str_replace( '&', '&', $c['name'] ), WPBDP_CATEGORY_TAX ) ) {
|
526 |
+
$c['term_id'] = $t['term_id'];
|
527 |
+
} else {
|
528 |
+
$t = wp_insert_term( str_replace( '&', '&', $c['name'] ), WPBDP_CATEGORY_TAX );
|
529 |
+
|
530 |
+
if ( is_array( $t ) && isset( $t['term_id'] ) ) {
|
531 |
+
$c['term_id'] = $t['term_id'];
|
532 |
+
} elseif ( is_wp_error( $t ) ) {
|
533 |
+
$message = _x( 'Could not create listing category "<category-name>". The operation failed with the following error: <error-message>.', 'admin csv-import', 'business-directory-plugin' );
|
534 |
+
$message = str_replace( '<category-name>', $c['name'], $message );
|
535 |
+
$message = str_replace( '<error-message>', $t->get_error_message(), $message );
|
536 |
+
|
537 |
+
$errors[] = $message;
|
538 |
+
} else {
|
539 |
+
$errors[] = sprintf( _x( 'Could not create listing category "%s"', 'admin csv-import', 'business-directory-plugin' ), $c['name'] );
|
540 |
+
}
|
541 |
+
}
|
542 |
+
|
543 |
+
if ( $c['term_id'] ) {
|
544 |
+
$state->categories[] = intval( $c['term_id'] );
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
+
$listing_id = 0;
|
549 |
+
|
550 |
+
// Support sequence_id.
|
551 |
+
if ( $meta['sequence_id'] ) {
|
552 |
+
$listing_id = intval(
|
553 |
+
$wpdb->get_var(
|
554 |
+
$wpdb->prepare(
|
555 |
+
"SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s LIMIT 1",
|
556 |
+
'_wpbdp[import_sequence_id]', $meta['sequence_id']
|
557 |
+
)
|
558 |
+
)
|
559 |
+
);
|
560 |
+
if ( WPBDP_POST_TYPE != get_post_type( $listing_id ) ) {
|
561 |
+
$listing_id = 0;
|
562 |
+
}
|
563 |
+
}
|
564 |
+
|
565 |
+
// Handle fields.
|
566 |
+
foreach ( $fields as $field_id => $field_data ) {
|
567 |
+
$f = wpbdp_get_form_field( $field_id );
|
568 |
+
|
569 |
+
if ( 'image' != $f->get_field_type_id() ) {
|
570 |
+
continue;
|
571 |
+
}
|
572 |
+
|
573 |
+
// $img = trim( $field_data );
|
574 |
+
$img = array_pop( $field_data );
|
575 |
+
|
576 |
+
if ( ! $img ) {
|
577 |
+
$field_data[] = $img;
|
578 |
+
continue;
|
579 |
+
}
|
580 |
+
|
581 |
+
$media_id = $this->upload_image( $img );
|
582 |
+
|
583 |
+
if ( $media_id ) {
|
584 |
+
$field_data[0] = $media_id;
|
585 |
+
}
|
586 |
+
|
587 |
+
$fields[ $field_id ] = $media_id ? $field_data : array();
|
588 |
+
}
|
589 |
+
|
590 |
+
$state->fields = $fields;
|
591 |
+
|
592 |
+
// Handle images.
|
593 |
+
foreach ( $data['images'] as $filename ) {
|
594 |
+
if ( $img_id = $this->upload_image( $filename ) ) {
|
595 |
+
$state->images[] = $img_id;
|
596 |
+
}
|
597 |
+
}
|
598 |
+
|
599 |
+
// Insert or update listing.
|
600 |
+
$listing_data = (array) $state;
|
601 |
+
$listing_data['listing_id'] = $listing_id;
|
602 |
+
$listing_data['append_images'] = $this->settings['append-images'];
|
603 |
+
$listing_data['post_status'] = $this->settings['post-status'];
|
604 |
+
|
605 |
+
if ( $listing_id ) {
|
606 |
+
$listing_data['post_status'] = $this->settings['existing-post-status'];
|
607 |
+
|
608 |
+
if ( 'preserve_status' === $this->settings['existing-post-status'] ) {
|
609 |
+
$listing_data['post_status'] = get_post_status( $listing_id );
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
if ( ! empty( $data['plan_id'] ) ) {
|
614 |
+
$listing_data['plan_id'] = $data['plan_id'];
|
615 |
+
}
|
616 |
+
|
617 |
+
if ( $data['expires_on'] ) {
|
618 |
+
$listing_data['expires_on'] = $data['expires_on'];
|
619 |
+
}
|
620 |
+
|
621 |
+
if ( $meta['sequence_id'] ) {
|
622 |
+
$listing_data['sequence_id'] = $meta['sequence_id'];
|
623 |
+
}
|
624 |
+
|
625 |
+
if ( $u = get_user_by( 'login', $meta['username'] ) ) {
|
626 |
+
$listing_data['user_id'] = $u->ID;
|
627 |
+
}
|
628 |
+
|
629 |
+
$listing = wpbdp_save_listing( $listing_data, true, 'csv-import' );
|
630 |
+
|
631 |
+
if ( is_wp_error( $listing ) ) {
|
632 |
+
$errors = array_merge( $errors, $listing->get_error_messages() );
|
633 |
+
}
|
634 |
+
|
635 |
+
if ( $errors ) {
|
636 |
+
$error = new WP_Error();
|
637 |
+
|
638 |
+
foreach ( $errors as $e ) {
|
639 |
+
$error->add( 'listing-add-error', $e );
|
640 |
+
}
|
641 |
+
|
642 |
+
return $error;
|
643 |
+
}
|
644 |
+
|
645 |
+
if ( ! empty( $data['terms_and_conditions_acceptance_date'] ) ) {
|
646 |
+
update_post_meta( $listing->get_id(), '_wpbdp_tos_acceptance_date', $data['terms_and_conditions_acceptance_date'] );
|
647 |
+
if ( empty( $meta['sequence_id'] ) ) {
|
648 |
+
wpbdp_insert_log(
|
649 |
+
array(
|
650 |
+
'log_type' => 'listing.terms_and_conditions_accepted',
|
651 |
+
'object_id' => $listing->get_id(),
|
652 |
+
'created_at' => $data['terms_and_conditions_acceptance_date']
|
653 |
+
)
|
654 |
+
);
|
655 |
+
}
|
656 |
+
}
|
657 |
+
|
658 |
+
if ( $state->images ) {
|
659 |
+
$listing->set_thumbnail_id( $state->images[0] );
|
660 |
+
}
|
661 |
+
|
662 |
+
$payment = $listing->get_latest_payment();
|
663 |
+
|
664 |
+
// A payment record created in the last minute means the plan of an existing
|
665 |
+
// listing changed or was just assigned for a new listing.
|
666 |
+
if ( $payment && current_time( 'timestamp' ) - strtotime( $payment->created_at ) < 60 ) {
|
667 |
+
$payment->status = 'completed';
|
668 |
+
$payment->context = 'csv-import';
|
669 |
+
$payment->save();
|
670 |
+
|
671 |
+
wpbdp_insert_log(
|
672 |
+
array(
|
673 |
+
'log_type' => 'payment.note',
|
674 |
+
'object_id' => $payment->id,
|
675 |
+
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
676 |
+
'message' => __( 'Listing imported by admin. Payment skipped.', 'business-directory-plugin' ),
|
677 |
+
)
|
678 |
+
);
|
679 |
+
}
|
680 |
+
|
681 |
+
return $listing->get_id();
|
682 |
+
}
|
683 |
+
|
684 |
+
private function sanitize_and_validate_row( $data ) {
|
685 |
+
global $wpbdp;
|
686 |
+
|
687 |
+
$errors = array();
|
688 |
+
|
689 |
+
$categories = array();
|
690 |
+
$fields = array();
|
691 |
+
$images = array();
|
692 |
+
$expires_on = '';
|
693 |
+
$plan_id = 0;
|
694 |
+
|
695 |
+
$terms_and_conditions_acceptance_date = '';
|
696 |
+
|
697 |
+
$meta = array();
|
698 |
+
$meta['sequence_id'] = 0;
|
699 |
+
$meta['username'] = '';
|
700 |
+
|
701 |
+
if ( $this->settings['assign-listings-to-user'] && $this->settings['default-user'] ) {
|
702 |
+
if ( $u = get_user_by( 'id', $this->settings['default-user'] ) ) {
|
703 |
+
$meta['username'] = $u->user_login;
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
foreach ( $this->get_header() as $i => $col_info ) {
|
708 |
+
$column = $col_info['short_name'];
|
709 |
+
$field = $col_info['field_id'] ? wpbdp_get_form_field( $col_info['field_id'] ) : null;
|
710 |
+
$value = stripslashes( trim( isset( $data[ $i ] ) ? $data[ $i ] : '' ) );
|
711 |
+
|
712 |
+
switch ( $column ) {
|
713 |
+
case 'image':
|
714 |
+
case 'images':
|
715 |
+
$file_names = explode( $this->settings['images-separator'], $value );
|
716 |
+
|
717 |
+
foreach ( $file_names as $f ) {
|
718 |
+
$f = trim( $f );
|
719 |
+
|
720 |
+
if ( $f ) {
|
721 |
+
$images[] = $f;
|
722 |
+
}
|
723 |
+
}
|
724 |
+
|
725 |
+
break;
|
726 |
+
|
727 |
+
case 'username':
|
728 |
+
if ( $this->settings['assign-listings-to-user'] && $value ) {
|
729 |
+
if ( ! username_exists( $value ) ) {
|
730 |
+
$errors[] = sprintf( _x( 'Username "%s" does not exist', 'admin csv-import', 'business-directory-plugin' ), $value );
|
731 |
+
} else {
|
732 |
+
$meta['username'] = $value;
|
733 |
+
}
|
734 |
+
}
|
735 |
+
|
736 |
+
break;
|
737 |
+
|
738 |
+
case 'expires_on':
|
739 |
+
$expires = $this->convert_to_date( $value, $errors );
|
740 |
+
|
741 |
+
if ( $expires ) {
|
742 |
+
$expires_on = $expires;
|
743 |
+
}
|
744 |
+
|
745 |
+
break;
|
746 |
+
|
747 |
+
case 'fee_id':
|
748 |
+
$submitted_fee_id = absint( $value );
|
749 |
+
|
750 |
+
if ( ! $submitted_fee_id ) {
|
751 |
+
break;
|
752 |
+
}
|
753 |
+
|
754 |
+
$plan = wpbdp_get_fee_plan( $submitted_fee_id );
|
755 |
+
|
756 |
+
if ( ! $plan ) {
|
757 |
+
$message = _x( 'There is no Fee Plan with ID = <fee-id>', 'admin csv-import', 'business-directory-plugin' );
|
758 |
+
$message = str_replace( '<fee-id>', $submitted_fee_id, $message );
|
759 |
+
|
760 |
+
$errors[] = $message;
|
761 |
+
|
762 |
+
break;
|
763 |
+
}
|
764 |
+
|
765 |
+
$plan_id = $plan->id;
|
766 |
+
|
767 |
+
break;
|
768 |
+
|
769 |
+
case 'terms_and_conditions_acceptance_date':
|
770 |
+
$tos_date = $this->convert_to_date( $value, $errors );
|
771 |
+
|
772 |
+
if ( $tos_date ) {
|
773 |
+
$terms_and_conditions_acceptance_date = $tos_date;
|
774 |
+
}
|
775 |
+
break;
|
776 |
+
|
777 |
+
case 'sequence_id':
|
778 |
+
$meta['sequence_id'] = absint( $value );
|
779 |
+
|
780 |
+
break;
|
781 |
+
|
782 |
+
default:
|
783 |
+
if ( ! $field ) {
|
784 |
+
break;
|
785 |
+
}
|
786 |
+
|
787 |
+
if ( $field->is_required() && $field->is_empty_value( $value ) ) {
|
788 |
+
$errors[] = sprintf( _x( 'Missing required field: %s', 'admin csv-import', 'business-directory-plugin' ), $column );
|
789 |
+
break;
|
790 |
+
}
|
791 |
+
|
792 |
+
if ( 'category' == $field->get_association() ) {
|
793 |
+
$this->prepare_categories( $value, $categories, $errors );
|
794 |
+
|
795 |
+
/* } else if ( 'tags' == $field->get_association() ) {
|
796 |
+
$tags = array_map( 'trim', explode( $this->settings['category-separator'], $value ) );
|
797 |
+
$fields[ $field->get_id() ] = $tags;
|
798 |
+
*/
|
799 |
+
} else {
|
800 |
+
$fields[ $field->get_id() ] = $field->convert_csv_input( $value, $this->settings );
|
801 |
+
}
|
802 |
+
|
803 |
+
break;
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
+
return array( compact( 'categories', 'fields', 'images', 'meta', 'expires_on', 'plan_id', 'terms_and_conditions_acceptance_date' ), $errors );
|
808 |
+
}
|
809 |
+
|
810 |
+
/**
|
811 |
+
* @since 5.11
|
812 |
+
*/
|
813 |
+
private function prepare_categories( $value, &$categories, &$errors ) {
|
814 |
+
$csv_categories = $this->split_categories( $value );
|
815 |
+
|
816 |
+
foreach ( $csv_categories as $csv_category_ ) {
|
817 |
+
$csv_category = $this->prepare_category_name( $csv_category_ );
|
818 |
+
if ( ! $csv_category ) {
|
819 |
+
continue;
|
820 |
+
}
|
821 |
+
|
822 |
+
$term = term_exists( $csv_category, WPBDP_CATEGORY_TAX );
|
823 |
+
|
824 |
+
if ( $term ) {
|
825 |
+
$categories[] = array(
|
826 |
+
'name' => $csv_category,
|
827 |
+
'term_id' => is_array( $term ) ? $term['term_id'] : $term,
|
828 |
+
);
|
829 |
+
continue;
|
830 |
+
}
|
831 |
+
|
832 |
+
if ( ! $this->settings['create-missing-categories'] ) {
|
833 |
+
$errors[] = sprintf( _x( 'Listing category "%s" does not exist', 'admin csv-import', 'business-directory-plugin' ), $csv_category );
|
834 |
+
continue;
|
835 |
+
}
|
836 |
+
|
837 |
+
if ( ! $this->settings['test-import'] ) {
|
838 |
+
$categories[] = array(
|
839 |
+
'name' => $csv_category,
|
840 |
+
'term_id' => 0,
|
841 |
+
);
|
842 |
+
}
|
843 |
+
}
|
844 |
+
}
|
845 |
+
|
846 |
+
/**
|
847 |
+
* Get rid of entities so ; can be used to separate.
|
848 |
+
*
|
849 |
+
* @since 5.11
|
850 |
+
*/
|
851 |
+
private function split_categories( $value ) {
|
852 |
+
$decoded_value = html_entity_decode( $value );
|
853 |
+
return array_map( 'trim', explode( $this->settings['category-separator'], $decoded_value ) );
|
854 |
+
}
|
855 |
+
|
856 |
+
/**
|
857 |
+
* Get some entities back after removing them.
|
858 |
+
*
|
859 |
+
* @since 5.11
|
860 |
+
*/
|
861 |
+
private function prepare_category_name( $csv_category ) {
|
862 |
+
$csv_category = str_replace( "\n", '-', $csv_category );
|
863 |
+
$csv_category = strip_tags( $csv_category );
|
864 |
+
$csv_category = str_replace( array( '"', "'" ), '', $csv_category );
|
865 |
+
return str_replace( '& ', '& ', $csv_category );
|
866 |
+
}
|
867 |
+
|
868 |
+
private function get_header() {
|
869 |
+
return $this->header;
|
870 |
+
}
|
871 |
+
|
872 |
+
private function upload_image( $filename ) {
|
873 |
+
$filepath = $this->images_dir . DIRECTORY_SEPARATOR . $filename;
|
874 |
+
if ( ! $this->images_dir || ! file_exists( $filepath ) ) {
|
875 |
+
return false;
|
876 |
+
}
|
877 |
+
|
878 |
+
// Make a copy of the file because wpbdp_media_upload() moves the original file.
|
879 |
+
copy( $filepath, $filepath . '.backup' );
|
880 |
+
$media_id = wpbdp_media_upload( $filepath, true, true );
|
881 |
+
rename( $filepath . '.backup', $filepath );
|
882 |
+
|
883 |
+
return $media_id;
|
884 |
+
}
|
885 |
+
|
886 |
+
private function convert_to_date( $value, &$errors ) {
|
887 |
+
$trimmed_value = trim( $value, "/ \t\n\r\0\x0B" );
|
888 |
+
|
889 |
+
if ( empty( $trimmed_value ) ) {
|
890 |
+
return false;
|
891 |
+
}
|
892 |
+
|
893 |
+
if ( preg_match( '#^(\d{1,4}/\d{1,2}/\d{1,4})(\s([0-1]?[0-9]|[2][0-3]):([0-5][0-9])(:[0-5][0-9])?)?$#', $trimmed_value ) ) {
|
894 |
+
$date = strtotime( $trimmed_value );
|
895 |
+
} else {
|
896 |
+
$dates = explode( '/', $trimmed_value );
|
897 |
+
$dates = array_map( 'strtotime', $dates );
|
898 |
+
$dates = array_filter( $dates );
|
899 |
+
|
900 |
+
$date = array_shift( $dates );
|
901 |
+
}
|
902 |
+
|
903 |
+
if ( ! $date ) {
|
904 |
+
$message = _x( "The string <string> couldn't be converted into a valid date.", 'admin csv-import', 'business-directory-plugin' );
|
905 |
+
$message = str_replace( '<string>', '"' . $value . '"', $message );
|
906 |
+
|
907 |
+
$errors[] = $message;
|
908 |
+
return false;
|
909 |
+
}
|
910 |
+
|
911 |
+
return date( 'Y-m-d H:i:s', $date );
|
912 |
+
}
|
913 |
+
}
|
includes/admin/helpers/tables/class-payments-table.php
CHANGED
@@ -109,7 +109,7 @@ class WPBDP__Admin__Payments_Table extends WP_List_Table {
|
|
109 |
}
|
110 |
|
111 |
public function column_date( $payment ) {
|
112 |
-
|
113 |
}
|
114 |
|
115 |
public function column_amount( $payment ) {
|
109 |
}
|
110 |
|
111 |
public function column_date( $payment ) {
|
112 |
+
return date_i18n( get_option( 'date_format' ), strtotime( $payment->created_at ) );
|
113 |
}
|
114 |
|
115 |
public function column_amount( $payment ) {
|
includes/admin/payments.php
CHANGED
@@ -1,135 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
/**
|
5 |
-
* @since 5.0
|
6 |
-
*/
|
7 |
-
class WPBDP__Admin__Payments extends WPBDP__Admin__Controller {
|
8 |
-
|
9 |
-
function _enqueue_scripts() {
|
10 |
-
wp_enqueue_script( 'jquery-ui-datepicker' );
|
11 |
-
wpbdp_enqueue_jquery_ui_style();
|
12 |
-
parent::_enqueue_scripts();
|
13 |
-
}
|
14 |
-
|
15 |
-
function index() {
|
16 |
-
$_SERVER['REQUEST_URI'] = remove_query_arg( 'listing' );
|
17 |
-
|
18 |
-
if ( 'payment_delete' === wpbdp_get_var( array( 'param' => 'message' ) ) ) {
|
19 |
-
wpbdp_admin_message( _x( 'Payment deleted.', 'payments admin', 'business-directory-plugin' ) );
|
20 |
-
}
|
21 |
-
|
22 |
-
require_once WPBDP_INC . 'admin/helpers/tables/class-payments-table.php';
|
23 |
-
|
24 |
-
$table = new WPBDP__Admin__Payments_Table();
|
25 |
-
$table->prepare_items();
|
26 |
-
|
27 |
-
$listing_id = wpbdp_get_var( array( 'param' => 'listing' ) );
|
28 |
-
if ( ! empty( $listing_id ) ) {
|
29 |
-
$listing = WPBDP_Listing::get( $listing_id );
|
30 |
-
|
31 |
-
if ( $listing ) {
|
32 |
-
wpbdp_admin_message(
|
33 |
-
str_replace(
|
34 |
-
'<a>',
|
35 |
-
'<a href="' . esc_url( remove_query_arg( 'listing' ) ) . '">',
|
36 |
-
sprintf(
|
37 |
-
_x( 'You\'re seeing payments related to listing: "%1$s" (ID #%2$d). <a>Click here</a> to see all payments.', 'payments admin', 'business-directory-plugin' ),
|
38 |
-
esc_html( $listing->get_title() ),
|
39 |
-
esc_html( $listing->get_id() )
|
40 |
-
)
|
41 |
-
)
|
42 |
-
);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
return compact( 'table' );
|
47 |
-
}
|
48 |
-
|
49 |
-
function details() {
|
50 |
-
if ( 1 == wpbdp_get_var( array( 'param' => 'message' ) ) ) {
|
51 |
-
wpbdp_admin_message( _x( 'Payment details updated.', 'payments admin', 'business-directory-plugin' ) );
|
52 |
-
}
|
53 |
-
|
54 |
-
$payment_id = wpbdp_get_var( array( 'param' => 'payment-id' ) );
|
55 |
-
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
56 |
-
return compact( 'payment' );
|
57 |
-
}
|
58 |
-
|
59 |
-
function payment_update() {
|
60 |
-
$data = wpbdp_get_var( array( 'param' => 'payment' ), 'post' );
|
61 |
-
$nonce = array( 'nonce' => 'payment-' . absint( $data['id'] ) );
|
62 |
-
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
63 |
-
|
64 |
-
$payment = WPBDP_Payment::objects()->get( absint( $data['id'] ) );
|
65 |
-
$payment->update( $data );
|
66 |
-
$payment->save();
|
67 |
-
|
68 |
-
wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wpbdp_admin_payments&wpbdp-view=details&payment-id=' . $payment->id . '&message=1' ) ) );
|
69 |
-
exit;
|
70 |
-
}
|
71 |
-
|
72 |
-
function payment_delete() {
|
73 |
-
$payment_id = wpbdp_get_var( array( 'param' => 'payment-id', 'sanitize' => 'absint' ), 'request' );
|
74 |
-
$nonce = array( 'nonce' => 'payment-' . $payment_id );
|
75 |
-
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
76 |
-
|
77 |
-
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
78 |
-
$payment->delete();
|
79 |
-
|
80 |
-
wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wpbdp_admin_payments&message=payment_delete' ) ) );
|
81 |
-
exit;
|
82 |
-
}
|
83 |
-
|
84 |
-
function ajax_add_note() {
|
85 |
-
WPBDP_App_Helper::permission_check( 'edit_posts' );
|
86 |
-
check_ajax_referer( 'wpbdp_ajax', 'nonce' );
|
87 |
-
|
88 |
-
$payment_id = wpbdp_get_var( array( 'param' => 'payment_id', 'sanitize' => 'absint' ), 'post' );
|
89 |
-
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
90 |
-
$text = trim( wpbdp_get_var( array( 'param' => 'note', 'sanitize' => 'sanitize_textarea_field' ), 'post' ) );
|
91 |
-
|
92 |
-
$res = new WPBDP_Ajax_Response();
|
93 |
-
|
94 |
-
if ( ! $payment || ! $text ) {
|
95 |
-
$res->send_error();
|
96 |
-
}
|
97 |
-
|
98 |
-
$note = wpbdp_insert_log(
|
99 |
-
array(
|
100 |
-
'log_type' => 'payment.note',
|
101 |
-
'message' => $text,
|
102 |
-
'actor' => 'user:' . get_current_user_id(),
|
103 |
-
'object_id' => $payment_id,
|
104 |
-
)
|
105 |
-
);
|
106 |
-
if ( ! $note ) {
|
107 |
-
$res->send_error();
|
108 |
-
}
|
109 |
-
|
110 |
-
$res->add( 'note', $note );
|
111 |
-
$res->add( 'html', wpbdp_render_page( WPBDP_PATH . 'templates/admin/payments-note.tpl.php', compact( 'note', 'payment_id' ) ) );
|
112 |
-
$res->send();
|
113 |
-
}
|
114 |
-
|
115 |
-
function ajax_delete_note() {
|
116 |
-
$nonce = array( 'nonce' => 'wpbdp_ajax' );
|
117 |
-
WPBDP_App_Helper::permission_check( 'edit_posts', $nonce );
|
118 |
-
|
119 |
-
$payment_id = wpbdp_get_var( array( 'param' => 'payment_id', 'sanitize' => 'absint' ) );
|
120 |
-
$note_key = trim( wpbdp_get_var( array( 'param' => 'note', 'sanitize' => 'sanitize_textarea_field' ) ) );
|
121 |
-
|
122 |
-
$res = new WPBDP_Ajax_Response();
|
123 |
-
|
124 |
-
$note = wpbdp_get_log( $note_key );
|
125 |
-
if ( 'payment.note' != $note->log_type || $payment_id != $note->object_id ) {
|
126 |
-
$res->send_error();
|
127 |
-
}
|
128 |
-
|
129 |
-
wpbdp_delete_log( $note_key );
|
130 |
-
|
131 |
-
$res->add( 'note', $note );
|
132 |
-
$res->send();
|
133 |
-
}
|
134 |
-
|
135 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/controllers/class-admin-payments.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/controllers/class-admin-payments.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/settings/class-settings-admin.php
CHANGED
@@ -1,803 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package BDP/Settings Admin
|
6 |
-
*/
|
7 |
-
|
8 |
-
class WPBDP__Settings_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Used to lookup sections by ID during the section callback execution.
|
12 |
-
*/
|
13 |
-
private $sections_by_id = array();
|
14 |
-
|
15 |
-
|
16 |
-
public function __construct() {
|
17 |
-
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
18 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
19 |
-
add_filter( 'wpbdp_admin_menu_items', array( $this, 'menu_item' ) );
|
20 |
-
|
21 |
-
// Reset settings action.
|
22 |
-
add_action( 'wpbdp_action_reset-default-settings', array( &$this, 'settings_reset_defaults' ) );
|
23 |
-
|
24 |
-
add_action( 'wp_ajax_wpbdp-file-upload', array( $this, '_ajax_file_upload' ) );
|
25 |
-
add_action( 'wp_ajax_nopriv_wpbdp-file-upload', array( $this, '_ajax_file_upload' ) );
|
26 |
-
|
27 |
-
add_filter( 'wpbdp_setting_type_pro_license', array( &$this, 'no_license' ), 20, 2 );
|
28 |
-
}
|
29 |
-
|
30 |
-
public function enqueue_scripts( $hook ) {
|
31 |
-
// strstr() until https://core.trac.wordpress.org/ticket/18857 is fixed.
|
32 |
-
if ( false !== strstr( $hook, 'wpbdp_settings' ) ) {
|
33 |
-
wp_enqueue_script(
|
34 |
-
'wpbdp-admin-settings',
|
35 |
-
WPBDP_ASSETS_URL . 'js/admin-settings.js',
|
36 |
-
array(),
|
37 |
-
WPBDP_VERSION,
|
38 |
-
true
|
39 |
-
);
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
public function menu_item( $menu ) {
|
44 |
-
$menu['wpbdp_settings'] = array(
|
45 |
-
'title' => _x( 'Settings', 'admin menu', 'business-directory-plugin' ),
|
46 |
-
'callback' => array( $this, 'settings_page' ),
|
47 |
-
'priority' => 0,
|
48 |
-
);
|
49 |
-
return $menu;
|
50 |
-
}
|
51 |
-
|
52 |
-
public function register_settings() {
|
53 |
-
$all_groups = wpbdp()->settings->get_registered_groups();
|
54 |
-
$non_tabs = wp_list_filter( $all_groups, array( 'type' => 'tab' ), 'NOT' );
|
55 |
-
|
56 |
-
foreach ( $non_tabs as $group_id => $group ) {
|
57 |
-
switch ( $group['type'] ) {
|
58 |
-
case 'subtab':
|
59 |
-
add_settings_section(
|
60 |
-
'wpbdp_settings_subtab_' . $group_id,
|
61 |
-
'',
|
62 |
-
'__return_false',
|
63 |
-
'wpbdp_settings_subtab_' . $group_id
|
64 |
-
);
|
65 |
-
break;
|
66 |
-
case 'section':
|
67 |
-
add_settings_section(
|
68 |
-
'wpbdp_settings_subtab_' . $group['parent'] . '_' . $group_id,
|
69 |
-
$group['title'],
|
70 |
-
array( $this, 'section_header_callback' ),
|
71 |
-
'wpbdp_settings_subtab_' . $group['parent']
|
72 |
-
);
|
73 |
-
break;
|
74 |
-
default:
|
75 |
-
break;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
foreach ( wpbdp()->settings->get_registered_settings() as $setting_id => $setting ) {
|
80 |
-
$args = array_merge(
|
81 |
-
array(
|
82 |
-
'label_for' => $setting['id'],
|
83 |
-
'class' => '',
|
84 |
-
'desc' => '',
|
85 |
-
'tooltip' => '',
|
86 |
-
),
|
87 |
-
$setting
|
88 |
-
);
|
89 |
-
|
90 |
-
if ( 'silent' == $setting['type'] ) {
|
91 |
-
continue;
|
92 |
-
}
|
93 |
-
|
94 |
-
if ( isset( $all_groups[ $args['group'] ] ) ) {
|
95 |
-
switch ( $all_groups[ $args['group'] ]['type'] ) {
|
96 |
-
case 'subtab':
|
97 |
-
$subtab_group = 'wpbdp_settings_subtab_' . $args['group'];
|
98 |
-
$section_group = $subtab_group;
|
99 |
-
break;
|
100 |
-
case 'section':
|
101 |
-
$subtab_group = 'wpbdp_settings_subtab_' . $all_groups[ $args['group'] ]['parent'];
|
102 |
-
$section_group = $subtab_group . '_' . $args['group'];
|
103 |
-
break;
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
wpbdp_debug_e( 'group not found: ', $args );
|
107 |
-
}
|
108 |
-
|
109 |
-
add_settings_field(
|
110 |
-
'wpbdp_settings[' . $args['id'] . ']',
|
111 |
-
$args['name'],
|
112 |
-
array( $this, 'setting_callback' ),
|
113 |
-
$subtab_group,
|
114 |
-
$section_group,
|
115 |
-
$args
|
116 |
-
);
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
public function section_header_callback( $wp_section ) {
|
121 |
-
return;
|
122 |
-
|
123 |
-
if ( ! empty( $section['desc'] ) ) {
|
124 |
-
echo '<p class="wpbdp-setting-description wpbdp-settings-section-description">';
|
125 |
-
echo $section['desc'];
|
126 |
-
echo '</p>';
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @since 5.9.1
|
132 |
-
*/
|
133 |
-
private function add_requirement( $setting ) {
|
134 |
-
if ( ! empty( $setting['requirements'] ) ) {
|
135 |
-
$reqs_info = array();
|
136 |
-
|
137 |
-
foreach ( $setting['requirements'] as $r ) {
|
138 |
-
$reqs_info[] = array( $r, (bool) wpbdp_get_option( str_replace( '!', '', $r ) ) );
|
139 |
-
}
|
140 |
-
|
141 |
-
echo ' data-requirements="' . esc_attr( wp_json_encode( $reqs_info ) ) . '"';
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
public function setting_callback( $setting ) {
|
146 |
-
if ( 'callback' == $setting['type'] ) {
|
147 |
-
if ( ! empty( $setting['callback'] ) && is_callable( $setting['callback'] ) ) {
|
148 |
-
$callback_html = call_user_func( $setting['callback'], $setting );
|
149 |
-
} else {
|
150 |
-
$callback_html = 'Missing callback';
|
151 |
-
}
|
152 |
-
} else {
|
153 |
-
$value = wpbdp()->settings->get_option( $setting['id'] );
|
154 |
-
|
155 |
-
ob_start();
|
156 |
-
|
157 |
-
if ( method_exists( $this, 'setting_' . $setting['type'] . '_callback' ) ) {
|
158 |
-
call_user_func( array( $this, 'setting_' . $setting['type'] . '_callback' ), $setting, $value );
|
159 |
-
} else {
|
160 |
-
$this->setting_missing_callback( $setting, $value );
|
161 |
-
}
|
162 |
-
|
163 |
-
$callback_html = ob_get_clean();
|
164 |
-
}
|
165 |
-
|
166 |
-
echo '<div id="wpbdp-settings-' . esc_attr( $setting['id'] ) . '" class="wpbdp-settings-setting wpbdp-settings-type-' . esc_attr( $setting['type'] ) . '" ';
|
167 |
-
if ( ! empty( $setting['attrs'] ) ) {
|
168 |
-
wpbdp_html_attributes( $setting['attrs'], array( 'id', 'class' ), true );
|
169 |
-
}
|
170 |
-
|
171 |
-
echo ' data-setting-id="' . esc_attr( $setting['id'] ) . '" ';
|
172 |
-
$this->add_requirement( $setting );
|
173 |
-
echo '>';
|
174 |
-
|
175 |
-
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
176 |
-
echo apply_filters( 'wpbdp_admin_settings_render', $callback_html, $setting );
|
177 |
-
echo '<span id="' . esc_attr( $setting['id'] ) . '"></span>';
|
178 |
-
echo '</div>';
|
179 |
-
}
|
180 |
-
|
181 |
-
public function setting_tooltip( $tooltip = '' ) {
|
182 |
-
if ( ! $tooltip ) {
|
183 |
-
return;
|
184 |
-
}
|
185 |
-
|
186 |
-
return '<span class="wpbdp-setting-tooltip wpbdp-tooltip dashicons dashicons-editor-help" title="' . esc_attr( $tooltip ) . '"></span>';
|
187 |
-
}
|
188 |
-
|
189 |
-
public function setting_missing_callback( $setting, $value ) {
|
190 |
-
if ( has_filter( 'wpbdp_setting_type_' . $setting['type'] ) ) {
|
191 |
-
echo apply_filters( 'wpbdp_setting_type_' . $setting['type'], $setting, $value );
|
192 |
-
} else {
|
193 |
-
echo 'Callback Missing';
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
public function setting_text_callback( $setting, $value ) {
|
198 |
-
echo '<input type="text" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '" />';
|
199 |
-
|
200 |
-
if ( ! empty( $setting['desc'] ) ) {
|
201 |
-
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
public function setting_number_callback( $setting, $value ) {
|
206 |
-
echo '<input type="number" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '"';
|
207 |
-
|
208 |
-
if ( isset( $setting['min'] ) ) {
|
209 |
-
echo 'min="' . $setting['min'] . '"';
|
210 |
-
}
|
211 |
-
|
212 |
-
if ( isset( $setting['step'] ) ) {
|
213 |
-
echo 'step="' . $setting['step'] . '"';
|
214 |
-
}
|
215 |
-
|
216 |
-
if ( isset( $setting['max'] ) ) {
|
217 |
-
echo 'max="' . $setting['max'] . '"';
|
218 |
-
}
|
219 |
-
echo '/>';
|
220 |
-
|
221 |
-
if ( ! empty( $setting['desc'] ) ) {
|
222 |
-
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
223 |
-
}
|
224 |
-
}
|
225 |
-
|
226 |
-
public function setting_textarea_callback( $setting, $value ) {
|
227 |
-
echo '<textarea id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '">';
|
228 |
-
echo esc_textarea( $value );
|
229 |
-
echo '</textarea>';
|
230 |
-
|
231 |
-
if ( ! empty( $setting['desc'] ) ) {
|
232 |
-
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
public function setting_checkbox_callback( $setting, $value ) {
|
237 |
-
$save = $this->checkbox_saved_value( $setting );
|
238 |
-
if ( 1 === $save ) {
|
239 |
-
$value = (bool) $value;
|
240 |
-
}
|
241 |
-
|
242 |
-
echo '<input type="hidden" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="0" />';
|
243 |
-
echo '<label>';
|
244 |
-
echo '<input type="checkbox" id="' . esc_attr( $setting['id'] ) . '" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="' . esc_attr( $save ) . '" ' . checked( $value, $save, false ) . ' />';
|
245 |
-
|
246 |
-
if ( ! empty( $setting['desc'] ) ) {
|
247 |
-
echo wp_kses_post( $setting['desc'] );
|
248 |
-
}
|
249 |
-
echo '</label>';
|
250 |
-
|
251 |
-
if ( ! empty( $setting['tooltip'] ) ) {
|
252 |
-
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['tooltip'] ) . '</span>';
|
253 |
-
}
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Allow a check box to have a value other than 1.
|
258 |
-
*/
|
259 |
-
private function checkbox_saved_value( $setting ) {
|
260 |
-
if ( empty( $setting['option'] ) ) {
|
261 |
-
return 1;
|
262 |
-
}
|
263 |
-
|
264 |
-
return $setting['option'];
|
265 |
-
}
|
266 |
-
|
267 |
-
public function setting_radio_callback( $setting, $value ) {
|
268 |
-
if ( empty( $setting['options'] ) ) {
|
269 |
-
return;
|
270 |
-
}
|
271 |
-
|
272 |
-
echo '<div class="wpbdp-settings-radio-options">';
|
273 |
-
foreach ( $setting['options'] as $option_value => $option_label ) {
|
274 |
-
echo '<div class="wpbdp-settings-radio-option">';
|
275 |
-
echo '<input type="radio" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $option_value ) . '" ' . checked( $option_value, $value, false ) . ' id="wpbdp-settings-' . $setting['id'] . '-radio-' . $option_value . '" />';
|
276 |
-
echo '<label for="wpbdp-settings-' . $setting['id'] . '-radio-' . $option_value . '">';
|
277 |
-
echo $option_label;
|
278 |
-
echo '</label>';
|
279 |
-
echo '</div>';
|
280 |
-
}
|
281 |
-
echo '</div>';
|
282 |
-
|
283 |
-
if ( ! empty( $setting['desc'] ) ) {
|
284 |
-
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
285 |
-
}
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Hide a field setting that is no longer used.
|
290 |
-
*
|
291 |
-
* @since 5.9.1
|
292 |
-
*/
|
293 |
-
public function setting_hidden_callback( $setting, $value ) {
|
294 |
-
?>
|
295 |
-
<input type="hidden" value="<?php echo esc_attr( $value ); ?>" name="wpbdp_settings[<?php echo esc_attr( $setting['id'] ); ?>]"/>
|
296 |
-
<?php
|
297 |
-
}
|
298 |
-
|
299 |
-
public function setting_multicheck_callback( $setting, $value ) {
|
300 |
-
if ( empty( $setting['options'] ) ) {
|
301 |
-
return;
|
302 |
-
}
|
303 |
-
|
304 |
-
$value = (array) $value;
|
305 |
-
|
306 |
-
echo '<input type="hidden" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . '][]" value="" />';
|
307 |
-
|
308 |
-
echo '<div class="wpbdp-settings-multicheck-options wpbdp-grid">';
|
309 |
-
$n = 0;
|
310 |
-
foreach ( $setting['options'] as $option_value => $option_label ) {
|
311 |
-
echo '<div class="wpbdp-settings-multicheck-option wpbdp-half wpbdp-settings-multicheck-option-no-' . esc_attr( $n ) . '">';
|
312 |
-
echo '<input type="checkbox" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . '][]" id="wpbdp-' . esc_attr( $setting['id'] . '-checkbox-no-' . $n ) . '" value="' . esc_attr( $option_value ) . '" ' . checked( in_array( $option_value, $value ), true, false ) . ' />';
|
313 |
-
echo '<label for="wpbdp-' . esc_attr( $setting['id'] . '-checkbox-no-' . $n ) . '">';
|
314 |
-
echo esc_html( $option_label );
|
315 |
-
echo '</label>';
|
316 |
-
echo '</div>';
|
317 |
-
|
318 |
-
$n++;
|
319 |
-
}
|
320 |
-
|
321 |
-
echo '</div>';
|
322 |
-
|
323 |
-
if ( ! empty( $setting['desc'] ) ) {
|
324 |
-
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
325 |
-
}
|
326 |
-
}
|
327 |
-
|
328 |
-
public function setting_select_callback( $setting, $value ) {
|
329 |
-
if ( empty( $setting['options'] ) ) {
|
330 |
-
return;
|
331 |
-
}
|
332 |
-
|
333 |
-
$multiple = ! empty( $setting['multiple'] ) && $setting['multiple'];
|
334 |
-
|
335 |
-
echo '<select id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']' . ( $multiple ? '[]' : '' ) . '" ' . ( $multiple ? 'multiple="multiple"' : '' ) . '>';
|
336 |
-
foreach ( $setting['options'] as $option_value => $option_label ) {
|
337 |
-
if ( $multiple ) {
|
338 |
-
$selected = in_array( $option_value, $value );
|
339 |
-
} else {
|
340 |
-
$selected = ( $option_value == $value );
|
341 |
-
}
|
342 |
-
|
343 |
-
echo '<option value="' . $option_value . '" ' . selected( $selected, true, false ) . '>' . $option_label . '</option>';
|
344 |
-
}
|
345 |
-
echo '</select>';
|
346 |
-
|
347 |
-
if ( ! empty( $setting['desc'] ) ) {
|
348 |
-
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
349 |
-
}
|
350 |
-
}
|
351 |
-
|
352 |
-
public function setting_file_callback( $setting, $value ) {
|
353 |
-
$html = '';
|
354 |
-
$html .= sprintf(
|
355 |
-
'<input id="%s" type="hidden" name="wpbdp_settings[%s]" value="%s" />',
|
356 |
-
$setting['id'],
|
357 |
-
$setting['id'],
|
358 |
-
$value
|
359 |
-
);
|
360 |
-
|
361 |
-
$html .= '<div class="preview">';
|
362 |
-
if ( $value ) {
|
363 |
-
$html .= wp_get_attachment_image( $value, 'wpbdp-thumb', false );
|
364 |
-
}
|
365 |
-
|
366 |
-
$html .= sprintf(
|
367 |
-
'<a href="http://google.com" class="delete" onclick="return WPBDP.fileUpload.deleteUpload(\'%s\', \'%s\');" style="%s">%s</a>',
|
368 |
-
$setting['id'],
|
369 |
-
'wpbdp_settings[' . $setting['id'] . ']',
|
370 |
-
empty( $value ) ? 'display: none;' : '',
|
371 |
-
_x( 'Remove', 'admin settings', 'business-directory-plugin' )
|
372 |
-
);
|
373 |
-
|
374 |
-
$html .= '</div>';
|
375 |
-
|
376 |
-
$nonce = wp_create_nonce( 'wpbdp-file-upload-' . $setting['id'] );
|
377 |
-
$ajax_url = add_query_arg(
|
378 |
-
array(
|
379 |
-
'action' => 'wpbdp-file-upload',
|
380 |
-
'setting_id' => $setting['id'],
|
381 |
-
'element' => 'wpbdp_settings[' . $setting['id'] . ']',
|
382 |
-
'nonce' => $nonce,
|
383 |
-
),
|
384 |
-
admin_url( 'admin-ajax.php' )
|
385 |
-
);
|
386 |
-
|
387 |
-
$html .= '<div class="wpbdp-upload-widget">';
|
388 |
-
$html .= sprintf(
|
389 |
-
'<iframe class="wpbdp-upload-iframe" name="upload-iframe-%s" id="wpbdp-upload-iframe-%s" src="%s" scrolling="no" seamless="seamless" border="0" frameborder="0"></iframe>',
|
390 |
-
$setting['id'],
|
391 |
-
$setting['id'],
|
392 |
-
$ajax_url
|
393 |
-
);
|
394 |
-
$html .= '</div>';
|
395 |
-
|
396 |
-
echo $html;
|
397 |
-
}
|
398 |
-
|
399 |
-
public function setting_url_callback( $setting, $value ) {
|
400 |
-
echo '<input type="url" id="' . $setting['id'] . '" name="wpbdp_settings[' . $setting['id'] . ']" value="' . esc_attr( $value ) . '" placeholder="' . ( ! empty( $setting['placeholder'] ) ? esc_attr( $setting['placeholder'] ) : '' ) . '" />';
|
401 |
-
|
402 |
-
if ( ! empty( $setting['desc'] ) ) {
|
403 |
-
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
404 |
-
}
|
405 |
-
}
|
406 |
-
|
407 |
-
public function setting_color_callback( $setting, $value ) {
|
408 |
-
wp_enqueue_script( 'wp-color-picker' );
|
409 |
-
wp_enqueue_style( 'wp-color-picker' );
|
410 |
-
|
411 |
-
echo '<input type="text" class="cpa-color-picker" id="' . esc_attr( $setting['id'] ) . '" name="wpbdp_settings[' . esc_attr( $setting['id'] ) . ']" value="' . esc_attr( $value ) . '"/>';
|
412 |
-
|
413 |
-
if ( ! empty( $setting['desc'] ) ) {
|
414 |
-
echo '<span class="wpbdp-setting-description">' . wp_kses_post( $setting['desc'] ) . '</span>';
|
415 |
-
}
|
416 |
-
}
|
417 |
-
|
418 |
-
public function setting_text_template_callback( $setting, $value ) {
|
419 |
-
$original_description = $setting['desc'];
|
420 |
-
$placeholders = isset( $setting['placeholders'] ) ? $setting['placeholders'] : array();
|
421 |
-
|
422 |
-
if ( $placeholders ) {
|
423 |
-
foreach ( $placeholders as $pholder => $desc ) {
|
424 |
-
$placeholders[ $pholder ] = sprintf( '%s - %s', '[' . $pholder . ']', $desc );
|
425 |
-
}
|
426 |
-
|
427 |
-
$placeholders_text = implode( ', ', $placeholders ) . '.';
|
428 |
-
} else {
|
429 |
-
$placeholders_text = '';
|
430 |
-
}
|
431 |
-
|
432 |
-
if ( $setting['desc'] && $placeholders_text ) {
|
433 |
-
$setting['desc'] = $setting['desc'] . '<br/><br/>' . sprintf( _x( 'Valid placeholders: %s', 'admin settings', 'business-directory-plugin' ), $placeholders_text );
|
434 |
-
} elseif ( $placeholders_text ) {
|
435 |
-
$settings['desc'] = $placeholders_text;
|
436 |
-
}
|
437 |
-
|
438 |
-
// TODO: this is a proxy for _setting_text (for now).
|
439 |
-
ob_start();
|
440 |
-
$this->setting_text_callback( $setting, $value );
|
441 |
-
$html = ob_get_contents();
|
442 |
-
ob_end_clean();
|
443 |
-
|
444 |
-
$setting['desc'] = $original_description;
|
445 |
-
|
446 |
-
echo $html;
|
447 |
-
}
|
448 |
-
|
449 |
-
public function setting_email_template_callback( $setting, $value ) {
|
450 |
-
if ( ! is_array( $value ) ) {
|
451 |
-
$value = array(
|
452 |
-
'subject' => $setting['default']['subject'],
|
453 |
-
'body' => $value,
|
454 |
-
);
|
455 |
-
}
|
456 |
-
|
457 |
-
$args = array(
|
458 |
-
'setting_name' => 'wpbdp_settings[' . $setting['id'] . ']',
|
459 |
-
'email_subject' => $value['subject'],
|
460 |
-
'email_body' => $value['body'],
|
461 |
-
'placeholders' => ! empty( $setting['placeholders'] ) ? $setting['placeholders'] : array(),
|
462 |
-
);
|
463 |
-
|
464 |
-
if ( ! empty( $setting['desc'] ) ) {
|
465 |
-
echo '<span class="wpbdp-setting-description">' . $setting['desc'] . '</span>';
|
466 |
-
}
|
467 |
-
|
468 |
-
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-email.tpl.php', $args );
|
469 |
-
}
|
470 |
-
|
471 |
-
/**
|
472 |
-
* @since 5.9.1
|
473 |
-
*/
|
474 |
-
public function no_license( $setting, $value ) {
|
475 |
-
$html = '<p class="howto">';
|
476 |
-
$html .= esc_html__( 'Your license key provides access to new features and updates.', 'business-directory-plugin' );
|
477 |
-
$html .= '</p>';
|
478 |
-
$html .= '<p>' . esc_html__( 'You\'re using Business Directory Plugin Lite. Enjoy!', 'business-directory-plugin' );
|
479 |
-
$html .= ' 🙂</p>';
|
480 |
-
|
481 |
-
return $html;
|
482 |
-
}
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Use for non-settings.
|
486 |
-
*
|
487 |
-
* @since 5.9
|
488 |
-
*/
|
489 |
-
public function setting_none_callback() {
|
490 |
-
return;
|
491 |
-
}
|
492 |
-
|
493 |
-
/**
|
494 |
-
* @since 5.9.1
|
495 |
-
*/
|
496 |
-
private function setting_education_callback( $setting ) {
|
497 |
-
WPBDP_Admin_Education::show_tip_message( $setting['desc'] ); // already escaped
|
498 |
-
}
|
499 |
-
|
500 |
-
public function setting_expiration_notices_callback( $setting, $value ) {
|
501 |
-
?>
|
502 |
-
<div class="wpbdp-settings-expiration-notices">
|
503 |
-
<button id="wpbdp-settings-expiration-notices-add-btn" class="button"><?php _ex( 'Add notice', 'expiration notices', 'business-directory-plugin' ); ?></button>
|
504 |
-
|
505 |
-
<div id="wpbdp-settings-expiration-notices-add">
|
506 |
-
<?php
|
507 |
-
$n = ! empty( $value ) ? max( array_keys( $value ) ) + 1 : 0;
|
508 |
-
echo wpbdp_render_page(
|
509 |
-
WPBDP_PATH . 'templates/admin/settings-email.tpl.php',
|
510 |
-
array(
|
511 |
-
'setting_name' => 'new_notice[' . $n . ']',
|
512 |
-
'uid' => '',
|
513 |
-
'container_class' => 'wpbdp-expiration-notice-email',
|
514 |
-
'extra_fields' => $this->setting_expiration_notices_email_extra_fields( 'new_notice[' . $n . ']', '', null ),
|
515 |
-
'editor_only' => true,
|
516 |
-
)
|
517 |
-
);
|
518 |
-
?>
|
519 |
-
</div>
|
520 |
-
|
521 |
-
<?php if ( ! $value ) : ?>
|
522 |
-
<p class="wpbdp-no-items"><?php _ex( 'No notices configured.', 'expiration notices', 'business-directory-plugin' ); ?></p>
|
523 |
-
<?php endif; ?>
|
524 |
-
|
525 |
-
<?php
|
526 |
-
foreach ( $value as $i => $notice ) {
|
527 |
-
$uid = uniqid( 'wpbdp-settings-email-' );
|
528 |
-
$vars = array(
|
529 |
-
'setting_name' => 'wpbdp_settings[' . $setting['id'] . '][' . $i . ']',
|
530 |
-
'uid' => $uid,
|
531 |
-
'container_class' => 'wpbdp-expiration-notice-email',
|
532 |
-
'email_subject' => $notice['subject'],
|
533 |
-
'email_body' => $notice['body'],
|
534 |
-
'extra_fields' => $this->setting_expiration_notices_email_extra_fields( 'wpbdp_settings[' . $setting['id'] . '][' . $i . ']', $uid, $notice ),
|
535 |
-
'after_container' => $this->setting_expiration_notices_email_summary( $notice ),
|
536 |
-
'before_buttons' => '<a href="#" class="delete">' . esc_html__( 'Delete', 'business-directory-plugin' ) . '</a>',
|
537 |
-
'placeholders' =>
|
538 |
-
array(
|
539 |
-
'site' => _x( 'Site title (with link)', 'settings', 'business-directory-plugin' ),
|
540 |
-
'author' => _x( 'Author\'s name', 'settings', 'business-directory-plugin' ),
|
541 |
-
'listing' => _x( 'Listing\'s name (with link)', 'settings', 'business-directory-plugin' ),
|
542 |
-
'expiration' => _x( 'Listing\'s expiration date', 'settings', 'business-directory-plugin' ),
|
543 |
-
'link' => _x( 'Listing\'s renewal link, formatted with an anchor tag', 'settings', 'business-directory-plugin' ),
|
544 |
-
'link-raw' => _x( 'Listing\'s renewal URL, unformatted by any tags', 'settings', 'business-directory-plugin' ),
|
545 |
-
'category' => _x( 'Listing\'s categories', 'settings', 'business-directory-plugin' ),
|
546 |
-
'payment_date' => _x( 'Listing\'s last payment date', 'settings', 'business-directory-plugin' ),
|
547 |
-
'access_key' => _x( 'Listing\'s access key', 'settings', 'business-directory-plugin' ),
|
548 |
-
),
|
549 |
-
);
|
550 |
-
|
551 |
-
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-email.tpl.php', $vars );
|
552 |
-
}
|
553 |
-
?>
|
554 |
-
</div>
|
555 |
-
<?php
|
556 |
-
}
|
557 |
-
|
558 |
-
private function setting_expiration_notices_email_summary( $notice ) {
|
559 |
-
$event = $notice['event'];
|
560 |
-
$listings = $notice['listings'];
|
561 |
-
$relative_time = ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : '';
|
562 |
-
|
563 |
-
if ( 'both' == $listings ) {
|
564 |
-
$recurring_modifier = _x( 'recurring and non-recurring', 'expiration notices', 'business-directory-plugin' );
|
565 |
-
} elseif ( 'recurring' == $listings ) {
|
566 |
-
$recurring_modifier = _x( 'recurring only', 'expiration notices', 'business-directory-plugin' );
|
567 |
-
} else {
|
568 |
-
$recurring_modifier = _x( 'non-recurring only', 'expiration notices', 'business-directory-plugin' );
|
569 |
-
}
|
570 |
-
|
571 |
-
if ( 'renewal' == $event ) {
|
572 |
-
$summary = sprintf( _x( 'Sent when a listing (%s) is renewed.', 'expiration notices', 'business-directory-plugin' ), $recurring_modifier );
|
573 |
-
}
|
574 |
-
|
575 |
-
if ( 'expiration' == $event ) {
|
576 |
-
if ( '0 days' == $relative_time ) {
|
577 |
-
$summary = sprintf( _x( 'Sent when a listing (%s) expires.', 'expiration notices', 'business-directory-plugin' ), $recurring_modifier );
|
578 |
-
} else {
|
579 |
-
$relative_time_parts = explode( ' ', $relative_time );
|
580 |
-
$relative_time_number = trim( str_replace( array( '+', '-' ), '', $relative_time_parts[0] ) );
|
581 |
-
$relative_time_units = $relative_time_parts[1];
|
582 |
-
|
583 |
-
switch ( $relative_time_units ) {
|
584 |
-
case 'days':
|
585 |
-
$relative_time_h = sprintf( _nx( '%d day', '%d days', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
586 |
-
break;
|
587 |
-
case 'weeks':
|
588 |
-
$relative_time_h = sprintf( _nx( '%d week', '%d weeks', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
589 |
-
break;
|
590 |
-
case 'months':
|
591 |
-
$relative_time_h = sprintf( _nx( '%d month', '%d months', $relative_time_number, 'expiration notices', 'business-directory-plugin' ), $relative_time_number );
|
592 |
-
break;
|
593 |
-
}
|
594 |
-
|
595 |
-
if ( $relative_time[0] == '+' ) {
|
596 |
-
/* translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g. non-recuring only) */
|
597 |
-
$summary = sprintf( _x( 'Sent %1$s before a listing (%2$s) expires.', 'expiration notices', 'business-directory-plugin' ), $relative_time_h, $recurring_modifier );
|
598 |
-
} else {
|
599 |
-
/* translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g. non-recuring only) */
|
600 |
-
$summary = sprintf( _x( 'Sent %1$s after a listing (%2$s) expires.', 'expiration notices', 'business-directory-plugin' ), $relative_time_h, $recurring_modifier );
|
601 |
-
}
|
602 |
-
}
|
603 |
-
}
|
604 |
-
|
605 |
-
ob_start();
|
606 |
-
?>
|
607 |
-
<div class="wpbdp-expiration-notice-email-schedule-summary">
|
608 |
-
<?php echo $summary; ?>
|
609 |
-
</div>
|
610 |
-
<?php
|
611 |
-
return ob_get_clean();
|
612 |
-
}
|
613 |
-
|
614 |
-
private function setting_expiration_notices_schedule() {
|
615 |
-
// Notices schedule.
|
616 |
-
$notices_schedule = array(
|
617 |
-
array( 'expiration', '0 days', _x( 'At the time of expiration', 'expiration notices', 'business-directory-plugin' ) ),
|
618 |
-
array( 'renewal', '0 days', _x( 'Right after a successful renewal', 'expiration notices', 'business-directory-plugin' ) ),
|
619 |
-
);
|
620 |
-
foreach ( array(
|
621 |
-
'days' => array( 1, 2, 3, 4, 5 ),
|
622 |
-
'weeks' => array( 1, 2 ),
|
623 |
-
'months' => array( 1, 2 ),
|
624 |
-
) as $unit => $periods ) {
|
625 |
-
foreach ( $periods as $i ) {
|
626 |
-
foreach ( array( '+', '-' ) as $sign ) {
|
627 |
-
switch ( $unit ) {
|
628 |
-
case 'days':
|
629 |
-
$label = sprintf( '+' == $sign ? _nx( '%d day before expiration', '%d days before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d day after expiration', '%d days after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
630 |
-
break;
|
631 |
-
case 'weeks':
|
632 |
-
$label = sprintf( '+' == $sign ? _nx( '%d week before expiration', '%d weeks before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d week after expiration', '%d weeks after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
633 |
-
break;
|
634 |
-
case 'months':
|
635 |
-
$label = sprintf( '+' == $sign ? _nx( '%d month before expiration', '%d months before expiration', $i, 'expiration notices', 'business-directory-plugin' ) : _nx( '%d month after expiration', '%d months after expiration', $i, 'expiration notices', 'business-directory-plugin' ), $i );
|
636 |
-
break;
|
637 |
-
}
|
638 |
-
|
639 |
-
$notices_schedule[] = array( 'expiration', $sign . $i . ' ' . $unit, $label );
|
640 |
-
}
|
641 |
-
}
|
642 |
-
}
|
643 |
-
|
644 |
-
return apply_filters( 'wpbdp_expiration_notices_schedule', $notices_schedule );
|
645 |
-
}
|
646 |
-
|
647 |
-
private function setting_expiration_notices_email_extra_fields( $name, $uid, $notice ) {
|
648 |
-
if ( is_null( $notice ) ) {
|
649 |
-
$notice = array(
|
650 |
-
'event' => 'expiration',
|
651 |
-
'listings' => 'both',
|
652 |
-
'relative_time' => '0 days',
|
653 |
-
'subject' => '',
|
654 |
-
'body' => '',
|
655 |
-
'placeholders' => array(),
|
656 |
-
);
|
657 |
-
}
|
658 |
-
|
659 |
-
ob_start();
|
660 |
-
?>
|
661 |
-
<tr>
|
662 |
-
<th scope="row"><label for="<?php echo $uid; ?>-listings"><?php _ex( 'Applies to', 'expiration notices', 'business-directory-plugin' ); ?></label></th>
|
663 |
-
<td>
|
664 |
-
<select id="<?php echo $uid; ?>-listings" name="<?php echo $name; ?>[listings]">
|
665 |
-
<option value="non-recurring" <?php selected( 'non-recurring', $notice['listings'] ); ?>><?php _ex( 'Non-recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
666 |
-
<option value="recurring" <?php selected( 'recurring', $notice['listings'] ); ?>><?php _ex( 'Recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
667 |
-
<option value="both" <?php selected( 'both', $notice['listings'] ); ?>><?php _ex( 'Recurring and non-recurring listings', 'expiration notices', 'business-directory-plugin' ); ?></option>
|
668 |
-
</select>
|
669 |
-
</td>
|
670 |
-
</tr>
|
671 |
-
<tr>
|
672 |
-
<th scope="row"><label for="<?php echo $uid; ?>-relative-time-and-event"><?php _ex( 'When to send?', 'expiration notices', 'business-directory-plugin' ); ?></label></th>
|
673 |
-
<td>
|
674 |
-
<input type="hidden" value="<?php echo $notice['event']; ?>" class="stored-notice-event" />
|
675 |
-
<input type="hidden" value="<?php echo ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : ''; ?>" class="stored-notice-relative-time" />
|
676 |
-
|
677 |
-
<input type="hidden" name="<?php echo $name; ?>[event]" value="<?php echo $notice['event']; ?>" class="notice-event" />
|
678 |
-
<input type="hidden" name="<?php echo $name; ?>[relative_time]" value="<?php echo ! empty( $notice['relative_time'] ) ? $notice['relative_time'] : ''; ?>" class="notice-relative-time" />
|
679 |
-
|
680 |
-
<select id="<?php echo $uid; ?>-relative-time-and-event" class="relative-time-and-event">
|
681 |
-
<?php foreach ( $this->setting_expiration_notices_schedule() as $item ) : ?>
|
682 |
-
<?php if ( 'renewal' == $item[0] ) : ?>
|
683 |
-
<option value="<?php echo $item[0]; ?>,<?php echo $item[1]; ?>" <?php selected( $item[0], $notice['event'] ); ?>><?php echo $item[2]; ?></option>
|
684 |
-
<?php else : ?>
|
685 |
-
<option value="<?php echo $item[0]; ?>,<?php echo $item[1]; ?>" <?php selected( $item[0] == $notice['event'] && ! empty( $notice['relative_time'] ) && $item[1] == $notice['relative_time'], true ); ?>><?php echo $item[2]; ?></option>
|
686 |
-
<?php endif; ?>
|
687 |
-
<?php endforeach; ?>
|
688 |
-
</select>
|
689 |
-
</td>
|
690 |
-
</tr>
|
691 |
-
<?php
|
692 |
-
return ob_get_clean();
|
693 |
-
}
|
694 |
-
|
695 |
-
|
696 |
-
public function settings_page() {
|
697 |
-
if ( isset( $_REQUEST['reset_defaults'] ) && $_REQUEST['reset_defaults'] == 1 ) {
|
698 |
-
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-reset.tpl.php' );
|
699 |
-
return;
|
700 |
-
}
|
701 |
-
|
702 |
-
if ( isset( $_REQUEST['message'] ) && $_REQUEST['message'] == 'reset' ) {
|
703 |
-
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'settings-updated' ) );
|
704 |
-
wpbdp_admin_message( _x( 'Settings reset to default.', 'settings', 'business-directory-plugin' ) );
|
705 |
-
wpbdp()->admin->admin_notices();
|
706 |
-
}
|
707 |
-
|
708 |
-
$all_groups = wpbdp()->settings->get_registered_groups();
|
709 |
-
|
710 |
-
// Filter out empty groups.
|
711 |
-
$all_groups = wp_list_filter( $all_groups, array( 'count' => 0 ), 'NOT' );
|
712 |
-
|
713 |
-
$tabs = wp_list_filter( $all_groups, array( 'type' => 'tab' ) );
|
714 |
-
$active_tab = wpbdp_get_var( array( 'param' => 'tab' ) );
|
715 |
-
if ( ! isset( $tabs[ $active_tab ] ) ) {
|
716 |
-
$active_tab = 'general';
|
717 |
-
}
|
718 |
-
|
719 |
-
$subtabs = wp_list_filter( $all_groups, array( 'parent' => $active_tab ) );
|
720 |
-
$active_subtab = wpbdp_get_var( array( 'param' => 'subtab' ) );
|
721 |
-
if ( ! isset( $subtabs[ $active_subtab ] ) ) {
|
722 |
-
$subtabs_ids = array_keys( $subtabs );
|
723 |
-
$active_subtab = reset( $subtabs_ids );
|
724 |
-
}
|
725 |
-
|
726 |
-
$active_subtab_description = ! empty( $all_groups[ $active_subtab ]['desc'] ) ? $all_groups[ $active_subtab ]['desc'] : '';
|
727 |
-
$custom_form = ( ! empty( $all_groups[ $active_subtab ]['custom_form'] ) ) && $all_groups[ $active_subtab ]['custom_form'];
|
728 |
-
|
729 |
-
echo wpbdp_render_page( WPBDP_PATH . 'templates/admin/settings-page.tpl.php', compact( 'tabs', 'subtabs', 'active_tab', 'active_subtab', 'active_subtab_description', 'custom_form' ) );
|
730 |
-
}
|
731 |
-
|
732 |
-
|
733 |
-
public function settings_reset_defaults() {
|
734 |
-
if ( wp_verify_nonce( wpbdp_get_var( array( 'param' => '_wpnonce' ), 'post' ), 'reset defaults' ) ) {
|
735 |
-
global $wpbdp;
|
736 |
-
$wpbdp->settings->reset_defaults();
|
737 |
-
|
738 |
-
$url = remove_query_arg( 'reset_defaults' );
|
739 |
-
$url = add_query_arg(
|
740 |
-
array(
|
741 |
-
'settings-updated' => 1,
|
742 |
-
'message' => 'reset',
|
743 |
-
), $url
|
744 |
-
);
|
745 |
-
wp_redirect( $url );
|
746 |
-
exit();
|
747 |
-
}
|
748 |
-
}
|
749 |
-
|
750 |
-
public function _ajax_file_upload() {
|
751 |
-
$setting_id = wpbdp_get_var( array( 'param' => 'setting_id' ), 'request' );
|
752 |
-
$nonce = wpbdp_get_var( array( 'param' => 'nonce' ), 'request' );
|
753 |
-
|
754 |
-
if ( ! $setting_id || ! $nonce ) {
|
755 |
-
die;
|
756 |
-
}
|
757 |
-
|
758 |
-
if ( ! wp_verify_nonce( $nonce, 'wpbdp-file-upload-' . $setting_id ) ) {
|
759 |
-
die;
|
760 |
-
}
|
761 |
-
|
762 |
-
$element = wpbdp_get_var( array( 'param' => 'element', 'default' => 'wpbdp_settings[' . $setting_id . ']' ), 'request' );
|
763 |
-
|
764 |
-
echo '<form action="" method="POST" enctype="multipart/form-data">';
|
765 |
-
echo '<input type="file" name="file" class="file-upload" onchange="return window.parent.WPBDP.fileUpload.handleUpload(this);"/>';
|
766 |
-
echo '</form>';
|
767 |
-
|
768 |
-
if ( isset( $_FILES['file']['error'] ) && $_FILES['file']['error'] == 0 ) {
|
769 |
-
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
770 |
-
$file = wp_unslash( $_FILES['file'] );
|
771 |
-
wpbdp_sanitize_value( 'sanitize_text_field', $file );
|
772 |
-
// TODO: we support only images for now but we could use this for anything later
|
773 |
-
$media_id = wpbdp_media_upload(
|
774 |
-
$file,
|
775 |
-
true,
|
776 |
-
true,
|
777 |
-
array(
|
778 |
-
'image' => true,
|
779 |
-
'min-size' => intval( wpbdp_get_option( 'image-min-filesize' ) ) * 1024,
|
780 |
-
'max-size' => intval( wpbdp_get_option( 'image-max-filesize' ) ) * 1024,
|
781 |
-
'min-width' => wpbdp_get_option( 'image-min-width' ),
|
782 |
-
'min-height' => wpbdp_get_option( 'image-min-height' ),
|
783 |
-
),
|
784 |
-
$errors
|
785 |
-
);
|
786 |
-
if ( $media_id ) {
|
787 |
-
echo '<div class="preview" style="display: none;">';
|
788 |
-
echo wp_get_attachment_image( $media_id, 'thumb', false );
|
789 |
-
echo '</div>';
|
790 |
-
|
791 |
-
echo '<script>';
|
792 |
-
echo sprintf( 'window.parent.WPBDP.fileUpload.finishUpload("%s", %d, "%s");', $setting_id, $media_id, $element );
|
793 |
-
echo '</script>';
|
794 |
-
} else {
|
795 |
-
print $errors;
|
796 |
-
}
|
797 |
-
}
|
798 |
-
|
799 |
-
echo sprintf( '<script>window.parent.WPBDP.fileUpload.resizeIFrame("%s", %d);</script>', $setting_id, 30 );
|
800 |
-
|
801 |
-
exit;
|
802 |
-
}
|
803 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/admin/controllers/class-settings-admin.php' );
|
3 |
+
require_once WPBDP_INC . 'admin/controllers/class-settings-admin.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/settings/class-settings.php
CHANGED
@@ -83,6 +83,7 @@ class WPBDP__Settings {
|
|
83 |
|
84 |
/**
|
85 |
* Register a setings group within the Settings API.
|
|
|
86 |
* @since 5.0
|
87 |
*/
|
88 |
public function register_group( $slug, $title = '', $parent = '', $args = array() ) {
|
@@ -138,6 +139,7 @@ class WPBDP__Settings {
|
|
138 |
|
139 |
/**
|
140 |
* Register a setting within the Settings API.
|
|
|
141 |
* @since 5.0
|
142 |
*/
|
143 |
public function register_setting( $id_or_args, $name = '', $type = 'text', $group = '', $args = array() ) {
|
@@ -167,7 +169,7 @@ class WPBDP__Settings {
|
|
167 |
'dependencies' => array()
|
168 |
) );
|
169 |
|
170 |
-
|
171 |
return false;
|
172 |
}
|
173 |
|
@@ -184,7 +186,7 @@ class WPBDP__Settings {
|
|
184 |
add_filter( 'wpbdp_settings_sanitize_' . $args['id'], 'wp_kses_post' );
|
185 |
}
|
186 |
|
187 |
-
|
188 |
|
189 |
if ( 'silent' != $args['type'] ) {
|
190 |
$this->groups[ $args['group'] ]['count'] += 1;
|
83 |
|
84 |
/**
|
85 |
* Register a setings group within the Settings API.
|
86 |
+
*
|
87 |
* @since 5.0
|
88 |
*/
|
89 |
public function register_group( $slug, $title = '', $parent = '', $args = array() ) {
|
139 |
|
140 |
/**
|
141 |
* Register a setting within the Settings API.
|
142 |
+
*
|
143 |
* @since 5.0
|
144 |
*/
|
145 |
public function register_setting( $id_or_args, $name = '', $type = 'text', $group = '', $args = array() ) {
|
169 |
'dependencies' => array()
|
170 |
) );
|
171 |
|
172 |
+
if ( isset( $this->settings[ $args['id'] ] ) ) {
|
173 |
return false;
|
174 |
}
|
175 |
|
186 |
add_filter( 'wpbdp_settings_sanitize_' . $args['id'], 'wp_kses_post' );
|
187 |
}
|
188 |
|
189 |
+
$this->settings[ $args['id'] ] = $args;
|
190 |
|
191 |
if ( 'silent' != $args['type'] ) {
|
192 |
$this->groups[ $args['group'] ]['count'] += 1;
|
includes/admin/tracking.php
CHANGED
@@ -9,6 +9,7 @@ if ( ! class_exists( 'WPBDP_SiteTracking' ) ) {
|
|
9 |
|
10 |
/**
|
11 |
* Class used for anonymously tracking of users setups.
|
|
|
12 |
* @since 3.2
|
13 |
*/
|
14 |
class WPBDP_SiteTracking {
|
9 |
|
10 |
/**
|
11 |
* Class used for anonymously tracking of users setups.
|
12 |
+
*
|
13 |
* @since 3.2
|
14 |
*/
|
15 |
class WPBDP_SiteTracking {
|
includes/admin/upgrades/class-themes-updater.php
CHANGED
@@ -199,8 +199,9 @@ class WPBDP_Themes_Updater {
|
|
199 |
}
|
200 |
|
201 |
$working_dir = $upgrade_folder . basename( basename( $download_file, '.tmp' ), '.zip' );
|
202 |
-
if ( is_dir( $working_dir) && ! WPBDP_FS::rmdir( $working_dir ) )
|
203 |
return new WP_Error( 'no_upgrade_folder', sprintf( 'Temporary upgrade folder already exists: %s.', $working_dir ) );
|
|
|
204 |
|
205 |
if ( ! WPBDP_FS::mkdir( $working_dir ) )
|
206 |
return new WP_Error( 'no_upgrade_folder', sprintf( 'Could not create upgrade folder: %s.', $working_dir ) );
|
199 |
}
|
200 |
|
201 |
$working_dir = $upgrade_folder . basename( basename( $download_file, '.tmp' ), '.zip' );
|
202 |
+
if ( is_dir( $working_dir ) && ! WPBDP_FS::rmdir( $working_dir ) ) {
|
203 |
return new WP_Error( 'no_upgrade_folder', sprintf( 'Temporary upgrade folder already exists: %s.', $working_dir ) );
|
204 |
+
}
|
205 |
|
206 |
if ( ! WPBDP_FS::mkdir( $working_dir ) )
|
207 |
return new WP_Error( 'no_upgrade_folder', sprintf( 'Could not create upgrade folder: %s.', $working_dir ) );
|
includes/admin/upgrades/migrations/migration-18_0.php
CHANGED
@@ -268,7 +268,7 @@ class WPBDP__Migrations__18_0 extends WPBDP__Migration {
|
|
268 |
if ( ! $count )
|
269 |
return true;
|
270 |
|
271 |
-
|
272 |
$payment_id = $payment->id;
|
273 |
|
274 |
if ( isset( $payment->tag ) ) {
|
268 |
if ( ! $count )
|
269 |
return true;
|
270 |
|
271 |
+
foreach ( $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wpbdp_payments WHERE payment_items IS NULL OR payment_items = %s ORDER BY id ASC LIMIT {$batch_size}", '' ) ) as $payment ) {
|
272 |
$payment_id = $payment->id;
|
273 |
|
274 |
if ( isset( $payment->tag ) ) {
|
includes/admin/upgrades/migrations/migration-2_1.php
CHANGED
@@ -45,7 +45,7 @@ class WPBDP__Migrations__2_1 extends WPBDP__Migration {
|
|
45 |
|
46 |
$newfield = array();
|
47 |
$newfield['label'] = $label;
|
48 |
-
$newfield['type'] = wpbdp_getv( $pre_2_1_types, intval( $type ), 'textfield');
|
49 |
$newfield['validator'] = wpbdp_getv( $pre_2_1_validators, $validation, null );
|
50 |
$newfield['association'] = wpbdp_getv( $pre_2_1_associations, $association, 'meta' );
|
51 |
$newfield['is_required'] = $required === 'yes';
|
45 |
|
46 |
$newfield = array();
|
47 |
$newfield['label'] = $label;
|
48 |
+
$newfield['type'] = wpbdp_getv( $pre_2_1_types, intval( $type ), 'textfield' );
|
49 |
$newfield['validator'] = wpbdp_getv( $pre_2_1_validators, $validation, null );
|
50 |
$newfield['association'] = wpbdp_getv( $pre_2_1_associations, $association, 'meta' );
|
51 |
$newfield['is_required'] = $required === 'yes';
|
includes/admin/upgrades/migrations/migration-3_2.php
CHANGED
@@ -50,8 +50,9 @@ class WPBDP__Migrations__3_2 extends WPBDP__Migration {
|
|
50 |
if ( isset( $f_data['options'] ) && is_array( $f_data['options'] ) ) $newfield['field_data']['options'] = $f_data['options'];
|
51 |
if ( isset( $f_data['open_in_new_window'] ) && $f_data['open_in_new_window'] ) $newfield['field_data']['open_in_new_window'] = true;
|
52 |
|
53 |
-
|
54 |
$newfield['field_type'] = 'url';
|
|
|
55 |
|
56 |
$newfield['display_flags'] = implode( ',', $newfield['display_flags'] );
|
57 |
$newfield['validators'] = implode( ',', $newfield['validators'] );
|
@@ -65,7 +66,7 @@ class WPBDP__Migrations__3_2 extends WPBDP__Migration {
|
|
65 |
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wpbdp_form_fields DROP COLUMN is_required;" );
|
66 |
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wpbdp_form_fields DROP COLUMN type;" );
|
67 |
|
68 |
-
|
69 |
}
|
70 |
|
71 |
public function disable_regions_in_3_2_upgrade() {
|
50 |
if ( isset( $f_data['options'] ) && is_array( $f_data['options'] ) ) $newfield['field_data']['options'] = $f_data['options'];
|
51 |
if ( isset( $f_data['open_in_new_window'] ) && $f_data['open_in_new_window'] ) $newfield['field_data']['open_in_new_window'] = true;
|
52 |
|
53 |
+
if ( $newfield['field_type'] === 'textfield' && in_array( 'url', $newfield['validators'] ) ) {
|
54 |
$newfield['field_type'] = 'url';
|
55 |
+
}
|
56 |
|
57 |
$newfield['display_flags'] = implode( ',', $newfield['display_flags'] );
|
58 |
$newfield['validators'] = implode( ',', $newfield['validators'] );
|
66 |
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wpbdp_form_fields DROP COLUMN is_required;" );
|
67 |
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wpbdp_form_fields DROP COLUMN type;" );
|
68 |
|
69 |
+
add_action( 'admin_notices', array( $this, 'disable_regions_in_3_2_upgrade' ) );
|
70 |
}
|
71 |
|
72 |
public function disable_regions_in_3_2_upgrade() {
|
includes/admin/upgrades/migrations/migration-5_0.php
CHANGED
@@ -4,6 +4,7 @@ class WPBDP__Migrations__5_0 extends WPBDP__Migration {
|
|
4 |
|
5 |
/**
|
6 |
* This upgrade routine takes care of the term splitting feature that is going to be introduced in WP 4.2.
|
|
|
7 |
* @since 3.6.4
|
8 |
*/
|
9 |
public function migrate() {
|
@@ -67,6 +68,7 @@ class WPBDP__Migrations__5_0 extends WPBDP__Migration {
|
|
67 |
|
68 |
/**
|
69 |
* Use this function to update BD references of a pre-split term ID to use the new term ID.
|
|
|
70 |
* @since 3.6.4
|
71 |
*/
|
72 |
public function process_term_split( $old_id = 0 ) {
|
4 |
|
5 |
/**
|
6 |
* This upgrade routine takes care of the term splitting feature that is going to be introduced in WP 4.2.
|
7 |
+
*
|
8 |
* @since 3.6.4
|
9 |
*/
|
10 |
public function migrate() {
|
68 |
|
69 |
/**
|
70 |
* Use this function to update BD references of a pre-split term ID to use the new term ID.
|
71 |
+
*
|
72 |
* @since 3.6.4
|
73 |
*/
|
74 |
public function process_term_split( $old_id = 0 ) {
|
includes/admin/views/review.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
/**
|
6 |
+
* Review template.
|
7 |
+
* Used to request for reviews.
|
8 |
+
*
|
9 |
+
* @since 5.14.3
|
10 |
+
*/
|
11 |
+
?>
|
12 |
+
<div class="notice notice-info is-dismissible wpbdp-review-notice">
|
13 |
+
<div class="wpbdp-satisfied">
|
14 |
+
<p>
|
15 |
+
<?php echo esc_html( $title ); ?>
|
16 |
+
<br/>
|
17 |
+
<?php esc_html_e( 'Are you enjoying Business Directory Plugin?', 'business-directory-plugin' ); ?>
|
18 |
+
</p>
|
19 |
+
<a href="#" class="wpbdp_reverse_button wpbdp_animate_bg show-wpbdp-feedback wpbdp-button-secondary" data-link="feedback">
|
20 |
+
<?php esc_html_e( 'Not Really', 'business-directory-plugin' ); ?>
|
21 |
+
</a>
|
22 |
+
<a href="#" class="wpbdp_animate_bg show-wpbdp-feedback wpbdp-button-primary" data-link="review">
|
23 |
+
<?php esc_html_e( 'Yes!', 'business-directory-plugin' ); ?>
|
24 |
+
</a>
|
25 |
+
</div>
|
26 |
+
<div class="wpbdp-review-request hidden">
|
27 |
+
<p><?php esc_html_e( 'Awesome! Could you do me a BIG favor and give Business Directory Plugin a review to help me grow my little business and boost our motivation?', 'business-directory-plugin' ); ?></p>
|
28 |
+
<p>- Steph Wells<br/>
|
29 |
+
<span><?php esc_html_e( 'Co-Founder and CTO of Business Directory Plugin', 'business-directory-plugin' ); ?><span>
|
30 |
+
</p>
|
31 |
+
<a href="#" class="wpbdp-dismiss-review-notice wpbdp_reverse_button wpbdp-button-secondary" data-link="no" target="_blank" rel="noopener noreferrer">
|
32 |
+
<?php esc_html_e( 'No thanks, maybe later', 'business-directory-plugin' ); ?>
|
33 |
+
</a>
|
34 |
+
<a href="https://wordpress.org/support/plugin/business-directory-plugin/reviews/?filter=5#new-post" class="wpbdp-dismiss-review-notice wpbdp-review-out wpbdp-button-primary" data-link="yes" target="_blank" rel="noopener">
|
35 |
+
<?php esc_html_e( 'Ok, you deserve it', 'business-directory-plugin' ); ?>
|
36 |
+
</a>
|
37 |
+
<br/>
|
38 |
+
<a href="#" class="wpbdp-dismiss-review-notice" data-link="done" target="_blank" rel="noopener noreferrer">
|
39 |
+
<?php esc_html_e( 'I already did', 'business-directory-plugin' ); ?>
|
40 |
+
</a>
|
41 |
+
</div>
|
42 |
+
<div class="wpbdp-feedback-request hidden">
|
43 |
+
<p><?php esc_html_e( 'Sorry to hear you aren\'t enjoying building with Business Directory Plugin. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'business-directory-plugin' ); ?></p>
|
44 |
+
|
45 |
+
<div id="wpbdpapi-feedback" class="wpbdpapi-form" data-url="https://services.strategy11.com/wp-json/frm/v2/forms/bd-feedback?return=html&exclude_script=jquery">
|
46 |
+
<span class="wpbdp-wait wpbdp_visible_spinner"></span>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<script type="text/javascript">
|
51 |
+
jQuery( document ).ready( function( $ ) {
|
52 |
+
$( document ).on( 'click', '.wpbdp-dismiss-review-notice, .wpbdp-review-notice .notice-dismiss', function( event ) {
|
53 |
+
|
54 |
+
if ( ! $( this ).hasClass( 'wpbdp-review-out' ) ) {
|
55 |
+
event.preventDefault();
|
56 |
+
}
|
57 |
+
var link = $( this ).data( 'link' );
|
58 |
+
if ( typeof link === 'undefined' ) {
|
59 |
+
link = 'no';
|
60 |
+
}
|
61 |
+
|
62 |
+
wpbdpDismissReview( link );
|
63 |
+
$( '.wpbdp-review-notice' ).remove();
|
64 |
+
} );
|
65 |
+
|
66 |
+
$( document ).on(' click', '.wpbdp-feedback-request button', function() {
|
67 |
+
wpbdpDismissReview( 'done' );
|
68 |
+
} );
|
69 |
+
|
70 |
+
$( '.show-wpbdp-feedback' ).click( function( e ) {
|
71 |
+
e.preventDefault();
|
72 |
+
var link = $( this ).data( 'link' );
|
73 |
+
var className = '.wpbdp-' + link + '-request';
|
74 |
+
jQuery( '.wpbdp-satisfied' ).hide();
|
75 |
+
jQuery( className ).show();
|
76 |
+
if ( className === '.wpbdp-feedback-request' ) {
|
77 |
+
var wpbdpapi = $('#wpbdpapi-feedback');
|
78 |
+
wpbdpapiGetData( wpbdpapi );
|
79 |
+
}
|
80 |
+
} );
|
81 |
+
} );
|
82 |
+
|
83 |
+
function wpbdpDismissReview( link ) {
|
84 |
+
jQuery.post( ajaxurl, {
|
85 |
+
action: 'wpbdp_dismiss_review',
|
86 |
+
link: link,
|
87 |
+
nonce: '<?php echo esc_html( wp_create_nonce( 'wpbdp_dismiss_review' ) ); ?>'
|
88 |
+
} );
|
89 |
+
}
|
90 |
+
function wpbdpapiGetData( frmcont ) {
|
91 |
+
jQuery.ajax( {
|
92 |
+
dataType:'json',
|
93 |
+
url:frmcont.data( 'url' ),
|
94 |
+
success:function( json ) {
|
95 |
+
var form = json.renderedHtml;
|
96 |
+
frmcont.html( form );
|
97 |
+
}
|
98 |
+
} );
|
99 |
+
}
|
100 |
+
</script>
|
includes/class-abandoned-payment-notification.php
CHANGED
@@ -9,59 +9,62 @@
|
|
9 |
*/
|
10 |
class WPBDP__Abandoned_Payment_Notification {
|
11 |
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
46 |
|
47 |
if ( ! $listing ) {
|
48 |
-
|
49 |
-
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
-
|
67 |
}
|
9 |
*/
|
10 |
class WPBDP__Abandoned_Payment_Notification {
|
11 |
|
12 |
+
private $settings;
|
13 |
+
private $db;
|
14 |
|
15 |
+
public function __construct( $settings, $db ) {
|
16 |
+
$this->settings = $settings;
|
17 |
+
$this->db = $db;
|
18 |
+
}
|
19 |
|
20 |
+
public function send_abandoned_payment_notifications() {
|
21 |
+
$threshold = max( 1, absint( $this->settings->get_option( 'payment-abandonment-threshold' ) ) );
|
22 |
+
$time_for_pending = wpbdp_format_time( strtotime( "-{$threshold} hours", current_time( 'timestamp' ) ), 'mysql' );
|
23 |
+
$notified = get_option( 'wpbdp-payment-abandonment-notified', array() );
|
24 |
|
25 |
+
if ( ! is_array( $notified ) ) {
|
26 |
+
$notified = array();
|
27 |
+
}
|
28 |
|
29 |
+
// For now, we only notify listings with pending INITIAL payments.
|
30 |
+
$to_notify = $this->db->get_results(
|
31 |
+
$this->db->prepare(
|
32 |
+
"SELECT * FROM {$this->db->prefix}wpbdp_payments WHERE status = %s AND payment_type = %s AND created_at < %s ORDER BY created_at",
|
33 |
+
'pending',
|
34 |
+
'initial',
|
35 |
+
$time_for_pending
|
36 |
+
)
|
37 |
+
);
|
38 |
|
39 |
+
foreach ( $to_notify as &$data ) {
|
40 |
+
if ( in_array( $data->id, $notified ) ) {
|
41 |
+
continue;
|
42 |
+
}
|
43 |
|
44 |
+
$payment = WPBDP_Payment::objects()->get( $data->id );
|
45 |
+
if ( ! $payment ) {
|
46 |
+
continue;
|
47 |
+
}
|
48 |
+
$listing = $payment->get_listing();
|
49 |
|
50 |
if ( ! $listing ) {
|
51 |
+
continue;
|
52 |
+
}
|
53 |
|
54 |
+
// Send e-mail.
|
55 |
+
$replacements = array(
|
56 |
+
'listing' => $listing->get_title(),
|
57 |
+
'link' => sprintf( '<a href="%1$s">%1$s</a>', esc_url( $payment->get_checkout_url() ) ),
|
58 |
+
);
|
59 |
|
60 |
+
$email = wpbdp_email_from_template( 'email-templates-payment-abandoned', $replacements );
|
61 |
+
$email->to[] = wpbusdirman_get_the_business_email( $listing->get_id() );
|
62 |
+
$email->template = 'businessdirectory-email';
|
63 |
+
$email->send();
|
64 |
|
65 |
+
$notified[] = $data->id;
|
66 |
+
}
|
67 |
|
68 |
+
update_option( 'wpbdp-payment-abandonment-notified', $notified );
|
69 |
+
}
|
70 |
}
|
includes/class-assets.php
CHANGED
@@ -255,13 +255,19 @@ class WPBDP__Assets {
|
|
255 |
}
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
258 |
public function enqueue_admin_scripts( $force = false ) {
|
259 |
-
|
260 |
-
|
261 |
-
if ( ! $force && ! $wpbdp->is_bd_page() ) {
|
262 |
return;
|
263 |
}
|
264 |
|
|
|
|
|
|
|
265 |
wp_enqueue_style( 'wpbdp-admin', WPBDP_ASSETS_URL . 'css/admin.min.css', array(), WPBDP_VERSION );
|
266 |
|
267 |
wp_enqueue_style( 'thickbox' );
|
@@ -277,7 +283,7 @@ class WPBDP__Assets {
|
|
277 |
|
278 |
wp_enqueue_style( 'wpbdp-js-select2-css' );
|
279 |
|
280 |
-
if ( !
|
281 |
return;
|
282 |
}
|
283 |
|
@@ -336,4 +342,22 @@ class WPBDP__Assets {
|
|
336 |
)
|
337 |
);
|
338 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
}
|
255 |
}
|
256 |
}
|
257 |
|
258 |
+
/**
|
259 |
+
* Load resources on admin page
|
260 |
+
*
|
261 |
+
* @param bool $force Force reloading the resources.
|
262 |
+
*/
|
263 |
public function enqueue_admin_scripts( $force = false ) {
|
264 |
+
if ( ! $force && ! WPBDP_App_Helper::is_bd_page() ) {
|
|
|
|
|
265 |
return;
|
266 |
}
|
267 |
|
268 |
+
// Add admin body class for parent page class to avoid css conflicts.
|
269 |
+
add_filter( 'admin_body_class', array( &$this, 'add_body_class' ) );
|
270 |
+
|
271 |
wp_enqueue_style( 'wpbdp-admin', WPBDP_ASSETS_URL . 'css/admin.min.css', array(), WPBDP_VERSION );
|
272 |
|
273 |
wp_enqueue_style( 'thickbox' );
|
283 |
|
284 |
wp_enqueue_style( 'wpbdp-js-select2-css' );
|
285 |
|
286 |
+
if ( ! WPBDP_App_Helper::is_bd_post_page() ) {
|
287 |
return;
|
288 |
}
|
289 |
|
342 |
)
|
343 |
);
|
344 |
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Add admin body class.
|
348 |
+
* This will be used a wrapper for admin css classes to prevent conflicts with other page styles.
|
349 |
+
*
|
350 |
+
* @param string $admin_body_classes The current admin body classes.
|
351 |
+
*
|
352 |
+
* @since 5.14.3
|
353 |
+
*
|
354 |
+
* @return string $admin_body_classes The body class with the added plugin class.
|
355 |
+
*/
|
356 |
+
public function add_body_class( $admin_body_classes ) {
|
357 |
+
if ( WPBDP_App_Helper::is_bd_page() ) {
|
358 |
+
$admin_body_classes = ' wpbdp-admin-page';
|
359 |
+
}
|
360 |
+
|
361 |
+
return $admin_body_classes;
|
362 |
+
}
|
363 |
}
|
includes/class-fee-plan.php
CHANGED
@@ -1,375 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package BDP/Includes
|
6 |
-
*/
|
7 |
-
/**
|
8 |
-
* @since 5.0
|
9 |
-
*/
|
10 |
-
final class WPBDP__Fee_Plan {
|
11 |
-
|
12 |
-
private $id = 0;
|
13 |
-
|
14 |
-
private $label = '';
|
15 |
-
private $description = '';
|
16 |
-
private $amount = 0.0;
|
17 |
-
private $days = 0;
|
18 |
-
private $images = 0;
|
19 |
-
private $enabled = true;
|
20 |
-
|
21 |
-
private $sticky = false;
|
22 |
-
private $recurring = false;
|
23 |
-
|
24 |
-
private $pricing_model = 'flat';
|
25 |
-
private $pricing_details = array();
|
26 |
-
|
27 |
-
private $supported_categories = 'all';
|
28 |
-
|
29 |
-
private $weight = 0;
|
30 |
-
private $tag = '';
|
31 |
-
private $extra_data = array();
|
32 |
-
|
33 |
-
|
34 |
-
public function __construct( $data = array() ) {
|
35 |
-
if ( $data ) {
|
36 |
-
$this->setup_plan( $data );
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
public function &__get( $key ) {
|
41 |
-
if ( method_exists( $this, 'get_' . $key ) ) {
|
42 |
-
$value = call_user_func( array( $this, 'get_' . $key ) );
|
43 |
-
} else {
|
44 |
-
$value = &$this->{$key};
|
45 |
-
}
|
46 |
-
|
47 |
-
return $value;
|
48 |
-
}
|
49 |
-
|
50 |
-
public function __set( $key, $value ) {
|
51 |
-
$this->{$key} = $value;
|
52 |
-
}
|
53 |
-
|
54 |
-
public function __isset( $key ) {
|
55 |
-
if ( property_exists( $this, $key ) ) {
|
56 |
-
return false === empty( $this->{$key} );
|
57 |
-
} else {
|
58 |
-
return null;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
public function exists() {
|
63 |
-
return ! empty( $this->id );
|
64 |
-
}
|
65 |
-
|
66 |
-
public function save( $fire_hooks = true ) {
|
67 |
-
global $wpdb;
|
68 |
-
|
69 |
-
// Validate.
|
70 |
-
$validation_errors = $this->validate();
|
71 |
-
|
72 |
-
if ( ! empty( $validation_errors ) ) {
|
73 |
-
$error = new WP_Error();
|
74 |
-
|
75 |
-
foreach ( $validation_errors as $col => $msg ) {
|
76 |
-
$error->add( 'validation_error', $msg, array( 'field' => $col ) );
|
77 |
-
}
|
78 |
-
|
79 |
-
return $error;
|
80 |
-
}
|
81 |
-
|
82 |
-
if ( $fire_hooks ) {
|
83 |
-
do_action_ref_array( 'wpbdp_fee_before_save', array( $this ) );
|
84 |
-
}
|
85 |
-
|
86 |
-
$row = array();
|
87 |
-
foreach ( get_object_vars( $this ) as $key => $value ) {
|
88 |
-
$row[ $key ] = $value;
|
89 |
-
}
|
90 |
-
|
91 |
-
if ( ! $this->exists() ) {
|
92 |
-
unset( $row['id'] );
|
93 |
-
}
|
94 |
-
|
95 |
-
$row['pricing_details'] = serialize( $row['pricing_details'] );
|
96 |
-
|
97 |
-
if ( 'all' !== $row['supported_categories'] ) {
|
98 |
-
$row['supported_categories'] = implode( ',', $row['supported_categories'] );
|
99 |
-
}
|
100 |
-
|
101 |
-
if ( empty( $row['extra_data'] ) ) {
|
102 |
-
unset( $row['extra_data'] );
|
103 |
-
} else {
|
104 |
-
$row['extra_data'] = serialize( $row['extra_data'] );
|
105 |
-
}
|
106 |
-
|
107 |
-
$saved = false;
|
108 |
-
$update = $this->exists();
|
109 |
-
if ( $update ) {
|
110 |
-
$saved = $wpdb->update( $wpdb->prefix . 'wpbdp_plans', $row, array( 'id' => $this->id ) );
|
111 |
-
} else {
|
112 |
-
$saved = $wpdb->insert( $wpdb->prefix . 'wpbdp_plans', $row );
|
113 |
-
|
114 |
-
if ( $saved ) {
|
115 |
-
$this->id = $wpdb->insert_id;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( $saved ) {
|
120 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_plans' );
|
121 |
-
if ( $fire_hooks ) {
|
122 |
-
do_action( 'wpbdp_fee_save', $this, $update );
|
123 |
-
}
|
124 |
-
|
125 |
-
$wpdb->update(
|
126 |
-
$wpdb->prefix . 'wpbdp_listings',
|
127 |
-
array( 'is_sticky' => $this->sticky ? 1 : 0 ),
|
128 |
-
array(
|
129 |
-
'fee_id' => $this->id,
|
130 |
-
)
|
131 |
-
);
|
132 |
-
}
|
133 |
-
|
134 |
-
return $saved;
|
135 |
-
}
|
136 |
-
|
137 |
-
public function update( $data ) {
|
138 |
-
unset( $data['id'] );
|
139 |
-
$this->setup_plan( $data );
|
140 |
-
return $this->save();
|
141 |
-
}
|
142 |
-
|
143 |
-
public function delete() {
|
144 |
-
global $wpdb;
|
145 |
-
$deleted = $wpdb->delete( $wpdb->prefix . 'wpbdp_plans', array( 'id' => $this->id ) );
|
146 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_plans' );
|
147 |
-
return $deleted;
|
148 |
-
}
|
149 |
-
|
150 |
-
public function supports_category( $category_id ) {
|
151 |
-
return $this->supports_category_selection( array( $category_id ) );
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* @since 5.0
|
156 |
-
*/
|
157 |
-
public function get_feature_list() {
|
158 |
-
$items = array();
|
159 |
-
|
160 |
-
if ( wpbdp_get_option( 'allow-images' ) ) {
|
161 |
-
if ( ! $this->images ) {
|
162 |
-
$items['images'] = _x( 'No images allowed.', 'fee plan', 'business-directory-plugin' );
|
163 |
-
} else {
|
164 |
-
$items['images'] = sprintf( _nx( '%d image allowed.', '%d images allowed.', $this->images, 'fee plan', 'business-directory-plugin' ), $this->images );
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
$items = apply_filters( 'wpbdp_plan_feature_list', $items, $this );
|
169 |
-
return $items;
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* @since 5.0
|
174 |
-
*/
|
175 |
-
public function calculate_amount( $categories = array() ) {
|
176 |
-
$amount = 0.0;
|
177 |
-
$pricing_info = $this->pricing_details;
|
178 |
-
|
179 |
-
switch ( $this->pricing_model ) {
|
180 |
-
case 'variable':
|
181 |
-
$amount = array_sum( wp_array_slice_assoc( $pricing_info, $categories ) );
|
182 |
-
break;
|
183 |
-
case 'extra':
|
184 |
-
$amount = $this->amount + ( $pricing_info['extra'] * count( $categories ) );
|
185 |
-
break;
|
186 |
-
case 'flat':
|
187 |
-
default:
|
188 |
-
$amount = $this->amount;
|
189 |
-
break;
|
190 |
-
}
|
191 |
-
|
192 |
-
return $amount;
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* @since 5.0
|
197 |
-
*/
|
198 |
-
public function supports_category_selection( $categories = array() ) {
|
199 |
-
if ( ! $categories ) {
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
|
203 |
-
if ( is_string( $this->supported_categories ) && 'all' === $this->supported_categories ) {
|
204 |
-
return true;
|
205 |
-
}
|
206 |
-
|
207 |
-
if ( array_diff( $categories, $this->supported_categories ) ) {
|
208 |
-
return false;
|
209 |
-
}
|
210 |
-
|
211 |
-
return true;
|
212 |
-
}
|
213 |
-
|
214 |
-
public static function get_instance( $fee_id ) {
|
215 |
-
global $wpdb;
|
216 |
-
|
217 |
-
$all_plans = WPBDP_Utils::check_cache(
|
218 |
-
array(
|
219 |
-
'cache_key' => 'all',
|
220 |
-
'group' => 'wpbdp_plans',
|
221 |
-
'type' => 'all',
|
222 |
-
'return' => 'array',
|
223 |
-
)
|
224 |
-
);
|
225 |
-
|
226 |
-
if ( $all_plans && isset( $all_plans[ $fee_id ] ) ) {
|
227 |
-
$row = $all_plans[ $fee_id ];
|
228 |
-
} else {
|
229 |
-
$query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wpbdp_plans WHERE id = %d", $fee_id );
|
230 |
-
$row = WPBDP_Utils::check_cache(
|
231 |
-
array(
|
232 |
-
'cache_key' => $fee_id,
|
233 |
-
'group' => 'wpbdp_plans',
|
234 |
-
'query' => $query,
|
235 |
-
'type' => 'get_row',
|
236 |
-
'return' => 'array',
|
237 |
-
)
|
238 |
-
);
|
239 |
-
}
|
240 |
-
|
241 |
-
if ( ! $row ) {
|
242 |
-
return false;
|
243 |
-
}
|
244 |
-
|
245 |
-
if ( 'all' !== $row['supported_categories'] ) {
|
246 |
-
$row['supported_categories'] = array_map( 'absint', explode( ',', $row['supported_categories'] ) );
|
247 |
-
}
|
248 |
-
|
249 |
-
$row['pricing_details'] = maybe_unserialize( $row['pricing_details'] );
|
250 |
-
$row['extra_data'] = maybe_unserialize( $row['extra_data'] );
|
251 |
-
|
252 |
-
$instance = new self( $row );
|
253 |
-
return $instance;
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* @since 5.0
|
258 |
-
*/
|
259 |
-
public function calculate_expiration_time( $base_time = null ) {
|
260 |
-
if ( ! $base_time ) {
|
261 |
-
$base_time = current_time( 'timestamp' );
|
262 |
-
}
|
263 |
-
|
264 |
-
if ( 0 === $this->days ) {
|
265 |
-
return null;
|
266 |
-
}
|
267 |
-
|
268 |
-
$expire_time = strtotime( sprintf( '+%d days', $this->days ), $base_time );
|
269 |
-
return date( 'Y-m-d H:i:s', $expire_time );
|
270 |
-
}
|
271 |
-
|
272 |
-
private function setup_plan( $data ) {
|
273 |
-
if ( is_object( $data ) ) {
|
274 |
-
$data = get_object_vars( $data );
|
275 |
-
}
|
276 |
-
|
277 |
-
foreach ( $data as $key => $value ) {
|
278 |
-
$this->{$key} = $value;
|
279 |
-
}
|
280 |
-
|
281 |
-
$this->sanitize();
|
282 |
-
}
|
283 |
-
|
284 |
-
private function sanitize() {
|
285 |
-
$this->label = trim( $this->label );
|
286 |
-
$this->amount = floatval( trim( $this->amount ) );
|
287 |
-
$this->days = absint( $this->days );
|
288 |
-
$this->images = absint( $this->images );
|
289 |
-
$this->sticky = (bool) $this->sticky;
|
290 |
-
$this->recurring = (bool) $this->recurring;
|
291 |
-
$this->pricing_model = empty( $this->pricing_model ) ? 'flat' : $this->pricing_model;
|
292 |
-
$this->tag = strtolower( trim( $this->tag ) );
|
293 |
-
|
294 |
-
if ( 'all' !== $this->supported_categories ) {
|
295 |
-
$this->supported_categories = array_filter( array_map( 'absint', (array) $this->supported_categories ), array( $this, 'sanitize_category' ) );
|
296 |
-
}
|
297 |
-
|
298 |
-
if ( empty( $this->supported_categories ) ) {
|
299 |
-
$this->supported_categories = 'all';
|
300 |
-
}
|
301 |
-
|
302 |
-
if ( 'extra' === $this->pricing_model ) {
|
303 |
-
$this->pricing_details = array(
|
304 |
-
'extra' => floatval( $this->pricing_details['extra'] ),
|
305 |
-
);
|
306 |
-
} else {
|
307 |
-
unset( $this->pricing_details['extra'] );
|
308 |
-
}
|
309 |
-
|
310 |
-
// Unset details for categories that are not supported.
|
311 |
-
if ( 'variable' === $this->pricing_model ) {
|
312 |
-
$this->amount = 0.0;
|
313 |
-
|
314 |
-
if ( 'all' !== $this->supported_categories ) {
|
315 |
-
$this->pricing_details = wp_array_slice_assoc( $this->pricing_details, $this->supported_categories );
|
316 |
-
}
|
317 |
-
}
|
318 |
-
|
319 |
-
if ( 'flat' === $this->pricing_model ) {
|
320 |
-
$this->pricing_details = array();
|
321 |
-
}
|
322 |
-
|
323 |
-
// Free plan is special.
|
324 |
-
if ( 'free' === $this->tag ) {
|
325 |
-
$this->pricing_model = 'flat';
|
326 |
-
$this->amount = 0.0;
|
327 |
-
$this->sticky = false;
|
328 |
-
$this->recurring = false;
|
329 |
-
$this->supported_categories = 'all';
|
330 |
-
$this->enabled = true;
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
private function validate() {
|
335 |
-
$this->sanitize();
|
336 |
-
|
337 |
-
$errors = array();
|
338 |
-
|
339 |
-
if ( ! $this->label ) {
|
340 |
-
$errors['label'] = _x( 'Fee label is required.', 'fees-api', 'business-directory-plugin' );
|
341 |
-
}
|
342 |
-
|
343 |
-
// limit 'duration' because of TIMESTAMP limited range (issue #157).
|
344 |
-
// FIXME: this is not a long-term fix. we should move to DATETIME to avoid this entirely.
|
345 |
-
if ( $this->days > 3650 ) {
|
346 |
-
$errors['days'] = _x( 'Fee listing duration must be a number less than 10 years (3650 days).', 'fees-api', 'business-directory-plugin' );
|
347 |
-
}
|
348 |
-
|
349 |
-
if ( 1 == $this->recurring ) {
|
350 |
-
if ( 0 === $this->days ) {
|
351 |
-
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-days">', _x( 'To set this fee as "Recurring" you must have a time for the listing to renew (e.g. 30 days). To avoid issues with the listing, please edit the <a>fee plan</a> appropriately.', 'fees-api', 'business-directory-plugin' ) );
|
352 |
-
}
|
353 |
-
|
354 |
-
$error_message = _x( 'To set this fee as "Recurring" you must set a price for your fee plan. To avoid issues with the listing, please edit the <a>fee plan</a> appropriately.', 'fees-api', 'business-directory-plugin' );
|
355 |
-
|
356 |
-
if ( 'variable' === $this->pricing_model && 0 === array_sum( $this->pricing_details ) ) {
|
357 |
-
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-fee-category">', $error_message );
|
358 |
-
}
|
359 |
-
|
360 |
-
if ( 'extra' === $this->pricing_model && 0 === $this->amount + $this->pricing_details['extra'] ) {
|
361 |
-
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-fee-price">', $error_message );
|
362 |
-
}
|
363 |
-
}
|
364 |
-
|
365 |
-
return $errors;
|
366 |
-
}
|
367 |
-
|
368 |
-
private function sanitize_category( $category_id ) {
|
369 |
-
$category = get_term( absint( $category_id ), WPBDP_CATEGORY_TAX );
|
370 |
-
return $category && ! is_wp_error( $category );
|
371 |
-
|
372 |
-
}
|
373 |
-
}
|
374 |
-
|
375 |
-
require_once WPBDP_INC . 'compatibility/deprecated/class-fee-plan.php';
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/models/class-fee-plan.php' );
|
3 |
+
require_once WPBDP_INC . 'models/class-fee-plan.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-fees-api.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
require_once( WPBDP_INC . 'class-fee-plan.php' );
|
3 |
|
4 |
if ( ! class_exists( 'WPBDP_Fees_API' ) ) {
|
5 |
|
1 |
<?php
|
2 |
+
require_once( WPBDP_INC . 'models/class-fee-plan.php' );
|
3 |
|
4 |
if ( ! class_exists( 'WPBDP_Fees_API' ) ) {
|
5 |
|
includes/class-listing-subscription.php
CHANGED
@@ -1,180 +1,3 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
-
|
4 |
-
private $parent_payment_id = 0;
|
5 |
-
private $listing_id = 0;
|
6 |
-
private $subscription_id = '';
|
7 |
-
|
8 |
-
|
9 |
-
public function __construct( $listing_id = 0, $subscription_id = '' ) {
|
10 |
-
$listing_id = absint( $listing_id );
|
11 |
-
$subscription_id = trim( $subscription_id );
|
12 |
-
|
13 |
-
if ( $listing_id ) {
|
14 |
-
$listing = wpbdp_get_listing( $listing_id );
|
15 |
-
|
16 |
-
if ( $listing && ! $listing->is_recurring() ) {
|
17 |
-
throw new Exception( 'Listing is not recurring!' );
|
18 |
-
}
|
19 |
-
|
20 |
-
if ( $listing ) {
|
21 |
-
$this->fill_data_from_db( 'listing_id', $listing_id );
|
22 |
-
return;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
if ( ! $this->fill_data_from_db( 'subscription_id', $subscription_id ) ) {
|
27 |
-
throw new Exception( 'Subscription does not exist!' );
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
private function fill_data_from_db( $key, $val ) {
|
32 |
-
global $wpdb;
|
33 |
-
|
34 |
-
$row = $wpdb->get_row( $wpdb->prepare( "SELECT listing_id, subscription_id, subscription_data FROM {$wpdb->prefix}wpbdp_listings WHERE {$key} = %s", $val ) );
|
35 |
-
|
36 |
-
if ( ! $row ) {
|
37 |
-
return false;
|
38 |
-
}
|
39 |
-
|
40 |
-
$susc_id = $row->subscription_id;
|
41 |
-
$susc_data = $row->subscription_data ? unserialize( $row->subscription_data ) : array();
|
42 |
-
|
43 |
-
$this->listing_id = absint( $row->listing_id );
|
44 |
-
$this->subscription_id = $susc_id;
|
45 |
-
$this->parent_payment_id = ! empty( $susc_data['parent_payment_id'] ) ? absint( $susc_data['parent_payment_id'] ) : 0;
|
46 |
-
|
47 |
-
$this->data = $susc_data;
|
48 |
-
|
49 |
-
return true;
|
50 |
-
}
|
51 |
-
|
52 |
-
public function get_parent_payment() {
|
53 |
-
if ( $this->parent_payment_id ) {
|
54 |
-
return wpbdp_get_payment( $this->parent_payment_id );
|
55 |
-
}
|
56 |
-
|
57 |
-
return null;
|
58 |
-
}
|
59 |
-
|
60 |
-
public function get_payments() {
|
61 |
-
return ! empty( $this->data['payments'] ) ? $this->data['payments'] : array();
|
62 |
-
}
|
63 |
-
|
64 |
-
public function set_subscription_id( $subscription_id ) {
|
65 |
-
if ( empty( $subscription_id ) ) {
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
|
69 |
-
$this->subscription_id = $subscription_id;
|
70 |
-
$this->save();
|
71 |
-
}
|
72 |
-
|
73 |
-
public function get_subscription_id() {
|
74 |
-
return $this->subscription_id;
|
75 |
-
}
|
76 |
-
|
77 |
-
public function record_payment( $args_or_payment = array() ) {
|
78 |
-
$parent_payment = $this->get_parent_payment();
|
79 |
-
$payments = $this->get_payments();
|
80 |
-
|
81 |
-
if ( is_array( $args_or_payment ) ) {
|
82 |
-
$args = wp_parse_args(
|
83 |
-
$args_or_payment,
|
84 |
-
array(
|
85 |
-
'amount' => '0.0',
|
86 |
-
'gateway_tx_id' => '',
|
87 |
-
'gateway' => '',
|
88 |
-
// TODO: accept 'created_at' and 'mode' (live/test).
|
89 |
-
)
|
90 |
-
);
|
91 |
-
|
92 |
-
if ( ! empty( $args['gateway_tx_id'] ) ) {
|
93 |
-
$p_id = $args['gateway_tx_id'];
|
94 |
-
$p_gateway = ( empty( $args['gateway'] ) && $parent_payment ) ? $parent_payment->gateway : $args['gateway'];
|
95 |
-
$payment = WPBDP_Payment::objects()->get( array( 'gateway_tx_id' => $p_id, 'gateway' => $p_gateway ) ); // Just in case the payment is already in the database.
|
96 |
-
}
|
97 |
-
|
98 |
-
if ( ! $payment ) {
|
99 |
-
$payment = new WPBDP_Payment( $args_or_payment );
|
100 |
-
}
|
101 |
-
} else {
|
102 |
-
$payment = $args_or_payment;
|
103 |
-
}
|
104 |
-
|
105 |
-
if ( $payment->id && in_array( $payment->id, $payments ) )
|
106 |
-
return;
|
107 |
-
|
108 |
-
if ( $parent_payment ) {
|
109 |
-
$payment->parent_id = $parent_payment->id;
|
110 |
-
$payment->listing_id = $parent_payment->listing_id;
|
111 |
-
$payment->payment_type = 'renewal';
|
112 |
-
$payment->payer_email = $parent_payment->payer_email;
|
113 |
-
$payment->payer_first_name = $parent_payment->payer_first_name;
|
114 |
-
$payment->payer_last_name = $parent_payment->payer_last_name;
|
115 |
-
$payment->payer_data = $parent_payment->payer_data;
|
116 |
-
$payment->currency_code = $parent_payment->currency_code;
|
117 |
-
$payment->status = 'completed';
|
118 |
-
$payment->gateway = ( ! $payment->gateway ) ? $parent_payment->gateway : $payment->gateway;
|
119 |
-
|
120 |
-
if ( $item = $parent_payment->find_item( 'recurring_plan' ) ) {
|
121 |
-
$payment->payment_items[] = $item;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
if ( ! $payment->id ) {
|
126 |
-
// Save silently (no hooks fired).
|
127 |
-
$payment->save( false, false );
|
128 |
-
}
|
129 |
-
|
130 |
-
// This is the first payment.
|
131 |
-
if ( ! $payments ) {
|
132 |
-
$this->parent_payment_id = $payment->id;
|
133 |
-
}
|
134 |
-
|
135 |
-
$payments[] = $payment->id;
|
136 |
-
$this->data['payments'] = $payments;
|
137 |
-
$this->save();
|
138 |
-
}
|
139 |
-
|
140 |
-
public function renew() {
|
141 |
-
$listing = wpbdp_get_listing( $this->listing_id );
|
142 |
-
$listing->update_plan();
|
143 |
-
$listing->set_status( 'complete' );
|
144 |
-
$listing->set_post_status( 'publish' );
|
145 |
-
|
146 |
-
do_action( 'wpbdp_listing_renewed', $listing );
|
147 |
-
}
|
148 |
-
|
149 |
-
public function cancel() {
|
150 |
-
global $wpdb;
|
151 |
-
|
152 |
-
$wpdb->update(
|
153 |
-
"{$wpdb->prefix}wpbdp_listings",
|
154 |
-
array(
|
155 |
-
'is_recurring' => '0',
|
156 |
-
'subscription_id' => '',
|
157 |
-
'subscription_data' => ''
|
158 |
-
),
|
159 |
-
array( 'listing_id' => $this->listing_id )
|
160 |
-
);
|
161 |
-
|
162 |
-
do_action( 'wpbdp_listing_subscription_canceled', $this->listing_id );
|
163 |
-
}
|
164 |
-
|
165 |
-
private function save() {
|
166 |
-
global $wpdb;
|
167 |
-
|
168 |
-
$data = array(
|
169 |
-
'parent_payment_id' => $this->parent_payment_id,
|
170 |
-
'payments' => ! empty( $this->data['payments'] ) ? $this->data['payments'] : array()
|
171 |
-
);
|
172 |
-
|
173 |
-
$row = array(
|
174 |
-
'subscription_id' => $this->subscription_id,
|
175 |
-
'subscription_data' => serialize( $data )
|
176 |
-
);
|
177 |
-
|
178 |
-
return $wpdb->update( $wpdb->prefix . 'wpbdp_listings', $row, array( 'listing_id' => $this->listing_id ) );
|
179 |
-
}
|
180 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/models/class-listing-subscription.php' );
|
3 |
+
require_once WPBDP_INC . 'models/class-listing-subscription.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-listing.php
CHANGED
@@ -1,1127 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
* @since 3.4
|
5 |
-
*/
|
6 |
-
require_once WPBDP_PATH . 'includes/class-payment.php';
|
7 |
-
require_once WPBDP_PATH . 'includes/class-listing-subscription.php';
|
8 |
-
require_once WPBDP_PATH . 'includes/helpers/class-listing-image.php';
|
9 |
-
class WPBDP_Listing {
|
10 |
-
|
11 |
-
private $id = 0;
|
12 |
-
private $new = true;
|
13 |
-
|
14 |
-
public function __construct( $id ) {
|
15 |
-
$this->id = intval( $id );
|
16 |
-
}
|
17 |
-
|
18 |
-
public function get_field_value( $id ) {
|
19 |
-
$field = null;
|
20 |
-
|
21 |
-
if ( is_numeric( $id ) ) {
|
22 |
-
$field = wpbdp_get_form_field( $id );
|
23 |
-
} else {
|
24 |
-
$field = wpbdp_get_form_fields( array( 'association' => $id, 'unique' => true ) );
|
25 |
-
if ( ! $field ) {
|
26 |
-
// Get the field by key.
|
27 |
-
$field = wpbdp_get_form_field( $id );
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
return $field ? $field->html_value( $this->id ) : '';
|
32 |
-
}
|
33 |
-
|
34 |
-
public function get_modified_date() {
|
35 |
-
if ( ! $this->id )
|
36 |
-
return '';
|
37 |
-
|
38 |
-
return wpbdp_date( get_post_modified_time( 'U', false, $this->id ) );
|
39 |
-
}
|
40 |
-
|
41 |
-
public function get_images( $fields = 'all', $sorted = false ) {
|
42 |
-
$q = array(
|
43 |
-
'numberposts' => -1,
|
44 |
-
'post_type' => 'attachment',
|
45 |
-
'post_parent' => $this->id,
|
46 |
-
'fields' => 'ids',
|
47 |
-
);
|
48 |
-
|
49 |
-
$attachments = WPBDP_Utils::check_cache(
|
50 |
-
array(
|
51 |
-
'cache_key' => __FUNCTION__ . $fields . '.' . $sorted . ' .' . $this->id,
|
52 |
-
'group' => 'wpbdp_listings',
|
53 |
-
'query' => $q,
|
54 |
-
'type' => 'get_posts',
|
55 |
-
)
|
56 |
-
);
|
57 |
-
$images = get_post_meta( $this->id, '_wpbdp[images]', true );
|
58 |
-
$images = array_merge( is_array( $images ) ? $images : array( $images ), (array) $attachments );
|
59 |
-
|
60 |
-
$get_ids = 'id' === $fields || 'ids' === $fields;
|
61 |
-
$result = array();
|
62 |
-
foreach ( array_unique( $images ) as $attachment_id ) {
|
63 |
-
$attachment = get_post( $attachment_id );
|
64 |
-
if ( ! $attachment || ! wp_attachment_is_image( $attachment->ID ) )
|
65 |
-
continue;
|
66 |
-
|
67 |
-
if ( ! $sorted && $get_ids ) {
|
68 |
-
$result[] = $attachment->ID;
|
69 |
-
} else {
|
70 |
-
$img = WPBDP_Listing_Image::get( $attachment->ID );
|
71 |
-
if ( $img ) {
|
72 |
-
$result[] = $img;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
if ( $result && $sorted ) {
|
78 |
-
uasort(
|
79 |
-
$result,
|
80 |
-
function( $x, $y ) {
|
81 |
-
return $y->weight - $x->weight;
|
82 |
-
}
|
83 |
-
);
|
84 |
-
|
85 |
-
if ( $get_ids ) {
|
86 |
-
foreach ( $result as $i => $img ) {
|
87 |
-
$result[$i] = $img->id;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
$this->prepend_thumbnail( $result, $fields );
|
92 |
-
}
|
93 |
-
|
94 |
-
return $result;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @since 3.6.11
|
99 |
-
*/
|
100 |
-
public function get_images_meta() {
|
101 |
-
$images = $this->get_images( 'ids' );
|
102 |
-
$meta = array();
|
103 |
-
|
104 |
-
foreach ( $images as $img_id ) {
|
105 |
-
$meta[ $img_id ] = array(
|
106 |
-
'order' => (int) get_post_meta( $img_id, '_wpbdp_image_weight', true ),
|
107 |
-
'caption' => strval( get_post_meta( $img_id, '_wpbdp_image_caption', true ) )
|
108 |
-
);
|
109 |
-
}
|
110 |
-
|
111 |
-
return $meta;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Sets listing images.
|
116 |
-
*
|
117 |
-
* @param array $images array of image IDs.
|
118 |
-
* @param boolean $append if TRUE images will be appended without clearing previous ones.
|
119 |
-
*/
|
120 |
-
public function set_images( $images = array(), $append = false ) {
|
121 |
-
if ( ! $append ) {
|
122 |
-
$current = $this->get_images( 'ids' );
|
123 |
-
|
124 |
-
foreach ( $current as $img_id ) {
|
125 |
-
if ( ! in_array( $img_id, $images, true ) && wp_attachment_is_image( $img_id ) )
|
126 |
-
wp_delete_attachment( $img_id, true );
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
foreach ( $images as $image_id ) {
|
131 |
-
wp_update_post( array( 'ID' => $image_id, 'post_parent' => $this->id ) );
|
132 |
-
}
|
133 |
-
|
134 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Remove an image from a listing. If the image belongs to the listing,
|
139 |
-
* clear the post parent or assign it to another listing. This will only
|
140 |
-
* delete images from the media library if the post parent is this listing,
|
141 |
-
* and no other listings are using it.
|
142 |
-
*
|
143 |
-
* @since 5.12
|
144 |
-
*/
|
145 |
-
public function remove_image( $image_id ) {
|
146 |
-
$current = $this->get_images( 'ids' );
|
147 |
-
|
148 |
-
$keep_images = array();
|
149 |
-
foreach ( $current as $current_img_id ) {
|
150 |
-
if ( $image_id === $current_img_id ) {
|
151 |
-
// Remove post parent.
|
152 |
-
$parent_id = (int) wp_get_post_parent_id( $image_id );
|
153 |
-
if ( $parent_id === $this->id ) {
|
154 |
-
WPBDP_Listing_Image::clear_post_parent( $image_id );
|
155 |
-
WPBDP_Listing_Image::maybe_delete_image( $image_id, $this->id );
|
156 |
-
}
|
157 |
-
} else {
|
158 |
-
$keep_images[] = $current_img_id;
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
update_post_meta( $this->id, '_wpbdp[images]', $keep_images );
|
163 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
164 |
-
}
|
165 |
-
|
166 |
-
public function set_thumbnail_id( $image_id ) {
|
167 |
-
delete_post_meta( $this->id, '_wpbdp[thumbnail_id]' );
|
168 |
-
|
169 |
-
if ( ! $image_id ) {
|
170 |
-
delete_post_thumbnail( $this->id );
|
171 |
-
return;
|
172 |
-
}
|
173 |
-
|
174 |
-
set_post_thumbnail( $this->id, $image_id );
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Gets the attachment object that representes this listing's thumbnail.
|
179 |
-
*
|
180 |
-
* @since 5.1.7
|
181 |
-
*
|
182 |
-
* @return null|object Post An attachment of this listing.
|
183 |
-
*/
|
184 |
-
public function get_thumbnail() {
|
185 |
-
$thumbnail = $this->get_saved_thumbnail();
|
186 |
-
|
187 |
-
if ( $thumbnail ) {
|
188 |
-
return $thumbnail;
|
189 |
-
}
|
190 |
-
|
191 |
-
// If no thumbnail is saved, use the first image.
|
192 |
-
$images = $this->get_images( 'ids' );
|
193 |
-
|
194 |
-
if ( ! $images ) {
|
195 |
-
if ( $thumbnail ) {
|
196 |
-
// Clear out previous value.
|
197 |
-
$this->set_thumbnail_id( 0 );
|
198 |
-
}
|
199 |
-
return null;
|
200 |
-
}
|
201 |
-
|
202 |
-
$this->set_thumbnail_id( $images[0] );
|
203 |
-
|
204 |
-
return WPBDP_Utils::check_cache(
|
205 |
-
array(
|
206 |
-
'cache_key' => __FUNCTION__ . $this->id,
|
207 |
-
'group' => 'wpbdp_listings',
|
208 |
-
'query' => $images[0],
|
209 |
-
'type' => 'get_post',
|
210 |
-
)
|
211 |
-
);
|
212 |
-
}
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Get saved thumbnail image.
|
216 |
-
*
|
217 |
-
* @since v5.9
|
218 |
-
*/
|
219 |
-
private function get_saved_thumbnail() {
|
220 |
-
$thumbnail_id = get_post_meta( $this->id, '_thumbnail_id', true );
|
221 |
-
|
222 |
-
if ( ! $thumbnail_id ) {
|
223 |
-
$thumbnail_id = get_post_meta( $this->id, '_wpbdp[thumbnail_id]', true );
|
224 |
-
}
|
225 |
-
|
226 |
-
return $thumbnail_id ? get_post( $thumbnail_id ) : null;
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Add thumbnail as first image.
|
231 |
-
*
|
232 |
-
* @since v5.9
|
233 |
-
*/
|
234 |
-
private function prepend_thumbnail( &$images, $fields = 'ids' ) {
|
235 |
-
$thumbnail = $this->get_saved_thumbnail();
|
236 |
-
if ( ! $thumbnail ) {
|
237 |
-
return;
|
238 |
-
}
|
239 |
-
|
240 |
-
if ( $fields === 'ids' || $fields === 'id' ) {
|
241 |
-
$thumbnail = $thumbnail->ID;
|
242 |
-
$find = array_search( $thumbnail, $images, true );
|
243 |
-
} else {
|
244 |
-
foreach ( $images as $k => $image ) {
|
245 |
-
if ( $image->id === $thumbnail->ID ) {
|
246 |
-
$thumbnail = $image;
|
247 |
-
$find = $k;
|
248 |
-
break;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
if ( isset( $find ) ) {
|
254 |
-
unset( $images[ $find ] );
|
255 |
-
}
|
256 |
-
|
257 |
-
array_unshift( $images, $thumbnail );
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Get the ID of the attachment that represents this listing's thumbnail.
|
262 |
-
*
|
263 |
-
* @return int An ID or 0.
|
264 |
-
*/
|
265 |
-
public function get_thumbnail_id() {
|
266 |
-
$thumbnail = $this->get_thumbnail();
|
267 |
-
|
268 |
-
if ( ! $thumbnail ) {
|
269 |
-
return 0;
|
270 |
-
}
|
271 |
-
|
272 |
-
return $thumbnail->ID;
|
273 |
-
}
|
274 |
-
|
275 |
-
public function set_title( $title ) {
|
276 |
-
wp_update_post( array( 'ID' => $this->id, 'post_title' => $title ) );
|
277 |
-
}
|
278 |
-
|
279 |
-
public function get_title() {
|
280 |
-
return get_the_title( $this->id );
|
281 |
-
}
|
282 |
-
|
283 |
-
public function get_id() {
|
284 |
-
return $this->id;
|
285 |
-
}
|
286 |
-
|
287 |
-
public function calculate_expiration_date( $time, &$fee ) {
|
288 |
-
if ( is_array( $fee ) ) {
|
289 |
-
$days = isset( $fee['days'] ) ? $fee['days'] : $fee['fee_days'];
|
290 |
-
} else if ( is_a( $fee, 'WPBDP__Fee_Plan' ) ) {
|
291 |
-
$days = $fee->days;
|
292 |
-
} elseif ( is_object( $fee ) && isset( $fee->fee_days ) ) {
|
293 |
-
$days = $fee->fee_days;
|
294 |
-
} else {
|
295 |
-
$days = 0;
|
296 |
-
}
|
297 |
-
|
298 |
-
if ( 0 == $days )
|
299 |
-
return null;
|
300 |
-
|
301 |
-
$expire_time = strtotime( sprintf( '+%d days', $days ), $time );
|
302 |
-
return date( 'Y-m-d H:i:s', $expire_time );
|
303 |
-
}
|
304 |
-
|
305 |
-
public function get_categories( $fields = 'all' ) {
|
306 |
-
$args = array();
|
307 |
-
$args['fields'] = $fields;
|
308 |
-
|
309 |
-
return wp_get_post_terms( $this->id, WPBDP_CATEGORY_TAX, $args );
|
310 |
-
}
|
311 |
-
|
312 |
-
public function set_categories( $categories ) {
|
313 |
-
$category_ids = array_map( 'intval', $categories );
|
314 |
-
wp_set_post_terms( $this->id, $category_ids, WPBDP_CATEGORY_TAX, false );
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* @since 5.0
|
319 |
-
*/
|
320 |
-
public function is_recurring() {
|
321 |
-
if ( $plan = $this->get_fee_plan() ) {
|
322 |
-
return $plan->is_recurring;
|
323 |
-
}
|
324 |
-
|
325 |
-
return false;
|
326 |
-
}
|
327 |
-
|
328 |
-
/**
|
329 |
-
* @since 5.0
|
330 |
-
*/
|
331 |
-
public function get_subscription() {
|
332 |
-
try {
|
333 |
-
$subscription = new WPBDP__Listing_Subscription( $this->id );
|
334 |
-
} catch ( Exception $e ) {
|
335 |
-
$subscription = null;
|
336 |
-
}
|
337 |
-
return $subscription;
|
338 |
-
}
|
339 |
-
|
340 |
-
/**
|
341 |
-
* @since 5.0
|
342 |
-
*/
|
343 |
-
public function has_subscription() {
|
344 |
-
global $wpdb;
|
345 |
-
return absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND is_recurring = %d", $this->id, 1 ) ) ) > 0;
|
346 |
-
}
|
347 |
-
|
348 |
-
public function is_published() {
|
349 |
-
return 'publish' == get_post_status( $this->id );
|
350 |
-
}
|
351 |
-
|
352 |
-
public function get_permalink() {
|
353 |
-
if ( ! $this->id )
|
354 |
-
return '';
|
355 |
-
|
356 |
-
return get_permalink( $this->id );
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* @since 5.0
|
361 |
-
*/
|
362 |
-
public function get_admin_edit_link() {
|
363 |
-
return admin_url( 'post.php?post=' . $this->id . '&action=edit' );
|
364 |
-
}
|
365 |
-
|
366 |
-
public function get_payment_status() {
|
367 |
-
$status = 'ok';
|
368 |
-
|
369 |
-
if ( WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id, 'status' => 'pending' ) )->count() > 0 )
|
370 |
-
$status = 'pending';
|
371 |
-
|
372 |
-
return apply_filters( 'WPBDP_Listing::get_payment_status', $status, $this->id );
|
373 |
-
}
|
374 |
-
|
375 |
-
/**
|
376 |
-
* @since 5.1.9
|
377 |
-
*/
|
378 |
-
public function get_renewal_date() {
|
379 |
-
$filters = array(
|
380 |
-
'listing_id' => $this->id,
|
381 |
-
'status' => 'completed',
|
382 |
-
'payment_type' => 'renewal',
|
383 |
-
);
|
384 |
-
|
385 |
-
$payments = WPBDP_Payment::objects()->filter( $filters )->order_by( '-id' )->to_array();
|
386 |
-
|
387 |
-
if ( ! isset( $payments[0] ) ) {
|
388 |
-
return null;
|
389 |
-
}
|
390 |
-
|
391 |
-
return wpbdp_date_full_format( strtotime( $payments[0]->created_at ) );
|
392 |
-
}
|
393 |
-
|
394 |
-
/**
|
395 |
-
* @since 5.0
|
396 |
-
*/
|
397 |
-
public function get_payments() {
|
398 |
-
$payments = WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id ) );
|
399 |
-
return $payments;
|
400 |
-
}
|
401 |
-
|
402 |
-
public function get_latest_payments() {
|
403 |
-
return WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id ) )->order_by( '-id' )->to_array();
|
404 |
-
}
|
405 |
-
|
406 |
-
/**
|
407 |
-
* @since 5.1.9
|
408 |
-
*/
|
409 |
-
public function get_latest_payment() {
|
410 |
-
$payments = $this->get_latest_payments();
|
411 |
-
|
412 |
-
return count( $payments ) ? $payments[0] : null;
|
413 |
-
}
|
414 |
-
|
415 |
-
public function delete_payment_history() {
|
416 |
-
$payments = $this->get_latest_payments();
|
417 |
-
|
418 |
-
if ( ! $payments ) {
|
419 |
-
return new WP_Error( 'No listing payments', _x( 'Listing has no registered payments', 'listing', 'business-directory-plugin' ) );
|
420 |
-
}
|
421 |
-
|
422 |
-
foreach ( $payments as $payment ) {
|
423 |
-
if ( ! $payment->delete() ) {
|
424 |
-
return new WP_Error(
|
425 |
-
'payment delete error',
|
426 |
-
sprintf(
|
427 |
-
'%s: %s',
|
428 |
-
_x( "Can't delete payment", 'listing', 'business-directory-plugin' ),
|
429 |
-
$payment->id
|
430 |
-
)
|
431 |
-
);
|
432 |
-
}
|
433 |
-
}
|
434 |
-
|
435 |
-
return true;
|
436 |
-
|
437 |
-
}
|
438 |
-
|
439 |
-
public function publish() {
|
440 |
-
if ( ! $this->id )
|
441 |
-
return;
|
442 |
-
|
443 |
-
wp_update_post( array( 'post_status' => 'publish', 'ID' => $this->id ) );
|
444 |
-
}
|
445 |
-
|
446 |
-
/**
|
447 |
-
* @since 5.0
|
448 |
-
*/
|
449 |
-
public function set_status( $status ) {
|
450 |
-
global $wpdb;
|
451 |
-
|
452 |
-
$old_status = $this->get_status( false, false );
|
453 |
-
$new_status = $status;
|
454 |
-
|
455 |
-
if ( $old_status == $new_status || ! in_array( $new_status, array_keys( self::get_stati() ), true ) )
|
456 |
-
return;
|
457 |
-
|
458 |
-
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'listing_status' => $new_status ), array( 'listing_id' => $this->id ) );
|
459 |
-
|
460 |
-
switch ( $new_status ) {
|
461 |
-
case 'expired':
|
462 |
-
if ( 'trash' != get_post_status( $this->id ) ) {
|
463 |
-
$this->set_post_status( 'draft' );
|
464 |
-
}
|
465 |
-
|
466 |
-
wpbdp_insert_log( array( 'log_type' => 'listing.expired', 'object_id' => $this->id, 'message' => _x( 'Listing expired', 'listing', 'business-directory-plugin' ) ) );
|
467 |
-
do_action( 'wpbdp_listing_expired', $this );
|
468 |
-
break;
|
469 |
-
default:
|
470 |
-
break;
|
471 |
-
}
|
472 |
-
|
473 |
-
do_action( 'wpbdp_listing_status_change', $this, $old_status, $new_status );
|
474 |
-
}
|
475 |
-
|
476 |
-
public function set_post_status( $status ) {
|
477 |
-
if ( ! $this->id )
|
478 |
-
return;
|
479 |
-
|
480 |
-
$status = apply_filters( 'wpbdp_listing_post_status', $status, $this );
|
481 |
-
|
482 |
-
wp_update_post( array( 'post_status' => $status, 'ID' => $this->id ) );
|
483 |
-
}
|
484 |
-
|
485 |
-
public function delete() {
|
486 |
-
global $wpdb;
|
487 |
-
$status = apply_filters( 'wpbdp_delete_post_status', wpbdp_get_option( 'deleted-status' ) );
|
488 |
-
$wpdb->update( $wpdb->posts, array( 'post_status' => $status ), array( 'ID' => $this->id ) );
|
489 |
-
clean_post_cache( $this->id );
|
490 |
-
|
491 |
-
return true;
|
492 |
-
}
|
493 |
-
|
494 |
-
public function notify( $kind = 'save', &$extra = null ) {
|
495 |
-
// if ( in_array( $kind, array( 'save', 'edit', 'new' ), true ) )
|
496 |
-
// $this->save();
|
497 |
-
//
|
498 |
-
// switch ( $kind ) {
|
499 |
-
// case 'save':
|
500 |
-
// break;
|
501 |
-
//
|
502 |
-
// case 'edit':
|
503 |
-
// do_action_ref_array( 'wpbdp_edit_listing', array( &$this, &$extra ) );
|
504 |
-
// break;
|
505 |
-
//
|
506 |
-
// default:
|
507 |
-
// break;
|
508 |
-
// }
|
509 |
-
}
|
510 |
-
|
511 |
-
/**
|
512 |
-
* @since 3.5.3
|
513 |
-
*/
|
514 |
-
public function get_renewal_hash( $deprecated = 0 ) {
|
515 |
-
$hash = base64_encode( 'listing_id=' . $this->id . '&category_id=' . $deprecated );
|
516 |
-
return $hash;
|
517 |
-
}
|
518 |
-
|
519 |
-
/**
|
520 |
-
* @since 5.0
|
521 |
-
*/
|
522 |
-
public function renew() {
|
523 |
-
$plan = $this->get_fee_plan();
|
524 |
-
|
525 |
-
if ( ! $plan )
|
526 |
-
return false;
|
527 |
-
|
528 |
-
global $wpdb;
|
529 |
-
|
530 |
-
$row = array();
|
531 |
-
|
532 |
-
$listing_expiration_time = $this->get_expiration_time();
|
533 |
-
$current_time = current_time( 'timestamp' );
|
534 |
-
$expiration_base_time = $current_time > $listing_expiration_time ? $current_time : $listing_expiration_time;
|
535 |
-
$expiration = $this->calculate_expiration_date( $expiration_base_time, $plan );
|
536 |
-
|
537 |
-
if ( $expiration ) {
|
538 |
-
$row['expiration_date'] = $expiration;
|
539 |
-
}
|
540 |
-
|
541 |
-
if ( ! empty( $row ) ) {
|
542 |
-
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', $row, array( 'listing_id' => $this->id ) );
|
543 |
-
} else {
|
544 |
-
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}wpbdp_listings SET expiration_date = NULL WHERE listing_id = %d", $this->id ) );
|
545 |
-
}
|
546 |
-
|
547 |
-
$this->set_status( 'complete' );
|
548 |
-
$this->set_post_status( 'publish' );
|
549 |
-
|
550 |
-
do_action( 'wpbdp_listing_renewed', $this, false, 'admin' );
|
551 |
-
}
|
552 |
-
|
553 |
-
public function get_renewal_url( $deprecated = 0 ) {
|
554 |
-
// TODO: we should probably encode the ID somehow using info that only we have so external users can't
|
555 |
-
// start checking renewal for all listings just by changing the ID.
|
556 |
-
return wpbdp_url( 'renew_listing', $this->id );
|
557 |
-
}
|
558 |
-
|
559 |
-
/**
|
560 |
-
* @since 5.9.2
|
561 |
-
*/
|
562 |
-
public function owned_by_user( $user_id = 'current' ) {
|
563 |
-
if ( $user_id === 'current' ) {
|
564 |
-
$user_id = get_current_user_id();
|
565 |
-
}
|
566 |
-
|
567 |
-
if ( empty( $user_id ) || ! $this->id ) {
|
568 |
-
// This function is currently intended for logged in users.
|
569 |
-
return true;
|
570 |
-
}
|
571 |
-
|
572 |
-
$post = get_post( $this->id );
|
573 |
-
return $user_id === absint( $post->post_author );
|
574 |
-
}
|
575 |
-
|
576 |
-
/**
|
577 |
-
* @since 4.0
|
578 |
-
*/
|
579 |
-
public function get_access_key() {
|
580 |
-
if ( $key = get_post_meta( $this->id, '_wpbdp[access_key]', true ) )
|
581 |
-
return $key;
|
582 |
-
|
583 |
-
// Generate access key.
|
584 |
-
$new_key = sha1( sprintf( '%s%s%d', AUTH_KEY, uniqid( '', true ), rand( 1, 1000 ) ) );
|
585 |
-
if ( update_post_meta( $this->id, '_wpbdp[access_key]', $new_key ) )
|
586 |
-
return $new_key;
|
587 |
-
}
|
588 |
-
|
589 |
-
/**
|
590 |
-
* @since 5.0
|
591 |
-
*/
|
592 |
-
public function validate_access_key_hash( $hash ) {
|
593 |
-
$key = $this->get_access_key();
|
594 |
-
return sha1( AUTH_KEY . $key ) == $hash;
|
595 |
-
}
|
596 |
-
|
597 |
-
public function get_author_meta( $meta ) {
|
598 |
-
if ( ! $this->id )
|
599 |
-
return '';
|
600 |
-
|
601 |
-
$post = get_post( $this->id );
|
602 |
-
return get_the_author_meta( $meta, $post->post_author );
|
603 |
-
}
|
604 |
-
|
605 |
-
/**
|
606 |
-
* @since 3.6.9
|
607 |
-
*/
|
608 |
-
public function get_sticky_status( $consider_plans = true ) {
|
609 |
-
global $wpdb;
|
610 |
-
$is_sticky = (bool) $wpdb->get_var(
|
611 |
-
$wpdb->prepare(
|
612 |
-
"SELECT 1 AS x FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND is_sticky = %d",
|
613 |
-
$this->id,
|
614 |
-
1 )
|
615 |
-
);
|
616 |
-
|
617 |
-
return $is_sticky ? 'sticky' : 'normal';
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* @since 5.0
|
622 |
-
*/
|
623 |
-
public function has_fee_plan( $fee = false ) {
|
624 |
-
$current = $this->get_fee_plan();
|
625 |
-
return ( ! $fee && ! empty( $current ) ) || ( $fee && $current && $current->id == $fee );
|
626 |
-
}
|
627 |
-
|
628 |
-
/**
|
629 |
-
* @since 5.0
|
630 |
-
*/
|
631 |
-
public function get_fee_plan() {
|
632 |
-
global $wpdb;
|
633 |
-
|
634 |
-
$sql = $wpdb->prepare( "SELECT listing_id, fee_id, fee_price, fee_days, fee_images, expiration_date, is_recurring, is_sticky FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d LIMIT 1", $this->id );
|
635 |
-
$res = WPBDP_Utils::check_cache(
|
636 |
-
array(
|
637 |
-
'cache_key' => 'listing_fee_plan' . $this->id,
|
638 |
-
'group' => 'wpbdp_listings',
|
639 |
-
'query' => $sql,
|
640 |
-
'type' => 'get_row',
|
641 |
-
)
|
642 |
-
);
|
643 |
-
if ( ! $res ) {
|
644 |
-
return false;
|
645 |
-
}
|
646 |
-
|
647 |
-
if ( $res->fee_id ) {
|
648 |
-
$fee = wpbdp_get_fee_plan( $res->fee_id );
|
649 |
-
} else {
|
650 |
-
$fee = null;
|
651 |
-
}
|
652 |
-
|
653 |
-
$res->fee = $fee;
|
654 |
-
$res->fee_label = $fee ? $fee->label : _x( '(Unavailable Plan)', 'listing', 'business-directory-plugin' );
|
655 |
-
$res->expired = $res->expiration_date ? strtotime( $res->expiration_date ) <= current_time( 'timestamp' ) : false;
|
656 |
-
|
657 |
-
return $res;
|
658 |
-
}
|
659 |
-
|
660 |
-
/**
|
661 |
-
* @since 5.0
|
662 |
-
*/
|
663 |
-
public function update_plan( $plan = null, $args = array() ) {
|
664 |
-
global $wpdb;
|
665 |
-
|
666 |
-
$args = wp_parse_args( $args, array(
|
667 |
-
'clear' => 0, /* Whether to use old values (if available). */
|
668 |
-
'recalculate' => 1 /* Whether to recalculate the expiration or not */
|
669 |
-
) );
|
670 |
-
|
671 |
-
$row = array();
|
672 |
-
|
673 |
-
if ( is_numeric( $plan ) || ( is_array( $plan ) && ! empty( $plan['fee_id'] ) ) ) {
|
674 |
-
$plan_id = is_numeric( $plan ) ? absint( $plan ) : absint( $plan['fee_id'] );
|
675 |
-
|
676 |
-
if ( $plan_ = wpbdp_get_fee_plan( $plan_id ) ) {
|
677 |
-
$row['fee_id'] = $plan_id;
|
678 |
-
$row['fee_images'] = $plan_->images;
|
679 |
-
$row['fee_days'] = $plan_->days;
|
680 |
-
$row['is_sticky'] = $plan_->sticky;
|
681 |
-
$row['fee_price'] = $plan_->amount;
|
682 |
-
$row['is_recurring'] = $plan_->recurring;
|
683 |
-
}
|
684 |
-
}
|
685 |
-
|
686 |
-
if ( is_array( $plan ) ) {
|
687 |
-
foreach ( array( 'fee_days', 'fee_images', 'fee_price', 'is_sticky', 'expiration_date', 'is_recurring', 'subscription_id', 'subscription_data' ) as $key ) {
|
688 |
-
if ( array_key_exists( $key, $plan ) ) {
|
689 |
-
$row[ $key ] = $plan[ $key ];
|
690 |
-
}
|
691 |
-
}
|
692 |
-
|
693 |
-
if ( ! empty( $plan['amount'] ) ) {
|
694 |
-
$row['fee_price'] = $plan['amount'];
|
695 |
-
}
|
696 |
-
}
|
697 |
-
|
698 |
-
if ( ! $args['clear'] ) {
|
699 |
-
$old_row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ), ARRAY_A );
|
700 |
-
|
701 |
-
if ( $old_row ) {
|
702 |
-
$row = array_merge( $old_row, $row );
|
703 |
-
}
|
704 |
-
}
|
705 |
-
|
706 |
-
if ( empty( $row ) )
|
707 |
-
return false;
|
708 |
-
|
709 |
-
$row['listing_id'] = $this->id;
|
710 |
-
$row['is_sticky'] = (int) $row['is_sticky'];
|
711 |
-
|
712 |
-
if ( $args['recalculate'] ) {
|
713 |
-
if ( ! $plan || ! array_key_exists( 'expiration_date', $plan ) ) {
|
714 |
-
$expiration = $this->calculate_expiration_date( current_time( 'timestamp' ), $row );
|
715 |
-
|
716 |
-
if ( $expiration ) {
|
717 |
-
$row['expiration_date'] = $expiration;
|
718 |
-
}
|
719 |
-
}
|
720 |
-
}
|
721 |
-
|
722 |
-
if ( is_null( $row['expiration_date'] ) || empty( $row['expiration_date'] ) ) {
|
723 |
-
unset( $row['expiration_date'] );
|
724 |
-
}
|
725 |
-
|
726 |
-
if ( ! empty( $row['recurring_data'] ) ) {
|
727 |
-
$row['recurring_data'] = maybe_serialize( $row['recurring_data'] );
|
728 |
-
}
|
729 |
-
|
730 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
731 |
-
return $wpdb->replace( "{$wpdb->prefix}wpbdp_listings", $row );
|
732 |
-
}
|
733 |
-
|
734 |
-
/**
|
735 |
-
* @since 5.0
|
736 |
-
*/
|
737 |
-
public function set_fee_plan( $fee, $recurring_data = array() ) {
|
738 |
-
global $wpdb;
|
739 |
-
|
740 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
741 |
-
|
742 |
-
if ( is_null( $fee ) ) {
|
743 |
-
$wpdb->delete( $wpdb->prefix . 'wpbdp_listings', array( 'listing_id' => $this->id ) );
|
744 |
-
// $wpdb->replace( $wpdb->prefix . 'wpbdp_listings', array( 'listing_id' => $this->id, 'fee_id' => null, 'fee_days' => 0, 'fee_images' => 0, 'is_sticky' => 0, 'expiration_date' => null ) );
|
745 |
-
return true;
|
746 |
-
}
|
747 |
-
|
748 |
-
$fee = is_numeric( $fee ) ? wpbdp_get_fee_plan( $fee ) : $fee;
|
749 |
-
|
750 |
-
if ( ! $fee )
|
751 |
-
return false;
|
752 |
-
|
753 |
-
$row = array( 'listing_id' => $this->id,
|
754 |
-
'fee_id' => $fee->id,
|
755 |
-
'fee_days' => $fee->days,
|
756 |
-
'fee_images' => $fee->images,
|
757 |
-
'fee_price' => $fee->calculate_amount( wp_get_post_terms( $this->id, WPBDP_CATEGORY_TAX, array( 'fields' => 'ids' ) ) ),
|
758 |
-
'is_recurring' => $fee->recurring || ! empty( $recurring_data ),
|
759 |
-
'is_sticky' => (int) $fee->sticky );
|
760 |
-
|
761 |
-
if ( $expiration = $this->calculate_expiration_date( current_time( 'timestamp' ), $fee ) )
|
762 |
-
$row['expiration_date'] = $expiration;
|
763 |
-
|
764 |
-
if ( ! empty( $recurring_data ) ) {
|
765 |
-
$row['subscription_id'] = ! empty( $recurring_data['subscription_id'] ) ? $recurring_data['subscription_id'] : '';
|
766 |
-
$row['subscription_data'] = ! empty( $recurring_data['subscription_data'] ) ? serialize( $recurring_data['subscription_data'] ) : '';
|
767 |
-
}
|
768 |
-
|
769 |
-
return $wpdb->replace( $wpdb->prefix . 'wpbdp_listings', $row );
|
770 |
-
}
|
771 |
-
|
772 |
-
/**
|
773 |
-
* @since 5.0
|
774 |
-
*/
|
775 |
-
public function set_fee_plan_with_payment( $fee, $recurring = false ) {
|
776 |
-
$previous_plan = $this->get_fee_plan();
|
777 |
-
$fee = is_numeric( $fee ) ? wpbdp_get_fee_plan( $fee ) : $fee;
|
778 |
-
$this->set_fee_plan( $fee );
|
779 |
-
$plan = $this->get_fee_plan();
|
780 |
-
|
781 |
-
if ( $previous_plan && $fee->id == $previous_plan->fee_id ) {
|
782 |
-
return null;
|
783 |
-
}
|
784 |
-
|
785 |
-
$payment_type = $previous_plan ? 'plan_change' : 'initial';
|
786 |
-
|
787 |
-
return $this->create_payment_from_plan( $payment_type, $plan );
|
788 |
-
}
|
789 |
-
|
790 |
-
public function generate_or_retrieve_payment() {
|
791 |
-
$plan = $this->get_fee_plan();
|
792 |
-
|
793 |
-
if ( ! $plan )
|
794 |
-
return false;
|
795 |
-
|
796 |
-
$existing_payment = WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id, 'payment_type' => 'initial' ) )->get();
|
797 |
-
|
798 |
-
if ( $existing_payment )
|
799 |
-
return $existing_payment;
|
800 |
-
|
801 |
-
return $this->create_payment_from_plan( 'initial', $plan );
|
802 |
-
}
|
803 |
-
|
804 |
-
/**
|
805 |
-
* @since 5.1.9
|
806 |
-
*/
|
807 |
-
private function create_payment_from_plan( $payment_type, $plan ) {
|
808 |
-
$payment = new WPBDP_Payment( array(
|
809 |
-
'listing_id' => $this->id,
|
810 |
-
'payment_type' => $payment_type,
|
811 |
-
) );
|
812 |
-
|
813 |
-
if ( $plan->is_recurring ) {
|
814 |
-
$item_description = sprintf( _x( 'Plan "%s" (recurring)', 'listing', 'business-directory-plugin' ), $plan->fee_label );
|
815 |
-
} else {
|
816 |
-
$item_description = sprintf( _x( 'Plan "%s"', 'listing', 'business-directory-plugin' ), $plan->fee_label );
|
817 |
-
}
|
818 |
-
|
819 |
-
$payment->payment_items[] = array(
|
820 |
-
'type' => $plan->is_recurring ? 'recurring_plan' : 'plan',
|
821 |
-
'description' => $item_description,
|
822 |
-
'amount' => $plan->fee_price,
|
823 |
-
'fee_id' => $plan->fee_id,
|
824 |
-
'fee_days' => $plan->fee_days,
|
825 |
-
'fee_images' => $plan->fee_images,
|
826 |
-
);
|
827 |
-
|
828 |
-
$payment->save();
|
829 |
-
|
830 |
-
return $payment;
|
831 |
-
}
|
832 |
-
|
833 |
-
/**
|
834 |
-
* @since 5.0
|
835 |
-
*/
|
836 |
-
public function get_expiration_date() {
|
837 |
-
$plan = $this->get_fee_plan();
|
838 |
-
return $plan ? $plan->expiration_date : null;
|
839 |
-
}
|
840 |
-
|
841 |
-
/**
|
842 |
-
* @since 5.0
|
843 |
-
*/
|
844 |
-
public function get_expiration_time() {
|
845 |
-
return strtotime( $this->get_expiration_date() );
|
846 |
-
}
|
847 |
-
|
848 |
-
/**
|
849 |
-
* @since 5.0
|
850 |
-
*/
|
851 |
-
public function get_status( $force_refresh = false, $calculate = true ) {
|
852 |
-
global $wpdb;
|
853 |
-
|
854 |
-
$status_ = $wpdb->get_var( $wpdb->prepare( "SELECT listing_status FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) );
|
855 |
-
|
856 |
-
if ( 'unknown' == $status_ || $force_refresh ) {
|
857 |
-
if ( $calculate ) {
|
858 |
-
$status = $this->calculate_status();
|
859 |
-
} else {
|
860 |
-
$status = 'unknown';
|
861 |
-
}
|
862 |
-
} else if ( ! $status_ ) {
|
863 |
-
$status = 'incomplete';
|
864 |
-
} else {
|
865 |
-
$status = $status_;
|
866 |
-
}
|
867 |
-
|
868 |
-
$status = apply_filters( 'wpbdp_listing_status', $status, $this->id );
|
869 |
-
|
870 |
-
if ( ! $status_ || $status_ != $status || $force_refresh )
|
871 |
-
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'listing_status' => $status ), array( 'listing_id' => $this->id ) );
|
872 |
-
|
873 |
-
return $status;
|
874 |
-
}
|
875 |
-
|
876 |
-
/**
|
877 |
-
* @since 5.0
|
878 |
-
*/
|
879 |
-
public function get_status_label() {
|
880 |
-
$stati = self::get_stati();
|
881 |
-
|
882 |
-
return $stati[ $this->get_status() ];
|
883 |
-
}
|
884 |
-
|
885 |
-
/**
|
886 |
-
* @since 5.0
|
887 |
-
*/
|
888 |
-
private function calculate_status() {
|
889 |
-
global $wpdb;
|
890 |
-
|
891 |
-
$is_expired = (bool) $wpdb->get_var(
|
892 |
-
$wpdb->prepare(
|
893 |
-
"SELECT 1 AS x FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND expiration_date IS NOT NULL AND expiration_date < %s",
|
894 |
-
$this->id,
|
895 |
-
current_time( 'mysql' )
|
896 |
-
)
|
897 |
-
);
|
898 |
-
$pending_payment = $wpdb->get_row(
|
899 |
-
$wpdb->prepare(
|
900 |
-
"SELECT * FROM {$wpdb->prefix}wpbdp_payments WHERE listing_id = %d AND status = %s ORDER BY id DESC LIMIT 1",
|
901 |
-
$this->id,
|
902 |
-
'pending'
|
903 |
-
)
|
904 |
-
);
|
905 |
-
|
906 |
-
if ( ! $pending_payment || ! in_array( $pending_payment->payment_type, array( 'initial', 'renewal' ), true ) )
|
907 |
-
return $is_expired ? 'expired' : 'complete';
|
908 |
-
|
909 |
-
return ( 'initial' == $pending_payment->payment_type ? 'pending_payment' : 'pending_renewal' );
|
910 |
-
}
|
911 |
-
|
912 |
-
/**
|
913 |
-
* @since 5.0
|
914 |
-
*/
|
915 |
-
public static function get_stati() {
|
916 |
-
$stati = array(
|
917 |
-
'unknown' => _x( 'Unknown', 'listing status', 'business-directory-plugin' ),
|
918 |
-
'legacy' => _x( 'Legacy', 'listing status', 'business-directory-plugin' ),
|
919 |
-
'incomplete' => _x( 'Incomplete', 'listing status', 'business-directory-plugin' ),
|
920 |
-
'pending_payment' => _x( 'Pending Payment', 'listing status', 'business-directory-plugin' ),
|
921 |
-
'complete' => _x( 'Complete', 'listing status', 'business-directory-plugin' ),
|
922 |
-
'pending_upgrade' => _x( 'Pending Upgrade', 'listing status', 'business-directory-plugin' ),
|
923 |
-
'expired' => _x( 'Expired', 'listing status', 'business-directory-plugin' ),
|
924 |
-
'pending_renewal' => _x( 'Pending Renewal', 'listing status', 'business-directory-plugin' ),
|
925 |
-
'abandoned' => _x( 'Abandoned', 'listing status', 'business-directory-plugin' ),
|
926 |
-
);
|
927 |
-
$stati = apply_filters( 'wpbdp_listing_stati', $stati );
|
928 |
-
|
929 |
-
return $stati;
|
930 |
-
}
|
931 |
-
|
932 |
-
/**
|
933 |
-
* @since next-release
|
934 |
-
*/
|
935 |
-
public static function count_listings( $args = array() ) {
|
936 |
-
global $wpdb;
|
937 |
-
|
938 |
-
$args = self::parse_count_args( $args );
|
939 |
-
extract( $args );
|
940 |
-
|
941 |
-
$query_post_statuses = "'" . implode( "','", $post_status ) . "'";
|
942 |
-
$query_listing_statuses = "'" . implode( "','", $status ) . "'";
|
943 |
-
$query = "SELECT COUNT(*) FROM {$wpdb->posts} p JOIN {$wpdb->prefix}wpbdp_listings l ON p.ID = l.listing_id WHERE p.post_type = %s AND p.post_status IN ({$query_post_statuses}) AND l.listing_status IN ({$query_listing_statuses})";
|
944 |
-
$query = $wpdb->prepare( $query, WPBDP_POST_TYPE );
|
945 |
-
|
946 |
-
return absint( $wpdb->get_var( $query ) );
|
947 |
-
}
|
948 |
-
|
949 |
-
private static function parse_count_args( $args = array() ) {
|
950 |
-
$args = wp_parse_args( $args, array(
|
951 |
-
'post_status' => 'all',
|
952 |
-
'status' => 'all',
|
953 |
-
) );
|
954 |
-
|
955 |
-
if ( ! is_array( $args['post_status'] ) ) {
|
956 |
-
if ( 'all' == $args['post_status'] ) {
|
957 |
-
$args['post_status'] = array_keys( get_post_statuses() );
|
958 |
-
} else {
|
959 |
-
$args['post_status'] = explode( ',', $args['post_status'] );
|
960 |
-
}
|
961 |
-
}
|
962 |
-
|
963 |
-
if ( ! is_array( $args['status'] ) ) {
|
964 |
-
if ( 'all' == $args['status'] ) {
|
965 |
-
$args['status'] = array_keys( self::get_stati() );
|
966 |
-
} else {
|
967 |
-
$args['status'] = explode( ',', $args['status'] );
|
968 |
-
}
|
969 |
-
}
|
970 |
-
|
971 |
-
return $args;
|
972 |
-
}
|
973 |
-
|
974 |
-
public static function count_listings_with_no_fee_plan( $args = array() ) {
|
975 |
-
global $wpdb;
|
976 |
-
|
977 |
-
$args = self::parse_count_args( $args );
|
978 |
-
|
979 |
-
$query_post_statuses = "'" . implode( "','", $args['post_status'] ) . "'";
|
980 |
-
|
981 |
-
$query = "SELECT COUNT(*) FROM {$wpdb->posts} p ";
|
982 |
-
$query .= "LEFT JOIN {$wpdb->prefix}wpbdp_listings l ON ( p.ID = l.listing_id ) ";
|
983 |
-
$query .= 'WHERE p.post_type = %s ';
|
984 |
-
$query .= "AND post_status IN ({$query_post_statuses}) ";
|
985 |
-
$query .= 'AND l.listing_id IS NULL ';
|
986 |
-
|
987 |
-
return absint( $wpdb->get_var( $wpdb->prepare( $query, WPBDP_POST_TYPE ) ) );
|
988 |
-
}
|
989 |
-
|
990 |
-
/**
|
991 |
-
* @since 5.0
|
992 |
-
*/
|
993 |
-
public static function validate_access_key( $key, $email = '' ) {
|
994 |
-
if ( ! $key )
|
995 |
-
return false;
|
996 |
-
|
997 |
-
global $wpdb;
|
998 |
-
|
999 |
-
$post_id = $wpdb->get_var(
|
1000 |
-
$wpdb->prepare( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s",
|
1001 |
-
'_wpbdp[access_key]',
|
1002 |
-
$key )
|
1003 |
-
);
|
1004 |
-
|
1005 |
-
if ( ! $post_id ) {
|
1006 |
-
return false;
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
return intval( $wpdb->get_var(
|
1010 |
-
$wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_value = %s",
|
1011 |
-
$post_id,
|
1012 |
-
$email )
|
1013 |
-
) ) > 0;
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
/**
|
1017 |
-
* @since 5.0
|
1018 |
-
*/
|
1019 |
-
public function get_sequence_id() {
|
1020 |
-
$sequence_id = get_post_meta( $this->id, '_wpbdp[import_sequence_id]', true );
|
1021 |
-
|
1022 |
-
if ( ! $sequence_id ) {
|
1023 |
-
global $wpdb;
|
1024 |
-
|
1025 |
-
$candidate = intval( $wpdb->get_var( $wpdb->prepare( "SELECT MAX(CAST(meta_value AS UNSIGNED INTEGER )) FROM {$wpdb->postmeta} WHERE meta_key = %s",
|
1026 |
-
'_wpbdp[import_sequence_id]' ) ) );
|
1027 |
-
$candidate++;
|
1028 |
-
|
1029 |
-
if ( false == add_post_meta( $this->id, '_wpbdp[import_sequence_id]', $candidate, true ) ) {
|
1030 |
-
$sequence_id = 0;
|
1031 |
-
} else {
|
1032 |
-
$sequence_id = $candidate;
|
1033 |
-
}
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
return $sequence_id;
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
/**
|
1040 |
-
* @since 5.0
|
1041 |
-
*/
|
1042 |
-
public function get_flags() {
|
1043 |
-
global $wpdb;
|
1044 |
-
|
1045 |
-
$flags = trim( $wpdb->get_var( $wpdb->prepare( "SELECT flags FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) ) );
|
1046 |
-
|
1047 |
-
if ( ! $flags )
|
1048 |
-
return array();
|
1049 |
-
|
1050 |
-
return explode( ',', $flags );
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
/**
|
1054 |
-
* @since 5.0
|
1055 |
-
*/
|
1056 |
-
public function set_flag( $flag ) {
|
1057 |
-
global $wpdb;
|
1058 |
-
|
1059 |
-
$flags = $this->get_flags();
|
1060 |
-
|
1061 |
-
if ( ! in_array( $flag, $flags, true ) )
|
1062 |
-
$flags[] = $flag;
|
1063 |
-
|
1064 |
-
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'flags' => implode( ',', $flags ) ), array( 'listing_id' => $this->id ) );
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
/**
|
1068 |
-
* @since 5.0
|
1069 |
-
*/
|
1070 |
-
public function _after_save( $context = '' ) {
|
1071 |
-
if ( 'submit-new' == $context ) {
|
1072 |
-
do_action( 'WPBDP_Listing::listing_created', $this->id );
|
1073 |
-
do_action( 'wpbdp_add_listing', $this->id );
|
1074 |
-
} elseif ( 'submit-edit' == $context ) {
|
1075 |
-
do_action( 'wpbdp_edit_listing', $this->id );
|
1076 |
-
do_action( 'WPBDP_Listing::listing_edited', $this->id );
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
do_action( 'wpbdp_save_listing', $this->id, 'submit-new' == $context );
|
1080 |
-
|
1081 |
-
$this->get_status(); // This forces a status refresh if there's no status.
|
1082 |
-
|
1083 |
-
// Do not let expired listings be public.
|
1084 |
-
if ( $this->get_status() && in_array( $this->get_status(), array( 'expired', 'pending_renewal' ) ) && 'publish' == get_post_status( $this->id ) ) {
|
1085 |
-
$this->set_post_status( 'draft' );
|
1086 |
-
}
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
/**
|
1090 |
-
* @since 5.0
|
1091 |
-
*/
|
1092 |
-
public function after_delete( $context = '' ) {
|
1093 |
-
global $wpdb;
|
1094 |
-
|
1095 |
-
// Remove attachments.
|
1096 |
-
$attachments = get_posts( array( 'post_type' => 'attachment', 'post_parent' => $this->id, 'numberposts' => -1, 'fields' => 'ids' ) );
|
1097 |
-
foreach ( $attachments as $attachment_id )
|
1098 |
-
wp_delete_attachment( $attachment_id, true );
|
1099 |
-
|
1100 |
-
// Remove listing fees.
|
1101 |
-
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) );
|
1102 |
-
|
1103 |
-
// Delete logs.
|
1104 |
-
$wpdb->delete( $wpdb->prefix . 'wpbdp_logs', array( 'object_type' => 'listing', 'object_id' => $this->id ) );
|
1105 |
-
|
1106 |
-
// Remove payment information.
|
1107 |
-
foreach ( $wpdb->get_col( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}wpbdp_payments WHERE listing_id = %d", $this->id ) ) as $payment_id ) {
|
1108 |
-
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
1109 |
-
$payment->delete();
|
1110 |
-
}
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
/**
|
1114 |
-
* @since 5.0
|
1115 |
-
*/
|
1116 |
-
public static function insert_or_update( $args = array(), $error = false ) {
|
1117 |
-
}
|
1118 |
-
|
1119 |
-
public static function get( $id ) {
|
1120 |
-
if ( WPBDP_POST_TYPE !== get_post_type( $id ) )
|
1121 |
-
return null;
|
1122 |
-
|
1123 |
-
$l = new self( $id );
|
1124 |
-
$l->new = false;
|
1125 |
-
return $l;
|
1126 |
-
}
|
1127 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/models/class-listing.php' );
|
3 |
+
require_once WPBDP_INC . 'models/class-listing.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-meta.php
CHANGED
@@ -157,7 +157,7 @@ class WPBDP__Meta {
|
|
157 |
break;
|
158 |
|
159 |
case 'search':
|
160 |
-
|
161 |
return $this->_maybe_do_wpseo_title( $view_title, $title, $sep, $seplocation );
|
162 |
break;
|
163 |
|
@@ -279,7 +279,7 @@ class WPBDP__Meta {
|
|
279 |
|
280 |
$current_view = wpbdp_current_view();
|
281 |
|
282 |
-
|
283 |
case 'show_listing':
|
284 |
global $post;
|
285 |
|
@@ -405,9 +405,10 @@ class WPBDP__Meta {
|
|
405 |
*/
|
406 |
private function add_image_meta( $listing ) {
|
407 |
$thumbnail_id = $listing->get_thumbnail_id();
|
|
|
408 |
if ( $thumbnail_id ) {
|
409 |
$img = wp_get_attachment_image_src( $thumbnail_id, 'wpbdp-large' );
|
410 |
-
$img = $img ? $img[0] :
|
411 |
}
|
412 |
if ( $img ) {
|
413 |
echo '<meta property="og:image" content="' . esc_url( $img ) . '" />';
|
157 |
break;
|
158 |
|
159 |
case 'search':
|
160 |
+
$view_title = _x( 'Find a Listing', 'title', 'business-directory-plugin' );
|
161 |
return $this->_maybe_do_wpseo_title( $view_title, $title, $sep, $seplocation );
|
162 |
break;
|
163 |
|
279 |
|
280 |
$current_view = wpbdp_current_view();
|
281 |
|
282 |
+
switch ( $current_view ) {
|
283 |
case 'show_listing':
|
284 |
global $post;
|
285 |
|
405 |
*/
|
406 |
private function add_image_meta( $listing ) {
|
407 |
$thumbnail_id = $listing->get_thumbnail_id();
|
408 |
+
$img = false;
|
409 |
if ( $thumbnail_id ) {
|
410 |
$img = wp_get_attachment_image_src( $thumbnail_id, 'wpbdp-large' );
|
411 |
+
$img = $img ? $img[0] : false;
|
412 |
}
|
413 |
if ( $img ) {
|
414 |
echo '<meta property="og:image" content="' . esc_url( $img ) . '" />';
|
includes/class-module.php
CHANGED
@@ -1,66 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
* @since 5.0
|
5 |
-
*/
|
6 |
-
final class WPBDP__Module {
|
7 |
-
|
8 |
-
public $file;
|
9 |
-
public $title;
|
10 |
-
public $id;
|
11 |
-
public $version;
|
12 |
-
public $required_bd_version;
|
13 |
-
|
14 |
-
public $text_domain;
|
15 |
-
public $text_domain_path;
|
16 |
-
|
17 |
-
public $is_premium_module = true;
|
18 |
-
|
19 |
-
private $module;
|
20 |
-
|
21 |
-
|
22 |
-
public function __construct( $obj ) {
|
23 |
-
$this->module = $obj;
|
24 |
-
|
25 |
-
foreach ( array( 'file', 'id' ) as $required_prop ) {
|
26 |
-
if ( ! isset( $obj->{$required_prop} ) )
|
27 |
-
throw new Exception( sprintf( '%s is not a valid Business Directory module!', get_class( $obj ) ) );
|
28 |
-
|
29 |
-
$this->{$required_prop} = $obj->{$required_prop};
|
30 |
-
}
|
31 |
-
|
32 |
-
$plugin_data = get_file_data( $obj->file, array( 'Plugin Name', 'Version', 'Text Domain', 'Domain Path' ) );
|
33 |
-
|
34 |
-
$this->title = empty( $obj->title ) ? $plugin_data[0] : $obj->title;
|
35 |
-
$this->version = empty( $obj->version ) ? $plugin_data[1] : $obj->version;
|
36 |
-
$this->text_domain = empty( $obj->text_domain ) ? $plugin_data[2] : $obj->text_domain;
|
37 |
-
$this->text_domain_path = empty( $obj->domain_path ) ? $plugin_data[3] : $obj->domain_path;
|
38 |
-
|
39 |
-
if ( empty( $this->text_domain ) ) {
|
40 |
-
$this->text_domain = 'wpbdp-' . $this->id;
|
41 |
-
}
|
42 |
-
|
43 |
-
if ( empty( $this->text_domain_path ) ) {
|
44 |
-
foreach ( array( 'translations', 'languages' ) as $d ) {
|
45 |
-
if ( is_dir( plugin_dir_path( $this->file ) . $d ) ) {
|
46 |
-
$this->text_domain_path = '/' . $d;
|
47 |
-
break;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
$this->required_bd_version = isset( $obj->required_bd_version ) ? $obj->required_bd_version : '';
|
53 |
-
$this->is_premium_module = ! ( in_array( $this->id, array( 'categories' ), true ) && version_compare( $this->version, '5.0.12', 'le' ) );
|
54 |
-
}
|
55 |
-
|
56 |
-
public function __call( $name, $args ) {
|
57 |
-
if ( method_exists( $this->module, $name ) )
|
58 |
-
return call_user_func_array( array( $this->module, $name ), $args );
|
59 |
-
elseif ( in_array( $name, array( 'init' ), true ) )
|
60 |
-
return;
|
61 |
-
|
62 |
-
throw new Exception( 'Invalid method called!' );
|
63 |
-
}
|
64 |
-
|
65 |
-
}
|
66 |
-
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/models/class-module.php' );
|
3 |
+
require_once WPBDP_INC . 'models/class-module.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-modules.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
require_once( WPBDP_PATH . 'includes/class-module.php' );
|
3 |
|
4 |
// FIXME: replace all module support with branch issue/2708 before release.
|
5 |
class WPBDP__Modules {
|
1 |
<?php
|
2 |
+
require_once( WPBDP_PATH . 'includes/models/class-module.php' );
|
3 |
|
4 |
// FIXME: replace all module support with branch issue/2708 before release.
|
5 |
class WPBDP__Modules {
|
includes/class-payment.php
CHANGED
@@ -1,390 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*/
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Class WPBDP_Payment
|
8 |
-
*/
|
9 |
-
class WPBDP_Payment extends WPBDP__DB__Model {
|
10 |
-
|
11 |
-
public static $serialized = array( 'payment_items', 'payer_data', 'data' );
|
12 |
-
|
13 |
-
private $old_status = '';
|
14 |
-
|
15 |
-
private $listing = array();
|
16 |
-
|
17 |
-
protected function get_defaults() {
|
18 |
-
return array(
|
19 |
-
'parent_id' => 0,
|
20 |
-
'payment_items' => array(),
|
21 |
-
'payer_data' => array(),
|
22 |
-
'gateway_data' => array(),
|
23 |
-
'status' => 'pending',
|
24 |
-
'currency_code' => wpbdp_get_option( 'currency', 'USD' ),
|
25 |
-
'amount' => 0.0,
|
26 |
-
'data' => array(),
|
27 |
-
'test' => false,
|
28 |
-
);
|
29 |
-
}
|
30 |
-
|
31 |
-
protected function prepare_row() {
|
32 |
-
$row = parent::prepare_row();
|
33 |
-
|
34 |
-
// Remove unnecessary columns.
|
35 |
-
// FIXME: In the future we should not use WPBDP__DB__Model at all. See #2945.
|
36 |
-
// FIXME: We also need to remove at least `created_on`, `processed_on` and `processed_by` which are not used anywhere.
|
37 |
-
unset( $row['created_on'] );
|
38 |
-
unset( $row['processed_on'] );
|
39 |
-
unset( $row['processed_by'] );
|
40 |
-
|
41 |
-
return $row;
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function before_save( $new = false ) {
|
45 |
-
if ( ! $this->payment_key ) {
|
46 |
-
$this->payment_key = strtolower( sha1( $this->listing_id . date( 'Y-m-d H:i:s' ) . ( defined( 'AUTH_KEY' ) ? AUTH_KEY : '' ) . uniqid( 'wpbdp', true ) ) );
|
47 |
-
}
|
48 |
-
|
49 |
-
$this->amount = 0.0;
|
50 |
-
|
51 |
-
foreach ( $this->payment_items as $item ) {
|
52 |
-
$this->amount += floatval( $item['amount'] );
|
53 |
-
}
|
54 |
-
|
55 |
-
if ( 0.0 == $this->amount ) {
|
56 |
-
if ( ! $this->has_item_type( 'discount_code' ) ) {
|
57 |
-
$this->status = 'completed';
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
protected function after_save( $new = false ) {
|
63 |
-
if ( $new ) {
|
64 |
-
wpbdp_insert_log(
|
65 |
-
array(
|
66 |
-
'log_type' => 'listing.payment',
|
67 |
-
'object_id' => $this->listing_id,
|
68 |
-
'rel_object_id' => $this->id,
|
69 |
-
)
|
70 |
-
);
|
71 |
-
}
|
72 |
-
|
73 |
-
if ( ! $this->old_status || ! $this->status ) {
|
74 |
-
return;
|
75 |
-
}
|
76 |
-
|
77 |
-
if ( $this->old_status != $this->status ) {
|
78 |
-
wpbdp_insert_log(
|
79 |
-
array(
|
80 |
-
'log_type' => 'payment.status_change',
|
81 |
-
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
82 |
-
'object_id' => $this->id,
|
83 |
-
'message' => sprintf( _x( 'Payment status changed from "%1$s" to "%2$s".', 'payment', 'business-directory-plugin' ), $this->old_status, $this->status ),
|
84 |
-
)
|
85 |
-
);
|
86 |
-
do_action_ref_array( 'WPBDP_Payment::status_change', array( &$this, $this->old_status, $this->status ) );
|
87 |
-
do_action( "wpbdp_payment_{$this->status}", $this );
|
88 |
-
}
|
89 |
-
|
90 |
-
$this->old_status = $this->status;
|
91 |
-
}
|
92 |
-
|
93 |
-
protected function after_delete() {
|
94 |
-
global $wpdb;
|
95 |
-
$wpdb->delete(
|
96 |
-
$wpdb->prefix . 'wpbdp_logs',
|
97 |
-
array(
|
98 |
-
'object_type' => 'payment',
|
99 |
-
'object_id' => $this->id,
|
100 |
-
)
|
101 |
-
);
|
102 |
-
}
|
103 |
-
|
104 |
-
protected function set_attr( $name, $value ) {
|
105 |
-
if ( in_array( $name, self::$serialized, true ) ) {
|
106 |
-
$value = is_array( $value ) ? $value : array();
|
107 |
-
}
|
108 |
-
|
109 |
-
if ( 'status' == $name ) {
|
110 |
-
$this->old_status = $this->status;
|
111 |
-
}
|
112 |
-
|
113 |
-
return parent::set_attr( $name, $value );
|
114 |
-
}
|
115 |
-
|
116 |
-
public function get_listing() {
|
117 |
-
if ( empty( $this->listing ) ) {
|
118 |
-
$this->listing = WPBDP_Listing::get( $this->listing_id );
|
119 |
-
}
|
120 |
-
return $this->listing;
|
121 |
-
}
|
122 |
-
|
123 |
-
public function get_summary() {
|
124 |
-
$summary = '';
|
125 |
-
|
126 |
-
switch ( $this->payment_type ) {
|
127 |
-
case 'initial':
|
128 |
-
$summary = sprintf( _x( 'Initial payment ("%s")', 'payment', 'business-directory-plugin' ), $this->get_listing()->get_title() );
|
129 |
-
break;
|
130 |
-
case 'renewal':
|
131 |
-
$summary = sprintf( _x( 'Renewal payment ("%s")', 'payment', 'business-directory-plugin' ), $this->get_listing()->get_title() );
|
132 |
-
break;
|
133 |
-
default:
|
134 |
-
break;
|
135 |
-
}
|
136 |
-
|
137 |
-
if ( ! $summary ) {
|
138 |
-
$first_item = reset( $this->payment_items );
|
139 |
-
$summary = $first_item['description'];
|
140 |
-
}
|
141 |
-
|
142 |
-
if ( 'admin-submit' == $this->context ) {
|
143 |
-
$summary = sprintf( _x( '%s. Admin Posted.', 'payment summary', 'business-directory-plugin' ), $summary );
|
144 |
-
} elseif ( 'csv-import' == $this->context ) {
|
145 |
-
$summary = sprintf( _x( '%s. Imported Listing.', 'payment summary', 'business-directory-plugin' ), $summary );
|
146 |
-
}
|
147 |
-
|
148 |
-
return $summary;
|
149 |
-
}
|
150 |
-
|
151 |
-
public function get_created_at_date() {
|
152 |
-
$date = date_parse( $this->created_at );
|
153 |
-
extract( $date );
|
154 |
-
|
155 |
-
return compact( 'year', 'month', 'day' );
|
156 |
-
}
|
157 |
-
|
158 |
-
public function get_created_at_time() {
|
159 |
-
$date = date_parse( $this->created_at );
|
160 |
-
extract( $date );
|
161 |
-
|
162 |
-
return compact( 'hour', 'minute' );
|
163 |
-
}
|
164 |
-
|
165 |
-
public function get_payer_details() {
|
166 |
-
$data = array();
|
167 |
-
$data['email'] = $this->payer_email;
|
168 |
-
$data['first_name'] = $this->payer_first_name;
|
169 |
-
$data['last_name'] = $this->payer_last_name;
|
170 |
-
$data['country'] = '';
|
171 |
-
$data['state'] = '';
|
172 |
-
$data['city'] = '';
|
173 |
-
$data['address'] = '';
|
174 |
-
$data['address_2'] = '';
|
175 |
-
$data['zip'] = '';
|
176 |
-
|
177 |
-
foreach ( (array) $this->payer_data as $k => $v ) {
|
178 |
-
$data[ $k ] = $v;
|
179 |
-
}
|
180 |
-
$this->fill_from_listing( $data );
|
181 |
-
|
182 |
-
return $data;
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* If the payer is empty, get info from the listing.
|
187 |
-
*
|
188 |
-
* @since 5.11
|
189 |
-
*/
|
190 |
-
private function fill_from_listing( &$data ) {
|
191 |
-
$this->get_listing();
|
192 |
-
if ( empty( $this->listing ) ) {
|
193 |
-
return;
|
194 |
-
}
|
195 |
-
|
196 |
-
$map = array(
|
197 |
-
'email' => array( 'email', 'business_contact_email' ),
|
198 |
-
'country' => array( 'country' ),
|
199 |
-
'state' => array( 'state' ),
|
200 |
-
'city' => array( 'city' ),
|
201 |
-
'zip' => array( 'zip_code', 'zip' ),
|
202 |
-
);
|
203 |
-
|
204 |
-
foreach ( $map as $key => $fields ) {
|
205 |
-
foreach ( $fields as $field ) {
|
206 |
-
if ( empty( $data[ $key ] ) ) {
|
207 |
-
$data[ $key ] = $this->listing->get_field_value( $field );
|
208 |
-
}
|
209 |
-
}
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
public function get_payer_address() {
|
214 |
-
$address = array();
|
215 |
-
|
216 |
-
foreach ( array( 'address', 'address_2', 'city', 'state', 'zip', 'country' ) as $k ) {
|
217 |
-
if ( ! empty( $this->payer_data[ $k ] ) ) {
|
218 |
-
$address[ $k ] = $this->payer_data[ $k ];
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
return $address;
|
223 |
-
}
|
224 |
-
|
225 |
-
public function has_item_type( $item_type ) {
|
226 |
-
$item_types = wp_list_pluck( $this->payment_items, 'type' );
|
227 |
-
return in_array( $item_type, $item_types, true );
|
228 |
-
}
|
229 |
-
|
230 |
-
public function find_item( $item_type ) {
|
231 |
-
foreach ( $this->payment_items as $item ) {
|
232 |
-
if ( $item_type == $item['type'] ) {
|
233 |
-
return $item;
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
return null;
|
238 |
-
}
|
239 |
-
|
240 |
-
public function process_as_admin() {
|
241 |
-
// $this->payment_items[0]['description'] .= ' ' . _x( '(admin, no charge)', 'submit listing', 'business-directory-plugin' );
|
242 |
-
// $this->payment_items[0]['amount'] = 0.0;
|
243 |
-
$this->status = 'completed';
|
244 |
-
$this->context = 'admin-submit';
|
245 |
-
$this->save();
|
246 |
-
|
247 |
-
wpbdp_insert_log(
|
248 |
-
array(
|
249 |
-
'log_type' => 'payment.note',
|
250 |
-
'object_id' => $this->id,
|
251 |
-
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
252 |
-
'message' => _x( 'Listing submitted by admin. Payment skipped.', 'submit listing', 'business-directory-plugin' ),
|
253 |
-
)
|
254 |
-
);
|
255 |
-
}
|
256 |
-
|
257 |
-
public function is_completed() {
|
258 |
-
return 'completed' == $this->status;
|
259 |
-
}
|
260 |
-
|
261 |
-
public function is_pending() {
|
262 |
-
return 'pending' == $this->status;
|
263 |
-
}
|
264 |
-
|
265 |
-
/**
|
266 |
-
* The link to view the payment at the gateway.
|
267 |
-
*
|
268 |
-
* @since 5.11
|
269 |
-
*
|
270 |
-
* @return string
|
271 |
-
*/
|
272 |
-
public function get_gateway_link() {
|
273 |
-
$gateway = wpbdp()->payment_gateways->get( $this->gateway );
|
274 |
-
$link = '';
|
275 |
-
if ( $gateway ) {
|
276 |
-
$link = $gateway->get_payment_link( $this );
|
277 |
-
}
|
278 |
-
return $link;
|
279 |
-
}
|
280 |
-
|
281 |
-
public function get_admin_url() {
|
282 |
-
return admin_url( 'admin.php?page=wpbdp_admin_payments&wpbdp-view=details&payment-id=' . $this->id );
|
283 |
-
}
|
284 |
-
|
285 |
-
public function get_checkout_url( $force_http = false ) {
|
286 |
-
$url = wpbdp_url( 'checkout', $this->payment_key );
|
287 |
-
|
288 |
-
if ( ! $force_http && ! is_ssl() ) {
|
289 |
-
$url = set_url_scheme( $url, 'https' );
|
290 |
-
}
|
291 |
-
|
292 |
-
return $url;
|
293 |
-
}
|
294 |
-
|
295 |
-
public function get_return_url() {
|
296 |
-
$params = array(
|
297 |
-
'action' => 'return',
|
298 |
-
'_wpnonce' => wp_create_nonce( 'wpbdp-checkout-' . $this->id ),
|
299 |
-
);
|
300 |
-
|
301 |
-
if ( $this->gateway ) {
|
302 |
-
// Set the correct gateway if leaving to complete the payment.
|
303 |
-
$params['gateway'] = $this->gateway;
|
304 |
-
}
|
305 |
-
|
306 |
-
return add_query_arg( $params, $this->get_checkout_url() );
|
307 |
-
}
|
308 |
-
|
309 |
-
public function get_cancel_url() {
|
310 |
-
// XXX: Is 'cancel-payment' really used?
|
311 |
-
return add_query_arg( 'cancel-payment', '1', $this->get_checkout_url() );
|
312 |
-
}
|
313 |
-
|
314 |
-
public function get_payment_notes() {
|
315 |
-
if ( ! $this->id ) {
|
316 |
-
return array();
|
317 |
-
}
|
318 |
-
|
319 |
-
return wpbdp_get_logs(
|
320 |
-
array(
|
321 |
-
'object_id' => $this->id,
|
322 |
-
'object_type' => 'payment',
|
323 |
-
)
|
324 |
-
);
|
325 |
-
}
|
326 |
-
|
327 |
-
public function log( $msg ) {
|
328 |
-
return wpbdp_insert_log(
|
329 |
-
array(
|
330 |
-
'object_id' => $this->id,
|
331 |
-
'object_type' => 'payment',
|
332 |
-
'log_type' => 'payment.note',
|
333 |
-
'message' => $msg,
|
334 |
-
)
|
335 |
-
);
|
336 |
-
}
|
337 |
-
|
338 |
-
public function set_payment_method( $method ) {
|
339 |
-
$this->gateway = $method;
|
340 |
-
$this->save();
|
341 |
-
}
|
342 |
-
|
343 |
-
public function is_canceled() {
|
344 |
-
return $this->status == self::STATUS_CANCELED;
|
345 |
-
}
|
346 |
-
|
347 |
-
public function is_rejected() {
|
348 |
-
return $this->status == self::STATUS_REJECTED;
|
349 |
-
}
|
350 |
-
|
351 |
-
public function has_been_processed() {
|
352 |
-
return ! empty( $this->processed_by );
|
353 |
-
}
|
354 |
-
|
355 |
-
/**
|
356 |
-
* Returns the list of supported payment statuses. By default, this is the list of statuses and their meaning:
|
357 |
-
* - Pending: Payment generated, but not paid.
|
358 |
-
* - Failed: Payment failed/was declined.
|
359 |
-
* - Completed: Payment was received successfuly and order is complete.
|
360 |
-
* - Canceled: Payment was canceled either by the user or the admin.
|
361 |
-
* - Refunded: Payment was refunded by admin.
|
362 |
-
* - On-hold: Not really used, but might be useful for manual payment gateways in the future.
|
363 |
-
*
|
364 |
-
* @return array Array of status => label items.
|
365 |
-
*/
|
366 |
-
public static function get_stati() {
|
367 |
-
$stati = array();
|
368 |
-
$stati['pending'] = _x( 'Pending', 'payment', 'business-directory-plugin' );
|
369 |
-
$stati['failed'] = _x( 'Failed', 'payment', 'business-directory-plugin' );
|
370 |
-
$stati['completed'] = _x( 'Completed', 'payment', 'business-directory-plugin' );
|
371 |
-
$stati['canceled'] = _x( 'Canceled', 'payment', 'business-directory-plugin' );
|
372 |
-
$stati['on-hold'] = _x( 'On Hold', 'payment', 'business-directory-plugin' );
|
373 |
-
$stati['refunded'] = _x( 'Refunded', 'payment', 'business-directory-plugin' );
|
374 |
-
|
375 |
-
return $stati;
|
376 |
-
}
|
377 |
-
|
378 |
-
public static function get_status_label( $status ) {
|
379 |
-
$stati = self::get_stati();
|
380 |
-
return $stati[ $status ];
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* @override
|
385 |
-
*/
|
386 |
-
public static function objects() {
|
387 |
-
return parent::_objects( get_class() );
|
388 |
-
}
|
389 |
-
}
|
390 |
-
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/models/class-payment.php' );
|
3 |
+
require_once WPBDP_INC . 'models/class-payment.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-recaptcha.php
CHANGED
@@ -63,8 +63,8 @@ class WPBDP_reCAPTCHA {
|
|
63 |
|
64 |
$url = add_query_arg(
|
65 |
array(
|
66 |
-
|
67 |
-
|
68 |
),
|
69 |
'https://www.google.com/recaptcha/api.js'
|
70 |
);
|
63 |
|
64 |
$url = add_query_arg(
|
65 |
array(
|
66 |
+
'onload' => 'wpbdp_recaptcha_callback',
|
67 |
+
'render' => 'v2' === $this->version ? 'explicit' : $this->public_key,
|
68 |
),
|
69 |
'https://www.google.com/recaptcha/api.js'
|
70 |
);
|
includes/class-rewrite.php
CHANGED
@@ -5,10 +5,10 @@
|
|
5 |
class WPBDP__Rewrite {
|
6 |
|
7 |
public function __construct() {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
}
|
13 |
|
14 |
private function get_rewrite_rules() {
|
@@ -50,7 +50,7 @@ class WPBDP__Rewrite {
|
|
50 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&feed=$matches[3]';
|
51 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&feed=$matches[3]';
|
52 |
|
53 |
-
|
54 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&paged=$matches[3]';
|
55 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]';
|
56 |
} else {
|
@@ -109,7 +109,7 @@ class WPBDP__Rewrite {
|
|
109 |
}
|
110 |
}
|
111 |
|
112 |
-
|
113 |
$newrules = $this->get_rewrite_rules();
|
114 |
return $newrules + $rules;
|
115 |
}
|
5 |
class WPBDP__Rewrite {
|
6 |
|
7 |
public function __construct() {
|
8 |
+
add_filter( 'rewrite_rules_array', array( $this, '_rewrite_rules' ) );
|
9 |
+
add_filter( 'redirect_canonical', array( $this, '_redirect_canonical' ), 10, 2 );
|
10 |
+
add_action( 'template_redirect', array( $this, '_template_redirect' ) );
|
11 |
+
add_action( 'wp_loaded', array( $this, '_wp_loaded' ) );
|
12 |
}
|
13 |
|
14 |
private function get_rewrite_rules() {
|
50 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&feed=$matches[3]';
|
51 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&feed=$matches[3]';
|
52 |
|
53 |
+
if ( ! wpbdp_get_option( 'disable-cpt' ) ) {
|
54 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]&paged=$matches[3]';
|
55 |
$rules['(' . $rewrite_base . ')/' . $tags_slug . '/(.+?)$'] = 'index.php?' . WPBDP_TAGS_TAX . '=$matches[2]';
|
56 |
} else {
|
109 |
}
|
110 |
}
|
111 |
|
112 |
+
public function _rewrite_rules( $rules ) {
|
113 |
$newrules = $this->get_rewrite_rules();
|
114 |
return $newrules + $rules;
|
115 |
}
|
includes/class-shortcodes.php
CHANGED
@@ -15,6 +15,7 @@ class WPBDP__Shortcodes {
|
|
15 |
|
16 |
/**
|
17 |
* Returns shortcodes being handled by Business Directory.
|
|
|
18 |
* @return array array of `shortcode => callback` items.
|
19 |
*/
|
20 |
public function get_shortcodes() {
|
@@ -499,8 +500,8 @@ class WPBDP__Shortcodes {
|
|
499 |
|
500 |
if ( $args['menu'] ) {
|
501 |
$vars['_wrapper'] = 'page';
|
502 |
-
|
503 |
-
|
504 |
}
|
505 |
|
506 |
$this->maybe_paginate_frontpage( $query );
|
15 |
|
16 |
/**
|
17 |
* Returns shortcodes being handled by Business Directory.
|
18 |
+
*
|
19 |
* @return array array of `shortcode => callback` items.
|
20 |
*/
|
21 |
public function get_shortcodes() {
|
500 |
|
501 |
if ( $args['menu'] ) {
|
502 |
$vars['_wrapper'] = 'page';
|
503 |
+
$vars['_bar'] = true;
|
504 |
+
$vars['_bar_args'] = array( 'buttons' => $args['buttons'] );
|
505 |
}
|
506 |
|
507 |
$this->maybe_paginate_frontpage( $query );
|
includes/class-wordpress-template-integration.php
CHANGED
@@ -257,9 +257,8 @@ class WPBDP__WordPress_Template_Integration {
|
|
257 |
if ( $wp_query->post_count > 0 ) {
|
258 |
$wp_query->rewind_posts();
|
259 |
wp_reset_postdata();
|
260 |
-
}
|
261 |
-
|
262 |
-
elseif ( 0 === $wp_query->post_count ) {
|
263 |
$wp_query->current_post = -1;
|
264 |
unset( $wp_query->post );
|
265 |
}
|
@@ -279,7 +278,7 @@ class WPBDP__WordPress_Template_Integration {
|
|
279 |
$wp_query->post_count = 0;
|
280 |
}
|
281 |
|
282 |
-
|
283 |
$is_single_listing = is_single() && get_post_type() == WPBDP_POST_TYPE;
|
284 |
$is_main_page = get_post_type() == 'page' && get_the_ID() == wpbdp_get_page_id( 'main' );
|
285 |
|
@@ -296,7 +295,7 @@ class WPBDP__WordPress_Template_Integration {
|
|
296 |
return $template;
|
297 |
}
|
298 |
|
299 |
-
|
300 |
if ( get_query_var( WPBDP_CATEGORY_TAX ) && taxonomy_exists( WPBDP_CATEGORY_TAX ) ) {
|
301 |
return wpbdp_locate_template( array( 'businessdirectory-category', 'wpbusdirman-category' ) );
|
302 |
}
|
@@ -304,7 +303,7 @@ class WPBDP__WordPress_Template_Integration {
|
|
304 |
return $template;
|
305 |
}
|
306 |
|
307 |
-
|
308 |
if (is_single() && get_post_type() == WPBDP_POST_TYPE) {
|
309 |
return wpbdp_locate_template( array( 'businessdirectory-single', 'wpbusdirman-single' ) );
|
310 |
}
|
257 |
if ( $wp_query->post_count > 0 ) {
|
258 |
$wp_query->rewind_posts();
|
259 |
wp_reset_postdata();
|
260 |
+
} elseif ( 0 === $wp_query->post_count ) {
|
261 |
+
// If there are no other posts, unset the $post property.
|
|
|
262 |
$wp_query->current_post = -1;
|
263 |
unset( $wp_query->post );
|
264 |
}
|
278 |
$wp_query->post_count = 0;
|
279 |
}
|
280 |
|
281 |
+
public function _comments_template( $template ) {
|
282 |
$is_single_listing = is_single() && get_post_type() == WPBDP_POST_TYPE;
|
283 |
$is_main_page = get_post_type() == 'page' && get_the_ID() == wpbdp_get_page_id( 'main' );
|
284 |
|
295 |
return $template;
|
296 |
}
|
297 |
|
298 |
+
public function _category_template( $template ) {
|
299 |
if ( get_query_var( WPBDP_CATEGORY_TAX ) && taxonomy_exists( WPBDP_CATEGORY_TAX ) ) {
|
300 |
return wpbdp_locate_template( array( 'businessdirectory-category', 'wpbusdirman-category' ) );
|
301 |
}
|
303 |
return $template;
|
304 |
}
|
305 |
|
306 |
+
public function _single_template( $template ) {
|
307 |
if (is_single() && get_post_type() == WPBDP_POST_TYPE) {
|
308 |
return wpbdp_locate_template( array( 'businessdirectory-single', 'wpbusdirman-single' ) );
|
309 |
}
|
includes/class-wpbdp.php
CHANGED
@@ -23,7 +23,7 @@ final class WPBDP {
|
|
23 |
}
|
24 |
|
25 |
private function setup_constants() {
|
26 |
-
define( 'WPBDP_VERSION', '5.14.
|
27 |
|
28 |
define( 'WPBDP_PATH', wp_normalize_path( plugin_dir_path( WPBDP_PLUGIN_FILE ) ) );
|
29 |
define( 'WPBDP_INC', trailingslashit( WPBDP_PATH . 'includes' ) );
|
@@ -62,7 +62,7 @@ final class WPBDP {
|
|
62 |
|
63 |
require_once WPBDP_INC . 'admin/settings/class-settings.php';
|
64 |
|
65 |
-
require_once WPBDP_INC . 'functions.php';
|
66 |
require_once WPBDP_INC . 'utils.php';
|
67 |
|
68 |
require_once WPBDP_INC . 'helpers/listing_flagging.php';
|
@@ -80,14 +80,14 @@ final class WPBDP {
|
|
80 |
require_once WPBDP_INC . 'widgets/class-widgets.php';
|
81 |
|
82 |
if ( wpbdp_is_request( 'frontend' ) ) {
|
83 |
-
require_once WPBDP_INC . 'templates-ui.php';
|
84 |
require_once WPBDP_INC . 'template-sections.php';
|
85 |
require_once WPBDP_INC . 'class-shortcodes.php';
|
86 |
require_once WPBDP_INC . 'class-recaptcha.php';
|
87 |
require_once WPBDP_INC . 'class-query-integration.php';
|
88 |
require_once WPBDP_INC . 'class-dispatcher.php';
|
89 |
require_once WPBDP_INC . 'class-wordpress-template-integration.php';
|
90 |
-
require_once WPBDP_INC . 'seo.php';
|
91 |
}
|
92 |
|
93 |
require_once WPBDP_INC . 'themes.php';
|
@@ -278,39 +278,14 @@ final class WPBDP {
|
|
278 |
* @return bool
|
279 |
*/
|
280 |
public function is_bd_page() {
|
281 |
-
|
282 |
-
if ( $is_post_page ) {
|
283 |
-
return true;
|
284 |
-
}
|
285 |
-
|
286 |
-
$page = wpbdp_get_var( array( 'param' => 'page' ) );
|
287 |
-
$is_page = $page && strpos( $page, 'wpbdp' ) !== false;
|
288 |
-
|
289 |
-
/**
|
290 |
-
* @since 5.12.1
|
291 |
-
*/
|
292 |
-
return apply_filters( 'wpbdp_is_bd_page', $is_page );
|
293 |
}
|
294 |
|
295 |
/**
|
296 |
* @since 5.8.2
|
297 |
*/
|
298 |
public function is_bd_post_page() {
|
299 |
-
|
300 |
-
|
301 |
-
if ( $pagenow !== 'post.php' && $pagenow !== 'post-new.php' && $pagenow !== 'edit.php' ) {
|
302 |
-
return false;
|
303 |
-
}
|
304 |
-
|
305 |
-
$post_type = wpbdp_get_var( array( 'param' => 'post_type' ) );
|
306 |
-
|
307 |
-
if ( empty( $post_type ) ) {
|
308 |
-
$post_id = wpbdp_get_var( array( 'param' => 'post', 'sanitize' => 'absint' ) );
|
309 |
-
$post = get_post( $post_id );
|
310 |
-
$post_type = $post ? $post->post_type : '';
|
311 |
-
}
|
312 |
-
|
313 |
-
return $post_type === WPBDP_POST_TYPE;
|
314 |
}
|
315 |
|
316 |
/**
|
@@ -510,7 +485,8 @@ final class WPBDP {
|
|
510 |
'min-width' => wpbdp_get_option( 'image-min-width' ),
|
511 |
'min-height' => wpbdp_get_option( 'image-min-height' )
|
512 |
),
|
513 |
-
$image_error
|
|
|
514 |
|
515 |
if ( $image_error ) {
|
516 |
$errors[ $file['name'] ] = $image_error;
|
@@ -521,9 +497,14 @@ final class WPBDP {
|
|
521 |
|
522 |
$html = '';
|
523 |
foreach ( $attachments as $attachment_id ) {
|
524 |
-
|
525 |
-
|
526 |
-
|
|
|
|
|
|
|
|
|
|
|
527 |
}
|
528 |
|
529 |
$has_images = $listing->get_images( 'ids' );
|
23 |
}
|
24 |
|
25 |
private function setup_constants() {
|
26 |
+
define( 'WPBDP_VERSION', '5.14.3' );
|
27 |
|
28 |
define( 'WPBDP_PATH', wp_normalize_path( plugin_dir_path( WPBDP_PLUGIN_FILE ) ) );
|
29 |
define( 'WPBDP_INC', trailingslashit( WPBDP_PATH . 'includes' ) );
|
62 |
|
63 |
require_once WPBDP_INC . 'admin/settings/class-settings.php';
|
64 |
|
65 |
+
require_once WPBDP_INC . 'helpers/functions/general.php';
|
66 |
require_once WPBDP_INC . 'utils.php';
|
67 |
|
68 |
require_once WPBDP_INC . 'helpers/listing_flagging.php';
|
80 |
require_once WPBDP_INC . 'widgets/class-widgets.php';
|
81 |
|
82 |
if ( wpbdp_is_request( 'frontend' ) ) {
|
83 |
+
require_once WPBDP_INC . 'helpers/functions/templates-ui.php';
|
84 |
require_once WPBDP_INC . 'template-sections.php';
|
85 |
require_once WPBDP_INC . 'class-shortcodes.php';
|
86 |
require_once WPBDP_INC . 'class-recaptcha.php';
|
87 |
require_once WPBDP_INC . 'class-query-integration.php';
|
88 |
require_once WPBDP_INC . 'class-dispatcher.php';
|
89 |
require_once WPBDP_INC . 'class-wordpress-template-integration.php';
|
90 |
+
require_once WPBDP_INC . 'helpers/class-seo.php';
|
91 |
}
|
92 |
|
93 |
require_once WPBDP_INC . 'themes.php';
|
278 |
* @return bool
|
279 |
*/
|
280 |
public function is_bd_page() {
|
281 |
+
return WPBDP_App_Helper::is_bd_page();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
* @since 5.8.2
|
286 |
*/
|
287 |
public function is_bd_post_page() {
|
288 |
+
return WPBDP_App_Helper::is_bd_post_page();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
/**
|
485 |
'min-width' => wpbdp_get_option( 'image-min-width' ),
|
486 |
'min-height' => wpbdp_get_option( 'image-min-height' )
|
487 |
),
|
488 |
+
$image_error
|
489 |
+
); // TODO: handle errors.
|
490 |
|
491 |
if ( $image_error ) {
|
492 |
$errors[ $file['name'] ] = $image_error;
|
497 |
|
498 |
$html = '';
|
499 |
foreach ( $attachments as $attachment_id ) {
|
500 |
+
$html .= wpbdp_render(
|
501 |
+
'submit-listing-images-single',
|
502 |
+
array(
|
503 |
+
'image_id' => $attachment_id,
|
504 |
+
'listing_id' => $listing_id,
|
505 |
+
),
|
506 |
+
false
|
507 |
+
);
|
508 |
}
|
509 |
|
510 |
$has_images = $listing->get_images( 'ids' );
|
includes/compatibility/class-navxt-integration.php
CHANGED
@@ -82,11 +82,15 @@ class WPBDP_NavXT_Integration {
|
|
82 |
array_pop( $trail->trail );
|
83 |
}
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
// {{ Handlers.
|
82 |
array_pop( $trail->trail );
|
83 |
}
|
84 |
|
85 |
+
$trail->add(
|
86 |
+
new bcn_breadcrumb(
|
87 |
+
get_the_title( wpbdp_get_page_id() ),
|
88 |
+
'',
|
89 |
+
array(),
|
90 |
+
wpbdp_get_page_link(),
|
91 |
+
wpbdp_get_page_id()
|
92 |
+
)
|
93 |
+
);
|
94 |
}
|
95 |
|
96 |
// {{ Handlers.
|
includes/compatibility/deprecated.php
CHANGED
@@ -55,7 +55,7 @@ function wpbusdirman_the_listing_tags() {
|
|
55 |
}
|
56 |
}
|
57 |
|
58 |
-
function wpbusdirman_the_listing_meta($excerptorsingle) {
|
59 |
_deprecated_function( __FUNCTION__, '' );
|
60 |
|
61 |
$html = '';
|
@@ -164,7 +164,7 @@ function wpbusdirman_sticky_loop() {
|
|
164 |
return;
|
165 |
}
|
166 |
|
167 |
-
function wpbusdirman_latest_listings($numlistings) {
|
168 |
_deprecated_function( __FUNCTION__, '', 'wpbdp_latest_listings' );
|
169 |
return wpbdp_latest_listings( $numlistings );
|
170 |
}
|
@@ -233,7 +233,7 @@ function wpbdp_get_formfields() {
|
|
233 |
* @deprecated
|
234 |
* @since 2.3
|
235 |
*/
|
236 |
-
function wpbusdirman_get_the_business_email($post_id) {
|
237 |
// _deprecated_function( __FUNCTION__, '2.3' );
|
238 |
|
239 |
$email_mode = wpbdp_get_option( 'listing-email-mode' );
|
@@ -276,6 +276,7 @@ function wpbdp_categories_taxonomy() {
|
|
276 |
|
277 |
/**
|
278 |
* Finds a fee by its ID. The special ID of 0 is reserved for the "free fee".
|
|
|
279 |
* @param int $fee_id fee ID
|
280 |
* @return object a fee object or NULL if nothing is found
|
281 |
* @since 3.0.3
|
@@ -289,6 +290,7 @@ function wpbdp_get_fee( $fee_id ) {
|
|
289 |
|
290 |
/**
|
291 |
* Finds fees available for one or more directory categories.
|
|
|
292 |
* @param int|array $categories term ID or array of term IDs
|
293 |
* @return object|
|
294 |
* @since 3.0.3
|
@@ -306,13 +308,15 @@ function wpbdp_get_fees_for_category( $categories = null ) {
|
|
306 |
function wpbdp_categories_list( $parent = 0, $hierarchical = true) {
|
307 |
_deprecated_function( __FUNCTION__, 'Unknown' );
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
|
|
|
|
316 |
|
317 |
if ($hierarchical) {
|
318 |
foreach ( $terms as &$term ) {
|
55 |
}
|
56 |
}
|
57 |
|
58 |
+
function wpbusdirman_the_listing_meta( $excerptorsingle ) {
|
59 |
_deprecated_function( __FUNCTION__, '' );
|
60 |
|
61 |
$html = '';
|
164 |
return;
|
165 |
}
|
166 |
|
167 |
+
function wpbusdirman_latest_listings( $numlistings ) {
|
168 |
_deprecated_function( __FUNCTION__, '', 'wpbdp_latest_listings' );
|
169 |
return wpbdp_latest_listings( $numlistings );
|
170 |
}
|
233 |
* @deprecated
|
234 |
* @since 2.3
|
235 |
*/
|
236 |
+
function wpbusdirman_get_the_business_email( $post_id ) {
|
237 |
// _deprecated_function( __FUNCTION__, '2.3' );
|
238 |
|
239 |
$email_mode = wpbdp_get_option( 'listing-email-mode' );
|
276 |
|
277 |
/**
|
278 |
* Finds a fee by its ID. The special ID of 0 is reserved for the "free fee".
|
279 |
+
*
|
280 |
* @param int $fee_id fee ID
|
281 |
* @return object a fee object or NULL if nothing is found
|
282 |
* @since 3.0.3
|
290 |
|
291 |
/**
|
292 |
* Finds fees available for one or more directory categories.
|
293 |
+
*
|
294 |
* @param int|array $categories term ID or array of term IDs
|
295 |
* @return object|
|
296 |
* @since 3.0.3
|
308 |
function wpbdp_categories_list( $parent = 0, $hierarchical = true) {
|
309 |
_deprecated_function( __FUNCTION__, 'Unknown' );
|
310 |
|
311 |
+
$terms = get_categories(
|
312 |
+
array(
|
313 |
+
'taxonomy' => WPBDP_CATEGORY_TAX,
|
314 |
+
'parent' => $parent,
|
315 |
+
'orderby' => 'name',
|
316 |
+
'hide_empty' => 0,
|
317 |
+
'hierarchical' => 0
|
318 |
+
)
|
319 |
+
);
|
320 |
|
321 |
if ($hierarchical) {
|
322 |
foreach ( $terms as &$term ) {
|
includes/compatibility/deprecated/class-db-model2.php
CHANGED
@@ -19,7 +19,7 @@ class WPBDP_DB_Model2 {
|
|
19 |
|
20 |
public function fill( $data = array() ) {
|
21 |
foreach ( $data as $k => $v ) {
|
22 |
-
|
23 |
}
|
24 |
}
|
25 |
|
@@ -163,6 +163,7 @@ class WPBDP_DB_Model2 {
|
|
163 |
/**
|
164 |
* Convenience method to search records in a database table.
|
165 |
* Subclasses should override this method because we have to support PHP 5.2 where late static binding is not available.
|
|
|
166 |
* @return array
|
167 |
*/
|
168 |
public static function find( $id, $args = array() ) {
|
19 |
|
20 |
public function fill( $data = array() ) {
|
21 |
foreach ( $data as $k => $v ) {
|
22 |
+
$this->attrs[ $k ] = ( in_array( $k, $this->serialized, true ) && $v ) ? maybe_unserialize( $v ) : $v;
|
23 |
}
|
24 |
}
|
25 |
|
163 |
/**
|
164 |
* Convenience method to search records in a database table.
|
165 |
* Subclasses should override this method because we have to support PHP 5.2 where late static binding is not available.
|
166 |
+
*
|
167 |
* @return array
|
168 |
*/
|
169 |
public static function find( $id, $args = array() ) {
|
includes/controllers/pages/class-renew-listing.php
CHANGED
@@ -45,6 +45,7 @@ class WPBDP__Views__Renew_Listing extends WPBDP__Authenticated_Listing_View {
|
|
45 |
),
|
46 |
)
|
47 |
);
|
|
|
48 |
if ( $auth ) {
|
49 |
return $auth;
|
50 |
}
|
45 |
),
|
46 |
)
|
47 |
);
|
48 |
+
|
49 |
if ( $auth ) {
|
50 |
return $auth;
|
51 |
}
|
includes/controllers/pages/class-submit-listing.php
CHANGED
@@ -32,7 +32,13 @@ class WPBDP__Views__Submit_Listing extends WPBDP__Authenticated_Listing_View {
|
|
32 |
return __( 'Add Listing', 'business-directory-plugin' );
|
33 |
}
|
34 |
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
wp_enqueue_style( 'dashicons' );
|
37 |
|
38 |
wp_enqueue_script(
|
@@ -73,15 +79,6 @@ class WPBDP__Views__Submit_Listing extends WPBDP__Authenticated_Listing_View {
|
|
73 |
)
|
74 |
);
|
75 |
|
76 |
-
$custom_css = "
|
77 |
-
.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+ label span:before{
|
78 |
-
content: '" . esc_attr__( 'Select', 'business-directory-plugin' ) . "';
|
79 |
-
}
|
80 |
-
.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]:checked + label span:before{
|
81 |
-
content: '" . esc_attr__( 'Selected', 'business-directory-plugin' ) . "';
|
82 |
-
}";
|
83 |
-
wp_add_inline_style( 'wpbdp-base-css', $custom_css );
|
84 |
-
|
85 |
do_action( 'wpbdp_submit_listing_enqueue_resources' );
|
86 |
}
|
87 |
|
@@ -1054,6 +1051,7 @@ class WPBDP__Views__Submit_Listing extends WPBDP__Authenticated_Listing_View {
|
|
1054 |
|
1055 |
// FIXME: fake this (for compatibility with modules) until we move everything to wpbdp_save_listing() and
|
1056 |
// friends. See #2945.
|
|
|
1057 |
do_action_ref_array( 'WPBDP_Listing::set_field_values', array( &$this->listing, $field_values ) );
|
1058 |
|
1059 |
if ( $validation_errors ) {
|
@@ -1161,19 +1159,23 @@ class WPBDP__Views__Submit_Listing extends WPBDP__Authenticated_Listing_View {
|
|
1161 |
$image_min_height = intval( wpbdp_get_option( 'image-min-height' ) );
|
1162 |
$image_max_height = intval( wpbdp_get_option( 'image-max-height' ) );
|
1163 |
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
|
|
|
|
|
|
|
|
1177 |
}
|
1178 |
|
1179 |
private function account_creation() {
|
32 |
return __( 'Add Listing', 'business-directory-plugin' );
|
33 |
}
|
34 |
|
35 |
+
/**
|
36 |
+
* Load custom resources used for this view only.
|
37 |
+
* This is called in the parent class `enqueue_resources` function.
|
38 |
+
*
|
39 |
+
* @since 5.14.3
|
40 |
+
*/
|
41 |
+
public function enqueue_custom_resources() {
|
42 |
wp_enqueue_style( 'dashicons' );
|
43 |
|
44 |
wp_enqueue_script(
|
79 |
)
|
80 |
);
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
do_action( 'wpbdp_submit_listing_enqueue_resources' );
|
83 |
}
|
84 |
|
1051 |
|
1052 |
// FIXME: fake this (for compatibility with modules) until we move everything to wpbdp_save_listing() and
|
1053 |
// friends. See #2945.
|
1054 |
+
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
1055 |
do_action_ref_array( 'WPBDP_Listing::set_field_values', array( &$this->listing, $field_values ) );
|
1056 |
|
1057 |
if ( $validation_errors ) {
|
1159 |
$image_min_height = intval( wpbdp_get_option( 'image-min-height' ) );
|
1160 |
$image_max_height = intval( wpbdp_get_option( 'image-max-height' ) );
|
1161 |
|
1162 |
+
return $this->section_render(
|
1163 |
+
'submit-listing-images',
|
1164 |
+
compact(
|
1165 |
+
'image_max_file_size',
|
1166 |
+
'image_min_file_size',
|
1167 |
+
'image_min_width',
|
1168 |
+
'image_max_width',
|
1169 |
+
'image_min_height',
|
1170 |
+
'image_max_height',
|
1171 |
+
'images',
|
1172 |
+
'images_meta',
|
1173 |
+
'image_slots',
|
1174 |
+
'image_slots_remaining',
|
1175 |
+
'thumbnail_id',
|
1176 |
+
'listing'
|
1177 |
+
)
|
1178 |
+
);
|
1179 |
}
|
1180 |
|
1181 |
private function account_creation() {
|
includes/db/class-db-query-set.php
CHANGED
@@ -118,8 +118,9 @@ class WPBDP__DB__Query_Set implements IteratorAggregate {
|
|
118 |
|
119 |
$q = $this->query;
|
120 |
|
121 |
-
|
122 |
-
|
|
|
123 |
|
124 |
$q['limits'] = 'LIMIT ' . $limit;
|
125 |
return new self( $this->model, $q );
|
118 |
|
119 |
$q = $this->query;
|
120 |
|
121 |
+
if ( ! empty( $q['limits'] ) ) {
|
122 |
+
throw new Exception( 'Query already has a limit.' );
|
123 |
+
}
|
124 |
|
125 |
$q['limits'] = 'LIMIT ' . $limit;
|
126 |
return new self( $this->model, $q );
|
includes/debugging.php
CHANGED
@@ -44,7 +44,7 @@ class WPBDP_Debugging {
|
|
44 |
);
|
45 |
}
|
46 |
|
47 |
-
public static function _php_error_handler($errno, $errstr, $file, $line, $context) {
|
48 |
static $errno_to_string = array(
|
49 |
E_ERROR => 'error',
|
50 |
E_WARNING => 'warning',
|
@@ -137,7 +137,7 @@ class WPBDP_Debugging {
|
|
137 |
echo '</div>';
|
138 |
}
|
139 |
|
140 |
-
private static function _extract_context($stack) {
|
141 |
if ( ! is_array( $stack ) || empty( $stack ) ) {
|
142 |
return array();
|
143 |
}
|
@@ -174,7 +174,7 @@ class WPBDP_Debugging {
|
|
174 |
);
|
175 |
}
|
176 |
|
177 |
-
private static function _var_dump($var) {
|
178 |
if ( is_bool( $var ) || is_int( $var ) || ( is_string( $var ) && empty( $var ) ) )
|
179 |
return var_export( $var, true );
|
180 |
|
44 |
);
|
45 |
}
|
46 |
|
47 |
+
public static function _php_error_handler( $errno, $errstr, $file, $line, $context ) {
|
48 |
static $errno_to_string = array(
|
49 |
E_ERROR => 'error',
|
50 |
E_WARNING => 'warning',
|
137 |
echo '</div>';
|
138 |
}
|
139 |
|
140 |
+
private static function _extract_context( $stack ) {
|
141 |
if ( ! is_array( $stack ) || empty( $stack ) ) {
|
142 |
return array();
|
143 |
}
|
174 |
);
|
175 |
}
|
176 |
|
177 |
+
private static function _var_dump( $var ) {
|
178 |
if ( is_bool( $var ) || is_int( $var ) || ( is_string( $var ) && empty( $var ) ) )
|
179 |
return var_export( $var, true );
|
180 |
|
includes/fields/class-fieldtypes-date.php
CHANGED
@@ -17,7 +17,7 @@ class WPBDP_FieldTypes_Date extends WPBDP_FieldTypes_TextField {
|
|
17 |
return array( 'meta' );
|
18 |
}
|
19 |
|
20 |
-
|
21 |
if ( 'meta' != $association )
|
22 |
return '';
|
23 |
|
17 |
return array( 'meta' );
|
18 |
}
|
19 |
|
20 |
+
public function render_field_settings( &$field = null, $association = null ) {
|
21 |
if ( 'meta' != $association )
|
22 |
return '';
|
23 |
|
includes/fields/class-fieldtypes-image.php
CHANGED
@@ -353,7 +353,7 @@ class WPBDP_FieldTypes_Image extends WPBDP_Form_Field_Type {
|
|
353 |
$value = null;
|
354 |
}
|
355 |
|
356 |
-
|
357 |
$value = null;
|
358 |
}
|
359 |
|
353 |
$value = null;
|
354 |
}
|
355 |
|
356 |
+
if ( is_array( $value ) && empty( $value[0] ) ) {
|
357 |
$value = null;
|
358 |
}
|
359 |
|
includes/fields/class-fieldtypes-textarea.php
CHANGED
@@ -247,7 +247,7 @@ class WPBDP_FieldTypes_TextArea extends WPBDP_Form_Field_Type {
|
|
247 |
$field->set_data( 'wysiwyg_images', isset( $_POST['field']['wysiwyg_images'] ) ? (bool) intval( $_POST['field']['wysiwyg_images'] ) : false );
|
248 |
$field->set_data( 'excerpt_override', isset( $_POST['field']['excerpt_override'] ) ? intval( $_POST['field']['excerpt_override'] ) : 0 ); // Input var okay.
|
249 |
$field->set_data( 'auto_excerpt', isset( $_POST['field']['auto_excerpt'] ) ? (bool) intval( $_POST['field']['auto_excerpt'] ) : false );
|
250 |
-
|
251 |
}
|
252 |
|
253 |
public function store_field_value( &$field, $post_id, $value ) {
|
@@ -309,8 +309,9 @@ class WPBDP_FieldTypes_TextArea extends WPBDP_Form_Field_Type {
|
|
309 |
$value = parent::get_field_value( $field, $post_id );
|
310 |
|
311 |
// Only return auto-generated excerpt if there's no value at all.
|
312 |
-
|
313 |
$value = $this->get_excerpt_value_from_post( $post_id );
|
|
|
314 |
|
315 |
return $value;
|
316 |
}
|
247 |
$field->set_data( 'wysiwyg_images', isset( $_POST['field']['wysiwyg_images'] ) ? (bool) intval( $_POST['field']['wysiwyg_images'] ) : false );
|
248 |
$field->set_data( 'excerpt_override', isset( $_POST['field']['excerpt_override'] ) ? intval( $_POST['field']['excerpt_override'] ) : 0 ); // Input var okay.
|
249 |
$field->set_data( 'auto_excerpt', isset( $_POST['field']['auto_excerpt'] ) ? (bool) intval( $_POST['field']['auto_excerpt'] ) : false );
|
250 |
+
$field->set_data( 'word_count', ( in_array( 'word_number', $field->get_validators() ) && isset( $_POST['field']['word_count'] ) ) ? intval( $_POST['field']['word_count'] ) : 0 );
|
251 |
}
|
252 |
|
253 |
public function store_field_value( &$field, $post_id, $value ) {
|
309 |
$value = parent::get_field_value( $field, $post_id );
|
310 |
|
311 |
// Only return auto-generated excerpt if there's no value at all.
|
312 |
+
if ( 'excerpt' === $field->get_association() && $field->data( 'auto_excerpt' ) && ! $value ) {
|
313 |
$value = $this->get_excerpt_value_from_post( $post_id );
|
314 |
+
}
|
315 |
|
316 |
return $value;
|
317 |
}
|
includes/fields/class-form-field.php
CHANGED
@@ -340,6 +340,7 @@ class WPBDP_Form_Field {
|
|
340 |
* @since 3.4
|
341 |
*/
|
342 |
public function get_behavior_flags() {
|
|
|
343 |
return apply_filters( 'WPBDP_Form_Field::get_behavior_flags', $this->type->get_behavior_flags( $this ), $this );
|
344 |
}
|
345 |
|
@@ -824,7 +825,7 @@ class WPBDP_Form_Field {
|
|
824 |
/**
|
825 |
* @since 5.0
|
826 |
*/
|
827 |
-
|
828 |
if ( ! $_POST || ! isset( $_POST[ $key ][ $this->id ] ) ) {
|
829 |
return null;
|
830 |
}
|
@@ -839,7 +840,7 @@ class WPBDP_Form_Field {
|
|
839 |
/**
|
840 |
* @since 5.0
|
841 |
*/
|
842 |
-
|
843 |
if ( ! $_GET || ! isset( $_GET[ $key ][ $this->id ] ) ) {
|
844 |
return null;
|
845 |
}
|
340 |
* @since 3.4
|
341 |
*/
|
342 |
public function get_behavior_flags() {
|
343 |
+
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
344 |
return apply_filters( 'WPBDP_Form_Field::get_behavior_flags', $this->type->get_behavior_flags( $this ), $this );
|
345 |
}
|
346 |
|
825 |
/**
|
826 |
* @since 5.0
|
827 |
*/
|
828 |
+
public function value_from_POST( $key = 'listingfields' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
|
829 |
if ( ! $_POST || ! isset( $_POST[ $key ][ $this->id ] ) ) {
|
830 |
return null;
|
831 |
}
|
840 |
/**
|
841 |
* @since 5.0
|
842 |
*/
|
843 |
+
public function value_from_GET( $key = 'listingfields' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
|
844 |
if ( ! $_GET || ! isset( $_GET[ $key ][ $this->id ] ) ) {
|
845 |
return null;
|
846 |
}
|
includes/form-fields.php
CHANGED
@@ -317,7 +317,7 @@ if ( ! class_exists( 'WPBDP_FormFields' ) ) {
|
|
317 |
if ( substr( $v, 0, 1 ) == '-' ) {
|
318 |
$where .= $wpdb->prepare( ' AND ( validators IS NULL OR validators NOT LIKE %s )', '%%' . $wpdb->esc_like( substr( $v, 1 ) ) . '%%' );
|
319 |
} else {
|
320 |
-
$where .= $wpdb->prepare( ' AND ( validators LIKE %s )', '%%' . $wpdb->esc_like( $v ) . '%%'
|
321 |
}
|
322 |
}
|
323 |
|
317 |
if ( substr( $v, 0, 1 ) == '-' ) {
|
318 |
$where .= $wpdb->prepare( ' AND ( validators IS NULL OR validators NOT LIKE %s )', '%%' . $wpdb->esc_like( substr( $v, 1 ) ) . '%%' );
|
319 |
} else {
|
320 |
+
$where .= $wpdb->prepare( ' AND ( validators LIKE %s )', '%%' . $wpdb->esc_like( $v ) . '%%' );
|
321 |
}
|
322 |
}
|
323 |
|
includes/functions.php
CHANGED
@@ -1,1323 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*/
|
5 |
-
|
6 |
-
function wpbdp_get_version() {
|
7 |
-
return WPBDP_VERSION;
|
8 |
-
}
|
9 |
-
|
10 |
-
function _wpbdp_page_lookup_query( $page_id, $count = false ) {
|
11 |
-
global $wpdb;
|
12 |
-
|
13 |
-
static $shortcodes = array(
|
14 |
-
'main' => array( 'businessdirectory', 'business-directory', 'WPBUSDIRMANUI' ),
|
15 |
-
'add-listing' => array( 'businessdirectory-submitlisting', 'WPBUSDIRMANADDLISTING' ),
|
16 |
-
'manage-listings' => array( 'businessdirectory-managelistings', 'WPBUSDIRMANMANAGELISTING' ),
|
17 |
-
'view-listings' => array( 'businessdirectory-viewlistings', 'businessdirectory-listings', 'WPBUSDIRMANMVIEWLISTINGS' ),
|
18 |
-
);
|
19 |
-
|
20 |
-
if ( ! array_key_exists( $page_id, $shortcodes ) ) {
|
21 |
-
return false;
|
22 |
-
}
|
23 |
-
|
24 |
-
if ( $count ) {
|
25 |
-
$query = "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'page' AND post_status = 'publish' AND ( 1=0";
|
26 |
-
} else {
|
27 |
-
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'page' AND post_status = 'publish' AND ( 1=0";
|
28 |
-
}
|
29 |
-
|
30 |
-
foreach ( $shortcodes[ $page_id ] as $s ) {
|
31 |
-
$query .= sprintf( " OR post_content LIKE '%%[%s]%%' ", $s );
|
32 |
-
}
|
33 |
-
$query .= ')';
|
34 |
-
|
35 |
-
return $query;
|
36 |
-
}
|
37 |
-
|
38 |
-
function wpbdp_get_page_ids( $page_id = 'main' ) {
|
39 |
-
static $request_cached = array();
|
40 |
-
|
41 |
-
if ( isset( $request_cached[ $page_id ] ) ) {
|
42 |
-
$page_ids = $request_cached[ $page_id ];
|
43 |
-
return apply_filters( 'wpbdp_get_page_ids', $page_ids, $page_id );
|
44 |
-
}
|
45 |
-
|
46 |
-
$page_ids = null;
|
47 |
-
|
48 |
-
$cached_ids = get_transient( 'wpbdp-page-ids' );
|
49 |
-
|
50 |
-
if ( is_null( $page_ids ) ) {
|
51 |
-
$page_ids = wpbdp_get_page_ids_from_cache( $cached_ids, $page_id );
|
52 |
-
|
53 |
-
if ( is_null( $page_ids ) ) {
|
54 |
-
$page_ids = wpbdp_get_page_ids_with_query( $page_id );
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
if ( is_array( $cached_ids ) ) {
|
59 |
-
$cached_ids[ $page_id ] = $page_ids;
|
60 |
-
} else {
|
61 |
-
$cached_ids = array( $page_id => $page_ids );
|
62 |
-
}
|
63 |
-
|
64 |
-
set_transient( 'wpbdp-page-ids', $cached_ids, MONTH_IN_SECONDS );
|
65 |
-
|
66 |
-
$request_cached[ $page_id ] = $page_ids;
|
67 |
-
|
68 |
-
return apply_filters( 'wpbdp_get_page_ids', $page_ids, $page_id );
|
69 |
-
}
|
70 |
-
|
71 |
-
function wpbdp_get_page_ids_from_cache( $cache, $page_id ) {
|
72 |
-
global $wpdb;
|
73 |
-
|
74 |
-
if ( ! is_array( $cache ) || empty( $cache[ $page_id ] ) ) {
|
75 |
-
return null;
|
76 |
-
}
|
77 |
-
|
78 |
-
// Validate the cached IDs.
|
79 |
-
$query = _wpbdp_page_lookup_query( $page_id, true );
|
80 |
-
$query .= ' AND ID IN ( ' . implode( ',', array_map( 'intval', $cache[ $page_id ] ) ) . ' ) ';
|
81 |
-
|
82 |
-
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
83 |
-
$count = intval( $wpdb->get_var( $query ) );
|
84 |
-
|
85 |
-
if ( $count != count( $cache[ $page_id ] ) ) {
|
86 |
-
wpbdp_debug( 'Page cache is invalid.' );
|
87 |
-
return null;
|
88 |
-
}
|
89 |
-
|
90 |
-
return $cache[ $page_id ];
|
91 |
-
}
|
92 |
-
|
93 |
-
function wpbdp_get_page_ids_with_query( $page_id ) {
|
94 |
-
global $wpdb;
|
95 |
-
|
96 |
-
// Look up for pages.
|
97 |
-
$q = _wpbdp_page_lookup_query( $page_id );
|
98 |
-
|
99 |
-
if ( ! $q ) {
|
100 |
-
return null;
|
101 |
-
}
|
102 |
-
|
103 |
-
$q .= ' ORDER BY ID ASC ';
|
104 |
-
|
105 |
-
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
106 |
-
return $wpdb->get_col( $q );
|
107 |
-
}
|
108 |
-
|
109 |
-
function wpbdp_get_page_id( $name = 'main' ) {
|
110 |
-
$page_ids = wpbdp_get_page_ids( $name );
|
111 |
-
|
112 |
-
if ( ! $page_ids ) {
|
113 |
-
$page_id = false;
|
114 |
-
} else {
|
115 |
-
$page_id = $page_ids[0];
|
116 |
-
}
|
117 |
-
|
118 |
-
return apply_filters( 'wpbdp_get_page_id', $page_id, $name );
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @deprecated since 4.0. Use `wpbdp_url()` instead.
|
123 |
-
* @see wpbdp_url()
|
124 |
-
*/
|
125 |
-
function wpbdp_get_page_link( $name = 'main', $arg0 = null ) {
|
126 |
-
//_deprecated_function( __FUNCTION__, '4.0', 'wpbdp_url' );
|
127 |
-
|
128 |
-
$page_id = wpbdp_get_page_id( $name );
|
129 |
-
|
130 |
-
if ( $page_id ) {
|
131 |
-
$link = _get_page_link( $page_id );
|
132 |
-
$link = apply_filters( 'wpbdp__get_page_link', $link, $page_id, $name, $arg0 );
|
133 |
-
} else {
|
134 |
-
switch ( $name ) {
|
135 |
-
case 'view':
|
136 |
-
case 'viewlisting':
|
137 |
-
case 'show-listing':
|
138 |
-
case 'showlisting':
|
139 |
-
$link = get_permalink( intval( $arg0 ) );
|
140 |
-
break;
|
141 |
-
case 'edit':
|
142 |
-
case 'editlisting':
|
143 |
-
case 'edit-listing':
|
144 |
-
case 'delete':
|
145 |
-
case 'deletelisting':
|
146 |
-
case 'delete-listing':
|
147 |
-
break;
|
148 |
-
case 'viewlistings':
|
149 |
-
case 'view-listings':
|
150 |
-
$link = wpbdp_url( 'all_listings' );
|
151 |
-
break;
|
152 |
-
case 'add':
|
153 |
-
case 'addlisting':
|
154 |
-
case 'add-listing':
|
155 |
-
case 'submit':
|
156 |
-
case 'submitlisting':
|
157 |
-
case 'submit-listing':
|
158 |
-
$link = wpbdp_url( 'submit_listing' );
|
159 |
-
break;
|
160 |
-
case 'search':
|
161 |
-
$link = wpbdp_url( 'search' );
|
162 |
-
break;
|
163 |
-
default:
|
164 |
-
if ( ! wpbdp_get_page_id( 'main' ) ) {
|
165 |
-
return '';
|
166 |
-
}
|
167 |
-
|
168 |
-
$link = wpbdp_get_page_link( 'main' );
|
169 |
-
break;
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
return apply_filters( 'wpbdp_get_page_link', $link, $name, $arg0 );
|
174 |
-
}
|
175 |
-
|
176 |
-
/* Admin API */
|
177 |
-
|
178 |
-
function wpbdp_admin() {
|
179 |
-
return wpbdp()->admin;
|
180 |
-
}
|
181 |
-
|
182 |
-
function wpbdp_admin_notices() {
|
183 |
-
global $wpbdp;
|
184 |
-
return $wpbdp->admin->admin_notices();
|
185 |
-
}
|
186 |
-
|
187 |
-
/* Settings API */
|
188 |
-
|
189 |
-
function wpbdp_settings_api() {
|
190 |
-
global $wpbdp;
|
191 |
-
return $wpbdp->settings;
|
192 |
-
}
|
193 |
-
|
194 |
-
function wpbdp_get_option( $key, $default = false ) {
|
195 |
-
$args_ = func_get_args();
|
196 |
-
if ( empty( wpbdp()->settings ) ) {
|
197 |
-
return $default;
|
198 |
-
}
|
199 |
-
return call_user_func_array( array( wpbdp()->settings, 'get_option' ), $args_ );
|
200 |
-
}
|
201 |
-
|
202 |
-
function wpbdp_set_option( $key, $value ) {
|
203 |
-
$args_ = func_get_args();
|
204 |
-
return call_user_func_array( array( wpbdp()->settings, 'set_option' ), $args_ );
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* @since 5.0
|
209 |
-
*/
|
210 |
-
function wpbdp_delete_option( $key ) {
|
211 |
-
$args_ = func_get_args();
|
212 |
-
return call_user_func_array( array( wpbdp()->settings, 'delete_option' ), $args_ );
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* @since 5.0
|
217 |
-
*/
|
218 |
-
function wpbdp_register_settings_group( $args ) {
|
219 |
-
$args_ = func_get_args();
|
220 |
-
return call_user_func_array( array( wpbdp()->settings, 'register_group' ), $args_ );
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* @since 5.0
|
225 |
-
*/
|
226 |
-
function wpbdp_register_setting( $args ) {
|
227 |
-
$args_ = func_get_args();
|
228 |
-
return call_user_func_array( array( wpbdp()->settings, 'register_setting' ), $args_ );
|
229 |
-
}
|
230 |
-
|
231 |
-
/* Form Fields API */
|
232 |
-
|
233 |
-
function wpbdp_formfields_api() {
|
234 |
-
global $wpbdp;
|
235 |
-
return $wpbdp->formfields;
|
236 |
-
}
|
237 |
-
|
238 |
-
function wpbdp_get_formfield( $id ) {
|
239 |
-
if ( is_numeric( $id ) && is_string( $id ) ) {
|
240 |
-
return wpbdp_get_formfield( intval( $id ) );
|
241 |
-
}
|
242 |
-
|
243 |
-
if ( is_string( $id ) ) {
|
244 |
-
return wpbdp_formfields_api()->getFieldsByAssociation( $id, true );
|
245 |
-
}
|
246 |
-
|
247 |
-
return wpbdp_formfields_api()->get_field( $id );
|
248 |
-
}
|
249 |
-
|
250 |
-
/* Fees/Payment API */
|
251 |
-
|
252 |
-
function wpbdp_payments_possible() {
|
253 |
-
if ( ! wpbdp_get_option( 'payments-on' ) ) {
|
254 |
-
return false;
|
255 |
-
}
|
256 |
-
|
257 |
-
return wpbdp()->payment_gateways->can_pay();
|
258 |
-
}
|
259 |
-
|
260 |
-
function wpbdp_fees_api() {
|
261 |
-
return wpbdp()->fees;
|
262 |
-
}
|
263 |
-
|
264 |
-
function wpbdp_payments_api() {
|
265 |
-
return wpbdp()->payments;
|
266 |
-
}
|
267 |
-
|
268 |
-
/* Listings API */
|
269 |
-
|
270 |
-
function wpbdp_listings_api() {
|
271 |
-
return wpbdp()->listings;
|
272 |
-
}
|
273 |
-
|
274 |
-
/* Misc. */
|
275 |
-
|
276 |
-
function wpbdp_get_parent_categories( $catid ) {
|
277 |
-
$category = get_term( intval( $catid ), WPBDP_CATEGORY_TAX );
|
278 |
-
|
279 |
-
if ( $category->parent ) {
|
280 |
-
return array_merge( array( $category ), wpbdp_get_parent_categories( $category->parent ) );
|
281 |
-
}
|
282 |
-
|
283 |
-
return array( $category );
|
284 |
-
}
|
285 |
-
|
286 |
-
function wpbdp_get_parent_catids( $catid ) {
|
287 |
-
$parent_categories = wpbdp_get_parent_categories( $catid );
|
288 |
-
array_walk(
|
289 |
-
$parent_categories,
|
290 |
-
function( &$x ) {
|
291 |
-
$x = intval( $x->term_id );
|
292 |
-
}
|
293 |
-
);
|
294 |
-
|
295 |
-
return $parent_categories;
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Checks if permalinks are enabled.
|
300 |
-
*
|
301 |
-
* @return boolean
|
302 |
-
* @since 2.1
|
303 |
-
*/
|
304 |
-
function wpbdp_rewrite_on() {
|
305 |
-
global $wp_rewrite;
|
306 |
-
return $wp_rewrite->permalink_structure ? true : false;
|
307 |
-
}
|
308 |
-
|
309 |
-
/**
|
310 |
-
* Checks if a given user can perform some action to a listing.
|
311 |
-
*
|
312 |
-
* @param string $action the action to be checked. available actions are 'view', 'edit', 'delete' and 'upgrade-to-sticky'
|
313 |
-
* @param (object|int) $listing_id the listing ID. if null, the current post ID will be used
|
314 |
-
* @param int $user_id the user ID. if null, the current user will be used
|
315 |
-
* @return boolean
|
316 |
-
* @since 2.1
|
317 |
-
*/
|
318 |
-
function wpbdp_user_can( $action, $listing_id = null, $user_id = null ) {
|
319 |
-
$listing_id = $listing_id ? ( is_object( $listing_id ) ? $listing_id->ID : intval( $listing_id ) ) : get_the_ID();
|
320 |
-
$user_id = $user_id ? $user_id : wp_get_current_user()->ID;
|
321 |
-
$post = get_post( $listing_id );
|
322 |
-
|
323 |
-
if ( ! $post ) {
|
324 |
-
return false;
|
325 |
-
}
|
326 |
-
|
327 |
-
if ( $post->post_type != WPBDP_POST_TYPE ) {
|
328 |
-
return false;
|
329 |
-
}
|
330 |
-
|
331 |
-
if ( isset( $_GET['preview'] ) && ( $action != 'view' ) ) {
|
332 |
-
return false;
|
333 |
-
}
|
334 |
-
|
335 |
-
$res = false;
|
336 |
-
|
337 |
-
switch ( $action ) {
|
338 |
-
case 'view':
|
339 |
-
if ( isset( $_GET['preview'] ) ) {
|
340 |
-
$res = user_can( $user_id, 'edit_others_posts' ) || ( $post->post_author && $post->post_author == $user_id );
|
341 |
-
} else {
|
342 |
-
$res = true;
|
343 |
-
}
|
344 |
-
// return apply_filters( 'wpbdp_user_can_view', true, $action, $listing_id );
|
345 |
-
break;
|
346 |
-
case 'flagging':
|
347 |
-
if ( wpbdp_get_option( 'listing-flagging-register-users' ) ) {
|
348 |
-
$res = is_user_logged_in() && false === WPBDP__Listing_Flagging::user_has_flagged( $listing_id, get_current_user_id() );
|
349 |
-
} else {
|
350 |
-
$res = true;
|
351 |
-
}
|
352 |
-
|
353 |
-
break;
|
354 |
-
case 'edit':
|
355 |
-
case 'delete':
|
356 |
-
$res = user_can( $user_id, 'administrator' );
|
357 |
-
$res = $res || ( $user_id && $post->post_author && $post->post_author == $user_id );
|
358 |
-
$res = $res || ( ! $user_id && wpbdp_get_option( 'enable-key-access' ) );
|
359 |
-
break;
|
360 |
-
default:
|
361 |
-
break;
|
362 |
-
}
|
363 |
-
|
364 |
-
$res = apply_filters( 'wpbdp_user_can', $res, $action, $listing_id, $user_id );
|
365 |
-
$res = apply_filters( 'wpbdp_user_can_' . $action, $res, $listing_id, $user_id );
|
366 |
-
|
367 |
-
return $res;
|
368 |
-
}
|
369 |
-
|
370 |
-
function wpbdp_get_post_by_slug( $slug, $post_type = null ) {
|
371 |
-
$post_type = $post_type ? $post_type : WPBDP_POST_TYPE;
|
372 |
-
|
373 |
-
$posts = get_posts(
|
374 |
-
array(
|
375 |
-
'name' => $slug,
|
376 |
-
'post_type' => $post_type,
|
377 |
-
'post_status' => 'publish',
|
378 |
-
'numberposts' => 1,
|
379 |
-
'suppress_filters' => false,
|
380 |
-
)
|
381 |
-
);
|
382 |
-
|
383 |
-
if ( $posts ) {
|
384 |
-
return $posts[0];
|
385 |
-
} else {
|
386 |
-
return 0;
|
387 |
-
}
|
388 |
-
}
|
389 |
-
|
390 |
-
function wpbdp_get_current_sort_option() {
|
391 |
-
$sort = trim( wpbdp_get_var( array( 'param' => 'wpbdp_sort' ) ) );
|
392 |
-
if ( $sort ) {
|
393 |
-
$order = substr( $sort, 0, 1 ) == '-' ? 'DESC' : 'ASC';
|
394 |
-
$sort = ltrim( $sort, '-' );
|
395 |
-
|
396 |
-
$obj = new StdClass();
|
397 |
-
$obj->option = $sort;
|
398 |
-
$obj->order = $order;
|
399 |
-
|
400 |
-
return $obj;
|
401 |
-
}
|
402 |
-
|
403 |
-
return null;
|
404 |
-
}
|
405 |
-
|
406 |
-
/*
|
407 |
-
* @since 2.1.6
|
408 |
-
*/
|
409 |
-
function _wpbdp_resize_image_if_needed( $id ) {
|
410 |
-
require_once ABSPATH . 'wp-admin/includes/image.php';
|
411 |
-
|
412 |
-
$metadata = wp_get_attachment_metadata( $id );
|
413 |
-
|
414 |
-
if ( ! $metadata ) {
|
415 |
-
return;
|
416 |
-
}
|
417 |
-
|
418 |
-
$def_width = absint( wpbdp_get_option( 'thumbnail-width' ) );
|
419 |
-
$width = absint( isset( $metadata['width'] ) ? $metadata['width'] : 0 );
|
420 |
-
|
421 |
-
if ( ! $width || $width <= $def_width ) {
|
422 |
-
return;
|
423 |
-
}
|
424 |
-
|
425 |
-
$def_height = absint( wpbdp_get_option( 'thumbnail-height' ) );
|
426 |
-
$height = absint( isset( $metadata['height'] ) ? $metadata['height'] : 0 );
|
427 |
-
|
428 |
-
if ( ! $height || $height <= $def_height ) {
|
429 |
-
return;
|
430 |
-
}
|
431 |
-
|
432 |
-
$thumb_info = isset( $metadata['sizes']['wpbdp-thumb'] ) ? $metadata['sizes']['wpbdp-thumb'] : false;
|
433 |
-
|
434 |
-
if ( $thumb_info ) {
|
435 |
-
$thumb_width = absint( $thumb_info['width'] );
|
436 |
-
$thumb_height = absint( $thumb_info['height'] );
|
437 |
-
|
438 |
-
// 10px of tolerance.
|
439 |
-
if ( abs( $thumb_width - $def_width ) < 10 ) {
|
440 |
-
return;
|
441 |
-
}
|
442 |
-
|
443 |
-
if ( wpbdp_get_option( 'thumbnail-crop' ) && abs( $thumb_height - $def_height ) < 10 ) {
|
444 |
-
return;
|
445 |
-
}
|
446 |
-
}
|
447 |
-
|
448 |
-
$filename = get_attached_file( $id, true );
|
449 |
-
$attach_data = wp_generate_attachment_metadata( $id, $filename );
|
450 |
-
wp_update_attachment_metadata( $id, $attach_data );
|
451 |
-
|
452 |
-
wpbdp_log( sprintf( 'Resized image "%s" [ID: %d] to match updated size constraints.', $filename, $id ) );
|
453 |
-
}
|
454 |
-
|
455 |
-
/*
|
456 |
-
* @since 2.1.7
|
457 |
-
* @deprecated since 3.6.10. See {@link wpbdp_currency_format()}.
|
458 |
-
*/
|
459 |
-
function wpbdp_format_currency( $amount, $decimals = 2, $currency = null ) {
|
460 |
-
_deprecated_function( __FUNCTION__, '3.6.10', 'wpbdp_currency_format' );
|
461 |
-
|
462 |
-
if ( $amount == 0.0 ) {
|
463 |
-
return '—';
|
464 |
-
}
|
465 |
-
|
466 |
-
return ( ! $currency ? wpbdp_get_option( 'currency-symbol' ) : $currency ) . ' ' . number_format( $amount, $decimals );
|
467 |
-
}
|
468 |
-
|
469 |
-
/**
|
470 |
-
* @since 3.6.10
|
471 |
-
*/
|
472 |
-
function wpbdp_currency_format( $amount, $args = array() ) {
|
473 |
-
// We don't actually allow modification of the "format" string for now, but it could be useful in the future.
|
474 |
-
switch ( wpbdp_get_option( 'currency-symbol-position' ) ) {
|
475 |
-
case 'none':
|
476 |
-
$def_format = '[amount]';
|
477 |
-
break;
|
478 |
-
case 'right':
|
479 |
-
$def_format = '[amount] [symbol]';
|
480 |
-
break;
|
481 |
-
case 'left':
|
482 |
-
default:
|
483 |
-
$def_format = '[symbol] [amount]';
|
484 |
-
break;
|
485 |
-
}
|
486 |
-
|
487 |
-
$defaults = array(
|
488 |
-
'decimals' => 2,
|
489 |
-
'force_numeric' => false,
|
490 |
-
'currency' => wpbdp_get_option( 'currency' ),
|
491 |
-
'symbol' => wpbdp_get_option( 'currency-symbol' ),
|
492 |
-
'format' => $def_format,
|
493 |
-
);
|
494 |
-
$args = wp_parse_args( $args, $defaults );
|
495 |
-
extract( $args );
|
496 |
-
|
497 |
-
if ( ! $force_numeric && $amount == '0' ) {
|
498 |
-
return __( 'Free', 'business-directory-plugin' );
|
499 |
-
}
|
500 |
-
|
501 |
-
if ( ! $symbol ) {
|
502 |
-
$symbol = strtoupper( $currency );
|
503 |
-
}
|
504 |
-
|
505 |
-
$number = ( 'placeholder' != $amount ? number_format_i18n( $amount, $decimals ) : '[amount]' );
|
506 |
-
$format = strtolower( $format );
|
507 |
-
|
508 |
-
if ( false === strpos( $format, '[amount]' ) ) {
|
509 |
-
$format .= ' [amount]';
|
510 |
-
}
|
511 |
-
|
512 |
-
$replacements = array(
|
513 |
-
'[currency]' => strtoupper( $currency ),
|
514 |
-
'[symbol]' => $symbol,
|
515 |
-
'[amount]' => $number,
|
516 |
-
);
|
517 |
-
|
518 |
-
return str_replace( array_keys( $replacements ), array_values( $replacements ), $format );
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* @since 5.1.9
|
523 |
-
*/
|
524 |
-
function wpbdp_date_full_format( $timestamp ) {
|
525 |
-
return date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $timestamp );
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* @since 5.1.9
|
530 |
-
*/
|
531 |
-
function wpbdp_date( $timestamp ) {
|
532 |
-
return date_i18n( get_option( 'date_format' ), $timestamp );
|
533 |
-
}
|
534 |
-
|
535 |
-
|
536 |
-
/**
|
537 |
-
* @since 3.5.3
|
538 |
-
*/
|
539 |
-
function wpbdp_get_post_by_id_or_slug( $id_or_slug = false, $try_first = 'id', $result = 'post' ) {
|
540 |
-
if ( 'slug' == $try_first ) {
|
541 |
-
$strategies = array( 'slug', 'id' );
|
542 |
-
} else {
|
543 |
-
$strategies = is_numeric( $id_or_slug ) ? array( 'id', 'slug' ) : array( 'slug' );
|
544 |
-
}
|
545 |
-
|
546 |
-
global $wpdb;
|
547 |
-
$listing_id = 0;
|
548 |
-
|
549 |
-
foreach ( $strategies as $s ) {
|
550 |
-
switch ( $s ) {
|
551 |
-
case 'id':
|
552 |
-
$listing_id = intval( $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE ID = %d AND post_type = %s", $id_or_slug, WPBDP_POST_TYPE ) ) );
|
553 |
-
break;
|
554 |
-
case 'slug':
|
555 |
-
$listing_id = intval( $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s AND post_type = %s", $id_or_slug, WPBDP_POST_TYPE ) ) );
|
556 |
-
break;
|
557 |
-
}
|
558 |
-
|
559 |
-
if ( $listing_id ) {
|
560 |
-
break;
|
561 |
-
}
|
562 |
-
}
|
563 |
-
|
564 |
-
if ( ! $listing_id ) {
|
565 |
-
return null;
|
566 |
-
}
|
567 |
-
|
568 |
-
if ( 'id' == $result ) {
|
569 |
-
return $listing_id;
|
570 |
-
}
|
571 |
-
|
572 |
-
return get_post( $listing_id );
|
573 |
-
}
|
574 |
-
|
575 |
-
/**
|
576 |
-
* @since 3.5.8
|
577 |
-
*/
|
578 |
-
function wpbdp_push_query( &$q ) {
|
579 |
-
global $wpbdp;
|
580 |
-
|
581 |
-
$wpbdp->_query_stack[] = $q;
|
582 |
-
}
|
583 |
-
|
584 |
-
/**
|
585 |
-
* @since 3.5.8
|
586 |
-
*/
|
587 |
-
function wpbdp_pop_query() {
|
588 |
-
global $wpbdp;
|
589 |
-
return array_pop( $wpbdp->_query_stack );
|
590 |
-
}
|
591 |
-
|
592 |
-
/**
|
593 |
-
* @since 3.5.8
|
594 |
-
*/
|
595 |
-
function wpbdp_current_query() {
|
596 |
-
global $wpbdp;
|
597 |
-
|
598 |
-
$len = count( $wpbdp->_query_stack );
|
599 |
-
|
600 |
-
if ( $len == 0 ) {
|
601 |
-
return null;
|
602 |
-
}
|
603 |
-
|
604 |
-
return $wpbdp->_query_stack[ $len - 1 ];
|
605 |
-
}
|
606 |
-
|
607 |
-
/**
|
608 |
-
* @since 3.6.10
|
609 |
-
*/
|
610 |
-
function wpbdp_experimental( $feature ) {
|
611 |
-
static $file_overrides = false;
|
612 |
-
global $wpbdp_development;
|
613 |
-
|
614 |
-
if ( file_exists( WPBDP_PATH . 'experimental' ) ) {
|
615 |
-
$file_overrides = explode( ',', trim( file_get_contents( WPBDP_PATH . 'experimental' ) ) );
|
616 |
-
}
|
617 |
-
|
618 |
-
$res = false;
|
619 |
-
if ( isset( $wpbdp_development ) ) {
|
620 |
-
$res = $wpbdp_development->option_get( $feature );
|
621 |
-
}
|
622 |
-
|
623 |
-
if ( $file_overrides && in_array( $feature, $file_overrides, true ) ) {
|
624 |
-
$res = true;
|
625 |
-
}
|
626 |
-
|
627 |
-
return $res;
|
628 |
-
}
|
629 |
-
|
630 |
-
/**
|
631 |
-
* @since 4.0
|
632 |
-
*/
|
633 |
-
function wpbdp_current_view_output() {
|
634 |
-
global $wpbdp;
|
635 |
-
return $wpbdp->dispatcher->current_view_output();
|
636 |
-
}
|
637 |
-
|
638 |
-
/**
|
639 |
-
* @since 4.0
|
640 |
-
*/
|
641 |
-
function wpbdp_url( $pathorview = '/', $args = array() ) {
|
642 |
-
if ( $pathorview === 'admin' ) {
|
643 |
-
// If this is an admin page, bail early to avoid extra database calls.
|
644 |
-
$url = add_query_arg( $args, admin_url( 'admin.php' ) );
|
645 |
-
return apply_filters( 'wpbdp_url', $url, $pathorview, $args );
|
646 |
-
}
|
647 |
-
|
648 |
-
$base_id = wpbdp_get_page_id( 'main' );
|
649 |
-
$base_url = _get_page_link( $base_id );
|
650 |
-
$base_url = apply_filters( 'wpbdp_url_base_url', $base_url, $base_id, $pathorview, $args );
|
651 |
-
$url = '';
|
652 |
-
|
653 |
-
switch ( $pathorview ) {
|
654 |
-
case 'submit_listing':
|
655 |
-
case 'all_listings':
|
656 |
-
case 'view_listings':
|
657 |
-
case 'manage_listings':
|
658 |
-
case 'search':
|
659 |
-
case 'login':
|
660 |
-
case 'request_access_keys':
|
661 |
-
$url = add_query_arg( 'wpbdp_view', $pathorview, $base_url );
|
662 |
-
break;
|
663 |
-
case 'flag_listing':
|
664 |
-
case 'delete_listing':
|
665 |
-
case 'edit_listing':
|
666 |
-
case 'listing_contact':
|
667 |
-
$url = add_query_arg(
|
668 |
-
array(
|
669 |
-
'wpbdp_view' => $pathorview,
|
670 |
-
'listing_id' => $args,
|
671 |
-
),
|
672 |
-
$base_url
|
673 |
-
);
|
674 |
-
break;
|
675 |
-
case 'renew_listing':
|
676 |
-
$url = add_query_arg(
|
677 |
-
array(
|
678 |
-
'wpbdp_view' => $pathorview,
|
679 |
-
'renewal_id' => $args,
|
680 |
-
),
|
681 |
-
$base_url
|
682 |
-
);
|
683 |
-
break;
|
684 |
-
case 'main':
|
685 |
-
case '/':
|
686 |
-
$url = $base_url;
|
687 |
-
break;
|
688 |
-
case 'checkout':
|
689 |
-
$url = $base_url;
|
690 |
-
$url = add_query_arg(
|
691 |
-
array(
|
692 |
-
'wpbdp_view' => 'checkout',
|
693 |
-
'payment' => $args,
|
694 |
-
),
|
695 |
-
$base_url
|
696 |
-
);
|
697 |
-
break;
|
698 |
-
default:
|
699 |
-
if ( wpbdp_starts_with( $pathorview, '/' ) ) {
|
700 |
-
$url = rtrim( wpbdp_url( '/' ), '/' ) . '/' . substr( $pathorview, 1 );
|
701 |
-
}
|
702 |
-
|
703 |
-
break;
|
704 |
-
}
|
705 |
-
|
706 |
-
$url = apply_filters( 'wpbdp_url', $url, $pathorview, $args );
|
707 |
-
return $url;
|
708 |
-
}
|
709 |
-
|
710 |
-
/**
|
711 |
-
* Generates Ajax URL and allows plugins to alter it through a filter.
|
712 |
-
*
|
713 |
-
* @since 5.0.3
|
714 |
-
*/
|
715 |
-
function wpbdp_ajax_url() {
|
716 |
-
return apply_filters( 'wpbdp_ajax_url', admin_url( 'admin-ajax.php' ) );
|
717 |
-
}
|
718 |
-
|
719 |
-
/**
|
720 |
-
* TODO: update before themes-release
|
721 |
-
* TODO: Sometimes this functions is called from
|
722 |
-
* WPBDP_WPML_Compat->language_switcher even though no category
|
723 |
-
* is available thorugh get_queried_object(), triggering a
|
724 |
-
* "Trying to get property of non-object" notice.
|
725 |
-
*
|
726 |
-
* The is_object() if-statement that is commented out below can prevent
|
727 |
-
* the notice, but the real issue is the fact that the plugin thinks
|
728 |
-
* we are showing a category while the main query has no queried object.
|
729 |
-
*
|
730 |
-
* If the rewrite rule for a cateagry matches, but we can't retrieve
|
731 |
-
* a term from the database, we should mark the query as not-found
|
732 |
-
* from the beginning.
|
733 |
-
*/
|
734 |
-
function wpbdp_current_category_id() {
|
735 |
-
global $wp_query;
|
736 |
-
|
737 |
-
if ( empty( $wp_query->wpbdp_is_category ) ) {
|
738 |
-
return false;
|
739 |
-
}
|
740 |
-
|
741 |
-
$term = $wp_query->get_queried_object();
|
742 |
-
|
743 |
-
// if ( ! is_object( $term ) ) {
|
744 |
-
// return false;
|
745 |
-
// }
|
746 |
-
|
747 |
-
return $term->term_id;
|
748 |
-
}
|
749 |
-
|
750 |
-
/**
|
751 |
-
* @since 4.1.12
|
752 |
-
*/
|
753 |
-
function _wpbdp_current_category_id() {
|
754 |
-
$term = _wpbpd_current_category();
|
755 |
-
|
756 |
-
if ( ! $term ) {
|
757 |
-
return null;
|
758 |
-
}
|
759 |
-
|
760 |
-
return $term->term_id;
|
761 |
-
}
|
762 |
-
|
763 |
-
/**
|
764 |
-
* @since 4.1.12
|
765 |
-
*/
|
766 |
-
function _wpbpd_current_category() {
|
767 |
-
global $wp_query;
|
768 |
-
|
769 |
-
if ( $wp_query->wpbdp_is_category ) {
|
770 |
-
$term = $wp_query->get_queried_object();
|
771 |
-
} else {
|
772 |
-
$term = null;
|
773 |
-
}
|
774 |
-
|
775 |
-
if ( ! $term ) {
|
776 |
-
$category_id = get_query_var( '_' . wpbdp_get_option( 'permalinks-category-slug' ) );
|
777 |
-
|
778 |
-
if ( $category_id ) {
|
779 |
-
$term = get_term_by( 'slug', $category_id, WPBDP_CATEGORY_TAX );
|
780 |
-
}
|
781 |
-
}
|
782 |
-
|
783 |
-
if ( ! $term ) {
|
784 |
-
$category_id = get_query_var( 'category_id' );
|
785 |
-
|
786 |
-
if ( $category_id ) {
|
787 |
-
$term = get_term_by( 'id', $category_id, WPBDP_CATEGORY_TAX );
|
788 |
-
}
|
789 |
-
}
|
790 |
-
|
791 |
-
return $term;
|
792 |
-
}
|
793 |
-
|
794 |
-
function wpbdp_current_tag_id() {
|
795 |
-
global $wp_query;
|
796 |
-
|
797 |
-
if ( empty( $wp_query->wpbdp_is_tag ) ) {
|
798 |
-
return false;
|
799 |
-
}
|
800 |
-
|
801 |
-
$term = $wp_query->get_queried_object();
|
802 |
-
return $term->term_id;
|
803 |
-
}
|
804 |
-
|
805 |
-
function wpbdp_current_action() {
|
806 |
-
return wpbdp_current_view();
|
807 |
-
}
|
808 |
-
|
809 |
-
// TODO: how to implement now with CPT? (themes-release)
|
810 |
-
/**
|
811 |
-
* @SuppressWarnings(PHPMD)
|
812 |
-
*/
|
813 |
-
function wpbdp_current_listing_id() {
|
814 |
-
return 0;
|
815 |
-
}
|
816 |
-
|
817 |
-
/**
|
818 |
-
* @since 4.0
|
819 |
-
*/
|
820 |
-
function wpbdp_current_view() {
|
821 |
-
global $wpbdp;
|
822 |
-
|
823 |
-
if ( ! isset( $wpbdp->dispatcher ) || ! is_object( $wpbdp->dispatcher ) ) {
|
824 |
-
return '';
|
825 |
-
}
|
826 |
-
|
827 |
-
return $wpbdp->dispatcher->current_view();
|
828 |
-
}
|
829 |
-
|
830 |
-
/**
|
831 |
-
* @since 4.0
|
832 |
-
*/
|
833 |
-
function wpbdp_load_view( $view, $arg0 = null ) {
|
834 |
-
global $wpbdp;
|
835 |
-
return $wpbdp->dispatcher->load_view( $view, $arg0 );
|
836 |
-
}
|
837 |
-
|
838 |
-
function wpbdp_get_payment( $id ) {
|
839 |
-
return WPBDP_Payment::objects()->get( $id );
|
840 |
-
}
|
841 |
-
|
842 |
-
/**
|
843 |
-
* @since 5.0
|
844 |
-
*/
|
845 |
-
function wpbdp_get_fee_plans( $args = array() ) {
|
846 |
-
global $wpdb;
|
847 |
-
|
848 |
-
$payments_on = wpbdp_payments_possible();
|
849 |
-
$defaults = array(
|
850 |
-
'enabled' => 1,
|
851 |
-
'include_free' => ! $payments_on,
|
852 |
-
'tag' => '',
|
853 |
-
'orderby' => 'label',
|
854 |
-
'order' => 'ASC',
|
855 |
-
'categories' => array(),
|
856 |
-
'include_private' => false,
|
857 |
-
'admin_view' => false,
|
858 |
-
);
|
859 |
-
|
860 |
-
$order = wpbdp_get_option( 'fee-order' );
|
861 |
-
if ( $order ) {
|
862 |
-
$defaults['orderby'] = ( 'custom' == $order['method'] ) ? 'weight' : $order['method'];
|
863 |
-
$defaults['order'] = ( 'custom' == $order['method'] ) ? 'DESC' : $order['order'];
|
864 |
-
}
|
865 |
-
|
866 |
-
$args = wp_parse_args( $args, $defaults );
|
867 |
-
$args = apply_filters( 'wpbdp_get_fee_plans_args', $args );
|
868 |
-
|
869 |
-
$where = '1=1';
|
870 |
-
if ( 'all' !== $args['enabled'] ) {
|
871 |
-
$where .= $wpdb->prepare( ' AND p.enabled = %d ', (bool) $args['enabled'] );
|
872 |
-
}
|
873 |
-
|
874 |
-
if ( $args['tag'] ) {
|
875 |
-
$where .= $wpdb->prepare( ' AND p.tag = %s', $args['tag'] );
|
876 |
-
}
|
877 |
-
|
878 |
-
if ( ! $args['admin_view'] && $args['include_free'] ) {
|
879 |
-
$where .= $wpdb->prepare( ' AND p.amount = %d', 0 );
|
880 |
-
} elseif ( ! $args['admin_view'] && $args['tag'] !== 'free' ) {
|
881 |
-
// Exclude the default free fee for reverse compatibility.
|
882 |
-
$where .= $wpdb->prepare( ' AND p.tag != %s', 'free' );
|
883 |
-
}
|
884 |
-
|
885 |
-
$categories = $args['categories'];
|
886 |
-
if ( ! empty( $categories ) ) {
|
887 |
-
if ( ! is_array( $categories ) ) {
|
888 |
-
$categories = array( $categories );
|
889 |
-
}
|
890 |
-
|
891 |
-
$categories = array_map( 'absint', $categories );
|
892 |
-
}
|
893 |
-
|
894 |
-
$order = strtoupper( $args['order'] );
|
895 |
-
$orderby = $args['orderby'];
|
896 |
-
$query = "SELECT p.id FROM {$wpdb->prefix}wpbdp_plans p WHERE {$where} ORDER BY {$orderby} {$order}";
|
897 |
-
|
898 |
-
$plan_ids = WPBDP_Utils::check_cache(
|
899 |
-
array(
|
900 |
-
'cache_key' => json_encode( $args ),
|
901 |
-
'group' => 'wpbdp_plans',
|
902 |
-
'query' => $query,
|
903 |
-
'type' => 'get_col',
|
904 |
-
)
|
905 |
-
);
|
906 |
-
|
907 |
-
$plan_ids = apply_filters( 'wpbdp_pre_get_fee_plans', $plan_ids );
|
908 |
-
|
909 |
-
$plans = array();
|
910 |
-
foreach ( $plan_ids as $plan_id ) {
|
911 |
-
if ( $plan = wpbdp_get_fee_plan( $plan_id ) ) {
|
912 |
-
if ( $categories && ! $plan->supports_category_selection( $categories ) ) {
|
913 |
-
continue;
|
914 |
-
}
|
915 |
-
if ( ! $args['include_private'] && ! empty( $plan->extra_data['private'] ) && ! current_user_can( 'administrator' ) ) {
|
916 |
-
continue;
|
917 |
-
}
|
918 |
-
$plans[] = $plan;
|
919 |
-
}
|
920 |
-
}
|
921 |
-
|
922 |
-
$plans = apply_filters( 'wpbdp_get_fee_plans', $plans );
|
923 |
-
|
924 |
-
return $plans;
|
925 |
-
}
|
926 |
-
|
927 |
-
/**
|
928 |
-
* @since 5.0
|
929 |
-
*/
|
930 |
-
function wpbdp_get_fee_plan( $plan_id ) {
|
931 |
-
global $wpdb;
|
932 |
-
|
933 |
-
if ( 0 === $plan_id || 'free' === $plan_id ) {
|
934 |
-
$plan_id = absint( $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}wpbdp_plans WHERE tag = %s", 'free' ) ) );
|
935 |
-
}
|
936 |
-
|
937 |
-
$plan_id = absint( $plan_id );
|
938 |
-
|
939 |
-
return WPBDP__Fee_Plan::get_instance( $plan_id );
|
940 |
-
}
|
941 |
-
|
942 |
-
/**
|
943 |
-
* @since 4.1.8
|
944 |
-
*/
|
945 |
-
function wpbdp_is_taxonomy() {
|
946 |
-
$current_view = wpbdp_current_view();
|
947 |
-
$is_taxonomy = in_array( $current_view, array( 'show_category', 'show_tag' ), true );
|
948 |
-
|
949 |
-
return apply_filters( 'wpbdp_is_taxonomy', $is_taxonomy, $current_view );
|
950 |
-
}
|
951 |
-
|
952 |
-
/**
|
953 |
-
* @since 5.5.2
|
954 |
-
*/
|
955 |
-
function wpbdp_get_taxonomy_link( $taxonomy, $link = '' ) {
|
956 |
-
$taxonomy_type = '';
|
957 |
-
|
958 |
-
switch ( $taxonomy->taxonomy ) {
|
959 |
-
case WPBDP_CATEGORY_TAX:
|
960 |
-
$taxonomy_type = 'category';
|
961 |
-
break;
|
962 |
-
case WPBDP_TAGS_TAX:
|
963 |
-
$taxonomy_type = 'tags';
|
964 |
-
break;
|
965 |
-
}
|
966 |
-
|
967 |
-
if ( ! $taxonomy_type ) {
|
968 |
-
return $link;
|
969 |
-
}
|
970 |
-
|
971 |
-
if ( ! wpbdp_rewrite_on() ) {
|
972 |
-
if ( wpbdp_get_option( 'disable-cpt' ) ) {
|
973 |
-
return wpbdp_url( '/' ) . '&_' . wpbdp_get_option( 'permalinks-' . $taxonomy_type . '-slug' ) . '=' . $taxonomy->slug;
|
974 |
-
}
|
975 |
-
|
976 |
-
return $link ? $link : get_category_link( $taxonomy->term_id );
|
977 |
-
}
|
978 |
-
|
979 |
-
return wpbdp_url( sprintf( '/%s/%s/', wpbdp_get_option( 'permalinks-' . $taxonomy_type . '-slug' ), $taxonomy->slug ) );
|
980 |
-
}
|
981 |
-
|
982 |
-
function wpbdp_render_page( $template, $vars = array(), $echo_output = false ) {
|
983 |
-
if ( empty( $template ) ) {
|
984 |
-
return '';
|
985 |
-
}
|
986 |
-
|
987 |
-
if ( $vars ) {
|
988 |
-
extract( $vars );
|
989 |
-
}
|
990 |
-
|
991 |
-
ob_start();
|
992 |
-
include $template;
|
993 |
-
$html = ob_get_contents();
|
994 |
-
ob_end_clean();
|
995 |
-
|
996 |
-
if ( $echo_output ) {
|
997 |
-
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
998 |
-
echo $html;
|
999 |
-
}
|
1000 |
-
|
1001 |
-
return $html;
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
function wpbdp_locate_template( $template, $allow_override = true, $try_defaults = true ) {
|
1005 |
-
$template_file = '';
|
1006 |
-
|
1007 |
-
if ( ! is_array( $template ) ) {
|
1008 |
-
$template = array( $template );
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
if ( $allow_override ) {
|
1012 |
-
global $wpbdp;
|
1013 |
-
|
1014 |
-
$search_for = array();
|
1015 |
-
$template_file = '';
|
1016 |
-
|
1017 |
-
foreach ( $template as $t ) {
|
1018 |
-
$template_file = $wpbdp->themes->locate_template( $t );
|
1019 |
-
if ( $template_file ) {
|
1020 |
-
break;
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
// These file checks could be a little risky and get unintended results.
|
1024 |
-
if ( wpbdp_get_option( 'disable-cpt' ) ) {
|
1025 |
-
$search_for[] = $t . '.tpl.php';
|
1026 |
-
$search_for[] = $t . '.php';
|
1027 |
-
$search_for[] = 'single/' . $t . '.tpl.php';
|
1028 |
-
$search_for[] = 'single/' . $t . '.php';
|
1029 |
-
}
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
// Check for the template in the WP theme.
|
1033 |
-
if ( empty( $template_file ) ) {
|
1034 |
-
$template_file = locate_template( $search_for );
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
if ( $template_file && ! $try_defaults ) {
|
1039 |
-
_deprecated_argument( __FUNCTION__, '5.13.2', 'Defaults are always checked here. Use $wpbdp->themes->template_has_override' );
|
1040 |
-
|
1041 |
-
// Temporary reverse compatibility: The BD folder was checked when it shouldn't be. Remove it.
|
1042 |
-
if ( strpos( $template_path, WPBDP_TEMPLATES_PATH ) !== false ) {
|
1043 |
-
$template_file = '';
|
1044 |
-
}
|
1045 |
-
} elseif ( ! $allow_override ) {
|
1046 |
-
// Only get the core file if it hasn't already been checked.
|
1047 |
-
foreach ( $template as $t ) {
|
1048 |
-
$template_path = WPBDP_TEMPLATES_PATH . '/' . $t . '.tpl.php';
|
1049 |
-
|
1050 |
-
if ( file_exists( $template_path ) ) {
|
1051 |
-
$template_file = $template_path;
|
1052 |
-
break;
|
1053 |
-
}
|
1054 |
-
}
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
return $template_file;
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
function wpbdp_render( $template, $vars = array(), $allow_override = true ) {
|
1061 |
-
$vars = wp_parse_args(
|
1062 |
-
$vars,
|
1063 |
-
array(
|
1064 |
-
'__page__' => array(
|
1065 |
-
'class' => array(),
|
1066 |
-
'content_class' => array(),
|
1067 |
-
'before_content' => '',
|
1068 |
-
),
|
1069 |
-
)
|
1070 |
-
);
|
1071 |
-
$template_name = is_array( $template ) ? $template[0] : $template;
|
1072 |
-
$vars = apply_filters( 'wpbdp_template_vars', $vars, $template_name );
|
1073 |
-
|
1074 |
-
$content = wpbdp_render_page( wpbdp_locate_template( $template, $allow_override ), $vars, false );
|
1075 |
-
$content = apply_filters( "wpbdp_render_{$template_name}", $content );
|
1076 |
-
|
1077 |
-
if ( isset( $vars['echo'] ) ) {
|
1078 |
-
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
1079 |
-
echo $content;
|
1080 |
-
}
|
1081 |
-
return $content;
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
function wpbdp_render_msg( $msg, $type = 'status', $echo = false ) {
|
1085 |
-
$msg = '<div class="wpbdp-msg ' . esc_attr( $type ) . '">' . wp_kses_post( $msg ) . '</div>';
|
1086 |
-
if ( $echo ) {
|
1087 |
-
echo $msg;
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
return $msg;
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
function _wpbdp_template_mode( $template ) {
|
1094 |
-
global $wpbdp;
|
1095 |
-
|
1096 |
-
$has_override = $wpbdp->themes->template_has_override( 'businessdirectory-' . $template ) || $wpbdp->themes->template_has_override( 'wpbusdirman-' . $template );
|
1097 |
-
if ( $has_override ) {
|
1098 |
-
return 'template';
|
1099 |
-
}
|
1100 |
-
return 'page';
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
require_once WPBDP_PATH . 'includes/helpers/class-listing-display-helper.php';
|
1104 |
-
|
1105 |
-
|
1106 |
-
/**
|
1107 |
-
* Displays a single listing view taking into account all of the theme overrides.
|
1108 |
-
*
|
1109 |
-
* @param mixed $listing_id listing object or listing id to display.
|
1110 |
-
* @param string $view 'single' for single view or 'excerpt' for summary view.
|
1111 |
-
* @return string HTML output.
|
1112 |
-
*/
|
1113 |
-
function wpbdp_render_listing( $listing_id = null, $view = 'single', $echo = false ) {
|
1114 |
-
$listing_id = $listing_id ? ( is_object( $listing_id ) ? $listing_id->ID : absint( $listing_id ) ) : get_the_ID();
|
1115 |
-
|
1116 |
-
$args = array(
|
1117 |
-
'post_type' => WPBDP_POST_TYPE,
|
1118 |
-
'p' => $listing_id,
|
1119 |
-
);
|
1120 |
-
if ( ! current_user_can( 'edit_posts' ) ) {
|
1121 |
-
$args['post_status'] = 'publish';
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
$q = new WP_Query( $args );
|
1125 |
-
if ( ! $q->have_posts() ) {
|
1126 |
-
return '';
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
$q->the_post();
|
1130 |
-
|
1131 |
-
if ( 'excerpt' === $view ) {
|
1132 |
-
$html = WPBDP_Listing_Display_Helper::excerpt();
|
1133 |
-
} else {
|
1134 |
-
$html = WPBDP_Listing_Display_Helper::single();
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
if ( $echo ) {
|
1138 |
-
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
1139 |
-
echo $html;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
wp_reset_postdata();
|
1143 |
-
|
1144 |
-
return $html;
|
1145 |
-
}
|
1146 |
-
|
1147 |
-
function wpbdp_latest_listings( $n = 10, $before = '<ul>', $after = '</ul>', $before_item = '<li>', $after_item = '</li>' ) {
|
1148 |
-
$n = max( intval( $n ), 0 );
|
1149 |
-
|
1150 |
-
$posts = get_posts(
|
1151 |
-
array(
|
1152 |
-
'post_type' => WPBDP_POST_TYPE,
|
1153 |
-
'post_status' => 'publish',
|
1154 |
-
'numberposts' => $n,
|
1155 |
-
'orderby' => 'date',
|
1156 |
-
'suppress_filters' => false,
|
1157 |
-
)
|
1158 |
-
);
|
1159 |
-
|
1160 |
-
$html = '';
|
1161 |
-
|
1162 |
-
$html .= $before;
|
1163 |
-
|
1164 |
-
foreach ( $posts as $post ) {
|
1165 |
-
$html .= $before_item;
|
1166 |
-
$html .= sprintf( '<a href="%s">%s</a>', get_permalink( $post->ID ), get_the_title( $post->ID ) );
|
1167 |
-
$html .= $after_item;
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
$html .= $after;
|
1171 |
-
|
1172 |
-
return $html;
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
/**
|
1176 |
-
* @since 4.0
|
1177 |
-
*/
|
1178 |
-
function wpbdp_the_listing_actions( $args = array() ) {
|
1179 |
-
echo wpbdp_listing_actions();
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
/**
|
1183 |
-
* @since 4.0
|
1184 |
-
*/
|
1185 |
-
function wpbdp_listing_actions( $args = array() ) {
|
1186 |
-
return wpbdp_render(
|
1187 |
-
'parts/listing-buttons',
|
1188 |
-
array(
|
1189 |
-
'listing_id' => get_the_ID(),
|
1190 |
-
'view' => 'excerpt',
|
1191 |
-
),
|
1192 |
-
false
|
1193 |
-
);
|
1194 |
-
}
|
1195 |
-
|
1196 |
-
require_once WPBDP_INC . 'logging.php';
|
1197 |
-
require_once WPBDP_PATH . 'includes/class-listings-api.php';
|
1198 |
-
require_once WPBDP_INC . 'listings.php';
|
1199 |
-
|
1200 |
-
function wpbdp_sortbar_get_field_options() {
|
1201 |
-
$options = array();
|
1202 |
-
|
1203 |
-
foreach ( wpbdp_get_form_fields() as $field ) {
|
1204 |
-
if ( in_array( $field->get_field_type_id(), array( 'image', 'social-network', 'multiselect', 'checkbox', 'url' ) ) || in_array( $field->get_association(), array( 'category', 'tags', 'regions' ) ) ) {
|
1205 |
-
continue;
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
$options[ $field->get_id() ] = apply_filters( 'wpbdp_render_field_label', $field->get_label(), $field );
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
$options = apply_filters( 'wpbdp_sortbar_get_field_options', $options );
|
1212 |
-
|
1213 |
-
$options['user_login'] = _x( 'User', 'admin settings', 'business-directory-plugin' );
|
1214 |
-
$options['user_registered'] = _x( 'User registration date', 'admin settings', 'business-directory-plugin' );
|
1215 |
-
$options['date'] = _x( 'Date posted', 'admin settings', 'business-directory-plugin' );
|
1216 |
-
$options['modified'] = _x( 'Date last modified', 'admin settings', 'business-directory-plugin' );
|
1217 |
-
|
1218 |
-
return $options;
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
/**
|
1222 |
-
* Returns the admin edit link for the listing.
|
1223 |
-
*
|
1224 |
-
* @param int $listing_id the listing ID
|
1225 |
-
* @return string The admin edit link for the listing (if available).
|
1226 |
-
* @since 5.1.3
|
1227 |
-
*/
|
1228 |
-
function wpbdp_get_edit_post_link( $listing_id ) {
|
1229 |
-
if ( ! $post = get_post( $listing_id ) ) {
|
1230 |
-
return '';
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
$post_type_object = get_post_type_object( $post->post_type );
|
1234 |
-
if ( ! $post_type_object ) {
|
1235 |
-
return '';
|
1236 |
-
}
|
1237 |
-
|
1238 |
-
if ( $post_type_object->_edit_link ) {
|
1239 |
-
$link = admin_url( sprintf( $post_type_object->_edit_link . '&action=edit', $post->ID ) );
|
1240 |
-
} else {
|
1241 |
-
$link = '';
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
return $link;
|
1245 |
-
}
|
1246 |
-
|
1247 |
-
/**
|
1248 |
-
* @since 5.1.6
|
1249 |
-
*/
|
1250 |
-
function wpbdp_get_client_ip_address() {
|
1251 |
-
$ip = '0.0.0.0';
|
1252 |
-
|
1253 |
-
$check_vars = array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' );
|
1254 |
-
|
1255 |
-
foreach ( $check_vars as $varname ) {
|
1256 |
-
$value = wpbdp_get_server_value( $varname );
|
1257 |
-
if ( $value ) {
|
1258 |
-
return $value;
|
1259 |
-
}
|
1260 |
-
}
|
1261 |
-
|
1262 |
-
return $ip;
|
1263 |
-
}
|
1264 |
-
|
1265 |
-
/**
|
1266 |
-
* Added as replacement for a function crated with create_function().
|
1267 |
-
*
|
1268 |
-
* @since 5.2.1
|
1269 |
-
*/
|
1270 |
-
function wpbdp_delete_page_ids_cache() {
|
1271 |
-
delete_transient( 'wpbdp-page-ids' );
|
1272 |
-
}
|
1273 |
-
|
1274 |
-
/**
|
1275 |
-
* Echoes a link to return to previous page.
|
1276 |
-
*
|
1277 |
-
* @since 5.5.2
|
1278 |
-
*/
|
1279 |
-
function wpbdp_get_return_link() {
|
1280 |
-
$referer = ! empty( $_SERVER['HTTP_REFERER'] ) ? filter_var( wpbdp_get_server_value( 'HTTP_REFERER' ), FILTER_VALIDATE_URL ) : '';
|
1281 |
-
|
1282 |
-
if ( ! $referer ) {
|
1283 |
-
return;
|
1284 |
-
}
|
1285 |
-
|
1286 |
-
$referer_vars = array();
|
1287 |
-
$msg = '';
|
1288 |
-
|
1289 |
-
wp_parse_str( wp_parse_url( $referer, PHP_URL_QUERY ), $referer_vars );
|
1290 |
-
|
1291 |
-
if ( $referer_vars && isset( $referer_vars['wpbdp_view'] ) ) {
|
1292 |
-
if ( 'search' === $referer_vars['wpbdp_view'] ) {
|
1293 |
-
$msg = _x( 'Return to results', 'templates', 'business-directory-plugin' );
|
1294 |
-
}
|
1295 |
-
|
1296 |
-
if ( 'all_listings' === $referer_vars['wpbdp_view'] ) {
|
1297 |
-
$msg = __( 'Go back', 'business-directory-plugin' );
|
1298 |
-
}
|
1299 |
-
}
|
1300 |
-
|
1301 |
-
if ( strpos( $referer, wpbdp_get_option( 'permalinks-category-slug' ) ) || strpos( $referer, wpbdp_get_option( 'permalinks-tags-slug' ) ) ) {
|
1302 |
-
$msg = __( 'Go back', 'business-directory-plugin' );
|
1303 |
-
}
|
1304 |
-
|
1305 |
-
if ( $msg ) {
|
1306 |
-
echo '<p class="wpbdp-goback"><a href="' . esc_url( $referer ) . '" >← ' . esc_html( $msg ) . '</a></p>';
|
1307 |
-
}
|
1308 |
-
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
/**
|
1312 |
-
* @since 5.6.3
|
1313 |
-
*/
|
1314 |
-
function wpbdp_users_dropdown() {
|
1315 |
-
$users = get_users( array( 'fields' => array( 'ID', 'user_login' ) ) );
|
1316 |
-
$res = array();
|
1317 |
-
|
1318 |
-
foreach ( $users as $u ) {
|
1319 |
-
$res[ $u->ID ] = $u->user_login;
|
1320 |
-
}
|
1321 |
-
|
1322 |
-
return $res;
|
1323 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/helpers/functions/general.php' );
|
3 |
+
require_once WPBDP_INC . 'helpers/functions/general.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/helpers/class-app.php
CHANGED
@@ -145,6 +145,53 @@ class WPBDP_App_Helper {
|
|
145 |
return is_admin() && $get_page == $page;
|
146 |
}
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
/**
|
149 |
* Check if the user has permision for action.
|
150 |
* Return permission message and stop the action if no permission
|
145 |
return is_admin() && $get_page == $page;
|
146 |
}
|
147 |
|
148 |
+
/**
|
149 |
+
* Is this a page we should be changing?
|
150 |
+
*
|
151 |
+
* @since 5.8.2
|
152 |
+
*
|
153 |
+
* @return bool
|
154 |
+
*/
|
155 |
+
public static function is_bd_page() {
|
156 |
+
$is_post_page = self::is_bd_post_page();
|
157 |
+
if ( $is_post_page ) {
|
158 |
+
return true;
|
159 |
+
}
|
160 |
+
|
161 |
+
$page = wpbdp_get_var( array( 'param' => 'page' ) );
|
162 |
+
$is_page = $page && strpos( $page, 'wpbdp' ) !== false;
|
163 |
+
|
164 |
+
/**
|
165 |
+
* @since 5.12.1
|
166 |
+
*/
|
167 |
+
return apply_filters( 'wpbdp_is_bd_page', $is_page );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Check if current page is a Business Directory plugin page.
|
172 |
+
*
|
173 |
+
* @since 5.8.2
|
174 |
+
*
|
175 |
+
* @return bool
|
176 |
+
*/
|
177 |
+
public static function is_bd_post_page() {
|
178 |
+
global $pagenow;
|
179 |
+
|
180 |
+
if ( 'post.php' !== $pagenow && 'post-new.php' !== $pagenow && 'edit.php' !== $pagenow ) {
|
181 |
+
return false;
|
182 |
+
}
|
183 |
+
|
184 |
+
$post_type = wpbdp_get_var( array( 'param' => 'post_type' ) );
|
185 |
+
|
186 |
+
if ( empty( $post_type ) ) {
|
187 |
+
$post_id = wpbdp_get_var( array( 'param' => 'post', 'sanitize' => 'absint' ) );
|
188 |
+
$post = get_post( $post_id );
|
189 |
+
$post_type = $post ? $post->post_type : '';
|
190 |
+
}
|
191 |
+
|
192 |
+
return WPBDP_POST_TYPE === $post_type;
|
193 |
+
}
|
194 |
+
|
195 |
/**
|
196 |
* Check if the user has permision for action.
|
197 |
* Return permission message and stop the action if no permission
|
includes/helpers/class-authenticated-listing-view.php
CHANGED
@@ -2,9 +2,36 @@
|
|
2 |
|
3 |
class WPBDP__Authenticated_Listing_View extends WPBDP__View {
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
if ( current_user_can( 'administrator' ) ) {
|
10 |
return true;
|
@@ -14,18 +41,17 @@ class WPBDP__Authenticated_Listing_View extends WPBDP__View {
|
|
14 |
return true;
|
15 |
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
//if ( is_user_logged_in() && ( $this->listing->get_auth ) )
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
return $this->listing->validate_access_key_hash( $key_hash );
|
26 |
|
27 |
-
|
28 |
-
|
29 |
|
|
|
|
|
30 |
|
31 |
}
|
2 |
|
3 |
class WPBDP__Authenticated_Listing_View extends WPBDP__View {
|
4 |
|
5 |
+
/**
|
6 |
+
* Load resources required for the view
|
7 |
+
*
|
8 |
+
* @since 5.14.3
|
9 |
+
*/
|
10 |
+
public function enqueue_resources() {
|
11 |
+
// CSS used for plan buttons on the listing page only.
|
12 |
+
$custom_css = "
|
13 |
+
.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]+ label span:before{
|
14 |
+
content: '" . esc_attr__( 'Select', 'business-directory-plugin' ) . "';
|
15 |
+
}
|
16 |
+
.wpbdp-plan-info-box .wpbdp-plan-price input[type=radio]:checked + label span:before{
|
17 |
+
content: '" . esc_attr__( 'Selected', 'business-directory-plugin' ) . "';
|
18 |
+
}";
|
19 |
+
wp_add_inline_style( 'wpbdp-base-css', $custom_css );
|
20 |
+
|
21 |
+
$this->enqueue_custom_resources();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @since 5.14.3
|
26 |
+
*/
|
27 |
+
public function enqueue_custom_resources() {
|
28 |
+
// Load custom resources in classes that extend this class.
|
29 |
+
// Defaults to empty function if not overriden in the child class.
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function authenticate() {
|
33 |
+
if ( ! $this->listing )
|
34 |
+
die();
|
35 |
|
36 |
if ( current_user_can( 'administrator' ) ) {
|
37 |
return true;
|
41 |
return true;
|
42 |
}
|
43 |
|
44 |
+
if ( 'WPBDP__Views__Submit_Listing' == get_class( $this ) && empty( $this->editing ) && ! wpbdp_get_option( 'require-login' ) )
|
45 |
+
return true;
|
|
|
|
|
46 |
|
47 |
+
//if ( is_user_logged_in() && ( $this->listing->get_auth ) )
|
48 |
|
49 |
+
$key_hash = wpbdp_get_var( array( 'param' => 'access_key_hash' ), 'request' );
|
|
|
50 |
|
51 |
+
if ( wpbdp_get_option( 'enable-key-access' ) && $key_hash )
|
52 |
+
return $this->listing->validate_access_key_hash( $key_hash );
|
53 |
|
54 |
+
return false;
|
55 |
+
}
|
56 |
|
57 |
}
|
includes/helpers/class-listing-display-helper.php
CHANGED
@@ -270,10 +270,19 @@ class WPBDP_Listing_Display_Helper {
|
|
270 |
|
271 |
// Other images.
|
272 |
$listing_images = $listing->get_images( 'ids', true );
|
273 |
-
|
|
|
|
|
274 |
foreach ( $listing_images as $img_id ) {
|
275 |
// Correct size of thumbnail if needed.
|
276 |
-
_wpbdp_resize_image_if_needed(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
if ( $img_id == $thumbnail_id ) {
|
279 |
continue;
|
270 |
|
271 |
// Other images.
|
272 |
$listing_images = $listing->get_images( 'ids', true );
|
273 |
+
$def_width = wpbdp_get_option( 'thumbnail-width' );
|
274 |
+
$def_height = wpbdp_get_option( 'thumbnail-height' );
|
275 |
+
$crop = wpbdp_get_option( 'thumbnail-crop' );
|
276 |
foreach ( $listing_images as $img_id ) {
|
277 |
// Correct size of thumbnail if needed.
|
278 |
+
_wpbdp_resize_image_if_needed(
|
279 |
+
$img_id,
|
280 |
+
array(
|
281 |
+
'width' => $def_width,
|
282 |
+
'height' => $def_height,
|
283 |
+
'crop' => $crop,
|
284 |
+
)
|
285 |
+
);
|
286 |
|
287 |
if ( $img_id == $thumbnail_id ) {
|
288 |
continue;
|
includes/helpers/class-seo.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WPBDP_SEO {
|
4 |
+
|
5 |
+
public static function is_wp_seo_enabled() {
|
6 |
+
return defined( 'WPSEO_VERSION' ) ? true : false;
|
7 |
+
}
|
8 |
+
|
9 |
+
public static function listing_title( $listing_id ) {
|
10 |
+
if ( self::is_wp_seo_enabled() ) {
|
11 |
+
$wpseo_front = null;
|
12 |
+
|
13 |
+
if ( isset( $GLOBALS['wpseo_front'] ) )
|
14 |
+
$wpseo_front = $GLOBALS['wpseo_front'];
|
15 |
+
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
16 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
17 |
+
|
18 |
+
$title = $wpseo_front->get_content_title( get_post( $listing_id ) );
|
19 |
+
$title = esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) );
|
20 |
+
|
21 |
+
return $title;
|
22 |
+
}
|
23 |
+
|
24 |
+
return get_the_title( $listing_id );
|
25 |
+
}
|
26 |
+
|
27 |
+
public static function listing_og_description( $listing_id ) {
|
28 |
+
if ( self::is_wp_seo_enabled() ) {
|
29 |
+
$wpseo_front = null;
|
30 |
+
|
31 |
+
if ( isset( $GLOBALS['wpseo_front'] ) )
|
32 |
+
$wpseo_front = $GLOBALS['wpseo_front'];
|
33 |
+
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
34 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
35 |
+
|
36 |
+
global $post;
|
37 |
+
|
38 |
+
$prev_post = $post;
|
39 |
+
$post = get_post( $listing_id );
|
40 |
+
$desc = $wpseo_front->metadesc( false );
|
41 |
+
$post = $prev_post;
|
42 |
+
|
43 |
+
return $desc;
|
44 |
+
}
|
45 |
+
|
46 |
+
$listing = WPBDP_Listing::get( $listing_id );
|
47 |
+
return $listing->get_field_value( 'excerpt' );
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
includes/helpers/class-wp-taxonomy-term-list.php
CHANGED
@@ -65,7 +65,7 @@ class WPBDP__WP_Taxonomy_Term_List {
|
|
65 |
protected function element( $term, $depth ) {
|
66 |
$res = '';
|
67 |
$res .= $this->args['anidate'] ? '<li>' : '';
|
68 |
-
|
69 |
|
70 |
switch ( $this->args['input'] ) {
|
71 |
case 'checkbox':
|
@@ -89,7 +89,7 @@ class WPBDP__WP_Taxonomy_Term_List {
|
|
89 |
if ( $this->args['input'] )
|
90 |
$res .= '</label>';
|
91 |
|
92 |
-
|
93 |
|
94 |
$res .= $this->args['anidate'] ? '</li>' : '<br />';
|
95 |
|
65 |
protected function element( $term, $depth ) {
|
66 |
$res = '';
|
67 |
$res .= $this->args['anidate'] ? '<li>' : '';
|
68 |
+
$res .= $this->element_before( $term, $depth );
|
69 |
|
70 |
switch ( $this->args['input'] ) {
|
71 |
case 'checkbox':
|
89 |
if ( $this->args['input'] )
|
90 |
$res .= '</label>';
|
91 |
|
92 |
+
$res .= $this->element_after( $term, $depth );
|
93 |
|
94 |
$res .= $this->args['anidate'] ? '</li>' : '<br />';
|
95 |
|
includes/helpers/functions/general.php
ADDED
@@ -0,0 +1,1384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package WPBDP
|
4 |
+
*/
|
5 |
+
|
6 |
+
require_once WPBDP_INC . 'helpers/functions/logging.php';
|
7 |
+
require_once WPBDP_PATH . 'includes/class-listings-api.php';
|
8 |
+
require_once WPBDP_INC . 'helpers/functions/listings.php';
|
9 |
+
require_once WPBDP_PATH . 'includes/helpers/class-listing-display-helper.php';
|
10 |
+
|
11 |
+
function wpbdp_get_version() {
|
12 |
+
return WPBDP_VERSION;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Check pages that have the shortcode and are public.
|
17 |
+
* This is used in the main query to ensure that the views for the main pages are loaded.
|
18 |
+
* Allow shortcodes to be used in private pages.
|
19 |
+
*
|
20 |
+
* @since 5.14.3
|
21 |
+
*/
|
22 |
+
function _wpbdp_page_lookup_query( $page_id, $count = false ) {
|
23 |
+
global $wpdb;
|
24 |
+
|
25 |
+
static $shortcodes = array(
|
26 |
+
'main' => array( 'businessdirectory', 'business-directory', 'WPBUSDIRMANUI' ),
|
27 |
+
'add-listing' => array( 'businessdirectory-submitlisting', 'WPBUSDIRMANADDLISTING' ),
|
28 |
+
'manage-listings' => array( 'businessdirectory-managelistings', 'WPBUSDIRMANMANAGELISTING' ),
|
29 |
+
'view-listings' => array( 'businessdirectory-viewlistings', 'businessdirectory-listings', 'WPBUSDIRMANMVIEWLISTINGS' ),
|
30 |
+
);
|
31 |
+
|
32 |
+
if ( ! array_key_exists( $page_id, $shortcodes ) ) {
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( $count ) {
|
37 |
+
$query = "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'page' AND ( 1=0";
|
38 |
+
} else {
|
39 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'page' AND ( 1=0";
|
40 |
+
}
|
41 |
+
|
42 |
+
foreach ( $shortcodes[ $page_id ] as $s ) {
|
43 |
+
$query .= sprintf( " OR post_content LIKE '%%[%s]%%' ", $s );
|
44 |
+
}
|
45 |
+
$query .= ')';
|
46 |
+
|
47 |
+
return $query;
|
48 |
+
}
|
49 |
+
|
50 |
+
function wpbdp_get_page_ids( $page_id = 'main' ) {
|
51 |
+
static $request_cached = array();
|
52 |
+
|
53 |
+
if ( isset( $request_cached[ $page_id ] ) ) {
|
54 |
+
$page_ids = $request_cached[ $page_id ];
|
55 |
+
return apply_filters( 'wpbdp_get_page_ids', $page_ids, $page_id );
|
56 |
+
}
|
57 |
+
|
58 |
+
$page_ids = null;
|
59 |
+
|
60 |
+
$cached_ids = get_transient( 'wpbdp-page-ids' );
|
61 |
+
|
62 |
+
if ( is_null( $page_ids ) ) {
|
63 |
+
$page_ids = wpbdp_get_page_ids_from_cache( $cached_ids, $page_id );
|
64 |
+
|
65 |
+
if ( is_null( $page_ids ) ) {
|
66 |
+
$page_ids = wpbdp_get_page_ids_with_query( $page_id );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( is_array( $cached_ids ) ) {
|
71 |
+
$cached_ids[ $page_id ] = $page_ids;
|
72 |
+
} else {
|
73 |
+
$cached_ids = array( $page_id => $page_ids );
|
74 |
+
}
|
75 |
+
|
76 |
+
set_transient( 'wpbdp-page-ids', $cached_ids, MONTH_IN_SECONDS );
|
77 |
+
|
78 |
+
$request_cached[ $page_id ] = $page_ids;
|
79 |
+
|
80 |
+
return apply_filters( 'wpbdp_get_page_ids', $page_ids, $page_id );
|
81 |
+
}
|
82 |
+
|
83 |
+
function wpbdp_get_page_ids_from_cache( $cache, $page_id ) {
|
84 |
+
global $wpdb;
|
85 |
+
|
86 |
+
if ( ! is_array( $cache ) || empty( $cache[ $page_id ] ) ) {
|
87 |
+
return null;
|
88 |
+
}
|
89 |
+
|
90 |
+
// Validate the cached IDs.
|
91 |
+
$query = _wpbdp_page_lookup_query( $page_id, true );
|
92 |
+
$query .= ' AND ID IN ( ' . implode( ',', array_map( 'intval', $cache[ $page_id ] ) ) . ' ) ';
|
93 |
+
|
94 |
+
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
95 |
+
$count = intval( $wpdb->get_var( $query ) );
|
96 |
+
|
97 |
+
if ( $count != count( $cache[ $page_id ] ) ) {
|
98 |
+
wpbdp_debug( 'Page cache is invalid.' );
|
99 |
+
return null;
|
100 |
+
}
|
101 |
+
|
102 |
+
return $cache[ $page_id ];
|
103 |
+
}
|
104 |
+
|
105 |
+
function wpbdp_get_page_ids_with_query( $page_id ) {
|
106 |
+
global $wpdb;
|
107 |
+
|
108 |
+
// Look up for pages.
|
109 |
+
$q = _wpbdp_page_lookup_query( $page_id );
|
110 |
+
|
111 |
+
if ( ! $q ) {
|
112 |
+
return null;
|
113 |
+
}
|
114 |
+
|
115 |
+
$q .= ' ORDER BY ID ASC ';
|
116 |
+
|
117 |
+
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
118 |
+
return $wpdb->get_col( $q );
|
119 |
+
}
|
120 |
+
|
121 |
+
function wpbdp_get_page_id( $name = 'main' ) {
|
122 |
+
$page_ids = wpbdp_get_page_ids( $name );
|
123 |
+
|
124 |
+
if ( ! $page_ids ) {
|
125 |
+
$page_id = false;
|
126 |
+
} else {
|
127 |
+
$page_id = $page_ids[0];
|
128 |
+
}
|
129 |
+
|
130 |
+
return apply_filters( 'wpbdp_get_page_id', $page_id, $name );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @deprecated since 4.0. Use `wpbdp_url()` instead.
|
135 |
+
* @see wpbdp_url()
|
136 |
+
*/
|
137 |
+
function wpbdp_get_page_link( $name = 'main', $arg0 = null ) {
|
138 |
+
//_deprecated_function( __FUNCTION__, '4.0', 'wpbdp_url' );
|
139 |
+
|
140 |
+
$page_id = wpbdp_get_page_id( $name );
|
141 |
+
|
142 |
+
if ( $page_id ) {
|
143 |
+
$link = _get_page_link( $page_id );
|
144 |
+
$link = apply_filters( 'wpbdp__get_page_link', $link, $page_id, $name, $arg0 );
|
145 |
+
} else {
|
146 |
+
switch ( $name ) {
|
147 |
+
case 'view':
|
148 |
+
case 'viewlisting':
|
149 |
+
case 'show-listing':
|
150 |
+
case 'showlisting':
|
151 |
+
$link = get_permalink( intval( $arg0 ) );
|
152 |
+
break;
|
153 |
+
case 'edit':
|
154 |
+
case 'editlisting':
|
155 |
+
case 'edit-listing':
|
156 |
+
case 'delete':
|
157 |
+
case 'deletelisting':
|
158 |
+
case 'delete-listing':
|
159 |
+
break;
|
160 |
+
case 'viewlistings':
|
161 |
+
case 'view-listings':
|
162 |
+
$link = wpbdp_url( 'all_listings' );
|
163 |
+
break;
|
164 |
+
case 'add':
|
165 |
+
case 'addlisting':
|
166 |
+
case 'add-listing':
|
167 |
+
case 'submit':
|
168 |
+
case 'submitlisting':
|
169 |
+
case 'submit-listing':
|
170 |
+
$link = wpbdp_url( 'submit_listing' );
|
171 |
+
break;
|
172 |
+
case 'search':
|
173 |
+
$link = wpbdp_url( 'search' );
|
174 |
+
break;
|
175 |
+
default:
|
176 |
+
if ( ! wpbdp_get_page_id( 'main' ) ) {
|
177 |
+
return '';
|
178 |
+
}
|
179 |
+
|
180 |
+
$link = wpbdp_get_page_link( 'main' );
|
181 |
+
break;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
return apply_filters( 'wpbdp_get_page_link', $link, $name, $arg0 );
|
186 |
+
}
|
187 |
+
|
188 |
+
/* Admin API */
|
189 |
+
|
190 |
+
function wpbdp_admin() {
|
191 |
+
return wpbdp()->admin;
|
192 |
+
}
|
193 |
+
|
194 |
+
function wpbdp_admin_notices() {
|
195 |
+
global $wpbdp;
|
196 |
+
return $wpbdp->admin->admin_notices();
|
197 |
+
}
|
198 |
+
|
199 |
+
/* Settings API */
|
200 |
+
|
201 |
+
function wpbdp_settings_api() {
|
202 |
+
global $wpbdp;
|
203 |
+
return $wpbdp->settings;
|
204 |
+
}
|
205 |
+
|
206 |
+
function wpbdp_get_option( $key, $default = false ) {
|
207 |
+
$args_ = func_get_args();
|
208 |
+
if ( empty( wpbdp()->settings ) ) {
|
209 |
+
return $default;
|
210 |
+
}
|
211 |
+
return call_user_func_array( array( wpbdp()->settings, 'get_option' ), $args_ );
|
212 |
+
}
|
213 |
+
|
214 |
+
function wpbdp_set_option( $key, $value ) {
|
215 |
+
$args_ = func_get_args();
|
216 |
+
return call_user_func_array( array( wpbdp()->settings, 'set_option' ), $args_ );
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* @since 5.0
|
221 |
+
*/
|
222 |
+
function wpbdp_delete_option( $key ) {
|
223 |
+
$args_ = func_get_args();
|
224 |
+
return call_user_func_array( array( wpbdp()->settings, 'delete_option' ), $args_ );
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* @since 5.0
|
229 |
+
*/
|
230 |
+
function wpbdp_register_settings_group( $args ) {
|
231 |
+
$args_ = func_get_args();
|
232 |
+
return call_user_func_array( array( wpbdp()->settings, 'register_group' ), $args_ );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* @since 5.0
|
237 |
+
*/
|
238 |
+
function wpbdp_register_setting( $args ) {
|
239 |
+
$args_ = func_get_args();
|
240 |
+
return call_user_func_array( array( wpbdp()->settings, 'register_setting' ), $args_ );
|
241 |
+
}
|
242 |
+
|
243 |
+
/* Form Fields API */
|
244 |
+
|
245 |
+
function wpbdp_formfields_api() {
|
246 |
+
global $wpbdp;
|
247 |
+
return $wpbdp->formfields;
|
248 |
+
}
|
249 |
+
|
250 |
+
function wpbdp_get_formfield( $id ) {
|
251 |
+
if ( is_numeric( $id ) && is_string( $id ) ) {
|
252 |
+
return wpbdp_get_formfield( intval( $id ) );
|
253 |
+
}
|
254 |
+
|
255 |
+
if ( is_string( $id ) ) {
|
256 |
+
return wpbdp_formfields_api()->getFieldsByAssociation( $id, true );
|
257 |
+
}
|
258 |
+
|
259 |
+
return wpbdp_formfields_api()->get_field( $id );
|
260 |
+
}
|
261 |
+
|
262 |
+
/* Fees/Payment API */
|
263 |
+
|
264 |
+
function wpbdp_payments_possible() {
|
265 |
+
if ( ! wpbdp_get_option( 'payments-on' ) ) {
|
266 |
+
return false;
|
267 |
+
}
|
268 |
+
|
269 |
+
return wpbdp()->payment_gateways->can_pay();
|
270 |
+
}
|
271 |
+
|
272 |
+
function wpbdp_fees_api() {
|
273 |
+
return wpbdp()->fees;
|
274 |
+
}
|
275 |
+
|
276 |
+
function wpbdp_payments_api() {
|
277 |
+
return wpbdp()->payments;
|
278 |
+
}
|
279 |
+
|
280 |
+
/* Listings API */
|
281 |
+
|
282 |
+
function wpbdp_listings_api() {
|
283 |
+
return wpbdp()->listings;
|
284 |
+
}
|
285 |
+
|
286 |
+
/* Misc. */
|
287 |
+
|
288 |
+
function wpbdp_get_parent_categories( $catid ) {
|
289 |
+
$category = get_term( intval( $catid ), WPBDP_CATEGORY_TAX );
|
290 |
+
|
291 |
+
if ( $category->parent ) {
|
292 |
+
return array_merge( array( $category ), wpbdp_get_parent_categories( $category->parent ) );
|
293 |
+
}
|
294 |
+
|
295 |
+
return array( $category );
|
296 |
+
}
|
297 |
+
|
298 |
+
function wpbdp_get_parent_catids( $catid ) {
|
299 |
+
$parent_categories = wpbdp_get_parent_categories( $catid );
|
300 |
+
array_walk(
|
301 |
+
$parent_categories,
|
302 |
+
function( &$x ) {
|
303 |
+
$x = intval( $x->term_id );
|
304 |
+
}
|
305 |
+
);
|
306 |
+
|
307 |
+
return $parent_categories;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Checks if permalinks are enabled.
|
312 |
+
*
|
313 |
+
* @return boolean
|
314 |
+
* @since 2.1
|
315 |
+
*/
|
316 |
+
function wpbdp_rewrite_on() {
|
317 |
+
global $wp_rewrite;
|
318 |
+
return $wp_rewrite->permalink_structure ? true : false;
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Checks if a given user can perform some action to a listing.
|
323 |
+
*
|
324 |
+
* @param string $action the action to be checked. available actions are 'view', 'edit', 'delete' and 'upgrade-to-sticky'
|
325 |
+
* @param (object|int) $listing_id the listing ID. if null, the current post ID will be used
|
326 |
+
* @param int $user_id the user ID. if null, the current user will be used
|
327 |
+
* @return boolean
|
328 |
+
* @since 2.1
|
329 |
+
*/
|
330 |
+
function wpbdp_user_can( $action, $listing_id = null, $user_id = null ) {
|
331 |
+
$listing_id = $listing_id ? ( is_object( $listing_id ) ? $listing_id->ID : intval( $listing_id ) ) : get_the_ID();
|
332 |
+
$user_id = $user_id ? $user_id : wp_get_current_user()->ID;
|
333 |
+
$post = get_post( $listing_id );
|
334 |
+
|
335 |
+
if ( ! $post ) {
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
|
339 |
+
if ( $post->post_type != WPBDP_POST_TYPE ) {
|
340 |
+
return false;
|
341 |
+
}
|
342 |
+
|
343 |
+
if ( isset( $_GET['preview'] ) && ( $action != 'view' ) ) {
|
344 |
+
return false;
|
345 |
+
}
|
346 |
+
|
347 |
+
$res = false;
|
348 |
+
|
349 |
+
switch ( $action ) {
|
350 |
+
case 'view':
|
351 |
+
if ( isset( $_GET['preview'] ) ) {
|
352 |
+
$res = user_can( $user_id, 'edit_others_posts' ) || ( $post->post_author && $post->post_author == $user_id );
|
353 |
+
} else {
|
354 |
+
$res = true;
|
355 |
+
}
|
356 |
+
// return apply_filters( 'wpbdp_user_can_view', true, $action, $listing_id );
|
357 |
+
break;
|
358 |
+
case 'flagging':
|
359 |
+
if ( wpbdp_get_option( 'listing-flagging-register-users' ) ) {
|
360 |
+
$res = is_user_logged_in() && false === WPBDP__Listing_Flagging::user_has_flagged( $listing_id, get_current_user_id() );
|
361 |
+
} else {
|
362 |
+
$res = true;
|
363 |
+
}
|
364 |
+
|
365 |
+
break;
|
366 |
+
case 'edit':
|
367 |
+
case 'delete':
|
368 |
+
$res = user_can( $user_id, 'administrator' );
|
369 |
+
$res = $res || ( $user_id && $post->post_author && $post->post_author == $user_id );
|
370 |
+
$res = $res || ( ! $user_id && wpbdp_get_option( 'enable-key-access' ) );
|
371 |
+
break;
|
372 |
+
default:
|
373 |
+
break;
|
374 |
+
}
|
375 |
+
|
376 |
+
$res = apply_filters( 'wpbdp_user_can', $res, $action, $listing_id, $user_id );
|
377 |
+
$res = apply_filters( 'wpbdp_user_can_' . $action, $res, $listing_id, $user_id );
|
378 |
+
|
379 |
+
return $res;
|
380 |
+
}
|
381 |
+
|
382 |
+
function wpbdp_get_post_by_slug( $slug, $post_type = null ) {
|
383 |
+
$post_type = $post_type ? $post_type : WPBDP_POST_TYPE;
|
384 |
+
|
385 |
+
$posts = get_posts(
|
386 |
+
array(
|
387 |
+
'name' => $slug,
|
388 |
+
'post_type' => $post_type,
|
389 |
+
'post_status' => 'publish',
|
390 |
+
'numberposts' => 1,
|
391 |
+
'suppress_filters' => false,
|
392 |
+
)
|
393 |
+
);
|
394 |
+
|
395 |
+
if ( $posts ) {
|
396 |
+
return $posts[0];
|
397 |
+
} else {
|
398 |
+
return 0;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
function wpbdp_get_current_sort_option() {
|
403 |
+
$sort = trim( wpbdp_get_var( array( 'param' => 'wpbdp_sort' ) ) );
|
404 |
+
if ( $sort ) {
|
405 |
+
$order = substr( $sort, 0, 1 ) == '-' ? 'DESC' : 'ASC';
|
406 |
+
$sort = ltrim( $sort, '-' );
|
407 |
+
|
408 |
+
$obj = new StdClass();
|
409 |
+
$obj->option = $sort;
|
410 |
+
$obj->order = $order;
|
411 |
+
|
412 |
+
return $obj;
|
413 |
+
}
|
414 |
+
|
415 |
+
return null;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Maybe resize image.
|
420 |
+
*
|
421 |
+
* @param int $id The media attachment id.
|
422 |
+
* @param array $args Optional. Accepts an array of width and height in pixels and crop as a boolean.
|
423 |
+
*
|
424 |
+
* @since 2.1.6
|
425 |
+
* @since 5.14.3 The second parameter is added.
|
426 |
+
*/
|
427 |
+
function _wpbdp_resize_image_if_needed( $id, $args = array() ) {
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Add filter to allow user to skin image resizing.
|
431 |
+
*
|
432 |
+
* @param bool $resize Whether to resize the image or not.
|
433 |
+
* @param int $id The media attachment id.
|
434 |
+
* @param array $args Optional. An array of width and height in pixels and crop as a boolean.
|
435 |
+
*
|
436 |
+
* @since 5.14.3
|
437 |
+
*/
|
438 |
+
$resize_image = apply_filters( 'wpbdp_resize_image_if_needed', true, $id, $args );
|
439 |
+
if ( ! $resize_image ) {
|
440 |
+
return;
|
441 |
+
}
|
442 |
+
|
443 |
+
require_once ABSPATH . 'wp-admin/includes/image.php';
|
444 |
+
|
445 |
+
// Check if image should be resized.
|
446 |
+
$should_resized = _wpbdp_should_image_be_resized( $id, $args );
|
447 |
+
if ( ! $should_resized ) {
|
448 |
+
return;
|
449 |
+
}
|
450 |
+
|
451 |
+
$filename = get_attached_file( $id, true );
|
452 |
+
if ( ! $filename ) {
|
453 |
+
return;
|
454 |
+
}
|
455 |
+
|
456 |
+
$attach_data = wp_generate_attachment_metadata( $id, $filename );
|
457 |
+
$updated = wp_update_attachment_metadata( $id, $attach_data );
|
458 |
+
if ( ! $updated ) {
|
459 |
+
wpbdp_log( sprintf( 'Resize Error "%s" [ID: %d] Unable to update attachment metadata.', $filename, $id ) );
|
460 |
+
} else {
|
461 |
+
wpbdp_log( sprintf( 'Resized image "%s" [ID: %d] to match updated size constraints.', $filename, $id ) );
|
462 |
+
}
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Check if we should resize the image.
|
467 |
+
* This checks against the image dimensions and the database image settings.
|
468 |
+
* If the dimensions are the same or smaller than what is saved, we skip the resize.
|
469 |
+
*
|
470 |
+
* @param int $id The media attachment id.
|
471 |
+
* @param array $args Optional. Accepts an array of width and height in pixels and crop as a boolean.
|
472 |
+
*
|
473 |
+
* @since 5.14.3
|
474 |
+
*
|
475 |
+
* @return bool
|
476 |
+
*/
|
477 |
+
function _wpbdp_should_image_be_resized( $id, $args = array() ) {
|
478 |
+
|
479 |
+
$metadata = wp_get_attachment_metadata( $id );
|
480 |
+
|
481 |
+
if ( ! $metadata ) {
|
482 |
+
return false;
|
483 |
+
}
|
484 |
+
|
485 |
+
$def_width = absint( isset( $args['width'] ) ? $args['width'] : wpbdp_get_option( 'thumbnail-width' ) );
|
486 |
+
$width = isset( $metadata['width'] ) ? absint( $metadata['width'] ) : 0;
|
487 |
+
|
488 |
+
if ( ! $width || $width <= $def_width ) {
|
489 |
+
return false;
|
490 |
+
}
|
491 |
+
|
492 |
+
$def_height = absint( isset( $args['height'] ) ? $args['height'] : wpbdp_get_option( 'thumbnail-height' ) );
|
493 |
+
$height = isset( $metadata['height'] ) ? absint( $metadata['height'] ) : 0;
|
494 |
+
|
495 |
+
if ( ! $height || $height <= $def_height ) {
|
496 |
+
return false;
|
497 |
+
}
|
498 |
+
|
499 |
+
$thumb_info = isset( $metadata['sizes']['wpbdp-thumb'] ) ? $metadata['sizes']['wpbdp-thumb'] : false;
|
500 |
+
|
501 |
+
if ( ! $thumb_info ) {
|
502 |
+
return true;
|
503 |
+
}
|
504 |
+
|
505 |
+
$thumb_width = absint( $thumb_info['width'] );
|
506 |
+
$thumb_height = absint( $thumb_info['height'] );
|
507 |
+
|
508 |
+
// 10px of tolerance.
|
509 |
+
if ( abs( $thumb_width - $def_width ) < 10 ) {
|
510 |
+
return false;
|
511 |
+
}
|
512 |
+
|
513 |
+
$crop = isset( $args['crop'] ) ? $args['crop'] : wpbdp_get_option( 'thumbnail-crop' );
|
514 |
+
|
515 |
+
if ( $crop && abs( $thumb_height - $def_height ) < 10 ) {
|
516 |
+
return false;
|
517 |
+
}
|
518 |
+
|
519 |
+
return true;
|
520 |
+
}
|
521 |
+
|
522 |
+
/*
|
523 |
+
* @since 2.1.7
|
524 |
+
* @deprecated since 3.6.10. See {@link wpbdp_currency_format()}.
|
525 |
+
*/
|
526 |
+
function wpbdp_format_currency( $amount, $decimals = 2, $currency = null ) {
|
527 |
+
_deprecated_function( __FUNCTION__, '3.6.10', 'wpbdp_currency_format' );
|
528 |
+
|
529 |
+
if ( $amount == 0.0 ) {
|
530 |
+
return '—';
|
531 |
+
}
|
532 |
+
|
533 |
+
return ( ! $currency ? wpbdp_get_option( 'currency-symbol' ) : $currency ) . ' ' . number_format( $amount, $decimals );
|
534 |
+
}
|
535 |
+
|
536 |
+
/**
|
537 |
+
* @since 3.6.10
|
538 |
+
*/
|
539 |
+
function wpbdp_currency_format( $amount, $args = array() ) {
|
540 |
+
// We don't actually allow modification of the "format" string for now, but it could be useful in the future.
|
541 |
+
switch ( wpbdp_get_option( 'currency-symbol-position' ) ) {
|
542 |
+
case 'none':
|
543 |
+
$def_format = '[amount]';
|
544 |
+
break;
|
545 |
+
case 'right':
|
546 |
+
$def_format = '[amount] [symbol]';
|
547 |
+
break;
|
548 |
+
case 'left':
|
549 |
+
default:
|
550 |
+
$def_format = '[symbol] [amount]';
|
551 |
+
break;
|
552 |
+
}
|
553 |
+
|
554 |
+
$defaults = array(
|
555 |
+
'decimals' => 2,
|
556 |
+
'force_numeric' => false,
|
557 |
+
'currency' => wpbdp_get_option( 'currency' ),
|
558 |
+
'symbol' => wpbdp_get_option( 'currency-symbol' ),
|
559 |
+
'format' => $def_format,
|
560 |
+
);
|
561 |
+
$args = wp_parse_args( $args, $defaults );
|
562 |
+
extract( $args );
|
563 |
+
|
564 |
+
if ( ! $force_numeric && $amount == '0' ) {
|
565 |
+
return __( 'Free', 'business-directory-plugin' );
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( ! $symbol ) {
|
569 |
+
$symbol = strtoupper( $currency );
|
570 |
+
}
|
571 |
+
|
572 |
+
$number = ( 'placeholder' != $amount ? number_format_i18n( $amount, $decimals ) : '[amount]' );
|
573 |
+
$format = strtolower( $format );
|
574 |
+
|
575 |
+
if ( false === strpos( $format, '[amount]' ) ) {
|
576 |
+
$format .= ' [amount]';
|
577 |
+
}
|
578 |
+
|
579 |
+
$replacements = array(
|
580 |
+
'[currency]' => strtoupper( $currency ),
|
581 |
+
'[symbol]' => $symbol,
|
582 |
+
'[amount]' => $number,
|
583 |
+
);
|
584 |
+
|
585 |
+
return str_replace( array_keys( $replacements ), array_values( $replacements ), $format );
|
586 |
+
}
|
587 |
+
|
588 |
+
/**
|
589 |
+
* @since 5.1.9
|
590 |
+
*/
|
591 |
+
function wpbdp_date_full_format( $timestamp ) {
|
592 |
+
return date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $timestamp );
|
593 |
+
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* @since 5.1.9
|
597 |
+
*/
|
598 |
+
function wpbdp_date( $timestamp ) {
|
599 |
+
return date_i18n( get_option( 'date_format' ), $timestamp );
|
600 |
+
}
|
601 |
+
|
602 |
+
|
603 |
+
/**
|
604 |
+
* @since 3.5.3
|
605 |
+
*/
|
606 |
+
function wpbdp_get_post_by_id_or_slug( $id_or_slug = false, $try_first = 'id', $result = 'post' ) {
|
607 |
+
if ( 'slug' == $try_first ) {
|
608 |
+
$strategies = array( 'slug', 'id' );
|
609 |
+
} else {
|
610 |
+
$strategies = is_numeric( $id_or_slug ) ? array( 'id', 'slug' ) : array( 'slug' );
|
611 |
+
}
|
612 |
+
|
613 |
+
global $wpdb;
|
614 |
+
$listing_id = 0;
|
615 |
+
|
616 |
+
foreach ( $strategies as $s ) {
|
617 |
+
switch ( $s ) {
|
618 |
+
case 'id':
|
619 |
+
$listing_id = intval( $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE ID = %d AND post_type = %s", $id_or_slug, WPBDP_POST_TYPE ) ) );
|
620 |
+
break;
|
621 |
+
case 'slug':
|
622 |
+
$listing_id = intval( $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s AND post_type = %s", $id_or_slug, WPBDP_POST_TYPE ) ) );
|
623 |
+
break;
|
624 |
+
}
|
625 |
+
|
626 |
+
if ( $listing_id ) {
|
627 |
+
break;
|
628 |
+
}
|
629 |
+
}
|
630 |
+
|
631 |
+
if ( ! $listing_id ) {
|
632 |
+
return null;
|
633 |
+
}
|
634 |
+
|
635 |
+
if ( 'id' == $result ) {
|
636 |
+
return $listing_id;
|
637 |
+
}
|
638 |
+
|
639 |
+
return get_post( $listing_id );
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* @since 3.5.8
|
644 |
+
*/
|
645 |
+
function wpbdp_push_query( &$q ) {
|
646 |
+
global $wpbdp;
|
647 |
+
|
648 |
+
$wpbdp->_query_stack[] = $q;
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* @since 3.5.8
|
653 |
+
*/
|
654 |
+
function wpbdp_pop_query() {
|
655 |
+
global $wpbdp;
|
656 |
+
return array_pop( $wpbdp->_query_stack );
|
657 |
+
}
|
658 |
+
|
659 |
+
/**
|
660 |
+
* @since 3.5.8
|
661 |
+
*/
|
662 |
+
function wpbdp_current_query() {
|
663 |
+
global $wpbdp;
|
664 |
+
|
665 |
+
$len = count( $wpbdp->_query_stack );
|
666 |
+
|
667 |
+
if ( $len == 0 ) {
|
668 |
+
return null;
|
669 |
+
}
|
670 |
+
|
671 |
+
return $wpbdp->_query_stack[ $len - 1 ];
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* @since 3.6.10
|
676 |
+
*/
|
677 |
+
function wpbdp_experimental( $feature ) {
|
678 |
+
static $file_overrides = false;
|
679 |
+
global $wpbdp_development;
|
680 |
+
|
681 |
+
if ( file_exists( WPBDP_PATH . 'experimental' ) ) {
|
682 |
+
$file_overrides = explode( ',', trim( file_get_contents( WPBDP_PATH . 'experimental' ) ) );
|
683 |
+
}
|
684 |
+
|
685 |
+
$res = false;
|
686 |
+
if ( isset( $wpbdp_development ) ) {
|
687 |
+
$res = $wpbdp_development->option_get( $feature );
|
688 |
+
}
|
689 |
+
|
690 |
+
if ( $file_overrides && in_array( $feature, $file_overrides, true ) ) {
|
691 |
+
$res = true;
|
692 |
+
}
|
693 |
+
|
694 |
+
return $res;
|
695 |
+
}
|
696 |
+
|
697 |
+
/**
|
698 |
+
* @since 4.0
|
699 |
+
*/
|
700 |
+
function wpbdp_current_view_output() {
|
701 |
+
global $wpbdp;
|
702 |
+
return $wpbdp->dispatcher->current_view_output();
|
703 |
+
}
|
704 |
+
|
705 |
+
/**
|
706 |
+
* @since 4.0
|
707 |
+
*/
|
708 |
+
function wpbdp_url( $pathorview = '/', $args = array() ) {
|
709 |
+
if ( $pathorview === 'admin' ) {
|
710 |
+
// If this is an admin page, bail early to avoid extra database calls.
|
711 |
+
$url = add_query_arg( $args, admin_url( 'admin.php' ) );
|
712 |
+
return apply_filters( 'wpbdp_url', $url, $pathorview, $args );
|
713 |
+
}
|
714 |
+
|
715 |
+
$base_id = wpbdp_get_page_id( 'main' );
|
716 |
+
$base_url = _get_page_link( $base_id );
|
717 |
+
$base_url = apply_filters( 'wpbdp_url_base_url', $base_url, $base_id, $pathorview, $args );
|
718 |
+
$url = '';
|
719 |
+
|
720 |
+
switch ( $pathorview ) {
|
721 |
+
case 'submit_listing':
|
722 |
+
case 'all_listings':
|
723 |
+
case 'view_listings':
|
724 |
+
case 'manage_listings':
|
725 |
+
case 'search':
|
726 |
+
case 'login':
|
727 |
+
case 'request_access_keys':
|
728 |
+
$url = add_query_arg( 'wpbdp_view', $pathorview, $base_url );
|
729 |
+
break;
|
730 |
+
case 'flag_listing':
|
731 |
+
case 'delete_listing':
|
732 |
+
case 'edit_listing':
|
733 |
+
case 'listing_contact':
|
734 |
+
$url = add_query_arg(
|
735 |
+
array(
|
736 |
+
'wpbdp_view' => $pathorview,
|
737 |
+
'listing_id' => $args,
|
738 |
+
),
|
739 |
+
$base_url
|
740 |
+
);
|
741 |
+
break;
|
742 |
+
case 'renew_listing':
|
743 |
+
$url = add_query_arg(
|
744 |
+
array(
|
745 |
+
'wpbdp_view' => $pathorview,
|
746 |
+
'renewal_id' => $args,
|
747 |
+
),
|
748 |
+
$base_url
|
749 |
+
);
|
750 |
+
break;
|
751 |
+
case 'main':
|
752 |
+
case '/':
|
753 |
+
$url = $base_url;
|
754 |
+
break;
|
755 |
+
case 'checkout':
|
756 |
+
$url = $base_url;
|
757 |
+
$url = add_query_arg(
|
758 |
+
array(
|
759 |
+
'wpbdp_view' => 'checkout',
|
760 |
+
'payment' => $args,
|
761 |
+
),
|
762 |
+
$base_url
|
763 |
+
);
|
764 |
+
break;
|
765 |
+
default:
|
766 |
+
if ( wpbdp_starts_with( $pathorview, '/' ) ) {
|
767 |
+
$url = rtrim( wpbdp_url( '/' ), '/' ) . '/' . substr( $pathorview, 1 );
|
768 |
+
}
|
769 |
+
|
770 |
+
break;
|
771 |
+
}
|
772 |
+
|
773 |
+
$url = apply_filters( 'wpbdp_url', $url, $pathorview, $args );
|
774 |
+
return $url;
|
775 |
+
}
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Generates Ajax URL and allows plugins to alter it through a filter.
|
779 |
+
*
|
780 |
+
* @since 5.0.3
|
781 |
+
*/
|
782 |
+
function wpbdp_ajax_url() {
|
783 |
+
return apply_filters( 'wpbdp_ajax_url', admin_url( 'admin-ajax.php' ) );
|
784 |
+
}
|
785 |
+
|
786 |
+
/**
|
787 |
+
* TODO: update before themes-release
|
788 |
+
* TODO: Sometimes this functions is called from
|
789 |
+
* WPBDP_WPML_Compat->language_switcher even though no category
|
790 |
+
* is available thorugh get_queried_object(), triggering a
|
791 |
+
* "Trying to get property of non-object" notice.
|
792 |
+
*
|
793 |
+
* The is_object() if-statement that is commented out below can prevent
|
794 |
+
* the notice, but the real issue is the fact that the plugin thinks
|
795 |
+
* we are showing a category while the main query has no queried object.
|
796 |
+
*
|
797 |
+
* If the rewrite rule for a cateagry matches, but we can't retrieve
|
798 |
+
* a term from the database, we should mark the query as not-found
|
799 |
+
* from the beginning.
|
800 |
+
*/
|
801 |
+
function wpbdp_current_category_id() {
|
802 |
+
global $wp_query;
|
803 |
+
|
804 |
+
if ( empty( $wp_query->wpbdp_is_category ) ) {
|
805 |
+
return false;
|
806 |
+
}
|
807 |
+
|
808 |
+
$term = $wp_query->get_queried_object();
|
809 |
+
|
810 |
+
// if ( ! is_object( $term ) ) {
|
811 |
+
// return false;
|
812 |
+
// }
|
813 |
+
|
814 |
+
return $term->term_id;
|
815 |
+
}
|
816 |
+
|
817 |
+
/**
|
818 |
+
* @since 4.1.12
|
819 |
+
*/
|
820 |
+
function _wpbdp_current_category_id() {
|
821 |
+
$term = _wpbpd_current_category();
|
822 |
+
|
823 |
+
if ( ! $term ) {
|
824 |
+
return null;
|
825 |
+
}
|
826 |
+
|
827 |
+
return $term->term_id;
|
828 |
+
}
|
829 |
+
|
830 |
+
/**
|
831 |
+
* @since 4.1.12
|
832 |
+
*/
|
833 |
+
function _wpbpd_current_category() {
|
834 |
+
global $wp_query;
|
835 |
+
|
836 |
+
if ( $wp_query->wpbdp_is_category ) {
|
837 |
+
$term = $wp_query->get_queried_object();
|
838 |
+
} else {
|
839 |
+
$term = null;
|
840 |
+
}
|
841 |
+
|
842 |
+
if ( ! $term ) {
|
843 |
+
$category_id = get_query_var( '_' . wpbdp_get_option( 'permalinks-category-slug' ) );
|
844 |
+
|
845 |
+
if ( $category_id ) {
|
846 |
+
$term = get_term_by( 'slug', $category_id, WPBDP_CATEGORY_TAX );
|
847 |
+
}
|
848 |
+
}
|
849 |
+
|
850 |
+
if ( ! $term ) {
|
851 |
+
$category_id = get_query_var( 'category_id' );
|
852 |
+
|
853 |
+
if ( $category_id ) {
|
854 |
+
$term = get_term_by( 'id', $category_id, WPBDP_CATEGORY_TAX );
|
855 |
+
}
|
856 |
+
}
|
857 |
+
|
858 |
+
return $term;
|
859 |
+
}
|
860 |
+
|
861 |
+
function wpbdp_current_tag_id() {
|
862 |
+
global $wp_query;
|
863 |
+
|
864 |
+
if ( empty( $wp_query->wpbdp_is_tag ) ) {
|
865 |
+
return false;
|
866 |
+
}
|
867 |
+
|
868 |
+
$term = $wp_query->get_queried_object();
|
869 |
+
return $term->term_id;
|
870 |
+
}
|
871 |
+
|
872 |
+
function wpbdp_current_action() {
|
873 |
+
return wpbdp_current_view();
|
874 |
+
}
|
875 |
+
|
876 |
+
// TODO: how to implement now with CPT? (themes-release)
|
877 |
+
/**
|
878 |
+
* @SuppressWarnings(PHPMD)
|
879 |
+
*/
|
880 |
+
function wpbdp_current_listing_id() {
|
881 |
+
return 0;
|
882 |
+
}
|
883 |
+
|
884 |
+
/**
|
885 |
+
* @since 4.0
|
886 |
+
*/
|
887 |
+
function wpbdp_current_view() {
|
888 |
+
global $wpbdp;
|
889 |
+
|
890 |
+
if ( ! isset( $wpbdp->dispatcher ) || ! is_object( $wpbdp->dispatcher ) ) {
|
891 |
+
return '';
|
892 |
+
}
|
893 |
+
|
894 |
+
return $wpbdp->dispatcher->current_view();
|
895 |
+
}
|
896 |
+
|
897 |
+
/**
|
898 |
+
* @since 4.0
|
899 |
+
*/
|
900 |
+
function wpbdp_load_view( $view, $arg0 = null ) {
|
901 |
+
global $wpbdp;
|
902 |
+
return $wpbdp->dispatcher->load_view( $view, $arg0 );
|
903 |
+
}
|
904 |
+
|
905 |
+
function wpbdp_get_payment( $id ) {
|
906 |
+
return WPBDP_Payment::objects()->get( $id );
|
907 |
+
}
|
908 |
+
|
909 |
+
/**
|
910 |
+
* @since 5.0
|
911 |
+
*/
|
912 |
+
function wpbdp_get_fee_plans( $args = array() ) {
|
913 |
+
global $wpdb;
|
914 |
+
|
915 |
+
$payments_on = wpbdp_payments_possible();
|
916 |
+
$defaults = array(
|
917 |
+
'enabled' => 1,
|
918 |
+
'include_free' => ! $payments_on,
|
919 |
+
'tag' => '',
|
920 |
+
'orderby' => 'label',
|
921 |
+
'order' => 'ASC',
|
922 |
+
'categories' => array(),
|
923 |
+
'include_private' => false,
|
924 |
+
'admin_view' => false,
|
925 |
+
);
|
926 |
+
|
927 |
+
$order = wpbdp_get_option( 'fee-order' );
|
928 |
+
if ( $order ) {
|
929 |
+
$defaults['orderby'] = ( 'custom' == $order['method'] ) ? 'weight' : $order['method'];
|
930 |
+
$defaults['order'] = ( 'custom' == $order['method'] ) ? 'DESC' : $order['order'];
|
931 |
+
}
|
932 |
+
|
933 |
+
$args = wp_parse_args( $args, $defaults );
|
934 |
+
$args = apply_filters( 'wpbdp_get_fee_plans_args', $args );
|
935 |
+
|
936 |
+
$where = '1=1';
|
937 |
+
if ( 'all' !== $args['enabled'] ) {
|
938 |
+
$where .= $wpdb->prepare( ' AND p.enabled = %d ', (bool) $args['enabled'] );
|
939 |
+
}
|
940 |
+
|
941 |
+
if ( $args['tag'] ) {
|
942 |
+
$where .= $wpdb->prepare( ' AND p.tag = %s', $args['tag'] );
|
943 |
+
}
|
944 |
+
|
945 |
+
if ( ! $args['admin_view'] && $args['include_free'] ) {
|
946 |
+
$where .= $wpdb->prepare( ' AND p.amount = %d', 0 );
|
947 |
+
} elseif ( ! $args['admin_view'] && $args['tag'] !== 'free' ) {
|
948 |
+
// Exclude the default free fee for reverse compatibility.
|
949 |
+
$where .= $wpdb->prepare( ' AND p.tag != %s', 'free' );
|
950 |
+
}
|
951 |
+
|
952 |
+
$categories = $args['categories'];
|
953 |
+
if ( ! empty( $categories ) ) {
|
954 |
+
if ( ! is_array( $categories ) ) {
|
955 |
+
$categories = array( $categories );
|
956 |
+
}
|
957 |
+
|
958 |
+
$categories = array_map( 'absint', $categories );
|
959 |
+
}
|
960 |
+
|
961 |
+
$order = strtoupper( $args['order'] );
|
962 |
+
$orderby = $args['orderby'];
|
963 |
+
$query = "SELECT p.id FROM {$wpdb->prefix}wpbdp_plans p WHERE {$where} ORDER BY {$orderby} {$order}";
|
964 |
+
|
965 |
+
$plan_ids = WPBDP_Utils::check_cache(
|
966 |
+
array(
|
967 |
+
'cache_key' => json_encode( $args ),
|
968 |
+
'group' => 'wpbdp_plans',
|
969 |
+
'query' => $query,
|
970 |
+
'type' => 'get_col',
|
971 |
+
)
|
972 |
+
);
|
973 |
+
|
974 |
+
$plan_ids = apply_filters( 'wpbdp_pre_get_fee_plans', $plan_ids );
|
975 |
+
|
976 |
+
$plans = array();
|
977 |
+
foreach ( $plan_ids as $plan_id ) {
|
978 |
+
if ( $plan = wpbdp_get_fee_plan( $plan_id ) ) {
|
979 |
+
if ( $categories && ! $plan->supports_category_selection( $categories ) ) {
|
980 |
+
continue;
|
981 |
+
}
|
982 |
+
if ( ! $args['include_private'] && ! empty( $plan->extra_data['private'] ) && ! current_user_can( 'administrator' ) ) {
|
983 |
+
continue;
|
984 |
+
}
|
985 |
+
$plans[] = $plan;
|
986 |
+
}
|
987 |
+
}
|
988 |
+
|
989 |
+
$plans = apply_filters( 'wpbdp_get_fee_plans', $plans );
|
990 |
+
|
991 |
+
return $plans;
|
992 |
+
}
|
993 |
+
|
994 |
+
/**
|
995 |
+
* @since 5.0
|
996 |
+
*/
|
997 |
+
function wpbdp_get_fee_plan( $plan_id ) {
|
998 |
+
global $wpdb;
|
999 |
+
|
1000 |
+
if ( 0 === $plan_id || 'free' === $plan_id ) {
|
1001 |
+
$plan_id = absint( $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}wpbdp_plans WHERE tag = %s", 'free' ) ) );
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
$plan_id = absint( $plan_id );
|
1005 |
+
|
1006 |
+
return WPBDP__Fee_Plan::get_instance( $plan_id );
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
/**
|
1010 |
+
* @since 4.1.8
|
1011 |
+
*/
|
1012 |
+
function wpbdp_is_taxonomy() {
|
1013 |
+
$current_view = wpbdp_current_view();
|
1014 |
+
$is_taxonomy = in_array( $current_view, array( 'show_category', 'show_tag' ), true );
|
1015 |
+
|
1016 |
+
return apply_filters( 'wpbdp_is_taxonomy', $is_taxonomy, $current_view );
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
/**
|
1020 |
+
* @since 5.5.2
|
1021 |
+
*/
|
1022 |
+
function wpbdp_get_taxonomy_link( $taxonomy, $link = '' ) {
|
1023 |
+
$taxonomy_type = '';
|
1024 |
+
|
1025 |
+
switch ( $taxonomy->taxonomy ) {
|
1026 |
+
case WPBDP_CATEGORY_TAX:
|
1027 |
+
$taxonomy_type = 'category';
|
1028 |
+
break;
|
1029 |
+
case WPBDP_TAGS_TAX:
|
1030 |
+
$taxonomy_type = 'tags';
|
1031 |
+
break;
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
if ( ! $taxonomy_type ) {
|
1035 |
+
return $link;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
if ( ! wpbdp_rewrite_on() ) {
|
1039 |
+
if ( wpbdp_get_option( 'disable-cpt' ) ) {
|
1040 |
+
return wpbdp_url( '/' ) . '&_' . wpbdp_get_option( 'permalinks-' . $taxonomy_type . '-slug' ) . '=' . $taxonomy->slug;
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
return $link ? $link : get_category_link( $taxonomy->term_id );
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
return wpbdp_url( sprintf( '/%s/%s/', wpbdp_get_option( 'permalinks-' . $taxonomy_type . '-slug' ), $taxonomy->slug ) );
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
function wpbdp_render_page( $template, $vars = array(), $echo_output = false ) {
|
1050 |
+
if ( empty( $template ) ) {
|
1051 |
+
return '';
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
if ( $vars ) {
|
1055 |
+
extract( $vars );
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
ob_start();
|
1059 |
+
include $template;
|
1060 |
+
$html = ob_get_contents();
|
1061 |
+
ob_end_clean();
|
1062 |
+
|
1063 |
+
if ( $echo_output ) {
|
1064 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
1065 |
+
echo $html;
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
return $html;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
function wpbdp_locate_template( $template, $allow_override = true, $try_defaults = true ) {
|
1072 |
+
$template_file = '';
|
1073 |
+
|
1074 |
+
if ( ! is_array( $template ) ) {
|
1075 |
+
$template = array( $template );
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
if ( $allow_override ) {
|
1079 |
+
global $wpbdp;
|
1080 |
+
|
1081 |
+
$search_for = array();
|
1082 |
+
$template_file = '';
|
1083 |
+
|
1084 |
+
foreach ( $template as $t ) {
|
1085 |
+
$template_file = $wpbdp->themes->locate_template( $t );
|
1086 |
+
if ( $template_file ) {
|
1087 |
+
break;
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
// These file checks could be a little risky and get unintended results.
|
1091 |
+
if ( wpbdp_get_option( 'disable-cpt' ) ) {
|
1092 |
+
$search_for[] = $t . '.tpl.php';
|
1093 |
+
$search_for[] = $t . '.php';
|
1094 |
+
$search_for[] = 'single/' . $t . '.tpl.php';
|
1095 |
+
$search_for[] = 'single/' . $t . '.php';
|
1096 |
+
}
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
// Check for the template in the WP theme.
|
1100 |
+
if ( empty( $template_file ) ) {
|
1101 |
+
$template_file = locate_template( $search_for );
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
if ( $template_file && ! $try_defaults ) {
|
1106 |
+
_deprecated_argument( __FUNCTION__, '5.13.2', 'Defaults are always checked here. Use $wpbdp->themes->template_has_override' );
|
1107 |
+
|
1108 |
+
// Temporary reverse compatibility: The BD folder was checked when it shouldn't be. Remove it.
|
1109 |
+
if ( strpos( $template_path, WPBDP_TEMPLATES_PATH ) !== false ) {
|
1110 |
+
$template_file = '';
|
1111 |
+
}
|
1112 |
+
} elseif ( ! $allow_override ) {
|
1113 |
+
// Only get the core file if it hasn't already been checked.
|
1114 |
+
foreach ( $template as $t ) {
|
1115 |
+
$template_path = WPBDP_TEMPLATES_PATH . '/' . $t . '.tpl.php';
|
1116 |
+
|
1117 |
+
if ( file_exists( $template_path ) ) {
|
1118 |
+
$template_file = $template_path;
|
1119 |
+
break;
|
1120 |
+
}
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
return $template_file;
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
function wpbdp_render( $template, $vars = array(), $allow_override = true ) {
|
1128 |
+
$vars = wp_parse_args(
|
1129 |
+
$vars,
|
1130 |
+
array(
|
1131 |
+
'__page__' => array(
|
1132 |
+
'class' => array(),
|
1133 |
+
'content_class' => array(),
|
1134 |
+
'before_content' => '',
|
1135 |
+
),
|
1136 |
+
)
|
1137 |
+
);
|
1138 |
+
$template_name = is_array( $template ) ? $template[0] : $template;
|
1139 |
+
$vars = apply_filters( 'wpbdp_template_vars', $vars, $template_name );
|
1140 |
+
|
1141 |
+
$content = wpbdp_render_page( wpbdp_locate_template( $template, $allow_override ), $vars, false );
|
1142 |
+
$content = apply_filters( "wpbdp_render_{$template_name}", $content );
|
1143 |
+
|
1144 |
+
if ( isset( $vars['echo'] ) ) {
|
1145 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
1146 |
+
echo $content;
|
1147 |
+
}
|
1148 |
+
return $content;
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
function wpbdp_render_msg( $msg, $type = 'status', $echo = false ) {
|
1152 |
+
$msg = '<div class="wpbdp-msg ' . esc_attr( $type ) . '">' . wp_kses_post( $msg ) . '</div>';
|
1153 |
+
if ( $echo ) {
|
1154 |
+
echo $msg;
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
return $msg;
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
function _wpbdp_template_mode( $template ) {
|
1161 |
+
global $wpbdp;
|
1162 |
+
|
1163 |
+
$has_override = $wpbdp->themes->template_has_override( 'businessdirectory-' . $template ) || $wpbdp->themes->template_has_override( 'wpbusdirman-' . $template );
|
1164 |
+
if ( $has_override ) {
|
1165 |
+
return 'template';
|
1166 |
+
}
|
1167 |
+
return 'page';
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
|
1171 |
+
/**
|
1172 |
+
* Displays a single listing view taking into account all of the theme overrides.
|
1173 |
+
*
|
1174 |
+
* @param mixed $listing_id listing object or listing id to display.
|
1175 |
+
* @param string $view 'single' for single view or 'excerpt' for summary view.
|
1176 |
+
* @return string HTML output.
|
1177 |
+
*/
|
1178 |
+
function wpbdp_render_listing( $listing_id = null, $view = 'single', $echo = false ) {
|
1179 |
+
$listing_id = $listing_id ? ( is_object( $listing_id ) ? $listing_id->ID : absint( $listing_id ) ) : get_the_ID();
|
1180 |
+
|
1181 |
+
$args = array(
|
1182 |
+
'post_type' => WPBDP_POST_TYPE,
|
1183 |
+
'p' => $listing_id,
|
1184 |
+
);
|
1185 |
+
if ( ! current_user_can( 'edit_posts' ) ) {
|
1186 |
+
$args['post_status'] = 'publish';
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
$q = new WP_Query( $args );
|
1190 |
+
if ( ! $q->have_posts() ) {
|
1191 |
+
return '';
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
$q->the_post();
|
1195 |
+
|
1196 |
+
if ( 'excerpt' === $view ) {
|
1197 |
+
$html = WPBDP_Listing_Display_Helper::excerpt();
|
1198 |
+
} else {
|
1199 |
+
$html = WPBDP_Listing_Display_Helper::single();
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
if ( $echo ) {
|
1203 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
1204 |
+
echo $html;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
wp_reset_postdata();
|
1208 |
+
|
1209 |
+
return $html;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
function wpbdp_latest_listings( $n = 10, $before = '<ul>', $after = '</ul>', $before_item = '<li>', $after_item = '</li>' ) {
|
1213 |
+
$n = max( intval( $n ), 0 );
|
1214 |
+
|
1215 |
+
$posts = get_posts(
|
1216 |
+
array(
|
1217 |
+
'post_type' => WPBDP_POST_TYPE,
|
1218 |
+
'post_status' => 'publish',
|
1219 |
+
'numberposts' => $n,
|
1220 |
+
'orderby' => 'date',
|
1221 |
+
'suppress_filters' => false,
|
1222 |
+
)
|
1223 |
+
);
|
1224 |
+
|
1225 |
+
$html = '';
|
1226 |
+
|
1227 |
+
$html .= $before;
|
1228 |
+
|
1229 |
+
foreach ( $posts as $post ) {
|
1230 |
+
$html .= $before_item;
|
1231 |
+
$html .= sprintf( '<a href="%s">%s</a>', get_permalink( $post->ID ), get_the_title( $post->ID ) );
|
1232 |
+
$html .= $after_item;
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
$html .= $after;
|
1236 |
+
|
1237 |
+
return $html;
|
1238 |
+
}
|
1239 |
+
|
1240 |
+
/**
|
1241 |
+
* @since 4.0
|
1242 |
+
*/
|
1243 |
+
function wpbdp_the_listing_actions( $args = array() ) {
|
1244 |
+
echo wpbdp_listing_actions();
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
/**
|
1248 |
+
* @since 4.0
|
1249 |
+
*/
|
1250 |
+
function wpbdp_listing_actions( $args = array() ) {
|
1251 |
+
return wpbdp_render(
|
1252 |
+
'parts/listing-buttons',
|
1253 |
+
array(
|
1254 |
+
'listing_id' => get_the_ID(),
|
1255 |
+
'view' => 'excerpt',
|
1256 |
+
),
|
1257 |
+
false
|
1258 |
+
);
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
function wpbdp_sortbar_get_field_options() {
|
1262 |
+
$options = array();
|
1263 |
+
|
1264 |
+
foreach ( wpbdp_get_form_fields() as $field ) {
|
1265 |
+
if ( in_array( $field->get_field_type_id(), array( 'image', 'social-network', 'multiselect', 'checkbox', 'url' ) ) || in_array( $field->get_association(), array( 'category', 'tags', 'regions' ) ) ) {
|
1266 |
+
continue;
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
$options[ $field->get_id() ] = apply_filters( 'wpbdp_render_field_label', $field->get_label(), $field );
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
$options = apply_filters( 'wpbdp_sortbar_get_field_options', $options );
|
1273 |
+
|
1274 |
+
$options['user_login'] = _x( 'User', 'admin settings', 'business-directory-plugin' );
|
1275 |
+
$options['user_registered'] = _x( 'User registration date', 'admin settings', 'business-directory-plugin' );
|
1276 |
+
$options['date'] = _x( 'Date posted', 'admin settings', 'business-directory-plugin' );
|
1277 |
+
$options['modified'] = _x( 'Date last modified', 'admin settings', 'business-directory-plugin' );
|
1278 |
+
|
1279 |
+
return $options;
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
/**
|
1283 |
+
* Returns the admin edit link for the listing.
|
1284 |
+
*
|
1285 |
+
* @param int $listing_id the listing ID
|
1286 |
+
* @return string The admin edit link for the listing (if available).
|
1287 |
+
* @since 5.1.3
|
1288 |
+
*/
|
1289 |
+
function wpbdp_get_edit_post_link( $listing_id ) {
|
1290 |
+
if ( ! $post = get_post( $listing_id ) ) {
|
1291 |
+
return '';
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
$post_type_object = get_post_type_object( $post->post_type );
|
1295 |
+
if ( ! $post_type_object ) {
|
1296 |
+
return '';
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
if ( $post_type_object->_edit_link ) {
|
1300 |
+
$link = admin_url( sprintf( $post_type_object->_edit_link . '&action=edit', $post->ID ) );
|
1301 |
+
} else {
|
1302 |
+
$link = '';
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
return $link;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
/**
|
1309 |
+
* @since 5.1.6
|
1310 |
+
*/
|
1311 |
+
function wpbdp_get_client_ip_address() {
|
1312 |
+
$ip = '0.0.0.0';
|
1313 |
+
|
1314 |
+
$check_vars = array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' );
|
1315 |
+
|
1316 |
+
foreach ( $check_vars as $varname ) {
|
1317 |
+
$value = wpbdp_get_server_value( $varname );
|
1318 |
+
if ( $value ) {
|
1319 |
+
return $value;
|
1320 |
+
}
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
return $ip;
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
/**
|
1327 |
+
* Added as replacement for a function crated with create_function().
|
1328 |
+
*
|
1329 |
+
* @since 5.2.1
|
1330 |
+
*/
|
1331 |
+
function wpbdp_delete_page_ids_cache() {
|
1332 |
+
delete_transient( 'wpbdp-page-ids' );
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
/**
|
1336 |
+
* Echoes a link to return to previous page.
|
1337 |
+
*
|
1338 |
+
* @since 5.5.2
|
1339 |
+
*/
|
1340 |
+
function wpbdp_get_return_link() {
|
1341 |
+
$referer = ! empty( $_SERVER['HTTP_REFERER'] ) ? filter_var( wpbdp_get_server_value( 'HTTP_REFERER' ), FILTER_VALIDATE_URL ) : '';
|
1342 |
+
|
1343 |
+
if ( ! $referer ) {
|
1344 |
+
return;
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
$referer_vars = array();
|
1348 |
+
$msg = '';
|
1349 |
+
|
1350 |
+
wp_parse_str( wp_parse_url( $referer, PHP_URL_QUERY ), $referer_vars );
|
1351 |
+
|
1352 |
+
if ( $referer_vars && isset( $referer_vars['wpbdp_view'] ) ) {
|
1353 |
+
if ( 'search' === $referer_vars['wpbdp_view'] ) {
|
1354 |
+
$msg = _x( 'Return to results', 'templates', 'business-directory-plugin' );
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
if ( 'all_listings' === $referer_vars['wpbdp_view'] ) {
|
1358 |
+
$msg = __( 'Go back', 'business-directory-plugin' );
|
1359 |
+
}
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
if ( strpos( $referer, wpbdp_get_option( 'permalinks-category-slug' ) ) || strpos( $referer, wpbdp_get_option( 'permalinks-tags-slug' ) ) ) {
|
1363 |
+
$msg = __( 'Go back', 'business-directory-plugin' );
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
if ( $msg ) {
|
1367 |
+
echo '<p class="wpbdp-goback"><a href="' . esc_url( $referer ) . '" >← ' . esc_html( $msg ) . '</a></p>';
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
}
|
1371 |
+
|
1372 |
+
/**
|
1373 |
+
* @since 5.6.3
|
1374 |
+
*/
|
1375 |
+
function wpbdp_users_dropdown() {
|
1376 |
+
$users = get_users( array( 'fields' => array( 'ID', 'user_login' ) ) );
|
1377 |
+
$res = array();
|
1378 |
+
|
1379 |
+
foreach ( $users as $u ) {
|
1380 |
+
$res[ $u->ID ] = $u->user_login;
|
1381 |
+
}
|
1382 |
+
|
1383 |
+
return $res;
|
1384 |
+
}
|
includes/helpers/functions/listings.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Listing related useful functions
|
4 |
+
*
|
5 |
+
* @package BDP/Includes/Listings
|
6 |
+
*/
|
7 |
+
|
8 |
+
require_once WPBDP_PATH . 'includes/models/class-listing.php';
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @param array $args
|
12 |
+
* @param bool $error
|
13 |
+
* @param string $context
|
14 |
+
* @return null|WPBDP_Listing
|
15 |
+
*
|
16 |
+
* @since 5.0
|
17 |
+
*/
|
18 |
+
function wpbdp_save_listing( $args = array(), $error = false, $context = '' ) {
|
19 |
+
// TODO: how to support edits without rewriting everything? i.e. if $args has a listing ID but not all fields or
|
20 |
+
// values, only new values are updated leaving everything as before.
|
21 |
+
global $wpdb;
|
22 |
+
|
23 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
24 |
+
|
25 |
+
$args = apply_filters( 'wpbdp_save_listing_args', $args, $error, $context );
|
26 |
+
|
27 |
+
$listing = array();
|
28 |
+
$listing['listing_id'] = ! empty( $args['listing_id'] ) ? absint( $args['listing_id'] ) : 0;
|
29 |
+
$listing['sequence_id'] = ! empty( $args['sequence_id'] ) ? $args['sequence_id'] : '';
|
30 |
+
|
31 |
+
// Basic post info.
|
32 |
+
$listing['post_title'] = ! empty( $args['post_title'] ) ? $args['post_title'] : '';
|
33 |
+
$listing['post_content'] = ! empty( $args['post_content'] ) ? $args['post_content'] : '';
|
34 |
+
$listing['post_excerpt'] = ! empty( $args['post_excerpt'] ) ? $args['post_excerpt'] : '';
|
35 |
+
$listing['post_author'] = ( ! empty( $args['post_author'] ) ? absint( $args['post_author'] ) : ( ! empty( $args['user_id'] ) ? $args['user_id'] : 0 ) );
|
36 |
+
$listing['post_name'] = ! empty( $args['post_name'] ) ? $args['post_name'] : '';
|
37 |
+
$listing['post_status'] = ! empty( $args['post_status'] ) ? $args['post_status'] : ( $listing['listing_id'] ? wpbdp_get_option( 'edit-post-status' ) : 'pending' );
|
38 |
+
|
39 |
+
// Fields.
|
40 |
+
$listing['fields'] = ! empty( $args['fields'] ) ? $args['fields'] : array();
|
41 |
+
foreach ( array_keys( $listing['fields'] ) as $field_id ) {
|
42 |
+
$field_obj = wpbdp_get_form_field( $field_id );
|
43 |
+
|
44 |
+
if ( ! $field_obj ) {
|
45 |
+
unset( $listing['fields'][ $field_id ] );
|
46 |
+
continue;
|
47 |
+
}
|
48 |
+
|
49 |
+
$field_assoc = $field_obj->get_association();
|
50 |
+
if ( in_array( $field_assoc, array( 'title', 'excerpt', 'content' ) ) ) {
|
51 |
+
if ( empty( $listing[ 'post_' . $field_assoc ] ) ) {
|
52 |
+
$listing[ 'post_' . $field_assoc ] = $listing['fields'][ $field_id ];
|
53 |
+
}
|
54 |
+
|
55 |
+
unset( $listing['fields'][ $field_id ] );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
// Images.
|
60 |
+
$listing['images'] = ! empty( $args['images'] ) ? $args['images'] : array();
|
61 |
+
$append_images = ! empty( $args['append_images'] );
|
62 |
+
|
63 |
+
// Categories.
|
64 |
+
$listing['categories'] = ! empty( $args['categories'] ) ? $args['categories'] : array();
|
65 |
+
$append_categories = false;
|
66 |
+
|
67 |
+
// Fee plan.
|
68 |
+
$listing['plan_id'] = ! empty( $args['plan_id'] ) ? absint( $args['plan_id'] ) : 0;
|
69 |
+
|
70 |
+
// Expiration date.
|
71 |
+
$listing['expiration_date'] = '';
|
72 |
+
if ( ! empty( $args['expiration_date'] ) ) {
|
73 |
+
$listing['expiration_date'] = $args['expiration_date'];
|
74 |
+
} elseif ( ! empty( $args['expires_on'] ) ) {
|
75 |
+
$listing['expiration_date'] = $args['expires_on'];
|
76 |
+
}
|
77 |
+
|
78 |
+
// Sanitize everything.
|
79 |
+
if ( empty( $listing['post_title'] ) ) {
|
80 |
+
$listing['post_title'] = __( 'Untitled Listing', 'business-directory-plugin' );
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( ! empty( $listing['post_title'] ) && empty( $listing['post_name'] ) ) {
|
84 |
+
$listing['post_name'] = sanitize_title( trim( strip_tags( $listing['post_title'] ) ) );
|
85 |
+
|
86 |
+
// We use a faster slug algorithm for CSV imports.
|
87 |
+
if ( 'csv-import' == $context ) {
|
88 |
+
$post_name_hash = 'wpbdp-slug-' . sha1( $listing['post_name'] );
|
89 |
+
$slug_prefix = $wpdb->get_var( $wpdb->prepare( "SELECT option_value FROM {$wpdb->options} WHERE option_name = %s", $post_name_hash ) );
|
90 |
+
|
91 |
+
if ( ! is_null( $slug_prefix ) && function_exists( '_truncate_post_slug' ) ) {
|
92 |
+
$slug_prefix = intval( $slug_prefix ) + 1;
|
93 |
+
$listing['post_name'] = _truncate_post_slug( $listing['post_name'], 200 - strlen( $slug_prefix ) - 1 ) . '-' . $slug_prefix;
|
94 |
+
|
95 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->options} SET option_value = %s WHERE option_name = %s", $slug_prefix, $post_name_hash ) );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( empty( $listing['post_author'] ) ) {
|
101 |
+
$listing['post_author'] = get_current_user_id();
|
102 |
+
|
103 |
+
// TODO: maybe add this behavior again?
|
104 |
+
// if ( 0 == $post_author ) {
|
105 |
+
// Create user.
|
106 |
+
// if ( $email_field = wpbdp_get_form_fields( array( 'validators' => 'email', 'unique' => 1 ) ) ) {
|
107 |
+
// $email = $state->fields[ $email_field->get_id() ];
|
108 |
+
//
|
109 |
+
// if ( email_exists( $email ) ) {
|
110 |
+
// $post_author = get_user_by( 'email', $email );
|
111 |
+
// $post_author = $post_author->ID;
|
112 |
+
// } else {
|
113 |
+
// $post_author = wp_insert_user( array(
|
114 |
+
// 'user_login' => 'guest_' . wp_generate_password( 5, false, false ),
|
115 |
+
// 'user_email' => $email,
|
116 |
+
// 'user_pass' => wp_generate_password()
|
117 |
+
// ) );
|
118 |
+
// }
|
119 |
+
// }
|
120 |
+
// }
|
121 |
+
}
|
122 |
+
|
123 |
+
$listing = apply_filters( 'wpbpd_save_listing_data', $listing, $context );
|
124 |
+
extract( $listing );
|
125 |
+
|
126 |
+
$adding = ( empty( $listing_id ) );
|
127 |
+
$editing = ! $adding;
|
128 |
+
|
129 |
+
$post = array(
|
130 |
+
'ID' => $listing_id,
|
131 |
+
'post_author' => $post_author,
|
132 |
+
'post_content' => $post_content,
|
133 |
+
'post_title' => $post_title,
|
134 |
+
'post_excerpt' => $post_excerpt,
|
135 |
+
'post_status' => $post_status,
|
136 |
+
'post_type' => WPBDP_POST_TYPE,
|
137 |
+
'post_name' => $post_name,
|
138 |
+
);
|
139 |
+
|
140 |
+
$listing_id = wp_insert_post( $post, true );
|
141 |
+
if ( is_wp_error( $listing_id ) ) {
|
142 |
+
return $error ? $listing_id : false;
|
143 |
+
}
|
144 |
+
|
145 |
+
if ( $sequence_id ) {
|
146 |
+
update_post_meta( $listing_id, '_wpbdp[import_sequence_id]', $sequence_id );
|
147 |
+
}
|
148 |
+
|
149 |
+
$listing_obj = wpbdp_get_listing( $listing_id );
|
150 |
+
$listing_obj->set_categories( $categories );
|
151 |
+
$listing_obj->set_images( $images, $append_images );
|
152 |
+
|
153 |
+
foreach ( $fields as $field_id => $field_value ) {
|
154 |
+
$field = wpbdp_get_form_field( $field_id );
|
155 |
+
$field->store_value( $listing_id, $field_value );
|
156 |
+
}
|
157 |
+
// FIXME: fake this (for compatibility with modules) until we move everything to wpbdp_save_listing() and
|
158 |
+
// friends. See #2945.
|
159 |
+
do_action_ref_array( 'WPBDP_Listing::set_field_values', array( &$listing_obj, $fields ) ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
|
160 |
+
|
161 |
+
// Set plan for new listings.
|
162 |
+
if ( $adding || 'csv-import' === $context ) {
|
163 |
+
$plan = wpbdp_get_fee_plan( $plan_id );
|
164 |
+
|
165 |
+
if ( ! $plan ) {
|
166 |
+
$plan = wpbdp_get_fee_plan( 'free' );
|
167 |
+
}
|
168 |
+
|
169 |
+
if ( 'csv-import' === $context ) {
|
170 |
+
$payment = $listing_obj->set_fee_plan_with_payment( $plan );
|
171 |
+
} elseif ( $adding ) {
|
172 |
+
$listing_obj->set_fee_plan( $plan );
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
// Update expiration date if necessary.
|
177 |
+
$listing_obj->update_plan(
|
178 |
+
array( 'expiration_date' => $expiration_date ), array(
|
179 |
+
'clear' => false,
|
180 |
+
'recalculate' => false,
|
181 |
+
)
|
182 |
+
);
|
183 |
+
|
184 |
+
// Force GUIDs to always be <home-url>?post_type=wpbdp_listing&p=<post_id>
|
185 |
+
if ( $adding && ( ! isset( $guid ) || ! $guid ) ) {
|
186 |
+
$post_link = add_query_arg(
|
187 |
+
array(
|
188 |
+
'post_type' => WPBDP_POST_TYPE,
|
189 |
+
'p' => $listing_id,
|
190 |
+
), ''
|
191 |
+
);
|
192 |
+
$wpdb->update( $wpdb->posts, array( 'guid' => home_url( $post_link ) ), array( 'ID' => $listing_id ) );
|
193 |
+
clean_post_cache( $listing_id );
|
194 |
+
}
|
195 |
+
|
196 |
+
$listing_obj->_after_save( $adding ? 'submit-new' : 'submit-edit' );
|
197 |
+
|
198 |
+
return $listing_obj;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* @since 5.0
|
203 |
+
*/
|
204 |
+
function wpbdp_get_listing( $listing_id ) {
|
205 |
+
return WPBDP_Listing::get( $listing_id );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* @param $email
|
210 |
+
* @param int $posts_per_page
|
211 |
+
* @param int $offset
|
212 |
+
* @return array
|
213 |
+
*
|
214 |
+
* @since 5.0.6
|
215 |
+
*/
|
216 |
+
function wpbdp_get_listings_by_email( $email, $posts_per_page = -1, $offset = 0 ) {
|
217 |
+
global $wpdb;
|
218 |
+
|
219 |
+
$post_ids = array();
|
220 |
+
|
221 |
+
// Lookup by user.
|
222 |
+
if ( $user = get_user_by( 'email', $email ) ) {
|
223 |
+
$user_id = $user->ID;
|
224 |
+
$post_ids = array_merge(
|
225 |
+
$post_ids,
|
226 |
+
$wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_status != %s AND post_author = %d", WPBDP_POST_TYPE, 'auto-draft', $user_id ) )
|
227 |
+
);
|
228 |
+
}
|
229 |
+
|
230 |
+
// Lookup by e-mail field.
|
231 |
+
if ( $email_field = wpbdp_get_form_fields( 'validators=email&unique=1' ) ) {
|
232 |
+
$field_id = $email_field->get_id();
|
233 |
+
$post_ids = array_merge(
|
234 |
+
$post_ids,
|
235 |
+
$wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND LOWER(meta_value) = %s", '_wpbdp[fields][' . $field_id . ']', strtolower( $email ) ) )
|
236 |
+
);
|
237 |
+
}
|
238 |
+
|
239 |
+
// Filter everything through get_posts().
|
240 |
+
$post_ids = get_posts(
|
241 |
+
array(
|
242 |
+
'post_type' => WPBDP_POST_TYPE,
|
243 |
+
'post_status' => array( 'publish', 'draft', 'pending' ),
|
244 |
+
'posts_per_page' => $posts_per_page,
|
245 |
+
'offset' => $offset,
|
246 |
+
'post__in' => $post_ids ? $post_ids : array( -1 ),
|
247 |
+
'fields' => 'ids',
|
248 |
+
)
|
249 |
+
);
|
250 |
+
|
251 |
+
return $post_ids;
|
252 |
+
}
|
253 |
+
|
includes/helpers/functions/logging.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @since 5.0
|
5 |
+
*/
|
6 |
+
function wpbdp_insert_log( $args = array() ) {
|
7 |
+
$defaults = array(
|
8 |
+
'object_id' => 0,
|
9 |
+
'rel_object_id' => 0,
|
10 |
+
'object_type' => '',
|
11 |
+
'created_at' => current_time( 'mysql' ),
|
12 |
+
'log_type' => '',
|
13 |
+
'actor' => 'system',
|
14 |
+
'message' => '',
|
15 |
+
'data' => null
|
16 |
+
);
|
17 |
+
$args = wp_parse_args( $args, $defaults );
|
18 |
+
extract( $args );
|
19 |
+
|
20 |
+
if ( ! $object_type && false !== strstr( $log_type, '.' ) ) {
|
21 |
+
$parts = explode( '.', $log_type );
|
22 |
+
$object_type = $parts[0];
|
23 |
+
}
|
24 |
+
|
25 |
+
$object_id = absint( $object_id );
|
26 |
+
$message = trim( $message );
|
27 |
+
$data = $data ? serialize( $data ) : null;
|
28 |
+
|
29 |
+
$row = compact( 'object_type', 'object_id', 'rel_object_id', 'created_at', 'log_type', 'actor', 'message', 'data' );
|
30 |
+
|
31 |
+
if ( ! $data )
|
32 |
+
unset( $row['data'] );
|
33 |
+
|
34 |
+
global $wpdb;
|
35 |
+
if ( ! $wpdb->insert( $wpdb->prefix . 'wpbdp_logs', $row ) )
|
36 |
+
return false;
|
37 |
+
|
38 |
+
$row['id'] = absint( $wpdb->insert_id );
|
39 |
+
|
40 |
+
return (object) $row;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @since 5.0
|
46 |
+
*/
|
47 |
+
function wpbdp_delete_log( $log_id ) {
|
48 |
+
global $wpdb;
|
49 |
+
return $wpdb->delete( $wpdb->prefix . 'wpbdp_logs', array( 'id' => $log_id ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @since 5.0
|
54 |
+
*/
|
55 |
+
function wpbdp_get_log( $id ) {
|
56 |
+
$results = wpbdp_get_logs( array( 'id' => $id ) );
|
57 |
+
|
58 |
+
if ( ! $results )
|
59 |
+
return false;
|
60 |
+
|
61 |
+
return $results[0];
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @since 5.0
|
66 |
+
*/
|
67 |
+
function wpbdp_get_logs( $args = array() ) {
|
68 |
+
$defaults = array(
|
69 |
+
'limit' => 0,
|
70 |
+
'orderby' => 'created_at',
|
71 |
+
'order' => 'DESC'
|
72 |
+
);
|
73 |
+
$args = wp_parse_args( $args, $defaults );
|
74 |
+
|
75 |
+
global $wpdb;
|
76 |
+
|
77 |
+
$query = '';
|
78 |
+
$query .= "SELECT * FROM {$wpdb->prefix}wpbdp_logs WHERE 1=1";
|
79 |
+
|
80 |
+
foreach ( $args as $arg_k => $arg_v ) {
|
81 |
+
if ( in_array( $arg_k, array( 'id', 'object_id', 'object_type', 'created_at', 'log_type', 'actor' ) ) )
|
82 |
+
$query .= $wpdb->prepare( " AND {$arg_k} = %s", $arg_v );
|
83 |
+
}
|
84 |
+
|
85 |
+
$query .= " ORDER BY {$args['orderby']} {$args['order']}, id {$args['order']}";
|
86 |
+
|
87 |
+
return $wpdb->get_results( $query );
|
88 |
+
}
|
includes/helpers/functions/templates-ui.php
ADDED
@@ -0,0 +1,780 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* UI Functions to be called from templates.
|
4 |
+
*
|
5 |
+
* @package WPBDP/Templates User Interface
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Returns a list of directory categories using the configured directory settings.
|
10 |
+
* The list is actually produced by {@link wpbdp_list_categories()}.
|
11 |
+
*
|
12 |
+
* @return string HTML output.
|
13 |
+
* @uses wpbdp_list_categories().
|
14 |
+
*/
|
15 |
+
function wpbdp_directory_categories() {
|
16 |
+
$args = apply_filters(
|
17 |
+
'wpbdp_main_categories_args',
|
18 |
+
array(
|
19 |
+
'hide_empty' => wpbdp_get_option( 'hide-empty-categories' ),
|
20 |
+
'parent_only' => wpbdp_get_option( 'show-only-parent-categories' ),
|
21 |
+
)
|
22 |
+
);
|
23 |
+
|
24 |
+
$html = wpbdp_list_categories( $args );
|
25 |
+
|
26 |
+
return apply_filters( 'wpbdp_main_categories', $html );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Identical to {@link wpbdp_directory_categories()}, except the output is printed instead of returned.
|
31 |
+
*
|
32 |
+
* @uses wpbdp_directory_categories().
|
33 |
+
*/
|
34 |
+
function wpbdp_the_directory_categories() {
|
35 |
+
echo wpbdp_directory_categories();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @since 2.3
|
40 |
+
* @access private
|
41 |
+
*/
|
42 |
+
function _wpbdp_padded_count( &$term, $return = false ) {
|
43 |
+
global $wpdb;
|
44 |
+
|
45 |
+
$found = false;
|
46 |
+
$count = intval( wp_cache_get( 'term-padded-count-' . $term->term_id, 'wpbdp', false, $found ) );
|
47 |
+
|
48 |
+
if ( ! $count && ! $found ) {
|
49 |
+
|
50 |
+
$count = 0;
|
51 |
+
|
52 |
+
$tree_ids = array_merge( array( $term->term_id ), get_term_children( $term->term_id, WPBDP_CATEGORY_TAX ) );
|
53 |
+
|
54 |
+
if ( $tree_ids ) {
|
55 |
+
$format = implode( ', ', array_fill( 0, count( $tree_ids ), '%d' ) );
|
56 |
+
$tt_ids = $wpdb->get_col(
|
57 |
+
$wpdb->prepare(
|
58 |
+
"SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id IN ( $format ) AND taxonomy = %s",
|
59 |
+
array_merge( (array) $tree_ids, array( WPBDP_CATEGORY_TAX ) )
|
60 |
+
)
|
61 |
+
);
|
62 |
+
|
63 |
+
if ( $tt_ids ) {
|
64 |
+
$format = implode( ', ', array_fill( 0, count( $tt_ids ), '%d' ) );
|
65 |
+
$query = $wpdb->prepare(
|
66 |
+
"SELECT COUNT(DISTINCT r.object_id) FROM {$wpdb->term_relationships} r INNER JOIN {$wpdb->posts} p ON p.ID = r.object_id WHERE p.post_status = %s and p.post_type = %s AND term_taxonomy_id IN ( $format )",
|
67 |
+
array_merge( array( 'publish', WPBDP_POST_TYPE ), (array) $tt_ids )
|
68 |
+
);
|
69 |
+
|
70 |
+
$count = intval( $wpdb->get_var( $query ) );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
$count = apply_filters( '_wpbdp_padded_count', $count, $term );
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( $return ) {
|
78 |
+
return $count;
|
79 |
+
}
|
80 |
+
|
81 |
+
$term->count = $count;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @since 2.3
|
86 |
+
* @access private
|
87 |
+
*/
|
88 |
+
function _wpbdp_list_categories_walk( $parent, $depth, $args ) {
|
89 |
+
$terms = _wpbdp_get_terms_from_args( $args );
|
90 |
+
$terms_array = array();
|
91 |
+
$term_ids = array();
|
92 |
+
foreach ( $terms as $term ) {
|
93 |
+
$term_ids[] = $term->term_id;
|
94 |
+
$terms_array[ $term->term_id ] = $term;
|
95 |
+
}
|
96 |
+
unset( $terms );
|
97 |
+
|
98 |
+
$term_ids = apply_filters( 'wpbdp_category_terms_order', $term_ids );
|
99 |
+
|
100 |
+
$terms = array();
|
101 |
+
foreach ( $term_ids as $term_id ) {
|
102 |
+
$t = $terms_array[ $term_id ];
|
103 |
+
// 'pad_counts' doesn't work because of WP bug #15626 (see http://core.trac.wordpress.org/ticket/15626).
|
104 |
+
// we need a workaround until the bug is fixed.
|
105 |
+
_wpbdp_padded_count( $t );
|
106 |
+
|
107 |
+
$terms[] = $t;
|
108 |
+
}
|
109 |
+
|
110 |
+
// filter empty terms
|
111 |
+
if ( $args['hide_empty'] ) {
|
112 |
+
$terms = array_filter( $terms, function( $x ) {
|
113 |
+
return $x->count > 0;
|
114 |
+
} );
|
115 |
+
}
|
116 |
+
|
117 |
+
$html = '';
|
118 |
+
|
119 |
+
if ( ! $terms && $depth == 0 ) {
|
120 |
+
if ( $args['no_items_msg'] ) {
|
121 |
+
$html .= '<p>' . $args['no_items_msg'] . '</p>';
|
122 |
+
}
|
123 |
+
return $html;
|
124 |
+
}
|
125 |
+
|
126 |
+
if ( $depth > 0 ) {
|
127 |
+
$html .= str_repeat( "\t", $depth );
|
128 |
+
|
129 |
+
if ( apply_filters( 'wpbdp_categories_list_anidate_children', true ) && $terms ) {
|
130 |
+
$html .= '<ul id="cat-item-' . $args['parent'] . '-children" class="children">';
|
131 |
+
}
|
132 |
+
}
|
133 |
+
foreach ( $terms as &$term ) {
|
134 |
+
$class = apply_filters( 'wpbdp_categories_list_item_css', '', $term ) . ' ' . ( $depth > 0 ? 'subcat' : '' );
|
135 |
+
$html .= '<li class="cat-item cat-item-' . esc_attr( $term->term_id . ' ' . $class ) . '">';
|
136 |
+
|
137 |
+
$item_html = '';
|
138 |
+
$item_html .= '<a href="' . apply_filters( 'wpbdp_categories_term_link', esc_url( get_term_link( $term ) ) ) . '" ';
|
139 |
+
$item_html .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $term->description, $term ) ) ) . '" class="category-label">';
|
140 |
+
|
141 |
+
$item_html .= esc_attr( $term->name );
|
142 |
+
$item_html .= '</a>';
|
143 |
+
|
144 |
+
if ( $args['show_count'] ) {
|
145 |
+
$count_str = ' (' . intval( $term->count ) . ')';
|
146 |
+
$count_str = apply_filters( 'wpbdp_categories_item_count_str', $count_str, $term );
|
147 |
+
$item_html .= $count_str;
|
148 |
+
}
|
149 |
+
|
150 |
+
$item_html = apply_filters( 'wpbdp_categories_list_item', $item_html, $term );
|
151 |
+
$html .= $item_html;
|
152 |
+
|
153 |
+
if ( ! $args['parent_only'] ) {
|
154 |
+
$args['parent'] = $term->term_id;
|
155 |
+
if ( $subcats = _wpbdp_list_categories_walk( $term->term_id, $depth + 1, $args ) ) {
|
156 |
+
$html .= $subcats;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
$html .= '</li>';
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( $depth > 0 ) {
|
164 |
+
if ( apply_filters( 'wpbdp_categories_list_anidate_children', true ) && $terms ) {
|
165 |
+
$html .= '</ul>';
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
return $html;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Get the list of categories.
|
174 |
+
*
|
175 |
+
* @since 5.11
|
176 |
+
*/
|
177 |
+
function _wpbdp_get_terms_from_args( $args ) {
|
178 |
+
$term_args = array(
|
179 |
+
'taxonomy' => WPBDP_CATEGORY_TAX,
|
180 |
+
'orderby' => $args['orderby'],
|
181 |
+
'order' => $args['order'],
|
182 |
+
'hide_empty' => false,
|
183 |
+
'fields' => 'all',
|
184 |
+
'parent' => intval( is_object( $args['parent'] ) ? $args['parent']->term_id : $args['parent'] ),
|
185 |
+
);
|
186 |
+
|
187 |
+
if ( empty( $args['parent'] ) ) {
|
188 |
+
$term_args['pad_counts'] = true;
|
189 |
+
} else {
|
190 |
+
$term_args['parent'] = is_object( $args['parent'] ) ? $args['parent']->term_id : intval( $args['parent'] );
|
191 |
+
}
|
192 |
+
return get_terms( $term_args );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Produces a list of directory categories following some configuration settings that are overridable.
|
197 |
+
*
|
198 |
+
* The list of arguments is below:
|
199 |
+
* 'parent' (int|object) - Parent directory category or category ID.
|
200 |
+
* 'orderby' (string) default is taken from BD settings - What column to use for ordering the categories.
|
201 |
+
* 'order' (string) default is taken from BD settings - What direction to order categories.
|
202 |
+
* 'show_count' (boolean) default is taken from BD settings - Whether to show how many listings are in the category.
|
203 |
+
* 'hide_empty' (boolean) default is False - Whether to hide empty categories or not.
|
204 |
+
* 'parent_only' (boolean) default is False - Whether to show only direct childs of 'parent' or make a recursive list.
|
205 |
+
* 'echo' (boolean) default is False - If True, the list will be printed in addition to returned by this function.
|
206 |
+
* 'no_items_msg' (string) default is "No listing categories found." - Message to display when no categories are found.
|
207 |
+
*
|
208 |
+
* @param string|array $args array of arguments to be used while creating the list.
|
209 |
+
* @return string HTML output.
|
210 |
+
* @since 2.3
|
211 |
+
* @see wpbdp_directory_categories()
|
212 |
+
*/
|
213 |
+
function wpbdp_list_categories( $args = array() ) {
|
214 |
+
$args = wp_parse_args(
|
215 |
+
$args, array(
|
216 |
+
'echo' => false,
|
217 |
+
'orderby' => wpbdp_get_option( 'categories-order-by' ),
|
218 |
+
'order' => wpbdp_get_option( 'categories-sort' ),
|
219 |
+
'show_count' => wpbdp_get_option( 'show-category-post-count' ),
|
220 |
+
'hide_empty' => false,
|
221 |
+
'parent_only' => false,
|
222 |
+
'parent' => 0,
|
223 |
+
'no_items_msg' => _x( 'No listing categories found.', 'templates', 'business-directory-plugin' ),
|
224 |
+
)
|
225 |
+
);
|
226 |
+
|
227 |
+
$html = '';
|
228 |
+
|
229 |
+
$categories = _wpbdp_list_categories_walk( 0, 0, $args );
|
230 |
+
|
231 |
+
if ( $categories ) {
|
232 |
+
$attributes = apply_filters(
|
233 |
+
'wpbdp_categories_list_attributes', array(
|
234 |
+
'class' => 'wpbdp-categories cf ' . apply_filters( 'wpbdp_categories_list_css', '' ),
|
235 |
+
'data-breakpoints' => esc_attr( '{"tiny": [0,360], "small": [360,560], "medium": [560,710], "large": [710,999999]}' ),
|
236 |
+
'data-breakpoints-class-prefix' => 'wpbdp-categories',
|
237 |
+
)
|
238 |
+
);
|
239 |
+
|
240 |
+
$html .= '<ul ' . trim( wpbdp_html_attributes( $attributes ) ) . '>';
|
241 |
+
$html .= $categories;
|
242 |
+
$html .= '</ul>';
|
243 |
+
}
|
244 |
+
|
245 |
+
$html = apply_filters( 'wpbdp_categories_list', $html );
|
246 |
+
|
247 |
+
if ( $args['echo'] ) {
|
248 |
+
echo $html;
|
249 |
+
}
|
250 |
+
|
251 |
+
return $html;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* @param string|array $buttons buttons to be displayed in wpbdp_main_box()
|
256 |
+
* @return string
|
257 |
+
*/
|
258 |
+
function wpbdp_main_links( $buttons = null ) {
|
259 |
+
if ( is_string( $buttons ) ) {
|
260 |
+
if ( 'none' == $buttons ) {
|
261 |
+
$buttons = array();
|
262 |
+
} elseif ( 'all' === $buttons ) {
|
263 |
+
$buttons = array( 'directory', 'listings', 'create' );
|
264 |
+
} else {
|
265 |
+
$buttons = explode( ',', $buttons );
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( ! is_array( $buttons ) ) {
|
270 |
+
// Use defaults.
|
271 |
+
$buttons = array();
|
272 |
+
|
273 |
+
if ( wpbdp_get_option( 'show-directory-button' ) ) {
|
274 |
+
$buttons[] = 'directory';
|
275 |
+
}
|
276 |
+
|
277 |
+
if ( wpbdp_get_option( 'show-view-listings' ) ) {
|
278 |
+
$buttons[] = 'listings';
|
279 |
+
}
|
280 |
+
|
281 |
+
if ( wpbdp_get_option( 'show-submit-listing' ) ) {
|
282 |
+
$buttons[] = 'create';
|
283 |
+
}
|
284 |
+
|
285 |
+
if ( wpbdp_get_option( 'show-manage-listings' ) && is_user_logged_in() ) {
|
286 |
+
$buttons[] = 'manage';
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
$buttons = array_filter( array_unique( $buttons ) );
|
291 |
+
|
292 |
+
if ( ! $buttons ) {
|
293 |
+
return '';
|
294 |
+
}
|
295 |
+
|
296 |
+
if ( wpbdp_get_option( 'disable-submit-listing' ) ) {
|
297 |
+
$buttons = array_diff( $buttons, array( 'create' ) );
|
298 |
+
}
|
299 |
+
|
300 |
+
$html = array();
|
301 |
+
$current_page = ( is_ssl() ? 'https://' : 'http://' ) . wpbdp_get_server_value( 'HTTP_HOST' ) . wpbdp_get_server_value( 'REQUEST_URI' );
|
302 |
+
|
303 |
+
if ( in_array( 'directory', $buttons ) ) {
|
304 |
+
$link = wpbdp_url( '/' );
|
305 |
+
if ( $current_page !== $link ) {
|
306 |
+
$html[] = '<a href="' . esc_url( $link ) .'" id="wpbdp-bar-show-directory-button" class="button wpbdp-button">' .
|
307 |
+
esc_html__( 'Directory', 'business-directory-plugin' ) .
|
308 |
+
'</a>';
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( in_array( 'listings', $buttons ) ) {
|
313 |
+
$link = wpbdp_url( 'all_listings' );
|
314 |
+
if ( $current_page !== $link ) {
|
315 |
+
$html[] = '<a href="' . esc_url( $link ) .'" id="wpbdp-bar-view-listings-button" class="button wpbdp-button">' .
|
316 |
+
esc_html__( 'View All Listings', 'business-directory-plugin' ) .
|
317 |
+
'</a>';
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
if ( in_array( 'manage', $buttons ) ) {
|
322 |
+
$html[] = '<a href="' . esc_url( wpbdp_url( 'manage_listings' ) ) .'" id="wpbdp-bar-manage-listing-button" class="button wpbdp-button">' .
|
323 |
+
esc_html__( 'Manage Listings', 'business-directory-plugin' ) .
|
324 |
+
'</a>';
|
325 |
+
}
|
326 |
+
|
327 |
+
if ( in_array( 'create', $buttons ) ) {
|
328 |
+
$html[] = '<a href="' . esc_url( wpbdp_url( 'submit_listing' ) ) .'" id="wpbdp-bar-submit-listing-button" class="button wpbdp-button">' .
|
329 |
+
esc_html__( 'Add Listing', 'business-directory-plugin' ) .
|
330 |
+
'</a>';
|
331 |
+
}
|
332 |
+
|
333 |
+
if ( empty( $html ) ) {
|
334 |
+
return '';
|
335 |
+
}
|
336 |
+
|
337 |
+
$buttons_count = count( $html );
|
338 |
+
$html = implode( ' ', $html );
|
339 |
+
|
340 |
+
$content = '<div class="wpbdp-main-links-container" data-breakpoints=\'{"tiny": [0,360], "small": [360,560], "medium": [560,710], "large": [710,999999]}\' data-breakpoints-class-prefix="wpbdp-main-links">';
|
341 |
+
$content .= '<div class="wpbdp-main-links wpbdp-main-links-' . $buttons_count . '-buttons">' . apply_filters( 'wpbdp_main_links', $html ) . '</div>';
|
342 |
+
$content .= '</div>';
|
343 |
+
|
344 |
+
return $content;
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
function wpbdp_the_main_links( $buttons = null ) {
|
349 |
+
echo wpbdp_main_links( $buttons );
|
350 |
+
}
|
351 |
+
|
352 |
+
function wpbdp_search_form() {
|
353 |
+
$html = '';
|
354 |
+
$html .= sprintf(
|
355 |
+
'<form id="wpbdmsearchform" action="%s" method="GET" class="wpbdp-search-form">',
|
356 |
+
wpbdp_url( 'search' )
|
357 |
+
);
|
358 |
+
$html .= '<input type="hidden" name="wpbdp_view" value="search" />';
|
359 |
+
|
360 |
+
if ( ! wpbdp_rewrite_on() ) {
|
361 |
+
$html .= sprintf( '<input type="hidden" name="page_id" value="%d" />', wpbdp_get_page_id( 'main' ) );
|
362 |
+
}
|
363 |
+
|
364 |
+
$html .= '<label for="wpbdp-keyword-field" style="display:none;">Keywords:</label>';
|
365 |
+
$html .= '<input type="hidden" name="dosrch" value="1" />';
|
366 |
+
$html .= '<input id="intextbox" maxlength="150" name="q" size="20" type="text" value="" />';
|
367 |
+
$html .= sprintf(
|
368 |
+
'<input id="wpbdmsearchsubmit" class="submit wpbdp-button wpbdp-submit" type="submit" value="%s" />',
|
369 |
+
esc_attr__( 'Search Listings', 'business-directory-plugin' )
|
370 |
+
);
|
371 |
+
$html .= sprintf(
|
372 |
+
'<a href="%s" class="advanced-search-link">%s</a>',
|
373 |
+
esc_url( wpbdp_url( 'search' ) ),
|
374 |
+
_x( 'Advanced Search', 'templates', 'business-directory-plugin' )
|
375 |
+
);
|
376 |
+
$html .= '</form>';
|
377 |
+
|
378 |
+
return $html;
|
379 |
+
}
|
380 |
+
|
381 |
+
function wpbdp_the_search_form() {
|
382 |
+
if ( wpbdp_get_option( 'show-search-listings' ) ) {
|
383 |
+
echo wpbdp_search_form();
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
function wpbdp_the_listing_excerpt() {
|
388 |
+
echo wpbdp_render_listing( null, 'excerpt' );
|
389 |
+
}
|
390 |
+
|
391 |
+
function wpbdp_listing_sort_options( $filters = array( 'wpbdp_listing_sort_options', 'wpbdp_listing_sort_options_html' ) ) {
|
392 |
+
$show_sort = wpbdp_get_option( 'listings-sortbar-enabled' );
|
393 |
+
$sort_options = $show_sort ? wpbdp_maybe_apply_filter( 'wpbdp_listing_sort_options', $filters, array() ) : array();
|
394 |
+
|
395 |
+
$html = '';
|
396 |
+
|
397 |
+
if ( $sort_options ) {
|
398 |
+
$sorting = wpbdp_get_listing_sort_links( $sort_options );
|
399 |
+
|
400 |
+
$html .= '<div class="wpbdp-listings-sort-options">';
|
401 |
+
$html .= '<label for="wpbdp-sort-bar">' . esc_html_x( 'Sort By:', 'templates sort', 'business-directory-plugin' ) . '</label>';
|
402 |
+
$html .= '<select id="wpbdp-sort-bar" class="">';
|
403 |
+
$html .= implode( ' ', $sorting );
|
404 |
+
$html .= '</select>';
|
405 |
+
$html .= '</div>';
|
406 |
+
}
|
407 |
+
|
408 |
+
return wpbdp_maybe_apply_filter( 'wpbdp_listing_sort_options_html', $filters, $html );
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* @since v5.9
|
413 |
+
*/
|
414 |
+
function wpbdp_maybe_apply_filter( $filter, $filters, $value ) {
|
415 |
+
return in_array( $filter, $filters ) ? apply_filters( $filter, $value ) : $value;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Get links to include in the sorting options.
|
420 |
+
*
|
421 |
+
* @since v5.9
|
422 |
+
*/
|
423 |
+
function wpbdp_get_listing_sort_links( $sort_options ) {
|
424 |
+
$current_sort = wpbdp_get_current_sort_option();
|
425 |
+
|
426 |
+
$links = array();
|
427 |
+
|
428 |
+
$links['reset'] = sprintf(
|
429 |
+
'<option value="%s" class="header-option">%s</option>',
|
430 |
+
esc_url( remove_query_arg( 'wpbdp_sort' ) ),
|
431 |
+
esc_html__( 'Default', 'business-directory-plugin' )
|
432 |
+
);
|
433 |
+
|
434 |
+
$arrows = array(
|
435 |
+
'ASC' => '↓ ',
|
436 |
+
'DESC' => '↑ ',
|
437 |
+
);
|
438 |
+
|
439 |
+
foreach ( $sort_options as $id => $option ) {
|
440 |
+
$default_order = isset( $option[2] ) && ! empty( $option[2] ) ? strtoupper( $option[2] ) : 'ASC';
|
441 |
+
|
442 |
+
$dir = $default_order === 'ASC' ? '' : '-';
|
443 |
+
$arrow = '';
|
444 |
+
|
445 |
+
if ( $current_sort && $current_sort->option == $id ) {
|
446 |
+
$sort_dir = $current_sort->order === 'ASC' ? 'ASC' : 'DESC';
|
447 |
+
$dir = $sort_dir === 'ASC' ? '-' : '';
|
448 |
+
$arrow = $arrows[ $sort_dir ];
|
449 |
+
|
450 |
+
$links[ $id . '-s' ] = sprintf(
|
451 |
+
'<option value="%s" selected="selected">%s</option>',
|
452 |
+
esc_url( add_query_arg( 'wpbdp_sort', $dir . $id ) ),
|
453 |
+
esc_html( $arrow . $option[0] )
|
454 |
+
);
|
455 |
+
|
456 |
+
// Swap and include option for other direction.
|
457 |
+
$sort_dir = $sort_dir === 'ASC' ? 'DESC' : 'ASC';
|
458 |
+
$dir = $sort_dir === 'ASC' ? '' : '-';
|
459 |
+
$arrow = $arrows[ $sort_dir ];
|
460 |
+
}
|
461 |
+
|
462 |
+
$links[ $id ] = sprintf(
|
463 |
+
'<option value="%s">%s</option>',
|
464 |
+
esc_url( add_query_arg( 'wpbdp_sort', $dir . $id ) ),
|
465 |
+
esc_html( $arrow . $option[0] )
|
466 |
+
);
|
467 |
+
}
|
468 |
+
|
469 |
+
return $links;
|
470 |
+
}
|
471 |
+
|
472 |
+
function wpbdp_the_listing_sort_options() {
|
473 |
+
echo wpbdp_listing_sort_options();
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* @deprecated since 2.2.1
|
478 |
+
*/
|
479 |
+
function wpbdp_bar( $parts = array() ) {
|
480 |
+
_deprecated_function( __FUNCTION__, '2.2.1' );
|
481 |
+
|
482 |
+
$parts = wp_parse_args(
|
483 |
+
$parts, array(
|
484 |
+
'links' => true,
|
485 |
+
'search' => false,
|
486 |
+
)
|
487 |
+
);
|
488 |
+
|
489 |
+
$html = '<div class="wpbdp-bar cf">';
|
490 |
+
$html .= apply_filters( 'wpbdp_bar_before', '', $parts );
|
491 |
+
|
492 |
+
if ( $parts['links'] ) {
|
493 |
+
$html .= wpbdp_main_links();
|
494 |
+
}
|
495 |
+
if ( $parts['search'] ) {
|
496 |
+
$html .= wpbdp_search_form();
|
497 |
+
}
|
498 |
+
|
499 |
+
$html .= apply_filters( 'wpbdp_bar_after', '', $parts );
|
500 |
+
$html .= '</div>';
|
501 |
+
|
502 |
+
return $html;
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* @deprecated since 2.2.1
|
507 |
+
*/
|
508 |
+
function wpbdp_the_bar( $parts = array() ) {
|
509 |
+
_deprecated_function( __FUNCTION__, '2.2.1' );
|
510 |
+
echo wpbdp_bar( $parts );
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Displays the listing main image.
|
515 |
+
*
|
516 |
+
* @since 2.3
|
517 |
+
*/
|
518 |
+
function wpbdp_listing_thumbnail( $listing_id = null, $args = array(), $display = '' ) {
|
519 |
+
if ( ! $listing_id ) {
|
520 |
+
$listing_id = apply_filters( 'wpbdp_listing_images_listing_id', get_the_ID() );
|
521 |
+
}
|
522 |
+
|
523 |
+
$listing = WPBDP_Listing::get( $listing_id );
|
524 |
+
|
525 |
+
$main_image = $listing->get_thumbnail();
|
526 |
+
|
527 |
+
if ( $main_image ) {
|
528 |
+
$thumbnail_id = $main_image->ID;
|
529 |
+
} else {
|
530 |
+
$thumbnail_id = 0;
|
531 |
+
}
|
532 |
+
|
533 |
+
$defaults = array(
|
534 |
+
'link' => 'picture',
|
535 |
+
'class' => '',
|
536 |
+
'echo' => false,
|
537 |
+
);
|
538 |
+
if ( is_array( $args ) ) {
|
539 |
+
$args = array_merge( $defaults, $args );
|
540 |
+
} else {
|
541 |
+
// For reverse compatibility.
|
542 |
+
$args = wp_parse_args( $args, $defaults );
|
543 |
+
}
|
544 |
+
|
545 |
+
$image_img = '';
|
546 |
+
$image_link = '';
|
547 |
+
$image_title = '';
|
548 |
+
$listing_link_in_new_tab = '';
|
549 |
+
$image_classes = 'wpbdp-thumbnail attachment-wpbdp-thumb ' . $args['class'];
|
550 |
+
|
551 |
+
if ( $main_image ) {
|
552 |
+
$image_title = get_post_meta( $main_image->ID, '_wpbdp_image_caption', true );
|
553 |
+
_wpbdp_resize_image_if_needed( $main_image->ID );
|
554 |
+
|
555 |
+
$image_size = wpbdp_get_option( 'listing-main-image-default-size', 'wpbdp-thumb' );
|
556 |
+
$image_img = wp_get_attachment_image(
|
557 |
+
$main_image->ID,
|
558 |
+
'uploaded' !== $image_size ? $image_size : '',
|
559 |
+
false,
|
560 |
+
array(
|
561 |
+
'alt' => $image_title ? $image_title : get_the_title( $listing_id ),
|
562 |
+
'title' => $image_title ? $image_title : get_the_title( $listing_id ),
|
563 |
+
'class' => $image_classes,
|
564 |
+
)
|
565 |
+
);
|
566 |
+
|
567 |
+
if ( $args['link'] == 'picture' ) {
|
568 |
+
$full_image_data = wp_get_attachment_image_src( $main_image->ID, 'wpbdp-large' );
|
569 |
+
$image_link = $full_image_data[0];
|
570 |
+
}
|
571 |
+
} elseif ( has_post_thumbnail( $listing_id ) ) {
|
572 |
+
$caption = get_post_meta( get_post_thumbnail_id( $listing_id ), '_wpbdp_image_caption', true );
|
573 |
+
$image_img = get_the_post_thumbnail(
|
574 |
+
$listing_id,
|
575 |
+
'wpbdp-thumb',
|
576 |
+
array(
|
577 |
+
'alt' => $caption ? $caption : get_the_title( $listing_id ),
|
578 |
+
'title' => $caption ? $caption : get_the_title( $listing_id ),
|
579 |
+
)
|
580 |
+
);
|
581 |
+
} elseif ( isset( $args['coming_soon'] ) ) {
|
582 |
+
$use_default_img = (array) wpbdp_get_option( 'use-default-picture', array() );
|
583 |
+
if ( ! empty( $use_default_img ) && in_array( $display, $use_default_img ) ) {
|
584 |
+
|
585 |
+
$image_src = $args['coming_soon'];
|
586 |
+
$image_img = sprintf(
|
587 |
+
'<img src="%s" alt="%s" title="%s" border="0" width="%d" class="%s" />',
|
588 |
+
esc_url( $image_src ),
|
589 |
+
esc_attr( get_the_title( $listing_id ) ),
|
590 |
+
esc_attr( get_the_title( $listing_id ) ),
|
591 |
+
esc_attr( wpbdp_get_option( 'thumbnail-width' ) ),
|
592 |
+
esc_attr( $image_classes )
|
593 |
+
);
|
594 |
+
$image_link = $args['link'] == 'picture' ? $image_src : '';
|
595 |
+
}
|
596 |
+
}
|
597 |
+
|
598 |
+
if ( ! $image_link && $args['link'] == 'listing' ) {
|
599 |
+
$image_link = get_permalink( $listing_id );
|
600 |
+
$listing_link_in_new_tab = wpbdp_get_option( 'listing-link-in-new-tab' ) ? '_blank' : '_self';
|
601 |
+
}
|
602 |
+
|
603 |
+
$args['image_img'] = $image_img;
|
604 |
+
$args['image_link'] = $image_link;
|
605 |
+
$args['listing_id'] = $listing_id;
|
606 |
+
$args['image_title'] = $image_title;
|
607 |
+
$args['listing_link_in_new_tab'] = $listing_link_in_new_tab;
|
608 |
+
|
609 |
+
$image_html = wpbdp_thumbnail_html( $args );
|
610 |
+
|
611 |
+
/**
|
612 |
+
* @since v5.9
|
613 |
+
*/
|
614 |
+
return apply_filters( 'wpbdp_thumbnail_html', $image_html, $args );
|
615 |
+
}
|
616 |
+
|
617 |
+
/**
|
618 |
+
* Get the html for a listing thumbnail image.
|
619 |
+
*
|
620 |
+
* @since v5.9
|
621 |
+
*/
|
622 |
+
function wpbdp_thumbnail_html( $args ) {
|
623 |
+
$image_img = $args['image_img'];
|
624 |
+
$image_link = $args['image_link'];
|
625 |
+
|
626 |
+
if ( ! $image_img ) {
|
627 |
+
return '';
|
628 |
+
}
|
629 |
+
|
630 |
+
if ( ! $image_link ) {
|
631 |
+
return $image_img;
|
632 |
+
}
|
633 |
+
|
634 |
+
$image_link = apply_filters( 'wpbdp_listing_thumbnail_link', $image_link, $args['listing_id'], $args );
|
635 |
+
|
636 |
+
if ( ! $image_link ) {
|
637 |
+
return sprintf(
|
638 |
+
'<div class="listing-thumbnail">%s</div>',
|
639 |
+
$image_img
|
640 |
+
);
|
641 |
+
}
|
642 |
+
|
643 |
+
if ( $args['link'] === 'picture' ) {
|
644 |
+
$extra = 'data-lightbox="wpbdpgal" rel="wpbdpgal"';
|
645 |
+
} elseif ( $args['listing_link_in_new_tab'] === '_blank' ) {
|
646 |
+
$extra = 'rel="noopener noreferrer"';
|
647 |
+
} else {
|
648 |
+
$extra = '';
|
649 |
+
}
|
650 |
+
|
651 |
+
return sprintf(
|
652 |
+
'<div class="listing-thumbnail"><a href="%s" target="%s" class="%s" title="%s" %s>%s</a></div>',
|
653 |
+
esc_url( $image_link ),
|
654 |
+
esc_attr( $args['listing_link_in_new_tab'] ),
|
655 |
+
esc_attr( $args['link'] == 'picture' ? 'thickbox' : '' ),
|
656 |
+
esc_attr( $args['image_title'] ),
|
657 |
+
$extra,
|
658 |
+
$image_img
|
659 |
+
);
|
660 |
+
}
|
661 |
+
|
662 |
+
class WPBDP_ListingFieldDisplayItem {
|
663 |
+
private $listing_id = 0;
|
664 |
+
private $display = '';
|
665 |
+
|
666 |
+
private $html_ = '';
|
667 |
+
private $html_value_ = '';
|
668 |
+
private $value_ = null;
|
669 |
+
|
670 |
+
public $id = 0;
|
671 |
+
public $field;
|
672 |
+
|
673 |
+
public function __construct( &$field, $listing_id, $display ) {
|
674 |
+
$this->field = $field;
|
675 |
+
$this->id = $this->field->get_id();
|
676 |
+
$this->listing_id = $listing_id;
|
677 |
+
$this->display = $display;
|
678 |
+
}
|
679 |
+
|
680 |
+
public function __get( $key ) {
|
681 |
+
switch ( $key ) {
|
682 |
+
case 'html':
|
683 |
+
if ( $this->html_ ) {
|
684 |
+
return $this->html_;
|
685 |
+
}
|
686 |
+
|
687 |
+
$this->html_ = $this->field->display( $this->listing_id, $this->display );
|
688 |
+
return $this->html_;
|
689 |
+
break;
|
690 |
+
|
691 |
+
case 'html_value':
|
692 |
+
if ( $this->html_value_ ) {
|
693 |
+
return $this->html_value_;
|
694 |
+
}
|
695 |
+
|
696 |
+
$this->html_value_ = $this->field->html_value( $this->listing_id );
|
697 |
+
return $this->html_value_;
|
698 |
+
break;
|
699 |
+
|
700 |
+
case 'value':
|
701 |
+
if ( $this->value_ ) {
|
702 |
+
return $this->value_;
|
703 |
+
}
|
704 |
+
|
705 |
+
$this->value_ = $this->field->value( $this->listing_id );
|
706 |
+
return $this->value_;
|
707 |
+
break;
|
708 |
+
|
709 |
+
default:
|
710 |
+
break;
|
711 |
+
}
|
712 |
+
}
|
713 |
+
|
714 |
+
public static function prepare_set( $listing_id, $display ) {
|
715 |
+
$res = (object) array(
|
716 |
+
'fields' => array(),
|
717 |
+
'social' => array(),
|
718 |
+
);
|
719 |
+
|
720 |
+
$form_fields = wpbdp_get_form_fields();
|
721 |
+
$form_fields = apply_filters_ref_array( 'wpbdp_render_listing_fields', array( &$form_fields, $listing_id ) );
|
722 |
+
|
723 |
+
foreach ( $form_fields as &$f ) {
|
724 |
+
if ( ! $f->display_in( $display ) ) {
|
725 |
+
continue;
|
726 |
+
}
|
727 |
+
|
728 |
+
if ( $f->display_in( 'social' ) ) {
|
729 |
+
$res->social[ $f->get_id() ] = new self( $f, $listing_id, 'social' );
|
730 |
+
} else {
|
731 |
+
$res->fields[ $f->get_id() ] = new self( $f, $listing_id, $display );
|
732 |
+
}
|
733 |
+
}
|
734 |
+
|
735 |
+
return $res;
|
736 |
+
}
|
737 |
+
|
738 |
+
public static function walk_set( $prop, $fields = array() ) {
|
739 |
+
$res = array();
|
740 |
+
|
741 |
+
foreach ( $fields as $k => &$f ) {
|
742 |
+
$res[ $k ] = $f->{$prop};
|
743 |
+
}
|
744 |
+
|
745 |
+
return $res;
|
746 |
+
}
|
747 |
+
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* @since 5.0
|
751 |
+
*/
|
752 |
+
function wpbdp_the_main_box( $args = array() ) {
|
753 |
+
echo wpbdp_main_box( $args = array() );
|
754 |
+
}
|
755 |
+
|
756 |
+
/**
|
757 |
+
* @since 5.0
|
758 |
+
*/
|
759 |
+
function wpbdp_main_box( $args = null ) {
|
760 |
+
$defaults = array(
|
761 |
+
'buttons' => null,
|
762 |
+
'in_shortcode' => false,
|
763 |
+
);
|
764 |
+
$args = wp_parse_args( $args, $defaults );
|
765 |
+
|
766 |
+
$extra_fields = wpbdp_capture_action( 'wpbdp_main_box_extra_fields' );
|
767 |
+
$hidden_fields = wpbdp_capture_action( 'wpbdp_main_box_hidden_fields' );
|
768 |
+
$search_url = wpbdp_url( 'search' );
|
769 |
+
$no_cols = 1;
|
770 |
+
|
771 |
+
if ( $extra_fields ) {
|
772 |
+
$no_cols = 2;
|
773 |
+
}
|
774 |
+
|
775 |
+
$template_vars = compact( 'hidden_fields', 'extra_fields', 'search_url', 'no_cols' );
|
776 |
+
$template_vars = array_merge( $template_vars, $args );
|
777 |
+
|
778 |
+
$html = wpbdp_x_render( apply_filters( 'wpbdp_main_box_template_name', 'main-box' ), $template_vars );
|
779 |
+
return $html;
|
780 |
+
}
|
includes/helpers/listing_flagging.php
CHANGED
@@ -69,7 +69,7 @@ class WPBDP__Listing_Flagging {
|
|
69 |
|
70 |
$data = array_merge( $defaults, $data );
|
71 |
|
72 |
-
|
73 |
return new WP_Error( 'missing_data', _x( 'User ID or IP address is required to save a report', 'flag listing', 'business-directory-plugin' ) );
|
74 |
}
|
75 |
|
@@ -85,9 +85,9 @@ class WPBDP__Listing_Flagging {
|
|
85 |
}
|
86 |
}
|
87 |
|
88 |
-
if ( ! isset( $data[
|
89 |
-
|
90 |
-
|
91 |
|
92 |
$flagging_data = self::get_flagging_meta( $listing_id );
|
93 |
$flagging_data[] = $data;
|
69 |
|
70 |
$data = array_merge( $defaults, $data );
|
71 |
|
72 |
+
if ( ! $data['user_id'] && ! $data['ip'] ) {
|
73 |
return new WP_Error( 'missing_data', _x( 'User ID or IP address is required to save a report', 'flag listing', 'business-directory-plugin' ) );
|
74 |
}
|
75 |
|
85 |
}
|
86 |
}
|
87 |
|
88 |
+
if ( ! isset( $data['date'] ) ) {
|
89 |
+
$data['date'] = time();
|
90 |
+
}
|
91 |
|
92 |
$flagging_data = self::get_flagging_meta( $listing_id );
|
93 |
$flagging_data[] = $data;
|
includes/installer.php
CHANGED
@@ -58,13 +58,17 @@ class WPBDP_Installer {
|
|
58 |
add_option( 'wpbdp-show-tracking-pointer', 1 );
|
59 |
|
60 |
// Create default paid fee.
|
61 |
-
$fee = new WPBDP__Fee_Plan(
|
|
|
|
|
62 |
'amount' => 1.0,
|
63 |
'days' => 365,
|
64 |
'images' => 1,
|
65 |
'supported_categories' => 'all',
|
66 |
'pricing_model' => 'flat',
|
67 |
-
'enabled' => 1
|
|
|
|
|
68 |
$fee->save();
|
69 |
} else {
|
70 |
throw new Exception( "Table {$wpdb->prefix}wpbdp_form_fields was not created!" );
|
@@ -76,6 +80,7 @@ class WPBDP_Installer {
|
|
76 |
/**
|
77 |
* Builds the SQL queries (without running them) used to create all of the required database tables for BD.
|
78 |
* Calls the `wpbdp_database_schema` filter that allows plugins to modify the schema.
|
|
|
79 |
* @return array An associative array of (non prefixed)table => SQL items.
|
80 |
* @since 3.3
|
81 |
*/
|
@@ -292,9 +297,11 @@ class WPBDP_Installer {
|
|
292 |
continue;
|
293 |
}
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
|
|
|
|
|
298 |
|
299 |
if ( version_compare( $version, $current_version, '<=' ) )
|
300 |
continue;
|
58 |
add_option( 'wpbdp-show-tracking-pointer', 1 );
|
59 |
|
60 |
// Create default paid fee.
|
61 |
+
$fee = new WPBDP__Fee_Plan(
|
62 |
+
array(
|
63 |
+
'label' => _x( 'Default Fee', 'installer', 'business-directory-plugin' ),
|
64 |
'amount' => 1.0,
|
65 |
'days' => 365,
|
66 |
'images' => 1,
|
67 |
'supported_categories' => 'all',
|
68 |
'pricing_model' => 'flat',
|
69 |
+
'enabled' => 1,
|
70 |
+
)
|
71 |
+
);
|
72 |
$fee->save();
|
73 |
} else {
|
74 |
throw new Exception( "Table {$wpdb->prefix}wpbdp_form_fields was not created!" );
|
80 |
/**
|
81 |
* Builds the SQL queries (without running them) used to create all of the required database tables for BD.
|
82 |
* Calls the `wpbdp_database_schema` filter that allows plugins to modify the schema.
|
83 |
+
*
|
84 |
* @return array An associative array of (non prefixed)table => SQL items.
|
85 |
* @since 3.3
|
86 |
*/
|
297 |
continue;
|
298 |
}
|
299 |
|
300 |
+
$version = str_replace(
|
301 |
+
array( 'migration-', '.php', '_' ),
|
302 |
+
array( '', '', '.' ),
|
303 |
+
basename( $_ )
|
304 |
+
);
|
305 |
|
306 |
if ( version_compare( $version, $current_version, '<=' ) )
|
307 |
continue;
|
includes/listings.php
CHANGED
@@ -1,253 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package BDP/Includes/Listings
|
6 |
-
*/
|
7 |
-
|
8 |
-
require_once WPBDP_PATH . 'includes/class-listing.php';
|
9 |
-
|
10 |
-
/**
|
11 |
-
* @param array $args
|
12 |
-
* @param bool $error
|
13 |
-
* @param string $context
|
14 |
-
* @return null|WPBDP_Listing
|
15 |
-
*
|
16 |
-
* @since 5.0
|
17 |
-
*/
|
18 |
-
function wpbdp_save_listing( $args = array(), $error = false, $context = '' ) {
|
19 |
-
// TODO: how to support edits without rewriting everything? i.e. if $args has a listing ID but not all fields or
|
20 |
-
// values, only new values are updated leaving everything as before.
|
21 |
-
global $wpdb;
|
22 |
-
|
23 |
-
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
24 |
-
|
25 |
-
$args = apply_filters( 'wpbdp_save_listing_args', $args, $error, $context );
|
26 |
-
|
27 |
-
$listing = array();
|
28 |
-
$listing['listing_id'] = ! empty( $args['listing_id'] ) ? absint( $args['listing_id'] ) : 0;
|
29 |
-
$listing['sequence_id'] = ! empty( $args['sequence_id'] ) ? $args['sequence_id'] : '';
|
30 |
-
|
31 |
-
// Basic post info.
|
32 |
-
$listing['post_title'] = ! empty( $args['post_title'] ) ? $args['post_title'] : '';
|
33 |
-
$listing['post_content'] = ! empty( $args['post_content'] ) ? $args['post_content'] : '';
|
34 |
-
$listing['post_excerpt'] = ! empty( $args['post_excerpt'] ) ? $args['post_excerpt'] : '';
|
35 |
-
$listing['post_author'] = ( ! empty( $args['post_author'] ) ? absint( $args['post_author'] ) : ( ! empty( $args['user_id'] ) ? $args['user_id'] : 0 ) );
|
36 |
-
$listing['post_name'] = ! empty( $args['post_name'] ) ? $args['post_name'] : '';
|
37 |
-
$listing['post_status'] = ! empty( $args['post_status'] ) ? $args['post_status'] : ( $listing['listing_id'] ? wpbdp_get_option( 'edit-post-status' ) : 'pending' );
|
38 |
-
|
39 |
-
// Fields.
|
40 |
-
$listing['fields'] = ! empty( $args['fields'] ) ? $args['fields'] : array();
|
41 |
-
foreach ( array_keys( $listing['fields'] ) as $field_id ) {
|
42 |
-
$field_obj = wpbdp_get_form_field( $field_id );
|
43 |
-
|
44 |
-
if ( ! $field_obj ) {
|
45 |
-
unset( $listing['fields'][ $field_id ] );
|
46 |
-
continue;
|
47 |
-
}
|
48 |
-
|
49 |
-
$field_assoc = $field_obj->get_association();
|
50 |
-
if ( in_array( $field_assoc, array( 'title', 'excerpt', 'content' ) ) ) {
|
51 |
-
if ( empty( $listing[ 'post_' . $field_assoc ] ) ) {
|
52 |
-
$listing[ 'post_' . $field_assoc ] = $listing['fields'][ $field_id ];
|
53 |
-
}
|
54 |
-
|
55 |
-
unset( $listing['fields'][ $field_id ] );
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
// Images.
|
60 |
-
$listing['images'] = ! empty( $args['images'] ) ? $args['images'] : array();
|
61 |
-
$append_images = ! empty( $args['append_images'] );
|
62 |
-
|
63 |
-
// Categories.
|
64 |
-
$listing['categories'] = ! empty( $args['categories'] ) ? $args['categories'] : array();
|
65 |
-
$append_categories = false;
|
66 |
-
|
67 |
-
// Fee plan.
|
68 |
-
$listing['plan_id'] = ! empty( $args['plan_id'] ) ? absint( $args['plan_id'] ) : 0;
|
69 |
-
|
70 |
-
// Expiration date.
|
71 |
-
$listing['expiration_date'] = '';
|
72 |
-
if ( ! empty( $args['expiration_date'] ) ) {
|
73 |
-
$listing['expiration_date'] = $args['expiration_date'];
|
74 |
-
} elseif ( ! empty( $args['expires_on'] ) ) {
|
75 |
-
$listing['expiration_date'] = $args['expires_on'];
|
76 |
-
}
|
77 |
-
|
78 |
-
// Sanitize everything.
|
79 |
-
if ( empty( $listing['post_title'] ) ) {
|
80 |
-
$listing['post_title'] = __( 'Untitled Listing', 'business-directory-plugin' );
|
81 |
-
}
|
82 |
-
|
83 |
-
if ( ! empty( $listing['post_title'] ) && empty( $listing['post_name'] ) ) {
|
84 |
-
$listing['post_name'] = sanitize_title( trim( strip_tags( $listing['post_title'] ) ) );
|
85 |
-
|
86 |
-
// We use a faster slug algorithm for CSV imports.
|
87 |
-
if ( 'csv-import' == $context ) {
|
88 |
-
$post_name_hash = 'wpbdp-slug-' . sha1( $listing['post_name'] );
|
89 |
-
$slug_prefix = $wpdb->get_var( $wpdb->prepare( "SELECT option_value FROM {$wpdb->options} WHERE option_name = %s", $post_name_hash ) );
|
90 |
-
|
91 |
-
if ( ! is_null( $slug_prefix ) && function_exists( '_truncate_post_slug' ) ) {
|
92 |
-
$slug_prefix = intval( $slug_prefix ) + 1;
|
93 |
-
$listing['post_name'] = _truncate_post_slug( $listing['post_name'], 200 - strlen( $slug_prefix ) - 1 ) . '-' . $slug_prefix;
|
94 |
-
|
95 |
-
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->options} SET option_value = %s WHERE option_name = %s", $slug_prefix, $post_name_hash ) );
|
96 |
-
}
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( empty( $listing['post_author'] ) ) {
|
101 |
-
$listing['post_author'] = get_current_user_id();
|
102 |
-
|
103 |
-
// TODO: maybe add this behavior again?
|
104 |
-
// if ( 0 == $post_author ) {
|
105 |
-
// Create user.
|
106 |
-
// if ( $email_field = wpbdp_get_form_fields( array( 'validators' => 'email', 'unique' => 1 ) ) ) {
|
107 |
-
// $email = $state->fields[ $email_field->get_id() ];
|
108 |
-
//
|
109 |
-
// if ( email_exists( $email ) ) {
|
110 |
-
// $post_author = get_user_by( 'email', $email );
|
111 |
-
// $post_author = $post_author->ID;
|
112 |
-
// } else {
|
113 |
-
// $post_author = wp_insert_user( array(
|
114 |
-
// 'user_login' => 'guest_' . wp_generate_password( 5, false, false ),
|
115 |
-
// 'user_email' => $email,
|
116 |
-
// 'user_pass' => wp_generate_password()
|
117 |
-
// ) );
|
118 |
-
// }
|
119 |
-
// }
|
120 |
-
// }
|
121 |
-
}
|
122 |
-
|
123 |
-
$listing = apply_filters( 'wpbpd_save_listing_data', $listing, $context );
|
124 |
-
extract( $listing );
|
125 |
-
|
126 |
-
$adding = ( empty( $listing_id ) );
|
127 |
-
$editing = ! $adding;
|
128 |
-
|
129 |
-
$post = array(
|
130 |
-
'ID' => $listing_id,
|
131 |
-
'post_author' => $post_author,
|
132 |
-
'post_content' => $post_content,
|
133 |
-
'post_title' => $post_title,
|
134 |
-
'post_excerpt' => $post_excerpt,
|
135 |
-
'post_status' => $post_status,
|
136 |
-
'post_type' => WPBDP_POST_TYPE,
|
137 |
-
'post_name' => $post_name,
|
138 |
-
);
|
139 |
-
|
140 |
-
$listing_id = wp_insert_post( $post, true );
|
141 |
-
if ( is_wp_error( $listing_id ) ) {
|
142 |
-
return $error ? $listing_id : false;
|
143 |
-
}
|
144 |
-
|
145 |
-
if ( $sequence_id ) {
|
146 |
-
update_post_meta( $listing_id, '_wpbdp[import_sequence_id]', $sequence_id );
|
147 |
-
}
|
148 |
-
|
149 |
-
$listing_obj = wpbdp_get_listing( $listing_id );
|
150 |
-
$listing_obj->set_categories( $categories );
|
151 |
-
$listing_obj->set_images( $images, $append_images );
|
152 |
-
|
153 |
-
foreach ( $fields as $field_id => $field_value ) {
|
154 |
-
$field = wpbdp_get_form_field( $field_id );
|
155 |
-
$field->store_value( $listing_id, $field_value );
|
156 |
-
}
|
157 |
-
// FIXME: fake this (for compatibility with modules) until we move everything to wpbdp_save_listing() and
|
158 |
-
// friends. See #2945.
|
159 |
-
do_action_ref_array( 'WPBDP_Listing::set_field_values', array( &$listing_obj, $fields ) );
|
160 |
-
|
161 |
-
// Set plan for new listings.
|
162 |
-
if ( $adding || 'csv-import' === $context ) {
|
163 |
-
$plan = wpbdp_get_fee_plan( $plan_id );
|
164 |
-
|
165 |
-
if ( ! $plan ) {
|
166 |
-
$plan = wpbdp_get_fee_plan( 'free' );
|
167 |
-
}
|
168 |
-
|
169 |
-
if ( 'csv-import' === $context ) {
|
170 |
-
$payment = $listing_obj->set_fee_plan_with_payment( $plan );
|
171 |
-
} elseif ( $adding ) {
|
172 |
-
$listing_obj->set_fee_plan( $plan );
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
// Update expiration date if necessary.
|
177 |
-
$listing_obj->update_plan(
|
178 |
-
array( 'expiration_date' => $expiration_date ), array(
|
179 |
-
'clear' => false,
|
180 |
-
'recalculate' => false,
|
181 |
-
)
|
182 |
-
);
|
183 |
-
|
184 |
-
// Force GUIDs to always be <home-url>?post_type=wpbdp_listing&p=<post_id>
|
185 |
-
if ( $adding && ( ! isset( $guid ) || ! $guid ) ) {
|
186 |
-
$post_link = add_query_arg(
|
187 |
-
array(
|
188 |
-
'post_type' => WPBDP_POST_TYPE,
|
189 |
-
'p' => $listing_id,
|
190 |
-
), ''
|
191 |
-
);
|
192 |
-
$wpdb->update( $wpdb->posts, array( 'guid' => home_url( $post_link ) ), array( 'ID' => $listing_id ) );
|
193 |
-
clean_post_cache( $listing_id );
|
194 |
-
}
|
195 |
-
|
196 |
-
$listing_obj->_after_save( $adding ? 'submit-new' : 'submit-edit' );
|
197 |
-
|
198 |
-
return $listing_obj;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* @since 5.0
|
203 |
-
*/
|
204 |
-
function wpbdp_get_listing( $listing_id ) {
|
205 |
-
return WPBDP_Listing::get( $listing_id );
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
* @param $email
|
210 |
-
* @param int $posts_per_page
|
211 |
-
* @param int $offset
|
212 |
-
* @return array
|
213 |
-
*
|
214 |
-
* @since 5.0.6
|
215 |
-
*/
|
216 |
-
function wpbdp_get_listings_by_email( $email, $posts_per_page = -1, $offset = 0 ) {
|
217 |
-
global $wpdb;
|
218 |
-
|
219 |
-
$post_ids = array();
|
220 |
-
|
221 |
-
// Lookup by user.
|
222 |
-
if ( $user = get_user_by( 'email', $email ) ) {
|
223 |
-
$user_id = $user->ID;
|
224 |
-
$post_ids = array_merge(
|
225 |
-
$post_ids,
|
226 |
-
$wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_status != %s AND post_author = %d", WPBDP_POST_TYPE, 'auto-draft', $user_id ) )
|
227 |
-
);
|
228 |
-
}
|
229 |
-
|
230 |
-
// Lookup by e-mail field.
|
231 |
-
if ( $email_field = wpbdp_get_form_fields( 'validators=email&unique=1' ) ) {
|
232 |
-
$field_id = $email_field->get_id();
|
233 |
-
$post_ids = array_merge(
|
234 |
-
$post_ids,
|
235 |
-
$wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND LOWER(meta_value) = %s", '_wpbdp[fields][' . $field_id . ']', strtolower( $email ) ) )
|
236 |
-
);
|
237 |
-
}
|
238 |
-
|
239 |
-
// Filter everything through get_posts().
|
240 |
-
$post_ids = get_posts(
|
241 |
-
array(
|
242 |
-
'post_type' => WPBDP_POST_TYPE,
|
243 |
-
'post_status' => array( 'publish', 'draft', 'pending' ),
|
244 |
-
'posts_per_page' => $posts_per_page,
|
245 |
-
'offset' => $offset,
|
246 |
-
'post__in' => $post_ids ? $post_ids : array( -1 ),
|
247 |
-
'fields' => 'ids',
|
248 |
-
)
|
249 |
-
);
|
250 |
-
|
251 |
-
return $post_ids;
|
252 |
-
}
|
253 |
-
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14', null, 'This file can be found in includes/helpers/functions/listings.php' );
|
3 |
+
require_once WPBDP_INC . 'helpers/functions/listings.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/logging.php
CHANGED
@@ -1,88 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
* @since 5.0
|
5 |
-
*/
|
6 |
-
function wpbdp_insert_log( $args = array() ) {
|
7 |
-
$defaults = array(
|
8 |
-
'object_id' => 0,
|
9 |
-
'rel_object_id' => 0,
|
10 |
-
'object_type' => '',
|
11 |
-
'created_at' => current_time( 'mysql' ),
|
12 |
-
'log_type' => '',
|
13 |
-
'actor' => 'system',
|
14 |
-
'message' => '',
|
15 |
-
'data' => null
|
16 |
-
);
|
17 |
-
$args = wp_parse_args( $args, $defaults );
|
18 |
-
extract( $args );
|
19 |
-
|
20 |
-
if ( ! $object_type && false !== strstr( $log_type, '.' ) ) {
|
21 |
-
$parts = explode( '.', $log_type );
|
22 |
-
$object_type = $parts[0];
|
23 |
-
}
|
24 |
-
|
25 |
-
$object_id = absint( $object_id );
|
26 |
-
$message = trim( $message );
|
27 |
-
$data = $data ? serialize( $data ) : null;
|
28 |
-
|
29 |
-
$row = compact( 'object_type', 'object_id', 'rel_object_id', 'created_at', 'log_type', 'actor', 'message', 'data' );
|
30 |
-
|
31 |
-
if ( ! $data )
|
32 |
-
unset( $row['data'] );
|
33 |
-
|
34 |
-
global $wpdb;
|
35 |
-
if ( ! $wpdb->insert( $wpdb->prefix . 'wpbdp_logs', $row ) )
|
36 |
-
return false;
|
37 |
-
|
38 |
-
$row['id'] = absint( $wpdb->insert_id );
|
39 |
-
|
40 |
-
return (object) $row;
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @since 5.0
|
46 |
-
*/
|
47 |
-
function wpbdp_delete_log( $log_id ) {
|
48 |
-
global $wpdb;
|
49 |
-
return $wpdb->delete( $wpdb->prefix . 'wpbdp_logs', array( 'id' => $log_id ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @since 5.0
|
54 |
-
*/
|
55 |
-
function wpbdp_get_log( $id ) {
|
56 |
-
$results = wpbdp_get_logs( array( 'id' => $id ) );
|
57 |
-
|
58 |
-
if ( ! $results )
|
59 |
-
return false;
|
60 |
-
|
61 |
-
return $results[0];
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* @since 5.0
|
66 |
-
*/
|
67 |
-
function wpbdp_get_logs( $args = array() ) {
|
68 |
-
$defaults = array(
|
69 |
-
'limit' => 0,
|
70 |
-
'orderby' => 'created_at',
|
71 |
-
'order' => 'DESC'
|
72 |
-
);
|
73 |
-
$args = wp_parse_args( $args, $defaults );
|
74 |
-
|
75 |
-
global $wpdb;
|
76 |
-
|
77 |
-
$query = '';
|
78 |
-
$query .= "SELECT * FROM {$wpdb->prefix}wpbdp_logs WHERE 1=1";
|
79 |
-
|
80 |
-
foreach ( $args as $arg_k => $arg_v ) {
|
81 |
-
if ( in_array( $arg_k, array( 'id', 'object_id', 'object_type', 'created_at', 'log_type', 'actor' ) ) )
|
82 |
-
$query .= $wpdb->prepare( " AND {$arg_k} = %s", $arg_v );
|
83 |
-
}
|
84 |
-
|
85 |
-
$query .= " ORDER BY {$args['orderby']} {$args['order']}, id {$args['order']}";
|
86 |
-
|
87 |
-
return $wpdb->get_results( $query );
|
88 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/helpers/functions/logging.php' );
|
3 |
+
require_once WPBDP_INC . 'helpers/functions/logging.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/models/class-fee-plan.php
ADDED
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class Fee Plan Creates, Updates and Deletes Directory Plans
|
4 |
+
*
|
5 |
+
* @package BDP/Includes
|
6 |
+
*/
|
7 |
+
/**
|
8 |
+
* @since 5.0
|
9 |
+
*/
|
10 |
+
final class WPBDP__Fee_Plan {
|
11 |
+
|
12 |
+
private $id = 0;
|
13 |
+
|
14 |
+
private $label = '';
|
15 |
+
private $description = '';
|
16 |
+
private $amount = 0.0;
|
17 |
+
private $days = 0;
|
18 |
+
private $images = 0;
|
19 |
+
private $enabled = true;
|
20 |
+
|
21 |
+
private $sticky = false;
|
22 |
+
private $recurring = false;
|
23 |
+
|
24 |
+
private $pricing_model = 'flat';
|
25 |
+
private $pricing_details = array();
|
26 |
+
|
27 |
+
private $supported_categories = 'all';
|
28 |
+
|
29 |
+
private $weight = 0;
|
30 |
+
private $tag = '';
|
31 |
+
private $extra_data = array();
|
32 |
+
|
33 |
+
|
34 |
+
public function __construct( $data = array() ) {
|
35 |
+
if ( $data ) {
|
36 |
+
$this->setup_plan( $data );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
public function &__get( $key ) {
|
41 |
+
if ( method_exists( $this, 'get_' . $key ) ) {
|
42 |
+
$value = call_user_func( array( $this, 'get_' . $key ) );
|
43 |
+
} else {
|
44 |
+
$value = &$this->{$key};
|
45 |
+
}
|
46 |
+
|
47 |
+
return $value;
|
48 |
+
}
|
49 |
+
|
50 |
+
public function __set( $key, $value ) {
|
51 |
+
$this->{$key} = $value;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function __isset( $key ) {
|
55 |
+
if ( property_exists( $this, $key ) ) {
|
56 |
+
return false === empty( $this->{$key} );
|
57 |
+
} else {
|
58 |
+
return null;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
public function exists() {
|
63 |
+
return ! empty( $this->id );
|
64 |
+
}
|
65 |
+
|
66 |
+
public function save( $fire_hooks = true ) {
|
67 |
+
global $wpdb;
|
68 |
+
|
69 |
+
// Validate.
|
70 |
+
$validation_errors = $this->validate();
|
71 |
+
|
72 |
+
if ( ! empty( $validation_errors ) ) {
|
73 |
+
$error = new WP_Error();
|
74 |
+
|
75 |
+
foreach ( $validation_errors as $col => $msg ) {
|
76 |
+
$error->add( 'validation_error', $msg, array( 'field' => $col ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
return $error;
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( $fire_hooks ) {
|
83 |
+
do_action_ref_array( 'wpbdp_fee_before_save', array( $this ) );
|
84 |
+
}
|
85 |
+
|
86 |
+
$row = array();
|
87 |
+
foreach ( get_object_vars( $this ) as $key => $value ) {
|
88 |
+
$row[ $key ] = $value;
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( ! $this->exists() ) {
|
92 |
+
unset( $row['id'] );
|
93 |
+
}
|
94 |
+
|
95 |
+
$row['pricing_details'] = serialize( $row['pricing_details'] );
|
96 |
+
|
97 |
+
if ( 'all' !== $row['supported_categories'] ) {
|
98 |
+
$row['supported_categories'] = implode( ',', $row['supported_categories'] );
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( empty( $row['extra_data'] ) ) {
|
102 |
+
unset( $row['extra_data'] );
|
103 |
+
} else {
|
104 |
+
$row['extra_data'] = serialize( $row['extra_data'] );
|
105 |
+
}
|
106 |
+
|
107 |
+
$saved = false;
|
108 |
+
$update = $this->exists();
|
109 |
+
if ( $update ) {
|
110 |
+
$saved = $wpdb->update( $wpdb->prefix . 'wpbdp_plans', $row, array( 'id' => $this->id ) );
|
111 |
+
} else {
|
112 |
+
$saved = $wpdb->insert( $wpdb->prefix . 'wpbdp_plans', $row );
|
113 |
+
|
114 |
+
if ( $saved ) {
|
115 |
+
$this->id = $wpdb->insert_id;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( $saved ) {
|
120 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_plans' );
|
121 |
+
if ( $fire_hooks ) {
|
122 |
+
do_action( 'wpbdp_fee_save', $this, $update );
|
123 |
+
}
|
124 |
+
|
125 |
+
$wpdb->update(
|
126 |
+
$wpdb->prefix . 'wpbdp_listings',
|
127 |
+
array( 'is_sticky' => $this->sticky ? 1 : 0 ),
|
128 |
+
array(
|
129 |
+
'fee_id' => $this->id,
|
130 |
+
)
|
131 |
+
);
|
132 |
+
}
|
133 |
+
|
134 |
+
return $saved;
|
135 |
+
}
|
136 |
+
|
137 |
+
public function update( $data ) {
|
138 |
+
unset( $data['id'] );
|
139 |
+
$this->setup_plan( $data );
|
140 |
+
return $this->save();
|
141 |
+
}
|
142 |
+
|
143 |
+
public function delete() {
|
144 |
+
global $wpdb;
|
145 |
+
$deleted = $wpdb->delete( $wpdb->prefix . 'wpbdp_plans', array( 'id' => $this->id ) );
|
146 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_plans' );
|
147 |
+
return $deleted;
|
148 |
+
}
|
149 |
+
|
150 |
+
public function supports_category( $category_id ) {
|
151 |
+
return $this->supports_category_selection( array( $category_id ) );
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* @since 5.0
|
156 |
+
*/
|
157 |
+
public function get_feature_list() {
|
158 |
+
$items = array();
|
159 |
+
|
160 |
+
if ( wpbdp_get_option( 'allow-images' ) ) {
|
161 |
+
if ( ! $this->images ) {
|
162 |
+
$items['images'] = _x( 'No images allowed.', 'fee plan', 'business-directory-plugin' );
|
163 |
+
} else {
|
164 |
+
$items['images'] = sprintf( _nx( '%d image allowed.', '%d images allowed.', $this->images, 'fee plan', 'business-directory-plugin' ), $this->images );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
$items = apply_filters( 'wpbdp_plan_feature_list', $items, $this );
|
169 |
+
return $items;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* @since 5.0
|
174 |
+
*/
|
175 |
+
public function calculate_amount( $categories = array() ) {
|
176 |
+
$amount = 0.0;
|
177 |
+
$pricing_info = $this->pricing_details;
|
178 |
+
|
179 |
+
switch ( $this->pricing_model ) {
|
180 |
+
case 'variable':
|
181 |
+
$amount = array_sum( wp_array_slice_assoc( $pricing_info, $categories ) );
|
182 |
+
break;
|
183 |
+
case 'extra':
|
184 |
+
$amount = $this->amount + ( $pricing_info['extra'] * count( $categories ) );
|
185 |
+
break;
|
186 |
+
case 'flat':
|
187 |
+
default:
|
188 |
+
$amount = $this->amount;
|
189 |
+
break;
|
190 |
+
}
|
191 |
+
|
192 |
+
return $amount;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* @since 5.0
|
197 |
+
*/
|
198 |
+
public function supports_category_selection( $categories = array() ) {
|
199 |
+
if ( ! $categories ) {
|
200 |
+
return true;
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( is_string( $this->supported_categories ) && 'all' === $this->supported_categories ) {
|
204 |
+
return true;
|
205 |
+
}
|
206 |
+
|
207 |
+
if ( array_diff( $categories, $this->supported_categories ) ) {
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
|
211 |
+
return true;
|
212 |
+
}
|
213 |
+
|
214 |
+
public static function get_instance( $fee_id ) {
|
215 |
+
global $wpdb;
|
216 |
+
|
217 |
+
$all_plans = WPBDP_Utils::check_cache(
|
218 |
+
array(
|
219 |
+
'cache_key' => 'all',
|
220 |
+
'group' => 'wpbdp_plans',
|
221 |
+
'type' => 'all',
|
222 |
+
'return' => 'array',
|
223 |
+
)
|
224 |
+
);
|
225 |
+
|
226 |
+
if ( $all_plans && isset( $all_plans[ $fee_id ] ) ) {
|
227 |
+
$row = $all_plans[ $fee_id ];
|
228 |
+
} else {
|
229 |
+
$query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wpbdp_plans WHERE id = %d", $fee_id );
|
230 |
+
$row = WPBDP_Utils::check_cache(
|
231 |
+
array(
|
232 |
+
'cache_key' => $fee_id,
|
233 |
+
'group' => 'wpbdp_plans',
|
234 |
+
'query' => $query,
|
235 |
+
'type' => 'get_row',
|
236 |
+
'return' => 'array',
|
237 |
+
)
|
238 |
+
);
|
239 |
+
}
|
240 |
+
|
241 |
+
if ( ! $row ) {
|
242 |
+
return false;
|
243 |
+
}
|
244 |
+
|
245 |
+
if ( 'all' !== $row['supported_categories'] ) {
|
246 |
+
$row['supported_categories'] = array_map( 'absint', explode( ',', $row['supported_categories'] ) );
|
247 |
+
}
|
248 |
+
|
249 |
+
$row['pricing_details'] = maybe_unserialize( $row['pricing_details'] );
|
250 |
+
$row['extra_data'] = maybe_unserialize( $row['extra_data'] );
|
251 |
+
|
252 |
+
$instance = new self( $row );
|
253 |
+
return $instance;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* @since 5.0
|
258 |
+
*/
|
259 |
+
public function calculate_expiration_time( $base_time = null ) {
|
260 |
+
if ( ! $base_time ) {
|
261 |
+
$base_time = current_time( 'timestamp' );
|
262 |
+
}
|
263 |
+
|
264 |
+
if ( 0 === $this->days ) {
|
265 |
+
return null;
|
266 |
+
}
|
267 |
+
|
268 |
+
$expire_time = strtotime( sprintf( '+%d days', $this->days ), $base_time );
|
269 |
+
return date( 'Y-m-d H:i:s', $expire_time );
|
270 |
+
}
|
271 |
+
|
272 |
+
private function setup_plan( $data ) {
|
273 |
+
if ( is_object( $data ) ) {
|
274 |
+
$data = get_object_vars( $data );
|
275 |
+
}
|
276 |
+
|
277 |
+
foreach ( $data as $key => $value ) {
|
278 |
+
$this->{$key} = $value;
|
279 |
+
}
|
280 |
+
|
281 |
+
$this->sanitize();
|
282 |
+
}
|
283 |
+
|
284 |
+
private function sanitize() {
|
285 |
+
$this->label = trim( $this->label );
|
286 |
+
$this->amount = floatval( trim( $this->amount ) );
|
287 |
+
$this->days = absint( $this->days );
|
288 |
+
$this->images = absint( $this->images );
|
289 |
+
$this->sticky = (bool) $this->sticky;
|
290 |
+
$this->recurring = (bool) $this->recurring;
|
291 |
+
$this->pricing_model = empty( $this->pricing_model ) ? 'flat' : $this->pricing_model;
|
292 |
+
$this->tag = strtolower( trim( $this->tag ) );
|
293 |
+
|
294 |
+
if ( 'all' !== $this->supported_categories ) {
|
295 |
+
$this->supported_categories = array_filter( array_map( 'absint', (array) $this->supported_categories ), array( $this, 'sanitize_category' ) );
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( empty( $this->supported_categories ) ) {
|
299 |
+
$this->supported_categories = 'all';
|
300 |
+
}
|
301 |
+
|
302 |
+
if ( 'extra' === $this->pricing_model ) {
|
303 |
+
$this->pricing_details = array(
|
304 |
+
'extra' => floatval( $this->pricing_details['extra'] ),
|
305 |
+
);
|
306 |
+
} else {
|
307 |
+
unset( $this->pricing_details['extra'] );
|
308 |
+
}
|
309 |
+
|
310 |
+
// Unset details for categories that are not supported.
|
311 |
+
if ( 'variable' === $this->pricing_model ) {
|
312 |
+
$this->amount = 0.0;
|
313 |
+
|
314 |
+
if ( 'all' !== $this->supported_categories ) {
|
315 |
+
$this->pricing_details = wp_array_slice_assoc( $this->pricing_details, $this->supported_categories );
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
if ( 'flat' === $this->pricing_model ) {
|
320 |
+
$this->pricing_details = array();
|
321 |
+
}
|
322 |
+
|
323 |
+
// Free plan is special.
|
324 |
+
if ( 'free' === $this->tag ) {
|
325 |
+
$this->pricing_model = 'flat';
|
326 |
+
$this->amount = 0.0;
|
327 |
+
$this->sticky = false;
|
328 |
+
$this->recurring = false;
|
329 |
+
$this->supported_categories = 'all';
|
330 |
+
$this->enabled = true;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
private function validate() {
|
335 |
+
$this->sanitize();
|
336 |
+
|
337 |
+
$errors = array();
|
338 |
+
|
339 |
+
if ( ! $this->label ) {
|
340 |
+
$errors['label'] = _x( 'Fee label is required.', 'fees-api', 'business-directory-plugin' );
|
341 |
+
}
|
342 |
+
|
343 |
+
// limit 'duration' because of TIMESTAMP limited range (issue #157).
|
344 |
+
// FIXME: this is not a long-term fix. we should move to DATETIME to avoid this entirely.
|
345 |
+
if ( $this->days > 3650 ) {
|
346 |
+
$errors['days'] = _x( 'Fee listing duration must be a number less than 10 years (3650 days).', 'fees-api', 'business-directory-plugin' );
|
347 |
+
}
|
348 |
+
|
349 |
+
if ( 1 == $this->recurring ) {
|
350 |
+
if ( 0 === $this->days ) {
|
351 |
+
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-days">', _x( 'To set this fee as "Recurring" you must have a time for the listing to renew (e.g. 30 days). To avoid issues with the listing, please edit the <a>fee plan</a> appropriately.', 'fees-api', 'business-directory-plugin' ) );
|
352 |
+
}
|
353 |
+
|
354 |
+
$error_message = _x( 'To set this fee as "Recurring" you must set a price for your fee plan. To avoid issues with the listing, please edit the <a>fee plan</a> appropriately.', 'fees-api', 'business-directory-plugin' );
|
355 |
+
|
356 |
+
if ( 'variable' === $this->pricing_model && 0 === array_sum( $this->pricing_details ) ) {
|
357 |
+
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-fee-category">', $error_message );
|
358 |
+
}
|
359 |
+
|
360 |
+
if ( 'extra' === $this->pricing_model && 0 === $this->amount + $this->pricing_details['extra'] ) {
|
361 |
+
$errors[] = str_replace( '<a>', '<a href="#wpbdp-fee-form-fee-price">', $error_message );
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
return $errors;
|
366 |
+
}
|
367 |
+
|
368 |
+
private function sanitize_category( $category_id ) {
|
369 |
+
$category = get_term( absint( $category_id ), WPBDP_CATEGORY_TAX );
|
370 |
+
return $category && ! is_wp_error( $category );
|
371 |
+
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
require_once WPBDP_INC . 'compatibility/deprecated/class-fee-plan.php';
|
includes/models/class-listing-subscription.php
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class WPBDP__Listing_Subscription {
|
3 |
+
|
4 |
+
private $parent_payment_id = 0;
|
5 |
+
private $listing_id = 0;
|
6 |
+
private $subscription_id = '';
|
7 |
+
|
8 |
+
|
9 |
+
public function __construct( $listing_id = 0, $subscription_id = '' ) {
|
10 |
+
$listing_id = absint( $listing_id );
|
11 |
+
$subscription_id = trim( $subscription_id );
|
12 |
+
|
13 |
+
if ( $listing_id ) {
|
14 |
+
$listing = wpbdp_get_listing( $listing_id );
|
15 |
+
|
16 |
+
if ( $listing && ! $listing->is_recurring() ) {
|
17 |
+
throw new Exception( 'Listing is not recurring!' );
|
18 |
+
}
|
19 |
+
|
20 |
+
if ( $listing ) {
|
21 |
+
$this->fill_data_from_db( 'listing_id', $listing_id );
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
if ( ! $this->fill_data_from_db( 'subscription_id', $subscription_id ) ) {
|
27 |
+
throw new Exception( 'Subscription does not exist!' );
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
private function fill_data_from_db( $key, $val ) {
|
32 |
+
global $wpdb;
|
33 |
+
|
34 |
+
$row = $wpdb->get_row( $wpdb->prepare( "SELECT listing_id, subscription_id, subscription_data FROM {$wpdb->prefix}wpbdp_listings WHERE {$key} = %s", $val ) );
|
35 |
+
|
36 |
+
if ( ! $row ) {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
$susc_id = $row->subscription_id;
|
41 |
+
$susc_data = $row->subscription_data ? unserialize( $row->subscription_data ) : array();
|
42 |
+
|
43 |
+
$this->listing_id = absint( $row->listing_id );
|
44 |
+
$this->subscription_id = $susc_id;
|
45 |
+
$this->parent_payment_id = ! empty( $susc_data['parent_payment_id'] ) ? absint( $susc_data['parent_payment_id'] ) : 0;
|
46 |
+
|
47 |
+
$this->data = $susc_data;
|
48 |
+
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function get_parent_payment() {
|
53 |
+
if ( $this->parent_payment_id ) {
|
54 |
+
return wpbdp_get_payment( $this->parent_payment_id );
|
55 |
+
}
|
56 |
+
|
57 |
+
return null;
|
58 |
+
}
|
59 |
+
|
60 |
+
public function get_payments() {
|
61 |
+
return ! empty( $this->data['payments'] ) ? $this->data['payments'] : array();
|
62 |
+
}
|
63 |
+
|
64 |
+
public function set_subscription_id( $subscription_id ) {
|
65 |
+
if ( empty( $subscription_id ) ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
$this->subscription_id = $subscription_id;
|
70 |
+
$this->save();
|
71 |
+
}
|
72 |
+
|
73 |
+
public function get_subscription_id() {
|
74 |
+
return $this->subscription_id;
|
75 |
+
}
|
76 |
+
|
77 |
+
public function record_payment( $args_or_payment = array() ) {
|
78 |
+
$parent_payment = $this->get_parent_payment();
|
79 |
+
$payments = $this->get_payments();
|
80 |
+
|
81 |
+
if ( is_array( $args_or_payment ) ) {
|
82 |
+
$args = wp_parse_args(
|
83 |
+
$args_or_payment,
|
84 |
+
array(
|
85 |
+
'amount' => '0.0',
|
86 |
+
'gateway_tx_id' => '',
|
87 |
+
'gateway' => '',
|
88 |
+
// TODO: accept 'created_at' and 'mode' (live/test).
|
89 |
+
)
|
90 |
+
);
|
91 |
+
|
92 |
+
if ( ! empty( $args['gateway_tx_id'] ) ) {
|
93 |
+
$p_id = $args['gateway_tx_id'];
|
94 |
+
$p_gateway = ( empty( $args['gateway'] ) && $parent_payment ) ? $parent_payment->gateway : $args['gateway'];
|
95 |
+
$payment = WPBDP_Payment::objects()->get( array( 'gateway_tx_id' => $p_id, 'gateway' => $p_gateway ) ); // Just in case the payment is already in the database.
|
96 |
+
}
|
97 |
+
|
98 |
+
if ( ! $payment ) {
|
99 |
+
$payment = new WPBDP_Payment( $args_or_payment );
|
100 |
+
}
|
101 |
+
} else {
|
102 |
+
$payment = $args_or_payment;
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( $payment->id && in_array( $payment->id, $payments ) )
|
106 |
+
return;
|
107 |
+
|
108 |
+
if ( $parent_payment ) {
|
109 |
+
$payment->parent_id = $parent_payment->id;
|
110 |
+
$payment->listing_id = $parent_payment->listing_id;
|
111 |
+
$payment->payment_type = 'renewal';
|
112 |
+
$payment->payer_email = $parent_payment->payer_email;
|
113 |
+
$payment->payer_first_name = $parent_payment->payer_first_name;
|
114 |
+
$payment->payer_last_name = $parent_payment->payer_last_name;
|
115 |
+
$payment->payer_data = $parent_payment->payer_data;
|
116 |
+
$payment->currency_code = $parent_payment->currency_code;
|
117 |
+
$payment->status = 'completed';
|
118 |
+
$payment->gateway = ( ! $payment->gateway ) ? $parent_payment->gateway : $payment->gateway;
|
119 |
+
|
120 |
+
if ( $item = $parent_payment->find_item( 'recurring_plan' ) ) {
|
121 |
+
$payment->payment_items[] = $item;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( ! $payment->id ) {
|
126 |
+
// Save silently (no hooks fired).
|
127 |
+
$payment->save( false, false );
|
128 |
+
}
|
129 |
+
|
130 |
+
// This is the first payment.
|
131 |
+
if ( ! $payments ) {
|
132 |
+
$this->parent_payment_id = $payment->id;
|
133 |
+
}
|
134 |
+
|
135 |
+
$payments[] = $payment->id;
|
136 |
+
$this->data['payments'] = $payments;
|
137 |
+
$this->save();
|
138 |
+
}
|
139 |
+
|
140 |
+
public function renew() {
|
141 |
+
$listing = wpbdp_get_listing( $this->listing_id );
|
142 |
+
$listing->update_plan();
|
143 |
+
$listing->set_status( 'complete' );
|
144 |
+
$listing->set_post_status( 'publish' );
|
145 |
+
|
146 |
+
do_action( 'wpbdp_listing_renewed', $listing );
|
147 |
+
}
|
148 |
+
|
149 |
+
public function cancel() {
|
150 |
+
global $wpdb;
|
151 |
+
|
152 |
+
$wpdb->update(
|
153 |
+
"{$wpdb->prefix}wpbdp_listings",
|
154 |
+
array(
|
155 |
+
'is_recurring' => '0',
|
156 |
+
'subscription_id' => '',
|
157 |
+
'subscription_data' => ''
|
158 |
+
),
|
159 |
+
array( 'listing_id' => $this->listing_id )
|
160 |
+
);
|
161 |
+
|
162 |
+
do_action( 'wpbdp_listing_subscription_canceled', $this->listing_id );
|
163 |
+
}
|
164 |
+
|
165 |
+
private function save() {
|
166 |
+
global $wpdb;
|
167 |
+
|
168 |
+
$data = array(
|
169 |
+
'parent_payment_id' => $this->parent_payment_id,
|
170 |
+
'payments' => ! empty( $this->data['payments'] ) ? $this->data['payments'] : array()
|
171 |
+
);
|
172 |
+
|
173 |
+
$row = array(
|
174 |
+
'subscription_id' => $this->subscription_id,
|
175 |
+
'subscription_data' => serialize( $data )
|
176 |
+
);
|
177 |
+
|
178 |
+
return $wpdb->update( $wpdb->prefix . 'wpbdp_listings', $row, array( 'listing_id' => $this->listing_id ) );
|
179 |
+
}
|
180 |
+
}
|
includes/models/class-listing.php
ADDED
@@ -0,0 +1,1132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package WPBDP\Listing
|
4 |
+
* @since 3.4
|
5 |
+
*/
|
6 |
+
require_once WPBDP_PATH . 'includes/models/class-payment.php';
|
7 |
+
require_once WPBDP_PATH . 'includes/models/class-listing-subscription.php';
|
8 |
+
require_once WPBDP_PATH . 'includes/helpers/class-listing-image.php';
|
9 |
+
class WPBDP_Listing {
|
10 |
+
|
11 |
+
private $id = 0;
|
12 |
+
private $new = true;
|
13 |
+
|
14 |
+
public function __construct( $id ) {
|
15 |
+
$this->id = intval( $id );
|
16 |
+
}
|
17 |
+
|
18 |
+
public function get_field_value( $id ) {
|
19 |
+
$field = null;
|
20 |
+
|
21 |
+
if ( is_numeric( $id ) ) {
|
22 |
+
$field = wpbdp_get_form_field( $id );
|
23 |
+
} else {
|
24 |
+
$field = wpbdp_get_form_fields( array( 'association' => $id, 'unique' => true ) );
|
25 |
+
if ( ! $field ) {
|
26 |
+
// Get the field by key.
|
27 |
+
$field = wpbdp_get_form_field( $id );
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
return $field ? $field->html_value( $this->id ) : '';
|
32 |
+
}
|
33 |
+
|
34 |
+
public function get_modified_date() {
|
35 |
+
if ( ! $this->id )
|
36 |
+
return '';
|
37 |
+
|
38 |
+
return wpbdp_date( get_post_modified_time( 'U', false, $this->id ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
public function get_images( $fields = 'all', $sorted = false ) {
|
42 |
+
$q = array(
|
43 |
+
'numberposts' => -1,
|
44 |
+
'post_type' => 'attachment',
|
45 |
+
'post_parent' => $this->id,
|
46 |
+
'fields' => 'ids',
|
47 |
+
);
|
48 |
+
|
49 |
+
$attachments = WPBDP_Utils::check_cache(
|
50 |
+
array(
|
51 |
+
'cache_key' => __FUNCTION__ . $fields . '.' . $sorted . ' .' . $this->id,
|
52 |
+
'group' => 'wpbdp_listings',
|
53 |
+
'query' => $q,
|
54 |
+
'type' => 'get_posts',
|
55 |
+
)
|
56 |
+
);
|
57 |
+
$images = get_post_meta( $this->id, '_wpbdp[images]', true );
|
58 |
+
$images = array_merge( is_array( $images ) ? $images : array( $images ), (array) $attachments );
|
59 |
+
|
60 |
+
$get_ids = 'id' === $fields || 'ids' === $fields;
|
61 |
+
$result = array();
|
62 |
+
foreach ( array_unique( $images ) as $attachment_id ) {
|
63 |
+
$attachment = get_post( $attachment_id );
|
64 |
+
if ( ! $attachment || ! wp_attachment_is_image( $attachment->ID ) )
|
65 |
+
continue;
|
66 |
+
|
67 |
+
if ( ! $sorted && $get_ids ) {
|
68 |
+
$result[] = $attachment->ID;
|
69 |
+
} else {
|
70 |
+
$img = WPBDP_Listing_Image::get( $attachment->ID );
|
71 |
+
if ( $img ) {
|
72 |
+
$result[] = $img;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( $result && $sorted ) {
|
78 |
+
uasort(
|
79 |
+
$result,
|
80 |
+
function( $x, $y ) {
|
81 |
+
return $y->weight - $x->weight;
|
82 |
+
}
|
83 |
+
);
|
84 |
+
|
85 |
+
if ( $get_ids ) {
|
86 |
+
foreach ( $result as $i => $img ) {
|
87 |
+
$result[$i] = $img->id;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
$this->prepend_thumbnail( $result, $fields );
|
92 |
+
}
|
93 |
+
|
94 |
+
return $result;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @since 3.6.11
|
99 |
+
*/
|
100 |
+
public function get_images_meta() {
|
101 |
+
$images = $this->get_images( 'ids' );
|
102 |
+
$meta = array();
|
103 |
+
|
104 |
+
foreach ( $images as $img_id ) {
|
105 |
+
$meta[ $img_id ] = array(
|
106 |
+
'order' => (int) get_post_meta( $img_id, '_wpbdp_image_weight', true ),
|
107 |
+
'caption' => strval( get_post_meta( $img_id, '_wpbdp_image_caption', true ) )
|
108 |
+
);
|
109 |
+
}
|
110 |
+
|
111 |
+
return $meta;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Sets listing images.
|
116 |
+
*
|
117 |
+
* @param array $images array of image IDs.
|
118 |
+
* @param boolean $append if TRUE images will be appended without clearing previous ones.
|
119 |
+
*/
|
120 |
+
public function set_images( $images = array(), $append = false ) {
|
121 |
+
if ( ! $append ) {
|
122 |
+
$current = $this->get_images( 'ids' );
|
123 |
+
|
124 |
+
foreach ( $current as $img_id ) {
|
125 |
+
if ( ! in_array( $img_id, $images, true ) && wp_attachment_is_image( $img_id ) )
|
126 |
+
wp_delete_attachment( $img_id, true );
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
foreach ( $images as $image_id ) {
|
131 |
+
wp_update_post( array( 'ID' => $image_id, 'post_parent' => $this->id ) );
|
132 |
+
}
|
133 |
+
|
134 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Remove an image from a listing. If the image belongs to the listing,
|
139 |
+
* clear the post parent or assign it to another listing. This will only
|
140 |
+
* delete images from the media library if the post parent is this listing,
|
141 |
+
* and no other listings are using it.
|
142 |
+
*
|
143 |
+
* @since 5.12
|
144 |
+
*/
|
145 |
+
public function remove_image( $image_id ) {
|
146 |
+
$current = $this->get_images( 'ids' );
|
147 |
+
|
148 |
+
$keep_images = array();
|
149 |
+
foreach ( $current as $current_img_id ) {
|
150 |
+
if ( $image_id === $current_img_id ) {
|
151 |
+
// Remove post parent.
|
152 |
+
$parent_id = (int) wp_get_post_parent_id( $image_id );
|
153 |
+
if ( $parent_id === $this->id ) {
|
154 |
+
WPBDP_Listing_Image::clear_post_parent( $image_id );
|
155 |
+
WPBDP_Listing_Image::maybe_delete_image( $image_id, $this->id );
|
156 |
+
}
|
157 |
+
} else {
|
158 |
+
$keep_images[] = $current_img_id;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
update_post_meta( $this->id, '_wpbdp[images]', $keep_images );
|
163 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
164 |
+
}
|
165 |
+
|
166 |
+
public function set_thumbnail_id( $image_id ) {
|
167 |
+
delete_post_meta( $this->id, '_wpbdp[thumbnail_id]' );
|
168 |
+
|
169 |
+
if ( ! $image_id ) {
|
170 |
+
delete_post_thumbnail( $this->id );
|
171 |
+
return;
|
172 |
+
}
|
173 |
+
|
174 |
+
set_post_thumbnail( $this->id, $image_id );
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Gets the attachment object that representes this listing's thumbnail.
|
179 |
+
*
|
180 |
+
* @since 5.1.7
|
181 |
+
*
|
182 |
+
* @return null|object Post An attachment of this listing.
|
183 |
+
*/
|
184 |
+
public function get_thumbnail() {
|
185 |
+
$thumbnail = $this->get_saved_thumbnail();
|
186 |
+
|
187 |
+
if ( $thumbnail ) {
|
188 |
+
return $thumbnail;
|
189 |
+
}
|
190 |
+
|
191 |
+
// If no thumbnail is saved, use the first image.
|
192 |
+
$images = $this->get_images( 'ids' );
|
193 |
+
|
194 |
+
if ( ! $images ) {
|
195 |
+
if ( $thumbnail ) {
|
196 |
+
// Clear out previous value.
|
197 |
+
$this->set_thumbnail_id( 0 );
|
198 |
+
}
|
199 |
+
return null;
|
200 |
+
}
|
201 |
+
|
202 |
+
$this->set_thumbnail_id( $images[0] );
|
203 |
+
|
204 |
+
return WPBDP_Utils::check_cache(
|
205 |
+
array(
|
206 |
+
'cache_key' => __FUNCTION__ . $this->id,
|
207 |
+
'group' => 'wpbdp_listings',
|
208 |
+
'query' => $images[0],
|
209 |
+
'type' => 'get_post',
|
210 |
+
)
|
211 |
+
);
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Get saved thumbnail image.
|
216 |
+
*
|
217 |
+
* @since v5.9
|
218 |
+
*/
|
219 |
+
private function get_saved_thumbnail() {
|
220 |
+
$thumbnail_id = get_post_meta( $this->id, '_thumbnail_id', true );
|
221 |
+
|
222 |
+
if ( ! $thumbnail_id ) {
|
223 |
+
$thumbnail_id = get_post_meta( $this->id, '_wpbdp[thumbnail_id]', true );
|
224 |
+
}
|
225 |
+
|
226 |
+
return $thumbnail_id ? get_post( $thumbnail_id ) : null;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Add thumbnail as first image.
|
231 |
+
*
|
232 |
+
* @since v5.9
|
233 |
+
*/
|
234 |
+
private function prepend_thumbnail( &$images, $fields = 'ids' ) {
|
235 |
+
$thumbnail = $this->get_saved_thumbnail();
|
236 |
+
if ( ! $thumbnail ) {
|
237 |
+
return;
|
238 |
+
}
|
239 |
+
|
240 |
+
if ( $fields === 'ids' || $fields === 'id' ) {
|
241 |
+
$thumbnail = $thumbnail->ID;
|
242 |
+
$find = array_search( $thumbnail, $images, true );
|
243 |
+
} else {
|
244 |
+
foreach ( $images as $k => $image ) {
|
245 |
+
if ( $image->id === $thumbnail->ID ) {
|
246 |
+
$thumbnail = $image;
|
247 |
+
$find = $k;
|
248 |
+
break;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( isset( $find ) ) {
|
254 |
+
unset( $images[ $find ] );
|
255 |
+
}
|
256 |
+
|
257 |
+
array_unshift( $images, $thumbnail );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Get the ID of the attachment that represents this listing's thumbnail.
|
262 |
+
*
|
263 |
+
* @return int An ID or 0.
|
264 |
+
*/
|
265 |
+
public function get_thumbnail_id() {
|
266 |
+
$thumbnail = $this->get_thumbnail();
|
267 |
+
|
268 |
+
if ( ! $thumbnail ) {
|
269 |
+
return 0;
|
270 |
+
}
|
271 |
+
|
272 |
+
return $thumbnail->ID;
|
273 |
+
}
|
274 |
+
|
275 |
+
public function set_title( $title ) {
|
276 |
+
wp_update_post( array( 'ID' => $this->id, 'post_title' => $title ) );
|
277 |
+
}
|
278 |
+
|
279 |
+
public function get_title() {
|
280 |
+
return get_the_title( $this->id );
|
281 |
+
}
|
282 |
+
|
283 |
+
public function get_id() {
|
284 |
+
return $this->id;
|
285 |
+
}
|
286 |
+
|
287 |
+
public function calculate_expiration_date( $time, &$fee ) {
|
288 |
+
if ( is_array( $fee ) ) {
|
289 |
+
$days = isset( $fee['days'] ) ? $fee['days'] : $fee['fee_days'];
|
290 |
+
} else if ( is_a( $fee, 'WPBDP__Fee_Plan' ) ) {
|
291 |
+
$days = $fee->days;
|
292 |
+
} elseif ( is_object( $fee ) && isset( $fee->fee_days ) ) {
|
293 |
+
$days = $fee->fee_days;
|
294 |
+
} else {
|
295 |
+
$days = 0;
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( 0 == $days )
|
299 |
+
return null;
|
300 |
+
|
301 |
+
$expire_time = strtotime( sprintf( '+%d days', $days ), $time );
|
302 |
+
return date( 'Y-m-d H:i:s', $expire_time );
|
303 |
+
}
|
304 |
+
|
305 |
+
public function get_categories( $fields = 'all' ) {
|
306 |
+
$args = array();
|
307 |
+
$args['fields'] = $fields;
|
308 |
+
|
309 |
+
return wp_get_post_terms( $this->id, WPBDP_CATEGORY_TAX, $args );
|
310 |
+
}
|
311 |
+
|
312 |
+
public function set_categories( $categories ) {
|
313 |
+
$category_ids = array_map( 'intval', $categories );
|
314 |
+
wp_set_post_terms( $this->id, $category_ids, WPBDP_CATEGORY_TAX, false );
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* @since 5.0
|
319 |
+
*/
|
320 |
+
public function is_recurring() {
|
321 |
+
if ( $plan = $this->get_fee_plan() ) {
|
322 |
+
return $plan->is_recurring;
|
323 |
+
}
|
324 |
+
|
325 |
+
return false;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* @since 5.0
|
330 |
+
*/
|
331 |
+
public function get_subscription() {
|
332 |
+
try {
|
333 |
+
$subscription = new WPBDP__Listing_Subscription( $this->id );
|
334 |
+
} catch ( Exception $e ) {
|
335 |
+
$subscription = null;
|
336 |
+
}
|
337 |
+
return $subscription;
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* @since 5.0
|
342 |
+
*/
|
343 |
+
public function has_subscription() {
|
344 |
+
global $wpdb;
|
345 |
+
return absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND is_recurring = %d", $this->id, 1 ) ) ) > 0;
|
346 |
+
}
|
347 |
+
|
348 |
+
public function is_published() {
|
349 |
+
return 'publish' == get_post_status( $this->id );
|
350 |
+
}
|
351 |
+
|
352 |
+
public function get_permalink() {
|
353 |
+
if ( ! $this->id )
|
354 |
+
return '';
|
355 |
+
|
356 |
+
return get_permalink( $this->id );
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* @since 5.0
|
361 |
+
*/
|
362 |
+
public function get_admin_edit_link() {
|
363 |
+
return admin_url( 'post.php?post=' . $this->id . '&action=edit' );
|
364 |
+
}
|
365 |
+
|
366 |
+
public function get_payment_status() {
|
367 |
+
$status = 'ok';
|
368 |
+
|
369 |
+
if ( WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id, 'status' => 'pending' ) )->count() > 0 )
|
370 |
+
$status = 'pending';
|
371 |
+
|
372 |
+
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
373 |
+
return apply_filters( 'WPBDP_Listing::get_payment_status', $status, $this->id );
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* @since 5.1.9
|
378 |
+
*/
|
379 |
+
public function get_renewal_date() {
|
380 |
+
$filters = array(
|
381 |
+
'listing_id' => $this->id,
|
382 |
+
'status' => 'completed',
|
383 |
+
'payment_type' => 'renewal',
|
384 |
+
);
|
385 |
+
|
386 |
+
$payments = WPBDP_Payment::objects()->filter( $filters )->order_by( '-id' )->to_array();
|
387 |
+
|
388 |
+
if ( ! isset( $payments[0] ) ) {
|
389 |
+
return null;
|
390 |
+
}
|
391 |
+
|
392 |
+
return wpbdp_date_full_format( strtotime( $payments[0]->created_at ) );
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* @since 5.0
|
397 |
+
*/
|
398 |
+
public function get_payments() {
|
399 |
+
$payments = WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id ) );
|
400 |
+
return $payments;
|
401 |
+
}
|
402 |
+
|
403 |
+
public function get_latest_payments() {
|
404 |
+
return WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id ) )->order_by( '-id' )->to_array();
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* @since 5.1.9
|
409 |
+
*/
|
410 |
+
public function get_latest_payment() {
|
411 |
+
$payments = $this->get_latest_payments();
|
412 |
+
|
413 |
+
return count( $payments ) ? $payments[0] : null;
|
414 |
+
}
|
415 |
+
|
416 |
+
public function delete_payment_history() {
|
417 |
+
$payments = $this->get_latest_payments();
|
418 |
+
|
419 |
+
if ( ! $payments ) {
|
420 |
+
return new WP_Error( 'No listing payments', _x( 'Listing has no registered payments', 'listing', 'business-directory-plugin' ) );
|
421 |
+
}
|
422 |
+
|
423 |
+
foreach ( $payments as $payment ) {
|
424 |
+
if ( ! $payment->delete() ) {
|
425 |
+
return new WP_Error(
|
426 |
+
'payment delete error',
|
427 |
+
sprintf(
|
428 |
+
'%s: %s',
|
429 |
+
_x( "Can't delete payment", 'listing', 'business-directory-plugin' ),
|
430 |
+
$payment->id
|
431 |
+
)
|
432 |
+
);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
|
436 |
+
return true;
|
437 |
+
|
438 |
+
}
|
439 |
+
|
440 |
+
public function publish() {
|
441 |
+
if ( ! $this->id )
|
442 |
+
return;
|
443 |
+
|
444 |
+
wp_update_post( array( 'post_status' => 'publish', 'ID' => $this->id ) );
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* @since 5.0
|
449 |
+
*/
|
450 |
+
public function set_status( $status ) {
|
451 |
+
global $wpdb;
|
452 |
+
|
453 |
+
$old_status = $this->get_status( false, false );
|
454 |
+
$new_status = $status;
|
455 |
+
|
456 |
+
if ( $old_status == $new_status || ! in_array( $new_status, array_keys( self::get_stati() ), true ) )
|
457 |
+
return;
|
458 |
+
|
459 |
+
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'listing_status' => $new_status ), array( 'listing_id' => $this->id ) );
|
460 |
+
|
461 |
+
switch ( $new_status ) {
|
462 |
+
case 'expired':
|
463 |
+
if ( 'trash' != get_post_status( $this->id ) ) {
|
464 |
+
$this->set_post_status( 'draft' );
|
465 |
+
}
|
466 |
+
|
467 |
+
wpbdp_insert_log( array( 'log_type' => 'listing.expired', 'object_id' => $this->id, 'message' => _x( 'Listing expired', 'listing', 'business-directory-plugin' ) ) );
|
468 |
+
do_action( 'wpbdp_listing_expired', $this );
|
469 |
+
break;
|
470 |
+
default:
|
471 |
+
break;
|
472 |
+
}
|
473 |
+
|
474 |
+
do_action( 'wpbdp_listing_status_change', $this, $old_status, $new_status );
|
475 |
+
}
|
476 |
+
|
477 |
+
public function set_post_status( $status ) {
|
478 |
+
if ( ! $this->id )
|
479 |
+
return;
|
480 |
+
|
481 |
+
$status = apply_filters( 'wpbdp_listing_post_status', $status, $this );
|
482 |
+
|
483 |
+
wp_update_post( array( 'post_status' => $status, 'ID' => $this->id ) );
|
484 |
+
}
|
485 |
+
|
486 |
+
public function delete() {
|
487 |
+
global $wpdb;
|
488 |
+
$status = apply_filters( 'wpbdp_delete_post_status', wpbdp_get_option( 'deleted-status' ) );
|
489 |
+
$wpdb->update( $wpdb->posts, array( 'post_status' => $status ), array( 'ID' => $this->id ) );
|
490 |
+
clean_post_cache( $this->id );
|
491 |
+
|
492 |
+
return true;
|
493 |
+
}
|
494 |
+
|
495 |
+
public function notify( $kind = 'save', &$extra = null ) {
|
496 |
+
// if ( in_array( $kind, array( 'save', 'edit', 'new' ), true ) )
|
497 |
+
// $this->save();
|
498 |
+
//
|
499 |
+
// switch ( $kind ) {
|
500 |
+
// case 'save':
|
501 |
+
// break;
|
502 |
+
//
|
503 |
+
// case 'edit':
|
504 |
+
// do_action_ref_array( 'wpbdp_edit_listing', array( &$this, &$extra ) );
|
505 |
+
// break;
|
506 |
+
//
|
507 |
+
// default:
|
508 |
+
// break;
|
509 |
+
// }
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* @since 3.5.3
|
514 |
+
*/
|
515 |
+
public function get_renewal_hash( $deprecated = 0 ) {
|
516 |
+
$hash = base64_encode( 'listing_id=' . $this->id . '&category_id=' . $deprecated );
|
517 |
+
return $hash;
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* @since 5.0
|
522 |
+
*/
|
523 |
+
public function renew() {
|
524 |
+
$plan = $this->get_fee_plan();
|
525 |
+
|
526 |
+
if ( ! $plan )
|
527 |
+
return false;
|
528 |
+
|
529 |
+
global $wpdb;
|
530 |
+
|
531 |
+
$row = array();
|
532 |
+
|
533 |
+
$listing_expiration_time = $this->get_expiration_time();
|
534 |
+
$current_time = current_time( 'timestamp' );
|
535 |
+
$expiration_base_time = $current_time > $listing_expiration_time ? $current_time : $listing_expiration_time;
|
536 |
+
$expiration = $this->calculate_expiration_date( $expiration_base_time, $plan );
|
537 |
+
|
538 |
+
if ( $expiration ) {
|
539 |
+
$row['expiration_date'] = $expiration;
|
540 |
+
}
|
541 |
+
|
542 |
+
if ( ! empty( $row ) ) {
|
543 |
+
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', $row, array( 'listing_id' => $this->id ) );
|
544 |
+
} else {
|
545 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}wpbdp_listings SET expiration_date = NULL WHERE listing_id = %d", $this->id ) );
|
546 |
+
}
|
547 |
+
|
548 |
+
$this->set_status( 'complete' );
|
549 |
+
$this->set_post_status( 'publish' );
|
550 |
+
|
551 |
+
do_action( 'wpbdp_listing_renewed', $this, false, 'admin' );
|
552 |
+
}
|
553 |
+
|
554 |
+
public function get_renewal_url( $deprecated = 0 ) {
|
555 |
+
// TODO: we should probably encode the ID somehow using info that only we have so external users can't
|
556 |
+
// start checking renewal for all listings just by changing the ID.
|
557 |
+
return wpbdp_url( 'renew_listing', $this->id );
|
558 |
+
}
|
559 |
+
|
560 |
+
/**
|
561 |
+
* @since 5.9.2
|
562 |
+
*/
|
563 |
+
public function owned_by_user( $user_id = 'current' ) {
|
564 |
+
if ( $user_id === 'current' ) {
|
565 |
+
$user_id = get_current_user_id();
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( empty( $user_id ) || ! $this->id ) {
|
569 |
+
// This function is currently intended for logged in users.
|
570 |
+
return true;
|
571 |
+
}
|
572 |
+
|
573 |
+
$post = get_post( $this->id );
|
574 |
+
return $user_id === absint( $post->post_author );
|
575 |
+
}
|
576 |
+
|
577 |
+
/**
|
578 |
+
* @since 4.0
|
579 |
+
*/
|
580 |
+
public function get_access_key() {
|
581 |
+
if ( $key = get_post_meta( $this->id, '_wpbdp[access_key]', true ) )
|
582 |
+
return $key;
|
583 |
+
|
584 |
+
// Generate access key.
|
585 |
+
$new_key = sha1( sprintf( '%s%s%d', AUTH_KEY, uniqid( '', true ), rand( 1, 1000 ) ) );
|
586 |
+
if ( update_post_meta( $this->id, '_wpbdp[access_key]', $new_key ) )
|
587 |
+
return $new_key;
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* @since 5.0
|
592 |
+
*/
|
593 |
+
public function validate_access_key_hash( $hash ) {
|
594 |
+
$key = $this->get_access_key();
|
595 |
+
return sha1( AUTH_KEY . $key ) == $hash;
|
596 |
+
}
|
597 |
+
|
598 |
+
public function get_author_meta( $meta ) {
|
599 |
+
if ( ! $this->id )
|
600 |
+
return '';
|
601 |
+
|
602 |
+
$post = get_post( $this->id );
|
603 |
+
return get_the_author_meta( $meta, $post->post_author );
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* @since 3.6.9
|
608 |
+
*/
|
609 |
+
public function get_sticky_status( $consider_plans = true ) {
|
610 |
+
global $wpdb;
|
611 |
+
$is_sticky = (bool) $wpdb->get_var(
|
612 |
+
$wpdb->prepare(
|
613 |
+
"SELECT 1 AS x FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND is_sticky = %d",
|
614 |
+
$this->id,
|
615 |
+
1 )
|
616 |
+
);
|
617 |
+
|
618 |
+
return $is_sticky ? 'sticky' : 'normal';
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* @since 5.0
|
623 |
+
*/
|
624 |
+
public function has_fee_plan( $fee = false ) {
|
625 |
+
$current = $this->get_fee_plan();
|
626 |
+
return ( ! $fee && ! empty( $current ) ) || ( $fee && $current && $current->id == $fee );
|
627 |
+
}
|
628 |
+
|
629 |
+
/**
|
630 |
+
* @since 5.0
|
631 |
+
*/
|
632 |
+
public function get_fee_plan() {
|
633 |
+
global $wpdb;
|
634 |
+
|
635 |
+
$sql = $wpdb->prepare( "SELECT listing_id, fee_id, fee_price, fee_days, fee_images, expiration_date, is_recurring, is_sticky FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d LIMIT 1", $this->id );
|
636 |
+
$res = WPBDP_Utils::check_cache(
|
637 |
+
array(
|
638 |
+
'cache_key' => 'listing_fee_plan' . $this->id,
|
639 |
+
'group' => 'wpbdp_listings',
|
640 |
+
'query' => $sql,
|
641 |
+
'type' => 'get_row',
|
642 |
+
)
|
643 |
+
);
|
644 |
+
if ( ! $res ) {
|
645 |
+
return false;
|
646 |
+
}
|
647 |
+
|
648 |
+
if ( $res->fee_id ) {
|
649 |
+
$fee = wpbdp_get_fee_plan( $res->fee_id );
|
650 |
+
} else {
|
651 |
+
$fee = null;
|
652 |
+
}
|
653 |
+
|
654 |
+
$res->fee = $fee;
|
655 |
+
$res->fee_label = $fee ? $fee->label : _x( '(Unavailable Plan)', 'listing', 'business-directory-plugin' );
|
656 |
+
$res->expired = $res->expiration_date ? strtotime( $res->expiration_date ) <= current_time( 'timestamp' ) : false;
|
657 |
+
|
658 |
+
return $res;
|
659 |
+
}
|
660 |
+
|
661 |
+
/**
|
662 |
+
* @since 5.0
|
663 |
+
*/
|
664 |
+
public function update_plan( $plan = null, $args = array() ) {
|
665 |
+
global $wpdb;
|
666 |
+
|
667 |
+
$args = wp_parse_args( $args, array(
|
668 |
+
'clear' => 0, /* Whether to use old values (if available). */
|
669 |
+
'recalculate' => 1 /* Whether to recalculate the expiration or not */
|
670 |
+
) );
|
671 |
+
|
672 |
+
$row = array();
|
673 |
+
|
674 |
+
if ( is_numeric( $plan ) || ( is_array( $plan ) && ! empty( $plan['fee_id'] ) ) ) {
|
675 |
+
$plan_id = is_numeric( $plan ) ? absint( $plan ) : absint( $plan['fee_id'] );
|
676 |
+
|
677 |
+
if ( $plan_ = wpbdp_get_fee_plan( $plan_id ) ) {
|
678 |
+
$row['fee_id'] = $plan_id;
|
679 |
+
$row['fee_images'] = $plan_->images;
|
680 |
+
$row['fee_days'] = $plan_->days;
|
681 |
+
$row['is_sticky'] = $plan_->sticky;
|
682 |
+
$row['fee_price'] = $plan_->amount;
|
683 |
+
$row['is_recurring'] = $plan_->recurring;
|
684 |
+
}
|
685 |
+
}
|
686 |
+
|
687 |
+
if ( is_array( $plan ) ) {
|
688 |
+
foreach ( array( 'fee_days', 'fee_images', 'fee_price', 'is_sticky', 'expiration_date', 'is_recurring', 'subscription_id', 'subscription_data' ) as $key ) {
|
689 |
+
if ( array_key_exists( $key, $plan ) ) {
|
690 |
+
$row[ $key ] = $plan[ $key ];
|
691 |
+
}
|
692 |
+
}
|
693 |
+
|
694 |
+
if ( ! empty( $plan['amount'] ) ) {
|
695 |
+
$row['fee_price'] = $plan['amount'];
|
696 |
+
}
|
697 |
+
}
|
698 |
+
|
699 |
+
if ( ! $args['clear'] ) {
|
700 |
+
$old_row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ), ARRAY_A );
|
701 |
+
|
702 |
+
if ( $old_row ) {
|
703 |
+
$row = array_merge( $old_row, $row );
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
if ( empty( $row ) )
|
708 |
+
return false;
|
709 |
+
|
710 |
+
$row['listing_id'] = $this->id;
|
711 |
+
$row['is_sticky'] = (int) $row['is_sticky'];
|
712 |
+
|
713 |
+
if ( $args['recalculate'] ) {
|
714 |
+
if ( ! $plan || ! array_key_exists( 'expiration_date', $plan ) ) {
|
715 |
+
$expiration = $this->calculate_expiration_date( current_time( 'timestamp' ), $row );
|
716 |
+
|
717 |
+
if ( $expiration ) {
|
718 |
+
$row['expiration_date'] = $expiration;
|
719 |
+
}
|
720 |
+
}
|
721 |
+
}
|
722 |
+
|
723 |
+
if ( is_null( $row['expiration_date'] ) || empty( $row['expiration_date'] ) ) {
|
724 |
+
unset( $row['expiration_date'] );
|
725 |
+
}
|
726 |
+
|
727 |
+
if ( ! empty( $row['recurring_data'] ) ) {
|
728 |
+
$row['recurring_data'] = maybe_serialize( $row['recurring_data'] );
|
729 |
+
}
|
730 |
+
|
731 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
732 |
+
return $wpdb->replace( "{$wpdb->prefix}wpbdp_listings", $row );
|
733 |
+
}
|
734 |
+
|
735 |
+
/**
|
736 |
+
* @since 5.0
|
737 |
+
*/
|
738 |
+
public function set_fee_plan( $fee, $recurring_data = array() ) {
|
739 |
+
global $wpdb;
|
740 |
+
|
741 |
+
WPBDP_Utils::cache_delete_group( 'wpbdp_listings' );
|
742 |
+
|
743 |
+
if ( is_null( $fee ) ) {
|
744 |
+
$wpdb->delete( $wpdb->prefix . 'wpbdp_listings', array( 'listing_id' => $this->id ) );
|
745 |
+
// $wpdb->replace( $wpdb->prefix . 'wpbdp_listings', array( 'listing_id' => $this->id, 'fee_id' => null, 'fee_days' => 0, 'fee_images' => 0, 'is_sticky' => 0, 'expiration_date' => null ) );
|
746 |
+
return true;
|
747 |
+
}
|
748 |
+
|
749 |
+
$fee = is_numeric( $fee ) ? wpbdp_get_fee_plan( $fee ) : $fee;
|
750 |
+
|
751 |
+
if ( ! $fee )
|
752 |
+
return false;
|
753 |
+
|
754 |
+
$row = array(
|
755 |
+
'listing_id' => $this->id,
|
756 |
+
'fee_id' => $fee->id,
|
757 |
+
'fee_days' => $fee->days,
|
758 |
+
'fee_images' => $fee->images,
|
759 |
+
'fee_price' => $fee->calculate_amount( wp_get_post_terms( $this->id, WPBDP_CATEGORY_TAX, array( 'fields' => 'ids' ) ) ),
|
760 |
+
'is_recurring' => $fee->recurring || ! empty( $recurring_data ),
|
761 |
+
'is_sticky' => (int) $fee->sticky,
|
762 |
+
);
|
763 |
+
|
764 |
+
if ( $expiration = $this->calculate_expiration_date( current_time( 'timestamp' ), $fee ) )
|
765 |
+
$row['expiration_date'] = $expiration;
|
766 |
+
|
767 |
+
if ( ! empty( $recurring_data ) ) {
|
768 |
+
$row['subscription_id'] = ! empty( $recurring_data['subscription_id'] ) ? $recurring_data['subscription_id'] : '';
|
769 |
+
$row['subscription_data'] = ! empty( $recurring_data['subscription_data'] ) ? serialize( $recurring_data['subscription_data'] ) : '';
|
770 |
+
}
|
771 |
+
|
772 |
+
return $wpdb->replace( $wpdb->prefix . 'wpbdp_listings', $row );
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
+
* @since 5.0
|
777 |
+
*/
|
778 |
+
public function set_fee_plan_with_payment( $fee, $recurring = false ) {
|
779 |
+
$previous_plan = $this->get_fee_plan();
|
780 |
+
$fee = is_numeric( $fee ) ? wpbdp_get_fee_plan( $fee ) : $fee;
|
781 |
+
$this->set_fee_plan( $fee );
|
782 |
+
$plan = $this->get_fee_plan();
|
783 |
+
|
784 |
+
if ( $previous_plan && $fee->id == $previous_plan->fee_id ) {
|
785 |
+
return null;
|
786 |
+
}
|
787 |
+
|
788 |
+
$payment_type = $previous_plan ? 'plan_change' : 'initial';
|
789 |
+
|
790 |
+
return $this->create_payment_from_plan( $payment_type, $plan );
|
791 |
+
}
|
792 |
+
|
793 |
+
public function generate_or_retrieve_payment() {
|
794 |
+
$plan = $this->get_fee_plan();
|
795 |
+
|
796 |
+
if ( ! $plan )
|
797 |
+
return false;
|
798 |
+
|
799 |
+
$existing_payment = WPBDP_Payment::objects()->filter( array( 'listing_id' => $this->id, 'payment_type' => 'initial' ) )->get();
|
800 |
+
|
801 |
+
if ( $existing_payment )
|
802 |
+
return $existing_payment;
|
803 |
+
|
804 |
+
return $this->create_payment_from_plan( 'initial', $plan );
|
805 |
+
}
|
806 |
+
|
807 |
+
/**
|
808 |
+
* @since 5.1.9
|
809 |
+
*/
|
810 |
+
private function create_payment_from_plan( $payment_type, $plan ) {
|
811 |
+
$payment = new WPBDP_Payment( array(
|
812 |
+
'listing_id' => $this->id,
|
813 |
+
'payment_type' => $payment_type,
|
814 |
+
) );
|
815 |
+
|
816 |
+
if ( $plan->is_recurring ) {
|
817 |
+
$item_description = sprintf( _x( 'Plan "%s" (recurring)', 'listing', 'business-directory-plugin' ), $plan->fee_label );
|
818 |
+
} else {
|
819 |
+
$item_description = sprintf( _x( 'Plan "%s"', 'listing', 'business-directory-plugin' ), $plan->fee_label );
|
820 |
+
}
|
821 |
+
|
822 |
+
$payment->payment_items[] = array(
|
823 |
+
'type' => $plan->is_recurring ? 'recurring_plan' : 'plan',
|
824 |
+
'description' => $item_description,
|
825 |
+
'amount' => $plan->fee_price,
|
826 |
+
'fee_id' => $plan->fee_id,
|
827 |
+
'fee_days' => $plan->fee_days,
|
828 |
+
'fee_images' => $plan->fee_images,
|
829 |
+
);
|
830 |
+
|
831 |
+
$payment->save();
|
832 |
+
|
833 |
+
return $payment;
|
834 |
+
}
|
835 |
+
|
836 |
+
/**
|
837 |
+
* @since 5.0
|
838 |
+
*/
|
839 |
+
public function get_expiration_date() {
|
840 |
+
$plan = $this->get_fee_plan();
|
841 |
+
return $plan ? $plan->expiration_date : null;
|
842 |
+
}
|
843 |
+
|
844 |
+
/**
|
845 |
+
* @since 5.0
|
846 |
+
*/
|
847 |
+
public function get_expiration_time() {
|
848 |
+
return strtotime( $this->get_expiration_date() );
|
849 |
+
}
|
850 |
+
|
851 |
+
/**
|
852 |
+
* @since 5.0
|
853 |
+
*/
|
854 |
+
public function get_status( $force_refresh = false, $calculate = true ) {
|
855 |
+
global $wpdb;
|
856 |
+
|
857 |
+
$status_ = $wpdb->get_var( $wpdb->prepare( "SELECT listing_status FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) );
|
858 |
+
|
859 |
+
if ( 'unknown' == $status_ || $force_refresh ) {
|
860 |
+
if ( $calculate ) {
|
861 |
+
$status = $this->calculate_status();
|
862 |
+
} else {
|
863 |
+
$status = 'unknown';
|
864 |
+
}
|
865 |
+
} else if ( ! $status_ ) {
|
866 |
+
$status = 'incomplete';
|
867 |
+
} else {
|
868 |
+
$status = $status_;
|
869 |
+
}
|
870 |
+
|
871 |
+
$status = apply_filters( 'wpbdp_listing_status', $status, $this->id );
|
872 |
+
|
873 |
+
if ( ! $status_ || $status_ != $status || $force_refresh )
|
874 |
+
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'listing_status' => $status ), array( 'listing_id' => $this->id ) );
|
875 |
+
|
876 |
+
return $status;
|
877 |
+
}
|
878 |
+
|
879 |
+
/**
|
880 |
+
* @since 5.0
|
881 |
+
*/
|
882 |
+
public function get_status_label() {
|
883 |
+
$stati = self::get_stati();
|
884 |
+
|
885 |
+
return $stati[ $this->get_status() ];
|
886 |
+
}
|
887 |
+
|
888 |
+
/**
|
889 |
+
* @since 5.0
|
890 |
+
*/
|
891 |
+
private function calculate_status() {
|
892 |
+
global $wpdb;
|
893 |
+
|
894 |
+
$is_expired = (bool) $wpdb->get_var(
|
895 |
+
$wpdb->prepare(
|
896 |
+
"SELECT 1 AS x FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d AND expiration_date IS NOT NULL AND expiration_date < %s",
|
897 |
+
$this->id,
|
898 |
+
current_time( 'mysql' )
|
899 |
+
)
|
900 |
+
);
|
901 |
+
$pending_payment = $wpdb->get_row(
|
902 |
+
$wpdb->prepare(
|
903 |
+
"SELECT * FROM {$wpdb->prefix}wpbdp_payments WHERE listing_id = %d AND status = %s ORDER BY id DESC LIMIT 1",
|
904 |
+
$this->id,
|
905 |
+
'pending'
|
906 |
+
)
|
907 |
+
);
|
908 |
+
|
909 |
+
if ( ! $pending_payment || ! in_array( $pending_payment->payment_type, array( 'initial', 'renewal' ), true ) )
|
910 |
+
return $is_expired ? 'expired' : 'complete';
|
911 |
+
|
912 |
+
return ( 'initial' == $pending_payment->payment_type ? 'pending_payment' : 'pending_renewal' );
|
913 |
+
}
|
914 |
+
|
915 |
+
/**
|
916 |
+
* @since 5.0
|
917 |
+
*/
|
918 |
+
public static function get_stati() {
|
919 |
+
$stati = array(
|
920 |
+
'unknown' => _x( 'Unknown', 'listing status', 'business-directory-plugin' ),
|
921 |
+
'legacy' => _x( 'Legacy', 'listing status', 'business-directory-plugin' ),
|
922 |
+
'incomplete' => _x( 'Incomplete', 'listing status', 'business-directory-plugin' ),
|
923 |
+
'pending_payment' => _x( 'Pending Payment', 'listing status', 'business-directory-plugin' ),
|
924 |
+
'complete' => _x( 'Complete', 'listing status', 'business-directory-plugin' ),
|
925 |
+
'pending_upgrade' => _x( 'Pending Upgrade', 'listing status', 'business-directory-plugin' ),
|
926 |
+
'expired' => _x( 'Expired', 'listing status', 'business-directory-plugin' ),
|
927 |
+
'pending_renewal' => _x( 'Pending Renewal', 'listing status', 'business-directory-plugin' ),
|
928 |
+
'abandoned' => _x( 'Abandoned', 'listing status', 'business-directory-plugin' ),
|
929 |
+
);
|
930 |
+
$stati = apply_filters( 'wpbdp_listing_stati', $stati );
|
931 |
+
|
932 |
+
return $stati;
|
933 |
+
}
|
934 |
+
|
935 |
+
/**
|
936 |
+
* @since next-release
|
937 |
+
*/
|
938 |
+
public static function count_listings( $args = array() ) {
|
939 |
+
global $wpdb;
|
940 |
+
|
941 |
+
$args = self::parse_count_args( $args );
|
942 |
+
extract( $args );
|
943 |
+
|
944 |
+
$query_post_statuses = "'" . implode( "','", $post_status ) . "'";
|
945 |
+
$query_listing_statuses = "'" . implode( "','", $status ) . "'";
|
946 |
+
$query = "SELECT COUNT(*) FROM {$wpdb->posts} p JOIN {$wpdb->prefix}wpbdp_listings l ON p.ID = l.listing_id WHERE p.post_type = %s AND p.post_status IN ({$query_post_statuses}) AND l.listing_status IN ({$query_listing_statuses})";
|
947 |
+
$query = $wpdb->prepare( $query, WPBDP_POST_TYPE );
|
948 |
+
|
949 |
+
return absint( $wpdb->get_var( $query ) );
|
950 |
+
}
|
951 |
+
|
952 |
+
private static function parse_count_args( $args = array() ) {
|
953 |
+
$args = wp_parse_args( $args, array(
|
954 |
+
'post_status' => 'all',
|
955 |
+
'status' => 'all',
|
956 |
+
) );
|
957 |
+
|
958 |
+
if ( ! is_array( $args['post_status'] ) ) {
|
959 |
+
if ( 'all' == $args['post_status'] ) {
|
960 |
+
$args['post_status'] = array_keys( get_post_statuses() );
|
961 |
+
} else {
|
962 |
+
$args['post_status'] = explode( ',', $args['post_status'] );
|
963 |
+
}
|
964 |
+
}
|
965 |
+
|
966 |
+
if ( ! is_array( $args['status'] ) ) {
|
967 |
+
if ( 'all' == $args['status'] ) {
|
968 |
+
$args['status'] = array_keys( self::get_stati() );
|
969 |
+
} else {
|
970 |
+
$args['status'] = explode( ',', $args['status'] );
|
971 |
+
}
|
972 |
+
}
|
973 |
+
|
974 |
+
return $args;
|
975 |
+
}
|
976 |
+
|
977 |
+
public static function count_listings_with_no_fee_plan( $args = array() ) {
|
978 |
+
global $wpdb;
|
979 |
+
|
980 |
+
$args = self::parse_count_args( $args );
|
981 |
+
|
982 |
+
$query_post_statuses = "'" . implode( "','", $args['post_status'] ) . "'";
|
983 |
+
|
984 |
+
$query = "SELECT COUNT(*) FROM {$wpdb->posts} p ";
|
985 |
+
$query .= "LEFT JOIN {$wpdb->prefix}wpbdp_listings l ON ( p.ID = l.listing_id ) ";
|
986 |
+
$query .= 'WHERE p.post_type = %s ';
|
987 |
+
$query .= "AND post_status IN ({$query_post_statuses}) ";
|
988 |
+
$query .= 'AND l.listing_id IS NULL ';
|
989 |
+
|
990 |
+
return absint( $wpdb->get_var( $wpdb->prepare( $query, WPBDP_POST_TYPE ) ) );
|
991 |
+
}
|
992 |
+
|
993 |
+
/**
|
994 |
+
* @since 5.0
|
995 |
+
*/
|
996 |
+
public static function validate_access_key( $key, $email = '' ) {
|
997 |
+
if ( ! $key )
|
998 |
+
return false;
|
999 |
+
|
1000 |
+
global $wpdb;
|
1001 |
+
|
1002 |
+
$post_id = $wpdb->get_var(
|
1003 |
+
$wpdb->prepare( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s",
|
1004 |
+
'_wpbdp[access_key]',
|
1005 |
+
$key )
|
1006 |
+
);
|
1007 |
+
|
1008 |
+
if ( ! $post_id ) {
|
1009 |
+
return false;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
return intval( $wpdb->get_var(
|
1013 |
+
$wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_value = %s",
|
1014 |
+
$post_id,
|
1015 |
+
$email )
|
1016 |
+
) ) > 0;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
/**
|
1020 |
+
* @since 5.0
|
1021 |
+
*/
|
1022 |
+
public function get_sequence_id() {
|
1023 |
+
$sequence_id = get_post_meta( $this->id, '_wpbdp[import_sequence_id]', true );
|
1024 |
+
|
1025 |
+
if ( ! $sequence_id ) {
|
1026 |
+
global $wpdb;
|
1027 |
+
|
1028 |
+
$candidate = intval( $wpdb->get_var( $wpdb->prepare( "SELECT MAX(CAST(meta_value AS UNSIGNED INTEGER )) FROM {$wpdb->postmeta} WHERE meta_key = %s",
|
1029 |
+
'_wpbdp[import_sequence_id]' ) ) );
|
1030 |
+
$candidate++;
|
1031 |
+
|
1032 |
+
if ( false == add_post_meta( $this->id, '_wpbdp[import_sequence_id]', $candidate, true ) ) {
|
1033 |
+
$sequence_id = 0;
|
1034 |
+
} else {
|
1035 |
+
$sequence_id = $candidate;
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
return $sequence_id;
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
/**
|
1043 |
+
* @since 5.0
|
1044 |
+
*/
|
1045 |
+
public function get_flags() {
|
1046 |
+
global $wpdb;
|
1047 |
+
|
1048 |
+
$flags = trim( $wpdb->get_var( $wpdb->prepare( "SELECT flags FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) ) );
|
1049 |
+
|
1050 |
+
if ( ! $flags )
|
1051 |
+
return array();
|
1052 |
+
|
1053 |
+
return explode( ',', $flags );
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
/**
|
1057 |
+
* @since 5.0
|
1058 |
+
*/
|
1059 |
+
public function set_flag( $flag ) {
|
1060 |
+
global $wpdb;
|
1061 |
+
|
1062 |
+
$flags = $this->get_flags();
|
1063 |
+
|
1064 |
+
if ( ! in_array( $flag, $flags, true ) )
|
1065 |
+
$flags[] = $flag;
|
1066 |
+
|
1067 |
+
$wpdb->update( $wpdb->prefix . 'wpbdp_listings', array( 'flags' => implode( ',', $flags ) ), array( 'listing_id' => $this->id ) );
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
/**
|
1071 |
+
* @since 5.0
|
1072 |
+
*/
|
1073 |
+
public function _after_save( $context = '' ) {
|
1074 |
+
if ( 'submit-new' == $context ) {
|
1075 |
+
do_action( 'WPBDP_Listing::listing_created', $this->id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
|
1076 |
+
do_action( 'wpbdp_add_listing', $this->id );
|
1077 |
+
} elseif ( 'submit-edit' == $context ) {
|
1078 |
+
do_action( 'wpbdp_edit_listing', $this->id );
|
1079 |
+
do_action( 'WPBDP_Listing::listing_edited', $this->id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
do_action( 'wpbdp_save_listing', $this->id, 'submit-new' == $context );
|
1083 |
+
|
1084 |
+
$this->get_status(); // This forces a status refresh if there's no status.
|
1085 |
+
|
1086 |
+
// Do not let expired listings be public.
|
1087 |
+
if ( $this->get_status() && in_array( $this->get_status(), array( 'expired', 'pending_renewal' ) ) && 'publish' == get_post_status( $this->id ) ) {
|
1088 |
+
$this->set_post_status( 'draft' );
|
1089 |
+
}
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
/**
|
1093 |
+
* @since 5.0
|
1094 |
+
*/
|
1095 |
+
public function after_delete( $context = '' ) {
|
1096 |
+
global $wpdb;
|
1097 |
+
|
1098 |
+
// Remove attachments.
|
1099 |
+
$attachments = get_posts( array( 'post_type' => 'attachment', 'post_parent' => $this->id, 'numberposts' => -1, 'fields' => 'ids' ) );
|
1100 |
+
foreach ( $attachments as $attachment_id )
|
1101 |
+
wp_delete_attachment( $attachment_id, true );
|
1102 |
+
|
1103 |
+
// Remove listing fees.
|
1104 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}wpbdp_listings WHERE listing_id = %d", $this->id ) );
|
1105 |
+
|
1106 |
+
// Delete logs.
|
1107 |
+
$wpdb->delete( $wpdb->prefix . 'wpbdp_logs', array( 'object_type' => 'listing', 'object_id' => $this->id ) );
|
1108 |
+
|
1109 |
+
// Remove payment information.
|
1110 |
+
foreach ( $wpdb->get_col( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}wpbdp_payments WHERE listing_id = %d", $this->id ) ) as $payment_id ) {
|
1111 |
+
$payment = WPBDP_Payment::objects()->get( $payment_id );
|
1112 |
+
if ( $payment ) {
|
1113 |
+
$payment->delete();
|
1114 |
+
}
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
/**
|
1119 |
+
* @since 5.0
|
1120 |
+
*/
|
1121 |
+
public static function insert_or_update( $args = array(), $error = false ) {
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
public static function get( $id ) {
|
1125 |
+
if ( WPBDP_POST_TYPE !== get_post_type( $id ) )
|
1126 |
+
return null;
|
1127 |
+
|
1128 |
+
$l = new self( $id );
|
1129 |
+
$l->new = false;
|
1130 |
+
return $l;
|
1131 |
+
}
|
1132 |
+
}
|
includes/models/class-module.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Lightweight wrapper for extension modules, ensuring all basic info is always available.
|
4 |
+
*
|
5 |
+
* @since 5.0
|
6 |
+
*/
|
7 |
+
final class WPBDP__Module {
|
8 |
+
|
9 |
+
public $file;
|
10 |
+
public $title;
|
11 |
+
public $id;
|
12 |
+
public $version;
|
13 |
+
public $required_bd_version;
|
14 |
+
|
15 |
+
public $text_domain;
|
16 |
+
public $text_domain_path;
|
17 |
+
|
18 |
+
public $is_premium_module = true;
|
19 |
+
|
20 |
+
private $module;
|
21 |
+
|
22 |
+
|
23 |
+
public function __construct( $obj ) {
|
24 |
+
$this->module = $obj;
|
25 |
+
|
26 |
+
foreach ( array( 'file', 'id' ) as $required_prop ) {
|
27 |
+
if ( ! isset( $obj->{$required_prop} ) )
|
28 |
+
throw new Exception( sprintf( '%s is not a valid Business Directory module!', get_class( $obj ) ) );
|
29 |
+
|
30 |
+
$this->{$required_prop} = $obj->{$required_prop};
|
31 |
+
}
|
32 |
+
|
33 |
+
$plugin_data = get_file_data( $obj->file, array( 'Plugin Name', 'Version', 'Text Domain', 'Domain Path' ) );
|
34 |
+
|
35 |
+
$this->title = empty( $obj->title ) ? $plugin_data[0] : $obj->title;
|
36 |
+
$this->version = empty( $obj->version ) ? $plugin_data[1] : $obj->version;
|
37 |
+
$this->text_domain = empty( $obj->text_domain ) ? $plugin_data[2] : $obj->text_domain;
|
38 |
+
$this->text_domain_path = empty( $obj->domain_path ) ? $plugin_data[3] : $obj->domain_path;
|
39 |
+
|
40 |
+
if ( empty( $this->text_domain ) ) {
|
41 |
+
$this->text_domain = 'wpbdp-' . $this->id;
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( empty( $this->text_domain_path ) ) {
|
45 |
+
foreach ( array( 'translations', 'languages' ) as $d ) {
|
46 |
+
if ( is_dir( plugin_dir_path( $this->file ) . $d ) ) {
|
47 |
+
$this->text_domain_path = '/' . $d;
|
48 |
+
break;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
$this->required_bd_version = isset( $obj->required_bd_version ) ? $obj->required_bd_version : '';
|
54 |
+
$this->is_premium_module = ! ( in_array( $this->id, array( 'categories' ), true ) && version_compare( $this->version, '5.0.12', 'le' ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
public function __call( $name, $args ) {
|
58 |
+
if ( method_exists( $this->module, $name ) )
|
59 |
+
return call_user_func_array( array( $this->module, $name ), $args );
|
60 |
+
elseif ( in_array( $name, array( 'init' ), true ) )
|
61 |
+
return;
|
62 |
+
|
63 |
+
throw new Exception( 'Invalid method called!' );
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
67 |
+
|
includes/models/class-payment.php
ADDED
@@ -0,0 +1,391 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package WPBDP/Includes
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Class WPBDP_Payment
|
8 |
+
*/
|
9 |
+
class WPBDP_Payment extends WPBDP__DB__Model {
|
10 |
+
|
11 |
+
public static $serialized = array( 'payment_items', 'payer_data', 'data' );
|
12 |
+
|
13 |
+
private $old_status = '';
|
14 |
+
|
15 |
+
private $listing = array();
|
16 |
+
|
17 |
+
protected function get_defaults() {
|
18 |
+
return array(
|
19 |
+
'parent_id' => 0,
|
20 |
+
'payment_items' => array(),
|
21 |
+
'payer_data' => array(),
|
22 |
+
'gateway_data' => array(),
|
23 |
+
'status' => 'pending',
|
24 |
+
'currency_code' => wpbdp_get_option( 'currency', 'USD' ),
|
25 |
+
'amount' => 0.0,
|
26 |
+
'data' => array(),
|
27 |
+
'test' => false,
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
protected function prepare_row() {
|
32 |
+
$row = parent::prepare_row();
|
33 |
+
|
34 |
+
// Remove unnecessary columns.
|
35 |
+
// FIXME: In the future we should not use WPBDP__DB__Model at all. See #2945.
|
36 |
+
// FIXME: We also need to remove at least `created_on`, `processed_on` and `processed_by` which are not used anywhere.
|
37 |
+
unset( $row['created_on'] );
|
38 |
+
unset( $row['processed_on'] );
|
39 |
+
unset( $row['processed_by'] );
|
40 |
+
|
41 |
+
return $row;
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function before_save( $new = false ) {
|
45 |
+
if ( ! $this->payment_key ) {
|
46 |
+
$this->payment_key = strtolower( sha1( $this->listing_id . date( 'Y-m-d H:i:s' ) . ( defined( 'AUTH_KEY' ) ? AUTH_KEY : '' ) . uniqid( 'wpbdp', true ) ) );
|
47 |
+
}
|
48 |
+
|
49 |
+
$this->amount = 0.0;
|
50 |
+
|
51 |
+
foreach ( $this->payment_items as $item ) {
|
52 |
+
$this->amount += floatval( $item['amount'] );
|
53 |
+
}
|
54 |
+
|
55 |
+
if ( 0.0 == $this->amount ) {
|
56 |
+
if ( ! $this->has_item_type( 'discount_code' ) ) {
|
57 |
+
$this->status = 'completed';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
protected function after_save( $new = false ) {
|
63 |
+
if ( $new ) {
|
64 |
+
wpbdp_insert_log(
|
65 |
+
array(
|
66 |
+
'log_type' => 'listing.payment',
|
67 |
+
'object_id' => $this->listing_id,
|
68 |
+
'rel_object_id' => $this->id,
|
69 |
+
)
|
70 |
+
);
|
71 |
+
}
|
72 |
+
|
73 |
+
if ( ! $this->old_status || ! $this->status ) {
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( $this->old_status != $this->status ) {
|
78 |
+
wpbdp_insert_log(
|
79 |
+
array(
|
80 |
+
'log_type' => 'payment.status_change',
|
81 |
+
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
82 |
+
'object_id' => $this->id,
|
83 |
+
'message' => sprintf( _x( 'Payment status changed from "%1$s" to "%2$s".', 'payment', 'business-directory-plugin' ), $this->old_status, $this->status ),
|
84 |
+
)
|
85 |
+
);
|
86 |
+
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
87 |
+
do_action_ref_array( 'WPBDP_Payment::status_change', array( &$this, $this->old_status, $this->status ) );
|
88 |
+
do_action( "wpbdp_payment_{$this->status}", $this );
|
89 |
+
}
|
90 |
+
|
91 |
+
$this->old_status = $this->status;
|
92 |
+
}
|
93 |
+
|
94 |
+
protected function after_delete() {
|
95 |
+
global $wpdb;
|
96 |
+
$wpdb->delete(
|
97 |
+
$wpdb->prefix . 'wpbdp_logs',
|
98 |
+
array(
|
99 |
+
'object_type' => 'payment',
|
100 |
+
'object_id' => $this->id,
|
101 |
+
)
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
protected function set_attr( $name, $value ) {
|
106 |
+
if ( in_array( $name, self::$serialized, true ) ) {
|
107 |
+
$value = is_array( $value ) ? $value : array();
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( 'status' == $name ) {
|
111 |
+
$this->old_status = $this->status;
|
112 |
+
}
|
113 |
+
|
114 |
+
return parent::set_attr( $name, $value );
|
115 |
+
}
|
116 |
+
|
117 |
+
public function get_listing() {
|
118 |
+
if ( empty( $this->listing ) ) {
|
119 |
+
$this->listing = WPBDP_Listing::get( $this->listing_id );
|
120 |
+
}
|
121 |
+
return $this->listing;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function get_summary() {
|
125 |
+
$summary = '';
|
126 |
+
|
127 |
+
switch ( $this->payment_type ) {
|
128 |
+
case 'initial':
|
129 |
+
$summary = sprintf( _x( 'Initial payment ("%s")', 'payment', 'business-directory-plugin' ), $this->get_listing()->get_title() );
|
130 |
+
break;
|
131 |
+
case 'renewal':
|
132 |
+
$summary = sprintf( _x( 'Renewal payment ("%s")', 'payment', 'business-directory-plugin' ), $this->get_listing()->get_title() );
|
133 |
+
break;
|
134 |
+
default:
|
135 |
+
break;
|
136 |
+
}
|
137 |
+
|
138 |
+
if ( ! $summary ) {
|
139 |
+
$first_item = reset( $this->payment_items );
|
140 |
+
$summary = $first_item['description'];
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( 'admin-submit' == $this->context ) {
|
144 |
+
$summary = sprintf( _x( '%s. Admin Posted.', 'payment summary', 'business-directory-plugin' ), $summary );
|
145 |
+
} elseif ( 'csv-import' == $this->context ) {
|
146 |
+
$summary = sprintf( _x( '%s. Imported Listing.', 'payment summary', 'business-directory-plugin' ), $summary );
|
147 |
+
}
|
148 |
+
|
149 |
+
return $summary;
|
150 |
+
}
|
151 |
+
|
152 |
+
public function get_created_at_date() {
|
153 |
+
$date = date_parse( $this->created_at );
|
154 |
+
extract( $date );
|
155 |
+
|
156 |
+
return compact( 'year', 'month', 'day' );
|
157 |
+
}
|
158 |
+
|
159 |
+
public function get_created_at_time() {
|
160 |
+
$date = date_parse( $this->created_at );
|
161 |
+
extract( $date );
|
162 |
+
|
163 |
+
return compact( 'hour', 'minute' );
|
164 |
+
}
|
165 |
+
|
166 |
+
public function get_payer_details() {
|
167 |
+
$data = array();
|
168 |
+
$data['email'] = $this->payer_email;
|
169 |
+
$data['first_name'] = $this->payer_first_name;
|
170 |
+
$data['last_name'] = $this->payer_last_name;
|
171 |
+
$data['country'] = '';
|
172 |
+
$data['state'] = '';
|
173 |
+
$data['city'] = '';
|
174 |
+
$data['address'] = '';
|
175 |
+
$data['address_2'] = '';
|
176 |
+
$data['zip'] = '';
|
177 |
+
|
178 |
+
foreach ( (array) $this->payer_data as $k => $v ) {
|
179 |
+
$data[ $k ] = $v;
|
180 |
+
}
|
181 |
+
$this->fill_from_listing( $data );
|
182 |
+
|
183 |
+
return $data;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* If the payer is empty, get info from the listing.
|
188 |
+
*
|
189 |
+
* @since 5.11
|
190 |
+
*/
|
191 |
+
private function fill_from_listing( &$data ) {
|
192 |
+
$this->get_listing();
|
193 |
+
if ( empty( $this->listing ) ) {
|
194 |
+
return;
|
195 |
+
}
|
196 |
+
|
197 |
+
$map = array(
|
198 |
+
'email' => array( 'email', 'business_contact_email' ),
|
199 |
+
'country' => array( 'country' ),
|
200 |
+
'state' => array( 'state' ),
|
201 |
+
'city' => array( 'city' ),
|
202 |
+
'zip' => array( 'zip_code', 'zip' ),
|
203 |
+
);
|
204 |
+
|
205 |
+
foreach ( $map as $key => $fields ) {
|
206 |
+
foreach ( $fields as $field ) {
|
207 |
+
if ( empty( $data[ $key ] ) ) {
|
208 |
+
$data[ $key ] = $this->listing->get_field_value( $field );
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
public function get_payer_address() {
|
215 |
+
$address = array();
|
216 |
+
|
217 |
+
foreach ( array( 'address', 'address_2', 'city', 'state', 'zip', 'country' ) as $k ) {
|
218 |
+
if ( ! empty( $this->payer_data[ $k ] ) ) {
|
219 |
+
$address[ $k ] = $this->payer_data[ $k ];
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
return $address;
|
224 |
+
}
|
225 |
+
|
226 |
+
public function has_item_type( $item_type ) {
|
227 |
+
$item_types = wp_list_pluck( $this->payment_items, 'type' );
|
228 |
+
return in_array( $item_type, $item_types, true );
|
229 |
+
}
|
230 |
+
|
231 |
+
public function find_item( $item_type ) {
|
232 |
+
foreach ( $this->payment_items as $item ) {
|
233 |
+
if ( $item_type == $item['type'] ) {
|
234 |
+
return $item;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
return null;
|
239 |
+
}
|
240 |
+
|
241 |
+
public function process_as_admin() {
|
242 |
+
// $this->payment_items[0]['description'] .= ' ' . _x( '(admin, no charge)', 'submit listing', 'business-directory-plugin' );
|
243 |
+
// $this->payment_items[0]['amount'] = 0.0;
|
244 |
+
$this->status = 'completed';
|
245 |
+
$this->context = 'admin-submit';
|
246 |
+
$this->save();
|
247 |
+
|
248 |
+
wpbdp_insert_log(
|
249 |
+
array(
|
250 |
+
'log_type' => 'payment.note',
|
251 |
+
'object_id' => $this->id,
|
252 |
+
'actor' => is_admin() ? 'user:' . get_current_user_id() : 'system',
|
253 |
+
'message' => _x( 'Listing submitted by admin. Payment skipped.', 'submit listing', 'business-directory-plugin' ),
|
254 |
+
)
|
255 |
+
);
|
256 |
+
}
|
257 |
+
|
258 |
+
public function is_completed() {
|
259 |
+
return 'completed' == $this->status;
|
260 |
+
}
|
261 |
+
|
262 |
+
public function is_pending() {
|
263 |
+
return 'pending' == $this->status;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* The link to view the payment at the gateway.
|
268 |
+
*
|
269 |
+
* @since 5.11
|
270 |
+
*
|
271 |
+
* @return string
|
272 |
+
*/
|
273 |
+
public function get_gateway_link() {
|
274 |
+
$gateway = wpbdp()->payment_gateways->get( $this->gateway );
|
275 |
+
$link = '';
|
276 |
+
if ( $gateway ) {
|
277 |
+
$link = $gateway->get_payment_link( $this );
|
278 |
+
}
|
279 |
+
return $link;
|
280 |
+
}
|
281 |
+
|
282 |
+
public function get_admin_url() {
|
283 |
+
return admin_url( 'admin.php?page=wpbdp_admin_payments&wpbdp-view=details&payment-id=' . $this->id );
|
284 |
+
}
|
285 |
+
|
286 |
+
public function get_checkout_url( $force_http = false ) {
|
287 |
+
$url = wpbdp_url( 'checkout', $this->payment_key );
|
288 |
+
|
289 |
+
if ( ! $force_http && ! is_ssl() ) {
|
290 |
+
$url = set_url_scheme( $url, 'https' );
|
291 |
+
}
|
292 |
+
|
293 |
+
return $url;
|
294 |
+
}
|
295 |
+
|
296 |
+
public function get_return_url() {
|
297 |
+
$params = array(
|
298 |
+
'action' => 'return',
|
299 |
+
'_wpnonce' => wp_create_nonce( 'wpbdp-checkout-' . $this->id ),
|
300 |
+
);
|
301 |
+
|
302 |
+
if ( $this->gateway ) {
|
303 |
+
// Set the correct gateway if leaving to complete the payment.
|
304 |
+
$params['gateway'] = $this->gateway;
|
305 |
+
}
|
306 |
+
|
307 |
+
return add_query_arg( $params, $this->get_checkout_url() );
|
308 |
+
}
|
309 |
+
|
310 |
+
public function get_cancel_url() {
|
311 |
+
// XXX: Is 'cancel-payment' really used?
|
312 |
+
return add_query_arg( 'cancel-payment', '1', $this->get_checkout_url() );
|
313 |
+
}
|
314 |
+
|
315 |
+
public function get_payment_notes() {
|
316 |
+
if ( ! $this->id ) {
|
317 |
+
return array();
|
318 |
+
}
|
319 |
+
|
320 |
+
return wpbdp_get_logs(
|
321 |
+
array(
|
322 |
+
'object_id' => $this->id,
|
323 |
+
'object_type' => 'payment',
|
324 |
+
)
|
325 |
+
);
|
326 |
+
}
|
327 |
+
|
328 |
+
public function log( $msg ) {
|
329 |
+
return wpbdp_insert_log(
|
330 |
+
array(
|
331 |
+
'object_id' => $this->id,
|
332 |
+
'object_type' => 'payment',
|
333 |
+
'log_type' => 'payment.note',
|
334 |
+
'message' => $msg,
|
335 |
+
)
|
336 |
+
);
|
337 |
+
}
|
338 |
+
|
339 |
+
public function set_payment_method( $method ) {
|
340 |
+
$this->gateway = $method;
|
341 |
+
$this->save();
|
342 |
+
}
|
343 |
+
|
344 |
+
public function is_canceled() {
|
345 |
+
return $this->status == self::STATUS_CANCELED;
|
346 |
+
}
|
347 |
+
|
348 |
+
public function is_rejected() {
|
349 |
+
return $this->status == self::STATUS_REJECTED;
|
350 |
+
}
|
351 |
+
|
352 |
+
public function has_been_processed() {
|
353 |
+
return ! empty( $this->processed_by );
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Returns the list of supported payment statuses. By default, this is the list of statuses and their meaning:
|
358 |
+
* - Pending: Payment generated, but not paid.
|
359 |
+
* - Failed: Payment failed/was declined.
|
360 |
+
* - Completed: Payment was received successfuly and order is complete.
|
361 |
+
* - Canceled: Payment was canceled either by the user or the admin.
|
362 |
+
* - Refunded: Payment was refunded by admin.
|
363 |
+
* - On-hold: Not really used, but might be useful for manual payment gateways in the future.
|
364 |
+
*
|
365 |
+
* @return array Array of status => label items.
|
366 |
+
*/
|
367 |
+
public static function get_stati() {
|
368 |
+
$stati = array();
|
369 |
+
$stati['pending'] = _x( 'Pending', 'payment', 'business-directory-plugin' );
|
370 |
+
$stati['failed'] = _x( 'Failed', 'payment', 'business-directory-plugin' );
|
371 |
+
$stati['completed'] = _x( 'Completed', 'payment', 'business-directory-plugin' );
|
372 |
+
$stati['canceled'] = _x( 'Canceled', 'payment', 'business-directory-plugin' );
|
373 |
+
$stati['on-hold'] = _x( 'On Hold', 'payment', 'business-directory-plugin' );
|
374 |
+
$stati['refunded'] = _x( 'Refunded', 'payment', 'business-directory-plugin' );
|
375 |
+
|
376 |
+
return $stati;
|
377 |
+
}
|
378 |
+
|
379 |
+
public static function get_status_label( $status ) {
|
380 |
+
$stati = self::get_stati();
|
381 |
+
return $stati[ $status ];
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* @override
|
386 |
+
*/
|
387 |
+
public static function objects() {
|
388 |
+
return parent::_objects( get_class() );
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
includes/models/class-reviews.php
ADDED
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly.
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Model to handle reviews
|
9 |
+
* This checks if the admin has addeda certain number of listings before requesting for a review.
|
10 |
+
*
|
11 |
+
* @since 5.14.3
|
12 |
+
*/
|
13 |
+
class WPBDP_Reviews {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The obtion name used to check the review status per user.
|
17 |
+
*
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $option_name = 'wpbdp_reviewed';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The review status
|
24 |
+
*
|
25 |
+
* @var array
|
26 |
+
*/
|
27 |
+
private $review_status = array();
|
28 |
+
|
29 |
+
private static $instance = null;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get the instance of the class
|
33 |
+
*/
|
34 |
+
public static function instance() {
|
35 |
+
if ( is_null( self::$instance ) ) {
|
36 |
+
self::$instance = new self();
|
37 |
+
}
|
38 |
+
return self::$instance;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add admin notices as needed for reviews.
|
43 |
+
*
|
44 |
+
* @since 5.14.3
|
45 |
+
*/
|
46 |
+
public function review_request() {
|
47 |
+
|
48 |
+
// Only show the review request to high-level users on business directory pages.
|
49 |
+
if ( ! WPBDP_App_Helper::is_bd_page() ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
add_filter( 'admin_footer_text', array( &$this, 'set_footer_text' ) );
|
54 |
+
|
55 |
+
// Verify that we can do a check for reviews.
|
56 |
+
$this->set_review_status();
|
57 |
+
|
58 |
+
// Check if it has been dismissed or if we can ask later.
|
59 |
+
$dismissed = $this->review_status['dismissed'];
|
60 |
+
$asked = $this->review_status['asked'];
|
61 |
+
if ( 'later' === $dismissed && $asked < 5 ) {
|
62 |
+
$dismissed = false;
|
63 |
+
}
|
64 |
+
|
65 |
+
$week_ago = ( $this->review_status['time'] + WEEK_IN_SECONDS ) <= time();
|
66 |
+
|
67 |
+
if ( empty( $dismissed ) && $week_ago ) {
|
68 |
+
$this->review();
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* When was the review request last dismissed?
|
74 |
+
*
|
75 |
+
* @since 5.14.3
|
76 |
+
*/
|
77 |
+
private function set_review_status() {
|
78 |
+
$user_id = get_current_user_id();
|
79 |
+
$review = $this->get_user_meta( $user_id );
|
80 |
+
$default = array(
|
81 |
+
'time' => time(),
|
82 |
+
'dismissed' => false,
|
83 |
+
'asked' => 0,
|
84 |
+
);
|
85 |
+
|
86 |
+
if ( ! $review || ! is_array( $review ) ) {
|
87 |
+
// Set the review request to show in a week.
|
88 |
+
$this->update_user_meta( $user_id, $default );
|
89 |
+
}
|
90 |
+
|
91 |
+
$review = array_merge( $default, (array) $review );
|
92 |
+
$review['asked'] = (int) $review['asked'];
|
93 |
+
$this->review_status = $review;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Maybe show review request.
|
98 |
+
* Include the review html file.
|
99 |
+
*
|
100 |
+
* @since 5.14.3
|
101 |
+
*/
|
102 |
+
private function review() {
|
103 |
+
|
104 |
+
// show the review request 5 times, depending on the number of entries.
|
105 |
+
$show_intervals = array( 25, 50, 100, 200, 500 );
|
106 |
+
$asked = $this->review_status['asked'];
|
107 |
+
|
108 |
+
if ( ! isset( $show_intervals[ $asked ] ) ) {
|
109 |
+
return;
|
110 |
+
}
|
111 |
+
|
112 |
+
$entries = WPBDP_Listing::count_listings();
|
113 |
+
$count = $show_intervals[ $asked ];
|
114 |
+
$user = wp_get_current_user();
|
115 |
+
|
116 |
+
// Only show review request if the site has collected enough entries.
|
117 |
+
if ( $entries < $count ) {
|
118 |
+
// check the entry count again in a week.
|
119 |
+
$this->review_status['time'] = time();
|
120 |
+
$this->update_user_meta( $user->ID, $this->review_status );
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
|
124 |
+
$entries = $this->calculate_entries( $entries );
|
125 |
+
$name = $user->first_name;
|
126 |
+
|
127 |
+
$title = sprintf(
|
128 |
+
/* translators: %s: User name, %2$d: number of entries */
|
129 |
+
esc_html__( 'Congratulations %1$s! You have collected %2$d listings.', 'business-directory-plugin' ),
|
130 |
+
esc_html( $name ),
|
131 |
+
absint( $entries )
|
132 |
+
);
|
133 |
+
|
134 |
+
include WPBDP_PATH . 'includes/admin/views/review.php';
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Save the request to hide the review.
|
139 |
+
*
|
140 |
+
* @since 5.14.3
|
141 |
+
*/
|
142 |
+
public function dismiss_review() {
|
143 |
+
$user_id = get_current_user_id();
|
144 |
+
$review = $this->get_user_meta( $user_id );
|
145 |
+
if ( ! $review || ! is_array( $review ) ) {
|
146 |
+
$review = array();
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( isset( $review['dismissed'] ) && 'done' === $review['dismissed'] ) {
|
150 |
+
// if feedback was submitted, don't update it again when the review is dismissed.
|
151 |
+
$this->update_user_meta( $user_id, $review );
|
152 |
+
wp_die();
|
153 |
+
}
|
154 |
+
|
155 |
+
$dismissed = wpbdp_get_var(
|
156 |
+
array(
|
157 |
+
'param' => 'link',
|
158 |
+
'default' => 'no',
|
159 |
+
),
|
160 |
+
'post'
|
161 |
+
);
|
162 |
+
|
163 |
+
$review['time'] = time();
|
164 |
+
$review['dismissed'] = ( 'done' === $dismissed ) ? true : 'later';
|
165 |
+
$review['asked'] = isset( $review['asked'] ) ? $review['asked'] + 1 : 1;
|
166 |
+
|
167 |
+
$this->update_user_meta( $user_id, $review );
|
168 |
+
wp_die();
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Update user meta.
|
173 |
+
*
|
174 |
+
* @param int $user_id The user id.
|
175 |
+
* @param array $review The review.
|
176 |
+
*
|
177 |
+
* @since 5.14.3
|
178 |
+
*/
|
179 |
+
private function update_user_meta( $user_id, $review ) {
|
180 |
+
update_user_meta( $user_id, $this->option_name, $review );
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Get user meta.
|
185 |
+
*
|
186 |
+
* @param int $user_id The user id.
|
187 |
+
*
|
188 |
+
* @since 5.14.3
|
189 |
+
*
|
190 |
+
* @return bool|array
|
191 |
+
*/
|
192 |
+
private function get_user_meta( $user_id ) {
|
193 |
+
return get_user_meta( $user_id, $this->option_name, true );
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Calculate and round off the entries to whole numbers.
|
198 |
+
*
|
199 |
+
* @param int $entries The total number of listings.
|
200 |
+
*
|
201 |
+
* @since 5.14.3
|
202 |
+
*
|
203 |
+
* @return int $entries
|
204 |
+
*/
|
205 |
+
private function calculate_entries( $entries ) {
|
206 |
+
if ( $entries <= 100 ) {
|
207 |
+
// round to the nearest 10.
|
208 |
+
$entries = floor( $entries / 10 ) * 10;
|
209 |
+
} else {
|
210 |
+
// round to the nearest 50.
|
211 |
+
$entries = floor( $entries / 50 ) * 50;
|
212 |
+
}
|
213 |
+
return $entries;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* On BD pages, request a review in the footer.
|
218 |
+
*
|
219 |
+
* @since 5.14.3
|
220 |
+
*
|
221 |
+
* @return string
|
222 |
+
*/
|
223 |
+
public function set_footer_text() {
|
224 |
+
return 'Please rate <strong>Business Directory Plugin</strong> <a href="https://wordpress.org/support/plugin/business-directory-plugin/reviews/?filter=5#new-post" target="_blank" rel="noopener">★★★★★ on WordPress.org</a> to help us spread the word.</a> Thank you from our team!';
|
225 |
+
}
|
226 |
+
}
|
includes/payment.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package BDP/Includes/Views/Checkout
|
6 |
*/
|
7 |
|
8 |
-
require_once( WPBDP_PATH . 'includes/class-payment.php' );
|
9 |
require_once( WPBDP_INC . 'abstracts/class-payment-gateway.php' );
|
10 |
require_once( WPBDP_PATH . 'includes/class-fees-api.php' );
|
11 |
|
@@ -98,6 +98,7 @@ class WPBDP_PaymentsAPI {
|
|
98 |
|
99 |
/**
|
100 |
* Renders an invoice table for a given payment.
|
|
|
101 |
* @param $payment WPBDP_Payment
|
102 |
* @return string HTML output.
|
103 |
* @since 3.4
|
5 |
* @package BDP/Includes/Views/Checkout
|
6 |
*/
|
7 |
|
8 |
+
require_once( WPBDP_PATH . 'includes/models/class-payment.php' );
|
9 |
require_once( WPBDP_INC . 'abstracts/class-payment-gateway.php' );
|
10 |
require_once( WPBDP_PATH . 'includes/class-fees-api.php' );
|
11 |
|
98 |
|
99 |
/**
|
100 |
* Renders an invoice table for a given payment.
|
101 |
+
*
|
102 |
* @param $payment WPBDP_Payment
|
103 |
* @return string HTML output.
|
104 |
* @since 3.4
|
includes/seo.php
CHANGED
@@ -1,50 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
public static function is_wp_seo_enabled() {
|
6 |
-
return defined( 'WPSEO_VERSION' ) ? true : false;
|
7 |
-
}
|
8 |
-
|
9 |
-
public static function listing_title( $listing_id ) {
|
10 |
-
if ( self::is_wp_seo_enabled() ) {
|
11 |
-
$wpseo_front = null;
|
12 |
-
|
13 |
-
if ( isset( $GLOBALS['wpseo_front'] ) )
|
14 |
-
$wpseo_front = $GLOBALS['wpseo_front'];
|
15 |
-
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
16 |
-
$wpseo_front = WPSEO_Frontend::get_instance();
|
17 |
-
|
18 |
-
$title = $wpseo_front->get_content_title( get_post( $listing_id ) );
|
19 |
-
$title = esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) );
|
20 |
-
|
21 |
-
return $title;
|
22 |
-
}
|
23 |
-
|
24 |
-
return get_the_title( $listing_id );
|
25 |
-
}
|
26 |
-
|
27 |
-
public static function listing_og_description( $listing_id ) {
|
28 |
-
if ( self::is_wp_seo_enabled() ) {
|
29 |
-
$wpseo_front = null;
|
30 |
-
|
31 |
-
if ( isset( $GLOBALS['wpseo_front'] ) )
|
32 |
-
$wpseo_front = $GLOBALS['wpseo_front'];
|
33 |
-
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
34 |
-
$wpseo_front = WPSEO_Frontend::get_instance();
|
35 |
-
|
36 |
-
global $post;
|
37 |
-
|
38 |
-
$prev_post = $post;
|
39 |
-
$post = get_post( $listing_id );
|
40 |
-
$desc = $wpseo_front->metadesc( false );
|
41 |
-
$post = $prev_post;
|
42 |
-
|
43 |
-
return $desc;
|
44 |
-
}
|
45 |
-
|
46 |
-
$listing = WPBDP_Listing::get( $listing_id );
|
47 |
-
return $listing->get_field_value( 'excerpt' );
|
48 |
-
}
|
49 |
-
|
50 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/helpers/class-seo.php' );
|
3 |
+
require_once WPBDP_INC . 'helpers/class-seo.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates-ui.php
CHANGED
@@ -1,780 +1,3 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @package WPBDP/Templates User Interface
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Returns a list of directory categories using the configured directory settings.
|
10 |
-
* The list is actually produced by {@link wpbdp_list_categories()}.
|
11 |
-
*
|
12 |
-
* @return string HTML output.
|
13 |
-
* @uses wpbdp_list_categories().
|
14 |
-
*/
|
15 |
-
function wpbdp_directory_categories() {
|
16 |
-
$args = apply_filters(
|
17 |
-
'wpbdp_main_categories_args',
|
18 |
-
array(
|
19 |
-
'hide_empty' => wpbdp_get_option( 'hide-empty-categories' ),
|
20 |
-
'parent_only' => wpbdp_get_option( 'show-only-parent-categories' ),
|
21 |
-
)
|
22 |
-
);
|
23 |
-
|
24 |
-
$html = wpbdp_list_categories( $args );
|
25 |
-
|
26 |
-
return apply_filters( 'wpbdp_main_categories', $html );
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Identical to {@link wpbdp_directory_categories()}, except the output is printed instead of returned.
|
31 |
-
*
|
32 |
-
* @uses wpbdp_directory_categories().
|
33 |
-
*/
|
34 |
-
function wpbdp_the_directory_categories() {
|
35 |
-
echo wpbdp_directory_categories();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @since 2.3
|
40 |
-
* @access private
|
41 |
-
*/
|
42 |
-
function _wpbdp_padded_count( &$term, $return = false ) {
|
43 |
-
global $wpdb;
|
44 |
-
|
45 |
-
$found = false;
|
46 |
-
$count = intval( wp_cache_get( 'term-padded-count-' . $term->term_id, 'wpbdp', false, $found ) );
|
47 |
-
|
48 |
-
if ( ! $count && ! $found ) {
|
49 |
-
|
50 |
-
$count = 0;
|
51 |
-
|
52 |
-
$tree_ids = array_merge( array( $term->term_id ), get_term_children( $term->term_id, WPBDP_CATEGORY_TAX ) );
|
53 |
-
|
54 |
-
if ( $tree_ids ) {
|
55 |
-
$format = implode( ', ', array_fill( 0, count( $tree_ids ), '%d' ) );
|
56 |
-
$tt_ids = $wpdb->get_col(
|
57 |
-
$wpdb->prepare(
|
58 |
-
"SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id IN ( $format ) AND taxonomy = %s",
|
59 |
-
array_merge( (array)$tree_ids, array( WPBDP_CATEGORY_TAX ) )
|
60 |
-
)
|
61 |
-
);
|
62 |
-
|
63 |
-
if ( $tt_ids ) {
|
64 |
-
$format = implode( ', ', array_fill( 0, count( $tt_ids ), '%d' ) );
|
65 |
-
$query = $wpdb->prepare(
|
66 |
-
"SELECT COUNT(DISTINCT r.object_id) FROM {$wpdb->term_relationships} r INNER JOIN {$wpdb->posts} p ON p.ID = r.object_id WHERE p.post_status = %s and p.post_type = %s AND term_taxonomy_id IN ( $format )",
|
67 |
-
array_merge( array( 'publish', WPBDP_POST_TYPE ), (array)$tt_ids )
|
68 |
-
);
|
69 |
-
|
70 |
-
$count = intval( $wpdb->get_var( $query ) );
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
$count = apply_filters( '_wpbdp_padded_count', $count, $term );
|
75 |
-
}
|
76 |
-
|
77 |
-
if ( $return ) {
|
78 |
-
return $count;
|
79 |
-
}
|
80 |
-
|
81 |
-
$term->count = $count;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @since 2.3
|
86 |
-
* @access private
|
87 |
-
*/
|
88 |
-
function _wpbdp_list_categories_walk( $parent, $depth, $args ) {
|
89 |
-
$terms = _wpbdp_get_terms_from_args( $args );
|
90 |
-
$terms_array = array();
|
91 |
-
$term_ids = array();
|
92 |
-
foreach ( $terms as $term ) {
|
93 |
-
$term_ids[] = $term->term_id;
|
94 |
-
$terms_array[ $term->term_id ] = $term;
|
95 |
-
}
|
96 |
-
unset( $terms );
|
97 |
-
|
98 |
-
$term_ids = apply_filters( 'wpbdp_category_terms_order', $term_ids );
|
99 |
-
|
100 |
-
$terms = array();
|
101 |
-
foreach ( $term_ids as $term_id ) {
|
102 |
-
$t = $terms_array[ $term_id ];
|
103 |
-
// 'pad_counts' doesn't work because of WP bug #15626 (see http://core.trac.wordpress.org/ticket/15626).
|
104 |
-
// we need a workaround until the bug is fixed.
|
105 |
-
_wpbdp_padded_count( $t );
|
106 |
-
|
107 |
-
$terms[] = $t;
|
108 |
-
}
|
109 |
-
|
110 |
-
// filter empty terms
|
111 |
-
if ( $args['hide_empty'] ) {
|
112 |
-
$terms = array_filter( $terms, function( $x ) {
|
113 |
-
return $x->count > 0;
|
114 |
-
} );
|
115 |
-
}
|
116 |
-
|
117 |
-
$html = '';
|
118 |
-
|
119 |
-
if ( ! $terms && $depth == 0 ) {
|
120 |
-
if ( $args['no_items_msg'] ) {
|
121 |
-
$html .= '<p>' . $args['no_items_msg'] . '</p>';
|
122 |
-
}
|
123 |
-
return $html;
|
124 |
-
}
|
125 |
-
|
126 |
-
if ( $depth > 0 ) {
|
127 |
-
$html .= str_repeat( "\t", $depth );
|
128 |
-
|
129 |
-
if ( apply_filters( 'wpbdp_categories_list_anidate_children', true ) && $terms ) {
|
130 |
-
$html .= '<ul id="cat-item-' . $args['parent'] . '-children" class="children">';
|
131 |
-
}
|
132 |
-
}
|
133 |
-
foreach ( $terms as &$term ) {
|
134 |
-
$class = apply_filters( 'wpbdp_categories_list_item_css', '', $term ) . ' ' . ( $depth > 0 ? 'subcat' : '' );
|
135 |
-
$html .= '<li class="cat-item cat-item-' . esc_attr( $term->term_id . ' ' . $class ) . '">';
|
136 |
-
|
137 |
-
$item_html = '';
|
138 |
-
$item_html .= '<a href="' . apply_filters( 'wpbdp_categories_term_link', esc_url( get_term_link( $term ) ) ) . '" ';
|
139 |
-
$item_html .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $term->description, $term ) ) ) . '" class="category-label">';
|
140 |
-
|
141 |
-
$item_html .= esc_attr( $term->name );
|
142 |
-
$item_html .= '</a>';
|
143 |
-
|
144 |
-
if ( $args['show_count'] ) {
|
145 |
-
$count_str = ' (' . intval( $term->count ) . ')';
|
146 |
-
$count_str = apply_filters( 'wpbdp_categories_item_count_str', $count_str, $term );
|
147 |
-
$item_html .= $count_str;
|
148 |
-
}
|
149 |
-
|
150 |
-
$item_html = apply_filters( 'wpbdp_categories_list_item', $item_html, $term );
|
151 |
-
$html .= $item_html;
|
152 |
-
|
153 |
-
if ( ! $args['parent_only'] ) {
|
154 |
-
$args['parent'] = $term->term_id;
|
155 |
-
if ( $subcats = _wpbdp_list_categories_walk( $term->term_id, $depth + 1, $args ) ) {
|
156 |
-
$html .= $subcats;
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
$html .= '</li>';
|
161 |
-
}
|
162 |
-
|
163 |
-
if ( $depth > 0 ) {
|
164 |
-
if ( apply_filters( 'wpbdp_categories_list_anidate_children', true ) && $terms ) {
|
165 |
-
$html .= '</ul>';
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
return $html;
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Get the list of categories.
|
174 |
-
*
|
175 |
-
* @since 5.11
|
176 |
-
*/
|
177 |
-
function _wpbdp_get_terms_from_args( $args ) {
|
178 |
-
$term_args = array(
|
179 |
-
'taxonomy' => WPBDP_CATEGORY_TAX,
|
180 |
-
'orderby' => $args['orderby'],
|
181 |
-
'order' => $args['order'],
|
182 |
-
'hide_empty' => false,
|
183 |
-
'fields' => 'all',
|
184 |
-
'parent' => intval( is_object( $args['parent'] ) ? $args['parent']->term_id : $args['parent'] ),
|
185 |
-
);
|
186 |
-
|
187 |
-
if ( empty( $args['parent'] ) ) {
|
188 |
-
$term_args['pad_counts'] = true;
|
189 |
-
} else {
|
190 |
-
$term_args['parent'] = is_object( $args['parent'] ) ? $args['parent']->term_id : intval( $args['parent'] );
|
191 |
-
}
|
192 |
-
return get_terms( $term_args );
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Produces a list of directory categories following some configuration settings that are overridable.
|
197 |
-
*
|
198 |
-
* The list of arguments is below:
|
199 |
-
* 'parent' (int|object) - Parent directory category or category ID.
|
200 |
-
* 'orderby' (string) default is taken from BD settings - What column to use for ordering the categories.
|
201 |
-
* 'order' (string) default is taken from BD settings - What direction to order categories.
|
202 |
-
* 'show_count' (boolean) default is taken from BD settings - Whether to show how many listings are in the category.
|
203 |
-
* 'hide_empty' (boolean) default is False - Whether to hide empty categories or not.
|
204 |
-
* 'parent_only' (boolean) default is False - Whether to show only direct childs of 'parent' or make a recursive list.
|
205 |
-
* 'echo' (boolean) default is False - If True, the list will be printed in addition to returned by this function.
|
206 |
-
* 'no_items_msg' (string) default is "No listing categories found." - Message to display when no categories are found.
|
207 |
-
*
|
208 |
-
* @param string|array $args array of arguments to be used while creating the list.
|
209 |
-
* @return string HTML output.
|
210 |
-
* @since 2.3
|
211 |
-
* @see wpbdp_directory_categories()
|
212 |
-
*/
|
213 |
-
function wpbdp_list_categories( $args = array() ) {
|
214 |
-
$args = wp_parse_args(
|
215 |
-
$args, array(
|
216 |
-
'echo' => false,
|
217 |
-
'orderby' => wpbdp_get_option( 'categories-order-by' ),
|
218 |
-
'order' => wpbdp_get_option( 'categories-sort' ),
|
219 |
-
'show_count' => wpbdp_get_option( 'show-category-post-count' ),
|
220 |
-
'hide_empty' => false,
|
221 |
-
'parent_only' => false,
|
222 |
-
'parent' => 0,
|
223 |
-
'no_items_msg' => _x( 'No listing categories found.', 'templates', 'business-directory-plugin' ),
|
224 |
-
)
|
225 |
-
);
|
226 |
-
|
227 |
-
$html = '';
|
228 |
-
|
229 |
-
$categories = _wpbdp_list_categories_walk( 0, 0, $args );
|
230 |
-
|
231 |
-
if ( $categories ) {
|
232 |
-
$attributes = apply_filters(
|
233 |
-
'wpbdp_categories_list_attributes', array(
|
234 |
-
'class' => 'wpbdp-categories cf ' . apply_filters( 'wpbdp_categories_list_css', '' ),
|
235 |
-
'data-breakpoints' => esc_attr( '{"tiny": [0,360], "small": [360,560], "medium": [560,710], "large": [710,999999]}' ),
|
236 |
-
'data-breakpoints-class-prefix' => 'wpbdp-categories',
|
237 |
-
)
|
238 |
-
);
|
239 |
-
|
240 |
-
$html .= '<ul ' . trim( wpbdp_html_attributes( $attributes ) ) . '>';
|
241 |
-
$html .= $categories;
|
242 |
-
$html .= '</ul>';
|
243 |
-
}
|
244 |
-
|
245 |
-
$html = apply_filters( 'wpbdp_categories_list', $html );
|
246 |
-
|
247 |
-
if ( $args['echo'] ) {
|
248 |
-
echo $html;
|
249 |
-
}
|
250 |
-
|
251 |
-
return $html;
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* @param string|array $buttons buttons to be displayed in wpbdp_main_box()
|
256 |
-
* @return string
|
257 |
-
*/
|
258 |
-
function wpbdp_main_links( $buttons = null ) {
|
259 |
-
if ( is_string( $buttons ) ) {
|
260 |
-
if ( 'none' == $buttons ) {
|
261 |
-
$buttons = array();
|
262 |
-
} elseif ( 'all' === $buttons ) {
|
263 |
-
$buttons = array( 'directory', 'listings', 'create' );
|
264 |
-
} else {
|
265 |
-
$buttons = explode( ',', $buttons );
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
if ( ! is_array( $buttons ) ) {
|
270 |
-
// Use defaults.
|
271 |
-
$buttons = array();
|
272 |
-
|
273 |
-
if ( wpbdp_get_option( 'show-directory-button' ) ) {
|
274 |
-
$buttons[] = 'directory';
|
275 |
-
}
|
276 |
-
|
277 |
-
if ( wpbdp_get_option( 'show-view-listings' ) ) {
|
278 |
-
$buttons[] = 'listings';
|
279 |
-
}
|
280 |
-
|
281 |
-
if ( wpbdp_get_option( 'show-submit-listing' ) ) {
|
282 |
-
$buttons[] = 'create';
|
283 |
-
}
|
284 |
-
|
285 |
-
if ( wpbdp_get_option( 'show-manage-listings' ) && is_user_logged_in() ) {
|
286 |
-
$buttons[] = 'manage';
|
287 |
-
}
|
288 |
-
}
|
289 |
-
|
290 |
-
$buttons = array_filter( array_unique( $buttons ) );
|
291 |
-
|
292 |
-
if ( ! $buttons ) {
|
293 |
-
return '';
|
294 |
-
}
|
295 |
-
|
296 |
-
if ( wpbdp_get_option( 'disable-submit-listing' ) ) {
|
297 |
-
$buttons = array_diff( $buttons, array( 'create' ) );
|
298 |
-
}
|
299 |
-
|
300 |
-
$html = array();
|
301 |
-
$current_page = ( is_ssl() ? 'https://' : 'http://' ) . wpbdp_get_server_value( 'HTTP_HOST' ) . wpbdp_get_server_value( 'REQUEST_URI' );
|
302 |
-
|
303 |
-
if ( in_array( 'directory', $buttons ) ) {
|
304 |
-
$link = wpbdp_url( '/' );
|
305 |
-
if ( $current_page !== $link ) {
|
306 |
-
$html[] = '<a href="' . esc_url( $link ) .'" id="wpbdp-bar-show-directory-button" class="button wpbdp-button">' .
|
307 |
-
esc_html__( 'Directory', 'business-directory-plugin' ) .
|
308 |
-
'</a>';
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
if ( in_array( 'listings', $buttons ) ) {
|
313 |
-
$link = wpbdp_url( 'all_listings' );
|
314 |
-
if ( $current_page !== $link ) {
|
315 |
-
$html[] = '<a href="' . esc_url( $link ) .'" id="wpbdp-bar-view-listings-button" class="button wpbdp-button">' .
|
316 |
-
esc_html__( 'View All Listings', 'business-directory-plugin' ) .
|
317 |
-
'</a>';
|
318 |
-
}
|
319 |
-
}
|
320 |
-
|
321 |
-
if ( in_array( 'manage', $buttons ) ) {
|
322 |
-
$html[] = '<a href="' . esc_url( wpbdp_url( 'manage_listings' ) ) .'" id="wpbdp-bar-manage-listing-button" class="button wpbdp-button">' .
|
323 |
-
esc_html__( 'Manage Listings', 'business-directory-plugin' ) .
|
324 |
-
'</a>';
|
325 |
-
}
|
326 |
-
|
327 |
-
if ( in_array( 'create', $buttons ) ) {
|
328 |
-
$html[] = '<a href="' . esc_url( wpbdp_url( 'submit_listing' ) ) .'" id="wpbdp-bar-submit-listing-button" class="button wpbdp-button">' .
|
329 |
-
esc_html__( 'Add Listing', 'business-directory-plugin' ) .
|
330 |
-
'</a>';
|
331 |
-
}
|
332 |
-
|
333 |
-
if ( empty( $html ) ) {
|
334 |
-
return '';
|
335 |
-
}
|
336 |
-
|
337 |
-
$buttons_count = count( $html );
|
338 |
-
$html = implode( ' ', $html );
|
339 |
-
|
340 |
-
$content = '<div class="wpbdp-main-links-container" data-breakpoints=\'{"tiny": [0,360], "small": [360,560], "medium": [560,710], "large": [710,999999]}\' data-breakpoints-class-prefix="wpbdp-main-links">';
|
341 |
-
$content .= '<div class="wpbdp-main-links wpbdp-main-links-' . $buttons_count . '-buttons">' . apply_filters( 'wpbdp_main_links', $html ) . '</div>';
|
342 |
-
$content .= '</div>';
|
343 |
-
|
344 |
-
return $content;
|
345 |
-
}
|
346 |
-
|
347 |
-
|
348 |
-
function wpbdp_the_main_links( $buttons = null ) {
|
349 |
-
echo wpbdp_main_links( $buttons );
|
350 |
-
}
|
351 |
-
|
352 |
-
function wpbdp_search_form() {
|
353 |
-
$html = '';
|
354 |
-
$html .= sprintf(
|
355 |
-
'<form id="wpbdmsearchform" action="%s" method="GET" class="wpbdp-search-form">',
|
356 |
-
wpbdp_url( 'search' )
|
357 |
-
);
|
358 |
-
$html .= '<input type="hidden" name="wpbdp_view" value="search" />';
|
359 |
-
|
360 |
-
if ( ! wpbdp_rewrite_on() ) {
|
361 |
-
$html .= sprintf( '<input type="hidden" name="page_id" value="%d" />', wpbdp_get_page_id( 'main' ) );
|
362 |
-
}
|
363 |
-
|
364 |
-
$html .= '<label for="wpbdp-keyword-field" style="display:none;">Keywords:</label>';
|
365 |
-
$html .= '<input type="hidden" name="dosrch" value="1" />';
|
366 |
-
$html .= '<input id="intextbox" maxlength="150" name="q" size="20" type="text" value="" />';
|
367 |
-
$html .= sprintf(
|
368 |
-
'<input id="wpbdmsearchsubmit" class="submit wpbdp-button wpbdp-submit" type="submit" value="%s" />',
|
369 |
-
esc_attr__( 'Search Listings', 'business-directory-plugin' )
|
370 |
-
);
|
371 |
-
$html .= sprintf(
|
372 |
-
'<a href="%s" class="advanced-search-link">%s</a>',
|
373 |
-
esc_url( wpbdp_url( 'search' ) ),
|
374 |
-
_x( 'Advanced Search', 'templates', 'business-directory-plugin' )
|
375 |
-
);
|
376 |
-
$html .= '</form>';
|
377 |
-
|
378 |
-
return $html;
|
379 |
-
}
|
380 |
-
|
381 |
-
function wpbdp_the_search_form() {
|
382 |
-
if ( wpbdp_get_option( 'show-search-listings' ) ) {
|
383 |
-
echo wpbdp_search_form();
|
384 |
-
}
|
385 |
-
}
|
386 |
-
|
387 |
-
function wpbdp_the_listing_excerpt() {
|
388 |
-
echo wpbdp_render_listing( null, 'excerpt' );
|
389 |
-
}
|
390 |
-
|
391 |
-
function wpbdp_listing_sort_options( $filters = array( 'wpbdp_listing_sort_options', 'wpbdp_listing_sort_options_html' ) ) {
|
392 |
-
$show_sort = wpbdp_get_option( 'listings-sortbar-enabled' );
|
393 |
-
$sort_options = $show_sort ? wpbdp_maybe_apply_filter( 'wpbdp_listing_sort_options', $filters, array() ) : array();
|
394 |
-
|
395 |
-
$html = '';
|
396 |
-
|
397 |
-
if ( $sort_options ) {
|
398 |
-
$sorting = wpbdp_get_listing_sort_links( $sort_options );
|
399 |
-
|
400 |
-
$html .= '<div class="wpbdp-listings-sort-options">';
|
401 |
-
$html .= '<label for="wpbdp-sort-bar">' . esc_html_x( 'Sort By:', 'templates sort', 'business-directory-plugin' ) . '</label>';
|
402 |
-
$html .= '<select id="wpbdp-sort-bar" class="">';
|
403 |
-
$html .= implode( ' ', $sorting );
|
404 |
-
$html .= '</select>';
|
405 |
-
$html .= '</div>';
|
406 |
-
}
|
407 |
-
|
408 |
-
return wpbdp_maybe_apply_filter( 'wpbdp_listing_sort_options_html', $filters, $html );
|
409 |
-
}
|
410 |
-
|
411 |
-
/**
|
412 |
-
* @since v5.9
|
413 |
-
*/
|
414 |
-
function wpbdp_maybe_apply_filter( $filter, $filters, $value ) {
|
415 |
-
return in_array( $filter, $filters ) ? apply_filters( $filter, $value ) : $value;
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Get links to include in the sorting options.
|
420 |
-
*
|
421 |
-
* @since v5.9
|
422 |
-
*/
|
423 |
-
function wpbdp_get_listing_sort_links( $sort_options ) {
|
424 |
-
$current_sort = wpbdp_get_current_sort_option();
|
425 |
-
|
426 |
-
$links = array();
|
427 |
-
|
428 |
-
$links['reset'] = sprintf(
|
429 |
-
'<option value="%s" class="header-option">%s</option>',
|
430 |
-
esc_url( remove_query_arg( 'wpbdp_sort' ) ),
|
431 |
-
esc_html__( 'Default', 'business-directory-plugin' )
|
432 |
-
);
|
433 |
-
|
434 |
-
$arrows = array(
|
435 |
-
'ASC' => '↓ ',
|
436 |
-
'DESC' => '↑ ',
|
437 |
-
);
|
438 |
-
|
439 |
-
foreach ( $sort_options as $id => $option ) {
|
440 |
-
$default_order = isset( $option[2] ) && ! empty( $option[2] ) ? strtoupper( $option[2] ) : 'ASC';
|
441 |
-
|
442 |
-
$dir = $default_order === 'ASC' ? '' : '-';
|
443 |
-
$arrow = '';
|
444 |
-
|
445 |
-
if ( $current_sort && $current_sort->option == $id ) {
|
446 |
-
$sort_dir = $current_sort->order === 'ASC' ? 'ASC' : 'DESC';
|
447 |
-
$dir = $sort_dir === 'ASC' ? '-' : '';
|
448 |
-
$arrow = $arrows[ $sort_dir ];
|
449 |
-
|
450 |
-
$links[ $id . '-s' ] = sprintf(
|
451 |
-
'<option value="%s" selected="selected">%s</option>',
|
452 |
-
esc_url( add_query_arg( 'wpbdp_sort', $dir . $id ) ),
|
453 |
-
esc_html( $arrow . $option[0] )
|
454 |
-
);
|
455 |
-
|
456 |
-
// Swap and include option for other direction.
|
457 |
-
$sort_dir = $sort_dir === 'ASC' ? 'DESC' : 'ASC';
|
458 |
-
$dir = $sort_dir === 'ASC' ? '' : '-';
|
459 |
-
$arrow = $arrows[ $sort_dir ];
|
460 |
-
}
|
461 |
-
|
462 |
-
$links[ $id ] = sprintf(
|
463 |
-
'<option value="%s">%s</option>',
|
464 |
-
esc_url( add_query_arg( 'wpbdp_sort', $dir . $id ) ),
|
465 |
-
esc_html( $arrow . $option[0] )
|
466 |
-
);
|
467 |
-
}
|
468 |
-
|
469 |
-
return $links;
|
470 |
-
}
|
471 |
-
|
472 |
-
function wpbdp_the_listing_sort_options() {
|
473 |
-
echo wpbdp_listing_sort_options();
|
474 |
-
}
|
475 |
-
|
476 |
-
/**
|
477 |
-
* @deprecated since 2.2.1
|
478 |
-
*/
|
479 |
-
function wpbdp_bar( $parts = array() ) {
|
480 |
-
_deprecated_function( __FUNCTION__, '2.2.1' );
|
481 |
-
|
482 |
-
$parts = wp_parse_args(
|
483 |
-
$parts, array(
|
484 |
-
'links' => true,
|
485 |
-
'search' => false,
|
486 |
-
)
|
487 |
-
);
|
488 |
-
|
489 |
-
$html = '<div class="wpbdp-bar cf">';
|
490 |
-
$html .= apply_filters( 'wpbdp_bar_before', '', $parts );
|
491 |
-
|
492 |
-
if ( $parts['links'] ) {
|
493 |
-
$html .= wpbdp_main_links();
|
494 |
-
}
|
495 |
-
if ( $parts['search'] ) {
|
496 |
-
$html .= wpbdp_search_form();
|
497 |
-
}
|
498 |
-
|
499 |
-
$html .= apply_filters( 'wpbdp_bar_after', '', $parts );
|
500 |
-
$html .= '</div>';
|
501 |
-
|
502 |
-
return $html;
|
503 |
-
}
|
504 |
-
|
505 |
-
/**
|
506 |
-
* @deprecated since 2.2.1
|
507 |
-
*/
|
508 |
-
function wpbdp_the_bar( $parts = array() ) {
|
509 |
-
_deprecated_function( __FUNCTION__, '2.2.1' );
|
510 |
-
echo wpbdp_bar( $parts );
|
511 |
-
}
|
512 |
-
|
513 |
-
/**
|
514 |
-
* Displays the listing main image.
|
515 |
-
*
|
516 |
-
* @since 2.3
|
517 |
-
*/
|
518 |
-
function wpbdp_listing_thumbnail( $listing_id = null, $args = array(), $display = '' ) {
|
519 |
-
if ( ! $listing_id ) {
|
520 |
-
$listing_id = apply_filters( 'wpbdp_listing_images_listing_id', get_the_ID() );
|
521 |
-
}
|
522 |
-
|
523 |
-
$listing = WPBDP_Listing::get( $listing_id );
|
524 |
-
|
525 |
-
$main_image = $listing->get_thumbnail();
|
526 |
-
|
527 |
-
if ( $main_image ) {
|
528 |
-
$thumbnail_id = $main_image->ID;
|
529 |
-
} else {
|
530 |
-
$thumbnail_id = 0;
|
531 |
-
}
|
532 |
-
|
533 |
-
$defaults = array(
|
534 |
-
'link' => 'picture',
|
535 |
-
'class' => '',
|
536 |
-
'echo' => false,
|
537 |
-
);
|
538 |
-
if ( is_array( $args ) ) {
|
539 |
-
$args = array_merge( $defaults, $args );
|
540 |
-
} else {
|
541 |
-
// For reverse compatibility.
|
542 |
-
$args = wp_parse_args( $args, $defaults );
|
543 |
-
}
|
544 |
-
|
545 |
-
$image_img = '';
|
546 |
-
$image_link = '';
|
547 |
-
$image_title = '';
|
548 |
-
$listing_link_in_new_tab = '';
|
549 |
-
$image_classes = 'wpbdp-thumbnail attachment-wpbdp-thumb ' . $args['class'];
|
550 |
-
|
551 |
-
if ( $main_image ) {
|
552 |
-
$image_title = get_post_meta( $main_image->ID, '_wpbdp_image_caption', true );
|
553 |
-
_wpbdp_resize_image_if_needed( $main_image->ID );
|
554 |
-
|
555 |
-
$image_size = wpbdp_get_option( 'listing-main-image-default-size', 'wpbdp-thumb' );
|
556 |
-
$image_img = wp_get_attachment_image(
|
557 |
-
$main_image->ID,
|
558 |
-
'uploaded' !== $image_size ? $image_size : '',
|
559 |
-
false,
|
560 |
-
array(
|
561 |
-
'alt' => $image_title ? $image_title : get_the_title( $listing_id ),
|
562 |
-
'title' => $image_title ? $image_title : get_the_title( $listing_id ),
|
563 |
-
'class' => $image_classes,
|
564 |
-
)
|
565 |
-
);
|
566 |
-
|
567 |
-
if ( $args['link'] == 'picture' ) {
|
568 |
-
$full_image_data = wp_get_attachment_image_src( $main_image->ID, 'wpbdp-large' );
|
569 |
-
$image_link = $full_image_data[0];
|
570 |
-
}
|
571 |
-
} elseif ( has_post_thumbnail( $listing_id ) ) {
|
572 |
-
$caption = get_post_meta( get_post_thumbnail_id( $listing_id ), '_wpbdp_image_caption', true );
|
573 |
-
$image_img = get_the_post_thumbnail(
|
574 |
-
$listing_id,
|
575 |
-
'wpbdp-thumb',
|
576 |
-
array(
|
577 |
-
'alt' => $caption ? $caption : get_the_title( $listing_id ),
|
578 |
-
'title' => $caption ? $caption : get_the_title( $listing_id ),
|
579 |
-
)
|
580 |
-
);
|
581 |
-
} elseif ( isset( $args['coming_soon'] ) ) {
|
582 |
-
$use_default_img = (array) wpbdp_get_option( 'use-default-picture', array() );
|
583 |
-
if ( ! empty( $use_default_img ) && in_array( $display, $use_default_img ) ) {
|
584 |
-
|
585 |
-
$image_src = $args['coming_soon'];
|
586 |
-
$image_img = sprintf(
|
587 |
-
'<img src="%s" alt="%s" title="%s" border="0" width="%d" class="%s" />',
|
588 |
-
esc_url( $image_src ),
|
589 |
-
esc_attr( get_the_title( $listing_id ) ),
|
590 |
-
esc_attr( get_the_title( $listing_id ) ),
|
591 |
-
esc_attr( wpbdp_get_option( 'thumbnail-width' ) ),
|
592 |
-
esc_attr( $image_classes )
|
593 |
-
);
|
594 |
-
$image_link = $args['link'] == 'picture' ? $image_src : '';
|
595 |
-
}
|
596 |
-
}
|
597 |
-
|
598 |
-
if ( ! $image_link && $args['link'] == 'listing' ) {
|
599 |
-
$image_link = get_permalink( $listing_id );
|
600 |
-
$listing_link_in_new_tab = wpbdp_get_option( 'listing-link-in-new-tab' ) ? '_blank' : '_self';
|
601 |
-
}
|
602 |
-
|
603 |
-
$args['image_img'] = $image_img;
|
604 |
-
$args['image_link'] = $image_link;
|
605 |
-
$args['listing_id'] = $listing_id;
|
606 |
-
$args['image_title'] = $image_title;
|
607 |
-
$args['listing_link_in_new_tab'] = $listing_link_in_new_tab;
|
608 |
-
|
609 |
-
$image_html = wpbdp_thumbnail_html( $args );
|
610 |
-
|
611 |
-
/**
|
612 |
-
* @since v5.9
|
613 |
-
*/
|
614 |
-
return apply_filters( 'wpbdp_thumbnail_html', $image_html, $args );
|
615 |
-
}
|
616 |
-
|
617 |
-
/**
|
618 |
-
* Get the html for a listing thumbnail image.
|
619 |
-
*
|
620 |
-
* @since v5.9
|
621 |
-
*/
|
622 |
-
function wpbdp_thumbnail_html( $args ) {
|
623 |
-
$image_img = $args['image_img'];
|
624 |
-
$image_link = $args['image_link'];
|
625 |
-
|
626 |
-
if ( ! $image_img ) {
|
627 |
-
return '';
|
628 |
-
}
|
629 |
-
|
630 |
-
if ( ! $image_link ) {
|
631 |
-
return $image_img;
|
632 |
-
}
|
633 |
-
|
634 |
-
$image_link = apply_filters( 'wpbdp_listing_thumbnail_link', $image_link, $args['listing_id'], $args );
|
635 |
-
|
636 |
-
if ( ! $image_link ) {
|
637 |
-
return sprintf(
|
638 |
-
'<div class="listing-thumbnail">%s</div>',
|
639 |
-
$image_img
|
640 |
-
);
|
641 |
-
}
|
642 |
-
|
643 |
-
if ( $args['link'] === 'picture' ) {
|
644 |
-
$extra = 'data-lightbox="wpbdpgal" rel="wpbdpgal"';
|
645 |
-
} elseif ( $args['listing_link_in_new_tab'] === '_blank' ) {
|
646 |
-
$extra = 'rel="noopener noreferrer"';
|
647 |
-
} else {
|
648 |
-
$extra = '';
|
649 |
-
}
|
650 |
-
|
651 |
-
return sprintf(
|
652 |
-
'<div class="listing-thumbnail"><a href="%s" target="%s" class="%s" title="%s" %s>%s</a></div>',
|
653 |
-
esc_url( $image_link ),
|
654 |
-
esc_attr( $args['listing_link_in_new_tab'] ),
|
655 |
-
esc_attr( $args['link'] == 'picture' ? 'thickbox' : '' ),
|
656 |
-
esc_attr( $args['image_title'] ),
|
657 |
-
$extra,
|
658 |
-
$image_img
|
659 |
-
);
|
660 |
-
}
|
661 |
-
|
662 |
-
class WPBDP_ListingFieldDisplayItem {
|
663 |
-
private $listing_id = 0;
|
664 |
-
private $display = '';
|
665 |
-
|
666 |
-
private $html_ = '';
|
667 |
-
private $html_value_ = '';
|
668 |
-
private $value_ = null;
|
669 |
-
|
670 |
-
public $id = 0;
|
671 |
-
public $field;
|
672 |
-
|
673 |
-
public function __construct( &$field, $listing_id, $display ) {
|
674 |
-
$this->field = $field;
|
675 |
-
$this->id = $this->field->get_id();
|
676 |
-
$this->listing_id = $listing_id;
|
677 |
-
$this->display = $display;
|
678 |
-
}
|
679 |
-
|
680 |
-
public function __get( $key ) {
|
681 |
-
switch ( $key ) {
|
682 |
-
case 'html':
|
683 |
-
if ( $this->html_ ) {
|
684 |
-
return $this->html_;
|
685 |
-
}
|
686 |
-
|
687 |
-
$this->html_ = $this->field->display( $this->listing_id, $this->display );
|
688 |
-
return $this->html_;
|
689 |
-
break;
|
690 |
-
|
691 |
-
case 'html_value':
|
692 |
-
if ( $this->html_value_ ) {
|
693 |
-
return $this->html_value_;
|
694 |
-
}
|
695 |
-
|
696 |
-
$this->html_value_ = $this->field->html_value( $this->listing_id );
|
697 |
-
return $this->html_value_;
|
698 |
-
break;
|
699 |
-
|
700 |
-
case 'value':
|
701 |
-
if ( $this->value_ ) {
|
702 |
-
return $this->value_;
|
703 |
-
}
|
704 |
-
|
705 |
-
$this->value_ = $this->field->value( $this->listing_id );
|
706 |
-
return $this->value_;
|
707 |
-
break;
|
708 |
-
|
709 |
-
default:
|
710 |
-
break;
|
711 |
-
}
|
712 |
-
}
|
713 |
-
|
714 |
-
public static function prepare_set( $listing_id, $display ) {
|
715 |
-
$res = (object) array(
|
716 |
-
'fields' => array(),
|
717 |
-
'social' => array(),
|
718 |
-
);
|
719 |
-
|
720 |
-
$form_fields = wpbdp_get_form_fields();
|
721 |
-
$form_fields = apply_filters_ref_array( 'wpbdp_render_listing_fields', array( &$form_fields, $listing_id ) );
|
722 |
-
|
723 |
-
foreach ( $form_fields as &$f ) {
|
724 |
-
if ( ! $f->display_in( $display ) ) {
|
725 |
-
continue;
|
726 |
-
}
|
727 |
-
|
728 |
-
if ( $f->display_in( 'social' ) ) {
|
729 |
-
$res->social[ $f->get_id() ] = new self( $f, $listing_id, 'social' );
|
730 |
-
} else {
|
731 |
-
$res->fields[ $f->get_id() ] = new self( $f, $listing_id, $display );
|
732 |
-
}
|
733 |
-
}
|
734 |
-
|
735 |
-
return $res;
|
736 |
-
}
|
737 |
-
|
738 |
-
public static function walk_set( $prop, $fields = array() ) {
|
739 |
-
$res = array();
|
740 |
-
|
741 |
-
foreach ( $fields as $k => &$f ) {
|
742 |
-
$res[ $k ] = $f->{$prop};
|
743 |
-
}
|
744 |
-
|
745 |
-
return $res;
|
746 |
-
}
|
747 |
-
}
|
748 |
-
|
749 |
-
/**
|
750 |
-
* @since 5.0
|
751 |
-
*/
|
752 |
-
function wpbdp_the_main_box( $args = array() ) {
|
753 |
-
echo wpbdp_main_box( $args = array() );
|
754 |
-
}
|
755 |
-
|
756 |
-
/**
|
757 |
-
* @since 5.0
|
758 |
-
*/
|
759 |
-
function wpbdp_main_box( $args = null ) {
|
760 |
-
$defaults = array(
|
761 |
-
'buttons' => null,
|
762 |
-
'in_shortcode' => false,
|
763 |
-
);
|
764 |
-
$args = wp_parse_args( $args, $defaults );
|
765 |
-
|
766 |
-
$extra_fields = wpbdp_capture_action( 'wpbdp_main_box_extra_fields' );
|
767 |
-
$hidden_fields = wpbdp_capture_action( 'wpbdp_main_box_hidden_fields' );
|
768 |
-
$search_url = wpbdp_url( 'search' );
|
769 |
-
$no_cols = 1;
|
770 |
-
|
771 |
-
if ( $extra_fields ) {
|
772 |
-
$no_cols = 2;
|
773 |
-
}
|
774 |
-
|
775 |
-
$template_vars = compact( 'hidden_fields', 'extra_fields', 'search_url', 'no_cols' );
|
776 |
-
$template_vars = array_merge( $template_vars, $args );
|
777 |
-
|
778 |
-
$html = wpbdp_x_render( apply_filters( 'wpbdp_main_box_template_name', 'main-box' ), $template_vars );
|
779 |
-
return $html;
|
780 |
-
}
|
1 |
<?php
|
2 |
+
_deprecated_file( basename( __FILE__ ), '5.14.3', null, 'This file can be found in includes/helpers/functions/templates-ui.php' );
|
3 |
+
require_once WPBDP_INC . 'helpers/functions/templates-ui.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/themes.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* BD Premium Themes setup
|
|
|
4 |
* @since 4.0
|
5 |
*/
|
6 |
|
1 |
<?php
|
2 |
/**
|
3 |
* BD Premium Themes setup
|
4 |
+
*
|
5 |
* @since 4.0
|
6 |
*/
|
7 |
|
includes/utils.php
CHANGED
@@ -361,7 +361,7 @@ function wpbdp_sanitize_value( $sanitize, &$value ) {
|
|
361 |
}
|
362 |
}
|
363 |
|
364 |
-
function wpbdp_capture_action($hook) {
|
365 |
$output = '';
|
366 |
|
367 |
$args = func_get_args();
|
@@ -398,8 +398,10 @@ function wpbdp_php_ini_size_to_bytes( $val ) {
|
|
398 |
switch ( $unit ) {
|
399 |
case 'G':
|
400 |
$size *= 1024;
|
|
|
401 |
case 'M':
|
402 |
$size *= 1024;
|
|
|
403 |
case 'K':
|
404 |
$size *= 1024;
|
405 |
}
|
@@ -445,7 +447,8 @@ function wpbdp_media_upload( $file_, $use_media_library = true, $check_image = f
|
|
445 |
$file = $file_;
|
446 |
}
|
447 |
|
448 |
-
|
|
|
449 |
'image' => false,
|
450 |
'min-size' => 0,
|
451 |
'max-size' => 0,
|
@@ -454,7 +457,9 @@ function wpbdp_media_upload( $file_, $use_media_library = true, $check_image = f
|
|
454 |
'max-width' => 0,
|
455 |
'max-height' => 0,
|
456 |
'mimetypes' => null
|
457 |
-
|
|
|
|
|
458 |
|
459 |
foreach ( array( 'min-size', 'max-size', 'min-width', 'min-height', 'max-width', 'max-height' ) as $k )
|
460 |
$constraints[ $k ] = absint( $constraints[ $k ] );
|
@@ -502,12 +507,17 @@ function wpbdp_media_upload( $file_, $use_media_library = true, $check_image = f
|
|
502 |
return $upload;
|
503 |
}
|
504 |
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
|
|
|
|
|
|
|
|
|
|
511 |
$attach_metadata = wp_generate_attachment_metadata( $attachment_id, $upload['file'] );
|
512 |
wp_update_attachment_metadata( $attachment_id, $attach_metadata );
|
513 |
|
@@ -686,6 +696,7 @@ function wpbdp_ajaxurl( $overwrite = false ) {
|
|
686 |
|
687 |
/**
|
688 |
* Removes a value from an array.
|
|
|
689 |
* @since 2.3
|
690 |
*/
|
691 |
function wpbdp_array_remove_value( &$array_, &$value_ ) {
|
@@ -700,6 +711,7 @@ function wpbdp_array_remove_value( &$array_, &$value_ ) {
|
|
700 |
|
701 |
/**
|
702 |
* Checks if a given string starts with another string.
|
|
|
703 |
* @param string $str the string to be searched
|
704 |
* @param string $prefix the prefix to search for
|
705 |
* @return TRUE if $str starts with $prefix or FALSE otherwise
|
@@ -731,6 +743,7 @@ function wpbdp_format_time( $time = null, $format = 'mysql', $time_is_date = fal
|
|
731 |
|
732 |
/**
|
733 |
* Returns the contents of a directory (ignoring . and .. special files).
|
|
|
734 |
* @param string $path a directory.
|
735 |
* @return array list of files within the directory.
|
736 |
* @since 3.3
|
@@ -762,6 +775,7 @@ function wpbdp_scandir( $path, $args = array() ) {
|
|
762 |
|
763 |
/**
|
764 |
* Recursively deletes a directory.
|
|
|
765 |
* @param string $path a directory.
|
766 |
* @since 3.3
|
767 |
* @deprecated since 3.6.10. Use {@link WPBDP_FS::rmdir} instead.
|
@@ -773,6 +787,7 @@ function wpbdp_rrmdir( $path ) {
|
|
773 |
|
774 |
/**
|
775 |
* Returns the name of a term.
|
|
|
776 |
* @param id|string $id_or_slug The term ID or slug (see `$field`).
|
777 |
* @param string $taxonomy Taxonomy name. Defaults to `WPBDP_CATEGORY_TAX` (BD's category taxonomy).
|
778 |
* @param string $field Field used for the term lookup. Defaults to "id".
|
@@ -781,9 +796,11 @@ function wpbdp_rrmdir( $path ) {
|
|
781 |
* @since 3.3
|
782 |
*/
|
783 |
function wpbdp_get_term_name( $id_or_slug, $taxonomy = WPBDP_CATEGORY_TAX, $field = 'id', $escape = true ) {
|
784 |
-
|
785 |
-
|
786 |
-
|
|
|
|
|
787 |
|
788 |
if ( ! $term )
|
789 |
return '';
|
@@ -856,14 +873,17 @@ function wpbdp_email_from_template( $setting_or_file, $replacements = array(), $
|
|
856 |
$placeholders = $setting ? ( isset( $setting['placeholders'] ) && is_array( $setting['placeholders'] ) ? $setting['placeholders'] : array() ) : array();
|
857 |
|
858 |
// Add core replacements.
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
|
|
|
|
|
|
867 |
|
868 |
if ( $file ) {
|
869 |
$keys = array_keys( $replacements );
|
@@ -932,7 +952,7 @@ jQuery(function( $ ) {
|
|
932 |
'position': { 'edge': '<?php echo isset( $options['edge'] ) ? $options['edge'] : 'top'; ?>',
|
933 |
'align': '<?php echo isset( $options['align'] ) ? $options['align'] : 'center'; ?>' },
|
934 |
'buttons': function( e, t ) {
|
935 |
-
|
936 |
var b = $( '<a id="wpbdp-pointer-b1" class="button button-primary">' + '<?php echo $primary_button; ?>' + '</a>' );
|
937 |
<?php else : ?>
|
938 |
var b = $( '<a id="wpbdp-pointer-b2" class="button" style="margin-right: 15px;">' + '<?php echo $secondary_button; ?>' + '</a>' );
|
@@ -941,11 +961,11 @@ jQuery(function( $ ) {
|
|
941 |
}
|
942 |
}).pointer('open');
|
943 |
|
944 |
-
|
945 |
$( '#wpbdp-pointer-b2' ).before( '<a id="wpbdp-pointer-b1" class="button button-primary">' + '<?php echo $primary_button; ?>' + '</a>' );
|
946 |
$( '#wpbdp-pointer-b2' ).click(function(e) {
|
947 |
e.preventDefault();
|
948 |
-
|
949 |
<?php echo $secondary_action; ?>
|
950 |
<?php endif; ?>
|
951 |
wpbdp_pointer.pointer( 'close' );
|
@@ -954,7 +974,7 @@ jQuery(function( $ ) {
|
|
954 |
|
955 |
$( '#wpbdp-pointer-b1' ).click(function(e) {
|
956 |
e.preventDefault();
|
957 |
-
|
958 |
<?php echo $primary_action; ?>
|
959 |
<?php endif; ?>
|
960 |
wpbdp_pointer.pointer( 'close' );
|
@@ -1040,6 +1060,7 @@ function wpbdp_detect_encoding( $content ) {
|
|
1040 |
|
1041 |
/**
|
1042 |
* Taken from http://php.net/manual/en/function.mb-detect-encoding.php#113983
|
|
|
1043 |
* @since 4.0.5dev
|
1044 |
*/
|
1045 |
function wpbdp_mb_detect_encoding( $content, $encodings ) {
|
@@ -1054,11 +1075,14 @@ function wpbdp_mb_detect_encoding( $content, $encodings ) {
|
|
1054 |
}
|
1055 |
|
1056 |
function wpbdp_render_user_field( $args = array() ) {
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
|
|
|
|
|
|
1062 |
|
1063 |
$users_query = new WP_User_Query( array( 'count_total' => true, 'fields' => 'ID', 'number' => 200 ) );
|
1064 |
|
@@ -1096,7 +1120,7 @@ function wpbdp_render_user_field( $args = array() ) {
|
|
1096 |
function wpbdp_enqueue_jquery_ui_style() {
|
1097 |
global $wp_scripts;
|
1098 |
|
1099 |
-
|
1100 |
$ui_version = $wp_scripts->registered['jquery-ui-core']->ver;
|
1101 |
} else {
|
1102 |
$ui_version = '1.8.21';
|
361 |
}
|
362 |
}
|
363 |
|
364 |
+
function wpbdp_capture_action( $hook ) {
|
365 |
$output = '';
|
366 |
|
367 |
$args = func_get_args();
|
398 |
switch ( $unit ) {
|
399 |
case 'G':
|
400 |
$size *= 1024;
|
401 |
+
// no break
|
402 |
case 'M':
|
403 |
$size *= 1024;
|
404 |
+
// no break
|
405 |
case 'K':
|
406 |
$size *= 1024;
|
407 |
}
|
447 |
$file = $file_;
|
448 |
}
|
449 |
|
450 |
+
$constraints = array_merge(
|
451 |
+
array(
|
452 |
'image' => false,
|
453 |
'min-size' => 0,
|
454 |
'max-size' => 0,
|
457 |
'max-width' => 0,
|
458 |
'max-height' => 0,
|
459 |
'mimetypes' => null
|
460 |
+
),
|
461 |
+
$constraints
|
462 |
+
);
|
463 |
|
464 |
foreach ( array( 'min-size', 'max-size', 'min-width', 'min-height', 'max-width', 'max-height' ) as $k )
|
465 |
$constraints[ $k ] = absint( $constraints[ $k ] );
|
507 |
return $upload;
|
508 |
}
|
509 |
|
510 |
+
$attachment_id = wp_insert_attachment(
|
511 |
+
array(
|
512 |
+
'post_mime_type' => $upload['type'],
|
513 |
+
'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $upload['file'] ) ),
|
514 |
+
'post_content' => '',
|
515 |
+
'post_status' => 'inherit'
|
516 |
+
),
|
517 |
+
$upload['file']
|
518 |
+
);
|
519 |
+
|
520 |
+
if ( $attachment_id ) {
|
521 |
$attach_metadata = wp_generate_attachment_metadata( $attachment_id, $upload['file'] );
|
522 |
wp_update_attachment_metadata( $attachment_id, $attach_metadata );
|
523 |
|
696 |
|
697 |
/**
|
698 |
* Removes a value from an array.
|
699 |
+
*
|
700 |
* @since 2.3
|
701 |
*/
|
702 |
function wpbdp_array_remove_value( &$array_, &$value_ ) {
|
711 |
|
712 |
/**
|
713 |
* Checks if a given string starts with another string.
|
714 |
+
*
|
715 |
* @param string $str the string to be searched
|
716 |
* @param string $prefix the prefix to search for
|
717 |
* @return TRUE if $str starts with $prefix or FALSE otherwise
|
743 |
|
744 |
/**
|
745 |
* Returns the contents of a directory (ignoring . and .. special files).
|
746 |
+
*
|
747 |
* @param string $path a directory.
|
748 |
* @return array list of files within the directory.
|
749 |
* @since 3.3
|
775 |
|
776 |
/**
|
777 |
* Recursively deletes a directory.
|
778 |
+
*
|
779 |
* @param string $path a directory.
|
780 |
* @since 3.3
|
781 |
* @deprecated since 3.6.10. Use {@link WPBDP_FS::rmdir} instead.
|
787 |
|
788 |
/**
|
789 |
* Returns the name of a term.
|
790 |
+
*
|
791 |
* @param id|string $id_or_slug The term ID or slug (see `$field`).
|
792 |
* @param string $taxonomy Taxonomy name. Defaults to `WPBDP_CATEGORY_TAX` (BD's category taxonomy).
|
793 |
* @param string $field Field used for the term lookup. Defaults to "id".
|
796 |
* @since 3.3
|
797 |
*/
|
798 |
function wpbdp_get_term_name( $id_or_slug, $taxonomy = WPBDP_CATEGORY_TAX, $field = 'id', $escape = true ) {
|
799 |
+
$term = get_term_by(
|
800 |
+
$field,
|
801 |
+
'id' == $field ? intval( $id_or_slug ) : $id_or_slug,
|
802 |
+
$taxonomy
|
803 |
+
);
|
804 |
|
805 |
if ( ! $term )
|
806 |
return '';
|
873 |
$placeholders = $setting ? ( isset( $setting['placeholders'] ) && is_array( $setting['placeholders'] ) ? $setting['placeholders'] : array() ) : array();
|
874 |
|
875 |
// Add core replacements.
|
876 |
+
$replacements = array_merge(
|
877 |
+
$replacements,
|
878 |
+
array(
|
879 |
+
'site-title' => get_bloginfo( 'name' ),
|
880 |
+
'site-link' => sprintf( '<a href="%s">%s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) ),
|
881 |
+
'site-url' => sprintf( '<a href="%s">%s</a>', get_bloginfo( 'url' ), get_bloginfo( 'url' ) ),
|
882 |
+
'directory-url' => sprintf( '<a href="%1$s">%1$s</a>', wpbdp_get_page_link( 'main' ) ),
|
883 |
+
'today' => date_i18n( get_option( 'date_format' ) ),
|
884 |
+
'now' => date_i18n( get_option( 'time_format' ) )
|
885 |
+
)
|
886 |
+
);
|
887 |
|
888 |
if ( $file ) {
|
889 |
$keys = array_keys( $replacements );
|
952 |
'position': { 'edge': '<?php echo isset( $options['edge'] ) ? $options['edge'] : 'top'; ?>',
|
953 |
'align': '<?php echo isset( $options['align'] ) ? $options['align'] : 'center'; ?>' },
|
954 |
'buttons': function( e, t ) {
|
955 |
+
<?php if ( ! $secondary_button ) : ?>
|
956 |
var b = $( '<a id="wpbdp-pointer-b1" class="button button-primary">' + '<?php echo $primary_button; ?>' + '</a>' );
|
957 |
<?php else : ?>
|
958 |
var b = $( '<a id="wpbdp-pointer-b2" class="button" style="margin-right: 15px;">' + '<?php echo $secondary_button; ?>' + '</a>' );
|
961 |
}
|
962 |
}).pointer('open');
|
963 |
|
964 |
+
<?php if ( $secondary_button ) : ?>
|
965 |
$( '#wpbdp-pointer-b2' ).before( '<a id="wpbdp-pointer-b1" class="button button-primary">' + '<?php echo $primary_button; ?>' + '</a>' );
|
966 |
$( '#wpbdp-pointer-b2' ).click(function(e) {
|
967 |
e.preventDefault();
|
968 |
+
<?php if ( $secondary_action ) : ?>
|
969 |
<?php echo $secondary_action; ?>
|
970 |
<?php endif; ?>
|
971 |
wpbdp_pointer.pointer( 'close' );
|
974 |
|
975 |
$( '#wpbdp-pointer-b1' ).click(function(e) {
|
976 |
e.preventDefault();
|
977 |
+
<?php if ( $primary_action ) : ?>
|
978 |
<?php echo $primary_action; ?>
|
979 |
<?php endif; ?>
|
980 |
wpbdp_pointer.pointer( 'close' );
|
1060 |
|
1061 |
/**
|
1062 |
* Taken from http://php.net/manual/en/function.mb-detect-encoding.php#113983
|
1063 |
+
*
|
1064 |
* @since 4.0.5dev
|
1065 |
*/
|
1066 |
function wpbdp_mb_detect_encoding( $content, $encodings ) {
|
1075 |
}
|
1076 |
|
1077 |
function wpbdp_render_user_field( $args = array() ) {
|
1078 |
+
$args = wp_parse_args(
|
1079 |
+
$args,
|
1080 |
+
array(
|
1081 |
+
'class' => '',
|
1082 |
+
'name' => 'user',
|
1083 |
+
'value' => null,
|
1084 |
+
)
|
1085 |
+
);
|
1086 |
|
1087 |
$users_query = new WP_User_Query( array( 'count_total' => true, 'fields' => 'ID', 'number' => 200 ) );
|
1088 |
|
1120 |
function wpbdp_enqueue_jquery_ui_style() {
|
1121 |
global $wp_scripts;
|
1122 |
|
1123 |
+
if ( is_object( $wp_scripts ) && isset( $wp_scripts->registered['jquery-ui-core'] ) ) {
|
1124 |
$ui_version = $wp_scripts->registered['jquery-ui-core']->ver;
|
1125 |
} else {
|
1126 |
$ui_version = '1.8.21';
|
includes/widgets/widget-featured-listings.php
CHANGED
@@ -3,6 +3,7 @@ require_once( WPBDP_PATH . 'includes/widgets/class-listings-widget.php' );
|
|
3 |
|
4 |
/**
|
5 |
* Featured listings widget.
|
|
|
6 |
* @since 2.1
|
7 |
*/
|
8 |
class WPBDP_FeaturedListingsWidget extends WPBDP_Listings_Widget {
|
3 |
|
4 |
/**
|
5 |
* Featured listings widget.
|
6 |
+
*
|
7 |
* @since 2.1
|
8 |
*/
|
9 |
class WPBDP_FeaturedListingsWidget extends WPBDP_Listings_Widget {
|
includes/widgets/widget-latest-listings.php
CHANGED
@@ -3,6 +3,7 @@ require_once( WPBDP_PATH . 'includes/widgets/class-listings-widget.php' );
|
|
3 |
|
4 |
/**
|
5 |
* Latest listings widget.
|
|
|
6 |
* @since 2.1
|
7 |
*/
|
8 |
class WPBDP_LatestListingsWidget extends WPBDP_Listings_Widget {
|
3 |
|
4 |
/**
|
5 |
* Latest listings widget.
|
6 |
+
*
|
7 |
* @since 2.1
|
8 |
*/
|
9 |
class WPBDP_LatestListingsWidget extends WPBDP_Listings_Widget {
|
includes/widgets/widget-random-listings.php
CHANGED
@@ -3,6 +3,7 @@ require_once( WPBDP_PATH . 'includes/widgets/class-listings-widget.php' );
|
|
3 |
|
4 |
/**
|
5 |
* Random listings widget.
|
|
|
6 |
* @since 2.1
|
7 |
*/
|
8 |
class WPBDP_RandomListingsWidget extends WPBDP_Listings_Widget {
|
3 |
|
4 |
/**
|
5 |
* Random listings widget.
|
6 |
+
*
|
7 |
* @since 2.1
|
8 |
*/
|
9 |
class WPBDP_RandomListingsWidget extends WPBDP_Listings_Widget {
|
includes/widgets/widget-search.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Search widget.
|
|
|
4 |
* @since 2.1.6
|
5 |
*/
|
6 |
class WPBDP_SearchWidget extends WP_Widget {
|
@@ -15,7 +16,7 @@ class WPBDP_SearchWidget extends WP_Widget {
|
|
15 |
);
|
16 |
}
|
17 |
|
18 |
-
|
19 |
if ( isset( $instance['title'] ) ) {
|
20 |
$title = $instance['title'];
|
21 |
} else {
|
@@ -39,7 +40,7 @@ class WPBDP_SearchWidget extends WP_Widget {
|
|
39 |
esc_attr( $this->get_field_id( 'use_basic_form' ) ),
|
40 |
esc_attr( $this->get_field_name( 'form_mode' ) ),
|
41 |
'basic',
|
42 |
-
wpbdp_getv( $instance, 'form_mode', 'basic') === 'basic' ? 'checked="checked"' : '',
|
43 |
esc_attr( $this->get_field_id( 'use_basic_form' ) ),
|
44 |
esc_html_x( 'Basic', 'widgets', 'business-directory-plugin' )
|
45 |
);
|
@@ -80,14 +81,14 @@ class WPBDP_SearchWidget extends WP_Widget {
|
|
80 |
echo '</p>';
|
81 |
}
|
82 |
|
83 |
-
|
84 |
$new_instance['title'] = strip_tags( $new_instance['title'] );
|
85 |
$new_instance['form_mode'] = wpbdp_getv( $new_instance, 'form_mode', 'basic' );
|
86 |
$new_instance['search_fields'] = wpbdp_getv( $new_instance, 'search_fields', array() );
|
87 |
return $new_instance;
|
88 |
}
|
89 |
|
90 |
-
|
91 |
extract( $args );
|
92 |
$title = apply_filters( 'widget_title', $instance['title'] );
|
93 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Search widget.
|
4 |
+
*
|
5 |
* @since 2.1.6
|
6 |
*/
|
7 |
class WPBDP_SearchWidget extends WP_Widget {
|
16 |
);
|
17 |
}
|
18 |
|
19 |
+
public function form( $instance ) {
|
20 |
if ( isset( $instance['title'] ) ) {
|
21 |
$title = $instance['title'];
|
22 |
} else {
|
40 |
esc_attr( $this->get_field_id( 'use_basic_form' ) ),
|
41 |
esc_attr( $this->get_field_name( 'form_mode' ) ),
|
42 |
'basic',
|
43 |
+
wpbdp_getv( $instance, 'form_mode', 'basic' ) === 'basic' ? 'checked="checked"' : '',
|
44 |
esc_attr( $this->get_field_id( 'use_basic_form' ) ),
|
45 |
esc_html_x( 'Basic', 'widgets', 'business-directory-plugin' )
|
46 |
);
|
81 |
echo '</p>';
|
82 |
}
|
83 |
|
84 |
+
public function update( $new_instance, $old_instance ) {
|
85 |
$new_instance['title'] = strip_tags( $new_instance['title'] );
|
86 |
$new_instance['form_mode'] = wpbdp_getv( $new_instance, 'form_mode', 'basic' );
|
87 |
$new_instance['search_fields'] = wpbdp_getv( $new_instance, 'search_fields', array() );
|
88 |
return $new_instance;
|
89 |
}
|
90 |
|
91 |
+
public function widget( $args, $instance ) {
|
92 |
extract( $args );
|
93 |
$title = apply_filters( 'widget_title', $instance['title'] );
|
94 |
|
languages/business-directory-plugin-ar.mo
CHANGED
Binary file
|
languages/business-directory-plugin-ar.po
CHANGED
@@ -5,7 +5,7 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Business Directory Plugin v5.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/business-"
|
7 |
"directory-plugin\n"
|
8 |
-
"POT-Creation-Date: 2021-10-
|
9 |
"PO-Revision-Date: 2017-01-16 17:47-0500\n"
|
10 |
"Last-Translator: BD Team <support@businessdirectoryplugin.com>\n"
|
11 |
"Language-Team: BD Team <support@businessdirectoryplugin.com>\n"
|
@@ -32,12 +32,7 @@ msgid ""
|
|
32 |
"payment processor directly."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/admin/class-admin
|
36 |
-
#, fuzzy
|
37 |
-
msgid "Help"
|
38 |
-
msgstr "المساعدة"
|
39 |
-
|
40 |
-
#: includes/admin/class-admin.php:186
|
41 |
#, fuzzy
|
42 |
msgid ""
|
43 |
"Find out how to create a compelling, thriving business directory from "
|
@@ -47,64 +42,65 @@ msgstr ""
|
|
47 |
"(مجانا) مكونة من 5 أجزاء (ترسل عبر البريد الإلكتروني). أحصل على وحدة ممتازة "
|
48 |
"(premium module) مجانا بمجرد تسجيلك."
|
49 |
|
50 |
-
#: includes/admin/class-admin.php:
|
51 |
#, fuzzy
|
52 |
msgid "Want to know the Secrets of Building an Awesome Business Directory?"
|
53 |
msgstr "هل تريد معرفة \"أسرار بناء\" \"دليل أعمال مدهش\"؟"
|
54 |
|
55 |
-
#: includes/admin/class-admin.php:
|
56 |
#, fuzzy
|
57 |
msgid "Yes, please!"
|
58 |
msgstr "نعم، من فضلك!"
|
59 |
|
60 |
-
#: includes/admin/class-admin.php:
|
61 |
#, fuzzy
|
62 |
msgid "No, thanks"
|
63 |
msgstr "لا، شكرًا"
|
64 |
|
65 |
-
#: includes/admin/class-admin.php:
|
66 |
#, fuzzy
|
67 |
msgid "Invalid email address."
|
68 |
msgstr "عنوان البريد الإلكتروني غير صالح!"
|
69 |
|
70 |
-
#: includes/admin/class-admin.php:
|
71 |
#, fuzzy
|
72 |
msgid "Business Directory Admin"
|
73 |
msgstr "مدير دليل الأعمال"
|
74 |
|
75 |
-
#: includes/admin/class-admin.php:
|
76 |
#: includes/admin/settings/class-settings-bootstrap.php:703
|
77 |
#: includes/admin/settings/class-settings-bootstrap.php:704
|
78 |
-
#: includes/helpers/class-app.php:93
|
|
|
79 |
msgid "Directory"
|
80 |
msgstr "الدليل"
|
81 |
|
82 |
-
#: includes/admin/class-admin.php:
|
83 |
msgid "Fee Plans"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/admin/class-admin.php:
|
87 |
#, fuzzy
|
88 |
msgid "Form Fields"
|
89 |
msgstr "حقول الاستمارة"
|
90 |
|
91 |
-
#: includes/admin/class-admin.php:
|
92 |
#: includes/licensing.php:220
|
93 |
#, fuzzy
|
94 |
msgid "Modules"
|
95 |
msgstr "(جميع الوحدات)"
|
96 |
|
97 |
-
#: includes/admin/class-admin.php:
|
98 |
#, fuzzy
|
99 |
msgid "Business Directory"
|
100 |
msgstr "دليل الأعمال"
|
101 |
|
102 |
-
#: includes/admin/class-admin.php:
|
103 |
#, fuzzy
|
104 |
msgid "Could not send renewal email."
|
105 |
msgstr "إرسال رسالة بريد إلكتروني بخصوص التجديد للعضو"
|
106 |
|
107 |
-
#: includes/admin/class-admin.php:
|
108 |
#: includes/admin/helpers/tables/class-form-fields-table.php:127
|
109 |
#: includes/admin/helpers/tables/class-payments-table.php:54
|
110 |
#: templates/email/listing-added.tpl.php:7
|
@@ -114,17 +110,12 @@ msgstr "إرسال رسالة بريد إلكتروني بخصوص التجدي
|
|
114 |
msgid "ID"
|
115 |
msgstr "المعرف"
|
116 |
|
117 |
-
#: includes/admin/class-admin.php:
|
118 |
#: includes/admin/settings/class-settings-bootstrap.php:729
|
119 |
#, fuzzy
|
120 |
msgid "Listing Count"
|
121 |
msgstr "عدد الإعلانات"
|
122 |
|
123 |
-
#: includes/admin/class-csv-import.php:676
|
124 |
-
#, fuzzy
|
125 |
-
msgid "Listing imported by admin. Payment skipped."
|
126 |
-
msgstr "Poster annonce(paiement initial)"
|
127 |
-
|
128 |
#: includes/admin/class-listing-owner.php:62
|
129 |
#: includes/admin/class-listing-owner.php:89
|
130 |
#, fuzzy
|
@@ -192,8 +183,34 @@ msgstr "Business Directory Plugin"
|
|
192 |
msgid "Are you sure you want to do this?"
|
193 |
msgstr "هل أنت متأكد من أنك تريد عمل هذا؟"
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
#: includes/admin/controllers/class-admin-listings.php:185
|
196 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
197 |
#: templates/email/listing-reported.tpl.php:7
|
198 |
msgid "Listing Information"
|
199 |
msgstr "معلومات حول الإعلان"
|
@@ -226,7 +243,7 @@ msgstr "حالة مميزة (مثبت)"
|
|
226 |
|
227 |
#: includes/admin/controllers/class-admin-listings.php:475
|
228 |
#: includes/class-cpt-integration.php:19
|
229 |
-
#: includes/compatibility/class-navxt-integration.php:
|
230 |
#: templates/submit-listing.tpl.php:15
|
231 |
msgid "Edit Listing"
|
232 |
msgstr "تحرير الإعلان"
|
@@ -236,6 +253,27 @@ msgstr "تحرير الإعلان"
|
|
236 |
msgid "Delete Listing"
|
237 |
msgstr "حذف الإعلان"
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
#: includes/admin/controllers/class-themes-admin.php:44
|
240 |
#, fuzzy
|
241 |
msgid "Themes"
|
@@ -261,26 +299,6 @@ msgstr "حدث خطأ أثناء رفع ملف CSV."
|
|
261 |
msgid "Please upload the correct file type."
|
262 |
msgstr "المرجو رفع أو حدد ملف CSV."
|
263 |
|
264 |
-
#: includes/admin/fees.php:47
|
265 |
-
#: includes/admin/helpers/tables/class-fees-table.php:62
|
266 |
-
#: includes/admin/helpers/tables/class-payments-table.php:57
|
267 |
-
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:273
|
268 |
-
#: templates/admin/metaboxes-listing-information-plan.tpl.php:73
|
269 |
-
#: templates/admin/payments-details.tpl.php:110
|
270 |
-
#: templates/email/listing-payment-completed.tpl.php:21
|
271 |
-
#: templates/payment/payment_items.tpl.php:5
|
272 |
-
#, fuzzy
|
273 |
-
msgid "Amount"
|
274 |
-
msgstr "القدر"
|
275 |
-
|
276 |
-
#: includes/admin/fees.php:49
|
277 |
-
#: includes/admin/helpers/tables/class-fees-table.php:64
|
278 |
-
#: includes/admin/settings/class-settings-bootstrap.php:919
|
279 |
-
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:275
|
280 |
-
#, fuzzy
|
281 |
-
msgid "Images"
|
282 |
-
msgstr "الصور"
|
283 |
-
|
284 |
#: includes/admin/helpers/class-listing-information-metabox.php:15
|
285 |
#: includes/admin/helpers/tables/class-payments-table.php:53
|
286 |
#: includes/admin/settings/class-settings-bootstrap.php:679
|
@@ -327,6 +345,11 @@ msgstr "قم بالتفعيل"
|
|
327 |
msgid "Upgrade Now"
|
328 |
msgstr "ترقية إلى %s"
|
329 |
|
|
|
|
|
|
|
|
|
|
|
330 |
#. translators: %1$s: open link html, %2$s close link
|
331 |
#: includes/admin/helpers/tables/class-fees-table.php:30
|
332 |
#, fuzzy
|
@@ -343,18 +366,6 @@ msgstr "تعطيل"
|
|
343 |
msgid "Enable"
|
344 |
msgstr "تفعيل"
|
345 |
|
346 |
-
#: includes/admin/helpers/tables/class-fees-table.php:175
|
347 |
-
#: includes/admin/helpers/tables/class-form-fields-table.php:104
|
348 |
-
#: includes/admin/settings/class-settings-admin.php:536
|
349 |
-
#: templates/admin/metaboxes-listing-flagging-row.tpl.php:19
|
350 |
-
#: templates/admin/payments-note.tpl.php:14
|
351 |
-
#: templates/admin/themes-item.tpl.php:58
|
352 |
-
#: templates/parts/listing-buttons.tpl.php:33
|
353 |
-
#: templates/parts/listing-buttons.tpl.php:67
|
354 |
-
#, fuzzy
|
355 |
-
msgid "Delete"
|
356 |
-
msgstr "حذف"
|
357 |
-
|
358 |
#: includes/admin/helpers/tables/class-fees-table.php:256
|
359 |
#: includes/admin/helpers/tables/class-fees-table.php:258
|
360 |
#, fuzzy
|
@@ -362,7 +373,7 @@ msgid "Disabled"
|
|
362 |
msgstr "معطل"
|
363 |
|
364 |
#: includes/admin/helpers/tables/class-fees-table.php:264
|
365 |
-
#: includes/templates-ui.php:431
|
366 |
#, fuzzy
|
367 |
msgid "Default"
|
368 |
msgstr "رسوم افتراضية"
|
@@ -390,13 +401,14 @@ msgstr ""
|
|
390 |
"الأعمال للقيام بذلك نيابة عنك تلقائياً."
|
391 |
|
392 |
#: includes/admin/helpers/tables/class-form-fields-table.php:222
|
393 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
394 |
#, fuzzy
|
395 |
msgid "Go to \"Form Fields\""
|
396 |
msgstr "إنتقل إلى \"إدارة حقول\""
|
397 |
|
398 |
#: includes/admin/helpers/tables/class-form-fields-table.php:313
|
399 |
-
#: includes/functions
|
|
|
400 |
msgid "Go back"
|
401 |
msgstr ""
|
402 |
|
@@ -410,7 +422,7 @@ msgid "Title"
|
|
410 |
msgstr "العنوان"
|
411 |
|
412 |
#: includes/admin/helpers/tables/class-form-fields-table.php:524
|
413 |
-
#: templates/admin/fees-form.tpl.php:
|
414 |
#: templates/email/listing-added.tpl.php:21
|
415 |
#: templates/email/listing-edited.tpl.php:29
|
416 |
#, fuzzy
|
@@ -520,17 +532,8 @@ msgstr "حسناً"
|
|
520 |
msgid "Missing tables: %s"
|
521 |
msgstr "الجداول المفقودة: %s"
|
522 |
|
523 |
-
#: includes/admin/settings/class-settings-admin.php:476
|
524 |
-
msgid "Your license key provides access to new features and updates."
|
525 |
-
msgstr ""
|
526 |
-
|
527 |
-
#: includes/admin/settings/class-settings-admin.php:478
|
528 |
-
#, fuzzy
|
529 |
-
msgid "You're using Business Directory Plugin Lite. Enjoy!"
|
530 |
-
msgstr "لماذا قمت بحذف إضافة دليل الأعمال؟"
|
531 |
-
|
532 |
#: includes/admin/settings/class-settings-bootstrap.php:13
|
533 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
534 |
#: includes/form-fields.php:428 templates/admin/payments-details.tpl.php:137
|
535 |
#: templates/listing-contactform.tpl.php:33
|
536 |
#: templates/listing-flagging-form.tpl.php:39
|
@@ -559,7 +562,7 @@ msgid "SEO"
|
|
559 |
msgstr ""
|
560 |
|
561 |
#: includes/admin/settings/class-settings-bootstrap.php:255
|
562 |
-
#: includes/class-assets.php:
|
563 |
#: includes/fields/class-fieldtypes-textarea.php:200
|
564 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
565 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
@@ -579,7 +582,7 @@ msgstr "الإسم العائلي مطلوب."
|
|
579 |
|
580 |
#: includes/admin/settings/class-settings-bootstrap.php:264
|
581 |
#: includes/admin/settings/class-settings-bootstrap.php:278
|
582 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
583 |
#, fuzzy
|
584 |
msgid "Terms and Conditions"
|
585 |
msgstr "شروط وأحكام"
|
@@ -802,7 +805,7 @@ msgstr ""
|
|
802 |
#: templates/email/listing-added.tpl.php:13
|
803 |
#: templates/email/listing-edited.tpl.php:19
|
804 |
#: templates/email/listing-reported.tpl.php:13
|
805 |
-
#: templates/email-access-keys.tpl.php:
|
806 |
#, fuzzy
|
807 |
msgid "URL"
|
808 |
msgstr "رابط URL"
|
@@ -883,11 +886,11 @@ msgstr "إسم الكاتب"
|
|
883 |
msgid "Uninstall"
|
884 |
msgstr "حذف"
|
885 |
|
886 |
-
#: includes/admin/settings/class-settings.php:
|
887 |
msgid "%s cannot include spaces, commas, or &"
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: includes/admin/tracking.php:
|
891 |
#, fuzzy
|
892 |
msgid "Allow Tracking"
|
893 |
msgstr "السماح بالتتبع"
|
@@ -987,13 +990,57 @@ msgstr "Vue"
|
|
987 |
msgid "Status: %s"
|
988 |
msgstr "الحالة"
|
989 |
|
990 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:86
|
992 |
#, fuzzy
|
993 |
msgid "Never"
|
994 |
msgstr "أبداً"
|
995 |
|
996 |
-
#: includes/class-assets.php:
|
997 |
#: includes/fields/class-fieldtypes-textarea.php:201
|
998 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
999 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
@@ -1001,7 +1048,7 @@ msgstr "أبداً"
|
|
1001 |
msgid "Yes"
|
1002 |
msgstr "نعم"
|
1003 |
|
1004 |
-
#: includes/class-assets.php:
|
1005 |
#, fuzzy
|
1006 |
msgid ""
|
1007 |
"Preview is only available after you've saved the first draft. This is due to "
|
@@ -1018,7 +1065,8 @@ msgstr "إعلان جديد"
|
|
1018 |
msgid "View Listing"
|
1019 |
msgstr "عرض الإعلان"
|
1020 |
|
1021 |
-
#: includes/class-cpt-integration.php:22
|
|
|
1022 |
#: templates/main-box.tpl.php:23
|
1023 |
msgid "Search Listings"
|
1024 |
msgstr "البحث في الإعلانات"
|
@@ -1118,14 +1166,15 @@ msgstr "إعلان مجاني"
|
|
1118 |
|
1119 |
#: includes/class-meta.php:155
|
1120 |
#: includes/controllers/pages/class-submit-listing.php:32
|
1121 |
-
#: includes/templates-ui.php:329
|
|
|
1122 |
#, fuzzy
|
1123 |
msgid "Add Listing"
|
1124 |
msgstr "إضافة رسوم الإعلان"
|
1125 |
|
1126 |
#: includes/class-meta.php:165
|
1127 |
#: includes/controllers/pages/class-all-listings.php:6
|
1128 |
-
#: includes/templates-ui.php:316
|
1129 |
msgid "View All Listings"
|
1130 |
msgstr "مشاهدة جميع الإعلانات"
|
1131 |
|
@@ -1137,33 +1186,33 @@ msgid ""
|
|
1137 |
"to %1$sFee Plans%2$s to add or edit your fee plan(s)."
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: includes/class-wpbdp.php:
|
1141 |
#, fuzzy
|
1142 |
msgid "Upgrade to Premium"
|
1143 |
msgstr "ترقية إلى %s"
|
1144 |
|
1145 |
-
#: includes/class-wpbdp.php:
|
1146 |
#, fuzzy
|
1147 |
msgid "Settings"
|
1148 |
msgstr "إعدادات"
|
1149 |
|
1150 |
-
#: includes/class-wpbdp.php:
|
1151 |
#, fuzzy
|
1152 |
msgid "Could not find listing ID"
|
1153 |
msgstr "لا يمكن الاتصال بخادم الترخيص"
|
1154 |
|
1155 |
-
#: includes/class-wpbdp.php:
|
1156 |
msgid ""
|
1157 |
"Could not verify the image upload request. If problem persists contact site "
|
1158 |
"admin."
|
1159 |
msgstr ""
|
1160 |
|
1161 |
-
#: includes/class-wpbdp.php:
|
1162 |
#, fuzzy
|
1163 |
msgid "Could not find image ID"
|
1164 |
msgstr "تعذر تحديث القالب : %s"
|
1165 |
|
1166 |
-
#: includes/class-wpbdp.php:
|
1167 |
#, fuzzy
|
1168 |
msgid ""
|
1169 |
"The directory features are disabled at this time because a <a>manual "
|
@@ -1172,14 +1221,14 @@ msgstr ""
|
|
1172 |
"تم تعطيل ميزات دليل الأعمال حاليا بسبب أن الإضافة تحتاج إلى إجراء ترقية "
|
1173 |
"يدوية قبل المتابعة."
|
1174 |
|
1175 |
-
#: includes/class-wpbdp.php:
|
1176 |
msgid ""
|
1177 |
"The directory is not available at this time. Please try again in a few "
|
1178 |
"minutes or contact the administrator if the problem persists."
|
1179 |
msgstr ""
|
1180 |
|
1181 |
-
#: includes/compatibility/class-navxt-integration.php:
|
1182 |
-
#: includes/widgets/widget-search.php:
|
1183 |
#: templates/admin/payments-index.tpl.php:13
|
1184 |
#: templates/deprecated/search.tpl.php:8 templates/search-form.tpl.php:27
|
1185 |
#: templates/search.tpl.php:5
|
@@ -1343,49 +1392,39 @@ msgstr ""
|
|
1343 |
"Il s'agit seulement d'une pré-visualisation. L'annonce n'a pas encore été "
|
1344 |
"publiée."
|
1345 |
|
1346 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1347 |
-
#, fuzzy
|
1348 |
-
msgid "Select"
|
1349 |
-
msgstr "قائمة منسدلة"
|
1350 |
-
|
1351 |
-
#: includes/controllers/pages/class-submit-listing.php:81
|
1352 |
-
#, fuzzy
|
1353 |
-
msgid "Selected"
|
1354 |
-
msgstr "قائمة منسدلة"
|
1355 |
-
|
1356 |
-
#: includes/controllers/pages/class-submit-listing.php:553
|
1357 |
#, fuzzy
|
1358 |
msgid "Listing Images"
|
1359 |
msgstr "صور الإعلانات"
|
1360 |
|
1361 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1362 |
msgid "Account Creation"
|
1363 |
msgstr ""
|
1364 |
|
1365 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1366 |
#, fuzzy
|
1367 |
msgid "Go to \"Fee Plans\""
|
1368 |
msgstr "إنتقل إلى \"إدارة حقول\""
|
1369 |
|
1370 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1371 |
#, fuzzy
|
1372 |
msgid "Please choose a fee plan."
|
1373 |
msgstr "المرجو تحديد خيار رسوم التصنيف \"%s\"."
|
1374 |
|
1375 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1376 |
msgid "Please check the form for errors, correct them and submit again."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1380 |
msgid "Create a user account on this site"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1384 |
#, fuzzy
|
1385 |
msgid "Username"
|
1386 |
msgstr "عضو"
|
1387 |
|
1388 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1389 |
#, fuzzy
|
1390 |
msgid "Clear Form"
|
1391 |
msgstr "مسح"
|
@@ -1691,10 +1730,6 @@ msgstr "%s غير صالح. يجب أن تكون القيمة واحدة من %s
|
|
1691 |
msgid "%s is badly formatted. Valid Phone Number format required."
|
1692 |
msgstr "%s مهيأ بشكل سيئ. المطلوب تنسيق بريد إلكتروني صالح."
|
1693 |
|
1694 |
-
#: includes/functions.php:498 templates/admin/fees-index.tpl.php:67
|
1695 |
-
msgid "Free"
|
1696 |
-
msgstr "مجاني"
|
1697 |
-
|
1698 |
#: includes/gateways/class-gateway-authorize-net.php:358
|
1699 |
msgid ""
|
1700 |
"An error occurred while trying to cancel your subscription. Please try again "
|
@@ -1707,6 +1742,31 @@ msgid ""
|
|
1707 |
"%s. You can try again later or cancel subscription from gateway dashboard."
|
1708 |
msgstr ""
|
1709 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1710 |
#. translators: %1%s: opening <a> tag, %2$s: closing </a> tag
|
1711 |
#: includes/licensing.php:143
|
1712 |
msgid ""
|
@@ -1830,10 +1890,10 @@ msgstr ""
|
|
1830 |
msgid "Please enter a license key."
|
1831 |
msgstr "يرجى إدخال بريد إلكتروني صحيح."
|
1832 |
|
1833 |
-
|
1834 |
-
|
1835 |
-
msgid "
|
1836 |
-
msgstr "
|
1837 |
|
1838 |
#: includes/payment.php:34
|
1839 |
msgid "We couldn't find a payment associated with the given subscription."
|
@@ -1856,53 +1916,48 @@ msgstr ""
|
|
1856 |
msgid "Print Receipt"
|
1857 |
msgstr ""
|
1858 |
|
1859 |
-
#: includes/payment.php:
|
1860 |
#, fuzzy
|
1861 |
msgid "Pending Abandonment"
|
1862 |
msgstr "في انتظار التخلي"
|
1863 |
|
1864 |
-
#: includes/payment.php:
|
1865 |
#, fuzzy
|
1866 |
msgid "Abandoned"
|
1867 |
msgstr "متخلى عنه"
|
1868 |
|
1869 |
-
#: includes/
|
1870 |
-
#, fuzzy
|
1871 |
-
msgid "Manage Listings"
|
1872 |
-
msgstr "إدارة الإعلانات المدفوعة"
|
1873 |
-
|
1874 |
-
#: includes/themes.php:951
|
1875 |
#, fuzzy
|
1876 |
msgid "ZIP file is not a valid Business Directory theme file."
|
1877 |
msgstr "ملف الضغط ZIP ليس ملف قالب دليل الأعمال صالح."
|
1878 |
|
1879 |
-
#: includes/utils.php:
|
1880 |
#, fuzzy
|
1881 |
msgid "File size (%1$s) exceeds maximum file size of %2$s"
|
1882 |
msgstr "حجم الملف (%s) يتجاوز الحجم الأقصى للملف %s"
|
1883 |
|
1884 |
-
#: includes/utils.php:
|
1885 |
#, fuzzy
|
1886 |
msgid "File size (%1$s) is smaller than the minimum file size of %2$s"
|
1887 |
msgstr "حجم الملف (%s) أقل من الحد الأدنى المطلوب لحجم الملف لـ %s"
|
1888 |
|
1889 |
-
#: includes/utils.php:
|
1890 |
#, fuzzy
|
1891 |
msgid "Image width (%1$s px) is smaller than the minimum width of %2$s px."
|
1892 |
msgstr "عرض الصورة (%s px) هو أكبر من الحد الأقصى للعرض المسموح به لـ %s px "
|
1893 |
|
1894 |
-
#: includes/utils.php:
|
1895 |
#, fuzzy
|
1896 |
msgid "Image height (%1$s px) is smaller than the minimum height of %2$s px."
|
1897 |
msgstr ""
|
1898 |
"ارتفاع الصورة (%s px) هو أكبر من الحد الأقصى للارتفاع المطلوب لـ %s px "
|
1899 |
|
1900 |
-
#: includes/utils.php:
|
1901 |
#, fuzzy
|
1902 |
msgid "Image width (%1$s px) is greater than maximum width of %2$s px."
|
1903 |
msgstr "عرض الصورة (%s px) هو أكبر من الحد الأقصى للعرض المسموح به لـ %s px "
|
1904 |
|
1905 |
-
#: includes/utils.php:
|
1906 |
#, fuzzy
|
1907 |
msgid "Image height (%1$s px) is greater than maximum height of %2$s px."
|
1908 |
msgstr ""
|
@@ -2099,7 +2154,7 @@ msgstr ""
|
|
2099 |
msgid "Download Debug Information"
|
2100 |
msgstr "تحميل معلومات التصحيح"
|
2101 |
|
2102 |
-
#: templates/admin/fees-add-fee.tpl.php:4 templates/admin/fees-form.tpl.php:
|
2103 |
#, fuzzy
|
2104 |
msgid "Add Listing Fee"
|
2105 |
msgstr "إضافة رسوم الإعلان"
|
@@ -2152,12 +2207,11 @@ msgstr "(متكرر)"
|
|
2152 |
msgid "Should the listing auto-renew at the end of the listing term?"
|
2153 |
msgstr ""
|
2154 |
|
2155 |
-
#: templates/admin/fees-form.tpl.php:
|
2156 |
-
|
2157 |
-
|
2158 |
-
msgstr "هذا إعلان مميز/مثبت"
|
2159 |
|
2160 |
-
#: templates/admin/fees-form.tpl.php:
|
2161 |
#, fuzzy
|
2162 |
msgid ""
|
2163 |
"This floats the listing to the top of search results and browsing the "
|
@@ -2166,15 +2220,15 @@ msgstr ""
|
|
2166 |
"هذا يظهر الإعلان أعلى نتائج البحث وأثناء تصفح الدليل عندما يشتري العضو هذه "
|
2167 |
"الخطة."
|
2168 |
|
2169 |
-
#: templates/admin/fees-form.tpl.php:
|
2170 |
msgid "Listing background color:"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
-
#: templates/admin/fees-form.tpl.php:
|
2174 |
msgid "Used to differentiate listings inside this plan from others."
|
2175 |
msgstr ""
|
2176 |
|
2177 |
-
#: templates/admin/fees-form.tpl.php:
|
2178 |
#: templates/admin/settings-email.tpl.php:104
|
2179 |
#: templates/submit-listing-section.tpl.php:30
|
2180 |
#, fuzzy
|
@@ -2296,7 +2350,7 @@ msgid "Manage Paid Listings"
|
|
2296 |
msgstr "إدارة الإعلانات المدفوعة"
|
2297 |
|
2298 |
#: templates/admin/metaboxes-listing-information-other.tpl.php:3
|
2299 |
-
#: templates/email-access-keys.tpl.php:
|
2300 |
#: templates/login.tpl.php:71
|
2301 |
#, fuzzy
|
2302 |
msgid "Access Key"
|
@@ -2546,99 +2600,28 @@ msgstr "يرجى ملاحظة أنه سيتم فقدان كافة الإعداد
|
|
2546 |
msgid "Your existing listings will NOT be deleted doing this."
|
2547 |
msgstr ""
|
2548 |
|
2549 |
-
#: templates/admin/sidebar.tpl.php:3
|
2550 |
-
#, fuzzy
|
2551 |
-
msgid "Category Images"
|
2552 |
-
msgstr "التصنيفات"
|
2553 |
-
|
2554 |
-
#: templates/admin/sidebar.tpl.php:4
|
2555 |
-
#, fuzzy
|
2556 |
-
msgid "PayPal Payments"
|
2557 |
-
msgstr "الدفعة الأولية"
|
2558 |
-
|
2559 |
-
#: templates/admin/sidebar.tpl.php:5
|
2560 |
-
#, fuzzy
|
2561 |
-
msgid "Google Maps"
|
2562 |
-
msgstr "وحدة خرائط جوجل"
|
2563 |
-
|
2564 |
-
#: templates/admin/sidebar.tpl.php:6
|
2565 |
-
#, fuzzy
|
2566 |
-
msgid "Regions"
|
2567 |
-
msgstr "وحدة المناطق"
|
2568 |
-
|
2569 |
#: templates/admin/sidebar.tpl.php:7
|
2570 |
-
|
2571 |
-
|
2572 |
-
msgstr "وحدة البحث عن الرمز البريدي"
|
2573 |
-
|
2574 |
-
#: templates/admin/sidebar.tpl.php:8
|
2575 |
-
#, fuzzy
|
2576 |
-
msgid "Ratings"
|
2577 |
-
msgstr "حقول التقييم"
|
2578 |
-
|
2579 |
-
#: templates/admin/sidebar.tpl.php:9
|
2580 |
-
#, fuzzy
|
2581 |
-
msgid "Stripe Payments"
|
2582 |
-
msgstr "الدفع"
|
2583 |
-
|
2584 |
-
#: templates/admin/sidebar.tpl.php:10
|
2585 |
-
#, fuzzy
|
2586 |
-
msgid "Featured Levels"
|
2587 |
-
msgstr "وحدة المستويات المميزة"
|
2588 |
-
|
2589 |
-
#: templates/admin/sidebar.tpl.php:11
|
2590 |
-
#, fuzzy
|
2591 |
-
msgid "Claim Listings"
|
2592 |
-
msgstr "المطالبة بوحدة الإعلانات"
|
2593 |
-
|
2594 |
-
#: templates/admin/sidebar.tpl.php:12
|
2595 |
-
#, fuzzy
|
2596 |
-
msgid "File Upload"
|
2597 |
-
msgstr "وحدة رفع الملفات"
|
2598 |
|
2599 |
#: templates/admin/sidebar.tpl.php:13
|
2600 |
-
|
2601 |
-
|
2602 |
-
msgstr "كود خصم الوحدة"
|
2603 |
-
|
2604 |
-
#: templates/admin/sidebar.tpl.php:17
|
2605 |
-
#, fuzzy
|
2606 |
-
msgid "Modern Business Theme"
|
2607 |
-
msgstr "قالب Elegant Business"
|
2608 |
|
2609 |
#: templates/admin/sidebar.tpl.php:18
|
2610 |
#, fuzzy
|
2611 |
-
msgid "
|
2612 |
-
msgstr "
|
2613 |
-
|
2614 |
-
#: templates/admin/sidebar.tpl.php:19
|
2615 |
-
#, fuzzy
|
2616 |
-
msgid "Mobile Compact Theme"
|
2617 |
-
msgstr "قالب Mobile Compact"
|
2618 |
-
|
2619 |
-
#: templates/admin/sidebar.tpl.php:20
|
2620 |
-
#, fuzzy
|
2621 |
-
msgid "Restaurant Theme"
|
2622 |
-
msgstr "قالب Restaurant"
|
2623 |
-
|
2624 |
-
#: templates/admin/sidebar.tpl.php:21
|
2625 |
-
#, fuzzy
|
2626 |
-
msgid "Tabbed Business Theme"
|
2627 |
-
msgstr "قالب Tabbed Business"
|
2628 |
|
2629 |
-
#: templates/admin/sidebar.tpl.php:
|
2630 |
#, fuzzy
|
2631 |
-
msgid "
|
2632 |
-
msgstr "
|
2633 |
|
2634 |
-
#: templates/admin/sidebar.tpl.php:
|
2635 |
#, fuzzy
|
2636 |
-
msgid "
|
2637 |
-
msgstr "
|
2638 |
-
|
2639 |
-
#: templates/admin/sidebar.tpl.php:40
|
2640 |
-
msgid "Need help?"
|
2641 |
-
msgstr ""
|
2642 |
|
2643 |
#: templates/admin/themes-delete-confirm.tpl.php:1
|
2644 |
#: templates/admin/themes-delete-confirm.tpl.php:13
|
@@ -3180,47 +3163,224 @@ msgctxt "views"
|
|
3180 |
msgid "Find A Listing"
|
3181 |
msgstr "العثور على إعلان"
|
3182 |
|
3183 |
-
#: includes/admin/class-admin
|
3184 |
-
msgctxt "
|
3185 |
-
msgid "
|
3186 |
-
msgstr "
|
3187 |
-
|
3188 |
-
#: includes/admin/class-csv-import.php:533
|
3189 |
-
msgctxt "admin csv-import"
|
3190 |
-
msgid ""
|
3191 |
-
"Could not create listing category \"<category-name>\". The operation failed "
|
3192 |
-
"with the following error: <error-message>."
|
3193 |
-
msgstr ""
|
3194 |
|
3195 |
-
#: includes/admin/class-
|
3196 |
-
msgctxt "admin
|
3197 |
-
msgid "
|
3198 |
-
msgstr "
|
3199 |
|
3200 |
-
#: includes/admin/class-
|
3201 |
-
msgctxt "admin
|
3202 |
-
msgid "
|
3203 |
-
msgstr "
|
3204 |
|
3205 |
-
#: includes/admin/class-
|
3206 |
-
msgctxt "admin
|
3207 |
-
msgid "
|
3208 |
msgstr ""
|
3209 |
|
3210 |
-
#: includes/admin/class-
|
3211 |
-
msgctxt "admin
|
3212 |
-
msgid "
|
3213 |
-
msgstr "
|
3214 |
-
|
3215 |
-
#: includes/admin/class-csv-import.php:833
|
3216 |
-
msgctxt "admin csv-import"
|
3217 |
-
msgid "Listing category \"%s\" does not exist"
|
3218 |
-
msgstr "تصنيف الإعلان \"%s\" غير موجود"
|
3219 |
|
3220 |
-
#: includes/admin/class-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3224 |
|
3225 |
#: includes/admin/csv-import.php:177
|
3226 |
msgctxt "admin csv-import"
|
@@ -3256,6 +3416,43 @@ msgctxt "admin csv-import"
|
|
3256 |
msgid "Import is in \"test mode\". Nothing will be inserted into the database."
|
3257 |
msgstr "الاستيراد في \"وضع الاختبار\". لن يتم إدراج أي شيء في قاعدة البيانات."
|
3258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3259 |
#: templates/admin/csv-import-progress.tpl.php:5
|
3260 |
msgctxt "admin csv-import"
|
3261 |
msgid "A fatal error occurred during the import. The reason given was: \"%s\"."
|
@@ -3481,448 +3678,245 @@ msgstr ""
|
|
3481 |
"تاريخ انتهاء صلاحية الإعلان بهذا التنسيق YYYY-MM-dd. \"استخدام\" هذا العمود "
|
3482 |
"عند إضافة أو تحديث الإعلانات من مصادر خارجية."
|
3483 |
|
3484 |
-
#: includes/admin/class-admin-csv.php:
|
3485 |
#, fuzzy
|
3486 |
msgctxt "admin csv"
|
3487 |
msgid "Import"
|
3488 |
msgstr "استيراد CSV"
|
3489 |
|
3490 |
-
#: includes/admin/class-admin-csv.php:
|
3491 |
#, fuzzy
|
3492 |
msgctxt "admin csv"
|
3493 |
msgid "Export"
|
3494 |
msgstr "تصدير CSV"
|
3495 |
|
3496 |
-
#: includes/admin/class-admin.php:
|
3497 |
-
msgctxt "
|
3498 |
-
msgid "
|
3499 |
-
msgstr "
|
3500 |
|
3501 |
-
#: includes/admin/class-admin.php:
|
3502 |
-
msgctxt "
|
3503 |
-
msgid "
|
3504 |
-
msgstr "
|
3505 |
|
3506 |
-
#: includes/admin/class-admin.php:
|
3507 |
-
msgctxt "
|
3508 |
-
msgid "
|
3509 |
-
msgstr "
|
3510 |
|
3511 |
-
#: includes/admin/class-admin.php:
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
|
|
3515 |
|
3516 |
-
#: includes/admin/class-admin.php:
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
|
|
3520 |
|
3521 |
-
#: includes/admin/class-admin
|
3522 |
#, fuzzy
|
3523 |
-
msgctxt "admin"
|
3524 |
-
msgid "
|
3525 |
-
|
3526 |
-
msgstr[0] "تمت ترقية الإعلان."
|
3527 |
-
msgstr[1] "تمت ترقية الإعلان."
|
3528 |
-
msgstr[2] "تمت ترقية الإعلانين."
|
3529 |
-
msgstr[3] "تمت ترقية الإعلانات."
|
3530 |
-
msgstr[4] "تمت ترقية الإعلانات."
|
3531 |
-
msgstr[5] "تمت ترقية الإعلانات."
|
3532 |
|
3533 |
-
#: includes/admin/class-admin.php:
|
3534 |
-
msgctxt "admin"
|
3535 |
-
msgid "
|
3536 |
-
msgstr "
|
3537 |
|
3538 |
-
#: includes/admin/class-
|
3539 |
-
msgctxt "admin"
|
3540 |
-
msgid "
|
3541 |
-
|
3542 |
-
msgstr[0] "تم تجديد الإعلان."
|
3543 |
-
msgstr[1] "تم تجديد الإعلان."
|
3544 |
-
msgstr[2] "تم تجديد الإعلانين."
|
3545 |
-
msgstr[3] "تم تجديد الإعلانات."
|
3546 |
-
msgstr[4] "تم تجديد الإعلانات."
|
3547 |
-
msgstr[5] "تم تجديد الإعلانات."
|
3548 |
|
3549 |
-
#: includes/admin/class-
|
3550 |
-
msgctxt "admin"
|
3551 |
-
msgid "
|
3552 |
-
msgstr "
|
3553 |
|
3554 |
-
#: includes/admin/class-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
msgstr
|
3563 |
-
msgstr[4] "إنتهاء صلاحية الإعلان"
|
3564 |
-
msgstr[5] "إنتهاء صلاحية الإعلان"
|
3565 |
|
3566 |
-
#: includes/admin/class-
|
3567 |
#, fuzzy
|
3568 |
-
msgctxt "admin"
|
3569 |
-
msgid "
|
3570 |
-
msgstr "
|
3571 |
|
3572 |
-
#: includes/admin/class-
|
3573 |
-
msgctxt "admin"
|
3574 |
-
msgid "
|
3575 |
-
msgstr ""
|
3576 |
|
3577 |
-
#: includes/admin/class-
|
3578 |
-
msgctxt "admin"
|
3579 |
-
msgid ""
|
3580 |
-
"<b>Business Directory Plugin</b> requires a page with the "
|
3581 |
-
"<tt>[businessdirectory]</tt> shortcode to function properly."
|
3582 |
msgstr ""
|
3583 |
-
"<b>إضافة دليل الأعمال</b> تتطلب صفحة فيها الكود القصير "
|
3584 |
-
"<tt>[businessdirectory]</tt> لكي تعمل بشكل صحيح."
|
3585 |
|
3586 |
-
#: includes/admin/class-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
msgstr ""
|
3592 |
-
"يمكنك إنشاء هذه الصفحة بنفسك أو ترك دليل الأعمال القيام بذلك نيابة عنك "
|
3593 |
-
"تلقائياً."
|
3594 |
|
3595 |
-
#: includes/admin/class-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
|
|
3599 |
|
3600 |
-
#: includes/admin/class-
|
3601 |
-
msgctxt "admin"
|
3602 |
-
msgid ""
|
3603 |
-
|
3604 |
-
"or later, but your server is running version <strong>%s</strong>. Please ask "
|
3605 |
-
"your provider to upgrade in order to prevent any issues with the plugin."
|
3606 |
-
msgstr ""
|
3607 |
|
3608 |
-
#: includes/admin/class-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
"
|
3613 |
-
|
3614 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3615 |
msgstr ""
|
3616 |
-
"لاحظنا أنك تريد من أعضاء دليل الأعمال التسجيل قبل نشر الإعلانات، ولكنك حاليا "
|
3617 |
-
"تعطل التسجيل في موقعك. إذهب [هنا] واختر \"السماح بالتسجيل\" لجعل دليل "
|
3618 |
-
"الأعمال يعمل بشكل صحيح."
|
3619 |
|
3620 |
-
#: includes/admin/class-
|
3621 |
#, fuzzy
|
3622 |
-
msgctxt "admin"
|
3623 |
-
msgid "
|
3624 |
-
msgstr "
|
3625 |
|
3626 |
-
#: includes/admin/class-
|
3627 |
#, fuzzy
|
3628 |
-
msgctxt "admin"
|
3629 |
-
msgid "
|
3630 |
-
msgstr "
|
3631 |
|
3632 |
-
#: includes/admin/class-
|
3633 |
#, fuzzy
|
3634 |
-
msgctxt "admin"
|
3635 |
-
msgid "
|
3636 |
-
msgstr "
|
3637 |
|
3638 |
-
#: includes/admin/
|
3639 |
#, fuzzy
|
3640 |
-
msgctxt "admin"
|
3641 |
-
msgid "
|
3642 |
-
msgstr "
|
3643 |
|
3644 |
-
#: includes/admin/
|
3645 |
-
msgctxt "admin"
|
3646 |
-
msgid "
|
3647 |
-
msgstr "
|
3648 |
|
3649 |
-
#:
|
3650 |
-
msgctxt "admin"
|
3651 |
-
msgid ""
|
3652 |
-
"<b>Business Directory Plugin</b> requires fields with the following "
|
3653 |
-
"associations in order to work correctly: <b>%s</b>."
|
3654 |
msgstr ""
|
3655 |
-
"<b>إضافة دليل الأعمال</b> تتطلب حقول مع المرتبطات التالية بالترتيب لكي تعمل "
|
3656 |
-
"بشكل صحيح: <b>%s</b>."
|
3657 |
|
3658 |
-
#:
|
3659 |
-
|
3660 |
-
|
3661 |
-
"
|
3662 |
-
"
|
|
|
|
|
|
|
|
|
3663 |
msgstr ""
|
3664 |
-
"<b>إضافة دليل الأعمال</b> تتطلب حقل مع <b>%s</b> المرتبطات التالية بالترتيب "
|
3665 |
-
"لكي تعمل بشكل صحيح."
|
3666 |
|
3667 |
-
#:
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3671 |
|
3672 |
-
#:
|
3673 |
#, fuzzy
|
3674 |
-
msgctxt "admin
|
3675 |
-
msgid "
|
3676 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3677 |
|
3678 |
-
#:
|
3679 |
#, fuzzy
|
3680 |
-
msgctxt "admin
|
3681 |
-
msgid "
|
3682 |
-
msgstr "
|
3683 |
|
3684 |
-
#:
|
3685 |
-
msgctxt "admin
|
3686 |
-
msgid "
|
3687 |
-
msgstr "
|
3688 |
|
3689 |
-
#:
|
3690 |
#, fuzzy
|
3691 |
-
msgctxt "admin
|
3692 |
-
msgid "
|
3693 |
-
msgstr "
|
3694 |
|
3695 |
-
#:
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
|
|
3699 |
|
3700 |
-
#:
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
|
|
3704 |
|
3705 |
-
#:
|
3706 |
-
msgctxt "admin
|
3707 |
-
msgid "
|
3708 |
-
msgstr ""
|
3709 |
-
|
3710 |
-
#: templates/admin/csv-export.tpl.php:13
|
3711 |
-
msgctxt "admin csv-export"
|
3712 |
-
msgid ""
|
3713 |
-
"Please note that the export process is a resource intensive task. If your "
|
3714 |
-
"export does not succeed try disabling other plugins first and/or increasing "
|
3715 |
-
"the values of the 'memory_limit' and 'max_execution_time' directives in your "
|
3716 |
-
"server's php.ini configuration file."
|
3717 |
-
msgstr ""
|
3718 |
-
"يرجى ملاحظة أن عملية التصدير مهمة تتطلب موارد كثيرة. إذا لم تنجح في التصدير "
|
3719 |
-
"حاول تعطيل إضافات أخرى أولاً و/أو زيادة قيم التوجيهات 'memory_limit' و "
|
3720 |
-
"'max_execution_time' في الخادم الخاص بك بتعديل ملف الإعدادات php.ini."
|
3721 |
-
|
3722 |
-
#: templates/admin/csv-export.tpl.php:29
|
3723 |
-
msgctxt "admin csv-export"
|
3724 |
-
msgid "Export settings"
|
3725 |
-
msgstr "إعدادات التصدير"
|
3726 |
-
|
3727 |
-
#: templates/admin/csv-export.tpl.php:33
|
3728 |
-
msgctxt "admin csv-export"
|
3729 |
-
msgid "Which listings to export?"
|
3730 |
-
msgstr "أي لائحة تريد التصدير؟"
|
3731 |
-
|
3732 |
-
#: templates/admin/csv-export.tpl.php:37
|
3733 |
-
msgctxt "admin csv-export"
|
3734 |
-
msgid "All"
|
3735 |
-
msgstr "الكل"
|
3736 |
-
|
3737 |
-
#: templates/admin/csv-export.tpl.php:38
|
3738 |
-
msgctxt "admin csv-export"
|
3739 |
-
msgid "Active Only"
|
3740 |
-
msgstr "المفعل فقط"
|
3741 |
-
|
3742 |
-
#: templates/admin/csv-export.tpl.php:39
|
3743 |
-
msgctxt "admin csv-export"
|
3744 |
-
msgid "Active + Pending Renewal"
|
3745 |
-
msgstr "مفعل + ريثما يتم التجديد"
|
3746 |
-
|
3747 |
-
#: templates/admin/csv-export.tpl.php:45
|
3748 |
-
msgctxt "admin csv-export"
|
3749 |
-
msgid "Export images?"
|
3750 |
-
msgstr "تصدير الصور؟"
|
3751 |
-
|
3752 |
-
#: templates/admin/csv-export.tpl.php:50
|
3753 |
-
msgctxt "admin csv-export"
|
3754 |
-
msgid "Export images"
|
3755 |
-
msgstr "تصدير الصور"
|
3756 |
-
|
3757 |
-
#: templates/admin/csv-export.tpl.php:52
|
3758 |
-
msgctxt "admin csv-export"
|
3759 |
-
msgid ""
|
3760 |
-
"When checked, instead of just a CSV file a ZIP file will be generated with "
|
3761 |
-
"both a CSV file and listing images."
|
3762 |
-
msgstr ""
|
3763 |
-
"عند اختيار الخانة، بدلاً من مجرد ملف CSV سيتم إنشاء ملف مضغوط مع ملف CSV "
|
3764 |
-
"ولائحة الصور."
|
3765 |
-
|
3766 |
-
#: templates/admin/csv-export.tpl.php:58
|
3767 |
-
msgctxt "admin csv-export"
|
3768 |
-
msgid "Additional metadata to export:"
|
3769 |
-
msgstr "بيانات تعريف إضافية للتصدير:"
|
3770 |
-
|
3771 |
-
#: templates/admin/csv-export.tpl.php:63
|
3772 |
-
msgctxt "admin csv-export"
|
3773 |
-
msgid "Include unique IDs for each listing (sequence_id column)."
|
3774 |
-
msgstr "تتضمن معرفات (IDs) فريدة لكل إعلان (عمود sequence_id)."
|
3775 |
-
|
3776 |
-
#: templates/admin/csv-export.tpl.php:71
|
3777 |
-
msgctxt "admin csv-export"
|
3778 |
-
msgid "Author information (username)"
|
3779 |
-
msgstr "معلومات الكاتب (إسم المستخدم)"
|
3780 |
-
|
3781 |
-
#: templates/admin/csv-export.tpl.php:76
|
3782 |
-
msgctxt "admin csv-export"
|
3783 |
-
msgid "Listing expiration date"
|
3784 |
-
msgstr "إنتهاء صلاحية الإعلان"
|
3785 |
-
|
3786 |
-
#: templates/admin/csv-export.tpl.php:80
|
3787 |
-
#, fuzzy
|
3788 |
-
msgctxt "admin csv-export"
|
3789 |
-
msgid "Listing created date"
|
3790 |
-
msgstr "صور الإعلانات"
|
3791 |
-
|
3792 |
-
#: templates/admin/csv-export.tpl.php:84
|
3793 |
-
#, fuzzy
|
3794 |
-
msgctxt "admin csv-export"
|
3795 |
-
msgid "Listing last updated date"
|
3796 |
-
msgstr "إنتهاء صلاحية الإعلان"
|
3797 |
-
|
3798 |
-
#: templates/admin/csv-export.tpl.php:88
|
3799 |
-
#, fuzzy
|
3800 |
-
msgctxt "admin csv-export"
|
3801 |
-
msgid "Listing T&C acceptance date"
|
3802 |
-
msgstr "صور الإعلانات"
|
3803 |
-
|
3804 |
-
#: templates/admin/csv-export.tpl.php:97
|
3805 |
-
msgctxt "admin csv-export"
|
3806 |
-
msgid "What operating system will you use to edit the CSV file?"
|
3807 |
-
msgstr ""
|
3808 |
-
|
3809 |
-
#: templates/admin/csv-export.tpl.php:104
|
3810 |
-
msgctxt "admin csv-export"
|
3811 |
-
msgid "Windows"
|
3812 |
-
msgstr ""
|
3813 |
-
|
3814 |
-
#: templates/admin/csv-export.tpl.php:109
|
3815 |
-
msgctxt "admin csv-export"
|
3816 |
-
msgid "macOS"
|
3817 |
-
msgstr ""
|
3818 |
-
|
3819 |
-
#: templates/admin/csv-export.tpl.php:111
|
3820 |
-
msgctxt "admin csv-export"
|
3821 |
-
msgid ""
|
3822 |
-
"Windows and macOS versions of MS Excel handle CSV files differently. To make "
|
3823 |
-
"sure all your listings information is displayed properly when you view or "
|
3824 |
-
"edit the CSV file, we need to generate different versions of the file for "
|
3825 |
-
"each operating system."
|
3826 |
-
msgstr ""
|
3827 |
-
|
3828 |
-
#: templates/admin/csv-export.tpl.php:129
|
3829 |
-
msgctxt "admin csv-export"
|
3830 |
-
msgid "Category Separator"
|
3831 |
-
msgstr "فاصلة التصنيف"
|
3832 |
-
|
3833 |
-
#: templates/admin/csv-export.tpl.php:141
|
3834 |
-
msgctxt "admin csv-export"
|
3835 |
-
msgid "Export Listings"
|
3836 |
-
msgstr "الإعلانات المصدرة"
|
3837 |
-
|
3838 |
-
#: templates/admin/csv-export.tpl.php:147
|
3839 |
-
msgctxt "admin csv-export"
|
3840 |
-
msgid "Export in Progress..."
|
3841 |
-
msgstr "جاري التصدير..."
|
3842 |
-
|
3843 |
-
#: templates/admin/csv-export.tpl.php:148
|
3844 |
-
msgctxt "admin csv-export"
|
3845 |
-
msgid ""
|
3846 |
-
"Your export file is being prepared. Please <u>do not leave</u> this page "
|
3847 |
-
"until the export finishes."
|
3848 |
-
msgstr ""
|
3849 |
-
"جاري إعداد ملف التصدير. المرجو <u>عدم ترك</u> هذه الصفحة حتى انتهاء التصدير."
|
3850 |
-
|
3851 |
-
#: templates/admin/csv-export.tpl.php:151
|
3852 |
-
msgctxt "admin csv-export"
|
3853 |
-
msgid "No. of listings:"
|
3854 |
-
msgstr "أرقام الإعلانات:"
|
3855 |
-
|
3856 |
-
#: templates/admin/csv-export.tpl.php:153
|
3857 |
-
msgctxt "admin csv-export"
|
3858 |
-
msgid "Approximate export file size:"
|
3859 |
-
msgstr "الحجم التقريبي لملف التصدير:"
|
3860 |
-
|
3861 |
-
#: templates/admin/csv-export.tpl.php:160
|
3862 |
-
msgctxt "admin csv-export"
|
3863 |
-
msgid "Cancel Export"
|
3864 |
-
msgstr "إلغاء التصدير"
|
3865 |
-
|
3866 |
-
#: templates/admin/csv-export.tpl.php:165
|
3867 |
-
msgctxt "admin csv-export"
|
3868 |
-
msgid "Export Complete"
|
3869 |
-
msgstr "تم التصدير"
|
3870 |
-
|
3871 |
-
#: templates/admin/csv-export.tpl.php:166
|
3872 |
-
msgctxt "admin csv-export"
|
3873 |
-
msgid ""
|
3874 |
-
"Your export file has been successfully created and it is now ready for "
|
3875 |
-
"download."
|
3876 |
-
msgstr "تم بنجاح إنشاء ملف التصدير، والآن جاهز للتحميل."
|
3877 |
-
|
3878 |
-
#: templates/admin/csv-export.tpl.php:170
|
3879 |
-
#, fuzzy
|
3880 |
-
msgctxt "admin csv-export"
|
3881 |
-
msgid "Download %1$s (%2$s)"
|
3882 |
-
msgstr "تحميل %s (%s)"
|
3883 |
-
|
3884 |
-
#: templates/admin/csv-export.tpl.php:177
|
3885 |
-
msgctxt "admin csv-export"
|
3886 |
-
msgid ""
|
3887 |
-
"Click \"Cleanup\" once the file has been downloaded in order to remove all "
|
3888 |
-
"temporary data created by Business Directory during the export process."
|
3889 |
-
msgstr ""
|
3890 |
-
"إضغط على \"تنظيف\" بعد تحميل الملف بغية إزالة جميع البيانات المؤقتة التي تم "
|
3891 |
-
"إنشاؤها بواسطة \"دليل الأعمال\" أثناء عملية التصدير."
|
3892 |
-
|
3893 |
-
#: templates/admin/csv-export.tpl.php:178
|
3894 |
-
msgctxt "admin csv-export"
|
3895 |
-
msgid "Cleanup"
|
3896 |
-
msgstr "نظف"
|
3897 |
-
|
3898 |
-
#: templates/admin/csv-export.tpl.php:183
|
3899 |
-
msgctxt "admin csv-export"
|
3900 |
-
msgid "Export Canceled"
|
3901 |
-
msgstr "ألغي التصدير"
|
3902 |
-
|
3903 |
-
#: templates/admin/csv-export.tpl.php:184
|
3904 |
-
msgctxt "admin csv-export"
|
3905 |
-
msgid "The export has been canceled."
|
3906 |
-
msgstr "تم إلغاء التصدير"
|
3907 |
-
|
3908 |
-
#: templates/admin/csv-export.tpl.php:185
|
3909 |
-
msgctxt "admin csv-export"
|
3910 |
-
msgid "← Return to CSV Export"
|
3911 |
-
msgstr "← العودة إلى تصدير CSV"
|
3912 |
-
|
3913 |
-
#: includes/admin/class-listings-with-no-fee-plan-view.php:58
|
3914 |
-
msgctxt "listings view"
|
3915 |
-
msgid "No Fee Plan"
|
3916 |
-
msgstr ""
|
3917 |
-
|
3918 |
-
#: includes/admin/controllers/class-admin-controller.php:84
|
3919 |
-
msgctxt "admin confirm"
|
3920 |
-
msgid "No, go back"
|
3921 |
-
msgstr ""
|
3922 |
-
|
3923 |
-
#: includes/admin/controllers/class-admin-controller.php:85
|
3924 |
-
msgctxt "admin confirm"
|
3925 |
-
msgid "Yes, I'm sure"
|
3926 |
msgstr ""
|
3927 |
|
3928 |
#: includes/admin/controllers/class-admin-listings.php:60
|
@@ -4015,53 +4009,53 @@ msgctxt "listing status"
|
|
4015 |
msgid "Reported"
|
4016 |
msgstr ""
|
4017 |
|
4018 |
-
#: includes/class-listing.php:
|
4019 |
msgctxt "listing status"
|
4020 |
msgid "Unknown"
|
4021 |
msgstr ""
|
4022 |
|
4023 |
-
#: includes/class-listing.php:
|
4024 |
msgctxt "listing status"
|
4025 |
msgid "Legacy"
|
4026 |
msgstr ""
|
4027 |
|
4028 |
-
#: includes/class-listing.php:
|
4029 |
#, fuzzy
|
4030 |
msgctxt "listing status"
|
4031 |
msgid "Incomplete"
|
4032 |
msgstr "إكتمل"
|
4033 |
|
4034 |
-
#: includes/class-listing.php:
|
4035 |
#, fuzzy
|
4036 |
msgctxt "listing status"
|
4037 |
msgid "Pending Payment"
|
4038 |
msgstr "في انتظار التخلي"
|
4039 |
|
4040 |
-
#: includes/class-listing.php:
|
4041 |
#, fuzzy
|
4042 |
msgctxt "listing status"
|
4043 |
msgid "Complete"
|
4044 |
msgstr "إكتمل"
|
4045 |
|
4046 |
-
#: includes/class-listing.php:
|
4047 |
#, fuzzy
|
4048 |
msgctxt "listing status"
|
4049 |
msgid "Pending Upgrade"
|
4050 |
msgstr " في انتظار الترقية"
|
4051 |
|
4052 |
-
#: includes/class-listing.php:
|
4053 |
#, fuzzy
|
4054 |
msgctxt "listing status"
|
4055 |
msgid "Expired"
|
4056 |
msgstr "منتهي الصلاحية"
|
4057 |
|
4058 |
-
#: includes/class-listing.php:
|
4059 |
#, fuzzy
|
4060 |
msgctxt "listing status"
|
4061 |
msgid "Pending Renewal"
|
4062 |
msgstr "مفعل + ريثما يتم التجديد"
|
4063 |
|
4064 |
-
#: includes/class-listing.php:
|
4065 |
#, fuzzy
|
4066 |
msgctxt "listing status"
|
4067 |
msgid "Abandoned"
|
@@ -4114,2719 +4108,2708 @@ msgctxt "admin actions"
|
|
4114 |
msgid "Send access keys"
|
4115 |
msgstr "مفتاح الوصول"
|
4116 |
|
4117 |
-
#: includes/admin/controllers/class-
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
|
4122 |
-
#: includes/admin/controllers/class-themes-admin.php:113
|
4123 |
-
msgctxt "themes"
|
4124 |
-
msgid "Could not change the active theme to \"%s\"."
|
4125 |
-
msgstr "تعذر تغيير القالب النشط إلى \"%s\"."
|
4126 |
-
|
4127 |
-
#: includes/admin/controllers/class-themes-admin.php:156
|
4128 |
-
msgctxt "themes"
|
4129 |
-
msgid "Active theme changed to \"%s\"."
|
4130 |
-
msgstr "القالب النشط تغير إلى \"%s\"."
|
4131 |
|
4132 |
-
#: includes/admin/controllers/class-
|
4133 |
-
msgctxt "
|
4134 |
msgid ""
|
4135 |
-
"
|
4136 |
-
"to
|
4137 |
msgstr ""
|
4138 |
-
"%s يتطلب أن تضيف وسوم في الحقول الموجودة الخاصة بك لمطابقة بعض الأماكن لأننا "
|
4139 |
-
"نريد وضع البيانات الخاصة بك في القالب. وفيما يلي الحقول التي نظن أنها مفقودة."
|
4140 |
|
4141 |
-
#: includes/admin/controllers/class-
|
4142 |
-
|
4143 |
-
|
4144 |
-
|
|
|
4145 |
|
4146 |
-
#: includes/admin/
|
4147 |
-
|
4148 |
-
|
4149 |
-
|
|
|
4150 |
|
4151 |
-
#: includes/admin/
|
4152 |
-
msgctxt "themes"
|
4153 |
-
msgid "Theme installed successfully."
|
4154 |
-
msgstr "تم تثبيت القالب بنجاح."
|
4155 |
-
|
4156 |
-
#: includes/admin/controllers/class-themes-admin.php:184
|
4157 |
#, fuzzy
|
4158 |
-
msgctxt "
|
4159 |
-
msgid "
|
4160 |
-
msgstr "
|
4161 |
-
|
4162 |
-
#: includes/admin/controllers/class-themes-admin.php:187
|
4163 |
-
msgctxt "themes"
|
4164 |
-
msgid "Could not delete theme directory. Check permissions."
|
4165 |
-
msgstr "تعذر حذف مجلد القالب. تحقق من الصلاحيات."
|
4166 |
-
|
4167 |
-
#: includes/admin/controllers/class-themes-admin.php:239
|
4168 |
-
msgctxt "themes"
|
4169 |
-
msgid "Please upload a valid theme file."
|
4170 |
-
msgstr "المرجو رفع ملف قالب صالح."
|
4171 |
-
|
4172 |
-
#: includes/admin/controllers/class-themes-admin.php:248
|
4173 |
-
msgctxt "themes"
|
4174 |
-
msgid "Could not move \"%s\" to a temporary directory."
|
4175 |
-
msgstr "لا يمكن نقل \"%s\" إلى مجلد مؤقت."
|
4176 |
-
|
4177 |
-
#: includes/admin/controllers/class-themes-admin.php:334
|
4178 |
-
msgctxt "themes"
|
4179 |
-
msgid "Activate your <a>license key</a> to use this theme."
|
4180 |
-
msgstr "فعِّل <a>مفتاح الترخيص</a> الخاص بك لاستخدام هذا القالب."
|
4181 |
|
4182 |
-
#: includes/admin/
|
4183 |
#, fuzzy
|
4184 |
-
msgctxt "
|
4185 |
-
msgid "
|
4186 |
-
msgstr "
|
4187 |
|
4188 |
-
#: includes/admin/
|
4189 |
-
|
4190 |
-
msgctxt "
|
4191 |
-
msgid "
|
4192 |
-
msgstr "
|
4193 |
|
4194 |
-
#: includes/admin/
|
4195 |
-
|
4196 |
-
|
4197 |
-
|
|
|
4198 |
|
4199 |
-
#: includes/admin/
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
|
|
4203 |
|
4204 |
-
#: includes/admin/
|
4205 |
-
msgctxt "
|
4206 |
-
msgid "
|
4207 |
-
msgstr "
|
4208 |
|
4209 |
-
#: includes/admin/
|
4210 |
-
|
4211 |
-
|
4212 |
-
|
4213 |
-
|
|
|
4214 |
|
4215 |
-
#: includes/
|
4216 |
-
msgctxt "
|
4217 |
-
msgid "
|
4218 |
-
msgstr "
|
4219 |
|
4220 |
-
#: includes/
|
4221 |
-
msgctxt "
|
4222 |
-
msgid "
|
4223 |
-
msgstr "
|
4224 |
|
4225 |
-
#: includes/
|
4226 |
-
msgctxt "
|
4227 |
-
msgid "
|
4228 |
-
msgstr "
|
4229 |
|
4230 |
-
#: includes/admin/
|
4231 |
-
|
4232 |
-
msgctxt "csv import"
|
4233 |
msgid ""
|
4234 |
-
"
|
4235 |
-
"
|
4236 |
-
"
|
4237 |
msgstr ""
|
4238 |
-
"
|
4239 |
-
"
|
4240 |
-
"
|
4241 |
-
|
4242 |
-
#: includes/admin/fees.php:46
|
4243 |
-
msgctxt "fees order"
|
4244 |
-
msgid "Label"
|
4245 |
-
msgstr "التسمية"
|
4246 |
|
4247 |
-
#: includes/admin/
|
4248 |
-
msgctxt "
|
4249 |
-
msgid "
|
4250 |
-
msgstr "
|
4251 |
|
4252 |
-
#: includes/admin/
|
4253 |
-
|
4254 |
-
|
4255 |
-
|
|
|
4256 |
|
4257 |
-
#: includes/admin/
|
4258 |
#, fuzzy
|
4259 |
-
msgctxt "
|
4260 |
-
msgid "
|
4261 |
-
msgstr "
|
4262 |
|
4263 |
-
#: includes/admin/
|
4264 |
#, fuzzy
|
4265 |
-
msgctxt "
|
4266 |
-
msgid "
|
4267 |
-
msgstr "
|
4268 |
|
4269 |
-
#: includes/admin/
|
4270 |
#, fuzzy
|
4271 |
-
msgctxt "
|
4272 |
-
msgid "
|
4273 |
-
msgstr "
|
4274 |
|
4275 |
-
#: includes/admin/
|
4276 |
-
msgctxt "
|
4277 |
-
msgid "
|
4278 |
-
msgstr "
|
4279 |
|
4280 |
-
#: includes/admin/
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
|
|
4284 |
|
4285 |
-
#: includes/admin/
|
4286 |
-
|
4287 |
-
|
4288 |
-
|
|
|
4289 |
|
4290 |
-
#: includes/admin/
|
4291 |
-
msgctxt "
|
4292 |
-
msgid "
|
4293 |
-
msgstr "
|
4294 |
|
4295 |
-
#: includes/admin/
|
4296 |
-
msgctxt "
|
4297 |
-
msgid "
|
4298 |
-
msgstr "
|
4299 |
|
4300 |
-
#: includes/admin/
|
4301 |
-
|
4302 |
-
msgctxt "
|
4303 |
-
msgid "
|
4304 |
-
msgstr "
|
4305 |
|
4306 |
-
#: includes/admin/
|
4307 |
-
|
4308 |
-
|
4309 |
-
|
|
|
4310 |
|
4311 |
-
#: includes/admin/
|
4312 |
-
msgctxt "
|
4313 |
-
msgid "
|
4314 |
-
msgstr ""
|
4315 |
|
4316 |
-
#: includes/admin/
|
4317 |
-
|
4318 |
-
|
4319 |
-
|
4320 |
-
msgstr "تعطيل"
|
4321 |
|
4322 |
-
#: includes/admin/
|
4323 |
-
|
4324 |
-
|
4325 |
-
|
4326 |
-
msgstr "Frais \"%s\" pour catégorie \"%s\""
|
4327 |
|
4328 |
-
#: includes/admin/
|
4329 |
-
msgctxt "
|
4330 |
-
msgid "
|
4331 |
-
msgstr "
|
4332 |
|
4333 |
-
#: includes/admin/
|
4334 |
-
msgctxt "
|
4335 |
-
msgid "
|
4336 |
-
|
4337 |
-
msgstr[0] "%d يوم"
|
4338 |
-
msgstr[1] "%d يوم"
|
4339 |
-
msgstr[2] "%d يومين"
|
4340 |
-
msgstr[3] "%d أيام"
|
4341 |
-
msgstr[4] "%d يوم"
|
4342 |
-
msgstr[5] "%d يوم"
|
4343 |
-
|
4344 |
-
#: includes/admin/helpers/tables/class-fees-table.php:228
|
4345 |
-
msgctxt "fees admin"
|
4346 |
-
msgid "%d image"
|
4347 |
-
msgid_plural "%d images"
|
4348 |
-
msgstr[0] "%d صورة"
|
4349 |
-
msgstr[1] "%d صورتين"
|
4350 |
-
msgstr[2] "%d صور"
|
4351 |
-
msgstr[3] "%d صور"
|
4352 |
-
msgstr[4] "%d صور"
|
4353 |
-
msgstr[5] "%d صور"
|
4354 |
-
|
4355 |
-
#: includes/admin/helpers/tables/class-fees-table.php:233
|
4356 |
-
msgctxt "fees admin"
|
4357 |
-
msgid "All categories"
|
4358 |
-
msgstr "جميع التصنيفات"
|
4359 |
|
4360 |
-
#: includes/admin/
|
4361 |
-
msgctxt "
|
4362 |
-
msgid "
|
|
|
|
|
4363 |
msgstr ""
|
|
|
|
|
4364 |
|
4365 |
-
#: includes/admin/
|
|
|
4366 |
#, fuzzy
|
4367 |
-
msgctxt "
|
4368 |
-
msgid "
|
4369 |
-
msgstr "
|
4370 |
|
4371 |
-
#: includes/admin/
|
|
|
4372 |
#, fuzzy
|
4373 |
-
msgctxt "
|
4374 |
-
msgid "
|
4375 |
-
msgstr "
|
4376 |
|
4377 |
-
#: includes/admin/
|
4378 |
-
|
4379 |
-
|
4380 |
-
|
4381 |
-
msgstr "Date"
|
4382 |
|
4383 |
-
#: includes/admin/
|
4384 |
-
|
4385 |
-
|
4386 |
-
|
4387 |
-
msgstr "سجل المدفوعات"
|
4388 |
|
4389 |
-
#: includes/admin/
|
4390 |
-
msgctxt "
|
4391 |
-
msgid "
|
4392 |
-
msgstr "
|
4393 |
|
4394 |
-
#:
|
4395 |
-
msgctxt "
|
4396 |
-
msgid "
|
4397 |
-
msgstr ""
|
4398 |
|
4399 |
-
#:
|
4400 |
-
|
4401 |
-
|
4402 |
-
|
4403 |
-
msgstr "تجديد قائمة في جميع فئات منتهية الصلاحية"
|
4404 |
|
4405 |
-
#:
|
4406 |
-
msgctxt "
|
4407 |
-
msgid "
|
4408 |
msgstr ""
|
4409 |
|
4410 |
-
#:
|
4411 |
-
|
4412 |
-
|
4413 |
-
|
4414 |
-
msgstr "يمكنك استخدام العناصر النائبة التالية:"
|
4415 |
-
|
4416 |
-
#: templates/admin/fees-form.tpl.php:170
|
4417 |
-
msgctxt "fees admin"
|
4418 |
-
msgid "Click to add categories to the selection."
|
4419 |
-
msgstr ""
|
4420 |
|
4421 |
-
#:
|
4422 |
-
|
4423 |
-
|
4424 |
-
|
4425 |
-
msgstr "السعر"
|
4426 |
|
4427 |
-
#:
|
4428 |
-
msgctxt "
|
4429 |
-
msgid "
|
4430 |
-
msgstr ""
|
4431 |
|
4432 |
-
#:
|
4433 |
-
msgctxt "
|
4434 |
-
msgid "
|
4435 |
-
msgstr ""
|
4436 |
|
4437 |
-
#:
|
4438 |
-
|
4439 |
-
|
4440 |
-
|
4441 |
-
msgstr "ترتيب فرز التصنيفات"
|
4442 |
|
4443 |
-
#:
|
4444 |
-
msgctxt "
|
4445 |
-
msgid "
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#:
|
4449 |
-
|
4450 |
-
|
4451 |
-
|
4452 |
-
msgstr "السعر"
|
4453 |
|
4454 |
-
#:
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
msgstr "إزالة التصنيف"
|
4459 |
|
4460 |
-
#:
|
4461 |
-
|
4462 |
-
|
4463 |
-
|
4464 |
-
msgstr "السعر"
|
4465 |
|
4466 |
-
#:
|
4467 |
-
msgctxt "
|
4468 |
-
msgid "
|
4469 |
-
msgstr ""
|
4470 |
|
4471 |
-
#: includes/admin/
|
4472 |
-
|
4473 |
-
|
4474 |
-
|
4475 |
-
msgstr "رفض الدفع"
|
4476 |
|
4477 |
-
#: includes/admin/
|
4478 |
-
|
4479 |
-
|
4480 |
-
|
4481 |
-
msgstr "مفتاح الوصول"
|
4482 |
|
4483 |
-
#:
|
4484 |
-
|
4485 |
-
|
4486 |
-
|
4487 |
-
msgstr "إضغط فوق دفع للاطلاع على تفاصيل أو الموافقة على/رفض المعاملة."
|
4488 |
|
4489 |
-
#:
|
4490 |
-
|
4491 |
-
|
4492 |
-
|
4493 |
-
msgstr "غير متاح"
|
4494 |
|
4495 |
-
#:
|
4496 |
-
|
4497 |
-
|
4498 |
-
|
4499 |
-
msgstr "معلومات عامة"
|
4500 |
|
4501 |
-
#:
|
4502 |
-
|
4503 |
-
|
4504 |
-
|
4505 |
-
msgstr "الإعلانات"
|
4506 |
|
4507 |
-
#:
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
msgid "N/A"
|
4512 |
-
msgstr "N/A غير قابل للتطبيق"
|
4513 |
|
4514 |
-
#:
|
4515 |
-
|
4516 |
-
|
4517 |
-
|
4518 |
-
msgstr "تاريخ التجديد"
|
4519 |
|
4520 |
-
#:
|
4521 |
-
|
4522 |
-
|
4523 |
-
|
4524 |
-
msgstr "تفاصيل الخطة"
|
4525 |
-
|
4526 |
-
#: templates/admin/metaboxes-listing-information-plan.tpl.php:37
|
4527 |
-
msgctxt "listing metabox"
|
4528 |
-
msgid "Fee Plan"
|
4529 |
-
msgstr ""
|
4530 |
|
4531 |
-
#:
|
4532 |
-
msgctxt "
|
4533 |
-
msgid "
|
4534 |
-
msgstr ""
|
4535 |
|
4536 |
-
#:
|
4537 |
-
|
4538 |
-
|
4539 |
-
|
4540 |
-
msgctxt "listing metabox"
|
4541 |
-
msgid "OK"
|
4542 |
-
msgstr "حسناً"
|
4543 |
|
4544 |
-
#:
|
4545 |
-
|
4546 |
-
|
4547 |
-
|
4548 |
-
msgctxt "listing metabox"
|
4549 |
-
msgid "Cancel"
|
4550 |
-
msgstr "إلغاء"
|
4551 |
|
4552 |
-
#:
|
4553 |
-
|
4554 |
-
|
4555 |
-
|
4556 |
-
msgstr "ستنتهي الصلاحية في"
|
4557 |
|
4558 |
-
|
4559 |
-
|
4560 |
-
msgctxt "
|
4561 |
-
msgid "
|
4562 |
-
msgstr "
|
4563 |
|
4564 |
-
#:
|
4565 |
#, fuzzy
|
4566 |
-
msgctxt "
|
4567 |
-
msgid "
|
4568 |
-
|
|
|
|
|
|
|
|
|
4569 |
|
4570 |
-
#:
|
4571 |
-
|
4572 |
-
|
4573 |
-
|
4574 |
-
msgstr "(متكرر)"
|
4575 |
|
4576 |
-
#: includes/admin/
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
msgstr "صور الإعلانات"
|
4581 |
|
4582 |
-
#: includes/admin/
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
msgstr "الإعلان منتهي التاريخ"
|
4587 |
|
4588 |
-
#: includes/admin/
|
4589 |
-
msgctxt "
|
4590 |
-
msgid "
|
4591 |
msgstr ""
|
4592 |
|
4593 |
-
#: includes/admin/
|
4594 |
-
msgctxt "
|
4595 |
-
msgid "
|
4596 |
msgstr ""
|
4597 |
|
4598 |
-
#: includes/admin/
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4602 |
msgstr "الإعلان منتهي التاريخ"
|
4603 |
|
4604 |
-
#: includes/admin/
|
4605 |
#, fuzzy
|
4606 |
-
msgctxt "
|
4607 |
-
msgid "
|
4608 |
-
msgstr "
|
4609 |
-
|
4610 |
-
#: includes/admin/helpers/tables/class-fees-table.php:52
|
4611 |
-
msgctxt "admin fees table"
|
4612 |
-
msgid "All"
|
4613 |
-
msgstr "الكل"
|
4614 |
|
4615 |
-
#: includes/admin/
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
|
|
4619 |
|
4620 |
-
#: includes/admin/
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
|
|
4624 |
|
4625 |
-
#: includes/admin/
|
4626 |
-
msgctxt "
|
4627 |
-
msgid "
|
4628 |
-
msgstr "
|
4629 |
|
4630 |
-
#: includes/admin/
|
4631 |
-
msgctxt "
|
4632 |
-
msgid "
|
4633 |
-
msgstr "
|
4634 |
|
4635 |
-
#: includes/admin/
|
4636 |
-
msgctxt "
|
4637 |
-
msgid "
|
4638 |
-
msgstr "
|
4639 |
|
4640 |
-
#: includes/admin/
|
4641 |
-
|
4642 |
-
|
4643 |
-
|
|
|
4644 |
|
4645 |
-
#: includes/admin/
|
4646 |
#, fuzzy
|
4647 |
-
msgctxt "
|
4648 |
-
msgid "
|
4649 |
-
msgstr "
|
4650 |
|
4651 |
-
#: includes/admin/
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
|
|
|
|
|
|
|
|
4655 |
|
4656 |
-
#: includes/admin/
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
|
|
|
|
4660 |
|
4661 |
-
#: includes/admin/
|
|
|
4662 |
#, fuzzy
|
4663 |
-
msgctxt "
|
4664 |
-
msgid "
|
4665 |
-
msgstr "
|
4666 |
|
4667 |
-
#: includes/admin/
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
|
|
|
|
4671 |
|
4672 |
-
#: includes/admin/
|
4673 |
-
msgctxt "
|
4674 |
-
msgid "
|
4675 |
-
|
|
|
|
|
|
|
|
|
4676 |
|
4677 |
-
#: includes/admin/
|
4678 |
-
|
4679 |
-
|
4680 |
-
|
|
|
4681 |
|
4682 |
-
#: includes/admin/
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
|
|
|
|
4686 |
|
4687 |
-
#: includes/admin/
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
|
|
4691 |
|
4692 |
-
#: includes/admin/
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
|
|
4696 |
|
4697 |
-
#: includes/admin/
|
4698 |
-
msgctxt "
|
4699 |
-
msgid ""
|
4700 |
-
"<b>Important</b>: Since the \"<a>Display email address fields publicly?</a>"
|
4701 |
-
"\" setting is disabled, display settings below will not be honored and this "
|
4702 |
-
"field will not be displayed on the frontend. If you want e-mail addresses to "
|
4703 |
-
"show on the frontend, you can <a>enable public display of e-mails</a>."
|
4704 |
msgstr ""
|
4705 |
-
"<b>هام</b>: نظرا لأن إعدادات \"<a>عرض حقول عنوان البريد الإلكتروني للعموم؟</"
|
4706 |
-
"a>\" معطلة، عرض الإعدادات أدناه لن يتم إظهاره ولن يتم عرض هذا الحقل على "
|
4707 |
-
"الواجهة. إذا كنت تريد إظهار عناوين البريد الإلكتروني في الواجهة، يمكنك "
|
4708 |
-
"<a>تمكين عرض البريد الإلكتروني للعموم</a>."
|
4709 |
-
|
4710 |
-
#: includes/admin/helpers/tables/class-form-fields-table.php:470
|
4711 |
-
msgctxt "form-fields admin"
|
4712 |
-
msgid "Field deleted."
|
4713 |
-
msgstr "تم حذف الحقل."
|
4714 |
|
4715 |
-
#: includes/admin/
|
4716 |
-
|
4717 |
-
|
4718 |
-
|
|
|
4719 |
|
4720 |
-
#: includes/admin/
|
4721 |
-
msgctxt "
|
4722 |
-
msgid "
|
4723 |
-
msgstr "
|
4724 |
|
4725 |
-
#: includes/
|
4726 |
#, fuzzy
|
4727 |
-
msgctxt "
|
4728 |
-
msgid "
|
4729 |
-
msgstr "
|
4730 |
|
4731 |
-
#: includes/
|
4732 |
-
|
4733 |
-
|
4734 |
-
|
4735 |
-
msgstr "خيارات الحقل (لتحديد القوائم وأزرار الخيارات وخانات الاختيار)."
|
4736 |
|
4737 |
-
#: includes/
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
|
|
4741 |
|
4742 |
-
#: includes/
|
4743 |
-
msgctxt "
|
4744 |
-
msgid "
|
4745 |
-
msgstr ""
|
4746 |
|
4747 |
-
#: includes/
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
msgstr "قائمة خيارات الحقل مطلوبة."
|
4752 |
|
4753 |
-
#: includes/
|
4754 |
#, fuzzy
|
4755 |
-
msgctxt "
|
4756 |
-
msgid "
|
4757 |
-
msgstr "
|
4758 |
|
4759 |
-
#: includes/
|
4760 |
-
msgctxt "
|
4761 |
-
msgid "
|
4762 |
-
msgstr "
|
4763 |
|
4764 |
-
#: includes/
|
4765 |
-
msgctxt "
|
4766 |
-
msgid "
|
4767 |
-
msgstr "
|
4768 |
|
4769 |
-
#: includes/
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
|
|
4773 |
|
4774 |
-
#: includes/
|
4775 |
-
|
4776 |
-
|
4777 |
-
|
|
|
4778 |
|
4779 |
-
#: includes/
|
4780 |
-
|
4781 |
-
|
4782 |
-
"
|
4783 |
-
"
|
4784 |
-
msgstr ""
|
4785 |
-
"<b>للأعضاء المتقدمين فقط!</b> إلا إذا كنت قيل لك بتغيير هذا، لا تبدل إلا إذا "
|
4786 |
-
"كنت تعرف ما تفعله."
|
4787 |
|
4788 |
-
#: includes/
|
4789 |
-
|
4790 |
-
|
4791 |
-
|
|
|
4792 |
|
4793 |
-
#: includes/
|
4794 |
-
|
4795 |
-
|
4796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4797 |
|
4798 |
-
#: includes/
|
4799 |
-
msgctxt "
|
4800 |
-
msgid ""
|
4801 |
-
"
|
4802 |
-
"
|
4803 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
4804 |
|
4805 |
-
#: includes/
|
4806 |
-
msgctxt "
|
4807 |
-
msgid ""
|
4808 |
-
"
|
4809 |
-
|
4810 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
4811 |
|
4812 |
-
|
4813 |
-
|
4814 |
-
|
|
|
|
|
4815 |
msgstr ""
|
4816 |
|
4817 |
-
|
4818 |
-
|
4819 |
-
|
4820 |
-
|
4821 |
-
"
|
4822 |
-
|
|
|
4823 |
|
4824 |
-
#: includes/
|
4825 |
-
msgctxt "
|
4826 |
-
msgid ""
|
4827 |
-
"Number of Characters from Short Description/Excerpt to Display in List View "
|
4828 |
-
"(only)"
|
4829 |
msgstr ""
|
4830 |
|
4831 |
-
#: includes/
|
4832 |
-
msgctxt "form-fields admin"
|
4833 |
-
msgid "Automatically generate excerpt from content field?"
|
4834 |
-
msgstr "تلقائياً إنشاء مقتطفات من حقل المحتوى؟"
|
4835 |
-
|
4836 |
-
#: includes/fields/class-fieldtypes-twitter.php:83
|
4837 |
#, fuzzy
|
4838 |
-
msgctxt "
|
4839 |
-
msgid "
|
4840 |
-
msgstr "
|
4841 |
-
|
4842 |
-
#: templates/admin/form-fields-addoredit.tpl.php:29
|
4843 |
-
msgctxt "form-fields admin"
|
4844 |
-
msgid "Field Association"
|
4845 |
-
msgstr "رابطة الحقل"
|
4846 |
|
4847 |
-
#:
|
4848 |
-
|
4849 |
-
|
4850 |
-
|
4851 |
-
|
4852 |
-
msgstr "
|
4853 |
-
|
4854 |
-
|
4855 |
-
|
4856 |
-
|
4857 |
-
msgstr "نوع الحقل"
|
4858 |
-
|
4859 |
-
#: templates/admin/form-fields-addoredit.tpl.php:77
|
4860 |
-
msgctxt "form-fields admin"
|
4861 |
-
msgid "Field Label"
|
4862 |
-
msgstr "تسمية الحقل"
|
4863 |
|
4864 |
-
#:
|
4865 |
-
msgctxt "
|
4866 |
-
msgid "
|
4867 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4868 |
|
4869 |
-
#:
|
4870 |
-
msgctxt "
|
4871 |
-
msgid "
|
4872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4873 |
|
4874 |
-
#:
|
4875 |
-
msgctxt "
|
4876 |
-
msgid "
|
4877 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4878 |
|
4879 |
-
#:
|
4880 |
-
msgctxt "
|
4881 |
-
msgid "
|
4882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4883 |
|
4884 |
-
#:
|
4885 |
-
msgctxt "
|
4886 |
-
msgid "
|
4887 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4888 |
|
4889 |
-
#:
|
4890 |
-
|
4891 |
-
|
4892 |
-
|
|
|
4893 |
|
4894 |
-
#:
|
4895 |
-
msgctxt "
|
4896 |
-
msgid "
|
4897 |
-
msgstr "
|
4898 |
|
4899 |
-
#:
|
4900 |
-
|
4901 |
-
|
4902 |
-
|
|
|
4903 |
|
4904 |
-
#:
|
4905 |
-
msgctxt "
|
4906 |
-
msgid "
|
4907 |
-
msgstr "
|
4908 |
|
4909 |
-
#:
|
4910 |
-
msgctxt "
|
4911 |
-
msgid "
|
4912 |
msgstr ""
|
4913 |
|
4914 |
-
#:
|
4915 |
#, fuzzy
|
4916 |
-
msgctxt "
|
4917 |
-
msgid "
|
4918 |
-
msgstr "
|
4919 |
|
4920 |
-
#:
|
4921 |
-
|
4922 |
-
|
4923 |
-
|
4924 |
-
msgstr "تجديد قائمة في جميع فئات منتهية الصلاحية"
|
4925 |
|
4926 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
4927 |
#, fuzzy
|
4928 |
-
msgctxt "
|
4929 |
-
msgid "
|
4930 |
-
msgstr "
|
4931 |
|
4932 |
-
#:
|
4933 |
-
msgctxt "
|
4934 |
-
msgid "
|
4935 |
msgstr ""
|
4936 |
|
4937 |
-
#:
|
4938 |
-
msgctxt "
|
4939 |
-
msgid "
|
4940 |
msgstr ""
|
4941 |
|
4942 |
-
#:
|
4943 |
#, fuzzy
|
4944 |
-
msgctxt "
|
4945 |
-
msgid "
|
4946 |
-
msgstr "
|
4947 |
-
|
4948 |
-
#: templates/admin/form-fields-addoredit.tpl.php:220
|
4949 |
-
msgctxt "form-fields admin"
|
4950 |
-
msgid "Show this value in excerpt view?"
|
4951 |
-
msgstr "إظهار هذه القيمة في مشاهدة المقتطفات؟"
|
4952 |
-
|
4953 |
-
#: templates/admin/form-fields-addoredit.tpl.php:226
|
4954 |
-
msgctxt "form-fields admin"
|
4955 |
-
msgid "Display this value in post excerpt view."
|
4956 |
-
msgstr "عرض هذه القيمة في مشاهدة مقتطفات المقالة."
|
4957 |
-
|
4958 |
-
#: templates/admin/form-fields-addoredit.tpl.php:232
|
4959 |
-
msgctxt "form-fields admin"
|
4960 |
-
msgid "Show this value in listing view?"
|
4961 |
-
msgstr "إظهار هذه القيمة في مشاهدة الإعلان؟"
|
4962 |
|
4963 |
-
#:
|
4964 |
-
|
4965 |
-
|
4966 |
-
|
|
|
4967 |
|
4968 |
-
#:
|
4969 |
-
|
4970 |
-
|
4971 |
-
|
|
|
4972 |
|
4973 |
-
#:
|
4974 |
-
|
4975 |
-
|
4976 |
-
|
|
|
4977 |
|
4978 |
-
#:
|
4979 |
#, fuzzy
|
4980 |
-
msgctxt "
|
4981 |
-
msgid "
|
4982 |
-
msgstr "
|
4983 |
|
4984 |
-
#:
|
4985 |
-
|
4986 |
-
|
4987 |
-
|
|
|
|
|
4988 |
|
4989 |
-
#:
|
4990 |
-
|
4991 |
-
|
4992 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4993 |
|
4994 |
-
#:
|
4995 |
#, fuzzy
|
4996 |
-
msgctxt "
|
4997 |
-
msgid "
|
4998 |
-
msgstr "
|
4999 |
|
5000 |
-
#:
|
5001 |
-
msgctxt "
|
5002 |
-
msgid "
|
5003 |
msgstr ""
|
5004 |
|
5005 |
-
#:
|
5006 |
-
|
5007 |
-
|
5008 |
-
|
5009 |
-
|
5010 |
-
#: templates/admin/form-fields-addoredit.tpl.php:309
|
5011 |
-
msgctxt "form-fields admin"
|
5012 |
-
msgid "Update Field"
|
5013 |
-
msgstr "تحديث الحقل"
|
5014 |
-
|
5015 |
-
#: templates/admin/form-fields-addoredit.tpl.php:311
|
5016 |
-
msgctxt "form-fields admin"
|
5017 |
-
msgid "Add Field"
|
5018 |
-
msgstr "إضافة حقل"
|
5019 |
|
5020 |
-
#:
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
|
|
5024 |
|
5025 |
-
#:
|
5026 |
-
|
5027 |
-
|
5028 |
-
|
|
|
5029 |
|
5030 |
-
#:
|
5031 |
-
|
|
|
5032 |
msgid ""
|
5033 |
-
"
|
5034 |
-
"first, otherwise you'll appear to be \"missing data\" on your listings."
|
5035 |
msgstr ""
|
5036 |
-
"
|
5037 |
-
"
|
5038 |
|
5039 |
-
#:
|
5040 |
-
|
5041 |
-
|
5042 |
-
|
|
|
5043 |
|
5044 |
-
#:
|
5045 |
-
|
5046 |
-
|
5047 |
-
|
|
|
|
|
|
|
5048 |
|
5049 |
-
#:
|
5050 |
-
|
5051 |
-
|
5052 |
-
|
|
|
5053 |
|
5054 |
-
#:
|
5055 |
-
msgctxt "
|
5056 |
-
msgid "
|
5057 |
-
msgstr "
|
5058 |
|
5059 |
-
#:
|
5060 |
-
|
|
|
5061 |
msgid ""
|
5062 |
-
"
|
5063 |
-
"
|
5064 |
-
"special options for them."
|
5065 |
msgstr ""
|
5066 |
-
"
|
5067 |
-
"
|
|
|
5068 |
|
5069 |
-
#:
|
5070 |
-
|
5071 |
-
|
5072 |
-
|
|
|
5073 |
|
5074 |
-
#: includes/admin/
|
5075 |
#, fuzzy
|
5076 |
-
msgctxt "
|
5077 |
-
msgid "
|
5078 |
-
msgstr "
|
5079 |
|
5080 |
-
#: includes/admin/
|
5081 |
#, fuzzy
|
5082 |
-
msgctxt "
|
5083 |
-
msgid "
|
5084 |
-
msgstr "
|
5085 |
|
5086 |
-
#: includes/admin/
|
5087 |
#, fuzzy
|
5088 |
-
msgctxt "
|
5089 |
-
msgid "
|
5090 |
-
msgstr "
|
5091 |
|
5092 |
-
#: includes/admin/
|
5093 |
#, fuzzy
|
5094 |
-
msgctxt "
|
5095 |
-
msgid "
|
5096 |
-
msgstr "
|
5097 |
|
5098 |
-
#: includes/admin/
|
5099 |
#, fuzzy
|
5100 |
-
msgctxt "
|
5101 |
-
msgid "
|
5102 |
-
msgstr "
|
5103 |
|
5104 |
-
#: includes/admin/
|
5105 |
#, fuzzy
|
5106 |
-
msgctxt "
|
5107 |
-
msgid "
|
5108 |
-
msgstr "
|
5109 |
|
5110 |
-
#: includes/admin/
|
5111 |
-
|
5112 |
-
|
5113 |
-
|
5114 |
-
"
|
5115 |
-
msgstr ""
|
5116 |
|
5117 |
-
#: includes/admin/
|
5118 |
#, fuzzy
|
5119 |
-
msgctxt "
|
5120 |
-
msgid "
|
5121 |
-
msgstr "
|
5122 |
|
5123 |
-
#: includes/admin/settings/class-settings-
|
5124 |
#, fuzzy
|
5125 |
-
msgctxt "
|
5126 |
-
msgid "
|
5127 |
-
msgstr "
|
5128 |
|
5129 |
-
#: includes/admin/settings/class-settings-
|
5130 |
-
msgctxt "
|
5131 |
-
msgid "
|
5132 |
-
msgstr "
|
5133 |
|
5134 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5135 |
-
msgctxt "
|
5136 |
msgid ""
|
5137 |
-
"
|
5138 |
-
"
|
|
|
|
|
5139 |
msgstr ""
|
5140 |
|
5141 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5142 |
-
|
5143 |
-
|
5144 |
-
|
5145 |
-
|
5146 |
-
#: includes/admin/settings/class-settings-bootstrap.php:311
|
5147 |
-
msgctxt "admin settings"
|
5148 |
-
msgid "Below results"
|
5149 |
-
msgstr "أسفل النتائج"
|
5150 |
-
|
5151 |
-
#: includes/admin/settings/class-settings-bootstrap.php:312
|
5152 |
-
msgctxt "admin settings"
|
5153 |
-
msgid "Don't show with results"
|
5154 |
-
msgstr "لا تظهر مع النتائج"
|
5155 |
|
5156 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5157 |
-
|
|
|
5158 |
msgid ""
|
5159 |
-
"
|
5160 |
-
"
|
5161 |
-
"
|
|
|
5162 |
msgstr ""
|
5163 |
-
"
|
5164 |
-
"
|
5165 |
-
"
|
5166 |
-
|
5167 |
-
#: includes/admin/settings/class-settings-bootstrap.php:574
|
5168 |
-
msgctxt "admin settings"
|
5169 |
-
msgid "Do not include comments in listings"
|
5170 |
-
msgstr "يتضمن نموذج التعليق على صفحات الإعلانات؟"
|
5171 |
|
5172 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5173 |
#, fuzzy
|
5174 |
-
msgctxt "
|
5175 |
-
msgid "
|
5176 |
-
msgstr "
|
5177 |
|
5178 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5179 |
-
|
5180 |
-
|
5181 |
-
|
5182 |
-
msgstr "مشاهدة جميع الإعلانات"
|
5183 |
|
5184 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5185 |
#, fuzzy
|
5186 |
-
msgctxt "
|
5187 |
-
msgid "
|
5188 |
-
msgstr "
|
5189 |
|
5190 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5191 |
#, fuzzy
|
5192 |
-
msgctxt "
|
5193 |
-
msgid "
|
5194 |
-
msgstr "
|
|
|
|
|
5195 |
|
5196 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5197 |
-
msgctxt "
|
5198 |
-
msgid "
|
5199 |
-
msgstr "
|
5200 |
|
5201 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5202 |
-
|
5203 |
-
msgctxt "
|
5204 |
-
msgid "
|
5205 |
-
msgstr "
|
5206 |
|
5207 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5208 |
-
|
5209 |
-
msgctxt "
|
5210 |
-
msgid "
|
5211 |
-
|
|
|
|
|
|
|
5212 |
|
5213 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5214 |
-
msgctxt "
|
5215 |
-
msgid "
|
5216 |
msgstr ""
|
5217 |
|
5218 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5219 |
-
msgctxt "
|
5220 |
-
msgid "
|
5221 |
-
msgstr "
|
5222 |
|
5223 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5224 |
-
|
5225 |
-
msgctxt "
|
5226 |
-
msgid "
|
5227 |
-
|
|
|
|
|
|
|
|
|
5228 |
|
5229 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5230 |
-
|
5231 |
-
msgctxt "
|
5232 |
-
msgid "
|
5233 |
-
msgstr "
|
5234 |
|
5235 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5236 |
-
|
5237 |
-
|
5238 |
-
|
|
|
5239 |
|
5240 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5241 |
-
|
5242 |
-
|
5243 |
-
|
|
|
5244 |
|
5245 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5246 |
-
|
5247 |
-
|
5248 |
-
|
|
|
5249 |
|
5250 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5251 |
-
|
5252 |
-
|
5253 |
-
|
|
|
5254 |
|
5255 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5256 |
-
msgctxt "
|
5257 |
-
msgid "
|
|
|
|
|
5258 |
msgstr ""
|
5259 |
|
5260 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5262 |
msgid ""
|
5263 |
-
"
|
5264 |
-
"
|
|
|
|
|
5265 |
msgstr ""
|
5266 |
-
"بالنسبة لصور الإعلانات المدفوعة، قم بإعدادها بإضافة أو تحرير <a>رسوم الخطة</"
|
5267 |
-
"a> بدلاً من هذا الإعداد، الذي هو تجاهل الإعلانات المدفوعة."
|
5268 |
|
5269 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5270 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1134
|
5271 |
#, fuzzy
|
5272 |
-
msgctxt "
|
5273 |
-
msgid "
|
5274 |
-
msgstr "
|
5275 |
|
5276 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5277 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1135
|
5278 |
#, fuzzy
|
5279 |
-
msgctxt "
|
5280 |
-
msgid "
|
5281 |
-
msgstr "
|
5282 |
-
|
5283 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1183
|
5284 |
-
msgctxt "admin settings"
|
5285 |
-
msgid "Australian Dollar (AUD)"
|
5286 |
-
msgstr "الدولار الأسترالي (AUD)"
|
5287 |
-
|
5288 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1184
|
5289 |
-
msgctxt "admin settings"
|
5290 |
-
msgid "Brazilian Real (BRL)"
|
5291 |
-
msgstr "الريال البرازيلي (BRL)"
|
5292 |
-
|
5293 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1185
|
5294 |
-
msgctxt "admin settings"
|
5295 |
-
msgid "Canadian Dollar (CAD)"
|
5296 |
-
msgstr "الدولار الكندي (CAD)"
|
5297 |
|
5298 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5299 |
-
|
5300 |
-
|
5301 |
-
|
|
|
|
|
|
|
|
|
5302 |
|
5303 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5304 |
-
|
5305 |
-
|
5306 |
-
|
|
|
5307 |
|
5308 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5309 |
-
|
5310 |
-
|
|
|
|
|
|
|
5311 |
msgstr ""
|
|
|
|
|
5312 |
|
5313 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5314 |
-
|
5315 |
-
|
5316 |
-
|
|
|
5317 |
|
5318 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5319 |
-
|
5320 |
-
|
5321 |
-
|
|
|
5322 |
|
5323 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5324 |
-
|
5325 |
-
|
5326 |
-
|
|
|
5327 |
|
5328 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5329 |
-
msgctxt "
|
5330 |
-
msgid "
|
5331 |
-
msgstr "
|
5332 |
|
5333 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5334 |
-
msgctxt "
|
5335 |
-
msgid "
|
5336 |
-
msgstr "
|
5337 |
|
5338 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5339 |
-
msgctxt "
|
5340 |
-
msgid "
|
|
|
5341 |
msgstr ""
|
5342 |
|
5343 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5344 |
-
|
5345 |
-
|
5346 |
-
|
|
|
5347 |
|
5348 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5349 |
-
|
5350 |
-
|
5351 |
-
|
|
|
|
|
|
|
|
|
|
|
5352 |
|
5353 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5354 |
-
|
5355 |
-
|
5356 |
-
|
|
|
5357 |
|
5358 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5359 |
-
|
5360 |
-
|
5361 |
-
|
|
|
5362 |
|
5363 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5364 |
-
|
5365 |
-
|
5366 |
-
|
|
|
|
|
|
|
|
|
|
|
5367 |
|
5368 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5369 |
-
|
5370 |
-
|
5371 |
-
|
|
|
5372 |
|
5373 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5374 |
-
|
5375 |
-
|
5376 |
-
|
|
|
|
|
|
|
|
|
|
|
5377 |
|
5378 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5379 |
-
|
5380 |
-
|
5381 |
-
|
|
|
5382 |
|
5383 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5384 |
-
|
5385 |
-
|
5386 |
-
|
|
|
5387 |
|
5388 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5389 |
-
msgctxt "
|
5390 |
-
msgid "
|
5391 |
-
|
|
|
5392 |
|
5393 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5394 |
-
msgctxt "
|
5395 |
-
msgid "
|
5396 |
-
|
|
|
|
|
|
|
5397 |
|
5398 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
|
|
5402 |
|
5403 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5404 |
-
|
5405 |
-
|
5406 |
-
|
|
|
5407 |
|
5408 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5409 |
-
|
5410 |
-
|
5411 |
-
|
|
|
5412 |
|
5413 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5414 |
-
|
5415 |
-
|
5416 |
-
|
|
|
5417 |
|
5418 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5419 |
-
|
5420 |
-
|
5421 |
-
|
|
|
5422 |
|
5423 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5424 |
-
|
5425 |
-
|
5426 |
-
|
|
|
5427 |
|
5428 |
-
|
5429 |
-
|
5430 |
-
msgctxt "
|
5431 |
-
msgid "
|
5432 |
-
msgstr ""
|
5433 |
|
5434 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5435 |
#, fuzzy
|
5436 |
-
msgctxt "
|
5437 |
-
msgid ""
|
5438 |
-
"
|
5439 |
-
"can also <a>customize the email</a> users receive."
|
5440 |
-
msgstr ""
|
5441 |
-
"الإعلانات مع الدفعات المعلقة تعد متخلى عنها بعد هذا الوقت. يمكنك أيضا "
|
5442 |
-
"<a>تخصيص البريد الإلكتروني</a> الذي يتلقاه الأعضاء."
|
5443 |
|
5444 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5445 |
-
|
5446 |
-
|
5447 |
-
|
|
|
5448 |
|
5449 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5450 |
-
|
5451 |
-
|
5452 |
-
|
|
|
5453 |
|
5454 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5455 |
-
|
5456 |
-
|
5457 |
-
|
|
|
5458 |
|
5459 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5460 |
-
|
5461 |
-
|
5462 |
-
|
|
|
5463 |
|
5464 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5465 |
-
|
5466 |
-
|
5467 |
-
|
|
|
5468 |
|
5469 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5470 |
-
|
5471 |
-
|
5472 |
-
|
|
|
5473 |
|
5474 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5475 |
-
msgctxt "
|
5476 |
-
msgid "
|
5477 |
-
|
|
|
|
|
|
|
5478 |
|
5479 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5480 |
-
|
5481 |
-
|
5482 |
-
|
|
|
5483 |
|
5484 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5485 |
#, fuzzy
|
5486 |
-
msgctxt "
|
5487 |
-
msgid "
|
5488 |
-
msgstr "
|
5489 |
|
5490 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5491 |
#, fuzzy
|
5492 |
-
msgctxt "
|
5493 |
-
msgid "
|
5494 |
-
msgstr "
|
5495 |
|
5496 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5497 |
#, fuzzy
|
5498 |
-
msgctxt "
|
5499 |
-
msgid "
|
5500 |
-
msgstr "
|
5501 |
|
5502 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5503 |
-
|
5504 |
-
|
5505 |
-
|
|
|
5506 |
|
5507 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5508 |
-
|
5509 |
-
|
5510 |
-
|
|
|
5511 |
|
5512 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5513 |
-
|
5514 |
-
|
5515 |
-
|
|
|
5516 |
|
5517 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5518 |
#, fuzzy
|
5519 |
-
msgctxt "
|
5520 |
-
msgid "
|
5521 |
-
msgstr "
|
5522 |
|
5523 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5524 |
#, fuzzy
|
5525 |
-
msgctxt "
|
5526 |
-
msgid "
|
5527 |
-
msgstr "
|
5528 |
|
5529 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5530 |
-
|
5531 |
-
|
5532 |
-
|
5533 |
-
|
5534 |
-
msgctxt "admin settings"
|
5535 |
-
msgid "Listing's title"
|
5536 |
-
msgstr "عنوان الإعلان"
|
5537 |
|
5538 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5539 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1527
|
5540 |
#, fuzzy
|
5541 |
-
msgctxt "
|
5542 |
-
msgid "
|
5543 |
-
msgstr "
|
5544 |
|
5545 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5546 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1528
|
5547 |
#, fuzzy
|
5548 |
-
msgctxt "
|
5549 |
-
msgid "
|
5550 |
-
msgstr "
|
5551 |
|
5552 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5553 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1529
|
5554 |
#, fuzzy
|
5555 |
-
msgctxt "
|
5556 |
-
msgid "
|
5557 |
-
msgstr "
|
5558 |
|
5559 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5560 |
-
|
|
|
5561 |
msgid ""
|
5562 |
-
"
|
5563 |
-
"viewed by the public."
|
5564 |
msgstr ""
|
5565 |
-
"
|
5566 |
-
"
|
5567 |
|
5568 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5569 |
-
|
5570 |
-
msgctxt "
|
5571 |
-
msgid "
|
5572 |
-
msgstr "
|
5573 |
|
5574 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5575 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1496
|
5576 |
#, fuzzy
|
5577 |
-
msgctxt "
|
5578 |
-
msgid "
|
5579 |
-
msgstr "
|
5580 |
|
5581 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5582 |
#, fuzzy
|
5583 |
-
msgctxt "
|
5584 |
-
msgid "
|
5585 |
-
msgstr "
|
5586 |
|
5587 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5588 |
#, fuzzy
|
5589 |
-
msgctxt "
|
5590 |
-
msgid "
|
5591 |
-
msgstr "
|
5592 |
|
5593 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5594 |
-
|
5595 |
-
|
|
|
|
|
|
|
|
|
|
|
5596 |
msgstr ""
|
|
|
|
|
|
|
|
|
5597 |
|
5598 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
|
|
|
|
|
|
|
|
|
|
5599 |
#, fuzzy
|
5600 |
-
msgctxt "
|
5601 |
-
msgid "
|
5602 |
-
msgstr "
|
5603 |
|
5604 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5605 |
-
msgctxt "
|
5606 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5607 |
msgstr ""
|
5608 |
|
5609 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5610 |
#, fuzzy
|
5611 |
-
msgctxt "
|
5612 |
-
msgid "
|
5613 |
-
msgstr "
|
5614 |
-
|
5615 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1564
|
5616 |
-
msgctxt "admin settings"
|
5617 |
-
msgid "Checkout URL link"
|
5618 |
-
msgstr "رابط URL إتمام الشراء"
|
5619 |
|
5620 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5621 |
#, fuzzy
|
5622 |
-
msgctxt "
|
5623 |
-
msgid "
|
5624 |
-
msgstr "
|
5625 |
-
|
5626 |
-
#: includes/functions.php:1213
|
5627 |
-
msgctxt "admin settings"
|
5628 |
-
msgid "User"
|
5629 |
-
msgstr "عضو"
|
5630 |
-
|
5631 |
-
#: includes/functions.php:1214
|
5632 |
-
msgctxt "admin settings"
|
5633 |
-
msgid "User registration date"
|
5634 |
-
msgstr "تاريخ تسجيل العضو"
|
5635 |
|
5636 |
-
#: includes/admin/settings/class-settings-
|
5637 |
#, fuzzy
|
5638 |
-
msgctxt "
|
5639 |
-
msgid "
|
5640 |
-
msgstr "
|
5641 |
|
5642 |
-
#: includes/admin/settings/class-settings-
|
5643 |
-
msgctxt "
|
5644 |
-
msgid "
|
5645 |
msgstr ""
|
5646 |
|
5647 |
-
#: includes/admin/settings/class-settings-
|
5648 |
-
msgctxt "
|
5649 |
-
msgid "
|
5650 |
msgstr ""
|
5651 |
|
5652 |
-
#: includes/admin/settings/class-settings-
|
5653 |
#, fuzzy
|
5654 |
-
msgctxt "
|
5655 |
-
msgid "
|
5656 |
-
msgstr "
|
5657 |
|
5658 |
-
#: includes/admin/settings/class-settings-
|
5659 |
#, fuzzy
|
5660 |
-
msgctxt "
|
5661 |
-
msgid "
|
5662 |
-
msgstr "
|
5663 |
|
5664 |
-
#: includes/admin/settings/class-settings-
|
5665 |
#, fuzzy
|
5666 |
-
msgctxt "
|
5667 |
-
msgid "
|
5668 |
-
msgstr "
|
5669 |
|
5670 |
-
#: includes/admin/settings/class-settings-
|
5671 |
#, fuzzy
|
5672 |
-
msgctxt "
|
5673 |
-
msgid "
|
5674 |
-
msgstr "
|
5675 |
|
5676 |
-
#: includes/admin/settings/class-settings-
|
5677 |
#, fuzzy
|
5678 |
-
msgctxt "
|
5679 |
-
msgid "
|
5680 |
-
|
5681 |
-
msgstr[0] "%d يوم"
|
5682 |
-
msgstr[1] "%d يوم"
|
5683 |
-
msgstr[2] "%d يومين"
|
5684 |
-
msgstr[3] "%d أيام"
|
5685 |
-
msgstr[4] "%d يوم"
|
5686 |
-
msgstr[5] "%d يوم"
|
5687 |
-
|
5688 |
-
#: includes/admin/settings/class-settings-admin.php:588
|
5689 |
-
msgctxt "expiration notices"
|
5690 |
-
msgid "%d week"
|
5691 |
-
msgid_plural "%d weeks"
|
5692 |
-
msgstr[0] ""
|
5693 |
-
msgstr[1] ""
|
5694 |
-
msgstr[2] ""
|
5695 |
-
msgstr[3] ""
|
5696 |
-
msgstr[4] ""
|
5697 |
-
msgstr[5] ""
|
5698 |
-
|
5699 |
-
#: includes/admin/settings/class-settings-admin.php:591
|
5700 |
-
msgctxt "expiration notices"
|
5701 |
-
msgid "%d month"
|
5702 |
-
msgid_plural "%d months"
|
5703 |
-
msgstr[0] ""
|
5704 |
-
msgstr[1] ""
|
5705 |
-
msgstr[2] ""
|
5706 |
-
msgstr[3] ""
|
5707 |
-
msgstr[4] ""
|
5708 |
-
msgstr[5] ""
|
5709 |
-
|
5710 |
-
#. translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g.
|
5711 |
-
#. non-recuring only)
|
5712 |
-
#: includes/admin/settings/class-settings-admin.php:597
|
5713 |
-
msgctxt "expiration notices"
|
5714 |
-
msgid "Sent %1$s before a listing (%2$s) expires."
|
5715 |
-
msgstr ""
|
5716 |
|
5717 |
-
|
5718 |
-
#. non-recuring only)
|
5719 |
-
#: includes/admin/settings/class-settings-admin.php:600
|
5720 |
#, fuzzy
|
5721 |
-
msgctxt "
|
5722 |
-
msgid "
|
5723 |
-
msgstr "
|
5724 |
|
5725 |
-
#: includes/admin/settings/class-settings-
|
5726 |
-
msgctxt "
|
5727 |
-
msgid "
|
5728 |
msgstr ""
|
5729 |
|
5730 |
-
#: includes/admin/settings/class-settings-
|
5731 |
#, fuzzy
|
5732 |
-
msgctxt "
|
5733 |
-
msgid "
|
5734 |
-
msgstr "
|
5735 |
-
|
5736 |
-
#: includes/admin/settings/class-settings-admin.php:629
|
5737 |
-
msgctxt "expiration notices"
|
5738 |
-
msgid "%d day before expiration"
|
5739 |
-
msgid_plural "%d days before expiration"
|
5740 |
-
msgstr[0] ""
|
5741 |
-
msgstr[1] ""
|
5742 |
-
msgstr[2] ""
|
5743 |
-
msgstr[3] ""
|
5744 |
-
msgstr[4] ""
|
5745 |
-
msgstr[5] ""
|
5746 |
-
|
5747 |
-
#: includes/admin/settings/class-settings-admin.php:629
|
5748 |
-
msgctxt "expiration notices"
|
5749 |
-
msgid "%d day after expiration"
|
5750 |
-
msgid_plural "%d days after expiration"
|
5751 |
-
msgstr[0] ""
|
5752 |
-
msgstr[1] ""
|
5753 |
-
msgstr[2] ""
|
5754 |
-
msgstr[3] ""
|
5755 |
-
msgstr[4] ""
|
5756 |
-
msgstr[5] ""
|
5757 |
|
5758 |
-
#: includes/admin/settings/class-settings-
|
5759 |
-
|
5760 |
-
|
5761 |
-
|
5762 |
-
msgstr
|
5763 |
-
msgstr[1] ""
|
5764 |
-
msgstr[2] ""
|
5765 |
-
msgstr[3] ""
|
5766 |
-
msgstr[4] ""
|
5767 |
-
msgstr[5] ""
|
5768 |
|
5769 |
-
#: includes/admin/settings/class-settings-
|
5770 |
-
|
5771 |
-
|
5772 |
-
|
5773 |
-
msgstr
|
5774 |
-
msgstr[1] ""
|
5775 |
-
msgstr[2] ""
|
5776 |
-
msgstr[3] ""
|
5777 |
-
msgstr[4] ""
|
5778 |
-
msgstr[5] ""
|
5779 |
|
5780 |
-
#: includes/admin/settings/class-settings-
|
5781 |
-
|
5782 |
-
|
5783 |
-
|
5784 |
-
msgstr
|
5785 |
-
msgstr[1] ""
|
5786 |
-
msgstr[2] ""
|
5787 |
-
msgstr[3] ""
|
5788 |
-
msgstr[4] ""
|
5789 |
-
msgstr[5] ""
|
5790 |
|
5791 |
-
#: includes/admin/settings/class-settings-
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
5795 |
-
|
5796 |
-
|
5797 |
-
|
5798 |
-
msgstr
|
5799 |
-
|
5800 |
-
|
|
|
5801 |
|
5802 |
-
#: includes/admin/settings/class-settings-
|
5803 |
#, fuzzy
|
5804 |
-
msgctxt "
|
5805 |
-
msgid "
|
5806 |
-
msgstr "
|
5807 |
|
5808 |
-
#: includes/admin/settings/class-settings-
|
5809 |
-
|
5810 |
-
|
|
|
|
|
|
|
5811 |
msgstr ""
|
|
|
|
|
5812 |
|
5813 |
-
#: includes/admin/settings/class-settings-
|
5814 |
-
|
5815 |
-
|
5816 |
-
|
5817 |
-
msgstr "الرجوع إلى الإعلان."
|
5818 |
|
5819 |
-
#: includes/admin/settings/class-settings-
|
5820 |
-
msgctxt "
|
5821 |
-
msgid "
|
|
|
|
|
|
|
|
|
5822 |
msgstr ""
|
5823 |
|
5824 |
-
#: includes/admin/settings/class-settings-
|
5825 |
-
|
5826 |
-
|
5827 |
-
|
|
|
5828 |
|
5829 |
-
#: includes/admin/settings/class-settings-
|
5830 |
#, fuzzy
|
5831 |
msgctxt "settings"
|
5832 |
-
msgid "
|
5833 |
-
msgstr "
|
5834 |
|
5835 |
-
#: includes/admin/settings/class-settings-
|
|
|
5836 |
msgctxt "settings"
|
5837 |
-
msgid "
|
5838 |
-
msgstr "
|
5839 |
|
5840 |
-
#: includes/admin/settings/class-settings-
|
|
|
5841 |
msgctxt "settings"
|
5842 |
-
msgid "Listing
|
5843 |
-
msgstr "
|
5844 |
|
5845 |
-
#: includes/admin/settings/class-settings-
|
5846 |
#, fuzzy
|
5847 |
msgctxt "settings"
|
5848 |
-
msgid "
|
5849 |
-
msgstr "
|
5850 |
|
5851 |
-
#: includes/admin/settings/class-settings-
|
|
|
5852 |
msgctxt "settings"
|
5853 |
-
msgid "Listing
|
5854 |
-
msgstr ""
|
5855 |
|
5856 |
-
#: includes/admin/settings/class-settings-
|
|
|
5857 |
msgctxt "settings"
|
5858 |
-
msgid "
|
|
|
|
|
5859 |
msgstr ""
|
|
|
|
|
5860 |
|
5861 |
-
#: includes/admin/settings/class-settings-
|
5862 |
#, fuzzy
|
5863 |
msgctxt "settings"
|
5864 |
-
msgid "
|
5865 |
-
msgstr "
|
5866 |
|
5867 |
-
#: includes/admin/settings/class-settings-
|
5868 |
#, fuzzy
|
5869 |
msgctxt "settings"
|
5870 |
-
msgid "Listing's
|
5871 |
-
msgstr "
|
5872 |
|
5873 |
-
#: includes/admin/settings/class-settings-
|
5874 |
#, fuzzy
|
5875 |
msgctxt "settings"
|
5876 |
-
msgid "
|
5877 |
-
msgstr "
|
5878 |
|
5879 |
-
#: includes/admin/settings/class-settings-
|
5880 |
#, fuzzy
|
5881 |
msgctxt "settings"
|
5882 |
-
msgid "
|
5883 |
-
msgstr "
|
5884 |
|
5885 |
-
#: includes/admin/settings/class-settings-bootstrap.php:
|
5886 |
-
#, fuzzy
|
5887 |
msgctxt "settings"
|
5888 |
-
msgid "
|
5889 |
-
msgstr "
|
5890 |
|
5891 |
-
#: includes/admin/settings/class-settings
|
5892 |
-
#: includes/admin/settings/class-settings
|
5893 |
-
#, fuzzy
|
5894 |
msgctxt "settings"
|
5895 |
-
msgid "
|
5896 |
-
msgstr "
|
5897 |
|
5898 |
-
#: includes/admin/settings/class-settings
|
5899 |
-
#: includes/admin/settings/class-settings-bootstrap.php:14
|
5900 |
-
#: includes/admin/settings/class-settings-bootstrap.php:17
|
5901 |
-
#: includes/admin/settings/class-settings-bootstrap.php:36
|
5902 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1332
|
5903 |
-
#: includes/admin/settings/class-settings.php:339
|
5904 |
-
#, fuzzy
|
5905 |
msgctxt "settings"
|
5906 |
-
msgid "
|
5907 |
-
msgstr "
|
5908 |
|
5909 |
-
#: includes/
|
5910 |
#, fuzzy
|
5911 |
msgctxt "settings"
|
5912 |
-
msgid "
|
5913 |
-
msgstr "
|
5914 |
|
5915 |
-
#: includes/
|
5916 |
msgctxt "settings"
|
5917 |
-
msgid "
|
5918 |
msgstr ""
|
5919 |
|
5920 |
-
#: includes/
|
5921 |
#, fuzzy
|
5922 |
msgctxt "settings"
|
5923 |
-
msgid "
|
5924 |
-
msgstr "
|
5925 |
|
5926 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5927 |
#, fuzzy
|
5928 |
-
msgctxt "
|
5929 |
-
msgid "
|
5930 |
-
msgstr "
|
5931 |
|
5932 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5933 |
#, fuzzy
|
5934 |
-
msgctxt "
|
5935 |
-
msgid "
|
5936 |
-
msgstr "
|
5937 |
|
5938 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5939 |
#, fuzzy
|
5940 |
-
msgctxt "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5941 |
msgid ""
|
5942 |
-
"
|
|
|
|
|
|
|
5943 |
msgstr ""
|
5944 |
-
"
|
5945 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5946 |
|
5947 |
-
#:
|
5948 |
-
|
5949 |
-
|
5950 |
-
|
5951 |
-
msgstr "رابط لطيف للوسوم"
|
5952 |
|
5953 |
-
#:
|
5954 |
-
|
5955 |
-
|
5956 |
-
|
5957 |
-
msgstr ""
|
5958 |
-
"لا يمكن أن يكون الرابط اللطيف مستخدم من طرف مصطلح آخر. تجنب \"tag\"، على "
|
5959 |
-
"سبيل المثال."
|
5960 |
|
5961 |
-
#:
|
5962 |
-
|
5963 |
-
|
5964 |
-
|
5965 |
-
msgstr "إزالة معرف الإعلان من روابط URLs الدليل؟"
|
5966 |
|
5967 |
-
#:
|
5968 |
-
msgctxt "
|
5969 |
-
msgid "
|
5970 |
-
msgstr ""
|
5971 |
|
5972 |
-
#:
|
5973 |
-
|
5974 |
-
msgctxt "settings"
|
5975 |
msgid ""
|
5976 |
-
"
|
5977 |
-
"
|
5978 |
msgstr ""
|
5979 |
-
"
|
5980 |
-
"
|
5981 |
-
"SEO."
|
5982 |
-
|
5983 |
-
#: includes/admin/settings/class-settings-bootstrap.php:112
|
5984 |
-
#, fuzzy
|
5985 |
-
msgctxt "settings"
|
5986 |
-
msgid "Need API keys for reCAPTCHA? Get them <a>here</a>."
|
5987 |
-
msgstr "بحاجة إلى مفاتيح API ل reCAPTCHA؟ أحصل عليها <a>هنا</a>."
|
5988 |
-
|
5989 |
-
#: includes/admin/settings/class-settings-bootstrap.php:119
|
5990 |
-
#, fuzzy
|
5991 |
-
msgctxt "settings"
|
5992 |
-
msgid "Use reCAPTCHA for contact forms"
|
5993 |
-
msgstr "إستخدم reCAPTCHA لاستمارة الاتصال"
|
5994 |
-
|
5995 |
-
#: includes/admin/settings/class-settings-bootstrap.php:127
|
5996 |
-
#, fuzzy
|
5997 |
-
msgctxt "settings"
|
5998 |
-
msgid "Turn off reCAPTCHA for logged in users?"
|
5999 |
-
msgstr "إيقاف reCAPTCHA للأعضاء الذين سجلوا الدخول؟"
|
6000 |
|
6001 |
-
#:
|
6002 |
-
|
6003 |
-
|
6004 |
-
|
6005 |
-
msgstr "إستخدم reCAPTCHA أثناء إضافة إعلان"
|
6006 |
|
6007 |
-
#:
|
6008 |
-
|
6009 |
-
|
6010 |
-
|
6011 |
-
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
6012 |
|
6013 |
-
#:
|
6014 |
-
|
6015 |
-
|
6016 |
-
|
6017 |
-
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
6018 |
|
6019 |
-
#:
|
6020 |
-
|
6021 |
-
|
6022 |
-
|
6023 |
-
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
6024 |
|
6025 |
-
#:
|
6026 |
#, fuzzy
|
6027 |
-
msgctxt "
|
6028 |
-
msgid "
|
6029 |
-
msgstr "
|
6030 |
|
6031 |
-
#:
|
6032 |
#, fuzzy
|
6033 |
-
msgctxt "
|
6034 |
-
msgid "
|
6035 |
-
msgstr "
|
6036 |
|
6037 |
-
#:
|
6038 |
#, fuzzy
|
6039 |
-
msgctxt "
|
6040 |
-
msgid "
|
6041 |
-
msgstr "
|
6042 |
|
6043 |
-
#:
|
6044 |
-
msgctxt "
|
6045 |
-
msgid "
|
6046 |
msgstr ""
|
6047 |
|
6048 |
-
#:
|
6049 |
-
msgctxt "
|
6050 |
-
msgid ""
|
6051 |
-
"reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is "
|
6052 |
-
"very likely a bot). Based on the score, you can take variable action in the "
|
6053 |
-
"context of your site. You can set here the score threshold, scores under "
|
6054 |
-
"this value will result in reCAPTCHA validation error."
|
6055 |
msgstr ""
|
6056 |
|
6057 |
-
#:
|
6058 |
-
|
6059 |
-
|
6060 |
-
|
6061 |
-
msgstr "Enregistrement"
|
6062 |
|
6063 |
-
#:
|
6064 |
-
|
6065 |
-
msgctxt "settings"
|
6066 |
msgid ""
|
6067 |
-
"
|
6068 |
-
"
|
6069 |
-
"
|
6070 |
-
"
|
6071 |
msgstr ""
|
6072 |
-
"نتوقع أن تدعم عضوية الإضافة معامل 'redirect_to' لكي تعمل روابط المواقع URLs "
|
6073 |
-
"أدناه. إذا لم تدعم الإضافة ذلك، لن تعمل هذه الإعدادات كما هو متوقع. المرجو "
|
6074 |
-
"الاتصال بعضوية الإضافة، واطلب منهم دعم معامل الاستعلام القياسي 'redirect_to' "
|
6075 |
-
"لووردبريس."
|
6076 |
|
6077 |
-
#:
|
6078 |
-
|
6079 |
-
|
6080 |
-
|
6081 |
-
msgstr "يتطلب تسجيل الدخول لنشر الإعلانات؟"
|
6082 |
|
6083 |
-
#:
|
6084 |
-
msgctxt "
|
6085 |
-
msgid "
|
6086 |
-
msgstr ""
|
6087 |
|
6088 |
-
#:
|
6089 |
-
|
6090 |
-
|
6091 |
-
|
6092 |
-
msgstr "رابط تسجيل الدخول"
|
6093 |
|
6094 |
-
#:
|
6095 |
-
|
6096 |
-
|
6097 |
-
|
|
|
6098 |
msgstr ""
|
6099 |
-
"
|
6100 |
-
"هناك استخدام لعضوية الإضافة أو صفحة تسجيل دخول مخصصة."
|
6101 |
|
6102 |
-
#:
|
6103 |
-
msgctxt "
|
6104 |
-
msgid "
|
6105 |
-
msgstr ""
|
6106 |
|
6107 |
-
#:
|
6108 |
-
|
6109 |
-
|
6110 |
-
|
6111 |
-
msgstr "رابط التسجيل"
|
6112 |
|
6113 |
-
#:
|
6114 |
-
|
6115 |
-
|
6116 |
-
|
6117 |
-
"Only enter this if using a membership plugin or custom registration page."
|
6118 |
-
msgstr ""
|
6119 |
-
"رابط URL لصفحة التسجيل في عضوية الإضافة الخاصة بك. فقط أدخل هذا إذا كان "
|
6120 |
-
"هناك استخدام لعضوية الإضافة أو صفحة تسجيل مخصصة."
|
6121 |
|
6122 |
-
#:
|
6123 |
-
msgctxt "
|
6124 |
-
msgid "
|
6125 |
-
msgstr ""
|
6126 |
|
6127 |
-
#:
|
6128 |
-
msgctxt "
|
6129 |
-
msgid "
|
6130 |
-
|
|
|
|
|
6131 |
|
6132 |
-
#:
|
6133 |
#, fuzzy
|
6134 |
-
msgctxt "
|
|
|
|
|
|
|
|
|
|
|
6135 |
msgid ""
|
6136 |
-
"
|
6137 |
-
"
|
6138 |
msgstr ""
|
6139 |
-
"
|
6140 |
-
"
|
6141 |
|
6142 |
-
#:
|
6143 |
-
|
6144 |
-
|
6145 |
-
|
6146 |
-
msgstr "نص الأحكام والشروط هنا..."
|
6147 |
|
6148 |
-
#:
|
6149 |
-
|
6150 |
-
|
6151 |
-
|
6152 |
-
msgstr "تمكين عمليات البحث عالية الأداء؟"
|
6153 |
|
6154 |
-
#:
|
6155 |
-
|
6156 |
-
|
6157 |
-
|
6158 |
-
msgstr "متقدم"
|
6159 |
|
6160 |
-
#:
|
6161 |
-
|
6162 |
-
|
6163 |
-
|
6164 |
-
msgstr "تعطيل التكامل CPT المتقدم؟"
|
6165 |
|
6166 |
-
#: includes/admin/
|
6167 |
#, fuzzy
|
6168 |
-
msgctxt "
|
6169 |
-
msgid "Disable Frontend Listing Submission?"
|
6170 |
-
msgstr "تعطيل إضافة إعلان من واجهة الموقع؟"
|
6171 |
-
|
6172 |
-
#: includes/admin/settings/class-settings-bootstrap.php:349
|
6173 |
-
msgctxt "settings"
|
6174 |
msgid ""
|
6175 |
-
"
|
6176 |
-
"
|
|
|
6177 |
msgstr ""
|
|
|
|
|
|
|
6178 |
|
6179 |
-
#: includes/admin/
|
6180 |
#, fuzzy
|
6181 |
-
msgctxt "
|
6182 |
-
msgid "
|
6183 |
-
msgstr "
|
6184 |
-
|
6185 |
-
#: includes/admin/settings/class-settings-bootstrap.php:358
|
6186 |
-
msgctxt "settings"
|
6187 |
-
msgid ""
|
6188 |
-
"This helps to prevent conflicts with other plugins that already do this. "
|
6189 |
-
"Disable this only if you're having an issue with FontAwesome icons and have "
|
6190 |
-
"performed a conflict test to validate this is a multiple styles enqueueing "
|
6191 |
-
"issue."
|
6192 |
-
msgstr ""
|
6193 |
|
6194 |
-
#: includes/admin/
|
6195 |
#, fuzzy
|
6196 |
-
msgctxt "
|
6197 |
-
msgid "
|
6198 |
-
msgstr "
|
6199 |
|
6200 |
-
#:
|
6201 |
#, fuzzy
|
6202 |
-
msgctxt "
|
6203 |
-
msgid "
|
6204 |
-
msgstr "
|
6205 |
|
6206 |
-
#:
|
6207 |
#, fuzzy
|
6208 |
-
msgctxt "
|
6209 |
-
msgid ""
|
6210 |
-
|
6211 |
-
"listings."
|
6212 |
-
msgstr ""
|
6213 |
-
"عدد الإعلانات التي تظهر في كل صفحة. استخدام قيمة \"0\" لإظهار كل الإعلانات."
|
6214 |
|
6215 |
-
#:
|
6216 |
#, fuzzy
|
6217 |
-
msgctxt "
|
6218 |
-
msgid "
|
6219 |
-
msgstr "
|
6220 |
|
6221 |
-
#:
|
6222 |
#, fuzzy
|
6223 |
-
msgctxt "
|
6224 |
-
msgid ""
|
6225 |
-
|
6226 |
-
"less than 10 years (3650 days)."
|
6227 |
-
msgstr ""
|
6228 |
-
"استخدام قيمة \"0\" للإبقاء على الإعلان إلى أجل غير مسمى، أو قم بإدخال عدد "
|
6229 |
-
"أقل من 10 سنوات (3650 يوما)."
|
6230 |
|
6231 |
-
#:
|
|
|
6232 |
#, fuzzy
|
6233 |
-
msgctxt "
|
6234 |
-
msgid "
|
6235 |
-
msgstr "
|
6236 |
|
6237 |
-
#:
|
6238 |
#, fuzzy
|
6239 |
-
msgctxt "
|
6240 |
-
msgid "
|
6241 |
-
msgstr "
|
6242 |
|
6243 |
-
#:
|
6244 |
#, fuzzy
|
6245 |
-
msgctxt "
|
6246 |
-
msgid "
|
6247 |
-
msgstr "
|
6248 |
-
|
6249 |
-
#: includes/admin/settings/class-settings-bootstrap.php:501
|
6250 |
-
msgctxt "settings"
|
6251 |
-
msgid "Enable report listing for registered users only"
|
6252 |
-
msgstr ""
|
6253 |
|
6254 |
-
#:
|
6255 |
-
msgctxt "
|
6256 |
-
msgid "
|
6257 |
msgstr ""
|
6258 |
|
6259 |
-
#:
|
6260 |
-
msgctxt "
|
6261 |
-
msgid ""
|
6262 |
-
"Form option list to report a listing as inappropriate. One option per line."
|
6263 |
msgstr ""
|
6264 |
|
6265 |
-
#:
|
6266 |
-
|
6267 |
-
|
6268 |
-
msgid "Include listing contact form on listing pages?"
|
6269 |
-
msgstr "إدراج الإعلان مع نموذج الاتصال في صفحات الإعلان؟"
|
6270 |
-
|
6271 |
-
#: includes/admin/settings/class-settings-bootstrap.php:524
|
6272 |
#, fuzzy
|
6273 |
-
msgctxt "
|
6274 |
-
msgid ""
|
6275 |
-
|
6276 |
-
"the messages via email."
|
6277 |
-
msgstr ""
|
6278 |
-
"يسمح للزوار بالاتصال بكتاب الإعلان بشكل خاص. الكتاب سوف يتلقون رسائل عبر "
|
6279 |
-
"البريد الإلكتروني."
|
6280 |
|
6281 |
-
#:
|
|
|
|
|
6282 |
#, fuzzy
|
6283 |
-
msgctxt "
|
6284 |
-
msgid "
|
6285 |
-
msgstr "
|
6286 |
|
6287 |
-
#:
|
6288 |
#, fuzzy
|
6289 |
-
msgctxt "
|
6290 |
-
msgid "
|
6291 |
-
msgstr "
|
6292 |
|
6293 |
-
#:
|
6294 |
#, fuzzy
|
6295 |
-
msgctxt "
|
6296 |
-
msgid ""
|
6297 |
-
"
|
6298 |
-
"unlimited submits per day."
|
6299 |
-
msgstr ""
|
6300 |
-
"إستخدم هذا لمنع الرسائل المزعجة لأصحاب الإعلانات. 0 تعني إرسال غير محدود في "
|
6301 |
-
"اليوم الواحد."
|
6302 |
|
6303 |
-
#:
|
6304 |
#, fuzzy
|
6305 |
-
msgctxt "
|
6306 |
-
msgid "
|
6307 |
-
msgstr "
|
6308 |
|
6309 |
-
#:
|
6310 |
#, fuzzy
|
6311 |
-
msgctxt "
|
6312 |
-
msgid ""
|
6313 |
-
|
6314 |
-
"means unlimited submits per day."
|
6315 |
-
msgstr ""
|
6316 |
-
"إستخدم هذا لمنع الرسائل المزعجة لأصحاب الإعلانات. 0 تعني إرسال غير محدود في "
|
6317 |
-
"اليوم الواحد."
|
6318 |
|
6319 |
-
#: includes/admin/
|
6320 |
-
#, fuzzy
|
6321 |
-
msgctxt "
|
6322 |
-
msgid "
|
6323 |
-
msgstr "
|
6324 |
|
6325 |
-
#: includes/admin/
|
6326 |
#, fuzzy
|
6327 |
-
msgctxt "
|
6328 |
-
msgid "
|
6329 |
-
msgstr "
|
6330 |
|
6331 |
-
#: includes/admin/
|
6332 |
-
msgctxt "
|
6333 |
-
msgid ""
|
6334 |
-
"Prevents featured listings from floating to the top of the selected page."
|
6335 |
msgstr ""
|
6336 |
|
6337 |
-
#: includes/admin/
|
6338 |
-
msgctxt "
|
6339 |
-
msgid ""
|
6340 |
-
"The user ID or login of an existing user account. If login is not required "
|
6341 |
-
"to submit listings, this user will own them. A site admin or another user "
|
6342 |
-
"that will not a be posting a listing is best."
|
6343 |
msgstr ""
|
6344 |
|
6345 |
-
#: includes/admin/
|
6346 |
#, fuzzy
|
6347 |
-
msgctxt "
|
6348 |
-
msgid "
|
6349 |
-
msgstr "
|
6350 |
|
6351 |
-
#: includes/admin/
|
6352 |
#, fuzzy
|
6353 |
-
msgctxt "
|
6354 |
-
msgid "
|
6355 |
-
msgstr "
|
6356 |
|
6357 |
-
#: includes/admin/
|
6358 |
-
|
6359 |
-
|
6360 |
-
|
6361 |
-
msgstr "إرسال رسالة تعليمات الإعلانات"
|
6362 |
|
6363 |
-
#: includes/admin/
|
6364 |
-
|
6365 |
-
|
6366 |
-
|
6367 |
-
msgstr "ترتيب قائمة التصنيفات حسب"
|
6368 |
|
6369 |
-
#: includes/admin/
|
6370 |
-
|
6371 |
-
|
6372 |
-
|
6373 |
-
msgstr "ترتيب فرز التصنيفات"
|
6374 |
|
6375 |
-
#: includes/admin/
|
6376 |
-
|
6377 |
-
|
6378 |
-
|
6379 |
-
msgstr "إظهار عدد إعلانات التصنيف؟"
|
6380 |
|
6381 |
-
#: includes/admin/
|
6382 |
-
|
6383 |
-
|
6384 |
-
|
6385 |
-
msgstr "إخفاء التصنيفات الفارغة؟"
|
6386 |
|
6387 |
-
#: includes/admin/
|
6388 |
-
|
6389 |
-
|
6390 |
-
|
6391 |
-
msgstr "إظهار التصنيفات الأبوية فقط في قائمة التصنيف؟"
|
6392 |
|
6393 |
-
#: includes/admin/
|
6394 |
-
|
6395 |
-
|
6396 |
-
|
6397 |
-
msgstr "ترتيب إعلانات الدليل حسب"
|
6398 |
|
6399 |
-
#: includes/admin/
|
6400 |
#, fuzzy
|
6401 |
-
msgctxt "
|
6402 |
-
msgid "
|
6403 |
-
msgstr "
|
6404 |
|
6405 |
-
#: includes/admin/
|
6406 |
-
|
6407 |
-
|
6408 |
-
|
6409 |
-
msgstr "ترتيب تصاعدي من أ إلى ي، ترتيب تنازلي من ي إلى أ"
|
6410 |
|
6411 |
-
#: includes/admin/
|
6412 |
-
|
6413 |
-
|
6414 |
-
|
6415 |
-
msgstr "تمكين شريط الفرز؟"
|
6416 |
|
6417 |
-
#: includes/admin/
|
6418 |
#, fuzzy
|
6419 |
-
msgctxt "
|
6420 |
-
msgid "
|
6421 |
-
msgstr "
|
6422 |
|
6423 |
-
#: includes/admin/
|
6424 |
-
|
6425 |
-
|
6426 |
-
|
6427 |
-
msgstr "إظهار زر \"إضافة إعلان\"."
|
6428 |
|
6429 |
-
#: includes/admin/
|
6430 |
-
msgctxt "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6431 |
msgid ""
|
6432 |
-
"
|
6433 |
-
"
|
6434 |
-
"
|
|
|
6435 |
msgstr ""
|
|
|
|
|
|
|
|
|
6436 |
|
6437 |
-
#: includes/admin/
|
6438 |
-
|
6439 |
-
|
6440 |
-
|
6441 |
-
msgstr "إظهار \"البحث في الإعلانات\"."
|
6442 |
-
|
6443 |
-
#: includes/admin/settings/class-settings-bootstrap.php:866
|
6444 |
-
#, fuzzy
|
6445 |
-
msgctxt "settings"
|
6446 |
-
msgid "Show the \"View Listings\" button."
|
6447 |
-
msgstr "إظهار زر \"مشاهدة الإعلانات\"."
|
6448 |
|
6449 |
-
#: includes/admin/
|
6450 |
-
|
6451 |
-
|
6452 |
-
|
6453 |
-
msgstr "إظهار زر \"مشاهدة الإعلانات\"."
|
6454 |
|
6455 |
-
#: includes/admin/
|
6456 |
-
|
6457 |
-
|
6458 |
-
|
6459 |
-
msgstr "إظهار زر \"الدليل\"."
|
6460 |
|
6461 |
-
#: includes/
|
6462 |
#, fuzzy
|
6463 |
-
msgctxt "
|
6464 |
-
msgid "
|
6465 |
-
msgstr "
|
6466 |
|
6467 |
-
#: includes/
|
6468 |
-
|
6469 |
-
msgctxt "
|
6470 |
-
msgid "
|
6471 |
-
msgstr "
|
6472 |
|
6473 |
-
#: includes/
|
6474 |
-
|
6475 |
-
|
6476 |
-
|
6477 |
-
msgstr "أقل حجم لملف الصورة (KB)"
|
6478 |
|
6479 |
-
#: includes/
|
6480 |
-
|
6481 |
-
|
6482 |
-
|
6483 |
-
msgstr "أقصى حجم لملف الصورة (KB)"
|
6484 |
|
6485 |
-
#: includes/
|
6486 |
-
|
6487 |
-
msgctxt "
|
6488 |
-
msgid "
|
6489 |
-
msgstr "
|
6490 |
|
6491 |
-
#: includes/
|
6492 |
#, fuzzy
|
6493 |
-
msgctxt "
|
6494 |
-
msgid "
|
6495 |
-
msgstr "
|
6496 |
|
6497 |
-
#: includes/
|
6498 |
-
|
6499 |
-
|
6500 |
-
|
6501 |
-
msgstr "أقصى عرض للصورة (px)"
|
6502 |
|
6503 |
-
#: includes/
|
6504 |
-
|
6505 |
-
|
6506 |
-
|
6507 |
-
msgstr "أقصى ارتفاع للصورة (px)"
|
6508 |
|
6509 |
-
#: includes/
|
6510 |
-
|
6511 |
-
|
6512 |
-
|
6513 |
-
msgstr "تشغيل thickbox/lightbox؟"
|
6514 |
|
6515 |
-
#: includes/
|
6516 |
-
|
6517 |
-
|
|
|
|
|
|
|
|
|
6518 |
msgid ""
|
6519 |
-
"
|
|
|
6520 |
msgstr ""
|
6521 |
-
"
|
6522 |
-
"
|
6523 |
-
|
6524 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1009
|
6525 |
-
#, fuzzy
|
6526 |
-
msgctxt "settings"
|
6527 |
-
msgid "Thumbnails"
|
6528 |
-
msgstr "الصور المصغرة"
|
6529 |
-
|
6530 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1016
|
6531 |
-
#, fuzzy
|
6532 |
-
msgctxt "settings"
|
6533 |
-
msgid "Thumbnail width (px)"
|
6534 |
-
msgstr "عرض الصور المصغرة (px)"
|
6535 |
|
6536 |
-
#: includes/
|
6537 |
-
|
6538 |
-
|
6539 |
-
|
6540 |
-
msgstr "ارتفاع الصورة المصغرة (px)"
|
6541 |
|
6542 |
-
#: includes/
|
6543 |
-
|
6544 |
-
|
6545 |
-
|
6546 |
-
msgstr "قطع الصور المصغرة للأبعاد المناسبة؟"
|
6547 |
|
6548 |
-
#: includes/
|
6549 |
-
|
6550 |
-
msgctxt "settings"
|
6551 |
msgid ""
|
6552 |
-
"
|
6553 |
-
"
|
6554 |
-
"match the specified width and their height will be adjusted proportionally. "
|
6555 |
-
"Depending on the uploaded images, thumbnails may have different heights."
|
6556 |
msgstr ""
|
6557 |
-
"عند تمكين الصور ستطابق تماما الأبعاد أعلاه لكن جزءا من الصورة يمكن أن يقطع. "
|
6558 |
-
"في حالة تعطيلها، سيتم تغيير حجم الصور المصغرة لمطابقة العرض المحدد وسيتم "
|
6559 |
-
"تعديل الارتفاع بشكل متناسب. اعتماداً على الصور المرفوعة, قد تكون ارتفاعات "
|
6560 |
-
"الصور المصغرة مختلفة."
|
6561 |
|
6562 |
-
#: includes/
|
6563 |
-
msgctxt "
|
6564 |
-
msgid "
|
|
|
|
|
6565 |
msgstr ""
|
6566 |
|
6567 |
-
#: includes/
|
6568 |
-
|
6569 |
-
|
6570 |
-
msgid "Number of free images"
|
6571 |
-
msgstr "عدد الصور المجانية"
|
6572 |
-
|
6573 |
-
#: includes/admin/settings/class-settings-bootstrap.php:1069
|
6574 |
-
msgctxt "settings"
|
6575 |
-
msgid "Use \"Coming Soon\" photo for listings without any (primary) images?"
|
6576 |
msgstr ""
|
6577 |
|
6578 |
-
#: includes/
|
6579 |
-
|
6580 |
-
|
6581 |
-
|
6582 |
-
|
|
|
6583 |
|
6584 |
-
#: includes/
|
6585 |
-
msgctxt "
|
6586 |
msgid ""
|
6587 |
-
"
|
6588 |
-
"
|
6589 |
-
"For all other values, we preserve the aspect ratio of the image and use the "
|
6590 |
-
"width as the starting point."
|
6591 |
msgstr ""
|
6592 |
|
6593 |
-
#: includes/
|
6594 |
-
|
6595 |
-
|
6596 |
-
|
6597 |
-
msgstr "إظهار صورة مصغرة في صفحة الإعلانات الرئيسية؟"
|
6598 |
|
6599 |
-
#: includes/
|
6600 |
#, fuzzy
|
6601 |
-
msgctxt "
|
6602 |
-
msgid "
|
6603 |
-
msgstr "
|
6604 |
|
6605 |
-
#:
|
6606 |
-
|
6607 |
-
|
6608 |
-
|
6609 |
-
msgstr "وحدة المستويات المميزة"
|
6610 |
|
6611 |
-
#:
|
6612 |
-
|
6613 |
-
|
6614 |
-
|
|
|
|
|
6615 |
|
6616 |
-
#:
|
6617 |
-
msgctxt "
|
6618 |
-
msgid "
|
6619 |
-
msgstr ""
|
6620 |
|
6621 |
-
#:
|
6622 |
-
|
6623 |
-
|
6624 |
-
|
6625 |
-
msgstr "ترتيب"
|
6626 |
|
6627 |
-
#:
|
6628 |
-
|
6629 |
-
|
6630 |
-
|
6631 |
-
msgstr "تشغيل الدفعات؟"
|
6632 |
|
6633 |
-
#:
|
6634 |
-
|
6635 |
-
|
6636 |
-
|
6637 |
-
msgstr "وضع بوابات الدفع في وضع الاختبار؟"
|
6638 |
|
6639 |
-
#:
|
6640 |
-
|
6641 |
-
|
6642 |
-
|
6643 |
-
msgstr "رمز العملة"
|
6644 |
|
6645 |
-
#:
|
6646 |
-
|
6647 |
-
|
6648 |
-
|
6649 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6650 |
|
6651 |
-
#:
|
6652 |
-
|
6653 |
-
|
6654 |
-
|
6655 |
-
msgstr "عرض رمز العملة"
|
6656 |
|
6657 |
-
#:
|
6658 |
-
msgctxt "
|
6659 |
-
msgid "
|
6660 |
msgstr ""
|
6661 |
|
6662 |
-
#:
|
6663 |
#, fuzzy
|
6664 |
-
msgctxt "
|
6665 |
-
msgid "
|
6666 |
-
msgstr "
|
6667 |
|
6668 |
-
#:
|
6669 |
#, fuzzy
|
6670 |
-
msgctxt "
|
6671 |
-
msgid "
|
6672 |
-
msgstr "
|
6673 |
|
6674 |
-
#:
|
6675 |
#, fuzzy
|
6676 |
-
msgctxt "
|
6677 |
-
msgid "
|
6678 |
-
msgstr "
|
6679 |
|
6680 |
-
#:
|
6681 |
-
|
6682 |
-
|
6683 |
-
|
6684 |
-
msgstr "عرض حقول عنوان البريد الإلكتروني علنا؟"
|
6685 |
|
6686 |
-
#:
|
6687 |
-
|
6688 |
-
|
6689 |
-
msgid ""
|
6690 |
-
"Shows the email address of the listing owner to all web users. NOT "
|
6691 |
-
"RECOMMENDED as this increases spam to the address and allows spam bots to "
|
6692 |
-
"harvest it for future use."
|
6693 |
msgstr ""
|
6694 |
-
"إظهار عنوان البريد الإلكتروني لمالك الإعلان لجميع مستخدمي الويب. لا ينصح به "
|
6695 |
-
"لأن هذا يزيد من الرسائل المزعجة إلى العنوان ويسمح للمتطفلين بجمع عنوانين "
|
6696 |
-
"البريد للاستخدام في المستقبل."
|
6697 |
|
6698 |
-
#:
|
6699 |
#, fuzzy
|
6700 |
-
msgctxt "
|
6701 |
-
msgid "
|
6702 |
-
msgstr "
|
6703 |
|
6704 |
-
#:
|
6705 |
-
|
6706 |
-
|
6707 |
-
|
6708 |
-
"This affects emails sent to listing owners via contact forms or when their "
|
6709 |
-
"listings expire."
|
6710 |
-
msgstr ""
|
6711 |
-
"هذا يؤثر على رسائل البريد الإلكتروني المرسلة إلى مالكي الإعلانات عبر نموذج "
|
6712 |
-
"الاتصال أو عندما ينتهي تاريخ الإعلانات."
|
6713 |
|
6714 |
-
#:
|
6715 |
-
msgctxt "
|
6716 |
-
msgid "
|
6717 |
-
msgstr ""
|
6718 |
|
6719 |
-
#:
|
6720 |
-
msgctxt "
|
6721 |
-
msgid ""
|
6722 |
-
"
|
6723 |
-
"plugins for email do not correctly support Content Type unless explicitly "
|
6724 |
-
"set, you can do that here. If you're unsure, try \"HTML\", \"Plain\" and "
|
6725 |
-
"then \"Both\"."
|
6726 |
-
msgstr ""
|
6727 |
|
6728 |
-
#:
|
6729 |
-
|
6730 |
-
|
6731 |
-
|
6732 |
-
msgstr "قوالب البريد الإلكتروني"
|
6733 |
|
6734 |
-
#:
|
6735 |
-
|
6736 |
-
|
6737 |
-
|
6738 |
-
msgstr "رسالة تأكيد البريد الإلكتروني"
|
6739 |
|
6740 |
-
#:
|
6741 |
-
|
6742 |
-
|
6743 |
-
|
6744 |
-
msgstr "ترسل بعد أن يضاف الإعلان."
|
6745 |
|
6746 |
-
#:
|
6747 |
#, fuzzy
|
6748 |
-
msgctxt "
|
6749 |
-
msgid "
|
6750 |
-
msgstr "
|
6751 |
|
6752 |
-
#:
|
6753 |
-
|
6754 |
-
|
6755 |
-
|
6756 |
-
msgstr "ترسل عندما يتم نشر الإعلان أو الموافقة عليه من طرف المدير."
|
6757 |
|
6758 |
-
#:
|
6759 |
-
|
6760 |
-
|
6761 |
-
|
6762 |
-
msgstr "رسالة اتصال الإعلان"
|
6763 |
|
6764 |
-
#:
|
6765 |
#, fuzzy
|
6766 |
-
msgctxt "
|
6767 |
-
msgid ""
|
6768 |
-
"
|
6769 |
-
|
|
|
|
|
|
|
6770 |
msgstr ""
|
6771 |
-
"ترسل إلى مالكي الإعلانات عندما يستخدم شخص ما نموذج جهة الاتصال في صفحات "
|
6772 |
-
"الإعلانات الخاصة بهم."
|
6773 |
|
6774 |
-
#:
|
6775 |
-
|
6776 |
-
|
6777 |
-
|
6778 |
-
msgstr "رسالة تذكير بالتخلي عن الدفع"
|
6779 |
|
6780 |
-
#:
|
6781 |
-
|
6782 |
-
|
6783 |
-
|
6784 |
-
msgstr "ترسل أحيانا بعد أن يتخلي الأعضاء عن الدفعة المنتظرة."
|
6785 |
|
6786 |
-
#:
|
6787 |
-
|
6788 |
-
|
6789 |
-
|
6790 |
-
msgstr "رسالة تذكير بالتخلي عن الدفع"
|
6791 |
|
6792 |
-
#:
|
6793 |
-
|
6794 |
-
|
6795 |
-
|
6796 |
-
msgstr "ترسل أحيانا بعد أن يتخلي الأعضاء عن الدفعة المنتظرة."
|
6797 |
|
6798 |
-
#:
|
6799 |
-
msgctxt "
|
6800 |
-
msgid "
|
6801 |
-
msgstr ""
|
6802 |
|
6803 |
-
#:
|
6804 |
-
|
6805 |
-
|
6806 |
-
|
|
|
6807 |
msgstr ""
|
|
|
|
|
6808 |
|
6809 |
-
#:
|
6810 |
-
msgctxt "
|
6811 |
-
msgid "
|
6812 |
-
msgstr ""
|
6813 |
|
6814 |
-
#:
|
6815 |
-
|
6816 |
-
|
6817 |
-
|
6818 |
-
msgstr "القوالب"
|
6819 |
|
6820 |
-
#:
|
6821 |
-
msgctxt "
|
6822 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6823 |
msgstr ""
|
|
|
|
|
6824 |
|
6825 |
-
#:
|
6826 |
-
|
6827 |
-
|
6828 |
-
|
6829 |
-
msgstr "تفعيل Authorize.net؟"
|
6830 |
|
6831 |
#: includes/admin/settings/class-settings-bootstrap.php:637
|
6832 |
#: includes/admin/settings/class-settings-bootstrap.php:650
|
@@ -6867,12 +6850,12 @@ msgctxt "contact email"
|
|
6867 |
msgid "Time: %s"
|
6868 |
msgstr "الوقت: %s"
|
6869 |
|
6870 |
-
#: includes/admin/tracking.php:
|
6871 |
msgctxt "tracking"
|
6872 |
msgid "Help Improve Business Directory"
|
6873 |
msgstr "المساعدة في تحسين دليل الأعمال"
|
6874 |
|
6875 |
-
#: includes/admin/tracking.php:
|
6876 |
msgctxt "tracking"
|
6877 |
msgid ""
|
6878 |
"Can Business Directory keep track of your theme, plugins, and other non-"
|
@@ -6883,7 +6866,7 @@ msgstr ""
|
|
6883 |
"المعلومات غير الشخصية، والتي لا تعرف بك لمساعدتنا في اختبار الإضافة "
|
6884 |
"للإصدارات المستقبلية؟"
|
6885 |
|
6886 |
-
#: includes/admin/tracking.php:
|
6887 |
msgctxt "tracking"
|
6888 |
msgid "What do you track?"
|
6889 |
msgstr "ما الذي تتتبع؟"
|
@@ -6963,7 +6946,7 @@ msgctxt "installer"
|
|
6963 |
msgid "Migrating listing information: %d items remaining..."
|
6964 |
msgstr ""
|
6965 |
|
6966 |
-
#: includes/admin/upgrades/migrations/migration-3_2.php:
|
6967 |
msgctxt "installer"
|
6968 |
msgid ""
|
6969 |
"<b>Business Directory Plugin - Regions Module</b> was disabled because it is "
|
@@ -7006,7 +6989,7 @@ msgctxt "installer"
|
|
7006 |
msgid "Listing upgrade to featured"
|
7007 |
msgstr "الترقية الى إعلان مميز"
|
7008 |
|
7009 |
-
#: includes/installer.php:
|
7010 |
msgctxt "installer"
|
7011 |
msgid "Default Fee"
|
7012 |
msgstr "رسوم افتراضية"
|
@@ -7163,37 +7146,37 @@ msgctxt "listing"
|
|
7163 |
msgid "Add New Listing"
|
7164 |
msgstr "إضافة إعلان جديد"
|
7165 |
|
7166 |
-
#: includes/class-listing.php:
|
7167 |
#, fuzzy
|
7168 |
msgctxt "listing"
|
7169 |
msgid "Listing has no registered payments"
|
7170 |
msgstr "إنتهاء صلاحية الإعلان"
|
7171 |
|
7172 |
-
#: includes/class-listing.php:
|
7173 |
#, fuzzy
|
7174 |
msgctxt "listing"
|
7175 |
msgid "Can't delete payment"
|
7176 |
msgstr "رفض الدفع"
|
7177 |
|
7178 |
-
#: includes/class-listing.php:
|
7179 |
#, fuzzy
|
7180 |
msgctxt "listing"
|
7181 |
msgid "Listing expired"
|
7182 |
msgstr "الإعلان منتهي التاريخ"
|
7183 |
|
7184 |
-
#: includes/class-listing.php:
|
7185 |
#, fuzzy
|
7186 |
msgctxt "listing"
|
7187 |
msgid "(Unavailable Plan)"
|
7188 |
msgstr "(رسم غير متوفر)"
|
7189 |
|
7190 |
-
#: includes/class-listing.php:
|
7191 |
#, fuzzy
|
7192 |
msgctxt "listing"
|
7193 |
msgid "Plan \"%s\" (recurring)"
|
7194 |
msgstr "(متكرر)"
|
7195 |
|
7196 |
-
#: includes/class-listing.php:
|
7197 |
msgctxt "listing"
|
7198 |
msgid "Plan \"%s\""
|
7199 |
msgstr ""
|
@@ -7203,49 +7186,6 @@ msgctxt "post type"
|
|
7203 |
msgid "Add New Listing"
|
7204 |
msgstr "إضافة إعلان جديد"
|
7205 |
|
7206 |
-
#: includes/class-fee-plan.php:162
|
7207 |
-
#, fuzzy
|
7208 |
-
msgctxt "fee plan"
|
7209 |
-
msgid "No images allowed."
|
7210 |
-
msgstr "عدد الصور المسموح بها"
|
7211 |
-
|
7212 |
-
#: includes/class-fee-plan.php:164
|
7213 |
-
#, fuzzy
|
7214 |
-
msgctxt "fee plan"
|
7215 |
-
msgid "%d image allowed."
|
7216 |
-
msgid_plural "%d images allowed."
|
7217 |
-
msgstr[0] "الصور المسموح بها"
|
7218 |
-
msgstr[1] "الصور المسموح بها"
|
7219 |
-
msgstr[2] "الصور المسموح بها"
|
7220 |
-
msgstr[3] "الصور المسموح بها"
|
7221 |
-
msgstr[4] "الصور المسموح بها"
|
7222 |
-
msgstr[5] "الصور المسموح بها"
|
7223 |
-
|
7224 |
-
#: includes/class-fee-plan.php:340
|
7225 |
-
msgctxt "fees-api"
|
7226 |
-
msgid "Fee label is required."
|
7227 |
-
msgstr "رسوم التسمية مطلوبة."
|
7228 |
-
|
7229 |
-
#: includes/class-fee-plan.php:346
|
7230 |
-
msgctxt "fees-api"
|
7231 |
-
msgid "Fee listing duration must be a number less than 10 years (3650 days)."
|
7232 |
-
msgstr "يجب أن تكون رسوم مدة الإعلان بعدد أقل من 10 سنوات (3650 يوما)."
|
7233 |
-
|
7234 |
-
#: includes/class-fee-plan.php:351
|
7235 |
-
msgctxt "fees-api"
|
7236 |
-
msgid ""
|
7237 |
-
"To set this fee as \"Recurring\" you must have a time for the listing to "
|
7238 |
-
"renew (e.g. 30 days). To avoid issues with the listing, please edit the "
|
7239 |
-
"<a>fee plan</a> appropriately."
|
7240 |
-
msgstr ""
|
7241 |
-
|
7242 |
-
#: includes/class-fee-plan.php:354
|
7243 |
-
msgctxt "fees-api"
|
7244 |
-
msgid ""
|
7245 |
-
"To set this fee as \"Recurring\" you must set a price for your fee plan. To "
|
7246 |
-
"avoid issues with the listing, please edit the <a>fee plan</a> appropriately."
|
7247 |
-
msgstr ""
|
7248 |
-
|
7249 |
#. translators: [%s] is the name of the blog.
|
7250 |
#: includes/class-listing-email-notification.php:237
|
7251 |
msgctxt "notify email"
|
@@ -7301,295 +7241,108 @@ msgstr "الدفع"
|
|
7301 |
#, fuzzy
|
7302 |
msgctxt "notify email"
|
7303 |
msgid "Payment Details"
|
7304 |
-
msgstr "تفاصيل الدفع"
|
7305 |
-
|
7306 |
-
#: templates/email/listing-payment-completed.tpl.php:33
|
7307 |
-
#, fuzzy
|
7308 |
-
msgctxt "notify email"
|
7309 |
-
msgid "Listing URL"
|
7310 |
-
msgstr "عنوان URL الإعلان"
|
7311 |
-
|
7312 |
-
#: templates/email/listing-payment-completed.tpl.php:35
|
7313 |
-
#, fuzzy
|
7314 |
-
msgctxt "notify email"
|
7315 |
-
msgid "Listing admin URL"
|
7316 |
-
msgstr "عنوان URL الإعلان"
|
7317 |
-
|
7318 |
-
#: templates/email/listing-reported.tpl.php:17
|
7319 |
-
msgctxt "notify email"
|
7320 |
-
msgid "Categories"
|
7321 |
-
msgstr "التصنيفات"
|
7322 |
-
|
7323 |
-
#: templates/email/listing-reported.tpl.php:21
|
7324 |
-
#, fuzzy
|
7325 |
-
msgctxt "notify email"
|
7326 |
-
msgid "Report Information"
|
7327 |
-
msgstr "معلومات الرسوم"
|
7328 |
-
|
7329 |
-
#: templates/email/listing-reported.tpl.php:24
|
7330 |
-
#, fuzzy
|
7331 |
-
msgctxt "notify email"
|
7332 |
-
msgid "User name"
|
7333 |
-
msgstr "عضو"
|
7334 |
-
|
7335 |
-
#: templates/email/listing-reported.tpl.php:28
|
7336 |
-
#, fuzzy
|
7337 |
-
msgctxt "notify email"
|
7338 |
-
msgid "User Email"
|
7339 |
-
msgstr "بريدك الإلكتروني"
|
7340 |
-
|
7341 |
-
#: templates/email/listing-reported.tpl.php:31
|
7342 |
-
msgctxt "notify email"
|
7343 |
-
msgid "Report IP"
|
7344 |
-
msgstr ""
|
7345 |
-
|
7346 |
-
#: templates/email/listing-reported.tpl.php:33
|
7347 |
-
#, fuzzy
|
7348 |
-
msgctxt "notify email"
|
7349 |
-
msgid "Report selected option"
|
7350 |
-
msgstr "إختيار تصنيف"
|
7351 |
-
|
7352 |
-
#: templates/email/listing-reported.tpl.php:35
|
7353 |
-
msgctxt "notify email"
|
7354 |
-
msgid "Report additional info"
|
7355 |
-
msgstr ""
|
7356 |
-
|
7357 |
-
#: includes/class-meta.php:37
|
7358 |
-
msgctxt "rss feed"
|
7359 |
-
msgid "%s Feed"
|
7360 |
-
msgstr "تغذية %s"
|
7361 |
-
|
7362 |
-
#: includes/class-meta.php:160
|
7363 |
-
msgctxt "title"
|
7364 |
-
msgid "Find a Listing"
|
7365 |
-
msgstr "العثور على إعلان"
|
7366 |
-
|
7367 |
-
#: includes/class-meta.php:195
|
7368 |
-
msgctxt "title"
|
7369 |
-
msgid "Listings tagged: %s"
|
7370 |
-
msgstr "إعلانات ذات وسم: %s"
|
7371 |
-
|
7372 |
-
#: includes/class-payment-gateways.php:95
|
7373 |
-
#, fuzzy
|
7374 |
-
msgctxt "payment-gateways"
|
7375 |
-
msgid "Enable %s?"
|
7376 |
-
msgstr "تفعيل"
|
7377 |
-
|
7378 |
-
#: includes/class-payment-gateways.php:129
|
7379 |
-
#, fuzzy
|
7380 |
-
msgctxt "payment-gateways"
|
7381 |
-
msgid ""
|
7382 |
-
"The <gateway> gateway is enabled but not properly configured. The gateway "
|
7383 |
-
"won't be available until the following problems are fixed: <problems>."
|
7384 |
-
msgstr ""
|
7385 |
-
"البوابة <b>%s</b> مفعلة ولكن لم يتم إعدادها بشكل صحيح. البوابة لن تكون "
|
7386 |
-
"متوفرة حتى يتم إصلاح المشاكل التالية <b>%s</b>.<br/> تحقق من <a href=\"%s"
|
7387 |
-
"\">إعدادات دفع</a> ."
|
7388 |
-
|
7389 |
-
#: includes/class-payment-gateways.php:131
|
7390 |
-
msgctxt "payment-gateways"
|
7391 |
-
msgid "Please check the <link>payment settings</link>."
|
7392 |
-
msgstr ""
|
7393 |
-
|
7394 |
-
#: includes/class-payment-gateways.php:142
|
7395 |
-
#, fuzzy
|
7396 |
-
msgctxt "payment-gateways"
|
7397 |
-
msgid ""
|
7398 |
-
"You have payments turned on but no gateway is active and properly "
|
7399 |
-
"configured. Go to <link>Manage Options - Payment</link> to change the "
|
7400 |
-
"payment settings. Until you change this, the directory will operate in "
|
7401 |
-
"<i>Free Mode</i>."
|
7402 |
-
msgstr ""
|
7403 |
-
"لديك مدفوعات مشغلة ولكن لا توجد بوابة مفعلة ومعدة بشكل صحيح. إذهب إلى <a "
|
7404 |
-
"href=\"%s\">إدارة الخيارات - الدفع</a> لتغيير إعدادات الدفع. حتى تقوم بتغيير "
|
7405 |
-
"ذلك، فإن الدليل سيعمل بـ <i>الوضع المجاني.</i>"
|
7406 |
-
|
7407 |
-
#: includes/class-payment.php:83
|
7408 |
-
msgctxt "payment"
|
7409 |
-
msgid "Payment status changed from \"%1$s\" to \"%2$s\"."
|
7410 |
-
msgstr ""
|
7411 |
-
|
7412 |
-
#: includes/class-payment.php:128
|
7413 |
-
#, fuzzy
|
7414 |
-
msgctxt "payment"
|
7415 |
-
msgid "Initial payment (\"%s\")"
|
7416 |
-
msgstr "الدفعة الأولية"
|
7417 |
-
|
7418 |
-
#: includes/class-payment.php:131
|
7419 |
-
#, fuzzy
|
7420 |
-
msgctxt "payment"
|
7421 |
-
msgid "Renewal payment (\"%s\")"
|
7422 |
-
msgstr "رفض الدفع"
|
7423 |
-
|
7424 |
-
#: includes/class-payment.php:368
|
7425 |
-
#, fuzzy
|
7426 |
-
msgctxt "payment"
|
7427 |
-
msgid "Pending"
|
7428 |
-
msgstr " في الانتظار"
|
7429 |
-
|
7430 |
-
#: includes/class-payment.php:369
|
7431 |
-
msgctxt "payment"
|
7432 |
-
msgid "Failed"
|
7433 |
-
msgstr ""
|
7434 |
-
|
7435 |
-
#: includes/class-payment.php:370
|
7436 |
-
#, fuzzy
|
7437 |
-
msgctxt "payment"
|
7438 |
-
msgid "Completed"
|
7439 |
-
msgstr "إكتمل"
|
7440 |
-
|
7441 |
-
#: includes/class-payment.php:371
|
7442 |
-
#, fuzzy
|
7443 |
-
msgctxt "payment"
|
7444 |
-
msgid "Canceled"
|
7445 |
-
msgstr "ألغيت"
|
7446 |
-
|
7447 |
-
#: includes/class-payment.php:372
|
7448 |
-
msgctxt "payment"
|
7449 |
-
msgid "On Hold"
|
7450 |
-
msgstr ""
|
7451 |
-
|
7452 |
-
#: includes/class-payment.php:373
|
7453 |
-
msgctxt "payment"
|
7454 |
-
msgid "Refunded"
|
7455 |
-
msgstr ""
|
7456 |
-
|
7457 |
-
#: includes/class-payment.php:143
|
7458 |
-
msgctxt "payment summary"
|
7459 |
-
msgid "%s. Admin Posted."
|
7460 |
-
msgstr ""
|
7461 |
-
|
7462 |
-
#: includes/class-payment.php:145
|
7463 |
-
#, fuzzy
|
7464 |
-
msgctxt "payment summary"
|
7465 |
-
msgid "%s. Imported Listing."
|
7466 |
-
msgstr "استيراد الإعلانات"
|
7467 |
-
|
7468 |
-
#: includes/class-payment.php:252
|
7469 |
-
#, fuzzy
|
7470 |
-
msgctxt "submit listing"
|
7471 |
-
msgid "Listing submitted by admin. Payment skipped."
|
7472 |
-
msgstr "Poster annonce(paiement initial)"
|
7473 |
-
|
7474 |
-
#: includes/controllers/pages/class-submit-listing.php:67
|
7475 |
-
msgctxt "submit listing"
|
7476 |
-
msgid "Click this field to add categories"
|
7477 |
-
msgstr ""
|
7478 |
-
|
7479 |
-
#: includes/controllers/pages/class-submit-listing.php:68
|
7480 |
-
#, fuzzy
|
7481 |
-
msgctxt "submit listing"
|
7482 |
-
msgid "Complete Listing"
|
7483 |
-
msgstr "حذف الإعلان"
|
7484 |
-
|
7485 |
-
#: includes/controllers/pages/class-submit-listing.php:69
|
7486 |
-
#, fuzzy
|
7487 |
-
msgctxt "submit listing"
|
7488 |
-
msgid "Continue to Payment"
|
7489 |
-
msgstr "الدفعة الأولية"
|
7490 |
-
|
7491 |
-
#: includes/controllers/pages/class-submit-listing.php:71
|
7492 |
-
msgctxt "submit listing"
|
7493 |
-
msgid "Please wait a moment!"
|
7494 |
-
msgstr ""
|
7495 |
-
|
7496 |
-
#: includes/controllers/pages/class-submit-listing.php:72
|
7497 |
-
msgctxt "submit listing"
|
7498 |
-
msgid "Something went wrong!"
|
7499 |
-
msgstr ""
|
7500 |
-
|
7501 |
-
#: includes/controllers/pages/class-submit-listing.php:106
|
7502 |
-
#, fuzzy
|
7503 |
-
msgctxt "submit listing"
|
7504 |
-
msgid "No listing ID was specified."
|
7505 |
-
msgstr "تم تحرير الإعلان"
|
7506 |
-
|
7507 |
-
#: includes/controllers/pages/class-submit-listing.php:108
|
7508 |
-
#, fuzzy
|
7509 |
-
msgctxt "submit listing"
|
7510 |
-
msgid "You can't edit this listing."
|
7511 |
-
msgstr "التصنيفات لهذا الإعلان"
|
7512 |
-
|
7513 |
-
#: includes/controllers/pages/class-submit-listing.php:166
|
7514 |
-
msgctxt "submit listing"
|
7515 |
-
msgid ""
|
7516 |
-
"This listing can't be edited at this time because it has no fee plan "
|
7517 |
-
"associated. Please <a>edit the listing</a> on the backend and associate it "
|
7518 |
-
"to a fee plan."
|
7519 |
-
msgstr ""
|
7520 |
-
|
7521 |
-
#: includes/controllers/pages/class-submit-listing.php:172
|
7522 |
-
msgctxt "submit listing"
|
7523 |
-
msgid ""
|
7524 |
-
"This listing can't be edited at this time. Please try again later or contact "
|
7525 |
-
"the admin if the problem persists."
|
7526 |
-
msgstr ""
|
7527 |
|
7528 |
-
#:
|
7529 |
#, fuzzy
|
7530 |
-
msgctxt "
|
7531 |
-
msgid "
|
7532 |
-
msgstr "
|
7533 |
|
7534 |
-
#:
|
7535 |
#, fuzzy
|
7536 |
-
msgctxt "
|
7537 |
-
msgid "
|
7538 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
7539 |
|
7540 |
-
#:
|
7541 |
#, fuzzy
|
7542 |
-
msgctxt "
|
7543 |
-
msgid "
|
7544 |
-
msgstr "
|
7545 |
|
7546 |
-
#:
|
7547 |
#, fuzzy
|
7548 |
-
msgctxt "
|
7549 |
-
msgid "
|
7550 |
-
msgstr ""
|
7551 |
-
"لا يمكن أن نقوم بمعالجة الدفع الخاص بك في هذه اللحظة. المرجو المحاولة مرة "
|
7552 |
-
"أخرى لاحقاً."
|
7553 |
|
7554 |
-
#:
|
7555 |
-
#: includes/controllers/pages/class-submit-listing.php:981
|
7556 |
#, fuzzy
|
7557 |
-
msgctxt "
|
7558 |
-
msgid "
|
7559 |
-
msgstr "
|
7560 |
|
7561 |
-
#:
|
7562 |
-
msgctxt "
|
7563 |
-
msgid "
|
7564 |
msgstr ""
|
7565 |
|
7566 |
-
#:
|
7567 |
#, fuzzy
|
7568 |
-
msgctxt "
|
7569 |
-
msgid "
|
7570 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7571 |
|
7572 |
-
#: includes/
|
7573 |
#, fuzzy
|
7574 |
-
msgctxt "
|
7575 |
-
msgid "
|
7576 |
-
msgstr "
|
7577 |
|
7578 |
-
#: includes/
|
7579 |
#, fuzzy
|
7580 |
-
msgctxt "
|
7581 |
-
msgid "
|
7582 |
-
|
|
|
|
|
|
|
|
|
|
|
7583 |
|
7584 |
-
#: includes/
|
7585 |
-
msgctxt "
|
7586 |
-
msgid "
|
7587 |
msgstr ""
|
7588 |
|
7589 |
-
#: includes/
|
7590 |
-
|
7591 |
-
|
|
|
|
|
|
|
|
|
|
|
7592 |
msgstr ""
|
|
|
|
|
|
|
7593 |
|
7594 |
#: includes/class-recaptcha.php:32
|
7595 |
msgctxt "recaptcha"
|
@@ -7602,13 +7355,13 @@ msgctxt "recaptcha"
|
|
7602 |
msgid "The reCAPTCHA validation score failed."
|
7603 |
msgstr "لم يتم إدخال reCAPTCHA بشكل صحيح."
|
7604 |
|
7605 |
-
#: includes/class-wpbdp.php:
|
7606 |
#, fuzzy
|
7607 |
msgctxt "listing image upload"
|
7608 |
msgid "Can not upload any more images for this listing."
|
7609 |
msgstr "التصنيفات لهذا الإعلان"
|
7610 |
|
7611 |
-
#: includes/class-wpbdp.php:
|
7612 |
msgctxt "listing image upload"
|
7613 |
msgid ""
|
7614 |
"You're trying to upload %1$d images, but only have %2$d slot available. "
|
@@ -7623,7 +7376,7 @@ msgstr[3] ""
|
|
7623 |
msgstr[4] ""
|
7624 |
msgstr[5] ""
|
7625 |
|
7626 |
-
#: includes/compatibility/class-navxt-integration.php:
|
7627 |
msgctxt "navxt"
|
7628 |
msgid "Submit Listing"
|
7629 |
msgstr "إضافة إعلان"
|
@@ -7837,7 +7590,7 @@ msgstr ""
|
|
7837 |
"إعلانات بداخلها. هذا يعني أنها لن تظهر على الواجهة الأمامية للموقع الخاص بك. "
|
7838 |
"إذا كنت لا تريد ذلك، إضغط <a>هنا</a> لتغيير الإعداد."
|
7839 |
|
7840 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7841 |
msgctxt "templates"
|
7842 |
msgid ""
|
7843 |
"<b>View not available</b>. Do you have the \"Disable Frontend Listing "
|
@@ -7846,27 +7599,27 @@ msgstr ""
|
|
7846 |
"<b>المشاهدة غير متوفرة</b>. هل لديك \"تعطيل إضافة إعلان من واجهة الموقع؟\" "
|
7847 |
"محددة في الإعدادات؟"
|
7848 |
|
7849 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7850 |
msgctxt "templates"
|
7851 |
msgid ""
|
7852 |
"Listing submission has been disabled. Contact the administrator for details."
|
7853 |
msgstr ""
|
7854 |
|
7855 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7856 |
msgctxt "templates"
|
7857 |
msgid ""
|
7858 |
"<b>There are no Fee Plans available</b>, without a fee plan site users can't "
|
7859 |
"submit a listing. %s to create a fee plan"
|
7860 |
msgstr ""
|
7861 |
|
7862 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7863 |
msgctxt "templates"
|
7864 |
msgid ""
|
7865 |
"Listing submission is not available at the moment. Contact the administrator "
|
7866 |
"for details."
|
7867 |
msgstr ""
|
7868 |
|
7869 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7870 |
msgctxt "templates"
|
7871 |
msgid ""
|
7872 |
"<b>View not available</b>, there is no \"Category\" association field. %s "
|
@@ -7874,39 +7627,39 @@ msgid ""
|
|
7874 |
"an existing field"
|
7875 |
msgstr ""
|
7876 |
|
7877 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7878 |
msgctxt "templates"
|
7879 |
msgid "Please agree to the Terms and Conditions."
|
7880 |
msgstr "يرجى الموافقة على الشروط والأحكام."
|
7881 |
|
7882 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
7883 |
#, fuzzy
|
7884 |
msgctxt "templates"
|
7885 |
msgid "I agree to the <a>Terms and Conditions</a>"
|
7886 |
msgstr "أوافق على الشروط والأحكام"
|
7887 |
|
7888 |
-
#: includes/functions.php:
|
7889 |
#, fuzzy
|
7890 |
msgctxt "templates"
|
7891 |
msgid "Return to results"
|
7892 |
msgstr "العودة إلى الدليل."
|
7893 |
|
7894 |
-
#: includes/
|
7895 |
-
#, fuzzy
|
7896 |
-
msgctxt "templates"
|
7897 |
-
msgid "Return to fee selection"
|
7898 |
-
msgstr "الرجوع إلى الإعلان."
|
7899 |
-
|
7900 |
-
#: includes/templates-ui.php:223
|
7901 |
msgctxt "templates"
|
7902 |
msgid "No listing categories found."
|
7903 |
msgstr "لم يتم العثور على تصنيفات الإعلانات."
|
7904 |
|
7905 |
-
#: includes/templates-ui.php:374
|
7906 |
msgctxt "templates"
|
7907 |
msgid "Advanced Search"
|
7908 |
msgstr "بحث متقدم"
|
7909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7910 |
#: templates/listing-sticky-tag.tpl.php:11
|
7911 |
#: templates/listing-sticky-tag.tpl.php:12
|
7912 |
msgctxt "templates"
|
@@ -8102,98 +7855,224 @@ msgstr ""
|
|
8102 |
"معرف التجديد الخاص بك غير صالح. يرجى استخدام عنوان URL الذي أعطي لك في رسالة "
|
8103 |
"التجديد بالبريد الإلكتروني."
|
8104 |
|
8105 |
-
#: includes/controllers/pages/class-renew-listing.php:
|
8106 |
#, fuzzy
|
8107 |
msgctxt "renewal"
|
8108 |
msgid "Your listing has been removed from the directory."
|
8109 |
msgstr "تم حذف إعلانك."
|
8110 |
|
8111 |
-
#: includes/controllers/pages/class-renew-listing.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8112 |
#, fuzzy
|
8113 |
-
msgctxt "
|
8114 |
-
msgid "
|
8115 |
-
msgstr "
|
8116 |
|
8117 |
-
#:
|
8118 |
-
|
8119 |
-
|
8120 |
-
|
|
|
8121 |
|
8122 |
-
#:
|
8123 |
#, fuzzy
|
8124 |
-
msgctxt "
|
8125 |
-
msgid "
|
8126 |
-
msgstr "
|
8127 |
|
8128 |
-
#:
|
8129 |
-
|
8130 |
-
|
8131 |
-
|
|
|
|
|
|
|
8132 |
|
8133 |
-
#:
|
8134 |
-
|
8135 |
-
|
8136 |
-
|
|
|
|
|
8137 |
|
8138 |
-
#:
|
8139 |
-
msgctxt "
|
8140 |
-
msgid "
|
8141 |
-
msgstr "
|
8142 |
|
8143 |
-
#:
|
8144 |
#, fuzzy
|
8145 |
-
msgctxt "
|
8146 |
-
msgid ""
|
8147 |
-
"
|
8148 |
-
"from the directory."
|
8149 |
-
msgstr "تم حذف إعلانك."
|
8150 |
|
8151 |
-
#:
|
8152 |
#, fuzzy
|
8153 |
-
msgctxt "
|
8154 |
-
msgid "
|
8155 |
-
msgstr "
|
8156 |
|
8157 |
-
#:
|
8158 |
#, fuzzy
|
8159 |
-
msgctxt "
|
8160 |
-
msgid "
|
8161 |
-
msgstr "
|
8162 |
|
8163 |
-
#:
|
8164 |
-
msgctxt "
|
8165 |
-
msgid "
|
8166 |
msgstr ""
|
8167 |
|
8168 |
-
#: includes/controllers/pages/class-
|
8169 |
-
|
8170 |
-
|
8171 |
-
msgid "Fee \"%s\" renewal."
|
8172 |
-
msgstr "رسوم \"%s\" تجديد التصنيف \"%s\""
|
8173 |
-
|
8174 |
-
#: includes/controllers/pages/class-request-access-keys.php:13
|
8175 |
-
msgctxt "request_access_keys"
|
8176 |
-
msgid "Did you mean to <a>access the Directory</a>?"
|
8177 |
msgstr ""
|
8178 |
|
8179 |
-
#: includes/
|
8180 |
-
msgctxt "request_access_keys"
|
8181 |
-
msgid "Access keys have been sent to your e-mail address."
|
8182 |
-
msgstr "تم إرسال مفاتيح الوصول إلى عنوان بريدك الإلكتروني."
|
8183 |
-
|
8184 |
-
#: includes/controllers/pages/class-request-access-keys.php:44
|
8185 |
-
#, fuzzy
|
8186 |
-
msgctxt "request_access_keys"
|
8187 |
-
msgid "← Return to previous page"
|
8188 |
-
msgstr "العودة إلى الدليل."
|
8189 |
-
|
8190 |
-
#: includes/controllers/pages/class-search.php:42
|
8191 |
#, fuzzy
|
8192 |
-
msgctxt "
|
8193 |
-
msgid "
|
8194 |
-
msgstr "
|
8195 |
|
8196 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
8197 |
msgctxt "listing submit"
|
8198 |
msgid ""
|
8199 |
"Image upload is required, please provide at least one image and submit again."
|
@@ -8281,7 +8160,7 @@ msgctxt "form-fields api"
|
|
8281 |
msgid "Social Site (Twitter handle)"
|
8282 |
msgstr "الموقع الاجتماعي (التعامل مع التغريدات)"
|
8283 |
|
8284 |
-
#: includes/fields/class-form-field.php:
|
8285 |
msgctxt "form-fields api"
|
8286 |
msgid ""
|
8287 |
"This form field can't be deleted because it is required for the plugin to "
|
@@ -8311,22 +8190,22 @@ msgctxt "form-fields-api"
|
|
8311 |
msgid "Invalid form field type"
|
8312 |
msgstr "نوع حقل استمارة غير صحيح"
|
8313 |
|
8314 |
-
#: includes/fields/class-form-field.php:
|
8315 |
msgctxt "form-fields-api"
|
8316 |
msgid "Field label is required."
|
8317 |
msgstr "تسمية الحقل مطلوب."
|
8318 |
|
8319 |
-
#: includes/fields/class-form-field.php:
|
8320 |
msgctxt "form-fields-api"
|
8321 |
msgid "Field label max length is 255 characters."
|
8322 |
msgstr ""
|
8323 |
|
8324 |
-
#: includes/fields/class-form-field.php:
|
8325 |
msgctxt "form-fields-api"
|
8326 |
msgid "Field description max length is 255 characters."
|
8327 |
msgstr ""
|
8328 |
|
8329 |
-
#: includes/fields/class-form-field.php:
|
8330 |
msgctxt "form-fields-api"
|
8331 |
msgid ""
|
8332 |
"You can't change from %2$s field type to the one you wanted--the types are "
|
@@ -8334,31 +8213,31 @@ msgid ""
|
|
8334 |
"delete this current field and create a NEW field of type %1$s instead."
|
8335 |
msgstr ""
|
8336 |
|
8337 |
-
#: includes/fields/class-form-field.php:
|
8338 |
msgctxt "form-fields-api"
|
8339 |
msgid ""
|
8340 |
"<strong>WARNING</strong>: If you delete this field, the data from it in "
|
8341 |
"existing listings will be deleted as well."
|
8342 |
msgstr ""
|
8343 |
|
8344 |
-
#: includes/fields/class-form-field.php:
|
8345 |
msgctxt "form-fields-api"
|
8346 |
msgid ""
|
8347 |
"There can only be one field with association \"%s\". Please select another "
|
8348 |
"association."
|
8349 |
msgstr "يمكن أن يكون هناك حقل واحد مع رابطة \"%s\". المرجو تحديد رابطة أخرى."
|
8350 |
|
8351 |
-
#: includes/fields/class-form-field.php:
|
8352 |
msgctxt "form-fields-api"
|
8353 |
msgid "\"%s\" is an invalid field type for this association."
|
8354 |
msgstr "\"%s\" نوع حقل غير صالح لهذه الرابطة."
|
8355 |
|
8356 |
-
#: includes/fields/class-form-field.php:
|
8357 |
msgctxt "form-fields-api"
|
8358 |
msgid "Invalid field ID"
|
8359 |
msgstr "معرف حقل غير صالح"
|
8360 |
|
8361 |
-
#: includes/fields/class-form-field.php:
|
8362 |
msgctxt "form-fields-api"
|
8363 |
msgid "An error occurred while trying to delete this field."
|
8364 |
msgstr "حدث خطأ أثناء محاولة حذف هذا الحقل."
|
@@ -8490,6 +8369,11 @@ msgctxt "fs helper"
|
|
8490 |
msgid "Destination dir \"%s\" is not writable."
|
8491 |
msgstr "وجهة المجلد \"%s\" غير قابل للكتابة."
|
8492 |
|
|
|
|
|
|
|
|
|
|
|
8493 |
#: includes/helpers/listing_flagging.php:42
|
8494 |
#: includes/helpers/listing_flagging.php:65
|
8495 |
msgctxt "flag listing"
|
@@ -8592,18 +8476,117 @@ msgid ""
|
|
8592 |
"Please update this module to the latest available version."
|
8593 |
msgstr ""
|
8594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8595 |
#: includes/payment.php:61
|
8596 |
#, fuzzy
|
8597 |
msgctxt "payments"
|
8598 |
msgid "Payment #%s"
|
8599 |
msgstr "الدفع #%d"
|
8600 |
|
8601 |
-
#: includes/
|
8602 |
-
msgctxt "templates sort"
|
8603 |
-
msgid "Sort By:"
|
8604 |
-
msgstr "ترتيب حسب:"
|
8605 |
-
|
8606 |
-
#: includes/utils.php:417
|
8607 |
msgctxt "utils"
|
8608 |
msgid ""
|
8609 |
"POSTed data exceeds PHP config. maximum. See \"post_max_size\" directive."
|
@@ -8611,28 +8594,28 @@ msgstr ""
|
|
8611 |
"تجاوزت البيانات التي تم نشرها الحد الأقصى لإعدادات PHP. أنظر توجيه "
|
8612 |
"\"post_max_size\"."
|
8613 |
|
8614 |
-
#: includes/utils.php:
|
8615 |
msgctxt "utils"
|
8616 |
msgid "File type \"%s\" is not allowed"
|
8617 |
msgstr "غير مسموح بنوع الملف \"%s\""
|
8618 |
|
8619 |
-
#: includes/utils.php:
|
8620 |
msgctxt "utils"
|
8621 |
msgid "Unkown error while uploading file."
|
8622 |
msgstr "حدث خطأ مجهول أثناء رفع الملف."
|
8623 |
|
8624 |
-
#: includes/utils.php:
|
8625 |
msgctxt "utils"
|
8626 |
msgid "Uploaded file is not an image"
|
8627 |
msgstr "الملف الذي تم رفعه ليس صورة"
|
8628 |
|
8629 |
-
#: includes/utils.php:
|
8630 |
msgctxt "utils"
|
8631 |
msgid "Error while uploading file"
|
8632 |
msgstr "حدث خطأ أثناء رفع الملف."
|
8633 |
|
8634 |
#: includes/widgets/class-listings-widget.php:45
|
8635 |
-
#: includes/widgets/widget-search.php:
|
8636 |
msgctxt "widgets"
|
8637 |
msgid "Title:"
|
8638 |
msgstr "العنوان:"
|
@@ -8672,92 +8655,92 @@ msgctxt "widgets"
|
|
8672 |
msgid "Leave blank for automatic height."
|
8673 |
msgstr "أترك المساحة فارغة للارتفاع التلقائي."
|
8674 |
|
8675 |
-
#: includes/widgets/widget-featured-listings.php:
|
8676 |
msgctxt "widgets"
|
8677 |
msgid "Business Directory - Featured Listings"
|
8678 |
msgstr "دليل الأعمال - إعلانات مميزة"
|
8679 |
|
8680 |
-
#: includes/widgets/widget-featured-listings.php:
|
8681 |
msgctxt "widgets"
|
8682 |
msgid "Displays a list of the featured/sticky listings in the directory."
|
8683 |
msgstr "عرض قائمة من الإعلانات المميزة/المثبتة في الدليل."
|
8684 |
|
8685 |
-
#: includes/widgets/widget-featured-listings.php:
|
8686 |
msgctxt "widgets"
|
8687 |
msgid "Featured Listings"
|
8688 |
msgstr "إعلانات مميزة"
|
8689 |
|
8690 |
-
#: includes/widgets/widget-featured-listings.php:
|
8691 |
msgctxt "widgets"
|
8692 |
msgid "Display listings in random order"
|
8693 |
msgstr "عرض الإعلانات في ترتيب عشوائي"
|
8694 |
|
8695 |
-
#: includes/widgets/widget-latest-listings.php:
|
8696 |
msgctxt "widgets"
|
8697 |
msgid "Business Directory - Latest Listings"
|
8698 |
msgstr "دليل الأعمال - آخر الإعلانات"
|
8699 |
|
8700 |
-
#: includes/widgets/widget-latest-listings.php:
|
8701 |
msgctxt "widgets"
|
8702 |
msgid "Displays a list of the latest listings in the Business Directory."
|
8703 |
msgstr "عرض قائمة بآخر الإعلانات في الدليل الأعمال."
|
8704 |
|
8705 |
-
#: includes/widgets/widget-latest-listings.php:
|
8706 |
msgctxt "widgets"
|
8707 |
msgid "Latest Listings"
|
8708 |
msgstr "آخر الإعلانات "
|
8709 |
|
8710 |
-
#: includes/widgets/widget-random-listings.php:
|
8711 |
msgctxt "widgets"
|
8712 |
msgid "Business Directory - Random Listings"
|
8713 |
msgstr "دليل الأعمال - إعلانات عشوائية"
|
8714 |
|
8715 |
-
#: includes/widgets/widget-random-listings.php:
|
8716 |
msgctxt "widgets"
|
8717 |
msgid "Displays a list of random listings from the Business Directory."
|
8718 |
msgstr "عرض قائمة من الإعلانات العشوائية من دليل الأعمال"
|
8719 |
|
8720 |
-
#: includes/widgets/widget-random-listings.php:
|
8721 |
msgctxt "widgets"
|
8722 |
msgid "Random Listings"
|
8723 |
msgstr "إعلانات عشوائية"
|
8724 |
|
8725 |
-
#: includes/widgets/widget-search.php:
|
8726 |
msgctxt "widgets"
|
8727 |
msgid "Business Directory - Search"
|
8728 |
msgstr "دليل الأعمال - بحث"
|
8729 |
|
8730 |
-
#: includes/widgets/widget-search.php:
|
8731 |
msgctxt "widgets"
|
8732 |
msgid "Displays a search form to look for Business Directory listings."
|
8733 |
msgstr "عرض نموذج بحث للبحث عن إعلانات دليل الأعمال."
|
8734 |
|
8735 |
-
#: includes/widgets/widget-search.php:
|
8736 |
msgctxt "widgets"
|
8737 |
msgid "Search the Business Directory"
|
8738 |
msgstr "البحث في دليل الأعمال"
|
8739 |
|
8740 |
-
#: includes/widgets/widget-search.php:
|
8741 |
msgctxt "widgets"
|
8742 |
msgid "Form Style:"
|
8743 |
msgstr "شكل النموذج:"
|
8744 |
|
8745 |
-
#: includes/widgets/widget-search.php:
|
8746 |
msgctxt "widgets"
|
8747 |
msgid "Basic"
|
8748 |
msgstr "أساسي"
|
8749 |
|
8750 |
-
#: includes/widgets/widget-search.php:
|
8751 |
msgctxt "widgets"
|
8752 |
msgid "Advanced"
|
8753 |
msgstr "متقدم"
|
8754 |
|
8755 |
-
#: includes/widgets/widget-search.php:
|
8756 |
msgctxt "widgets"
|
8757 |
msgid "Search Fields (advanced mode):"
|
8758 |
msgstr "الحقول البحث (الوضع المتقدم):"
|
8759 |
|
8760 |
-
#: includes/widgets/widget-search.php:
|
8761 |
msgctxt "widgets"
|
8762 |
msgid "Display the following fields in the form."
|
8763 |
msgstr "عرض الحقول التالية في النموذج."
|
@@ -8829,27 +8812,6 @@ msgctxt "admin infometabox"
|
|
8829 |
msgid "Renew listing"
|
8830 |
msgstr "تجديد الإعلان"
|
8831 |
|
8832 |
-
#: templates/admin/sidebar.tpl.php:47
|
8833 |
-
#, fuzzy
|
8834 |
-
msgctxt "admin sidebar"
|
8835 |
-
msgid "If you've found a bug or need support <a>let us know!</a>"
|
8836 |
-
msgstr "إذا كنت قد وجدت خطأ أو بحاجة إلى دعم <a>قم بزيارة المنتديات!</a>"
|
8837 |
-
|
8838 |
-
#: templates/admin/sidebar.tpl.php:52
|
8839 |
-
msgctxt "admin sidebar"
|
8840 |
-
msgid "Full plugin documentation"
|
8841 |
-
msgstr "الوثائق الكاملة المساعدة للإضافة"
|
8842 |
-
|
8843 |
-
#: templates/admin/sidebar.tpl.php:53
|
8844 |
-
msgctxt "admin sidebar"
|
8845 |
-
msgid "Quick Start Guide"
|
8846 |
-
msgstr "دليل بدء التشغيل السريع"
|
8847 |
-
|
8848 |
-
#: templates/admin/sidebar.tpl.php:54
|
8849 |
-
msgctxt "admin sidebar"
|
8850 |
-
msgid "Video Tutorials"
|
8851 |
-
msgstr "دروس الفيديو التعليمية"
|
8852 |
-
|
8853 |
#: templates/admin/themes-delete-confirm.tpl.php:3
|
8854 |
msgctxt "themes admin"
|
8855 |
msgid "Are you sure you want to delete the directory theme \"%s\"?"
|
@@ -9080,7 +9042,7 @@ msgstr ""
|
|
9080 |
"لأنك على خطة الرسوم المتكررة لا تحتاج لتجديد الإعلان الخاص بك الآن لأن ذلك "
|
9081 |
"سيتم معالجته تلقائياً عندما يحين وقت التجديد."
|
9082 |
|
9083 |
-
#: templates/renew-listing-manage-subscription.tpl.php:
|
9084 |
#, fuzzy
|
9085 |
msgctxt "renew"
|
9086 |
msgid ""
|
@@ -9091,7 +9053,7 @@ msgstr ""
|
|
9091 |
"ومع ذلك، إذا كنت ترغب في إلغاء اشتراكك يمكنك عمل ذلك في هذه الصفحة. عندما "
|
9092 |
"يحين وقت التجديد سوف تتمكن من تغيير الإعدادات الخاصة بك مرة أخرى."
|
9093 |
|
9094 |
-
#: templates/renew-listing-manage-subscription.tpl.php:
|
9095 |
#, fuzzy
|
9096 |
msgctxt "renew"
|
9097 |
msgid "Go to Manage Recurring Payments page"
|
@@ -9107,6 +9069,87 @@ msgctxt "send-access-keys"
|
|
9107 |
msgid "Continue"
|
9108 |
msgstr "متابعة"
|
9109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9110 |
#, fuzzy
|
9111 |
#~ msgid ""
|
9112 |
#~ "These are all of the fee plans displayed to the user when they place a "
|
5 |
"Project-Id-Version: Business Directory Plugin v5.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/business-"
|
7 |
"directory-plugin\n"
|
8 |
+
"POT-Creation-Date: 2021-10-28 23:34:58+00:00\n"
|
9 |
"PO-Revision-Date: 2017-01-16 17:47-0500\n"
|
10 |
"Last-Translator: BD Team <support@businessdirectoryplugin.com>\n"
|
11 |
"Language-Team: BD Team <support@businessdirectoryplugin.com>\n"
|
32 |
"payment processor directly."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/admin/class-admin.php:188
|
|
|
|
|
|
|
|
|
|
|
36 |
#, fuzzy
|
37 |
msgid ""
|
38 |
"Find out how to create a compelling, thriving business directory from "
|
42 |
"(مجانا) مكونة من 5 أجزاء (ترسل عبر البريد الإلكتروني). أحصل على وحدة ممتازة "
|
43 |
"(premium module) مجانا بمجرد تسجيلك."
|
44 |
|
45 |
+
#: includes/admin/class-admin.php:197
|
46 |
#, fuzzy
|
47 |
msgid "Want to know the Secrets of Building an Awesome Business Directory?"
|
48 |
msgstr "هل تريد معرفة \"أسرار بناء\" \"دليل أعمال مدهش\"؟"
|
49 |
|
50 |
+
#: includes/admin/class-admin.php:199
|
51 |
#, fuzzy
|
52 |
msgid "Yes, please!"
|
53 |
msgstr "نعم، من فضلك!"
|
54 |
|
55 |
+
#: includes/admin/class-admin.php:201 includes/admin/tracking.php:215
|
56 |
#, fuzzy
|
57 |
msgid "No, thanks"
|
58 |
msgstr "لا، شكرًا"
|
59 |
|
60 |
+
#: includes/admin/class-admin.php:263
|
61 |
#, fuzzy
|
62 |
msgid "Invalid email address."
|
63 |
msgstr "عنوان البريد الإلكتروني غير صالح!"
|
64 |
|
65 |
+
#: includes/admin/class-admin.php:297
|
66 |
#, fuzzy
|
67 |
msgid "Business Directory Admin"
|
68 |
msgstr "مدير دليل الأعمال"
|
69 |
|
70 |
+
#: includes/admin/class-admin.php:298
|
71 |
#: includes/admin/settings/class-settings-bootstrap.php:703
|
72 |
#: includes/admin/settings/class-settings-bootstrap.php:704
|
73 |
+
#: includes/helpers/class-app.php:93
|
74 |
+
#: includes/helpers/functions/templates-ui.php:307
|
75 |
msgid "Directory"
|
76 |
msgstr "الدليل"
|
77 |
|
78 |
+
#: includes/admin/class-admin.php:309 templates/admin/home.tpl.php:65
|
79 |
msgid "Fee Plans"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/admin/class-admin.php:312 templates/admin/home.tpl.php:60
|
83 |
#, fuzzy
|
84 |
msgid "Form Fields"
|
85 |
msgstr "حقول الاستمارة"
|
86 |
|
87 |
+
#: includes/admin/class-admin.php:341 includes/admin/class-admin.php:342
|
88 |
#: includes/licensing.php:220
|
89 |
#, fuzzy
|
90 |
msgid "Modules"
|
91 |
msgstr "(جميع الوحدات)"
|
92 |
|
93 |
+
#: includes/admin/class-admin.php:342
|
94 |
#, fuzzy
|
95 |
msgid "Business Directory"
|
96 |
msgstr "دليل الأعمال"
|
97 |
|
98 |
+
#: includes/admin/class-admin.php:846
|
99 |
#, fuzzy
|
100 |
msgid "Could not send renewal email."
|
101 |
msgstr "إرسال رسالة بريد إلكتروني بخصوص التجديد للعضو"
|
102 |
|
103 |
+
#: includes/admin/class-admin.php:980
|
104 |
#: includes/admin/helpers/tables/class-form-fields-table.php:127
|
105 |
#: includes/admin/helpers/tables/class-payments-table.php:54
|
106 |
#: templates/email/listing-added.tpl.php:7
|
110 |
msgid "ID"
|
111 |
msgstr "المعرف"
|
112 |
|
113 |
+
#: includes/admin/class-admin.php:982 includes/admin/class-admin.php:990
|
114 |
#: includes/admin/settings/class-settings-bootstrap.php:729
|
115 |
#, fuzzy
|
116 |
msgid "Listing Count"
|
117 |
msgstr "عدد الإعلانات"
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
#: includes/admin/class-listing-owner.php:62
|
120 |
#: includes/admin/class-listing-owner.php:89
|
121 |
#, fuzzy
|
183 |
msgid "Are you sure you want to do this?"
|
184 |
msgstr "هل أنت متأكد من أنك تريد عمل هذا؟"
|
185 |
|
186 |
+
#: includes/admin/controllers/class-admin-csv.php:41
|
187 |
+
#: templates/admin/csv-import.tpl.php:312
|
188 |
+
#, fuzzy
|
189 |
+
msgid "Help"
|
190 |
+
msgstr "المساعدة"
|
191 |
+
|
192 |
+
#: includes/admin/controllers/class-admin-fees.php:47
|
193 |
+
#: includes/admin/helpers/tables/class-fees-table.php:62
|
194 |
+
#: includes/admin/helpers/tables/class-payments-table.php:57
|
195 |
+
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:273
|
196 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:73
|
197 |
+
#: templates/admin/payments-details.tpl.php:110
|
198 |
+
#: templates/email/listing-payment-completed.tpl.php:21
|
199 |
+
#: templates/payment/payment_items.tpl.php:5
|
200 |
+
#, fuzzy
|
201 |
+
msgid "Amount"
|
202 |
+
msgstr "القدر"
|
203 |
+
|
204 |
+
#: includes/admin/controllers/class-admin-fees.php:49
|
205 |
+
#: includes/admin/helpers/tables/class-fees-table.php:64
|
206 |
+
#: includes/admin/settings/class-settings-bootstrap.php:919
|
207 |
+
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:275
|
208 |
+
#, fuzzy
|
209 |
+
msgid "Images"
|
210 |
+
msgstr "الصور"
|
211 |
+
|
212 |
#: includes/admin/controllers/class-admin-listings.php:185
|
213 |
+
#: includes/controllers/pages/class-submit-listing.php:504
|
214 |
#: templates/email/listing-reported.tpl.php:7
|
215 |
msgid "Listing Information"
|
216 |
msgstr "معلومات حول الإعلان"
|
243 |
|
244 |
#: includes/admin/controllers/class-admin-listings.php:475
|
245 |
#: includes/class-cpt-integration.php:19
|
246 |
+
#: includes/compatibility/class-navxt-integration.php:204
|
247 |
#: templates/submit-listing.tpl.php:15
|
248 |
msgid "Edit Listing"
|
249 |
msgstr "تحرير الإعلان"
|
253 |
msgid "Delete Listing"
|
254 |
msgstr "حذف الإعلان"
|
255 |
|
256 |
+
#: includes/admin/controllers/class-settings-admin.php:476
|
257 |
+
msgid "Your license key provides access to new features and updates."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: includes/admin/controllers/class-settings-admin.php:478
|
261 |
+
#, fuzzy
|
262 |
+
msgid "You're using Business Directory Plugin Lite. Enjoy!"
|
263 |
+
msgstr "لماذا قمت بحذف إضافة دليل الأعمال؟"
|
264 |
+
|
265 |
+
#: includes/admin/controllers/class-settings-admin.php:536
|
266 |
+
#: includes/admin/helpers/tables/class-fees-table.php:175
|
267 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:104
|
268 |
+
#: templates/admin/metaboxes-listing-flagging-row.tpl.php:19
|
269 |
+
#: templates/admin/payments-note.tpl.php:14
|
270 |
+
#: templates/admin/themes-item.tpl.php:58
|
271 |
+
#: templates/parts/listing-buttons.tpl.php:33
|
272 |
+
#: templates/parts/listing-buttons.tpl.php:67
|
273 |
+
#, fuzzy
|
274 |
+
msgid "Delete"
|
275 |
+
msgstr "حذف"
|
276 |
+
|
277 |
#: includes/admin/controllers/class-themes-admin.php:44
|
278 |
#, fuzzy
|
279 |
msgid "Themes"
|
299 |
msgid "Please upload the correct file type."
|
300 |
msgstr "المرجو رفع أو حدد ملف CSV."
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
#: includes/admin/helpers/class-listing-information-metabox.php:15
|
303 |
#: includes/admin/helpers/tables/class-payments-table.php:53
|
304 |
#: includes/admin/settings/class-settings-bootstrap.php:679
|
345 |
msgid "Upgrade Now"
|
346 |
msgstr "ترقية إلى %s"
|
347 |
|
348 |
+
#: includes/admin/helpers/csv/class-csv-import.php:676
|
349 |
+
#, fuzzy
|
350 |
+
msgid "Listing imported by admin. Payment skipped."
|
351 |
+
msgstr "Poster annonce(paiement initial)"
|
352 |
+
|
353 |
#. translators: %1$s: open link html, %2$s close link
|
354 |
#: includes/admin/helpers/tables/class-fees-table.php:30
|
355 |
#, fuzzy
|
366 |
msgid "Enable"
|
367 |
msgstr "تفعيل"
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
#: includes/admin/helpers/tables/class-fees-table.php:256
|
370 |
#: includes/admin/helpers/tables/class-fees-table.php:258
|
371 |
#, fuzzy
|
373 |
msgstr "معطل"
|
374 |
|
375 |
#: includes/admin/helpers/tables/class-fees-table.php:264
|
376 |
+
#: includes/helpers/functions/templates-ui.php:431
|
377 |
#, fuzzy
|
378 |
msgid "Default"
|
379 |
msgstr "رسوم افتراضية"
|
401 |
"الأعمال للقيام بذلك نيابة عنك تلقائياً."
|
402 |
|
403 |
#: includes/admin/helpers/tables/class-form-fields-table.php:222
|
404 |
+
#: includes/controllers/pages/class-submit-listing.php:834
|
405 |
#, fuzzy
|
406 |
msgid "Go to \"Form Fields\""
|
407 |
msgstr "إنتقل إلى \"إدارة حقول\""
|
408 |
|
409 |
#: includes/admin/helpers/tables/class-form-fields-table.php:313
|
410 |
+
#: includes/helpers/functions/general.php:1358
|
411 |
+
#: includes/helpers/functions/general.php:1363
|
412 |
msgid "Go back"
|
413 |
msgstr ""
|
414 |
|
422 |
msgstr "العنوان"
|
423 |
|
424 |
#: includes/admin/helpers/tables/class-form-fields-table.php:524
|
425 |
+
#: templates/admin/fees-form.tpl.php:219
|
426 |
#: templates/email/listing-added.tpl.php:21
|
427 |
#: templates/email/listing-edited.tpl.php:29
|
428 |
#, fuzzy
|
532 |
msgid "Missing tables: %s"
|
533 |
msgstr "الجداول المفقودة: %s"
|
534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
#: includes/admin/settings/class-settings-bootstrap.php:13
|
536 |
+
#: includes/controllers/pages/class-submit-listing.php:1237
|
537 |
#: includes/form-fields.php:428 templates/admin/payments-details.tpl.php:137
|
538 |
#: templates/listing-contactform.tpl.php:33
|
539 |
#: templates/listing-flagging-form.tpl.php:39
|
562 |
msgstr ""
|
563 |
|
564 |
#: includes/admin/settings/class-settings-bootstrap.php:255
|
565 |
+
#: includes/class-assets.php:328
|
566 |
#: includes/fields/class-fieldtypes-textarea.php:200
|
567 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
568 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
582 |
|
583 |
#: includes/admin/settings/class-settings-bootstrap.php:264
|
584 |
#: includes/admin/settings/class-settings-bootstrap.php:278
|
585 |
+
#: includes/controllers/pages/class-submit-listing.php:517
|
586 |
#, fuzzy
|
587 |
msgid "Terms and Conditions"
|
588 |
msgstr "شروط وأحكام"
|
805 |
#: templates/email/listing-added.tpl.php:13
|
806 |
#: templates/email/listing-edited.tpl.php:19
|
807 |
#: templates/email/listing-reported.tpl.php:13
|
808 |
+
#: templates/email-access-keys.tpl.php:6
|
809 |
#, fuzzy
|
810 |
msgid "URL"
|
811 |
msgstr "رابط URL"
|
886 |
msgid "Uninstall"
|
887 |
msgstr "حذف"
|
888 |
|
889 |
+
#: includes/admin/settings/class-settings.php:515
|
890 |
msgid "%s cannot include spaces, commas, or &"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: includes/admin/tracking.php:222
|
894 |
#, fuzzy
|
895 |
msgid "Allow Tracking"
|
896 |
msgstr "السماح بالتتبع"
|
990 |
msgid "Status: %s"
|
991 |
msgstr "الحالة"
|
992 |
|
993 |
+
#: includes/admin/views/review.php:17
|
994 |
+
#, fuzzy
|
995 |
+
msgid "Are you enjoying Business Directory Plugin?"
|
996 |
+
msgstr "لماذا قمت بحذف إضافة دليل الأعمال؟"
|
997 |
+
|
998 |
+
#: includes/admin/views/review.php:20
|
999 |
+
#, fuzzy
|
1000 |
+
msgid "Not Really"
|
1001 |
+
msgstr "غير منصب"
|
1002 |
+
|
1003 |
+
#: includes/admin/views/review.php:23
|
1004 |
+
msgid "Yes!"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/admin/views/review.php:27
|
1008 |
+
msgid ""
|
1009 |
+
"Awesome! Could you do me a BIG favor and give Business Directory Plugin a "
|
1010 |
+
"review to help me grow my little business and boost our motivation?"
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: includes/admin/views/review.php:29
|
1014 |
+
#, fuzzy
|
1015 |
+
msgid "Co-Founder and CTO of Business Directory Plugin"
|
1016 |
+
msgstr "Business Directory Plugin"
|
1017 |
+
|
1018 |
+
#: includes/admin/views/review.php:32
|
1019 |
+
msgid "No thanks, maybe later"
|
1020 |
+
msgstr ""
|
1021 |
+
|
1022 |
+
#: includes/admin/views/review.php:35
|
1023 |
+
msgid "Ok, you deserve it"
|
1024 |
+
msgstr ""
|
1025 |
+
|
1026 |
+
#: includes/admin/views/review.php:39
|
1027 |
+
msgid "I already did"
|
1028 |
+
msgstr ""
|
1029 |
+
|
1030 |
+
#: includes/admin/views/review.php:43
|
1031 |
+
msgid ""
|
1032 |
+
"Sorry to hear you aren't enjoying building with Business Directory Plugin. "
|
1033 |
+
"We would love a chance to improve. Could you take a minute and let us know "
|
1034 |
+
"what we can do better?"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: includes/class-assets.php:326
|
1038 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:86
|
1039 |
#, fuzzy
|
1040 |
msgid "Never"
|
1041 |
msgstr "أبداً"
|
1042 |
|
1043 |
+
#: includes/class-assets.php:327
|
1044 |
#: includes/fields/class-fieldtypes-textarea.php:201
|
1045 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
1046 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
1048 |
msgid "Yes"
|
1049 |
msgstr "نعم"
|
1050 |
|
1051 |
+
#: includes/class-assets.php:337
|
1052 |
#, fuzzy
|
1053 |
msgid ""
|
1054 |
"Preview is only available after you've saved the first draft. This is due to "
|
1065 |
msgid "View Listing"
|
1066 |
msgstr "عرض الإعلان"
|
1067 |
|
1068 |
+
#: includes/class-cpt-integration.php:22
|
1069 |
+
#: includes/helpers/functions/templates-ui.php:369
|
1070 |
#: templates/main-box.tpl.php:23
|
1071 |
msgid "Search Listings"
|
1072 |
msgstr "البحث في الإعلانات"
|
1166 |
|
1167 |
#: includes/class-meta.php:155
|
1168 |
#: includes/controllers/pages/class-submit-listing.php:32
|
1169 |
+
#: includes/helpers/functions/templates-ui.php:329
|
1170 |
+
#: templates/submit-listing.tpl.php:17
|
1171 |
#, fuzzy
|
1172 |
msgid "Add Listing"
|
1173 |
msgstr "إضافة رسوم الإعلان"
|
1174 |
|
1175 |
#: includes/class-meta.php:165
|
1176 |
#: includes/controllers/pages/class-all-listings.php:6
|
1177 |
+
#: includes/helpers/functions/templates-ui.php:316
|
1178 |
msgid "View All Listings"
|
1179 |
msgstr "مشاهدة جميع الإعلانات"
|
1180 |
|
1186 |
"to %1$sFee Plans%2$s to add or edit your fee plan(s)."
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: includes/class-wpbdp.php:360
|
1190 |
#, fuzzy
|
1191 |
msgid "Upgrade to Premium"
|
1192 |
msgstr "ترقية إلى %s"
|
1193 |
|
1194 |
+
#: includes/class-wpbdp.php:363
|
1195 |
#, fuzzy
|
1196 |
msgid "Settings"
|
1197 |
msgstr "إعدادات"
|
1198 |
|
1199 |
+
#: includes/class-wpbdp.php:567
|
1200 |
#, fuzzy
|
1201 |
msgid "Could not find listing ID"
|
1202 |
msgstr "لا يمكن الاتصال بخادم الترخيص"
|
1203 |
|
1204 |
+
#: includes/class-wpbdp.php:574
|
1205 |
msgid ""
|
1206 |
"Could not verify the image upload request. If problem persists contact site "
|
1207 |
"admin."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: includes/class-wpbdp.php:581 includes/fields/class-fieldtypes-image.php:322
|
1211 |
#, fuzzy
|
1212 |
msgid "Could not find image ID"
|
1213 |
msgstr "تعذر تحديث القالب : %s"
|
1214 |
|
1215 |
+
#: includes/class-wpbdp.php:613
|
1216 |
#, fuzzy
|
1217 |
msgid ""
|
1218 |
"The directory features are disabled at this time because a <a>manual "
|
1221 |
"تم تعطيل ميزات دليل الأعمال حاليا بسبب أن الإضافة تحتاج إلى إجراء ترقية "
|
1222 |
"يدوية قبل المتابعة."
|
1223 |
|
1224 |
+
#: includes/class-wpbdp.php:620
|
1225 |
msgid ""
|
1226 |
"The directory is not available at this time. Please try again in a few "
|
1227 |
"minutes or contact the administrator if the problem persists."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
+
#: includes/compatibility/class-navxt-integration.php:208
|
1231 |
+
#: includes/widgets/widget-search.php:126
|
1232 |
#: templates/admin/payments-index.tpl.php:13
|
1233 |
#: templates/deprecated/search.tpl.php:8 templates/search-form.tpl.php:27
|
1234 |
#: templates/search.tpl.php:5
|
1392 |
"Il s'agit seulement d'une pré-visualisation. L'annonce n'a pas encore été "
|
1393 |
"publiée."
|
1394 |
|
1395 |
+
#: includes/controllers/pages/class-submit-listing.php:550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1396 |
#, fuzzy
|
1397 |
msgid "Listing Images"
|
1398 |
msgstr "صور الإعلانات"
|
1399 |
|
1400 |
+
#: includes/controllers/pages/class-submit-listing.php:618
|
1401 |
msgid "Account Creation"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: includes/controllers/pages/class-submit-listing.php:817
|
1405 |
#, fuzzy
|
1406 |
msgid "Go to \"Fee Plans\""
|
1407 |
msgstr "إنتقل إلى \"إدارة حقول\""
|
1408 |
|
1409 |
+
#: includes/controllers/pages/class-submit-listing.php:873
|
1410 |
#, fuzzy
|
1411 |
msgid "Please choose a fee plan."
|
1412 |
msgstr "المرجو تحديد خيار رسوم التصنيف \"%s\"."
|
1413 |
|
1414 |
+
#: includes/controllers/pages/class-submit-listing.php:1058
|
1415 |
msgid "Please check the form for errors, correct them and submit again."
|
1416 |
msgstr ""
|
1417 |
|
1418 |
+
#: includes/controllers/pages/class-submit-listing.php:1221
|
1419 |
msgid "Create a user account on this site"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
+
#: includes/controllers/pages/class-submit-listing.php:1228
|
1423 |
#, fuzzy
|
1424 |
msgid "Username"
|
1425 |
msgstr "عضو"
|
1426 |
|
1427 |
+
#: includes/controllers/pages/class-submit-listing.php:1250
|
1428 |
#, fuzzy
|
1429 |
msgid "Clear Form"
|
1430 |
msgstr "مسح"
|
1730 |
msgid "%s is badly formatted. Valid Phone Number format required."
|
1731 |
msgstr "%s مهيأ بشكل سيئ. المطلوب تنسيق بريد إلكتروني صالح."
|
1732 |
|
|
|
|
|
|
|
|
|
1733 |
#: includes/gateways/class-gateway-authorize-net.php:358
|
1734 |
msgid ""
|
1735 |
"An error occurred while trying to cancel your subscription. Please try again "
|
1742 |
"%s. You can try again later or cancel subscription from gateway dashboard."
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: includes/helpers/class-authenticated-listing-view.php:14
|
1746 |
+
#, fuzzy
|
1747 |
+
msgid "Select"
|
1748 |
+
msgstr "قائمة منسدلة"
|
1749 |
+
|
1750 |
+
#: includes/helpers/class-authenticated-listing-view.php:17
|
1751 |
+
#, fuzzy
|
1752 |
+
msgid "Selected"
|
1753 |
+
msgstr "قائمة منسدلة"
|
1754 |
+
|
1755 |
+
#: includes/helpers/functions/general.php:565
|
1756 |
+
#: templates/admin/fees-index.tpl.php:67
|
1757 |
+
msgid "Free"
|
1758 |
+
msgstr "مجاني"
|
1759 |
+
|
1760 |
+
#: includes/helpers/functions/listings.php:80
|
1761 |
+
#, fuzzy
|
1762 |
+
msgid "Untitled Listing"
|
1763 |
+
msgstr "تحرير الإعلان"
|
1764 |
+
|
1765 |
+
#: includes/helpers/functions/templates-ui.php:323
|
1766 |
+
#, fuzzy
|
1767 |
+
msgid "Manage Listings"
|
1768 |
+
msgstr "إدارة الإعلانات المدفوعة"
|
1769 |
+
|
1770 |
#. translators: %1%s: opening <a> tag, %2$s: closing </a> tag
|
1771 |
#: includes/licensing.php:143
|
1772 |
msgid ""
|
1890 |
msgid "Please enter a license key."
|
1891 |
msgstr "يرجى إدخال بريد إلكتروني صحيح."
|
1892 |
|
1893 |
+
#. translators: %s: User name, %2$d: number of entries
|
1894 |
+
#: includes/models/class-reviews.php:129
|
1895 |
+
msgid "Congratulations %1$s! You have collected %2$d listings."
|
1896 |
+
msgstr ""
|
1897 |
|
1898 |
#: includes/payment.php:34
|
1899 |
msgid "We couldn't find a payment associated with the given subscription."
|
1916 |
msgid "Print Receipt"
|
1917 |
msgstr ""
|
1918 |
|
1919 |
+
#: includes/payment.php:180
|
1920 |
#, fuzzy
|
1921 |
msgid "Pending Abandonment"
|
1922 |
msgstr "في انتظار التخلي"
|
1923 |
|
1924 |
+
#: includes/payment.php:187
|
1925 |
#, fuzzy
|
1926 |
msgid "Abandoned"
|
1927 |
msgstr "متخلى عنه"
|
1928 |
|
1929 |
+
#: includes/themes.php:952
|
|
|
|
|
|
|
|
|
|
|
1930 |
#, fuzzy
|
1931 |
msgid "ZIP file is not a valid Business Directory theme file."
|
1932 |
msgstr "ملف الضغط ZIP ليس ملف قالب دليل الأعمال صالح."
|
1933 |
|
1934 |
+
#: includes/utils.php:470
|
1935 |
#, fuzzy
|
1936 |
msgid "File size (%1$s) exceeds maximum file size of %2$s"
|
1937 |
msgstr "حجم الملف (%s) يتجاوز الحجم الأقصى للملف %s"
|
1938 |
|
1939 |
+
#: includes/utils.php:479
|
1940 |
#, fuzzy
|
1941 |
msgid "File size (%1$s) is smaller than the minimum file size of %2$s"
|
1942 |
msgstr "حجم الملف (%s) أقل من الحد الأدنى المطلوب لحجم الملف لـ %s"
|
1943 |
|
1944 |
+
#: includes/utils.php:537
|
1945 |
#, fuzzy
|
1946 |
msgid "Image width (%1$s px) is smaller than the minimum width of %2$s px."
|
1947 |
msgstr "عرض الصورة (%s px) هو أكبر من الحد الأقصى للعرض المسموح به لـ %s px "
|
1948 |
|
1949 |
+
#: includes/utils.php:545
|
1950 |
#, fuzzy
|
1951 |
msgid "Image height (%1$s px) is smaller than the minimum height of %2$s px."
|
1952 |
msgstr ""
|
1953 |
"ارتفاع الصورة (%s px) هو أكبر من الحد الأقصى للارتفاع المطلوب لـ %s px "
|
1954 |
|
1955 |
+
#: includes/utils.php:553
|
1956 |
#, fuzzy
|
1957 |
msgid "Image width (%1$s px) is greater than maximum width of %2$s px."
|
1958 |
msgstr "عرض الصورة (%s px) هو أكبر من الحد الأقصى للعرض المسموح به لـ %s px "
|
1959 |
|
1960 |
+
#: includes/utils.php:561
|
1961 |
#, fuzzy
|
1962 |
msgid "Image height (%1$s px) is greater than maximum height of %2$s px."
|
1963 |
msgstr ""
|
2154 |
msgid "Download Debug Information"
|
2155 |
msgstr "تحميل معلومات التصحيح"
|
2156 |
|
2157 |
+
#: templates/admin/fees-add-fee.tpl.php:4 templates/admin/fees-form.tpl.php:245
|
2158 |
#, fuzzy
|
2159 |
msgid "Add Listing Fee"
|
2160 |
msgstr "إضافة رسوم الإعلان"
|
2207 |
msgid "Should the listing auto-renew at the end of the listing term?"
|
2208 |
msgstr ""
|
2209 |
|
2210 |
+
#: templates/admin/fees-form.tpl.php:109
|
2211 |
+
msgid "Make listings on this plan featured (sticky)?"
|
2212 |
+
msgstr ""
|
|
|
2213 |
|
2214 |
+
#: templates/admin/fees-form.tpl.php:121
|
2215 |
#, fuzzy
|
2216 |
msgid ""
|
2217 |
"This floats the listing to the top of search results and browsing the "
|
2220 |
"هذا يظهر الإعلان أعلى نتائج البحث وأثناء تصفح الدليل عندما يشتري العضو هذه "
|
2221 |
"الخطة."
|
2222 |
|
2223 |
+
#: templates/admin/fees-form.tpl.php:127
|
2224 |
msgid "Listing background color:"
|
2225 |
msgstr ""
|
2226 |
|
2227 |
+
#: templates/admin/fees-form.tpl.php:133
|
2228 |
msgid "Used to differentiate listings inside this plan from others."
|
2229 |
msgstr ""
|
2230 |
|
2231 |
+
#: templates/admin/fees-form.tpl.php:245
|
2232 |
#: templates/admin/settings-email.tpl.php:104
|
2233 |
#: templates/submit-listing-section.tpl.php:30
|
2234 |
#, fuzzy
|
2350 |
msgstr "إدارة الإعلانات المدفوعة"
|
2351 |
|
2352 |
#: templates/admin/metaboxes-listing-information-other.tpl.php:3
|
2353 |
+
#: templates/email-access-keys.tpl.php:5 templates/login.tpl.php:69
|
2354 |
#: templates/login.tpl.php:71
|
2355 |
#, fuzzy
|
2356 |
msgid "Access Key"
|
2600 |
msgid "Your existing listings will NOT be deleted doing this."
|
2601 |
msgstr ""
|
2602 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2603 |
#: templates/admin/sidebar.tpl.php:7
|
2604 |
+
msgid "Need help?"
|
2605 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2606 |
|
2607 |
#: templates/admin/sidebar.tpl.php:13
|
2608 |
+
msgid "Let us know!"
|
2609 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
2610 |
|
2611 |
#: templates/admin/sidebar.tpl.php:18
|
2612 |
#, fuzzy
|
2613 |
+
msgid "Plugin documentation"
|
2614 |
+
msgstr "الوثائق الكاملة المساعدة للإضافة"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2615 |
|
2616 |
+
#: templates/admin/sidebar.tpl.php:23
|
2617 |
#, fuzzy
|
2618 |
+
msgid "Quick Start Guide"
|
2619 |
+
msgstr "دليل بدء التشغيل السريع"
|
2620 |
|
2621 |
+
#: templates/admin/sidebar.tpl.php:28
|
2622 |
#, fuzzy
|
2623 |
+
msgid "Video Tutorials"
|
2624 |
+
msgstr "دروس الفيديو التعليمية"
|
|
|
|
|
|
|
|
|
2625 |
|
2626 |
#: templates/admin/themes-delete-confirm.tpl.php:1
|
2627 |
#: templates/admin/themes-delete-confirm.tpl.php:13
|
3163 |
msgid "Find A Listing"
|
3164 |
msgstr "العثور على إعلان"
|
3165 |
|
3166 |
+
#: includes/admin/class-admin.php:190
|
3167 |
+
msgctxt "drip pointer"
|
3168 |
+
msgid "Email Address:"
|
3169 |
+
msgstr "عنوان البريد الإلكتروني:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3170 |
|
3171 |
+
#: includes/admin/class-admin.php:222
|
3172 |
+
msgctxt "admin"
|
3173 |
+
msgid "Business Directory"
|
3174 |
+
msgstr "دليل الأعمال"
|
3175 |
|
3176 |
+
#: includes/admin/class-admin.php:237
|
3177 |
+
msgctxt "admin"
|
3178 |
+
msgid "You're all set. Visit your new <a>Business Directory</a> page."
|
3179 |
+
msgstr "أنت مستعد. قم بزيارة صفحة <a>دليل الأعمال</a> الجديدة."
|
3180 |
|
3181 |
+
#: includes/admin/class-admin.php:412
|
3182 |
+
msgctxt "admin"
|
3183 |
+
msgid "Untitled Menu"
|
3184 |
msgstr ""
|
3185 |
|
3186 |
+
#: includes/admin/class-admin.php:720
|
3187 |
+
msgctxt "admin"
|
3188 |
+
msgid "Dismiss this notice."
|
3189 |
+
msgstr "إخفاء هذا التنبيه."
|
|
|
|
|
|
|
|
|
|
|
3190 |
|
3191 |
+
#: includes/admin/class-admin.php:784 includes/admin/class-admin.php:794
|
3192 |
+
#, fuzzy
|
3193 |
+
msgctxt "admin"
|
3194 |
+
msgid "The listing has been updated."
|
3195 |
+
msgid_plural "The listings have been updated."
|
3196 |
+
msgstr[0] "تمت ترقية الإعلان."
|
3197 |
+
msgstr[1] "تمت ترقية الإعلان."
|
3198 |
+
msgstr[2] "تمت ترقية الإعلانين."
|
3199 |
+
msgstr[3] "تمت ترقية الإعلانات."
|
3200 |
+
msgstr[4] "تمت ترقية الإعلانات."
|
3201 |
+
msgstr[5] "تمت ترقية الإعلانات."
|
3202 |
+
|
3203 |
+
#: includes/admin/class-admin.php:820
|
3204 |
+
msgctxt "admin"
|
3205 |
+
msgid "The fee was successfully assigned."
|
3206 |
+
msgstr "تم تعيين الرسوم بنجاح."
|
3207 |
+
|
3208 |
+
#: includes/admin/class-admin.php:830
|
3209 |
+
msgctxt "admin"
|
3210 |
+
msgid "Listing was renewed."
|
3211 |
+
msgid_plural "Listings were renewed."
|
3212 |
+
msgstr[0] "تم تجديد الإعلان."
|
3213 |
+
msgstr[1] "تم تجديد الإعلان."
|
3214 |
+
msgstr[2] "تم تجديد الإعلانين."
|
3215 |
+
msgstr[3] "تم تجديد الإعلانات."
|
3216 |
+
msgstr[4] "تم تجديد الإعلانات."
|
3217 |
+
msgstr[5] "تم تجديد الإعلانات."
|
3218 |
+
|
3219 |
+
#: includes/admin/class-admin.php:842
|
3220 |
+
msgctxt "admin"
|
3221 |
+
msgid "Renewal email sent."
|
3222 |
+
msgstr "تم إرسال بريد التجديد."
|
3223 |
+
|
3224 |
+
#: includes/admin/class-admin.php:855
|
3225 |
+
#, fuzzy
|
3226 |
+
msgctxt "admin"
|
3227 |
+
msgid "Listing report deleted."
|
3228 |
+
msgid_plural "Listing reports deleted."
|
3229 |
+
msgstr[0] "إنتهاء صلاحية الإعلان"
|
3230 |
+
msgstr[1] "إنتهاء صلاحية الإعلان"
|
3231 |
+
msgstr[2] "إنتهاء صلاحية الإعلان"
|
3232 |
+
msgstr[3] "إنتهاء صلاحية الإعلان"
|
3233 |
+
msgstr[4] "إنتهاء صلاحية الإعلان"
|
3234 |
+
msgstr[5] "إنتهاء صلاحية الإعلان"
|
3235 |
+
|
3236 |
+
#: includes/admin/class-admin.php:904
|
3237 |
+
#, fuzzy
|
3238 |
+
msgctxt "admin"
|
3239 |
+
msgid "Access keys sent."
|
3240 |
+
msgstr "مفتاح الوصول"
|
3241 |
+
|
3242 |
+
#: includes/admin/class-admin.php:906
|
3243 |
+
msgctxt "admin"
|
3244 |
+
msgid "The access keys couldn't be sent."
|
3245 |
+
msgstr ""
|
3246 |
+
|
3247 |
+
#: includes/admin/class-admin.php:1063
|
3248 |
+
msgctxt "admin"
|
3249 |
+
msgid ""
|
3250 |
+
"<b>Business Directory Plugin</b> requires a page with the "
|
3251 |
+
"<tt>[businessdirectory]</tt> shortcode to function properly."
|
3252 |
+
msgstr ""
|
3253 |
+
"<b>إضافة دليل الأعمال</b> تتطلب صفحة فيها الكود القصير "
|
3254 |
+
"<tt>[businessdirectory]</tt> لكي تعمل بشكل صحيح."
|
3255 |
+
|
3256 |
+
#: includes/admin/class-admin.php:1065
|
3257 |
+
msgctxt "admin"
|
3258 |
+
msgid ""
|
3259 |
+
"You can create this page by yourself or let Business Directory do this for "
|
3260 |
+
"you automatically."
|
3261 |
+
msgstr ""
|
3262 |
+
"يمكنك إنشاء هذه الصفحة بنفسك أو ترك دليل الأعمال القيام بذلك نيابة عنك "
|
3263 |
+
"تلقائياً."
|
3264 |
+
|
3265 |
+
#: includes/admin/class-admin.php:1070
|
3266 |
+
msgctxt "admin"
|
3267 |
+
msgid "Create required pages for me"
|
3268 |
+
msgstr "إنشاء الصفحات المطلوب نيابة عني"
|
3269 |
+
|
3270 |
+
#: includes/admin/class-admin.php:1123
|
3271 |
+
msgctxt "admin"
|
3272 |
+
msgid ""
|
3273 |
+
"<strong>Business Directory Plugin</strong> requires <strong>PHP 5.6</strong> "
|
3274 |
+
"or later, but your server is running version <strong>%s</strong>. Please ask "
|
3275 |
+
"your provider to upgrade in order to prevent any issues with the plugin."
|
3276 |
+
msgstr ""
|
3277 |
+
|
3278 |
+
#: includes/admin/class-admin.php:1147
|
3279 |
+
#, fuzzy
|
3280 |
+
msgctxt "admin"
|
3281 |
+
msgid ""
|
3282 |
+
"We noticed you want your Business Directory users to register before posting "
|
3283 |
+
"listings, but Registration for your site is currently disabled. Go [here] "
|
3284 |
+
"and check \"Anyone can register\"."
|
3285 |
+
msgstr ""
|
3286 |
+
"لاحظنا أنك تريد من أعضاء دليل الأعمال التسجيل قبل نشر الإعلانات، ولكنك حاليا "
|
3287 |
+
"تعطل التسجيل في موقعك. إذهب [هنا] واختر \"السماح بالتسجيل\" لجعل دليل "
|
3288 |
+
"الأعمال يعمل بشكل صحيح."
|
3289 |
+
|
3290 |
+
#: includes/admin/class-listing-fields-metabox.php:24
|
3291 |
+
#, fuzzy
|
3292 |
+
msgctxt "admin"
|
3293 |
+
msgid "Fields"
|
3294 |
+
msgstr "حقل"
|
3295 |
+
|
3296 |
+
#: includes/admin/class-listing-fields-metabox.php:26
|
3297 |
+
#, fuzzy
|
3298 |
+
msgctxt "admin"
|
3299 |
+
msgid "Images (%s)"
|
3300 |
+
msgstr "الصور"
|
3301 |
+
|
3302 |
+
#: includes/admin/class-listing-fields-metabox.php:27
|
3303 |
+
#, fuzzy
|
3304 |
+
msgctxt "admin"
|
3305 |
+
msgid "Images"
|
3306 |
+
msgstr "الصور"
|
3307 |
+
|
3308 |
+
#: includes/admin/controllers/class-admin-listings.php:201
|
3309 |
+
#, fuzzy
|
3310 |
+
msgctxt "admin"
|
3311 |
+
msgid "Directory Listing Fields / Images"
|
3312 |
+
msgstr "حقول / صور الإعلان"
|
3313 |
+
|
3314 |
+
#: includes/admin/controllers/class-admin-listings.php:265
|
3315 |
+
msgctxt "admin"
|
3316 |
+
msgid "Categories"
|
3317 |
+
msgstr "التصنيفات"
|
3318 |
+
|
3319 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:211
|
3320 |
+
msgctxt "admin"
|
3321 |
+
msgid ""
|
3322 |
+
"<b>Business Directory Plugin</b> requires fields with the following "
|
3323 |
+
"associations in order to work correctly: <b>%s</b>."
|
3324 |
+
msgstr ""
|
3325 |
+
"<b>إضافة دليل الأعمال</b> تتطلب حقول مع المرتبطات التالية بالترتيب لكي تعمل "
|
3326 |
+
"بشكل صحيح: <b>%s</b>."
|
3327 |
+
|
3328 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:213
|
3329 |
+
msgctxt "admin"
|
3330 |
+
msgid ""
|
3331 |
+
"<b>Business Directory Plugin</b> requires a field with a <b>%s</b> "
|
3332 |
+
"association in order to work correctly."
|
3333 |
+
msgstr ""
|
3334 |
+
"<b>إضافة دليل الأعمال</b> تتطلب حقل مع <b>%s</b> المرتبطات التالية بالترتيب "
|
3335 |
+
"لكي تعمل بشكل صحيح."
|
3336 |
+
|
3337 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:227
|
3338 |
+
msgctxt "admin"
|
3339 |
+
msgid "Create these required fields for me"
|
3340 |
+
msgstr "إنشاء هذه الحقول المطلوبة نيابة عني"
|
3341 |
+
|
3342 |
+
#: includes/admin/class-admin.php:316
|
3343 |
+
#, fuzzy
|
3344 |
+
msgctxt "admin menu"
|
3345 |
+
msgid "Payment History"
|
3346 |
+
msgstr "سجل المدفوعات"
|
3347 |
+
|
3348 |
+
#: includes/admin/class-admin.php:319
|
3349 |
+
#, fuzzy
|
3350 |
+
msgctxt "admin menu"
|
3351 |
+
msgid "Import & Export"
|
3352 |
+
msgstr "استيراد CSV"
|
3353 |
+
|
3354 |
+
#: includes/admin/class-admin.php:322
|
3355 |
+
msgctxt "admin menu"
|
3356 |
+
msgid "Debug"
|
3357 |
+
msgstr "تصحيح الأخطاء"
|
3358 |
+
|
3359 |
+
#: includes/admin/controllers/class-settings-admin.php:45
|
3360 |
+
#, fuzzy
|
3361 |
+
msgctxt "admin menu"
|
3362 |
+
msgid "Settings"
|
3363 |
+
msgstr "إعدادات"
|
3364 |
+
|
3365 |
+
#: includes/admin/class-listings-with-no-fee-plan-view.php:58
|
3366 |
+
msgctxt "listings view"
|
3367 |
+
msgid "No Fee Plan"
|
3368 |
+
msgstr ""
|
3369 |
+
|
3370 |
+
#: includes/admin/controllers/class-admin-controller.php:84
|
3371 |
+
msgctxt "admin confirm"
|
3372 |
+
msgid "No, go back"
|
3373 |
+
msgstr ""
|
3374 |
+
|
3375 |
+
#: includes/admin/controllers/class-admin-controller.php:85
|
3376 |
+
msgctxt "admin confirm"
|
3377 |
+
msgid "Yes, I'm sure"
|
3378 |
+
msgstr ""
|
3379 |
+
|
3380 |
+
#: includes/admin/controllers/class-admin-csv.php:40
|
3381 |
+
msgctxt "admin csv-import"
|
3382 |
+
msgid "See an example CSV import file"
|
3383 |
+
msgstr "مشاهدة مثال لملف استيراد CSV"
|
3384 |
|
3385 |
#: includes/admin/csv-import.php:177
|
3386 |
msgctxt "admin csv-import"
|
3416 |
msgid "Import is in \"test mode\". Nothing will be inserted into the database."
|
3417 |
msgstr "الاستيراد في \"وضع الاختبار\". لن يتم إدراج أي شيء في قاعدة البيانات."
|
3418 |
|
3419 |
+
#: includes/admin/helpers/csv/class-csv-import.php:533
|
3420 |
+
msgctxt "admin csv-import"
|
3421 |
+
msgid ""
|
3422 |
+
"Could not create listing category \"<category-name>\". The operation failed "
|
3423 |
+
"with the following error: <error-message>."
|
3424 |
+
msgstr ""
|
3425 |
+
|
3426 |
+
#: includes/admin/helpers/csv/class-csv-import.php:539
|
3427 |
+
msgctxt "admin csv-import"
|
3428 |
+
msgid "Could not create listing category \"%s\""
|
3429 |
+
msgstr "لا يمكن إنشاء تصنيف الإعلان \"%s\""
|
3430 |
+
|
3431 |
+
#: includes/admin/helpers/csv/class-csv-import.php:730
|
3432 |
+
msgctxt "admin csv-import"
|
3433 |
+
msgid "Username \"%s\" does not exist"
|
3434 |
+
msgstr "إسم المستخدم \"%s\" غير موجود"
|
3435 |
+
|
3436 |
+
#: includes/admin/helpers/csv/class-csv-import.php:757
|
3437 |
+
msgctxt "admin csv-import"
|
3438 |
+
msgid "There is no Fee Plan with ID = <fee-id>"
|
3439 |
+
msgstr ""
|
3440 |
+
|
3441 |
+
#: includes/admin/helpers/csv/class-csv-import.php:788
|
3442 |
+
msgctxt "admin csv-import"
|
3443 |
+
msgid "Missing required field: %s"
|
3444 |
+
msgstr "حقل مطلوب مفقود: %s"
|
3445 |
+
|
3446 |
+
#: includes/admin/helpers/csv/class-csv-import.php:833
|
3447 |
+
msgctxt "admin csv-import"
|
3448 |
+
msgid "Listing category \"%s\" does not exist"
|
3449 |
+
msgstr "تصنيف الإعلان \"%s\" غير موجود"
|
3450 |
+
|
3451 |
+
#: includes/admin/helpers/csv/class-csv-import.php:904
|
3452 |
+
msgctxt "admin csv-import"
|
3453 |
+
msgid "The string <string> couldn't be converted into a valid date."
|
3454 |
+
msgstr ""
|
3455 |
+
|
3456 |
#: templates/admin/csv-import-progress.tpl.php:5
|
3457 |
msgctxt "admin csv-import"
|
3458 |
msgid "A fatal error occurred during the import. The reason given was: \"%s\"."
|
3678 |
"تاريخ انتهاء صلاحية الإعلان بهذا التنسيق YYYY-MM-dd. \"استخدام\" هذا العمود "
|
3679 |
"عند إضافة أو تحديث الإعلانات من مصادر خارجية."
|
3680 |
|
3681 |
+
#: includes/admin/controllers/class-admin-csv.php:47
|
3682 |
#, fuzzy
|
3683 |
msgctxt "admin csv"
|
3684 |
msgid "Import"
|
3685 |
msgstr "استيراد CSV"
|
3686 |
|
3687 |
+
#: includes/admin/controllers/class-admin-csv.php:48
|
3688 |
#, fuzzy
|
3689 |
msgctxt "admin csv"
|
3690 |
msgid "Export"
|
3691 |
msgstr "تصدير CSV"
|
3692 |
|
3693 |
+
#: includes/admin/controllers/class-admin-fees.php:46
|
3694 |
+
msgctxt "fees order"
|
3695 |
+
msgid "Label"
|
3696 |
+
msgstr "التسمية"
|
3697 |
|
3698 |
+
#: includes/admin/controllers/class-admin-fees.php:48
|
3699 |
+
msgctxt "fees order"
|
3700 |
+
msgid "Duration"
|
3701 |
+
msgstr "المدة"
|
3702 |
|
3703 |
+
#: includes/admin/controllers/class-admin-fees.php:50
|
3704 |
+
msgctxt "fees order"
|
3705 |
+
msgid "Custom Order"
|
3706 |
+
msgstr "ترتيب مخصص"
|
3707 |
|
3708 |
+
#: includes/admin/controllers/class-admin-fees.php:110
|
3709 |
+
#, fuzzy
|
3710 |
+
msgctxt "fees admin"
|
3711 |
+
msgid "Fee plan added."
|
3712 |
+
msgstr "الرسوم حدثت."
|
3713 |
|
3714 |
+
#: includes/admin/controllers/class-admin-fees.php:112
|
3715 |
+
#, fuzzy
|
3716 |
+
msgctxt "fees admin"
|
3717 |
+
msgid "Fee plan updated."
|
3718 |
+
msgstr "الرسوم حدثت."
|
3719 |
|
3720 |
+
#: includes/admin/controllers/class-admin-fees.php:171
|
3721 |
#, fuzzy
|
3722 |
+
msgctxt "fees admin"
|
3723 |
+
msgid "Fee \"%s\" deleted."
|
3724 |
+
msgstr "الرسوم حذفت."
|
|
|
|
|
|
|
|
|
|
|
|
|
3725 |
|
3726 |
+
#: includes/admin/controllers/class-admin-fees.php:183
|
3727 |
+
msgctxt "fees admin"
|
3728 |
+
msgid "Fee disabled."
|
3729 |
+
msgstr "رسوم معطلة."
|
3730 |
|
3731 |
+
#: includes/admin/helpers/tables/class-fees-table.php:20
|
3732 |
+
msgctxt "fees admin"
|
3733 |
+
msgid "fee"
|
3734 |
+
msgstr "الرسم"
|
|
|
|
|
|
|
|
|
|
|
|
|
3735 |
|
3736 |
+
#: includes/admin/helpers/tables/class-fees-table.php:21
|
3737 |
+
msgctxt "fees admin"
|
3738 |
+
msgid "fees"
|
3739 |
+
msgstr "الرسوم"
|
3740 |
|
3741 |
+
#: includes/admin/helpers/tables/class-fees-table.php:61
|
3742 |
+
msgctxt "fees admin"
|
3743 |
+
msgid "Label"
|
3744 |
+
msgstr "التسمية"
|
3745 |
+
|
3746 |
+
#: includes/admin/helpers/tables/class-fees-table.php:63
|
3747 |
+
msgctxt "fees admin"
|
3748 |
+
msgid "Duration"
|
3749 |
+
msgstr "المدة"
|
|
|
|
|
3750 |
|
3751 |
+
#: includes/admin/helpers/tables/class-fees-table.php:65
|
3752 |
#, fuzzy
|
3753 |
+
msgctxt "fees admin"
|
3754 |
+
msgid "Attributes"
|
3755 |
+
msgstr "سمات الحقل"
|
3756 |
|
3757 |
+
#: includes/admin/helpers/tables/class-fees-table.php:138
|
3758 |
+
msgctxt "fees admin"
|
3759 |
+
msgid "Edit"
|
3760 |
+
msgstr "تحرير"
|
3761 |
|
3762 |
+
#: includes/admin/helpers/tables/class-fees-table.php:185
|
3763 |
+
msgctxt "fees admin"
|
3764 |
+
msgid "<strong>Fee ID:</strong> <fee-id>"
|
|
|
|
|
3765 |
msgstr ""
|
|
|
|
|
3766 |
|
3767 |
+
#: includes/admin/helpers/tables/class-fees-table.php:209
|
3768 |
+
#, fuzzy
|
3769 |
+
msgctxt "fees admin"
|
3770 |
+
msgid "Variable"
|
3771 |
+
msgstr "تعطيل"
|
|
|
|
|
|
|
3772 |
|
3773 |
+
#: includes/admin/helpers/tables/class-fees-table.php:214
|
3774 |
+
#, fuzzy
|
3775 |
+
msgctxt "fees admin"
|
3776 |
+
msgid "%1$s + %2$s per category"
|
3777 |
+
msgstr "Frais \"%s\" pour catégorie \"%s\""
|
3778 |
|
3779 |
+
#: includes/admin/helpers/tables/class-fees-table.php:222
|
3780 |
+
msgctxt "fees admin"
|
3781 |
+
msgid "Forever"
|
3782 |
+
msgstr "دائما"
|
|
|
|
|
|
|
3783 |
|
3784 |
+
#: includes/admin/helpers/tables/class-fees-table.php:224
|
3785 |
+
msgctxt "fees admin"
|
3786 |
+
msgid "%d day"
|
3787 |
+
msgid_plural "%d days"
|
3788 |
+
msgstr[0] "%d يوم"
|
3789 |
+
msgstr[1] "%d يوم"
|
3790 |
+
msgstr[2] "%d يومين"
|
3791 |
+
msgstr[3] "%d أيام"
|
3792 |
+
msgstr[4] "%d يوم"
|
3793 |
+
msgstr[5] "%d يوم"
|
3794 |
+
|
3795 |
+
#: includes/admin/helpers/tables/class-fees-table.php:228
|
3796 |
+
msgctxt "fees admin"
|
3797 |
+
msgid "%d image"
|
3798 |
+
msgid_plural "%d images"
|
3799 |
+
msgstr[0] "%d صورة"
|
3800 |
+
msgstr[1] "%d صورتين"
|
3801 |
+
msgstr[2] "%d صور"
|
3802 |
+
msgstr[3] "%d صور"
|
3803 |
+
msgstr[4] "%d صور"
|
3804 |
+
msgstr[5] "%d صور"
|
3805 |
+
|
3806 |
+
#: includes/admin/helpers/tables/class-fees-table.php:233
|
3807 |
+
msgctxt "fees admin"
|
3808 |
+
msgid "All categories"
|
3809 |
+
msgstr "جميع التصنيفات"
|
3810 |
+
|
3811 |
+
#: includes/admin/helpers/tables/class-fees-table.php:268
|
3812 |
+
msgctxt "fees admin"
|
3813 |
+
msgid "Sticky"
|
3814 |
msgstr ""
|
|
|
|
|
|
|
3815 |
|
3816 |
+
#: includes/admin/helpers/tables/class-fees-table.php:272
|
3817 |
#, fuzzy
|
3818 |
+
msgctxt "fees admin"
|
3819 |
+
msgid "Recurring"
|
3820 |
+
msgstr "(متكرر)"
|
3821 |
|
3822 |
+
#: includes/admin/helpers/tables/class-fees-table.php:276
|
3823 |
#, fuzzy
|
3824 |
+
msgctxt "fees admin"
|
3825 |
+
msgid "Private"
|
3826 |
+
msgstr "قم بالتفعيل"
|
3827 |
|
3828 |
+
#: includes/admin/helpers/tables/class-payments-table.php:55
|
3829 |
#, fuzzy
|
3830 |
+
msgctxt "fees admin"
|
3831 |
+
msgid "Date"
|
3832 |
+
msgstr "Date"
|
3833 |
|
3834 |
+
#: includes/admin/helpers/tables/class-payments-table.php:56
|
3835 |
#, fuzzy
|
3836 |
+
msgctxt "fees admin"
|
3837 |
+
msgid "Payment History"
|
3838 |
+
msgstr "سجل المدفوعات"
|
3839 |
|
3840 |
+
#: includes/admin/helpers/tables/class-payments-table.php:58
|
3841 |
+
msgctxt "fees admin"
|
3842 |
+
msgid "Status"
|
3843 |
+
msgstr "الحالة"
|
3844 |
|
3845 |
+
#: templates/admin/fees-form.tpl.php:138
|
3846 |
+
msgctxt "fees admin"
|
3847 |
+
msgid "Plan Category Policy:"
|
|
|
|
|
3848 |
msgstr ""
|
|
|
|
|
3849 |
|
3850 |
+
#: templates/admin/fees-form.tpl.php:143
|
3851 |
+
#, fuzzy
|
3852 |
+
msgctxt "fees admin"
|
3853 |
+
msgid "Plan applies to all categories"
|
3854 |
+
msgstr "تجديد قائمة في جميع فئات منتهية الصلاحية"
|
3855 |
+
|
3856 |
+
#: templates/admin/fees-form.tpl.php:144
|
3857 |
+
msgctxt "fees admin"
|
3858 |
+
msgid "Plan applies to only certain categories"
|
3859 |
msgstr ""
|
|
|
|
|
3860 |
|
3861 |
+
#: templates/admin/fees-form.tpl.php:148
|
3862 |
+
#, fuzzy
|
3863 |
+
msgctxt "fees admin"
|
3864 |
+
msgid "Limit plan to the following categories:"
|
3865 |
+
msgstr "يمكنك استخدام العناصر النائبة التالية:"
|
3866 |
+
|
3867 |
+
#: templates/admin/fees-form.tpl.php:172
|
3868 |
+
msgctxt "fees admin"
|
3869 |
+
msgid "Click to add categories to the selection."
|
3870 |
+
msgstr ""
|
3871 |
|
3872 |
+
#: templates/admin/fees-form.tpl.php:186
|
3873 |
#, fuzzy
|
3874 |
+
msgctxt "fees admin"
|
3875 |
+
msgid "Pricing"
|
3876 |
+
msgstr "السعر"
|
3877 |
+
|
3878 |
+
#: templates/admin/fees-form.tpl.php:194
|
3879 |
+
msgctxt "fees admin"
|
3880 |
+
msgid "Pricing model"
|
3881 |
+
msgstr ""
|
3882 |
+
|
3883 |
+
#: templates/admin/fees-form.tpl.php:198
|
3884 |
+
msgctxt "fees admin"
|
3885 |
+
msgid "Flat price"
|
3886 |
+
msgstr ""
|
3887 |
|
3888 |
+
#: templates/admin/fees-form.tpl.php:199
|
3889 |
#, fuzzy
|
3890 |
+
msgctxt "fees admin"
|
3891 |
+
msgid "Different price for different categories"
|
3892 |
+
msgstr "ترتيب فرز التصنيفات"
|
3893 |
|
3894 |
+
#: templates/admin/fees-form.tpl.php:200
|
3895 |
+
msgctxt "fees admin"
|
3896 |
+
msgid "Base price plus an extra amount per category"
|
3897 |
+
msgstr ""
|
3898 |
|
3899 |
+
#: templates/admin/fees-form.tpl.php:206
|
3900 |
#, fuzzy
|
3901 |
+
msgctxt "fees admin"
|
3902 |
+
msgid "Fee Price"
|
3903 |
+
msgstr "السعر"
|
3904 |
|
3905 |
+
#: templates/admin/fees-form.tpl.php:214
|
3906 |
+
#, fuzzy
|
3907 |
+
msgctxt "fees admin"
|
3908 |
+
msgid "Prices per category"
|
3909 |
+
msgstr "إزالة التصنيف"
|
3910 |
|
3911 |
+
#: templates/admin/fees-form.tpl.php:220
|
3912 |
+
#, fuzzy
|
3913 |
+
msgctxt "fees admin"
|
3914 |
+
msgid "Price"
|
3915 |
+
msgstr "السعر"
|
3916 |
|
3917 |
+
#: templates/admin/fees-form.tpl.php:234
|
3918 |
+
msgctxt "fees admin"
|
3919 |
+
msgid "Extra amount (per category)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3920 |
msgstr ""
|
3921 |
|
3922 |
#: includes/admin/controllers/class-admin-listings.php:60
|
4009 |
msgid "Reported"
|
4010 |
msgstr ""
|
4011 |
|
4012 |
+
#: includes/models/class-listing.php:920
|
4013 |
msgctxt "listing status"
|
4014 |
msgid "Unknown"
|
4015 |
msgstr ""
|
4016 |
|
4017 |
+
#: includes/models/class-listing.php:921
|
4018 |
msgctxt "listing status"
|
4019 |
msgid "Legacy"
|
4020 |
msgstr ""
|
4021 |
|
4022 |
+
#: includes/models/class-listing.php:922
|
4023 |
#, fuzzy
|
4024 |
msgctxt "listing status"
|
4025 |
msgid "Incomplete"
|
4026 |
msgstr "إكتمل"
|
4027 |
|
4028 |
+
#: includes/models/class-listing.php:923
|
4029 |
#, fuzzy
|
4030 |
msgctxt "listing status"
|
4031 |
msgid "Pending Payment"
|
4032 |
msgstr "في انتظار التخلي"
|
4033 |
|
4034 |
+
#: includes/models/class-listing.php:924
|
4035 |
#, fuzzy
|
4036 |
msgctxt "listing status"
|
4037 |
msgid "Complete"
|
4038 |
msgstr "إكتمل"
|
4039 |
|
4040 |
+
#: includes/models/class-listing.php:925
|
4041 |
#, fuzzy
|
4042 |
msgctxt "listing status"
|
4043 |
msgid "Pending Upgrade"
|
4044 |
msgstr " في انتظار الترقية"
|
4045 |
|
4046 |
+
#: includes/models/class-listing.php:926
|
4047 |
#, fuzzy
|
4048 |
msgctxt "listing status"
|
4049 |
msgid "Expired"
|
4050 |
msgstr "منتهي الصلاحية"
|
4051 |
|
4052 |
+
#: includes/models/class-listing.php:927
|
4053 |
#, fuzzy
|
4054 |
msgctxt "listing status"
|
4055 |
msgid "Pending Renewal"
|
4056 |
msgstr "مفعل + ريثما يتم التجديد"
|
4057 |
|
4058 |
+
#: includes/models/class-listing.php:928
|
4059 |
#, fuzzy
|
4060 |
msgctxt "listing status"
|
4061 |
msgid "Abandoned"
|
4108 |
msgid "Send access keys"
|
4109 |
msgstr "مفتاح الوصول"
|
4110 |
|
4111 |
+
#: includes/admin/controllers/class-admin-payments.php:19
|
4112 |
+
#, fuzzy
|
4113 |
+
msgctxt "payments admin"
|
4114 |
+
msgid "Payment deleted."
|
4115 |
+
msgstr "المدفوعات ذات الصلة"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4116 |
|
4117 |
+
#: includes/admin/controllers/class-admin-payments.php:37
|
4118 |
+
msgctxt "payments admin"
|
4119 |
msgid ""
|
4120 |
+
"You're seeing payments related to listing: \"%1$s\" (ID #%2$d). <a>Click "
|
4121 |
+
"here</a> to see all payments."
|
4122 |
msgstr ""
|
|
|
|
|
4123 |
|
4124 |
+
#: includes/admin/controllers/class-admin-payments.php:56
|
4125 |
+
#, fuzzy
|
4126 |
+
msgctxt "payments admin"
|
4127 |
+
msgid "Payment details updated."
|
4128 |
+
msgstr "تفاصيل الدفع"
|
4129 |
|
4130 |
+
#: includes/admin/helpers/tables/class-payments-table.php:12
|
4131 |
+
#, fuzzy
|
4132 |
+
msgctxt "payments admin"
|
4133 |
+
msgid "payment"
|
4134 |
+
msgstr "الدفع"
|
4135 |
|
4136 |
+
#: includes/admin/helpers/tables/class-payments-table.php:13
|
|
|
|
|
|
|
|
|
|
|
4137 |
#, fuzzy
|
4138 |
+
msgctxt "payments admin"
|
4139 |
+
msgid "payments"
|
4140 |
+
msgstr "الدفع"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4141 |
|
4142 |
+
#: includes/admin/helpers/tables/class-payments-table.php:19
|
4143 |
#, fuzzy
|
4144 |
+
msgctxt "payments admin"
|
4145 |
+
msgid "No payments found."
|
4146 |
+
msgstr "لم يتم العثور على أي إعلانات."
|
4147 |
|
4148 |
+
#: includes/admin/helpers/tables/class-payments-table.php:32
|
4149 |
+
#, fuzzy
|
4150 |
+
msgctxt "payments admin"
|
4151 |
+
msgid "All"
|
4152 |
+
msgstr "الكل"
|
4153 |
|
4154 |
+
#: includes/admin/helpers/tables/class-payments-table.php:124
|
4155 |
+
#, fuzzy
|
4156 |
+
msgctxt "payments admin"
|
4157 |
+
msgid "View Payment History"
|
4158 |
+
msgstr "سجل المدفوعات"
|
4159 |
|
4160 |
+
#: includes/admin/controllers/class-settings-admin.php:371
|
4161 |
+
#, fuzzy
|
4162 |
+
msgctxt "admin settings"
|
4163 |
+
msgid "Remove"
|
4164 |
+
msgstr "إزالة"
|
4165 |
|
4166 |
+
#: includes/admin/controllers/class-settings-admin.php:433
|
4167 |
+
msgctxt "admin settings"
|
4168 |
+
msgid "Valid placeholders: %s"
|
4169 |
+
msgstr "العناصر النائبة صالحة: %s"
|
4170 |
|
4171 |
+
#: includes/admin/settings/class-settings-bootstrap.php:101
|
4172 |
+
msgctxt "admin settings"
|
4173 |
+
msgid ""
|
4174 |
+
"<strong>IMPORTANT:</strong> subpages of the main directory page cannot be "
|
4175 |
+
"accesed while this setting is checked."
|
4176 |
+
msgstr ""
|
4177 |
|
4178 |
+
#: includes/admin/settings/class-settings-bootstrap.php:310
|
4179 |
+
msgctxt "admin settings"
|
4180 |
+
msgid "Above results"
|
4181 |
+
msgstr "أعلى النتائج"
|
4182 |
|
4183 |
+
#: includes/admin/settings/class-settings-bootstrap.php:311
|
4184 |
+
msgctxt "admin settings"
|
4185 |
+
msgid "Below results"
|
4186 |
+
msgstr "أسفل النتائج"
|
4187 |
|
4188 |
+
#: includes/admin/settings/class-settings-bootstrap.php:312
|
4189 |
+
msgctxt "admin settings"
|
4190 |
+
msgid "Don't show with results"
|
4191 |
+
msgstr "لا تظهر مع النتائج"
|
4192 |
|
4193 |
+
#: includes/admin/settings/class-settings-bootstrap.php:402
|
4194 |
+
msgctxt "admin settings"
|
|
|
4195 |
msgid ""
|
4196 |
+
"You have selected a textarea field to be included in quick searches. "
|
4197 |
+
"Searches involving those fields are very expensive and could result in "
|
4198 |
+
"timeouts and/or general slowness."
|
4199 |
msgstr ""
|
4200 |
+
"لقد حددت حقل إدراج نص ليتم تضمينها في عمليات البحث السريعة. عمليات البحث "
|
4201 |
+
"التي تنطوي على تلك الحقول تتطلب موارد كثيرة ويمكن أن تؤدي الى انتهاء المهلة "
|
4202 |
+
"و/ أو البطء العام."
|
|
|
|
|
|
|
|
|
|
|
4203 |
|
4204 |
+
#: includes/admin/settings/class-settings-bootstrap.php:574
|
4205 |
+
msgctxt "admin settings"
|
4206 |
+
msgid "Do not include comments in listings"
|
4207 |
+
msgstr "يتضمن نموذج التعليق على صفحات الإعلانات؟"
|
4208 |
|
4209 |
+
#: includes/admin/settings/class-settings-bootstrap.php:598
|
4210 |
+
#, fuzzy
|
4211 |
+
msgctxt "admin settings"
|
4212 |
+
msgid "Directory view."
|
4213 |
+
msgstr "الدليل"
|
4214 |
|
4215 |
+
#: includes/admin/settings/class-settings-bootstrap.php:599
|
4216 |
#, fuzzy
|
4217 |
+
msgctxt "admin settings"
|
4218 |
+
msgid "All Listings view."
|
4219 |
+
msgstr "مشاهدة جميع الإعلانات"
|
4220 |
|
4221 |
+
#: includes/admin/settings/class-settings-bootstrap.php:600
|
4222 |
#, fuzzy
|
4223 |
+
msgctxt "admin settings"
|
4224 |
+
msgid "Category view."
|
4225 |
+
msgstr "التصنيفات"
|
4226 |
|
4227 |
+
#: includes/admin/settings/class-settings-bootstrap.php:601
|
4228 |
#, fuzzy
|
4229 |
+
msgctxt "admin settings"
|
4230 |
+
msgid "Search view."
|
4231 |
+
msgstr "بحث"
|
4232 |
|
4233 |
+
#: includes/admin/settings/class-settings-bootstrap.php:728
|
4234 |
+
msgctxt "admin settings"
|
4235 |
+
msgid "Slug"
|
4236 |
+
msgstr "رابط لطيف"
|
4237 |
|
4238 |
+
#: includes/admin/settings/class-settings-bootstrap.php:741
|
4239 |
+
#: includes/admin/settings/class-settings-bootstrap.php:809
|
4240 |
+
msgctxt "admin settings"
|
4241 |
+
msgid "Ascending"
|
4242 |
+
msgstr "تصاعدي"
|
4243 |
|
4244 |
+
#: includes/admin/settings/class-settings-bootstrap.php:742
|
4245 |
+
#: includes/admin/settings/class-settings-bootstrap.php:810
|
4246 |
+
msgctxt "admin settings"
|
4247 |
+
msgid "Descending"
|
4248 |
+
msgstr "تنازلي"
|
4249 |
|
4250 |
+
#: includes/admin/settings/class-settings-bootstrap.php:775
|
4251 |
+
msgctxt "admin settings"
|
4252 |
+
msgid "Fee Plan Custom Order can be changed under <a>Fee Plans</a>"
|
4253 |
+
msgstr ""
|
4254 |
|
4255 |
+
#: includes/admin/settings/class-settings-bootstrap.php:788
|
4256 |
+
msgctxt "admin settings"
|
4257 |
+
msgid "Author"
|
4258 |
+
msgstr "الكاتب"
|
4259 |
|
4260 |
+
#: includes/admin/settings/class-settings-bootstrap.php:789
|
4261 |
+
#: includes/helpers/functions/general.php:1276
|
4262 |
+
msgctxt "admin settings"
|
4263 |
+
msgid "Date posted"
|
4264 |
+
msgstr "تاريخ النشر"
|
4265 |
|
4266 |
+
#: includes/admin/settings/class-settings-bootstrap.php:790
|
4267 |
+
#: includes/helpers/functions/general.php:1277
|
4268 |
+
msgctxt "admin settings"
|
4269 |
+
msgid "Date last modified"
|
4270 |
+
msgstr "تاريخ آخر تعديل"
|
4271 |
|
4272 |
+
#: includes/admin/settings/class-settings-bootstrap.php:791
|
4273 |
+
msgctxt "admin settings"
|
4274 |
+
msgid "Random"
|
4275 |
+
msgstr "عشوائية"
|
4276 |
|
4277 |
+
#: includes/admin/settings/class-settings-bootstrap.php:792
|
4278 |
+
msgctxt "admin settings"
|
4279 |
+
msgid "Paid first then free. Inside each group by date."
|
4280 |
+
msgstr "تدفع أولاً ثم مجاناً. داخل كل مجموعة حسب التاريخ."
|
|
|
4281 |
|
4282 |
+
#: includes/admin/settings/class-settings-bootstrap.php:793
|
4283 |
+
msgctxt "admin settings"
|
4284 |
+
msgid "Paid first then free. Inside each group by title."
|
4285 |
+
msgstr "تدفع أولاً ثم مجاناً. داخل كل مجموعة بعنوان."
|
|
|
4286 |
|
4287 |
+
#: includes/admin/settings/class-settings-bootstrap.php:794
|
4288 |
+
msgctxt "admin settings"
|
4289 |
+
msgid "Fee Plan Custom Order, then Date"
|
4290 |
+
msgstr ""
|
4291 |
|
4292 |
+
#: includes/admin/settings/class-settings-bootstrap.php:795
|
4293 |
+
msgctxt "admin settings"
|
4294 |
+
msgid "Fee Plan Custom Order, then Title"
|
4295 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4296 |
|
4297 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1061
|
4298 |
+
msgctxt "admin settings"
|
4299 |
+
msgid ""
|
4300 |
+
"For paid listing images, configure that by adding or editing a <a>Fee Plan</"
|
4301 |
+
"a> instead of this setting, which is ignored for paid listings."
|
4302 |
msgstr ""
|
4303 |
+
"بالنسبة لصور الإعلانات المدفوعة، قم بإعدادها بإضافة أو تحرير <a>رسوم الخطة</"
|
4304 |
+
"a> بدلاً من هذا الإعداد، الذي هو تجاهل الإعلانات المدفوعة."
|
4305 |
|
4306 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1072
|
4307 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1134
|
4308 |
#, fuzzy
|
4309 |
+
msgctxt "admin settings"
|
4310 |
+
msgid "Excerpt view."
|
4311 |
+
msgstr "مقتطف"
|
4312 |
|
4313 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1073
|
4314 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1135
|
4315 |
#, fuzzy
|
4316 |
+
msgctxt "admin settings"
|
4317 |
+
msgid "Detail view."
|
4318 |
+
msgstr "الدليل"
|
4319 |
|
4320 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1183
|
4321 |
+
msgctxt "admin settings"
|
4322 |
+
msgid "Australian Dollar (AUD)"
|
4323 |
+
msgstr "الدولار الأسترالي (AUD)"
|
|
|
4324 |
|
4325 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1184
|
4326 |
+
msgctxt "admin settings"
|
4327 |
+
msgid "Brazilian Real (BRL)"
|
4328 |
+
msgstr "الريال البرازيلي (BRL)"
|
|
|
4329 |
|
4330 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1185
|
4331 |
+
msgctxt "admin settings"
|
4332 |
+
msgid "Canadian Dollar (CAD)"
|
4333 |
+
msgstr "الدولار الكندي (CAD)"
|
4334 |
|
4335 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1186
|
4336 |
+
msgctxt "admin settings"
|
4337 |
+
msgid "Czech Koruna (CZK)"
|
4338 |
+
msgstr "الكورونا التشيكية (CZK)"
|
4339 |
|
4340 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1187
|
4341 |
+
msgctxt "admin settings"
|
4342 |
+
msgid "Danish Krone (DKK)"
|
4343 |
+
msgstr "الكرونة الدانماركية (DKK)"
|
|
|
4344 |
|
4345 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1188
|
4346 |
+
msgctxt "admin settings"
|
4347 |
+
msgid "United Arab Emirates Dirham (AED)"
|
4348 |
msgstr ""
|
4349 |
|
4350 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1189
|
4351 |
+
msgctxt "admin settings"
|
4352 |
+
msgid "Euro (EUR)"
|
4353 |
+
msgstr "اليورو (EUR)"
|
|
|
|
|
|
|
|
|
|
|
|
|
4354 |
|
4355 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1190
|
4356 |
+
msgctxt "admin settings"
|
4357 |
+
msgid "Hong Kong Dollar (HKD)"
|
4358 |
+
msgstr "دولار هونج كونج (HKD)"
|
|
|
4359 |
|
4360 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1191
|
4361 |
+
msgctxt "admin settings"
|
4362 |
+
msgid "Hungarian Forint (HUF)"
|
4363 |
+
msgstr "الفورنت الهنغاري (HUF)"
|
4364 |
|
4365 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1192
|
4366 |
+
msgctxt "admin settings"
|
4367 |
+
msgid "Israeli New Shequel (ILS)"
|
4368 |
+
msgstr "الشكيل الإسرائيلي الجديد (ILS)"
|
4369 |
|
4370 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1193
|
4371 |
+
msgctxt "admin settings"
|
4372 |
+
msgid "Japanese Yen (JPY)"
|
4373 |
+
msgstr "الين الياباني (JPY)"
|
|
|
4374 |
|
4375 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1194
|
4376 |
+
msgctxt "admin settings"
|
4377 |
+
msgid "Moroccan Dirham (MAD)"
|
4378 |
msgstr ""
|
4379 |
|
4380 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1195
|
4381 |
+
msgctxt "admin settings"
|
4382 |
+
msgid "Malasian Ringgit (MYR)"
|
4383 |
+
msgstr "الرينغيت الماليزي (MYR)"
|
|
|
4384 |
|
4385 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1196
|
4386 |
+
msgctxt "admin settings"
|
4387 |
+
msgid "Mexican Peso (MXN)"
|
4388 |
+
msgstr "بيزو مكسيكي (MXN)"
|
|
|
4389 |
|
4390 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1197
|
4391 |
+
msgctxt "admin settings"
|
4392 |
+
msgid "Norwegian Krone (NOK)"
|
4393 |
+
msgstr "الكرون النرويجي (NOK)"
|
|
|
4394 |
|
4395 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1198
|
4396 |
+
msgctxt "admin settings"
|
4397 |
+
msgid "New Zealand Dollar (NZD)"
|
4398 |
+
msgstr "الدولار النيوزيلندي (NZD)"
|
4399 |
|
4400 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1199
|
4401 |
+
msgctxt "admin settings"
|
4402 |
+
msgid "Philippine Peso (PHP)"
|
4403 |
+
msgstr "بيزو فلبيني (PHP)"
|
|
|
4404 |
|
4405 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1200
|
4406 |
+
msgctxt "admin settings"
|
4407 |
+
msgid "Polish Zloty (PLN)"
|
4408 |
+
msgstr "الزلوتي البولندي (PLN)"
|
|
|
4409 |
|
4410 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1201
|
4411 |
+
msgctxt "admin settings"
|
4412 |
+
msgid "Pound Sterling (GBP)"
|
4413 |
+
msgstr "الجنيه الإسترليني (GBP)"
|
|
|
4414 |
|
4415 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1202
|
4416 |
+
msgctxt "admin settings"
|
4417 |
+
msgid "Singapore Dollar (SGD)"
|
4418 |
+
msgstr "دولار سنغافوري (SGD)"
|
|
|
4419 |
|
4420 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1203
|
4421 |
+
msgctxt "admin settings"
|
4422 |
+
msgid "Swedish Krona (SEK)"
|
4423 |
+
msgstr "الكرونا السويدية (SEK)"
|
|
|
4424 |
|
4425 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1204
|
4426 |
+
msgctxt "admin settings"
|
4427 |
+
msgid "Swiss Franc (CHF)"
|
4428 |
+
msgstr "الفرنك السويسري (CHF)"
|
|
|
4429 |
|
4430 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1205
|
4431 |
+
msgctxt "admin settings"
|
4432 |
+
msgid "Taiwan Dollar (TWD)"
|
4433 |
+
msgstr "الدولار التايواني (TWD)"
|
|
|
|
|
4434 |
|
4435 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1206
|
4436 |
+
msgctxt "admin settings"
|
4437 |
+
msgid "Thai Baht (THB)"
|
4438 |
+
msgstr "البات التايلندي (THB)"
|
|
|
4439 |
|
4440 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1207
|
4441 |
+
msgctxt "admin settings"
|
4442 |
+
msgid "Turkish Lira (TRY)"
|
4443 |
+
msgstr "الليرة التركية (TRY)"
|
|
|
|
|
|
|
|
|
|
|
|
|
4444 |
|
4445 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1208
|
4446 |
+
msgctxt "admin settings"
|
4447 |
+
msgid "U.S. Dollar (USD)"
|
4448 |
+
msgstr "الدولار الأمريكي (USD)"
|
4449 |
|
4450 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1232
|
4451 |
+
msgctxt "admin settings"
|
4452 |
+
msgid "Show currency symbol on the left"
|
4453 |
+
msgstr "إظهار رمز العملة على اليسار"
|
|
|
|
|
|
|
4454 |
|
4455 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1233
|
4456 |
+
msgctxt "admin settings"
|
4457 |
+
msgid "Show currency symbol on the right"
|
4458 |
+
msgstr "إظهار رمز العملة على اليمين"
|
|
|
|
|
|
|
4459 |
|
4460 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1234
|
4461 |
+
msgctxt "admin settings"
|
4462 |
+
msgid "Do not show currency symbol"
|
4463 |
+
msgstr "عدم إظهار رمز العملة"
|
|
|
4464 |
|
4465 |
+
#. translators: %1$s: gateway name, %2$s: explanation string
|
4466 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1282
|
4467 |
+
msgctxt "admin settings"
|
4468 |
+
msgid "AED currency is not supported by %1$s. %2$s"
|
4469 |
+
msgstr ""
|
4470 |
|
4471 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1321
|
4472 |
#, fuzzy
|
4473 |
+
msgctxt "admin settings"
|
4474 |
+
msgid ""
|
4475 |
+
"Listings with pending payments are marked as abandoned after this time. You "
|
4476 |
+
"can also <a>customize the email</a> users receive."
|
4477 |
+
msgstr ""
|
4478 |
+
"الإعلانات مع الدفعات المعلقة تعد متخلى عنها بعد هذا الوقت. يمكنك أيضا "
|
4479 |
+
"<a>تخصيص البريد الإلكتروني</a> الذي يتلقاه الأعضاء."
|
4480 |
|
4481 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1351
|
4482 |
+
msgctxt "admin settings"
|
4483 |
+
msgid "Try listing's email field first, then author's email."
|
4484 |
+
msgstr "جرب البريد الإلكتروني للإعلانات أولاً، ثم البريد الإلكتروني للكاتب."
|
|
|
4485 |
|
4486 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1352
|
4487 |
+
msgctxt "admin settings"
|
4488 |
+
msgid "Try author's email first and then listing's email field."
|
4489 |
+
msgstr "جرب البريد الإلكتروني للكاتب أولاً، ثم البريد الإلكتروني للإعلانات."
|
|
|
4490 |
|
4491 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1365
|
4492 |
+
msgctxt "admin settings"
|
4493 |
+
msgid "Plain (text/plain)"
|
4494 |
+
msgstr ""
|
|
|
4495 |
|
4496 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1366
|
4497 |
+
msgctxt "admin settings"
|
4498 |
+
msgid "HTML (text/html)"
|
4499 |
msgstr ""
|
4500 |
|
4501 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1367
|
4502 |
+
msgctxt "admin settings"
|
4503 |
+
msgid "Both (multipart/alternative)"
|
4504 |
msgstr ""
|
4505 |
|
4506 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1381
|
4507 |
+
msgctxt "admin settings"
|
4508 |
+
msgid "A new listing is submitted."
|
4509 |
+
msgstr "يتم إضافة إعلان جديد"
|
4510 |
+
|
4511 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1382
|
4512 |
+
msgctxt "admin settings"
|
4513 |
+
msgid "A listing is edited."
|
4514 |
+
msgstr "تم تحرير الإعلان"
|
4515 |
+
|
4516 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1383
|
4517 |
+
msgctxt "admin settings"
|
4518 |
+
msgid "A listing expires."
|
4519 |
msgstr "الإعلان منتهي التاريخ"
|
4520 |
|
4521 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1384
|
4522 |
#, fuzzy
|
4523 |
+
msgctxt "admin settings"
|
4524 |
+
msgid "A listing is renewed."
|
4525 |
+
msgstr "تم تحرير الإعلان"
|
|
|
|
|
|
|
|
|
|
|
4526 |
|
4527 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1385
|
4528 |
+
#, fuzzy
|
4529 |
+
msgctxt "admin settings"
|
4530 |
+
msgid "A listing payment is completed."
|
4531 |
+
msgstr "تم تحرير الإعلان"
|
4532 |
|
4533 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1386
|
4534 |
+
#, fuzzy
|
4535 |
+
msgctxt "admin settings"
|
4536 |
+
msgid "A listing has been reported as inappropriate."
|
4537 |
+
msgstr "تمت ترقية الإعلان."
|
4538 |
|
4539 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1387
|
4540 |
+
msgctxt "admin settings"
|
4541 |
+
msgid "A contact message is sent to a listing's owner."
|
4542 |
+
msgstr "يتم إرسال رسالة اتصال لمالك الإعلان."
|
4543 |
|
4544 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1414
|
4545 |
+
msgctxt "admin settings"
|
4546 |
+
msgid "Their listing is submitted."
|
4547 |
+
msgstr "يتم إضافة الإعلان الخاص بهم"
|
4548 |
|
4549 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1415
|
4550 |
+
msgctxt "admin settings"
|
4551 |
+
msgid "Their listing is approved/published."
|
4552 |
+
msgstr "تمت الموافقة ونشر الإعلان الخاص بهم"
|
4553 |
|
4554 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1416
|
4555 |
+
#, fuzzy
|
4556 |
+
msgctxt "admin settings"
|
4557 |
+
msgid "A payment for their listing is completed."
|
4558 |
+
msgstr "يتم إضافة الإعلان الخاص بهم"
|
4559 |
|
4560 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1417
|
4561 |
#, fuzzy
|
4562 |
+
msgctxt "admin settings"
|
4563 |
+
msgid "Their listing expired or is about to expire."
|
4564 |
+
msgstr "يتم إضافة الإعلان الخاص بهم"
|
4565 |
|
4566 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1435
|
4567 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1454
|
4568 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1490
|
4569 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1526
|
4570 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1563
|
4571 |
+
msgctxt "admin settings"
|
4572 |
+
msgid "Listing's title"
|
4573 |
+
msgstr "عنوان الإعلان"
|
4574 |
|
4575 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1436
|
4576 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1527
|
4577 |
+
#, fuzzy
|
4578 |
+
msgctxt "admin settings"
|
4579 |
+
msgid "Listing's fee plan name"
|
4580 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
4581 |
|
4582 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1437
|
4583 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1528
|
4584 |
#, fuzzy
|
4585 |
+
msgctxt "admin settings"
|
4586 |
+
msgid "Listing's fee plan description"
|
4587 |
+
msgstr "تحديد رسوم الإعلان"
|
4588 |
|
4589 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1438
|
4590 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1529
|
4591 |
+
#, fuzzy
|
4592 |
+
msgctxt "admin settings"
|
4593 |
+
msgid "Listing's fee plan details"
|
4594 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
4595 |
|
4596 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1451
|
4597 |
+
msgctxt "admin settings"
|
4598 |
+
msgid ""
|
4599 |
+
"Your listing \"[listing]\" is now available at [listing-url] and can be "
|
4600 |
+
"viewed by the public."
|
4601 |
+
msgstr ""
|
4602 |
+
"القائمة الخاصة بك \"[listing]\" متوفر الآن في [listing-url] ويمكن مشاهدتها "
|
4603 |
+
"من قبل العموم."
|
4604 |
|
4605 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1455
|
4606 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1489
|
4607 |
+
msgctxt "admin settings"
|
4608 |
+
msgid "Listing's URL"
|
4609 |
+
msgstr "عنوان URL الإعلان"
|
4610 |
|
4611 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1456
|
4612 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1496
|
4613 |
+
#, fuzzy
|
4614 |
+
msgctxt "admin settings"
|
4615 |
+
msgid "Listing's Access Key"
|
4616 |
+
msgstr "مفاتيح وصول الإعلان"
|
4617 |
|
4618 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1491
|
4619 |
+
#, fuzzy
|
4620 |
+
msgctxt "admin settings"
|
4621 |
+
msgid "Sender's name"
|
4622 |
+
msgstr "إسم الكاتب"
|
4623 |
|
4624 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1494
|
4625 |
+
#, fuzzy
|
4626 |
+
msgctxt "admin settings"
|
4627 |
+
msgid "Contact message"
|
4628 |
+
msgstr "رسالة اتصال الإعلان"
|
4629 |
|
4630 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1495
|
4631 |
+
msgctxt "admin settings"
|
4632 |
+
msgid "Date and time the message was sent"
|
|
|
|
|
|
|
|
|
4633 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4634 |
|
4635 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1530
|
4636 |
+
#, fuzzy
|
4637 |
+
msgctxt "admin settings"
|
4638 |
+
msgid "Payment items details."
|
4639 |
+
msgstr "تفاصيل الدفع"
|
4640 |
|
4641 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1531
|
4642 |
+
msgctxt "admin settings"
|
4643 |
+
msgid "URL where user can review and print payment receipt."
|
4644 |
+
msgstr ""
|
4645 |
|
4646 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1532
|
4647 |
#, fuzzy
|
4648 |
+
msgctxt "admin settings"
|
4649 |
+
msgid "Gateway used to process listing's payment."
|
4650 |
+
msgstr "تعذر معالجة الدفع."
|
4651 |
|
4652 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1564
|
4653 |
+
msgctxt "admin settings"
|
4654 |
+
msgid "Checkout URL link"
|
4655 |
+
msgstr "رابط URL إتمام الشراء"
|
|
|
4656 |
|
4657 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1665
|
4658 |
+
#, fuzzy
|
4659 |
+
msgctxt "admin settings"
|
4660 |
+
msgid "Uploaded Image (no resize)"
|
4661 |
+
msgstr "رفع الصور"
|
4662 |
|
4663 |
+
#: includes/helpers/functions/general.php:1274
|
4664 |
+
msgctxt "admin settings"
|
4665 |
+
msgid "User"
|
4666 |
+
msgstr "عضو"
|
4667 |
|
4668 |
+
#: includes/helpers/functions/general.php:1275
|
4669 |
+
msgctxt "admin settings"
|
4670 |
+
msgid "User registration date"
|
4671 |
+
msgstr "تاريخ تسجيل العضو"
|
|
|
4672 |
|
4673 |
+
#: includes/admin/controllers/class-settings-admin.php:503
|
4674 |
#, fuzzy
|
4675 |
+
msgctxt "expiration notices"
|
4676 |
+
msgid "Add notice"
|
4677 |
+
msgstr "إضافة حقل"
|
4678 |
|
4679 |
+
#: includes/admin/controllers/class-settings-admin.php:522
|
4680 |
+
msgctxt "expiration notices"
|
4681 |
+
msgid "No notices configured."
|
4682 |
+
msgstr ""
|
4683 |
|
4684 |
+
#: includes/admin/controllers/class-settings-admin.php:564
|
4685 |
+
msgctxt "expiration notices"
|
4686 |
+
msgid "recurring and non-recurring"
|
4687 |
+
msgstr ""
|
4688 |
|
4689 |
+
#: includes/admin/controllers/class-settings-admin.php:566
|
4690 |
+
#, fuzzy
|
4691 |
+
msgctxt "expiration notices"
|
4692 |
+
msgid "recurring only"
|
4693 |
+
msgstr "(متكرر)"
|
4694 |
|
4695 |
+
#: includes/admin/controllers/class-settings-admin.php:568
|
4696 |
+
#, fuzzy
|
4697 |
+
msgctxt "expiration notices"
|
4698 |
+
msgid "non-recurring only"
|
4699 |
+
msgstr "(متكرر)"
|
4700 |
|
4701 |
+
#: includes/admin/controllers/class-settings-admin.php:572
|
4702 |
+
#, fuzzy
|
4703 |
+
msgctxt "expiration notices"
|
4704 |
+
msgid "Sent when a listing (%s) is renewed."
|
4705 |
+
msgstr "ترسل بعد أن يضاف الإعلان."
|
|
|
|
|
|
|
4706 |
|
4707 |
+
#: includes/admin/controllers/class-settings-admin.php:577
|
4708 |
+
#, fuzzy
|
4709 |
+
msgctxt "expiration notices"
|
4710 |
+
msgid "Sent when a listing (%s) expires."
|
4711 |
+
msgstr "الإعلان منتهي التاريخ"
|
4712 |
|
4713 |
+
#: includes/admin/controllers/class-settings-admin.php:585
|
4714 |
+
#, fuzzy
|
4715 |
+
msgctxt "expiration notices"
|
4716 |
+
msgid "%d day"
|
4717 |
+
msgid_plural "%d days"
|
4718 |
+
msgstr[0] "%d يوم"
|
4719 |
+
msgstr[1] "%d يوم"
|
4720 |
+
msgstr[2] "%d يومين"
|
4721 |
+
msgstr[3] "%d أيام"
|
4722 |
+
msgstr[4] "%d يوم"
|
4723 |
+
msgstr[5] "%d يوم"
|
4724 |
|
4725 |
+
#: includes/admin/controllers/class-settings-admin.php:588
|
4726 |
+
msgctxt "expiration notices"
|
4727 |
+
msgid "%d week"
|
4728 |
+
msgid_plural "%d weeks"
|
4729 |
+
msgstr[0] ""
|
4730 |
+
msgstr[1] ""
|
4731 |
+
msgstr[2] ""
|
4732 |
+
msgstr[3] ""
|
4733 |
+
msgstr[4] ""
|
4734 |
+
msgstr[5] ""
|
4735 |
|
4736 |
+
#: includes/admin/controllers/class-settings-admin.php:591
|
4737 |
+
msgctxt "expiration notices"
|
4738 |
+
msgid "%d month"
|
4739 |
+
msgid_plural "%d months"
|
4740 |
+
msgstr[0] ""
|
4741 |
+
msgstr[1] ""
|
4742 |
+
msgstr[2] ""
|
4743 |
+
msgstr[3] ""
|
4744 |
+
msgstr[4] ""
|
4745 |
+
msgstr[5] ""
|
4746 |
|
4747 |
+
#. translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g.
|
4748 |
+
#. non-recuring only)
|
4749 |
+
#: includes/admin/controllers/class-settings-admin.php:597
|
4750 |
+
msgctxt "expiration notices"
|
4751 |
+
msgid "Sent %1$s before a listing (%2$s) expires."
|
4752 |
msgstr ""
|
4753 |
|
4754 |
+
#. translators: 1: relative time (e.g. 3 days), 2: recurring modifier (e.g.
|
4755 |
+
#. non-recuring only)
|
4756 |
+
#: includes/admin/controllers/class-settings-admin.php:600
|
4757 |
+
#, fuzzy
|
4758 |
+
msgctxt "expiration notices"
|
4759 |
+
msgid "Sent %1$s after a listing (%2$s) expires."
|
4760 |
+
msgstr "ترسل بعد أن يضاف الإعلان."
|
4761 |
|
4762 |
+
#: includes/admin/controllers/class-settings-admin.php:617
|
4763 |
+
msgctxt "expiration notices"
|
4764 |
+
msgid "At the time of expiration"
|
|
|
|
|
4765 |
msgstr ""
|
4766 |
|
4767 |
+
#: includes/admin/controllers/class-settings-admin.php:618
|
|
|
|
|
|
|
|
|
|
|
4768 |
#, fuzzy
|
4769 |
+
msgctxt "expiration notices"
|
4770 |
+
msgid "Right after a successful renewal"
|
4771 |
+
msgstr "تم تعيين الرسوم بنجاح."
|
|
|
|
|
|
|
|
|
|
|
4772 |
|
4773 |
+
#: includes/admin/controllers/class-settings-admin.php:629
|
4774 |
+
msgctxt "expiration notices"
|
4775 |
+
msgid "%d day before expiration"
|
4776 |
+
msgid_plural "%d days before expiration"
|
4777 |
+
msgstr[0] ""
|
4778 |
+
msgstr[1] ""
|
4779 |
+
msgstr[2] ""
|
4780 |
+
msgstr[3] ""
|
4781 |
+
msgstr[4] ""
|
4782 |
+
msgstr[5] ""
|
|
|
|
|
|
|
|
|
|
|
|
|
4783 |
|
4784 |
+
#: includes/admin/controllers/class-settings-admin.php:629
|
4785 |
+
msgctxt "expiration notices"
|
4786 |
+
msgid "%d day after expiration"
|
4787 |
+
msgid_plural "%d days after expiration"
|
4788 |
+
msgstr[0] ""
|
4789 |
+
msgstr[1] ""
|
4790 |
+
msgstr[2] ""
|
4791 |
+
msgstr[3] ""
|
4792 |
+
msgstr[4] ""
|
4793 |
+
msgstr[5] ""
|
4794 |
|
4795 |
+
#: includes/admin/controllers/class-settings-admin.php:632
|
4796 |
+
msgctxt "expiration notices"
|
4797 |
+
msgid "%d week before expiration"
|
4798 |
+
msgid_plural "%d weeks before expiration"
|
4799 |
+
msgstr[0] ""
|
4800 |
+
msgstr[1] ""
|
4801 |
+
msgstr[2] ""
|
4802 |
+
msgstr[3] ""
|
4803 |
+
msgstr[4] ""
|
4804 |
+
msgstr[5] ""
|
4805 |
|
4806 |
+
#: includes/admin/controllers/class-settings-admin.php:632
|
4807 |
+
msgctxt "expiration notices"
|
4808 |
+
msgid "%d week after expiration"
|
4809 |
+
msgid_plural "%d weeks after expiration"
|
4810 |
+
msgstr[0] ""
|
4811 |
+
msgstr[1] ""
|
4812 |
+
msgstr[2] ""
|
4813 |
+
msgstr[3] ""
|
4814 |
+
msgstr[4] ""
|
4815 |
+
msgstr[5] ""
|
4816 |
|
4817 |
+
#: includes/admin/controllers/class-settings-admin.php:635
|
4818 |
+
msgctxt "expiration notices"
|
4819 |
+
msgid "%d month before expiration"
|
4820 |
+
msgid_plural "%d months before expiration"
|
4821 |
+
msgstr[0] ""
|
4822 |
+
msgstr[1] ""
|
4823 |
+
msgstr[2] ""
|
4824 |
+
msgstr[3] ""
|
4825 |
+
msgstr[4] ""
|
4826 |
+
msgstr[5] ""
|
4827 |
|
4828 |
+
#: includes/admin/controllers/class-settings-admin.php:635
|
4829 |
+
msgctxt "expiration notices"
|
4830 |
+
msgid "%d month after expiration"
|
4831 |
+
msgid_plural "%d months after expiration"
|
4832 |
+
msgstr[0] ""
|
4833 |
+
msgstr[1] ""
|
4834 |
+
msgstr[2] ""
|
4835 |
+
msgstr[3] ""
|
4836 |
+
msgstr[4] ""
|
4837 |
+
msgstr[5] ""
|
4838 |
|
4839 |
+
#: includes/admin/controllers/class-settings-admin.php:662
|
4840 |
+
#, fuzzy
|
4841 |
+
msgctxt "expiration notices"
|
4842 |
+
msgid "Applies to"
|
4843 |
+
msgstr "Appliqué à"
|
4844 |
|
4845 |
+
#: includes/admin/controllers/class-settings-admin.php:665
|
4846 |
+
msgctxt "expiration notices"
|
4847 |
+
msgid "Non-recurring listings"
|
4848 |
+
msgstr ""
|
4849 |
|
4850 |
+
#: includes/admin/controllers/class-settings-admin.php:666
|
4851 |
+
#, fuzzy
|
4852 |
+
msgctxt "expiration notices"
|
4853 |
+
msgid "Recurring listings"
|
4854 |
+
msgstr "الرجوع إلى الإعلان."
|
4855 |
|
4856 |
+
#: includes/admin/controllers/class-settings-admin.php:667
|
4857 |
+
msgctxt "expiration notices"
|
4858 |
+
msgid "Recurring and non-recurring listings"
|
4859 |
+
msgstr ""
|
4860 |
|
4861 |
+
#: includes/admin/controllers/class-settings-admin.php:672
|
4862 |
+
msgctxt "expiration notices"
|
4863 |
+
msgid "When to send?"
|
4864 |
msgstr ""
|
4865 |
|
4866 |
+
#: includes/admin/controllers/class-settings-admin.php:539
|
4867 |
#, fuzzy
|
4868 |
+
msgctxt "settings"
|
4869 |
+
msgid "Site title (with link)"
|
4870 |
+
msgstr "إسم الموقع (مع الرابط)"
|
4871 |
|
4872 |
+
#: includes/admin/controllers/class-settings-admin.php:540
|
4873 |
+
msgctxt "settings"
|
4874 |
+
msgid "Author's name"
|
4875 |
+
msgstr "إسم الكاتب"
|
|
|
4876 |
|
4877 |
+
#: includes/admin/controllers/class-settings-admin.php:541
|
4878 |
+
msgctxt "settings"
|
4879 |
+
msgid "Listing's name (with link)"
|
4880 |
+
msgstr "إسم الإعلان (مع رابط)"
|
4881 |
+
|
4882 |
+
#: includes/admin/controllers/class-settings-admin.php:542
|
4883 |
#, fuzzy
|
4884 |
+
msgctxt "settings"
|
4885 |
+
msgid "Listing's expiration date"
|
4886 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
4887 |
|
4888 |
+
#: includes/admin/controllers/class-settings-admin.php:543
|
4889 |
+
msgctxt "settings"
|
4890 |
+
msgid "Listing's renewal link, formatted with an anchor tag"
|
4891 |
msgstr ""
|
4892 |
|
4893 |
+
#: includes/admin/controllers/class-settings-admin.php:544
|
4894 |
+
msgctxt "settings"
|
4895 |
+
msgid "Listing's renewal URL, unformatted by any tags"
|
4896 |
msgstr ""
|
4897 |
|
4898 |
+
#: includes/admin/controllers/class-settings-admin.php:545
|
4899 |
#, fuzzy
|
4900 |
+
msgctxt "settings"
|
4901 |
+
msgid "Listing's categories"
|
4902 |
+
msgstr "عنوان الإعلان"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4903 |
|
4904 |
+
#: includes/admin/controllers/class-settings-admin.php:546
|
4905 |
+
#, fuzzy
|
4906 |
+
msgctxt "settings"
|
4907 |
+
msgid "Listing's last payment date"
|
4908 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
4909 |
|
4910 |
+
#: includes/admin/controllers/class-settings-admin.php:547
|
4911 |
+
#, fuzzy
|
4912 |
+
msgctxt "settings"
|
4913 |
+
msgid "Listing's access key"
|
4914 |
+
msgstr "مفاتيح وصول الإعلان"
|
4915 |
|
4916 |
+
#: includes/admin/controllers/class-settings-admin.php:704
|
4917 |
+
#, fuzzy
|
4918 |
+
msgctxt "settings"
|
4919 |
+
msgid "Settings reset to default."
|
4920 |
+
msgstr "تم تحديث الإعدادات"
|
4921 |
|
4922 |
+
#: includes/admin/settings/class-settings-bootstrap.php:8
|
4923 |
#, fuzzy
|
4924 |
+
msgctxt "settings"
|
4925 |
+
msgid "General"
|
4926 |
+
msgstr "عام"
|
4927 |
|
4928 |
+
#: includes/admin/settings/class-settings-bootstrap.php:10
|
4929 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1043
|
4930 |
+
#, fuzzy
|
4931 |
+
msgctxt "settings"
|
4932 |
+
msgid "Listings"
|
4933 |
+
msgstr "الإعلانات"
|
4934 |
|
4935 |
+
#: includes/admin/settings/class-settings-bootstrap.php:11
|
4936 |
+
#: includes/admin/settings/class-settings-bootstrap.php:14
|
4937 |
+
#: includes/admin/settings/class-settings-bootstrap.php:17
|
4938 |
+
#: includes/admin/settings/class-settings-bootstrap.php:36
|
4939 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1332
|
4940 |
+
#: includes/admin/settings/class-settings.php:341
|
4941 |
+
#, fuzzy
|
4942 |
+
msgctxt "settings"
|
4943 |
+
msgid "General Settings"
|
4944 |
+
msgstr "الإعدادات العامة"
|
4945 |
|
4946 |
+
#: includes/admin/settings/class-settings-bootstrap.php:16
|
4947 |
#, fuzzy
|
4948 |
+
msgctxt "settings"
|
4949 |
+
msgid "Payment"
|
4950 |
+
msgstr "الدفع"
|
4951 |
|
4952 |
+
#: includes/admin/settings/class-settings-bootstrap.php:19
|
4953 |
+
msgctxt "settings"
|
4954 |
+
msgid "Appearance"
|
4955 |
msgstr ""
|
4956 |
|
4957 |
+
#: includes/admin/settings/class-settings-bootstrap.php:59
|
4958 |
+
#, fuzzy
|
4959 |
+
msgctxt "settings"
|
4960 |
+
msgid "Permalink Settings"
|
4961 |
+
msgstr "إعدادات الرابط الثابت"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4962 |
|
4963 |
+
#: includes/admin/settings/class-settings-bootstrap.php:64
|
4964 |
+
#, fuzzy
|
4965 |
+
msgctxt "settings"
|
4966 |
+
msgid "Directory Listings Slug"
|
4967 |
+
msgstr "رابط لطيف لإعلانات الدليل"
|
4968 |
|
4969 |
+
#: includes/admin/settings/class-settings-bootstrap.php:74
|
4970 |
+
#, fuzzy
|
4971 |
+
msgctxt "settings"
|
4972 |
+
msgid "Categories Slug"
|
4973 |
+
msgstr "رابط لطيف للتصنيفات"
|
4974 |
|
4975 |
+
#: includes/admin/settings/class-settings-bootstrap.php:75
|
4976 |
+
#, fuzzy
|
4977 |
+
msgctxt "settings"
|
4978 |
msgid ""
|
4979 |
+
"The slug can't be in use by another term. Avoid \"category\", for instance."
|
|
|
4980 |
msgstr ""
|
4981 |
+
"لا يمكن أن يكون الرابط اللطيف مستخدم من طرف مصطلح آخر. تجنب \"category\"، "
|
4982 |
+
"على سبيل المثال."
|
4983 |
|
4984 |
+
#: includes/admin/settings/class-settings-bootstrap.php:86
|
4985 |
+
#, fuzzy
|
4986 |
+
msgctxt "settings"
|
4987 |
+
msgid "Tags Slug"
|
4988 |
+
msgstr "رابط لطيف للوسوم"
|
4989 |
|
4990 |
+
#: includes/admin/settings/class-settings-bootstrap.php:87
|
4991 |
+
#, fuzzy
|
4992 |
+
msgctxt "settings"
|
4993 |
+
msgid "The slug can't be in use by another term. Avoid \"tag\", for instance."
|
4994 |
+
msgstr ""
|
4995 |
+
"لا يمكن أن يكون الرابط اللطيف مستخدم من طرف مصطلح آخر. تجنب \"tag\"، على "
|
4996 |
+
"سبيل المثال."
|
4997 |
|
4998 |
+
#: includes/admin/settings/class-settings-bootstrap.php:99
|
4999 |
+
#, fuzzy
|
5000 |
+
msgctxt "settings"
|
5001 |
+
msgid "Remove listing ID from directory URLs?"
|
5002 |
+
msgstr "إزالة معرف الإعلان من روابط URLs الدليل؟"
|
5003 |
|
5004 |
+
#: includes/admin/settings/class-settings-bootstrap.php:100
|
5005 |
+
msgctxt "settings"
|
5006 |
+
msgid "Check this setting to remove the ID for better SEO."
|
5007 |
+
msgstr ""
|
5008 |
|
5009 |
+
#: includes/admin/settings/class-settings-bootstrap.php:101
|
5010 |
+
#, fuzzy
|
5011 |
+
msgctxt "settings"
|
5012 |
msgid ""
|
5013 |
+
"Prior to 3.5.1, we included the ID in the listing URL, like \"/business-"
|
5014 |
+
"directory/1809/listing-title\"."
|
|
|
5015 |
msgstr ""
|
5016 |
+
"قبل الإصدار 3.5.1، كنا ندرج المعرف في الرابط url الخاص بالإعلان، مثل \"/دليل-"
|
5017 |
+
"الأعمال/1809/عنوان-الإعلان\". تحقق من هذا الإعداد لإزالة المعرف لأفضل أرشفة "
|
5018 |
+
"SEO."
|
5019 |
|
5020 |
+
#: includes/admin/settings/class-settings-bootstrap.php:112
|
5021 |
+
#, fuzzy
|
5022 |
+
msgctxt "settings"
|
5023 |
+
msgid "Need API keys for reCAPTCHA? Get them <a>here</a>."
|
5024 |
+
msgstr "بحاجة إلى مفاتيح API ل reCAPTCHA؟ أحصل عليها <a>هنا</a>."
|
5025 |
|
5026 |
+
#: includes/admin/settings/class-settings-bootstrap.php:119
|
5027 |
#, fuzzy
|
5028 |
+
msgctxt "settings"
|
5029 |
+
msgid "Use reCAPTCHA for contact forms"
|
5030 |
+
msgstr "إستخدم reCAPTCHA لاستمارة الاتصال"
|
5031 |
|
5032 |
+
#: includes/admin/settings/class-settings-bootstrap.php:127
|
5033 |
#, fuzzy
|
5034 |
+
msgctxt "settings"
|
5035 |
+
msgid "Turn off reCAPTCHA for logged in users?"
|
5036 |
+
msgstr "إيقاف reCAPTCHA للأعضاء الذين سجلوا الدخول؟"
|
5037 |
|
5038 |
+
#: includes/admin/settings/class-settings-bootstrap.php:135
|
5039 |
#, fuzzy
|
5040 |
+
msgctxt "settings"
|
5041 |
+
msgid "Use reCAPTCHA for listing submits"
|
5042 |
+
msgstr "إستخدم reCAPTCHA أثناء إضافة إعلان"
|
5043 |
|
5044 |
+
#: includes/admin/settings/class-settings-bootstrap.php:143
|
5045 |
#, fuzzy
|
5046 |
+
msgctxt "settings"
|
5047 |
+
msgid "Use reCAPTCHA for edit listings"
|
5048 |
+
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
5049 |
|
5050 |
+
#: includes/admin/settings/class-settings-bootstrap.php:151
|
5051 |
#, fuzzy
|
5052 |
+
msgctxt "settings"
|
5053 |
+
msgid "Use reCAPTCHA for report listings"
|
5054 |
+
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
5055 |
|
5056 |
+
#: includes/admin/settings/class-settings-bootstrap.php:159
|
5057 |
#, fuzzy
|
5058 |
+
msgctxt "settings"
|
5059 |
+
msgid "Use reCAPTCHA for listing comments?"
|
5060 |
+
msgstr "إستخدم reCAPTCHA في تعليقات الإعلان؟"
|
5061 |
|
5062 |
+
#: includes/admin/settings/class-settings-bootstrap.php:167
|
5063 |
+
#, fuzzy
|
5064 |
+
msgctxt "settings"
|
5065 |
+
msgid "reCAPTCHA Public Key"
|
5066 |
+
msgstr "مفتاح عام reCAPTCHA"
|
|
|
5067 |
|
5068 |
+
#: includes/admin/settings/class-settings-bootstrap.php:176
|
5069 |
#, fuzzy
|
5070 |
+
msgctxt "settings"
|
5071 |
+
msgid "reCAPTCHA Private Key"
|
5072 |
+
msgstr "مفتاح خاص reCAPTCHA"
|
5073 |
|
5074 |
+
#: includes/admin/settings/class-settings-bootstrap.php:185
|
5075 |
#, fuzzy
|
5076 |
+
msgctxt "settings"
|
5077 |
+
msgid "reCAPTCHA version"
|
5078 |
+
msgstr "إعدادات reCaptcha"
|
5079 |
|
5080 |
+
#: includes/admin/settings/class-settings-bootstrap.php:198
|
5081 |
+
msgctxt "settings"
|
5082 |
+
msgid "reCAPTCHA V3 threshold score"
|
5083 |
+
msgstr ""
|
5084 |
|
5085 |
+
#: includes/admin/settings/class-settings-bootstrap.php:203
|
5086 |
+
msgctxt "settings"
|
5087 |
msgid ""
|
5088 |
+
"reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is "
|
5089 |
+
"very likely a bot). Based on the score, you can take variable action in the "
|
5090 |
+
"context of your site. You can set here the score threshold, scores under "
|
5091 |
+
"this value will result in reCAPTCHA validation error."
|
5092 |
msgstr ""
|
5093 |
|
5094 |
+
#: includes/admin/settings/class-settings-bootstrap.php:208
|
5095 |
+
#, fuzzy
|
5096 |
+
msgctxt "settings"
|
5097 |
+
msgid "Registration"
|
5098 |
+
msgstr "Enregistrement"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5099 |
|
5100 |
+
#: includes/admin/settings/class-settings-bootstrap.php:208
|
5101 |
+
#, fuzzy
|
5102 |
+
msgctxt "settings"
|
5103 |
msgid ""
|
5104 |
+
"We expect that a membership plugin supports the 'redirect_to' parameter for "
|
5105 |
+
"the URLs below to work. If the plugin does not support them, these settings "
|
5106 |
+
"will not function as expected. Please contact the membership plugin and ask "
|
5107 |
+
"them to support the WP standard 'redirect_to' query parameter."
|
5108 |
msgstr ""
|
5109 |
+
"نتوقع أن تدعم عضوية الإضافة معامل 'redirect_to' لكي تعمل روابط المواقع URLs "
|
5110 |
+
"أدناه. إذا لم تدعم الإضافة ذلك، لن تعمل هذه الإعدادات كما هو متوقع. المرجو "
|
5111 |
+
"الاتصال بعضوية الإضافة، واطلب منهم دعم معامل الاستعلام القياسي 'redirect_to' "
|
5112 |
+
"لووردبريس."
|
|
|
|
|
|
|
|
|
5113 |
|
5114 |
+
#: includes/admin/settings/class-settings-bootstrap.php:213
|
5115 |
#, fuzzy
|
5116 |
+
msgctxt "settings"
|
5117 |
+
msgid "Require login to post listings?"
|
5118 |
+
msgstr "يتطلب تسجيل الدخول لنشر الإعلانات؟"
|
5119 |
|
5120 |
+
#: includes/admin/settings/class-settings-bootstrap.php:222
|
5121 |
+
msgctxt "settings"
|
5122 |
+
msgid "Allow anonymous users to edit/manage listings with an access key?"
|
5123 |
+
msgstr ""
|
|
|
5124 |
|
5125 |
+
#: includes/admin/settings/class-settings-bootstrap.php:230
|
5126 |
#, fuzzy
|
5127 |
+
msgctxt "settings"
|
5128 |
+
msgid "Login URL"
|
5129 |
+
msgstr "رابط تسجيل الدخول"
|
5130 |
|
5131 |
+
#: includes/admin/settings/class-settings-bootstrap.php:231
|
5132 |
#, fuzzy
|
5133 |
+
msgctxt "settings"
|
5134 |
+
msgid "Only enter this if using a membership plugin or custom login page."
|
5135 |
+
msgstr ""
|
5136 |
+
"رابط URL لصفحة تسجيل الدخول لعضوية الإضافة الخاصة بك. فقط أدخل هذا إذا كان "
|
5137 |
+
"هناك استخدام لعضوية الإضافة أو صفحة تسجيل دخول مخصصة."
|
5138 |
|
5139 |
+
#: includes/admin/settings/class-settings-bootstrap.php:232
|
5140 |
+
msgctxt "settings"
|
5141 |
+
msgid "URL of your membership plugin's login page."
|
5142 |
+
msgstr ""
|
5143 |
|
5144 |
+
#: includes/admin/settings/class-settings-bootstrap.php:241
|
5145 |
+
#, fuzzy
|
5146 |
+
msgctxt "settings"
|
5147 |
+
msgid "Registration URL"
|
5148 |
+
msgstr "رابط التسجيل"
|
5149 |
|
5150 |
+
#: includes/admin/settings/class-settings-bootstrap.php:242
|
5151 |
+
#, fuzzy
|
5152 |
+
msgctxt "settings"
|
5153 |
+
msgid ""
|
5154 |
+
"Only enter this if using a membership plugin or custom registration page."
|
5155 |
+
msgstr ""
|
5156 |
+
"رابط URL لصفحة التسجيل في عضوية الإضافة الخاصة بك. فقط أدخل هذا إذا كان "
|
5157 |
+
"هناك استخدام لعضوية الإضافة أو صفحة تسجيل مخصصة."
|
5158 |
|
5159 |
+
#: includes/admin/settings/class-settings-bootstrap.php:243
|
5160 |
+
msgctxt "settings"
|
5161 |
+
msgid "URL of your membership plugin's registration page."
|
5162 |
msgstr ""
|
5163 |
|
5164 |
+
#: includes/admin/settings/class-settings-bootstrap.php:252
|
5165 |
+
msgctxt "settings"
|
5166 |
+
msgid "Allow users to create accounts during listing submit?"
|
5167 |
+
msgstr ""
|
5168 |
|
5169 |
+
#: includes/admin/settings/class-settings-bootstrap.php:279
|
5170 |
+
#, fuzzy
|
5171 |
+
msgctxt "settings"
|
5172 |
+
msgid ""
|
5173 |
+
"Enter text or a URL starting with http. If you use a URL, the Terms and "
|
5174 |
+
"Conditions text will be replaced by a link to the appropiate page."
|
5175 |
+
msgstr ""
|
5176 |
+
"أدخل النص أو عنوان URL يبدأ ب http. إذا كنت تستخدم عنوان URL، سيتم استبدال "
|
5177 |
+
"نص الأحكام والشروط برابط إلى الصفحة المناسبة."
|
5178 |
|
5179 |
+
#: includes/admin/settings/class-settings-bootstrap.php:281
|
5180 |
+
#, fuzzy
|
5181 |
+
msgctxt "settings"
|
5182 |
+
msgid "Terms and Conditions text goes here."
|
5183 |
+
msgstr "نص الأحكام والشروط هنا..."
|
5184 |
|
5185 |
+
#: includes/admin/settings/class-settings-bootstrap.php:324
|
5186 |
+
#, fuzzy
|
5187 |
+
msgctxt "settings"
|
5188 |
+
msgid "Enable high performance searches?"
|
5189 |
+
msgstr "تمكين عمليات البحث عالية الأداء؟"
|
5190 |
|
5191 |
+
#: includes/admin/settings/class-settings-bootstrap.php:333
|
5192 |
+
#, fuzzy
|
5193 |
+
msgctxt "settings"
|
5194 |
+
msgid "Advanced"
|
5195 |
+
msgstr "متقدم"
|
5196 |
|
5197 |
+
#: includes/admin/settings/class-settings-bootstrap.php:339
|
5198 |
+
#, fuzzy
|
5199 |
+
msgctxt "settings"
|
5200 |
+
msgid "Disable advanced CPT integration?"
|
5201 |
+
msgstr "تعطيل التكامل CPT المتقدم؟"
|
5202 |
|
5203 |
+
#: includes/admin/settings/class-settings-bootstrap.php:348
|
5204 |
+
#, fuzzy
|
5205 |
+
msgctxt "settings"
|
5206 |
+
msgid "Disable Frontend Listing Submission?"
|
5207 |
+
msgstr "تعطيل إضافة إعلان من واجهة الموقع؟"
|
5208 |
|
5209 |
+
#: includes/admin/settings/class-settings-bootstrap.php:349
|
5210 |
+
msgctxt "settings"
|
5211 |
+
msgid ""
|
5212 |
+
"Prevents the Submit Listing button from showing on the main UI, but allows a "
|
5213 |
+
"shortcode for submit listing to function on other pages."
|
5214 |
msgstr ""
|
5215 |
|
5216 |
+
#: includes/admin/settings/class-settings-bootstrap.php:357
|
5217 |
+
#, fuzzy
|
5218 |
+
msgctxt "settings"
|
5219 |
+
msgid "Enqueue Business Directory's FontAwesome styles?"
|
5220 |
+
msgstr "دليل الأعمال - آخر الإعلانات"
|
5221 |
+
|
5222 |
+
#: includes/admin/settings/class-settings-bootstrap.php:358
|
5223 |
+
msgctxt "settings"
|
5224 |
msgid ""
|
5225 |
+
"This helps to prevent conflicts with other plugins that already do this. "
|
5226 |
+
"Disable this only if you're having an issue with FontAwesome icons and have "
|
5227 |
+
"performed a conflict test to validate this is a multiple styles enqueueing "
|
5228 |
+
"issue."
|
5229 |
msgstr ""
|
|
|
|
|
5230 |
|
5231 |
+
#: includes/admin/settings/class-settings-bootstrap.php:439
|
|
|
5232 |
#, fuzzy
|
5233 |
+
msgctxt "settings"
|
5234 |
+
msgid "Contact Form"
|
5235 |
+
msgstr "مسح"
|
5236 |
|
5237 |
+
#: includes/admin/settings/class-settings-bootstrap.php:448
|
|
|
5238 |
#, fuzzy
|
5239 |
+
msgctxt "settings"
|
5240 |
+
msgid "Listings per page"
|
5241 |
+
msgstr "الإعلانات حسب الصفحة"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5242 |
|
5243 |
+
#: includes/admin/settings/class-settings-bootstrap.php:449
|
5244 |
+
#, fuzzy
|
5245 |
+
msgctxt "settings"
|
5246 |
+
msgid ""
|
5247 |
+
"Number of listings to show per page. Use a value of \"0\" to show all "
|
5248 |
+
"listings."
|
5249 |
+
msgstr ""
|
5250 |
+
"عدد الإعلانات التي تظهر في كل صفحة. استخدام قيمة \"0\" لإظهار كل الإعلانات."
|
5251 |
|
5252 |
+
#: includes/admin/settings/class-settings-bootstrap.php:460
|
5253 |
+
#, fuzzy
|
5254 |
+
msgctxt "settings"
|
5255 |
+
msgid "Listing duration for no-fee sites (in days)"
|
5256 |
+
msgstr "مدة الإعلان للمواقع بلا رسوم (بالأيام)"
|
5257 |
|
5258 |
+
#: includes/admin/settings/class-settings-bootstrap.php:461
|
5259 |
+
#, fuzzy
|
5260 |
+
msgctxt "settings"
|
5261 |
+
msgid ""
|
5262 |
+
"Use a value of \"0\" to keep a listing alive indefinitely or enter a number "
|
5263 |
+
"less than 10 years (3650 days)."
|
5264 |
msgstr ""
|
5265 |
+
"استخدام قيمة \"0\" للإبقاء على الإعلان إلى أجل غير مسمى، أو قم بإدخال عدد "
|
5266 |
+
"أقل من 10 سنوات (3650 يوما)."
|
5267 |
|
5268 |
+
#: includes/admin/settings/class-settings-bootstrap.php:473
|
5269 |
+
#, fuzzy
|
5270 |
+
msgctxt "settings"
|
5271 |
+
msgid "Turn on listing renewal option?"
|
5272 |
+
msgstr "قم بتشغيل خيار تجديد الإعلان؟"
|
5273 |
|
5274 |
+
#: includes/admin/settings/class-settings-bootstrap.php:482
|
5275 |
+
#, fuzzy
|
5276 |
+
msgctxt "settings"
|
5277 |
+
msgid "Open detailed view of listing in new tab?"
|
5278 |
+
msgstr "فتح تفاصيل مشاهدة الإعلانات في علامة تبويب جديدة؟"
|
5279 |
|
5280 |
+
#: includes/admin/settings/class-settings-bootstrap.php:492
|
5281 |
+
#, fuzzy
|
5282 |
+
msgctxt "settings"
|
5283 |
+
msgid "Include button to report listings?"
|
5284 |
+
msgstr "يتطلب تسجيل الدخول لنشر الإعلانات؟"
|
5285 |
|
5286 |
+
#: includes/admin/settings/class-settings-bootstrap.php:501
|
5287 |
+
msgctxt "settings"
|
5288 |
+
msgid "Enable report listing for registered users only"
|
5289 |
+
msgstr ""
|
5290 |
|
5291 |
+
#: includes/admin/settings/class-settings-bootstrap.php:511
|
5292 |
+
msgctxt "settings"
|
5293 |
+
msgid "Report listing option list"
|
5294 |
+
msgstr ""
|
5295 |
|
5296 |
+
#: includes/admin/settings/class-settings-bootstrap.php:512
|
5297 |
+
msgctxt "settings"
|
5298 |
+
msgid ""
|
5299 |
+
"Form option list to report a listing as inappropriate. One option per line."
|
5300 |
msgstr ""
|
5301 |
|
5302 |
+
#: includes/admin/settings/class-settings-bootstrap.php:523
|
5303 |
+
#, fuzzy
|
5304 |
+
msgctxt "settings"
|
5305 |
+
msgid "Include listing contact form on listing pages?"
|
5306 |
+
msgstr "إدراج الإعلان مع نموذج الاتصال في صفحات الإعلان؟"
|
5307 |
|
5308 |
+
#: includes/admin/settings/class-settings-bootstrap.php:524
|
5309 |
+
#, fuzzy
|
5310 |
+
msgctxt "settings"
|
5311 |
+
msgid ""
|
5312 |
+
"Allows visitors to contact listing authors privately. Authors will receive "
|
5313 |
+
"the messages via email."
|
5314 |
+
msgstr ""
|
5315 |
+
"يسمح للزوار بالاتصال بكتاب الإعلان بشكل خاص. الكتاب سوف يتلقون رسائل عبر "
|
5316 |
+
"البريد الإلكتروني."
|
5317 |
|
5318 |
+
#: includes/admin/settings/class-settings-bootstrap.php:533
|
5319 |
+
#, fuzzy
|
5320 |
+
msgctxt "settings"
|
5321 |
+
msgid "Require login for using the contact form?"
|
5322 |
+
msgstr "يتطلب تسجيل الدخول لاستخدام نموذج الاتصال؟"
|
5323 |
|
5324 |
+
#: includes/admin/settings/class-settings-bootstrap.php:544
|
5325 |
+
#, fuzzy
|
5326 |
+
msgctxt "settings"
|
5327 |
+
msgid "Maximum number of daily contact form submits from registered users"
|
5328 |
+
msgstr "الحد الأقصى لعدد إرسال الاتصالات يوميا"
|
5329 |
|
5330 |
+
#: includes/admin/settings/class-settings-bootstrap.php:545
|
5331 |
+
#, fuzzy
|
5332 |
+
msgctxt "settings"
|
5333 |
+
msgid ""
|
5334 |
+
"Use this to prevent spamming of listing owners from logged in users. 0 means "
|
5335 |
+
"unlimited submits per day."
|
5336 |
+
msgstr ""
|
5337 |
+
"إستخدم هذا لمنع الرسائل المزعجة لأصحاب الإعلانات. 0 تعني إرسال غير محدود في "
|
5338 |
+
"اليوم الواحد."
|
5339 |
|
5340 |
+
#: includes/admin/settings/class-settings-bootstrap.php:557
|
5341 |
+
#, fuzzy
|
5342 |
+
msgctxt "settings"
|
5343 |
+
msgid "Maximum number of contact form submits for each listing per day"
|
5344 |
+
msgstr "الحد الأقصى لعدد إرسال الاتصالات يوميا"
|
5345 |
|
5346 |
+
#: includes/admin/settings/class-settings-bootstrap.php:558
|
5347 |
+
#, fuzzy
|
5348 |
+
msgctxt "settings"
|
5349 |
+
msgid ""
|
5350 |
+
"Use this to set contact submits limit for each listing in the directory. 0 "
|
5351 |
+
"means unlimited submits per day."
|
5352 |
+
msgstr ""
|
5353 |
+
"إستخدم هذا لمنع الرسائل المزعجة لأصحاب الإعلانات. 0 تعني إرسال غير محدود في "
|
5354 |
+
"اليوم الواحد."
|
5355 |
|
5356 |
+
#: includes/admin/settings/class-settings-bootstrap.php:570
|
5357 |
+
#, fuzzy
|
5358 |
+
msgctxt "settings"
|
5359 |
+
msgid "Include comment form on listing pages?"
|
5360 |
+
msgstr "يتضمن نموذج التعليق على صفحات الإعلانات؟"
|
5361 |
|
5362 |
+
#: includes/admin/settings/class-settings-bootstrap.php:585
|
5363 |
+
#, fuzzy
|
5364 |
+
msgctxt "settings"
|
5365 |
+
msgid "Show listings under categories on main page?"
|
5366 |
+
msgstr "إظهار الإعلانات تحت التصنيفات على الصفحة الرئيسية؟"
|
5367 |
|
5368 |
+
#: includes/admin/settings/class-settings-bootstrap.php:595
|
5369 |
+
msgctxt "settings"
|
5370 |
+
msgid ""
|
5371 |
+
"Prevents featured listings from floating to the top of the selected page."
|
5372 |
+
msgstr ""
|
5373 |
|
5374 |
+
#: includes/admin/settings/class-settings-bootstrap.php:625
|
5375 |
+
msgctxt "settings"
|
5376 |
+
msgid ""
|
5377 |
+
"The user ID or login of an existing user account. If login is not required "
|
5378 |
+
"to submit listings, this user will own them. A site admin or another user "
|
5379 |
+
"that will not a be posting a listing is best."
|
5380 |
+
msgstr ""
|
5381 |
|
5382 |
+
#: includes/admin/settings/class-settings-bootstrap.php:647
|
5383 |
+
#, fuzzy
|
5384 |
+
msgctxt "settings"
|
5385 |
+
msgid "Edit post status"
|
5386 |
+
msgstr "تعديل حالة الإعلان"
|
5387 |
|
5388 |
+
#: includes/admin/settings/class-settings-bootstrap.php:662
|
5389 |
+
#, fuzzy
|
5390 |
+
msgctxt "settings"
|
5391 |
+
msgid "Status of deleted listings"
|
5392 |
+
msgstr "حالة الإعلانات المحذوفة"
|
5393 |
|
5394 |
+
#: includes/admin/settings/class-settings-bootstrap.php:713
|
5395 |
+
#, fuzzy
|
5396 |
+
msgctxt "settings"
|
5397 |
+
msgid "Submit Listing instructions message"
|
5398 |
+
msgstr "إرسال رسالة تعليمات الإعلانات"
|
5399 |
|
5400 |
+
#: includes/admin/settings/class-settings-bootstrap.php:724
|
5401 |
+
#, fuzzy
|
5402 |
+
msgctxt "settings"
|
5403 |
+
msgid "Order categories list by"
|
5404 |
+
msgstr "ترتيب قائمة التصنيفات حسب"
|
5405 |
|
5406 |
+
#: includes/admin/settings/class-settings-bootstrap.php:738
|
5407 |
+
#, fuzzy
|
5408 |
+
msgctxt "settings"
|
5409 |
+
msgid "Sort order for categories"
|
5410 |
+
msgstr "ترتيب فرز التصنيفات"
|
5411 |
|
5412 |
+
#: includes/admin/settings/class-settings-bootstrap.php:751
|
5413 |
+
#, fuzzy
|
5414 |
+
msgctxt "settings"
|
5415 |
+
msgid "Show category post count?"
|
5416 |
+
msgstr "إظهار عدد إعلانات التصنيف؟"
|
5417 |
|
5418 |
+
#: includes/admin/settings/class-settings-bootstrap.php:760
|
5419 |
+
#, fuzzy
|
5420 |
+
msgctxt "settings"
|
5421 |
+
msgid "Hide empty categories?"
|
5422 |
+
msgstr "إخفاء التصنيفات الفارغة؟"
|
5423 |
|
5424 |
+
#: includes/admin/settings/class-settings-bootstrap.php:769
|
5425 |
#, fuzzy
|
5426 |
+
msgctxt "settings"
|
5427 |
+
msgid "Show only parent categories in category list?"
|
5428 |
+
msgstr "إظهار التصنيفات الأبوية فقط في قائمة التصنيف؟"
|
|
|
|
|
|
|
|
|
5429 |
|
5430 |
+
#: includes/admin/settings/class-settings-bootstrap.php:781
|
5431 |
+
#, fuzzy
|
5432 |
+
msgctxt "settings"
|
5433 |
+
msgid "Order directory listings by"
|
5434 |
+
msgstr "ترتيب إعلانات الدليل حسب"
|
5435 |
|
5436 |
+
#: includes/admin/settings/class-settings-bootstrap.php:805
|
5437 |
+
#, fuzzy
|
5438 |
+
msgctxt "settings"
|
5439 |
+
msgid "Sort directory listings by"
|
5440 |
+
msgstr "فرز إعلانات الدليل حسب"
|
5441 |
|
5442 |
+
#: includes/admin/settings/class-settings-bootstrap.php:806
|
5443 |
+
#, fuzzy
|
5444 |
+
msgctxt "settings"
|
5445 |
+
msgid "Ascending for ascending order A-Z, Descending for descending order Z-A"
|
5446 |
+
msgstr "ترتيب تصاعدي من أ إلى ي، ترتيب تنازلي من ي إلى أ"
|
5447 |
|
5448 |
+
#: includes/admin/settings/class-settings-bootstrap.php:819
|
5449 |
+
#, fuzzy
|
5450 |
+
msgctxt "settings"
|
5451 |
+
msgid "Enable sort bar?"
|
5452 |
+
msgstr "تمكين شريط الفرز؟"
|
5453 |
|
5454 |
+
#: includes/admin/settings/class-settings-bootstrap.php:828
|
5455 |
+
#, fuzzy
|
5456 |
+
msgctxt "settings"
|
5457 |
+
msgid "Sortbar Fields"
|
5458 |
+
msgstr "حقول شريط الفرز"
|
5459 |
|
5460 |
+
#: includes/admin/settings/class-settings-bootstrap.php:846
|
5461 |
+
#, fuzzy
|
5462 |
+
msgctxt "settings"
|
5463 |
+
msgid "Show the \"Submit listing\" button."
|
5464 |
+
msgstr "إظهار زر \"إضافة إعلان\"."
|
5465 |
|
5466 |
+
#: includes/admin/settings/class-settings-bootstrap.php:847
|
5467 |
+
msgctxt "settings"
|
5468 |
+
msgid ""
|
5469 |
+
"Hides the button used by the main UI to allow listing submission, but does "
|
5470 |
+
"not shut off the use of the link for submitting listings (allows you to "
|
5471 |
+
"customize the submit listing button on your own)"
|
5472 |
+
msgstr ""
|
5473 |
|
5474 |
+
#: includes/admin/settings/class-settings-bootstrap.php:857
|
5475 |
+
#, fuzzy
|
5476 |
+
msgctxt "settings"
|
5477 |
+
msgid "Show \"Search listings\"."
|
5478 |
+
msgstr "إظهار \"البحث في الإعلانات\"."
|
5479 |
|
5480 |
+
#: includes/admin/settings/class-settings-bootstrap.php:866
|
5481 |
#, fuzzy
|
5482 |
+
msgctxt "settings"
|
5483 |
+
msgid "Show the \"View Listings\" button."
|
5484 |
+
msgstr "إظهار زر \"مشاهدة الإعلانات\"."
|
5485 |
|
5486 |
+
#: includes/admin/settings/class-settings-bootstrap.php:875
|
5487 |
#, fuzzy
|
5488 |
+
msgctxt "settings"
|
5489 |
+
msgid "Show the \"Manage Listings\" button."
|
5490 |
+
msgstr "إظهار زر \"مشاهدة الإعلانات\"."
|
5491 |
|
5492 |
+
#: includes/admin/settings/class-settings-bootstrap.php:884
|
5493 |
#, fuzzy
|
5494 |
+
msgctxt "settings"
|
5495 |
+
msgid "Show the \"Directory\" button."
|
5496 |
+
msgstr "إظهار زر \"الدليل\"."
|
5497 |
|
5498 |
+
#: includes/admin/settings/class-settings-bootstrap.php:920
|
5499 |
+
#, fuzzy
|
5500 |
+
msgctxt "settings"
|
5501 |
+
msgid "Image Settings"
|
5502 |
+
msgstr "إعدادات الصورة"
|
5503 |
|
5504 |
+
#: includes/admin/settings/class-settings-bootstrap.php:925
|
5505 |
+
#, fuzzy
|
5506 |
+
msgctxt "settings"
|
5507 |
+
msgid "Allow images?"
|
5508 |
+
msgstr "السماح بالصور؟"
|
5509 |
|
5510 |
+
#: includes/admin/settings/class-settings-bootstrap.php:936
|
5511 |
+
#, fuzzy
|
5512 |
+
msgctxt "settings"
|
5513 |
+
msgid "Min Image File Size (KB)"
|
5514 |
+
msgstr "أقل حجم لملف الصورة (KB)"
|
5515 |
|
5516 |
+
#: includes/admin/settings/class-settings-bootstrap.php:947
|
5517 |
#, fuzzy
|
5518 |
+
msgctxt "settings"
|
5519 |
+
msgid "Max Image File Size (KB)"
|
5520 |
+
msgstr "أقصى حجم لملف الصورة (KB)"
|
5521 |
|
5522 |
+
#: includes/admin/settings/class-settings-bootstrap.php:958
|
5523 |
#, fuzzy
|
5524 |
+
msgctxt "settings"
|
5525 |
+
msgid "Min image width (px)"
|
5526 |
+
msgstr "أقل عرض للصورة (px)"
|
5527 |
|
5528 |
+
#: includes/admin/settings/class-settings-bootstrap.php:967
|
5529 |
+
#, fuzzy
|
5530 |
+
msgctxt "settings"
|
5531 |
+
msgid "Min image height (px)"
|
5532 |
+
msgstr "أقل ارتفاع للصورة (px)"
|
|
|
|
|
|
|
5533 |
|
5534 |
+
#: includes/admin/settings/class-settings-bootstrap.php:980
|
|
|
5535 |
#, fuzzy
|
5536 |
+
msgctxt "settings"
|
5537 |
+
msgid "Max image width (px)"
|
5538 |
+
msgstr "أقصى عرض للصورة (px)"
|
5539 |
|
5540 |
+
#: includes/admin/settings/class-settings-bootstrap.php:991
|
|
|
5541 |
#, fuzzy
|
5542 |
+
msgctxt "settings"
|
5543 |
+
msgid "Max image height (px)"
|
5544 |
+
msgstr "أقصى ارتفاع للصورة (px)"
|
5545 |
|
5546 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1002
|
|
|
5547 |
#, fuzzy
|
5548 |
+
msgctxt "settings"
|
5549 |
+
msgid "Turn on thickbox/lightbox?"
|
5550 |
+
msgstr "تشغيل thickbox/lightbox؟"
|
5551 |
|
5552 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1003
|
5553 |
+
#, fuzzy
|
5554 |
+
msgctxt "settings"
|
5555 |
msgid ""
|
5556 |
+
"Uncheck if it conflicts with other elements or plugins installed on your site"
|
|
|
5557 |
msgstr ""
|
5558 |
+
"قم بإلغاء التحديد إذا كان يتعارض مع العناصر الأخرى أو الإضافات المثبتة على "
|
5559 |
+
"موقعك"
|
5560 |
|
5561 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1009
|
5562 |
+
#, fuzzy
|
5563 |
+
msgctxt "settings"
|
5564 |
+
msgid "Thumbnails"
|
5565 |
+
msgstr "الصور المصغرة"
|
5566 |
|
5567 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1016
|
|
|
5568 |
#, fuzzy
|
5569 |
+
msgctxt "settings"
|
5570 |
+
msgid "Thumbnail width (px)"
|
5571 |
+
msgstr "عرض الصور المصغرة (px)"
|
5572 |
|
5573 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1027
|
5574 |
#, fuzzy
|
5575 |
+
msgctxt "settings"
|
5576 |
+
msgid "Thumbnail height (px)"
|
5577 |
+
msgstr "ارتفاع الصورة المصغرة (px)"
|
5578 |
|
5579 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1036
|
5580 |
#, fuzzy
|
5581 |
+
msgctxt "settings"
|
5582 |
+
msgid "Crop thumbnails to exact dimensions?"
|
5583 |
+
msgstr "قطع الصور المصغرة للأبعاد المناسبة؟"
|
5584 |
|
5585 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1037
|
5586 |
+
#, fuzzy
|
5587 |
+
msgctxt "settings"
|
5588 |
+
msgid ""
|
5589 |
+
"When enabled images will match exactly the dimensions above but part of the "
|
5590 |
+
"image may be cropped out. If disabled, image thumbnails will be resized to "
|
5591 |
+
"match the specified width and their height will be adjusted proportionally. "
|
5592 |
+
"Depending on the uploaded images, thumbnails may have different heights."
|
5593 |
msgstr ""
|
5594 |
+
"عند تمكين الصور ستطابق تماما الأبعاد أعلاه لكن جزءا من الصورة يمكن أن يقطع. "
|
5595 |
+
"في حالة تعطيلها، سيتم تغيير حجم الصور المصغرة لمطابقة العرض المحدد وسيتم "
|
5596 |
+
"تعديل الارتفاع بشكل متناسب. اعتماداً على الصور المرفوعة, قد تكون ارتفاعات "
|
5597 |
+
"الصور المصغرة مختلفة."
|
5598 |
|
5599 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1048
|
5600 |
+
msgctxt "settings"
|
5601 |
+
msgid "Enforce image upload on submit/edit?"
|
5602 |
+
msgstr ""
|
5603 |
+
|
5604 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1057
|
5605 |
#, fuzzy
|
5606 |
+
msgctxt "settings"
|
5607 |
+
msgid "Number of free images"
|
5608 |
+
msgstr "عدد الصور المجانية"
|
5609 |
|
5610 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1069
|
5611 |
+
msgctxt "settings"
|
5612 |
+
msgid "Use \"Coming Soon\" photo for listings without any (primary) images?"
|
5613 |
+
msgstr ""
|
5614 |
+
|
5615 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1091
|
5616 |
+
#, fuzzy
|
5617 |
+
msgctxt "settings"
|
5618 |
+
msgid "Default thumbnail image size"
|
5619 |
+
msgstr "إعلان العضو الافتراضي"
|
5620 |
+
|
5621 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1094
|
5622 |
+
msgctxt "settings"
|
5623 |
+
msgid ""
|
5624 |
+
"This indicates the size of the thumbnail to be used both in excerpt and "
|
5625 |
+
"detail views. For CROPPED image size values, we use the EXACT size defined. "
|
5626 |
+
"For all other values, we preserve the aspect ratio of the image and use the "
|
5627 |
+
"width as the starting point."
|
5628 |
msgstr ""
|
5629 |
|
5630 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1102
|
5631 |
#, fuzzy
|
5632 |
+
msgctxt "settings"
|
5633 |
+
msgid "Show Thumbnail on main listings page?"
|
5634 |
+
msgstr "إظهار صورة مصغرة في صفحة الإعلانات الرئيسية؟"
|
|
|
|
|
|
|
|
|
|
|
5635 |
|
5636 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1111
|
5637 |
#, fuzzy
|
5638 |
+
msgctxt "settings"
|
5639 |
+
msgid "Featured Badge image"
|
5640 |
+
msgstr "وحدة المستويات المميزة"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5641 |
|
5642 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1120
|
5643 |
#, fuzzy
|
5644 |
+
msgctxt "settings"
|
5645 |
+
msgid "Featured Badge URL"
|
5646 |
+
msgstr "وحدة المستويات المميزة"
|
5647 |
|
5648 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1121
|
5649 |
+
msgctxt "settings"
|
5650 |
+
msgid "Use this to set Featured Badge image as a link to a defined URL."
|
5651 |
msgstr ""
|
5652 |
|
5653 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1131
|
5654 |
+
msgctxt "settings"
|
5655 |
+
msgid "Display featured (sticky) badge on listing:"
|
5656 |
msgstr ""
|
5657 |
|
5658 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1147
|
5659 |
#, fuzzy
|
5660 |
+
msgctxt "settings"
|
5661 |
+
msgid "Fee Order"
|
5662 |
+
msgstr "ترتيب"
|
5663 |
|
5664 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1160
|
5665 |
#, fuzzy
|
5666 |
+
msgctxt "settings"
|
5667 |
+
msgid "Turn On payments?"
|
5668 |
+
msgstr "تشغيل الدفعات؟"
|
5669 |
|
5670 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1169
|
5671 |
#, fuzzy
|
5672 |
+
msgctxt "settings"
|
5673 |
+
msgid "Put payment gateways in test mode?"
|
5674 |
+
msgstr "وضع بوابات الدفع في وضع الاختبار؟"
|
5675 |
|
5676 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1180
|
5677 |
#, fuzzy
|
5678 |
+
msgctxt "settings"
|
5679 |
+
msgid "Currency Code"
|
5680 |
+
msgstr "رمز العملة"
|
5681 |
|
5682 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1219
|
5683 |
#, fuzzy
|
5684 |
+
msgctxt "settings"
|
5685 |
+
msgid "Currency Symbol"
|
5686 |
+
msgstr "رمز العملة"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5687 |
|
5688 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1229
|
|
|
|
|
5689 |
#, fuzzy
|
5690 |
+
msgctxt "settings"
|
5691 |
+
msgid "Currency symbol display"
|
5692 |
+
msgstr "عرض رمز العملة"
|
5693 |
|
5694 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1244
|
5695 |
+
msgctxt "settings"
|
5696 |
+
msgid "Include fee description in receipt?"
|
5697 |
msgstr ""
|
5698 |
|
5699 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1254
|
5700 |
#, fuzzy
|
5701 |
+
msgctxt "settings"
|
5702 |
+
msgid "Thank you for payment message"
|
5703 |
+
msgstr "رسالة الشكر على الدفع"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5704 |
|
5705 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1308
|
5706 |
+
#, fuzzy
|
5707 |
+
msgctxt "settings"
|
5708 |
+
msgid "Ask users to come back for abandoned payments?"
|
5709 |
+
msgstr "أطلب من الأعضاء العودة للمدفوعات المتخلى عنها؟"
|
|
|
|
|
|
|
|
|
|
|
5710 |
|
5711 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1320
|
5712 |
+
#, fuzzy
|
5713 |
+
msgctxt "settings"
|
5714 |
+
msgid "Listing abandonment threshold (hours)"
|
5715 |
+
msgstr "عتبة التخلي على الإعلان (ساعات)"
|
|
|
|
|
|
|
|
|
|
|
5716 |
|
5717 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1337
|
5718 |
+
#, fuzzy
|
5719 |
+
msgctxt "settings"
|
5720 |
+
msgid "Display email address fields publicly?"
|
5721 |
+
msgstr "عرض حقول عنوان البريد الإلكتروني علنا؟"
|
|
|
|
|
|
|
|
|
|
|
5722 |
|
5723 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1338
|
5724 |
+
#, fuzzy
|
5725 |
+
msgctxt "settings"
|
5726 |
+
msgid ""
|
5727 |
+
"Shows the email address of the listing owner to all web users. NOT "
|
5728 |
+
"RECOMMENDED as this increases spam to the address and allows spam bots to "
|
5729 |
+
"harvest it for future use."
|
5730 |
+
msgstr ""
|
5731 |
+
"إظهار عنوان البريد الإلكتروني لمالك الإعلان لجميع مستخدمي الويب. لا ينصح به "
|
5732 |
+
"لأن هذا يزيد من الرسائل المزعجة إلى العنوان ويسمح للمتطفلين بجمع عنوانين "
|
5733 |
+
"البريد للاستخدام في المستقبل."
|
5734 |
|
5735 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1347
|
5736 |
#, fuzzy
|
5737 |
+
msgctxt "settings"
|
5738 |
+
msgid "How to determine the listing's email address?"
|
5739 |
+
msgstr "كيفية تحديد عنوان البريد الإلكتروني في الإعلان؟"
|
5740 |
|
5741 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1348
|
5742 |
+
#, fuzzy
|
5743 |
+
msgctxt "settings"
|
5744 |
+
msgid ""
|
5745 |
+
"This affects emails sent to listing owners via contact forms or when their "
|
5746 |
+
"listings expire."
|
5747 |
msgstr ""
|
5748 |
+
"هذا يؤثر على رسائل البريد الإلكتروني المرسلة إلى مالكي الإعلانات عبر نموذج "
|
5749 |
+
"الاتصال أو عندما ينتهي تاريخ الإعلانات."
|
5750 |
|
5751 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1361
|
5752 |
+
msgctxt "settings"
|
5753 |
+
msgid "Email Content-Type header"
|
5754 |
+
msgstr ""
|
|
|
5755 |
|
5756 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1362
|
5757 |
+
msgctxt "settings"
|
5758 |
+
msgid ""
|
5759 |
+
"Use this setting to control the format of the emails explicitly. Some "
|
5760 |
+
"plugins for email do not correctly support Content Type unless explicitly "
|
5761 |
+
"set, you can do that here. If you're unsure, try \"HTML\", \"Plain\" and "
|
5762 |
+
"then \"Both\"."
|
5763 |
msgstr ""
|
5764 |
|
5765 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1423
|
5766 |
+
#, fuzzy
|
5767 |
+
msgctxt "settings"
|
5768 |
+
msgid "Templates"
|
5769 |
+
msgstr "قوالب البريد الإلكتروني"
|
5770 |
|
5771 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1428
|
5772 |
#, fuzzy
|
5773 |
msgctxt "settings"
|
5774 |
+
msgid "Email confirmation message"
|
5775 |
+
msgstr "رسالة تأكيد البريد الإلكتروني"
|
5776 |
|
5777 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1429
|
5778 |
+
#, fuzzy
|
5779 |
msgctxt "settings"
|
5780 |
+
msgid "Sent after a listing has been submitted."
|
5781 |
+
msgstr "ترسل بعد أن يضاف الإعلان."
|
5782 |
|
5783 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1447
|
5784 |
+
#, fuzzy
|
5785 |
msgctxt "settings"
|
5786 |
+
msgid "Listing published message"
|
5787 |
+
msgstr "رسالة نشر الإعلان"
|
5788 |
|
5789 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1448
|
5790 |
#, fuzzy
|
5791 |
msgctxt "settings"
|
5792 |
+
msgid "Sent when the listing has been published or approved by an admin."
|
5793 |
+
msgstr "ترسل عندما يتم نشر الإعلان أو الموافقة عليه من طرف المدير."
|
5794 |
|
5795 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1465
|
5796 |
+
#, fuzzy
|
5797 |
msgctxt "settings"
|
5798 |
+
msgid "Listing Contact Message"
|
5799 |
+
msgstr "رسالة اتصال الإعلان"
|
5800 |
|
5801 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1466
|
5802 |
+
#, fuzzy
|
5803 |
msgctxt "settings"
|
5804 |
+
msgid ""
|
5805 |
+
"Sent to listing owners when someone uses the contact form on their listing "
|
5806 |
+
"pages."
|
5807 |
msgstr ""
|
5808 |
+
"ترسل إلى مالكي الإعلانات عندما يستخدم شخص ما نموذج جهة الاتصال في صفحات "
|
5809 |
+
"الإعلانات الخاصة بهم."
|
5810 |
|
5811 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1506
|
5812 |
#, fuzzy
|
5813 |
msgctxt "settings"
|
5814 |
+
msgid "Payment completed message"
|
5815 |
+
msgstr "رسالة تذكير بالتخلي عن الدفع"
|
5816 |
|
5817 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1507
|
5818 |
#, fuzzy
|
5819 |
msgctxt "settings"
|
5820 |
+
msgid "Sent after a Listing's payment is verified by Gateway or admins."
|
5821 |
+
msgstr "ترسل أحيانا بعد أن يتخلي الأعضاء عن الدفعة المنتظرة."
|
5822 |
|
5823 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1543
|
5824 |
#, fuzzy
|
5825 |
msgctxt "settings"
|
5826 |
+
msgid "Payment abandoned reminder message"
|
5827 |
+
msgstr "رسالة تذكير بالتخلي عن الدفع"
|
5828 |
|
5829 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1544
|
5830 |
#, fuzzy
|
5831 |
msgctxt "settings"
|
5832 |
+
msgid "Sent some time after a pending payment is abandoned by users."
|
5833 |
+
msgstr "ترسل أحيانا بعد أن يتخلي الأعضاء عن الدفعة المنتظرة."
|
5834 |
|
5835 |
+
#: includes/admin/settings/class-settings-bootstrap.php:1686
|
|
|
5836 |
msgctxt "settings"
|
5837 |
+
msgid "Cropped"
|
5838 |
+
msgstr ""
|
5839 |
|
5840 |
+
#: includes/admin/settings/class-settings.php:495
|
5841 |
+
#: includes/admin/settings/class-settings.php:506
|
|
|
5842 |
msgctxt "settings"
|
5843 |
+
msgid "\"%s\" can not be empty."
|
5844 |
+
msgstr ""
|
5845 |
|
5846 |
+
#: includes/admin/settings/class-settings.php:523
|
|
|
|
|
|
|
|
|
|
|
|
|
5847 |
msgctxt "settings"
|
5848 |
+
msgid "The slug \"%s\" is already in use for another taxonomy."
|
5849 |
+
msgstr ""
|
5850 |
|
5851 |
+
#: includes/licensing.php:238
|
5852 |
#, fuzzy
|
5853 |
msgctxt "settings"
|
5854 |
+
msgid "Themes"
|
5855 |
+
msgstr "القوالب"
|
5856 |
|
5857 |
+
#: includes/licensing.php:309 includes/licensing.php:310
|
5858 |
msgctxt "settings"
|
5859 |
+
msgid "Please wait..."
|
5860 |
msgstr ""
|
5861 |
|
5862 |
+
#: includes/licensing.php:310
|
5863 |
#, fuzzy
|
5864 |
msgctxt "settings"
|
5865 |
+
msgid "Deauthorize"
|
5866 |
+
msgstr "تفعيل Authorize.net؟"
|
5867 |
|
5868 |
+
#: includes/admin/controllers/class-themes-admin.php:43
|
5869 |
+
msgctxt "themes"
|
5870 |
+
msgid "Directory Themes"
|
5871 |
+
msgstr "قوالب الدليل"
|
5872 |
+
|
5873 |
+
#: includes/admin/controllers/class-themes-admin.php:113
|
5874 |
+
msgctxt "themes"
|
5875 |
+
msgid "Could not change the active theme to \"%s\"."
|
5876 |
+
msgstr "تعذر تغيير القالب النشط إلى \"%s\"."
|
5877 |
+
|
5878 |
+
#: includes/admin/controllers/class-themes-admin.php:156
|
5879 |
+
msgctxt "themes"
|
5880 |
+
msgid "Active theme changed to \"%s\"."
|
5881 |
+
msgstr "القالب النشط تغير إلى \"%s\"."
|
5882 |
+
|
5883 |
+
#: includes/admin/controllers/class-themes-admin.php:159
|
5884 |
+
msgctxt "themes"
|
5885 |
+
msgid ""
|
5886 |
+
"%s requires that you tag your existing fields to match some places we want "
|
5887 |
+
"to put your data on the theme. Below are fields we think are missing."
|
5888 |
+
msgstr ""
|
5889 |
+
"%s يتطلب أن تضيف وسوم في الحقول الموجودة الخاصة بك لمطابقة بعض الأماكن لأننا "
|
5890 |
+
"نريد وضع البيانات الخاصة بك في القالب. وفيما يلي الحقول التي نظن أنها مفقودة."
|
5891 |
+
|
5892 |
+
#: includes/admin/controllers/class-themes-admin.php:170
|
5893 |
+
msgctxt "themes"
|
5894 |
+
msgid "Map My Fields"
|
5895 |
+
msgstr "أنشئ خريطة لحقولي"
|
5896 |
+
|
5897 |
+
#: includes/admin/controllers/class-themes-admin.php:178
|
5898 |
+
msgctxt "themes"
|
5899 |
+
msgid "Suggested fields created successfully."
|
5900 |
+
msgstr " تم إنشاء الحقول المقترحة بنجاح."
|
5901 |
+
|
5902 |
+
#: includes/admin/controllers/class-themes-admin.php:181
|
5903 |
+
msgctxt "themes"
|
5904 |
+
msgid "Theme installed successfully."
|
5905 |
+
msgstr "تم تثبيت القالب بنجاح."
|
5906 |
+
|
5907 |
+
#: includes/admin/controllers/class-themes-admin.php:184
|
5908 |
#, fuzzy
|
5909 |
+
msgctxt "themes"
|
5910 |
+
msgid "Theme was deleted successfully."
|
5911 |
+
msgstr "تم حذف القالب بنجاح."
|
5912 |
|
5913 |
+
#: includes/admin/controllers/class-themes-admin.php:187
|
5914 |
+
msgctxt "themes"
|
5915 |
+
msgid "Could not delete theme directory. Check permissions."
|
5916 |
+
msgstr "تعذر حذف مجلد القالب. تحقق من الصلاحيات."
|
5917 |
+
|
5918 |
+
#: includes/admin/controllers/class-themes-admin.php:239
|
5919 |
+
msgctxt "themes"
|
5920 |
+
msgid "Please upload a valid theme file."
|
5921 |
+
msgstr "المرجو رفع ملف قالب صالح."
|
5922 |
+
|
5923 |
+
#: includes/admin/controllers/class-themes-admin.php:248
|
5924 |
+
msgctxt "themes"
|
5925 |
+
msgid "Could not move \"%s\" to a temporary directory."
|
5926 |
+
msgstr "لا يمكن نقل \"%s\" إلى مجلد مؤقت."
|
5927 |
+
|
5928 |
+
#: includes/admin/controllers/class-themes-admin.php:334
|
5929 |
+
msgctxt "themes"
|
5930 |
+
msgid "Activate your <a>license key</a> to use this theme."
|
5931 |
+
msgstr "فعِّل <a>مفتاح الترخيص</a> الخاص بك لاستخدام هذا القالب."
|
5932 |
+
|
5933 |
+
#: includes/admin/controllers/class-themes-admin.php:377
|
5934 |
#, fuzzy
|
5935 |
+
msgctxt "themes"
|
5936 |
+
msgid "Invalid theme ID"
|
5937 |
+
msgstr "معرف حقل غير صالح"
|
5938 |
|
5939 |
+
#: includes/admin/controllers/class-themes-admin.php:383
|
5940 |
+
#: includes/admin/upgrades/class-themes-updater.php:170
|
5941 |
+
msgctxt "themes"
|
5942 |
+
msgid "Could not update theme: %s"
|
5943 |
+
msgstr "تعذر تحديث القالب : %s"
|
5944 |
+
|
5945 |
+
#: includes/admin/upgrades/class-themes-updater.php:132
|
5946 |
+
msgctxt "themes"
|
5947 |
+
msgid "Updating theme..."
|
5948 |
+
msgstr "تحديث القالب..."
|
5949 |
+
|
5950 |
+
#: includes/admin/upgrades/class-themes-updater.php:133
|
5951 |
+
msgctxt "themes"
|
5952 |
+
msgid "Theme updated."
|
5953 |
+
msgstr "تم تحديث القالب"
|
5954 |
+
|
5955 |
+
#: includes/admin/upgrades/class-themes-updater.php:135
|
5956 |
+
msgctxt "themes"
|
5957 |
+
msgid "New version available (<b>%s</b>). <a>Update now.</a>"
|
5958 |
+
msgstr "الإصدار الجديد متوفر (<b>%s</b>). <a>التحديث الآن.</a>"
|
5959 |
+
|
5960 |
+
#: includes/admin/upgrades/class-themes-updater.php:176
|
5961 |
#, fuzzy
|
5962 |
+
msgctxt "themes"
|
5963 |
+
msgid "Theme was updated successfully."
|
5964 |
+
msgstr "تم تحديث القالب بنجاح."
|
5965 |
+
|
5966 |
+
#: includes/themes.php:960
|
5967 |
+
msgctxt "themes"
|
5968 |
+
msgid "Could not create themes directory."
|
5969 |
+
msgstr "تعذر إنشاء مجلد القوالب."
|
5970 |
+
|
5971 |
+
#: includes/themes.php:971
|
5972 |
+
msgctxt "themes"
|
5973 |
+
msgid "Could not remove previous theme directory \"%s\"."
|
5974 |
+
msgstr "تعذر إزالة مجلد القالب السابق \"%s\"."
|
5975 |
+
|
5976 |
+
#: includes/themes.php:979
|
5977 |
+
msgctxt "themes"
|
5978 |
+
msgid "Could not move new theme into theme directory."
|
5979 |
+
msgstr "تعذر نقل القالب الجديد الى مجلد القالب."
|
5980 |
+
|
5981 |
+
#: includes/admin/csv-export.php:50
|
5982 |
+
msgctxt "admin csv-export"
|
5983 |
+
msgid "Could not decode export state information."
|
5984 |
+
msgstr ""
|
5985 |
+
|
5986 |
+
#: includes/admin/helpers/csv/class-csv-exporter.php:110
|
5987 |
+
msgctxt "admin csv-export"
|
5988 |
+
msgid "Could not create a temporary directory for handling this CSV export."
|
5989 |
+
msgstr "لا يمكن إنشاء مجلد مؤقت للتعامل مع تصدير CSV."
|
5990 |
+
|
5991 |
+
#: includes/admin/helpers/csv/class-csv-exporter.php:111
|
5992 |
+
msgctxt "admin csv-export"
|
5993 |
+
msgid "Error while creating a temporary directory for CSV export: %s"
|
5994 |
+
msgstr "حدث خطأ أثناء إنشاء مجلد مؤقت لتصدير CSV: %s"
|
5995 |
+
|
5996 |
+
#: templates/admin/csv-export.tpl.php:13
|
5997 |
+
msgctxt "admin csv-export"
|
5998 |
msgid ""
|
5999 |
+
"Please note that the export process is a resource intensive task. If your "
|
6000 |
+
"export does not succeed try disabling other plugins first and/or increasing "
|
6001 |
+
"the values of the 'memory_limit' and 'max_execution_time' directives in your "
|
6002 |
+
"server's php.ini configuration file."
|
6003 |
msgstr ""
|
6004 |
+
"يرجى ملاحظة أن عملية التصدير مهمة تتطلب موارد كثيرة. إذا لم تنجح في التصدير "
|
6005 |
+
"حاول تعطيل إضافات أخرى أولاً و/أو زيادة قيم التوجيهات 'memory_limit' و "
|
6006 |
+
"'max_execution_time' في الخادم الخاص بك بتعديل ملف الإعدادات php.ini."
|
6007 |
+
|
6008 |
+
#: templates/admin/csv-export.tpl.php:29
|
6009 |
+
msgctxt "admin csv-export"
|
6010 |
+
msgid "Export settings"
|
6011 |
+
msgstr "إعدادات التصدير"
|
6012 |
+
|
6013 |
+
#: templates/admin/csv-export.tpl.php:33
|
6014 |
+
msgctxt "admin csv-export"
|
6015 |
+
msgid "Which listings to export?"
|
6016 |
+
msgstr "أي لائحة تريد التصدير؟"
|
6017 |
+
|
6018 |
+
#: templates/admin/csv-export.tpl.php:37
|
6019 |
+
msgctxt "admin csv-export"
|
6020 |
+
msgid "All"
|
6021 |
+
msgstr "الكل"
|
6022 |
|
6023 |
+
#: templates/admin/csv-export.tpl.php:38
|
6024 |
+
msgctxt "admin csv-export"
|
6025 |
+
msgid "Active Only"
|
6026 |
+
msgstr "المفعل فقط"
|
|
|
6027 |
|
6028 |
+
#: templates/admin/csv-export.tpl.php:39
|
6029 |
+
msgctxt "admin csv-export"
|
6030 |
+
msgid "Active + Pending Renewal"
|
6031 |
+
msgstr "مفعل + ريثما يتم التجديد"
|
|
|
|
|
|
|
6032 |
|
6033 |
+
#: templates/admin/csv-export.tpl.php:45
|
6034 |
+
msgctxt "admin csv-export"
|
6035 |
+
msgid "Export images?"
|
6036 |
+
msgstr "تصدير الصور؟"
|
|
|
6037 |
|
6038 |
+
#: templates/admin/csv-export.tpl.php:50
|
6039 |
+
msgctxt "admin csv-export"
|
6040 |
+
msgid "Export images"
|
6041 |
+
msgstr "تصدير الصور"
|
6042 |
|
6043 |
+
#: templates/admin/csv-export.tpl.php:52
|
6044 |
+
msgctxt "admin csv-export"
|
|
|
6045 |
msgid ""
|
6046 |
+
"When checked, instead of just a CSV file a ZIP file will be generated with "
|
6047 |
+
"both a CSV file and listing images."
|
6048 |
msgstr ""
|
6049 |
+
"عند اختيار الخانة، بدلاً من مجرد ملف CSV سيتم إنشاء ملف مضغوط مع ملف CSV "
|
6050 |
+
"ولائحة الصور."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6051 |
|
6052 |
+
#: templates/admin/csv-export.tpl.php:58
|
6053 |
+
msgctxt "admin csv-export"
|
6054 |
+
msgid "Additional metadata to export:"
|
6055 |
+
msgstr "بيانات تعريف إضافية للتصدير:"
|
|
|
6056 |
|
6057 |
+
#: templates/admin/csv-export.tpl.php:63
|
6058 |
+
msgctxt "admin csv-export"
|
6059 |
+
msgid "Include unique IDs for each listing (sequence_id column)."
|
6060 |
+
msgstr "تتضمن معرفات (IDs) فريدة لكل إعلان (عمود sequence_id)."
|
|
|
6061 |
|
6062 |
+
#: templates/admin/csv-export.tpl.php:71
|
6063 |
+
msgctxt "admin csv-export"
|
6064 |
+
msgid "Author information (username)"
|
6065 |
+
msgstr "معلومات الكاتب (إسم المستخدم)"
|
|
|
6066 |
|
6067 |
+
#: templates/admin/csv-export.tpl.php:76
|
6068 |
+
msgctxt "admin csv-export"
|
6069 |
+
msgid "Listing expiration date"
|
6070 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
|
|
6071 |
|
6072 |
+
#: templates/admin/csv-export.tpl.php:80
|
6073 |
#, fuzzy
|
6074 |
+
msgctxt "admin csv-export"
|
6075 |
+
msgid "Listing created date"
|
6076 |
+
msgstr "صور الإعلانات"
|
6077 |
|
6078 |
+
#: templates/admin/csv-export.tpl.php:84
|
6079 |
#, fuzzy
|
6080 |
+
msgctxt "admin csv-export"
|
6081 |
+
msgid "Listing last updated date"
|
6082 |
+
msgstr "إنتهاء صلاحية الإعلان"
|
6083 |
|
6084 |
+
#: templates/admin/csv-export.tpl.php:88
|
6085 |
#, fuzzy
|
6086 |
+
msgctxt "admin csv-export"
|
6087 |
+
msgid "Listing T&C acceptance date"
|
6088 |
+
msgstr "صور الإعلانات"
|
6089 |
|
6090 |
+
#: templates/admin/csv-export.tpl.php:97
|
6091 |
+
msgctxt "admin csv-export"
|
6092 |
+
msgid "What operating system will you use to edit the CSV file?"
|
6093 |
msgstr ""
|
6094 |
|
6095 |
+
#: templates/admin/csv-export.tpl.php:104
|
6096 |
+
msgctxt "admin csv-export"
|
6097 |
+
msgid "Windows"
|
|
|
|
|
|
|
|
|
6098 |
msgstr ""
|
6099 |
|
6100 |
+
#: templates/admin/csv-export.tpl.php:109
|
6101 |
+
msgctxt "admin csv-export"
|
6102 |
+
msgid "macOS"
|
6103 |
+
msgstr ""
|
|
|
6104 |
|
6105 |
+
#: templates/admin/csv-export.tpl.php:111
|
6106 |
+
msgctxt "admin csv-export"
|
|
|
6107 |
msgid ""
|
6108 |
+
"Windows and macOS versions of MS Excel handle CSV files differently. To make "
|
6109 |
+
"sure all your listings information is displayed properly when you view or "
|
6110 |
+
"edit the CSV file, we need to generate different versions of the file for "
|
6111 |
+
"each operating system."
|
6112 |
msgstr ""
|
|
|
|
|
|
|
|
|
6113 |
|
6114 |
+
#: templates/admin/csv-export.tpl.php:129
|
6115 |
+
msgctxt "admin csv-export"
|
6116 |
+
msgid "Category Separator"
|
6117 |
+
msgstr "فاصلة التصنيف"
|
|
|
6118 |
|
6119 |
+
#: templates/admin/csv-export.tpl.php:141
|
6120 |
+
msgctxt "admin csv-export"
|
6121 |
+
msgid "Export Listings"
|
6122 |
+
msgstr "الإعلانات المصدرة"
|
6123 |
|
6124 |
+
#: templates/admin/csv-export.tpl.php:147
|
6125 |
+
msgctxt "admin csv-export"
|
6126 |
+
msgid "Export in Progress..."
|
6127 |
+
msgstr "جاري التصدير..."
|
|
|
6128 |
|
6129 |
+
#: templates/admin/csv-export.tpl.php:148
|
6130 |
+
msgctxt "admin csv-export"
|
6131 |
+
msgid ""
|
6132 |
+
"Your export file is being prepared. Please <u>do not leave</u> this page "
|
6133 |
+
"until the export finishes."
|
6134 |
msgstr ""
|
6135 |
+
"جاري إعداد ملف التصدير. المرجو <u>عدم ترك</u> هذه الصفحة حتى انتهاء التصدير."
|
|
|
6136 |
|
6137 |
+
#: templates/admin/csv-export.tpl.php:151
|
6138 |
+
msgctxt "admin csv-export"
|
6139 |
+
msgid "No. of listings:"
|
6140 |
+
msgstr "أرقام الإعلانات:"
|
6141 |
|
6142 |
+
#: templates/admin/csv-export.tpl.php:153
|
6143 |
+
msgctxt "admin csv-export"
|
6144 |
+
msgid "Approximate export file size:"
|
6145 |
+
msgstr "الحجم التقريبي لملف التصدير:"
|
|
|
6146 |
|
6147 |
+
#: templates/admin/csv-export.tpl.php:160
|
6148 |
+
msgctxt "admin csv-export"
|
6149 |
+
msgid "Cancel Export"
|
6150 |
+
msgstr "إلغاء التصدير"
|
|
|
|
|
|
|
|
|
6151 |
|
6152 |
+
#: templates/admin/csv-export.tpl.php:165
|
6153 |
+
msgctxt "admin csv-export"
|
6154 |
+
msgid "Export Complete"
|
6155 |
+
msgstr "تم التصدير"
|
6156 |
|
6157 |
+
#: templates/admin/csv-export.tpl.php:166
|
6158 |
+
msgctxt "admin csv-export"
|
6159 |
+
msgid ""
|
6160 |
+
"Your export file has been successfully created and it is now ready for "
|
6161 |
+
"download."
|
6162 |
+
msgstr "تم بنجاح إنشاء ملف التصدير، والآن جاهز للتحميل."
|
6163 |
|
6164 |
+
#: templates/admin/csv-export.tpl.php:170
|
6165 |
#, fuzzy
|
6166 |
+
msgctxt "admin csv-export"
|
6167 |
+
msgid "Download %1$s (%2$s)"
|
6168 |
+
msgstr "تحميل %s (%s)"
|
6169 |
+
|
6170 |
+
#: templates/admin/csv-export.tpl.php:177
|
6171 |
+
msgctxt "admin csv-export"
|
6172 |
msgid ""
|
6173 |
+
"Click \"Cleanup\" once the file has been downloaded in order to remove all "
|
6174 |
+
"temporary data created by Business Directory during the export process."
|
6175 |
msgstr ""
|
6176 |
+
"إضغط على \"تنظيف\" بعد تحميل الملف بغية إزالة جميع البيانات المؤقتة التي تم "
|
6177 |
+
"إنشاؤها بواسطة \"دليل الأعمال\" أثناء عملية التصدير."
|
6178 |
|
6179 |
+
#: templates/admin/csv-export.tpl.php:178
|
6180 |
+
msgctxt "admin csv-export"
|
6181 |
+
msgid "Cleanup"
|
6182 |
+
msgstr "نظف"
|
|
|
6183 |
|
6184 |
+
#: templates/admin/csv-export.tpl.php:183
|
6185 |
+
msgctxt "admin csv-export"
|
6186 |
+
msgid "Export Canceled"
|
6187 |
+
msgstr "ألغي التصدير"
|
|
|
6188 |
|
6189 |
+
#: templates/admin/csv-export.tpl.php:184
|
6190 |
+
msgctxt "admin csv-export"
|
6191 |
+
msgid "The export has been canceled."
|
6192 |
+
msgstr "تم إلغاء التصدير"
|
|
|
6193 |
|
6194 |
+
#: templates/admin/csv-export.tpl.php:185
|
6195 |
+
msgctxt "admin csv-export"
|
6196 |
+
msgid "← Return to CSV Export"
|
6197 |
+
msgstr "← العودة إلى تصدير CSV"
|
|
|
6198 |
|
6199 |
+
#: includes/admin/csv-import.php:296
|
6200 |
#, fuzzy
|
6201 |
+
msgctxt "csv import"
|
|
|
|
|
|
|
|
|
|
|
6202 |
msgid ""
|
6203 |
+
"A valid temporary directory with write permissions is required for CSV "
|
6204 |
+
"imports to function properly. Your server is using \"%s\" but this path does "
|
6205 |
+
"not seem to be writable. Please consult with your host."
|
6206 |
msgstr ""
|
6207 |
+
"مطلوب مجلد مؤقت صالح مع صلاحية الكتابة لاستيراد CSV لكي يعمل بشكل صحيح. "
|
6208 |
+
"الخادم الخاص بك يستخدام \"%s\" ولكن هذا المسار لا يبدو أنه قابل للكتابة. "
|
6209 |
+
"يرجى استشارة الاستضافة الخاص بك."
|
6210 |
|
6211 |
+
#: includes/admin/helpers/class-listing-information-metabox.php:20
|
6212 |
#, fuzzy
|
6213 |
+
msgctxt "listing metabox"
|
6214 |
+
msgid "Recent Payments"
|
6215 |
+
msgstr "رفض الدفع"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6216 |
|
6217 |
+
#: includes/admin/helpers/class-listing-information-metabox.php:24
|
6218 |
#, fuzzy
|
6219 |
+
msgctxt "listing metabox"
|
6220 |
+
msgid "Access Key"
|
6221 |
+
msgstr "مفتاح الوصول"
|
6222 |
|
6223 |
+
#: templates/admin/metaboxes-listing-information-payments.tpl.php:14
|
6224 |
#, fuzzy
|
6225 |
+
msgctxt "listing metabox"
|
6226 |
+
msgid "Click a transaction to see its details (and approve/reject)."
|
6227 |
+
msgstr "إضغط فوق دفع للاطلاع على تفاصيل أو الموافقة على/رفض المعاملة."
|
6228 |
|
6229 |
+
#: templates/admin/metaboxes-listing-information-payments.tpl.php:35
|
6230 |
#, fuzzy
|
6231 |
+
msgctxt "listing metabox"
|
6232 |
+
msgid "No payments available."
|
6233 |
+
msgstr "غير متاح"
|
|
|
|
|
|
|
6234 |
|
6235 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:12
|
6236 |
#, fuzzy
|
6237 |
+
msgctxt "listing metabox"
|
6238 |
+
msgid "General Info"
|
6239 |
+
msgstr "معلومات عامة"
|
6240 |
|
6241 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:14
|
6242 |
#, fuzzy
|
6243 |
+
msgctxt "listing metabox"
|
6244 |
+
msgid "Listing Status"
|
6245 |
+
msgstr "الإعلانات"
|
|
|
|
|
|
|
|
|
6246 |
|
6247 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:20
|
6248 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:31
|
6249 |
#, fuzzy
|
6250 |
+
msgctxt "listing metabox"
|
6251 |
+
msgid "N/A"
|
6252 |
+
msgstr "N/A غير قابل للتطبيق"
|
6253 |
|
6254 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:27
|
6255 |
#, fuzzy
|
6256 |
+
msgctxt "listing metabox"
|
6257 |
+
msgid "Last renew date"
|
6258 |
+
msgstr "تاريخ التجديد"
|
6259 |
|
6260 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:35
|
6261 |
#, fuzzy
|
6262 |
+
msgctxt "listing metabox"
|
6263 |
+
msgid "Plan Details"
|
6264 |
+
msgstr "تفاصيل الخطة"
|
|
|
|
|
|
|
|
|
|
|
6265 |
|
6266 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:37
|
6267 |
+
msgctxt "listing metabox"
|
6268 |
+
msgid "Fee Plan"
|
6269 |
msgstr ""
|
6270 |
|
6271 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:46
|
6272 |
+
msgctxt "listing metabox"
|
6273 |
+
msgid "Change plan"
|
|
|
6274 |
msgstr ""
|
6275 |
|
6276 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:69
|
6277 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:89
|
6278 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:103
|
|
|
|
|
|
|
|
|
6279 |
#, fuzzy
|
6280 |
+
msgctxt "listing metabox"
|
6281 |
+
msgid "OK"
|
6282 |
+
msgstr "حسناً"
|
|
|
|
|
|
|
|
|
6283 |
|
6284 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:70
|
6285 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:90
|
6286 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:104
|
6287 |
#, fuzzy
|
6288 |
+
msgctxt "listing metabox"
|
6289 |
+
msgid "Cancel"
|
6290 |
+
msgstr "إلغاء"
|
6291 |
|
6292 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:79
|
6293 |
#, fuzzy
|
6294 |
+
msgctxt "listing metabox"
|
6295 |
+
msgid "Expires On"
|
6296 |
+
msgstr "ستنتهي الصلاحية في"
|
6297 |
|
6298 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:94
|
6299 |
#, fuzzy
|
6300 |
+
msgctxt "listing metabox"
|
6301 |
+
msgid "# of images"
|
6302 |
+
msgstr "# الصور"
|
|
|
|
|
|
|
|
|
6303 |
|
6304 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:107
|
6305 |
#, fuzzy
|
6306 |
+
msgctxt "listing metabox"
|
6307 |
+
msgid "Is Featured?"
|
6308 |
+
msgstr "تغذية %s"
|
6309 |
|
6310 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:114
|
6311 |
#, fuzzy
|
6312 |
+
msgctxt "listing metabox"
|
6313 |
+
msgid "Is Recurring?"
|
6314 |
+
msgstr "(متكرر)"
|
|
|
|
|
|
|
|
|
6315 |
|
6316 |
+
#: includes/admin/helpers/class-listing-timeline.php:111
|
6317 |
+
#, fuzzy
|
6318 |
+
msgctxt "listing timeline"
|
6319 |
+
msgid "Listing created"
|
6320 |
+
msgstr "صور الإعلانات"
|
6321 |
|
6322 |
+
#: includes/admin/helpers/class-listing-timeline.php:116
|
6323 |
#, fuzzy
|
6324 |
+
msgctxt "listing timeline"
|
6325 |
+
msgid "Listing expired"
|
6326 |
+
msgstr "الإعلان منتهي التاريخ"
|
6327 |
|
6328 |
+
#: includes/admin/helpers/class-listing-timeline.php:126
|
6329 |
+
msgctxt "listing timeline"
|
6330 |
+
msgid "T&C acceptance date"
|
|
|
6331 |
msgstr ""
|
6332 |
|
6333 |
+
#: includes/admin/helpers/class-listing-timeline.php:141
|
6334 |
+
msgctxt "listing timeline"
|
6335 |
+
msgid "Paid as admin"
|
|
|
|
|
|
|
6336 |
msgstr ""
|
6337 |
|
6338 |
+
#: includes/admin/helpers/class-listing-timeline.php:143
|
6339 |
#, fuzzy
|
6340 |
+
msgctxt "listing timeline"
|
6341 |
+
msgid "Listing imported"
|
6342 |
+
msgstr "الإعلان منتهي التاريخ"
|
6343 |
|
6344 |
+
#: includes/admin/helpers/class-listing-timeline.php:145
|
6345 |
#, fuzzy
|
6346 |
+
msgctxt "listing timeline"
|
6347 |
+
msgid "Initial Payment"
|
6348 |
+
msgstr "الدفعة الأولية"
|
6349 |
|
6350 |
+
#: includes/admin/helpers/tables/class-fees-table.php:52
|
6351 |
+
msgctxt "admin fees table"
|
6352 |
+
msgid "All"
|
6353 |
+
msgstr "الكل"
|
|
|
6354 |
|
6355 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:20
|
6356 |
+
msgctxt "form-fields admin"
|
6357 |
+
msgid "form field"
|
6358 |
+
msgstr "حقل الاستمارة"
|
|
|
6359 |
|
6360 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:21
|
6361 |
+
msgctxt "form-fields admin"
|
6362 |
+
msgid "form fields"
|
6363 |
+
msgstr "حقول الاستمارة"
|
|
|
6364 |
|
6365 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:29
|
6366 |
+
msgctxt "form-fields admin"
|
6367 |
+
msgid "Order"
|
6368 |
+
msgstr "ترتيب"
|
|
|
6369 |
|
6370 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:30
|
6371 |
+
msgctxt "form-fields admin"
|
6372 |
+
msgid "Label / Association"
|
6373 |
+
msgstr "تسمية/رابطة"
|
|
|
6374 |
|
6375 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:32
|
6376 |
+
msgctxt "form-fields admin"
|
6377 |
+
msgid "Validator"
|
6378 |
+
msgstr "مدقق"
|
|
|
6379 |
|
6380 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:33
|
6381 |
+
msgctxt "form-fields admin"
|
6382 |
+
msgid "Field Attributes"
|
6383 |
+
msgstr "سمات الحقل"
|
|
|
6384 |
|
6385 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:133
|
6386 |
#, fuzzy
|
6387 |
+
msgctxt "form-fields admin"
|
6388 |
+
msgid "Shortname"
|
6389 |
+
msgstr "إسم الكاتب"
|
6390 |
|
6391 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:155
|
6392 |
+
msgctxt "form-fields admin"
|
6393 |
+
msgid "Required"
|
6394 |
+
msgstr "مطلوب"
|
|
|
6395 |
|
6396 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:155
|
6397 |
+
msgctxt "form-fields admin"
|
6398 |
+
msgid "Optional"
|
6399 |
+
msgstr "إختياري"
|
|
|
6400 |
|
6401 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:162
|
6402 |
#, fuzzy
|
6403 |
+
msgctxt "form-fields admin"
|
6404 |
+
msgid "Private"
|
6405 |
+
msgstr "قم بالتفعيل"
|
6406 |
|
6407 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:169
|
6408 |
+
msgctxt "form-fields admin"
|
6409 |
+
msgid "This field value is shown in the excerpt view of a listing."
|
6410 |
+
msgstr "قيمة هذا الحقل ظاهرة في عرض المقتطفات للإعلان."
|
|
|
6411 |
|
6412 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:170
|
6413 |
+
msgctxt "form-fields admin"
|
6414 |
+
msgid "In Excerpt"
|
6415 |
+
msgstr "في مقتطف"
|
6416 |
+
|
6417 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:177
|
6418 |
+
msgctxt "form-fields admin"
|
6419 |
+
msgid "This field value is shown in the single view of a listing."
|
6420 |
+
msgstr "قيمة هذا الحقل ظاهرة في العرض المفرد للإعلان."
|
6421 |
+
|
6422 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:178
|
6423 |
+
msgctxt "form-fields admin"
|
6424 |
+
msgid "In Listing"
|
6425 |
+
msgstr "في الإعلان"
|
6426 |
+
|
6427 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:309
|
6428 |
+
msgctxt "form-fields admin"
|
6429 |
+
msgid "Form Preview"
|
6430 |
+
msgstr "معاينة الاستمارة"
|
6431 |
+
|
6432 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:368
|
6433 |
+
msgctxt "form-fields admin"
|
6434 |
+
msgid "Form fields updated."
|
6435 |
+
msgstr "تم تحديث الاستمارة."
|
6436 |
+
|
6437 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:391
|
6438 |
+
msgctxt "form-fields admin"
|
6439 |
msgid ""
|
6440 |
+
"<b>Important</b>: Since the \"<a>Display email address fields publicly?</a>"
|
6441 |
+
"\" setting is disabled, display settings below will not be honored and this "
|
6442 |
+
"field will not be displayed on the frontend. If you want e-mail addresses to "
|
6443 |
+
"show on the frontend, you can <a>enable public display of e-mails</a>."
|
6444 |
msgstr ""
|
6445 |
+
"<b>هام</b>: نظرا لأن إعدادات \"<a>عرض حقول عنوان البريد الإلكتروني للعموم؟</"
|
6446 |
+
"a>\" معطلة، عرض الإعدادات أدناه لن يتم إظهاره ولن يتم عرض هذا الحقل على "
|
6447 |
+
"الواجهة. إذا كنت تريد إظهار عناوين البريد الإلكتروني في الواجهة، يمكنك "
|
6448 |
+
"<a>تمكين عرض البريد الإلكتروني للعموم</a>."
|
6449 |
|
6450 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:470
|
6451 |
+
msgctxt "form-fields admin"
|
6452 |
+
msgid "Field deleted."
|
6453 |
+
msgstr "تم حذف الحقل."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6454 |
|
6455 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:510
|
6456 |
+
msgctxt "form-fields admin"
|
6457 |
+
msgid "Required fields created successfully."
|
6458 |
+
msgstr "الحقول المطلوبة أنشئت بنجاح."
|
|
|
6459 |
|
6460 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:562
|
6461 |
+
msgctxt "form-fields admin"
|
6462 |
+
msgid "Tags updated."
|
6463 |
+
msgstr "تم تحديث الوسوم"
|
|
|
6464 |
|
6465 |
+
#: includes/fields/class-fieldtypes-checkbox.php:92
|
6466 |
#, fuzzy
|
6467 |
+
msgctxt "form-fields admin"
|
6468 |
+
msgid "Select All"
|
6469 |
+
msgstr "قائمة منسدلة"
|
6470 |
|
6471 |
+
#: includes/fields/class-fieldtypes-checkbox.php:110
|
6472 |
+
#: includes/fields/class-fieldtypes-radiobutton.php:90
|
6473 |
+
msgctxt "form-fields admin"
|
6474 |
+
msgid "Field Options (for select lists, radio buttons and checkboxes)."
|
6475 |
+
msgstr "خيارات الحقل (لتحديد القوائم وأزرار الخيارات وخانات الاختيار)."
|
6476 |
|
6477 |
+
#: includes/fields/class-fieldtypes-checkbox.php:122
|
6478 |
+
msgctxt "form-fields admin"
|
6479 |
+
msgid "Include \"Select all\"?"
|
6480 |
+
msgstr ""
|
|
|
6481 |
|
6482 |
+
#: includes/fields/class-fieldtypes-checkbox.php:126
|
6483 |
+
msgctxt "form-fields admin"
|
6484 |
+
msgid "Display \"Select all\" option among options above."
|
6485 |
+
msgstr ""
|
|
|
6486 |
|
6487 |
+
#: includes/fields/class-fieldtypes-checkbox.php:142
|
6488 |
+
#: includes/fields/class-fieldtypes-radiobutton.php:117
|
6489 |
+
msgctxt "form-fields admin"
|
6490 |
+
msgid "Field list of options is required."
|
6491 |
+
msgstr "قائمة خيارات الحقل مطلوبة."
|
6492 |
|
6493 |
+
#: includes/fields/class-fieldtypes-image.php:58
|
6494 |
#, fuzzy
|
6495 |
+
msgctxt "form-fields admin"
|
6496 |
+
msgid "Field Caption required?"
|
6497 |
+
msgstr "تسمية الحقل مطلوب."
|
6498 |
|
6499 |
+
#: includes/fields/class-fieldtypes-textarea.php:193
|
6500 |
+
msgctxt "form-fields admin"
|
6501 |
+
msgid "Allow HTML input for this field?"
|
6502 |
+
msgstr "السماح بإدخال HTML لهذا الحقل؟"
|
|
|
6503 |
|
6504 |
+
#: includes/fields/class-fieldtypes-textarea.php:196
|
6505 |
+
msgctxt "form-fields admin"
|
6506 |
+
msgid "Allow IFRAME tags in content?"
|
6507 |
+
msgstr "السماح لوسوم IFRAME في المحتوى؟"
|
|
|
6508 |
|
6509 |
+
#: includes/fields/class-fieldtypes-textarea.php:206
|
6510 |
+
msgctxt "form-fields admin"
|
6511 |
+
msgid "Allow WordPress shortcodes in this field?"
|
6512 |
+
msgstr "السماح بالأكواد القصيرة لووردبريس في هذا الحقل؟"
|
|
|
6513 |
|
6514 |
+
#: includes/fields/class-fieldtypes-textarea.php:211
|
6515 |
+
msgctxt "form-fields admin"
|
6516 |
+
msgid "Display a WYSIWYG editor on the frontend?"
|
6517 |
+
msgstr "عرض محرر WYSIWYG في واجهة الموقع؟"
|
6518 |
+
|
6519 |
+
#: includes/fields/class-fieldtypes-textarea.php:218
|
6520 |
+
msgctxt "form-fields admin"
|
6521 |
msgid ""
|
6522 |
+
"<b>Advanced users only!</b> Unless you've been told to change this, don't "
|
6523 |
+
"switch it unless you know what you're doing."
|
6524 |
msgstr ""
|
6525 |
+
"<b>للأعضاء المتقدمين فقط!</b> إلا إذا كنت قيل لك بتغيير هذا، لا تبدل إلا إذا "
|
6526 |
+
"كنت تعرف ما تفعله."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6527 |
|
6528 |
+
#: includes/fields/class-fieldtypes-textarea.php:219
|
6529 |
+
msgctxt "form-fields admin"
|
6530 |
+
msgid "Apply \"the_content\" filter before displaying this field?"
|
6531 |
+
msgstr "تطبيق عامل تصفية \"the_content\" قبل عرض هذا الحقل؟"
|
|
|
6532 |
|
6533 |
+
#: includes/fields/class-fieldtypes-textarea.php:222
|
6534 |
+
msgctxt "form-fields admin"
|
6535 |
+
msgid "Use shortened version of Description field as excerpt"
|
6536 |
+
msgstr ""
|
|
|
6537 |
|
6538 |
+
#: includes/fields/class-fieldtypes-textarea.php:223
|
6539 |
+
msgctxt "form-fields admin"
|
|
|
6540 |
msgid ""
|
6541 |
+
"Enable always (override the Short Description given with a shortened Long "
|
6542 |
+
"Description)"
|
|
|
|
|
6543 |
msgstr ""
|
|
|
|
|
|
|
|
|
6544 |
|
6545 |
+
#: includes/fields/class-fieldtypes-textarea.php:224
|
6546 |
+
msgctxt "form-fields admin"
|
6547 |
+
msgid ""
|
6548 |
+
"Enable conditionally (override ONLY when Short Description is empty with a "
|
6549 |
+
"shortened Long Description)"
|
6550 |
msgstr ""
|
6551 |
|
6552 |
+
#: includes/fields/class-fieldtypes-textarea.php:225
|
6553 |
+
msgctxt "form-fields admin"
|
6554 |
+
msgid "Disable (use the Short Description all the time, empty or not)"
|
|
|
|
|
|
|
|
|
|
|
|
|
6555 |
msgstr ""
|
6556 |
|
6557 |
+
#: includes/fields/class-fieldtypes-textarea.php:227
|
6558 |
+
msgctxt "form-fields admin"
|
6559 |
+
msgid ""
|
6560 |
+
"Truncates the description field to the value set here. To display all of the "
|
6561 |
+
"description, set to 0."
|
6562 |
+
msgstr ""
|
6563 |
|
6564 |
+
#: includes/fields/class-fieldtypes-textarea.php:228
|
6565 |
+
msgctxt "form-fields admin"
|
6566 |
msgid ""
|
6567 |
+
"Number of Characters from Short Description/Excerpt to Display in List View "
|
6568 |
+
"(only)"
|
|
|
|
|
6569 |
msgstr ""
|
6570 |
|
6571 |
+
#: includes/fields/class-fieldtypes-textarea.php:233
|
6572 |
+
msgctxt "form-fields admin"
|
6573 |
+
msgid "Automatically generate excerpt from content field?"
|
6574 |
+
msgstr "تلقائياً إنشاء مقتطفات من حقل المحتوى؟"
|
|
|
6575 |
|
6576 |
+
#: includes/fields/class-fieldtypes-twitter.php:83
|
6577 |
#, fuzzy
|
6578 |
+
msgctxt "form-fields admin"
|
6579 |
+
msgid "Show followers count?"
|
6580 |
+
msgstr "إظهار عدد إعلانات التصنيف؟"
|
6581 |
|
6582 |
+
#: templates/admin/form-fields-addoredit.tpl.php:29
|
6583 |
+
msgctxt "form-fields admin"
|
6584 |
+
msgid "Field Association"
|
6585 |
+
msgstr "رابطة الحقل"
|
|
|
6586 |
|
6587 |
+
#: templates/admin/form-fields-addoredit.tpl.php:29
|
6588 |
+
#: templates/admin/form-fields-addoredit.tpl.php:54
|
6589 |
+
#: templates/admin/form-fields-addoredit.tpl.php:77
|
6590 |
+
msgctxt "form-fields admin"
|
6591 |
+
msgid "required"
|
6592 |
+
msgstr "مطلوب"
|
6593 |
|
6594 |
+
#: templates/admin/form-fields-addoredit.tpl.php:54
|
6595 |
+
msgctxt "form-fields admin"
|
6596 |
+
msgid "Field Type"
|
6597 |
+
msgstr "نوع الحقل"
|
6598 |
|
6599 |
+
#: templates/admin/form-fields-addoredit.tpl.php:77
|
6600 |
+
msgctxt "form-fields admin"
|
6601 |
+
msgid "Field Label"
|
6602 |
+
msgstr "تسمية الحقل"
|
|
|
6603 |
|
6604 |
+
#: templates/admin/form-fields-addoredit.tpl.php:87
|
6605 |
+
msgctxt "form-fields admin"
|
6606 |
+
msgid "Field description"
|
6607 |
+
msgstr "وصف الحقل"
|
|
|
6608 |
|
6609 |
+
#: templates/admin/form-fields-addoredit.tpl.php:87
|
6610 |
+
msgctxt "form-fields admin"
|
6611 |
+
msgid "optional"
|
6612 |
+
msgstr "إختياري"
|
|
|
6613 |
|
6614 |
+
#: templates/admin/form-fields-addoredit.tpl.php:104
|
6615 |
+
msgctxt "form-fields admin"
|
6616 |
+
msgid "Field-specific settings"
|
6617 |
+
msgstr "إعدادات حقل خاص"
|
|
|
6618 |
|
6619 |
+
#: templates/admin/form-fields-addoredit.tpl.php:113
|
6620 |
+
msgctxt "form-fields admin"
|
6621 |
+
msgid "Field validation options"
|
6622 |
+
msgstr "خيارات التحقق من صحة الحقل"
|
6623 |
+
|
6624 |
+
#: templates/admin/form-fields-addoredit.tpl.php:117
|
6625 |
+
msgctxt "form-fields admin"
|
6626 |
+
msgid "Field Validator"
|
6627 |
+
msgstr "مصادقة الحقول"
|
6628 |
+
|
6629 |
+
#: templates/admin/form-fields-addoredit.tpl.php:121
|
6630 |
+
msgctxt "form-fields admin"
|
6631 |
+
msgid "No validation"
|
6632 |
+
msgstr "لا يوجد تحقق من الصحة"
|
6633 |
+
|
6634 |
+
#: templates/admin/form-fields-addoredit.tpl.php:143
|
6635 |
+
msgctxt "form-fields admin"
|
6636 |
+
msgid "Is field required?"
|
6637 |
+
msgstr "هل هذا الحقل مطلوب؟"
|
6638 |
+
|
6639 |
+
#: templates/admin/form-fields-addoredit.tpl.php:149
|
6640 |
+
msgctxt "form-fields admin"
|
6641 |
+
msgid "This field is required."
|
6642 |
+
msgstr "هذا الحقل مطلوب."
|
6643 |
|
6644 |
+
#: templates/admin/form-fields-addoredit.tpl.php:157
|
6645 |
+
msgctxt "form-fields admin"
|
6646 |
+
msgid "Field display options"
|
6647 |
+
msgstr "خيارات عرض الحقل"
|
|
|
6648 |
|
6649 |
+
#: templates/admin/form-fields-addoredit.tpl.php:161
|
6650 |
+
msgctxt "form-fields admin"
|
6651 |
+
msgid "Field Category Policy:"
|
6652 |
msgstr ""
|
6653 |
|
6654 |
+
#: templates/admin/form-fields-addoredit.tpl.php:166
|
6655 |
#, fuzzy
|
6656 |
+
msgctxt "form-fields admin"
|
6657 |
+
msgid "Field applies to all categories"
|
6658 |
+
msgstr "تجديد قائمة في جميع فئات منتهية الصلاحية"
|
6659 |
|
6660 |
+
#: templates/admin/form-fields-addoredit.tpl.php:167
|
6661 |
#, fuzzy
|
6662 |
+
msgctxt "form-fields admin"
|
6663 |
+
msgid "Field applies to only certain categories"
|
6664 |
+
msgstr "تجديد قائمة في جميع فئات منتهية الصلاحية"
|
6665 |
|
6666 |
+
#: templates/admin/form-fields-addoredit.tpl.php:171
|
6667 |
#, fuzzy
|
6668 |
+
msgctxt "form-fields admin"
|
6669 |
+
msgid "Limit field to the following categories:"
|
6670 |
+
msgstr "يمكنك استخدام العناصر النائبة التالية:"
|
6671 |
|
6672 |
+
#: templates/admin/form-fields-addoredit.tpl.php:195
|
6673 |
+
msgctxt "form-fields admin"
|
6674 |
+
msgid "Click to add categories to the selection."
|
6675 |
+
msgstr ""
|
|
|
6676 |
|
6677 |
+
#: templates/admin/form-fields-addoredit.tpl.php:208
|
6678 |
+
msgctxt "form-fields admin"
|
6679 |
+
msgid "Show this field to admin users only?"
|
|
|
|
|
|
|
|
|
6680 |
msgstr ""
|
|
|
|
|
|
|
6681 |
|
6682 |
+
#: templates/admin/form-fields-addoredit.tpl.php:214
|
6683 |
#, fuzzy
|
6684 |
+
msgctxt "form-fields admin"
|
6685 |
+
msgid "Display this field to admin users only in the edit listing view."
|
6686 |
+
msgstr "عرض هذه القيمة في مشاهدة الإعلان."
|
6687 |
|
6688 |
+
#: templates/admin/form-fields-addoredit.tpl.php:220
|
6689 |
+
msgctxt "form-fields admin"
|
6690 |
+
msgid "Show this value in excerpt view?"
|
6691 |
+
msgstr "إظهار هذه القيمة في مشاهدة المقتطفات؟"
|
|
|
|
|
|
|
|
|
|
|
6692 |
|
6693 |
+
#: templates/admin/form-fields-addoredit.tpl.php:226
|
6694 |
+
msgctxt "form-fields admin"
|
6695 |
+
msgid "Display this value in post excerpt view."
|
6696 |
+
msgstr "عرض هذه القيمة في مشاهدة مقتطفات المقالة."
|
6697 |
|
6698 |
+
#: templates/admin/form-fields-addoredit.tpl.php:232
|
6699 |
+
msgctxt "form-fields admin"
|
6700 |
+
msgid "Show this value in listing view?"
|
6701 |
+
msgstr "إظهار هذه القيمة في مشاهدة الإعلان؟"
|
|
|
|
|
|
|
|
|
6702 |
|
6703 |
+
#: templates/admin/form-fields-addoredit.tpl.php:238
|
6704 |
+
msgctxt "form-fields admin"
|
6705 |
+
msgid "Display this value in the listing view."
|
6706 |
+
msgstr "عرض هذه القيمة في مشاهدة الإعلان."
|
|
|
6707 |
|
6708 |
+
#: templates/admin/form-fields-addoredit.tpl.php:244
|
6709 |
+
msgctxt "form-fields admin"
|
6710 |
+
msgid "Include this field in the search form?"
|
6711 |
+
msgstr "تضمين هذا الحقل في نموذج البحث؟"
|
|
|
6712 |
|
6713 |
+
#: templates/admin/form-fields-addoredit.tpl.php:250
|
6714 |
+
msgctxt "form-fields admin"
|
6715 |
+
msgid "Include this field in the search form."
|
6716 |
+
msgstr "تضمين هذا الحقل في نموذج البحث."
|
|
|
6717 |
|
6718 |
+
#: templates/admin/form-fields-addoredit.tpl.php:256
|
6719 |
#, fuzzy
|
6720 |
+
msgctxt "form-fields admin"
|
6721 |
+
msgid "Is this field required for searching?"
|
6722 |
+
msgstr "هل هذا الحقل مطلوب؟"
|
6723 |
|
6724 |
+
#: templates/admin/form-fields-addoredit.tpl.php:274
|
6725 |
+
msgctxt "form-fields admin"
|
6726 |
+
msgid "Hide this field's label?"
|
6727 |
+
msgstr "إخفاء تسمية هذا الحقل؟"
|
|
|
6728 |
|
6729 |
+
#: templates/admin/form-fields-addoredit.tpl.php:280
|
6730 |
+
msgctxt "form-fields admin"
|
6731 |
+
msgid "Hide this field's label when displaying it."
|
6732 |
+
msgstr "إخفاء تسمية هذا الحقل عند عرضه."
|
|
|
6733 |
|
6734 |
+
#: templates/admin/form-fields-addoredit.tpl.php:288
|
6735 |
#, fuzzy
|
6736 |
+
msgctxt "form-fields admin"
|
6737 |
+
msgid "Field privacy options"
|
6738 |
+
msgstr "خيارات عرض الحقل"
|
6739 |
+
|
6740 |
+
#: templates/admin/form-fields-addoredit.tpl.php:292
|
6741 |
+
msgctxt "form-fields admin"
|
6742 |
+
msgid "This field contains sensitive or private information?"
|
6743 |
msgstr ""
|
|
|
|
|
6744 |
|
6745 |
+
#: templates/admin/form-fields-addoredit.tpl.php:300
|
6746 |
+
msgctxt "form-fields admin"
|
6747 |
+
msgid "Add this field when exporting or deleting user's personal data."
|
6748 |
+
msgstr ""
|
|
|
6749 |
|
6750 |
+
#: templates/admin/form-fields-addoredit.tpl.php:309
|
6751 |
+
msgctxt "form-fields admin"
|
6752 |
+
msgid "Update Field"
|
6753 |
+
msgstr "تحديث الحقل"
|
|
|
6754 |
|
6755 |
+
#: templates/admin/form-fields-addoredit.tpl.php:311
|
6756 |
+
msgctxt "form-fields admin"
|
6757 |
+
msgid "Add Field"
|
6758 |
+
msgstr "إضافة حقل"
|
|
|
6759 |
|
6760 |
+
#: templates/admin/form-fields-tags.tpl.php:5
|
6761 |
+
msgctxt "form-fields admin"
|
6762 |
+
msgid "-- None --"
|
6763 |
+
msgstr "-- إختر --"
|
|
|
6764 |
|
6765 |
+
#: templates/admin/form-fields-tags.tpl.php:14
|
6766 |
+
msgctxt "form-fields admin"
|
6767 |
+
msgid "Theme Tags"
|
6768 |
+
msgstr "وسوم القالب"
|
6769 |
|
6770 |
+
#: templates/admin/form-fields-tags.tpl.php:19
|
6771 |
+
msgctxt "form-fields admin"
|
6772 |
+
msgid ""
|
6773 |
+
"Before you create fields, make sure you've mapped all of your EXISTING ones "
|
6774 |
+
"first, otherwise you'll appear to be \"missing data\" on your listings."
|
6775 |
msgstr ""
|
6776 |
+
"قبل إنشاء الحقول، تأكد من أنك قمت بتعيين كل الموجودين مسبقا، وإلا سوف تبدو "
|
6777 |
+
"\"بيانات مفقودة\" في إعلاناتك."
|
6778 |
|
6779 |
+
#: templates/admin/form-fields-tags.tpl.php:22
|
6780 |
+
msgctxt "form-fields admin"
|
6781 |
+
msgid "Create Missing Fields"
|
6782 |
+
msgstr "إنشاء الحقول المفقودة"
|
6783 |
|
6784 |
+
#: templates/admin/form-fields.tpl.php:4
|
6785 |
+
msgctxt "form-fields admin"
|
6786 |
+
msgid "Add New Form Field"
|
6787 |
+
msgstr "إضافة حقل نموذج جديد"
|
|
|
6788 |
|
6789 |
+
#: templates/admin/form-fields.tpl.php:11
|
6790 |
+
msgctxt "form-fields admin"
|
6791 |
+
msgid "Preview Form"
|
6792 |
+
msgstr "معاينة الاستمارة"
|
6793 |
+
|
6794 |
+
#: templates/admin/form-fields.tpl.php:17
|
6795 |
+
msgctxt "form-fields admin"
|
6796 |
+
msgid "Manage Theme Tags"
|
6797 |
+
msgstr "إدارة وسوم القالب"
|
6798 |
+
|
6799 |
+
#: templates/admin/form-fields.tpl.php:28
|
6800 |
+
msgctxt "form-fields admin"
|
6801 |
+
msgid ""
|
6802 |
+
"Here, you can create new fields for your listings, edit or delete existing "
|
6803 |
+
"ones, change the order and visibility of the fields as well as configure "
|
6804 |
+
"special options for them."
|
6805 |
msgstr ""
|
6806 |
+
"هنا، يمكنك إنشاء حقول جديدة لإعلاناتك، تحرير أو حذف الموجود منها، وتغيير "
|
6807 |
+
"ترتيب وإبراز الحقول فضلا عن إعداد خيارات خاصة لهم."
|
6808 |
|
6809 |
+
#: templates/admin/form-fields.tpl.php:39
|
6810 |
+
msgctxt "form-fields admin"
|
6811 |
+
msgid "Please see the <a>Form Fields documentation</a> for more details."
|
6812 |
+
msgstr "المرجو مراجعة <a>وثائق حقول الاستمارة</a> للحصول على مزيد من التفاصيل."
|
|
|
6813 |
|
6814 |
#: includes/admin/settings/class-settings-bootstrap.php:637
|
6815 |
#: includes/admin/settings/class-settings-bootstrap.php:650
|
6850 |
msgid "Time: %s"
|
6851 |
msgstr "الوقت: %s"
|
6852 |
|
6853 |
+
#: includes/admin/tracking.php:189
|
6854 |
msgctxt "tracking"
|
6855 |
msgid "Help Improve Business Directory"
|
6856 |
msgstr "المساعدة في تحسين دليل الأعمال"
|
6857 |
|
6858 |
+
#: includes/admin/tracking.php:191
|
6859 |
msgctxt "tracking"
|
6860 |
msgid ""
|
6861 |
"Can Business Directory keep track of your theme, plugins, and other non-"
|
6866 |
"المعلومات غير الشخصية، والتي لا تعرف بك لمساعدتنا في اختبار الإضافة "
|
6867 |
"للإصدارات المستقبلية؟"
|
6868 |
|
6869 |
+
#: includes/admin/tracking.php:193
|
6870 |
msgctxt "tracking"
|
6871 |
msgid "What do you track?"
|
6872 |
msgstr "ما الذي تتتبع؟"
|
6946 |
msgid "Migrating listing information: %d items remaining..."
|
6947 |
msgstr ""
|
6948 |
|
6949 |
+
#: includes/admin/upgrades/migrations/migration-3_2.php:78
|
6950 |
msgctxt "installer"
|
6951 |
msgid ""
|
6952 |
"<b>Business Directory Plugin - Regions Module</b> was disabled because it is "
|
6989 |
msgid "Listing upgrade to featured"
|
6990 |
msgstr "الترقية الى إعلان مميز"
|
6991 |
|
6992 |
+
#: includes/installer.php:63
|
6993 |
msgctxt "installer"
|
6994 |
msgid "Default Fee"
|
6995 |
msgstr "رسوم افتراضية"
|
7146 |
msgid "Add New Listing"
|
7147 |
msgstr "إضافة إعلان جديد"
|
7148 |
|
7149 |
+
#: includes/models/class-listing.php:420
|
7150 |
#, fuzzy
|
7151 |
msgctxt "listing"
|
7152 |
msgid "Listing has no registered payments"
|
7153 |
msgstr "إنتهاء صلاحية الإعلان"
|
7154 |
|
7155 |
+
#: includes/models/class-listing.php:429
|
7156 |
#, fuzzy
|
7157 |
msgctxt "listing"
|
7158 |
msgid "Can't delete payment"
|
7159 |
msgstr "رفض الدفع"
|
7160 |
|
7161 |
+
#: includes/models/class-listing.php:467
|
7162 |
#, fuzzy
|
7163 |
msgctxt "listing"
|
7164 |
msgid "Listing expired"
|
7165 |
msgstr "الإعلان منتهي التاريخ"
|
7166 |
|
7167 |
+
#: includes/models/class-listing.php:655
|
7168 |
#, fuzzy
|
7169 |
msgctxt "listing"
|
7170 |
msgid "(Unavailable Plan)"
|
7171 |
msgstr "(رسم غير متوفر)"
|
7172 |
|
7173 |
+
#: includes/models/class-listing.php:817
|
7174 |
#, fuzzy
|
7175 |
msgctxt "listing"
|
7176 |
msgid "Plan \"%s\" (recurring)"
|
7177 |
msgstr "(متكرر)"
|
7178 |
|
7179 |
+
#: includes/models/class-listing.php:819
|
7180 |
msgctxt "listing"
|
7181 |
msgid "Plan \"%s\""
|
7182 |
msgstr ""
|
7186 |
msgid "Add New Listing"
|
7187 |
msgstr "إضافة إعلان جديد"
|
7188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7189 |
#. translators: [%s] is the name of the blog.
|
7190 |
#: includes/class-listing-email-notification.php:237
|
7191 |
msgctxt "notify email"
|
7241 |
#, fuzzy
|
7242 |
msgctxt "notify email"
|
7243 |
msgid "Payment Details"
|
7244 |
+
msgstr "تفاصيل الدفع"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7245 |
|
7246 |
+
#: templates/email/listing-payment-completed.tpl.php:33
|
7247 |
#, fuzzy
|
7248 |
+
msgctxt "notify email"
|
7249 |
+
msgid "Listing URL"
|
7250 |
+
msgstr "عنوان URL الإعلان"
|
7251 |
|
7252 |
+
#: templates/email/listing-payment-completed.tpl.php:35
|
7253 |
#, fuzzy
|
7254 |
+
msgctxt "notify email"
|
7255 |
+
msgid "Listing admin URL"
|
7256 |
+
msgstr "عنوان URL الإعلان"
|
7257 |
+
|
7258 |
+
#: templates/email/listing-reported.tpl.php:17
|
7259 |
+
msgctxt "notify email"
|
7260 |
+
msgid "Categories"
|
7261 |
+
msgstr "التصنيفات"
|
7262 |
|
7263 |
+
#: templates/email/listing-reported.tpl.php:21
|
7264 |
#, fuzzy
|
7265 |
+
msgctxt "notify email"
|
7266 |
+
msgid "Report Information"
|
7267 |
+
msgstr "معلومات الرسوم"
|
7268 |
|
7269 |
+
#: templates/email/listing-reported.tpl.php:24
|
7270 |
#, fuzzy
|
7271 |
+
msgctxt "notify email"
|
7272 |
+
msgid "User name"
|
7273 |
+
msgstr "عضو"
|
|
|
|
|
7274 |
|
7275 |
+
#: templates/email/listing-reported.tpl.php:28
|
|
|
7276 |
#, fuzzy
|
7277 |
+
msgctxt "notify email"
|
7278 |
+
msgid "User Email"
|
7279 |
+
msgstr "بريدك الإلكتروني"
|
7280 |
|
7281 |
+
#: templates/email/listing-reported.tpl.php:31
|
7282 |
+
msgctxt "notify email"
|
7283 |
+
msgid "Report IP"
|
7284 |
msgstr ""
|
7285 |
|
7286 |
+
#: templates/email/listing-reported.tpl.php:33
|
7287 |
#, fuzzy
|
7288 |
+
msgctxt "notify email"
|
7289 |
+
msgid "Report selected option"
|
7290 |
+
msgstr "إختيار تصنيف"
|
7291 |
+
|
7292 |
+
#: templates/email/listing-reported.tpl.php:35
|
7293 |
+
msgctxt "notify email"
|
7294 |
+
msgid "Report additional info"
|
7295 |
+
msgstr ""
|
7296 |
+
|
7297 |
+
#: includes/class-meta.php:37
|
7298 |
+
msgctxt "rss feed"
|
7299 |
+
msgid "%s Feed"
|
7300 |
+
msgstr "تغذية %s"
|
7301 |
+
|
7302 |
+
#: includes/class-meta.php:160
|
7303 |
+
msgctxt "title"
|
7304 |
+
msgid "Find a Listing"
|
7305 |
+
msgstr "العثور على إعلان"
|
7306 |
+
|
7307 |
+
#: includes/class-meta.php:195
|
7308 |
+
msgctxt "title"
|
7309 |
+
msgid "Listings tagged: %s"
|
7310 |
+
msgstr "إعلانات ذات وسم: %s"
|
7311 |
|
7312 |
+
#: includes/class-payment-gateways.php:95
|
7313 |
#, fuzzy
|
7314 |
+
msgctxt "payment-gateways"
|
7315 |
+
msgid "Enable %s?"
|
7316 |
+
msgstr "تفعيل"
|
7317 |
|
7318 |
+
#: includes/class-payment-gateways.php:129
|
7319 |
#, fuzzy
|
7320 |
+
msgctxt "payment-gateways"
|
7321 |
+
msgid ""
|
7322 |
+
"The <gateway> gateway is enabled but not properly configured. The gateway "
|
7323 |
+
"won't be available until the following problems are fixed: <problems>."
|
7324 |
+
msgstr ""
|
7325 |
+
"البوابة <b>%s</b> مفعلة ولكن لم يتم إعدادها بشكل صحيح. البوابة لن تكون "
|
7326 |
+
"متوفرة حتى يتم إصلاح المشاكل التالية <b>%s</b>.<br/> تحقق من <a href=\"%s"
|
7327 |
+
"\">إعدادات دفع</a> ."
|
7328 |
|
7329 |
+
#: includes/class-payment-gateways.php:131
|
7330 |
+
msgctxt "payment-gateways"
|
7331 |
+
msgid "Please check the <link>payment settings</link>."
|
7332 |
msgstr ""
|
7333 |
|
7334 |
+
#: includes/class-payment-gateways.php:142
|
7335 |
+
#, fuzzy
|
7336 |
+
msgctxt "payment-gateways"
|
7337 |
+
msgid ""
|
7338 |
+
"You have payments turned on but no gateway is active and properly "
|
7339 |
+
"configured. Go to <link>Manage Options - Payment</link> to change the "
|
7340 |
+
"payment settings. Until you change this, the directory will operate in "
|
7341 |
+
"<i>Free Mode</i>."
|
7342 |
msgstr ""
|
7343 |
+
"لديك مدفوعات مشغلة ولكن لا توجد بوابة مفعلة ومعدة بشكل صحيح. إذهب إلى <a "
|
7344 |
+
"href=\"%s\">إدارة الخيارات - الدفع</a> لتغيير إعدادات الدفع. حتى تقوم بتغيير "
|
7345 |
+
"ذلك، فإن الدليل سيعمل بـ <i>الوضع المجاني.</i>"
|
7346 |
|
7347 |
#: includes/class-recaptcha.php:32
|
7348 |
msgctxt "recaptcha"
|
7355 |
msgid "The reCAPTCHA validation score failed."
|
7356 |
msgstr "لم يتم إدخال reCAPTCHA بشكل صحيح."
|
7357 |
|
7358 |
+
#: includes/class-wpbdp.php:459
|
7359 |
#, fuzzy
|
7360 |
msgctxt "listing image upload"
|
7361 |
msgid "Can not upload any more images for this listing."
|
7362 |
msgstr "التصنيفات لهذا الإعلان"
|
7363 |
|
7364 |
+
#: includes/class-wpbdp.php:463
|
7365 |
msgctxt "listing image upload"
|
7366 |
msgid ""
|
7367 |
"You're trying to upload %1$d images, but only have %2$d slot available. "
|
7376 |
msgstr[4] ""
|
7377 |
msgstr[5] ""
|
7378 |
|
7379 |
+
#: includes/compatibility/class-navxt-integration.php:200
|
7380 |
msgctxt "navxt"
|
7381 |
msgid "Submit Listing"
|
7382 |
msgstr "إضافة إعلان"
|
7590 |
"إعلانات بداخلها. هذا يعني أنها لن تظهر على الواجهة الأمامية للموقع الخاص بك. "
|
7591 |
"إذا كنت لا تريد ذلك، إضغط <a>هنا</a> لتغيير الإعداد."
|
7592 |
|
7593 |
+
#: includes/controllers/pages/class-submit-listing.php:412
|
7594 |
msgctxt "templates"
|
7595 |
msgid ""
|
7596 |
"<b>View not available</b>. Do you have the \"Disable Frontend Listing "
|
7599 |
"<b>المشاهدة غير متوفرة</b>. هل لديك \"تعطيل إضافة إعلان من واجهة الموقع؟\" "
|
7600 |
"محددة في الإعدادات؟"
|
7601 |
|
7602 |
+
#: includes/controllers/pages/class-submit-listing.php:414
|
7603 |
msgctxt "templates"
|
7604 |
msgid ""
|
7605 |
"Listing submission has been disabled. Contact the administrator for details."
|
7606 |
msgstr ""
|
7607 |
|
7608 |
+
#: includes/controllers/pages/class-submit-listing.php:810
|
7609 |
msgctxt "templates"
|
7610 |
msgid ""
|
7611 |
"<b>There are no Fee Plans available</b>, without a fee plan site users can't "
|
7612 |
"submit a listing. %s to create a fee plan"
|
7613 |
msgstr ""
|
7614 |
|
7615 |
+
#: includes/controllers/pages/class-submit-listing.php:824
|
7616 |
msgctxt "templates"
|
7617 |
msgid ""
|
7618 |
"Listing submission is not available at the moment. Contact the administrator "
|
7619 |
"for details."
|
7620 |
msgstr ""
|
7621 |
|
7622 |
+
#: includes/controllers/pages/class-submit-listing.php:827
|
7623 |
msgctxt "templates"
|
7624 |
msgid ""
|
7625 |
"<b>View not available</b>, there is no \"Category\" association field. %s "
|
7627 |
"an existing field"
|
7628 |
msgstr ""
|
7629 |
|
7630 |
+
#: includes/controllers/pages/class-submit-listing.php:1271
|
7631 |
msgctxt "templates"
|
7632 |
msgid "Please agree to the Terms and Conditions."
|
7633 |
msgstr "يرجى الموافقة على الشروط والأحكام."
|
7634 |
|
7635 |
+
#: includes/controllers/pages/class-submit-listing.php:1285
|
7636 |
#, fuzzy
|
7637 |
msgctxt "templates"
|
7638 |
msgid "I agree to the <a>Terms and Conditions</a>"
|
7639 |
msgstr "أوافق على الشروط والأحكام"
|
7640 |
|
7641 |
+
#: includes/helpers/functions/general.php:1354
|
7642 |
#, fuzzy
|
7643 |
msgctxt "templates"
|
7644 |
msgid "Return to results"
|
7645 |
msgstr "العودة إلى الدليل."
|
7646 |
|
7647 |
+
#: includes/helpers/functions/templates-ui.php:223
|
|
|
|
|
|
|
|
|
|
|
|
|
7648 |
msgctxt "templates"
|
7649 |
msgid "No listing categories found."
|
7650 |
msgstr "لم يتم العثور على تصنيفات الإعلانات."
|
7651 |
|
7652 |
+
#: includes/helpers/functions/templates-ui.php:374
|
7653 |
msgctxt "templates"
|
7654 |
msgid "Advanced Search"
|
7655 |
msgstr "بحث متقدم"
|
7656 |
|
7657 |
+
#: includes/payment.php:278 templates/renew-resume.tpl.php:34
|
7658 |
+
#, fuzzy
|
7659 |
+
msgctxt "templates"
|
7660 |
+
msgid "Return to fee selection"
|
7661 |
+
msgstr "الرجوع إلى الإعلان."
|
7662 |
+
|
7663 |
#: templates/listing-sticky-tag.tpl.php:11
|
7664 |
#: templates/listing-sticky-tag.tpl.php:12
|
7665 |
msgctxt "templates"
|
7855 |
"معرف التجديد الخاص بك غير صالح. يرجى استخدام عنوان URL الذي أعطي لك في رسالة "
|
7856 |
"التجديد بالبريد الإلكتروني."
|
7857 |
|
7858 |
+
#: includes/controllers/pages/class-renew-listing.php:67
|
7859 |
#, fuzzy
|
7860 |
msgctxt "renewal"
|
7861 |
msgid "Your listing has been removed from the directory."
|
7862 |
msgstr "تم حذف إعلانك."
|
7863 |
|
7864 |
+
#: includes/controllers/pages/class-renew-listing.php:69
|
7865 |
+
#, fuzzy
|
7866 |
+
msgctxt "renewal"
|
7867 |
+
msgid "Could not remove listing from directory."
|
7868 |
+
msgstr "تعذر إزالة مجلد القالب السابق \"%s\"."
|
7869 |
+
|
7870 |
+
#: templates/renew-listing-manage-subscription.tpl.php:6
|
7871 |
+
msgctxt "renewal"
|
7872 |
+
msgid "Current Fee Details"
|
7873 |
+
msgstr "تفاصيل الرسوم الحالية"
|
7874 |
+
|
7875 |
+
#: templates/renew-listing-manage-subscription.tpl.php:9
|
7876 |
+
#, fuzzy
|
7877 |
+
msgctxt "renewal"
|
7878 |
+
msgid "Name:"
|
7879 |
+
msgstr "الإسم:"
|
7880 |
+
|
7881 |
+
#: templates/renew-listing-manage-subscription.tpl.php:11
|
7882 |
+
msgctxt "renewal"
|
7883 |
+
msgid "Number of images:"
|
7884 |
+
msgstr "عدد الصور:"
|
7885 |
+
|
7886 |
+
#: templates/renew-listing-manage-subscription.tpl.php:13
|
7887 |
+
msgctxt "renewal"
|
7888 |
+
msgid "Expiration date:"
|
7889 |
+
msgstr "تاريخ انتهاء التاريخ:"
|
7890 |
+
|
7891 |
+
#: templates/renew-listing.tpl.php:15
|
7892 |
+
msgctxt "renewal"
|
7893 |
+
msgid "Proceed to Checkout"
|
7894 |
+
msgstr "قم بإنهاء الشراء"
|
7895 |
+
|
7896 |
+
#: templates/renew-listing.tpl.php:40
|
7897 |
+
#, fuzzy
|
7898 |
+
msgctxt "renewal"
|
7899 |
+
msgid ""
|
7900 |
+
"Clicking the button below will cause your listing to be permanently removed "
|
7901 |
+
"from the directory."
|
7902 |
+
msgstr "تم حذف إعلانك."
|
7903 |
+
|
7904 |
+
#: templates/renew-resume.tpl.php:10
|
7905 |
+
#, fuzzy
|
7906 |
+
msgctxt "renewal"
|
7907 |
+
msgid "Renew Fee Resume"
|
7908 |
+
msgstr "تجديد مفتاح الترخيص"
|
7909 |
+
|
7910 |
+
#: templates/renew-resume.tpl.php:15
|
7911 |
+
#, fuzzy
|
7912 |
+
msgctxt "renewal"
|
7913 |
+
msgid "You are about to renew the listing %s."
|
7914 |
+
msgstr "أنت على وشك تجديد الإعلان \"%s\" النشر داخل التصنيف \"%s\"."
|
7915 |
+
|
7916 |
+
#: templates/renew-resume.tpl.php:20
|
7917 |
+
msgctxt "renewal"
|
7918 |
+
msgid "In order to complete the renewal, please confirm fee selection."
|
7919 |
+
msgstr ""
|
7920 |
+
|
7921 |
+
#: includes/controllers/pages/class-renew-listing.php:150
|
7922 |
+
#, fuzzy
|
7923 |
+
msgctxt "listings"
|
7924 |
+
msgid "Fee \"%s\" renewal."
|
7925 |
+
msgstr "رسوم \"%s\" تجديد التصنيف \"%s\""
|
7926 |
+
|
7927 |
+
#: includes/controllers/pages/class-request-access-keys.php:13
|
7928 |
+
msgctxt "request_access_keys"
|
7929 |
+
msgid "Did you mean to <a>access the Directory</a>?"
|
7930 |
+
msgstr ""
|
7931 |
+
|
7932 |
+
#: includes/controllers/pages/class-request-access-keys.php:39
|
7933 |
+
msgctxt "request_access_keys"
|
7934 |
+
msgid "Access keys have been sent to your e-mail address."
|
7935 |
+
msgstr "تم إرسال مفاتيح الوصول إلى عنوان بريدك الإلكتروني."
|
7936 |
+
|
7937 |
+
#: includes/controllers/pages/class-request-access-keys.php:44
|
7938 |
+
#, fuzzy
|
7939 |
+
msgctxt "request_access_keys"
|
7940 |
+
msgid "← Return to previous page"
|
7941 |
+
msgstr "العودة إلى الدليل."
|
7942 |
+
|
7943 |
+
#: includes/controllers/pages/class-search.php:42
|
7944 |
+
#, fuzzy
|
7945 |
+
msgctxt "search"
|
7946 |
+
msgid "\"%s\" is required."
|
7947 |
+
msgstr "%s مطلوب."
|
7948 |
+
|
7949 |
+
#: includes/controllers/pages/class-submit-listing.php:73
|
7950 |
+
msgctxt "submit listing"
|
7951 |
+
msgid "Click this field to add categories"
|
7952 |
+
msgstr ""
|
7953 |
+
|
7954 |
+
#: includes/controllers/pages/class-submit-listing.php:74
|
7955 |
+
#, fuzzy
|
7956 |
+
msgctxt "submit listing"
|
7957 |
+
msgid "Complete Listing"
|
7958 |
+
msgstr "حذف الإعلان"
|
7959 |
+
|
7960 |
+
#: includes/controllers/pages/class-submit-listing.php:75
|
7961 |
+
#, fuzzy
|
7962 |
+
msgctxt "submit listing"
|
7963 |
+
msgid "Continue to Payment"
|
7964 |
+
msgstr "الدفعة الأولية"
|
7965 |
+
|
7966 |
+
#: includes/controllers/pages/class-submit-listing.php:77
|
7967 |
+
msgctxt "submit listing"
|
7968 |
+
msgid "Please wait a moment!"
|
7969 |
+
msgstr ""
|
7970 |
+
|
7971 |
+
#: includes/controllers/pages/class-submit-listing.php:78
|
7972 |
+
msgctxt "submit listing"
|
7973 |
+
msgid "Something went wrong!"
|
7974 |
+
msgstr ""
|
7975 |
+
|
7976 |
+
#: includes/controllers/pages/class-submit-listing.php:103
|
7977 |
+
#, fuzzy
|
7978 |
+
msgctxt "submit listing"
|
7979 |
+
msgid "No listing ID was specified."
|
7980 |
+
msgstr "تم تحرير الإعلان"
|
7981 |
+
|
7982 |
+
#: includes/controllers/pages/class-submit-listing.php:105
|
7983 |
+
#, fuzzy
|
7984 |
+
msgctxt "submit listing"
|
7985 |
+
msgid "You can't edit this listing."
|
7986 |
+
msgstr "التصنيفات لهذا الإعلان"
|
7987 |
+
|
7988 |
+
#: includes/controllers/pages/class-submit-listing.php:163
|
7989 |
+
msgctxt "submit listing"
|
7990 |
+
msgid ""
|
7991 |
+
"This listing can't be edited at this time because it has no fee plan "
|
7992 |
+
"associated. Please <a>edit the listing</a> on the backend and associate it "
|
7993 |
+
"to a fee plan."
|
7994 |
+
msgstr ""
|
7995 |
+
|
7996 |
+
#: includes/controllers/pages/class-submit-listing.php:169
|
7997 |
+
msgctxt "submit listing"
|
7998 |
+
msgid ""
|
7999 |
+
"This listing can't be edited at this time. Please try again later or contact "
|
8000 |
+
"the admin if the problem persists."
|
8001 |
+
msgstr ""
|
8002 |
+
|
8003 |
+
#: includes/controllers/pages/class-submit-listing.php:193
|
8004 |
#, fuzzy
|
8005 |
+
msgctxt "submit listing"
|
8006 |
+
msgid "You're logged in as admin, payment will be skipped."
|
8007 |
+
msgstr "لقد تم تسجيل دخولك كمدير. سيتم تخطي أي خطوات للدفع."
|
8008 |
|
8009 |
+
#: includes/controllers/pages/class-submit-listing.php:499
|
8010 |
+
#, fuzzy
|
8011 |
+
msgctxt "submit listing"
|
8012 |
+
msgid "Category selection"
|
8013 |
+
msgstr "إختيار تصنيف"
|
8014 |
|
8015 |
+
#: includes/controllers/pages/class-submit-listing.php:499
|
8016 |
#, fuzzy
|
8017 |
+
msgctxt "submit listing"
|
8018 |
+
msgid "Category & plan selection"
|
8019 |
+
msgstr "إختيار تصنيف"
|
8020 |
|
8021 |
+
#: includes/controllers/pages/class-submit-listing.php:807
|
8022 |
+
#, fuzzy
|
8023 |
+
msgctxt "submit listing"
|
8024 |
+
msgid "Can not submit a listing at this moment. Please try again later."
|
8025 |
+
msgstr ""
|
8026 |
+
"لا يمكن أن نقوم بمعالجة الدفع الخاص بك في هذه اللحظة. المرجو المحاولة مرة "
|
8027 |
+
"أخرى لاحقاً."
|
8028 |
|
8029 |
+
#: includes/controllers/pages/class-submit-listing.php:856
|
8030 |
+
#: includes/controllers/pages/class-submit-listing.php:978
|
8031 |
+
#, fuzzy
|
8032 |
+
msgctxt "submit listing"
|
8033 |
+
msgid "Please select a category."
|
8034 |
+
msgstr "المرجو تحديد خيار رسوم التصنيف \"%s\"."
|
8035 |
|
8036 |
+
#: includes/controllers/pages/class-submit-listing.php:879
|
8037 |
+
msgctxt "submit listing"
|
8038 |
+
msgid "Please choose a valid category for your plan."
|
8039 |
+
msgstr ""
|
8040 |
|
8041 |
+
#: includes/controllers/pages/class-submit-listing.php:881
|
8042 |
#, fuzzy
|
8043 |
+
msgctxt "submit listing"
|
8044 |
+
msgid "Please choose a valid fee plan for your category selection."
|
8045 |
+
msgstr "المرجو تحديد خيار رسوم التصنيف \"%s\"."
|
|
|
|
|
8046 |
|
8047 |
+
#: includes/controllers/pages/class-submit-listing.php:1191
|
8048 |
#, fuzzy
|
8049 |
+
msgctxt "submit listing"
|
8050 |
+
msgid "Please enter your desired username."
|
8051 |
+
msgstr "يرجى إدخال إسمك."
|
8052 |
|
8053 |
+
#: includes/controllers/pages/class-submit-listing.php:1196
|
8054 |
#, fuzzy
|
8055 |
+
msgctxt "submit listing"
|
8056 |
+
msgid "Please enter the e-mail for your new account."
|
8057 |
+
msgstr "يرجى إدخال إسمك."
|
8058 |
|
8059 |
+
#: includes/controllers/pages/class-submit-listing.php:1201
|
8060 |
+
msgctxt "submit listing"
|
8061 |
+
msgid "The username you chose is already in use. Please use a different one."
|
8062 |
msgstr ""
|
8063 |
|
8064 |
+
#: includes/controllers/pages/class-submit-listing.php:1206
|
8065 |
+
msgctxt "submit listing"
|
8066 |
+
msgid "The e-mail address you chose for your account is already in use."
|
|
|
|
|
|
|
|
|
|
|
|
|
8067 |
msgstr ""
|
8068 |
|
8069 |
+
#: includes/models/class-payment.php:253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8070 |
#, fuzzy
|
8071 |
+
msgctxt "submit listing"
|
8072 |
+
msgid "Listing submitted by admin. Payment skipped."
|
8073 |
+
msgstr "Poster annonce(paiement initial)"
|
8074 |
|
8075 |
+
#: includes/controllers/pages/class-submit-listing.php:1146
|
8076 |
msgctxt "listing submit"
|
8077 |
msgid ""
|
8078 |
"Image upload is required, please provide at least one image and submit again."
|
8160 |
msgid "Social Site (Twitter handle)"
|
8161 |
msgstr "الموقع الاجتماعي (التعامل مع التغريدات)"
|
8162 |
|
8163 |
+
#: includes/fields/class-form-field.php:742
|
8164 |
msgctxt "form-fields api"
|
8165 |
msgid ""
|
8166 |
"This form field can't be deleted because it is required for the plugin to "
|
8190 |
msgid "Invalid form field type"
|
8191 |
msgstr "نوع حقل استمارة غير صحيح"
|
8192 |
|
8193 |
+
#: includes/fields/class-form-field.php:619
|
8194 |
msgctxt "form-fields-api"
|
8195 |
msgid "Field label is required."
|
8196 |
msgstr "تسمية الحقل مطلوب."
|
8197 |
|
8198 |
+
#: includes/fields/class-form-field.php:623
|
8199 |
msgctxt "form-fields-api"
|
8200 |
msgid "Field label max length is 255 characters."
|
8201 |
msgstr ""
|
8202 |
|
8203 |
+
#: includes/fields/class-form-field.php:627
|
8204 |
msgctxt "form-fields-api"
|
8205 |
msgid "Field description max length is 255 characters."
|
8206 |
msgstr ""
|
8207 |
|
8208 |
+
#: includes/fields/class-form-field.php:638
|
8209 |
msgctxt "form-fields-api"
|
8210 |
msgid ""
|
8211 |
"You can't change from %2$s field type to the one you wanted--the types are "
|
8213 |
"delete this current field and create a NEW field of type %1$s instead."
|
8214 |
msgstr ""
|
8215 |
|
8216 |
+
#: includes/fields/class-form-field.php:641
|
8217 |
msgctxt "form-fields-api"
|
8218 |
msgid ""
|
8219 |
"<strong>WARNING</strong>: If you delete this field, the data from it in "
|
8220 |
"existing listings will be deleted as well."
|
8221 |
msgstr ""
|
8222 |
|
8223 |
+
#: includes/fields/class-form-field.php:677
|
8224 |
msgctxt "form-fields-api"
|
8225 |
msgid ""
|
8226 |
"There can only be one field with association \"%s\". Please select another "
|
8227 |
"association."
|
8228 |
msgstr "يمكن أن يكون هناك حقل واحد مع رابطة \"%s\". المرجو تحديد رابطة أخرى."
|
8229 |
|
8230 |
+
#: includes/fields/class-form-field.php:687
|
8231 |
msgctxt "form-fields-api"
|
8232 |
msgid "\"%s\" is an invalid field type for this association."
|
8233 |
msgstr "\"%s\" نوع حقل غير صالح لهذه الرابطة."
|
8234 |
|
8235 |
+
#: includes/fields/class-form-field.php:732
|
8236 |
msgctxt "form-fields-api"
|
8237 |
msgid "Invalid field ID"
|
8238 |
msgstr "معرف حقل غير صالح"
|
8239 |
|
8240 |
+
#: includes/fields/class-form-field.php:757
|
8241 |
msgctxt "form-fields-api"
|
8242 |
msgid "An error occurred while trying to delete this field."
|
8243 |
msgstr "حدث خطأ أثناء محاولة حذف هذا الحقل."
|
8369 |
msgid "Destination dir \"%s\" is not writable."
|
8370 |
msgstr "وجهة المجلد \"%s\" غير قابل للكتابة."
|
8371 |
|
8372 |
+
#: includes/helpers/functions/templates-ui.php:401
|
8373 |
+
msgctxt "templates sort"
|
8374 |
+
msgid "Sort By:"
|
8375 |
+
msgstr "ترتيب حسب:"
|
8376 |
+
|
8377 |
#: includes/helpers/listing_flagging.php:42
|
8378 |
#: includes/helpers/listing_flagging.php:65
|
8379 |
msgctxt "flag listing"
|
8476 |
"Please update this module to the latest available version."
|
8477 |
msgstr ""
|
8478 |
|
8479 |
+
#: includes/models/class-fee-plan.php:162
|
8480 |
+
#, fuzzy
|
8481 |
+
msgctxt "fee plan"
|
8482 |
+
msgid "No images allowed."
|
8483 |
+
msgstr "عدد الصور المسموح بها"
|
8484 |
+
|
8485 |
+
#: includes/models/class-fee-plan.php:164
|
8486 |
+
#, fuzzy
|
8487 |
+
msgctxt "fee plan"
|
8488 |
+
msgid "%d image allowed."
|
8489 |
+
msgid_plural "%d images allowed."
|
8490 |
+
msgstr[0] "الصور المسموح بها"
|
8491 |
+
msgstr[1] "الصور المسموح بها"
|
8492 |
+
msgstr[2] "الصور المسموح بها"
|
8493 |
+
msgstr[3] "الصور المسموح بها"
|
8494 |
+
msgstr[4] "الصور المسموح بها"
|
8495 |
+
msgstr[5] "الصور المسموح بها"
|
8496 |
+
|
8497 |
+
#: includes/models/class-fee-plan.php:340
|
8498 |
+
msgctxt "fees-api"
|
8499 |
+
msgid "Fee label is required."
|
8500 |
+
msgstr "رسوم التسمية مطلوبة."
|
8501 |
+
|
8502 |
+
#: includes/models/class-fee-plan.php:346
|
8503 |
+
msgctxt "fees-api"
|
8504 |
+
msgid "Fee listing duration must be a number less than 10 years (3650 days)."
|
8505 |
+
msgstr "يجب أن تكون رسوم مدة الإعلان بعدد أقل من 10 سنوات (3650 يوما)."
|
8506 |
+
|
8507 |
+
#: includes/models/class-fee-plan.php:351
|
8508 |
+
msgctxt "fees-api"
|
8509 |
+
msgid ""
|
8510 |
+
"To set this fee as \"Recurring\" you must have a time for the listing to "
|
8511 |
+
"renew (e.g. 30 days). To avoid issues with the listing, please edit the "
|
8512 |
+
"<a>fee plan</a> appropriately."
|
8513 |
+
msgstr ""
|
8514 |
+
|
8515 |
+
#: includes/models/class-fee-plan.php:354
|
8516 |
+
msgctxt "fees-api"
|
8517 |
+
msgid ""
|
8518 |
+
"To set this fee as \"Recurring\" you must set a price for your fee plan. To "
|
8519 |
+
"avoid issues with the listing, please edit the <a>fee plan</a> appropriately."
|
8520 |
+
msgstr ""
|
8521 |
+
|
8522 |
+
#: includes/models/class-payment.php:83
|
8523 |
+
msgctxt "payment"
|
8524 |
+
msgid "Payment status changed from \"%1$s\" to \"%2$s\"."
|
8525 |
+
msgstr ""
|
8526 |
+
|
8527 |
+
#: includes/models/class-payment.php:129
|
8528 |
+
#, fuzzy
|
8529 |
+
msgctxt "payment"
|
8530 |
+
msgid "Initial payment (\"%s\")"
|
8531 |
+
msgstr "الدفعة الأولية"
|
8532 |
+
|
8533 |
+
#: includes/models/class-payment.php:132
|
8534 |
+
#, fuzzy
|
8535 |
+
msgctxt "payment"
|
8536 |
+
msgid "Renewal payment (\"%s\")"
|
8537 |
+
msgstr "رفض الدفع"
|
8538 |
+
|
8539 |
+
#: includes/models/class-payment.php:369
|
8540 |
+
#, fuzzy
|
8541 |
+
msgctxt "payment"
|
8542 |
+
msgid "Pending"
|
8543 |
+
msgstr " في الانتظار"
|
8544 |
+
|
8545 |
+
#: includes/models/class-payment.php:370
|
8546 |
+
msgctxt "payment"
|
8547 |
+
msgid "Failed"
|
8548 |
+
msgstr ""
|
8549 |
+
|
8550 |
+
#: includes/models/class-payment.php:371
|
8551 |
+
#, fuzzy
|
8552 |
+
msgctxt "payment"
|
8553 |
+
msgid "Completed"
|
8554 |
+
msgstr "إكتمل"
|
8555 |
+
|
8556 |
+
#: includes/models/class-payment.php:372
|
8557 |
+
#, fuzzy
|
8558 |
+
msgctxt "payment"
|
8559 |
+
msgid "Canceled"
|
8560 |
+
msgstr "ألغيت"
|
8561 |
+
|
8562 |
+
#: includes/models/class-payment.php:373
|
8563 |
+
msgctxt "payment"
|
8564 |
+
msgid "On Hold"
|
8565 |
+
msgstr ""
|
8566 |
+
|
8567 |
+
#: includes/models/class-payment.php:374
|
8568 |
+
msgctxt "payment"
|
8569 |
+
msgid "Refunded"
|
8570 |
+
msgstr ""
|
8571 |
+
|
8572 |
+
#: includes/models/class-payment.php:144
|
8573 |
+
msgctxt "payment summary"
|
8574 |
+
msgid "%s. Admin Posted."
|
8575 |
+
msgstr ""
|
8576 |
+
|
8577 |
+
#: includes/models/class-payment.php:146
|
8578 |
+
#, fuzzy
|
8579 |
+
msgctxt "payment summary"
|
8580 |
+
msgid "%s. Imported Listing."
|
8581 |
+
msgstr "استيراد الإعلانات"
|
8582 |
+
|
8583 |
#: includes/payment.php:61
|
8584 |
#, fuzzy
|
8585 |
msgctxt "payments"
|
8586 |
msgid "Payment #%s"
|
8587 |
msgstr "الدفع #%d"
|
8588 |
|
8589 |
+
#: includes/utils.php:419
|
|
|
|
|
|
|
|
|
|
|
8590 |
msgctxt "utils"
|
8591 |
msgid ""
|
8592 |
"POSTed data exceeds PHP config. maximum. See \"post_max_size\" directive."
|
8594 |
"تجاوزت البيانات التي تم نشرها الحد الأقصى لإعدادات PHP. أنظر توجيه "
|
8595 |
"\"post_max_size\"."
|
8596 |
|
8597 |
+
#: includes/utils.php:488 includes/utils.php:495
|
8598 |
msgctxt "utils"
|
8599 |
msgid "File type \"%s\" is not allowed"
|
8600 |
msgstr "غير مسموح بنوع الملف \"%s\""
|
8601 |
|
8602 |
+
#: includes/utils.php:502
|
8603 |
msgctxt "utils"
|
8604 |
msgid "Unkown error while uploading file."
|
8605 |
msgstr "حدث خطأ مجهول أثناء رفع الملف."
|
8606 |
|
8607 |
+
#: includes/utils.php:527
|
8608 |
msgctxt "utils"
|
8609 |
msgid "Uploaded file is not an image"
|
8610 |
msgstr "الملف الذي تم رفعه ليس صورة"
|
8611 |
|
8612 |
+
#: includes/utils.php:576
|
8613 |
msgctxt "utils"
|
8614 |
msgid "Error while uploading file"
|
8615 |
msgstr "حدث خطأ أثناء رفع الملف."
|
8616 |
|
8617 |
#: includes/widgets/class-listings-widget.php:45
|
8618 |
+
#: includes/widgets/widget-search.php:29
|
8619 |
msgctxt "widgets"
|
8620 |
msgid "Title:"
|
8621 |
msgstr "العنوان:"
|
8655 |
msgid "Leave blank for automatic height."
|
8656 |
msgstr "أترك المساحة فارغة للارتفاع التلقائي."
|
8657 |
|
8658 |
+
#: includes/widgets/widget-featured-listings.php:12
|
8659 |
msgctxt "widgets"
|
8660 |
msgid "Business Directory - Featured Listings"
|
8661 |
msgstr "دليل الأعمال - إعلانات مميزة"
|
8662 |
|
8663 |
+
#: includes/widgets/widget-featured-listings.php:13
|
8664 |
msgctxt "widgets"
|
8665 |
msgid "Displays a list of the featured/sticky listings in the directory."
|
8666 |
msgstr "عرض قائمة من الإعلانات المميزة/المثبتة في الدليل."
|
8667 |
|
8668 |
+
#: includes/widgets/widget-featured-listings.php:15
|
8669 |
msgctxt "widgets"
|
8670 |
msgid "Featured Listings"
|
8671 |
msgstr "إعلانات مميزة"
|
8672 |
|
8673 |
+
#: includes/widgets/widget-featured-listings.php:24
|
8674 |
msgctxt "widgets"
|
8675 |
msgid "Display listings in random order"
|
8676 |
msgstr "عرض الإعلانات في ترتيب عشوائي"
|
8677 |
|
8678 |
+
#: includes/widgets/widget-latest-listings.php:13
|
8679 |
msgctxt "widgets"
|
8680 |
msgid "Business Directory - Latest Listings"
|
8681 |
msgstr "دليل الأعمال - آخر الإعلانات"
|
8682 |
|
8683 |
+
#: includes/widgets/widget-latest-listings.php:14
|
8684 |
msgctxt "widgets"
|
8685 |
msgid "Displays a list of the latest listings in the Business Directory."
|
8686 |
msgstr "عرض قائمة بآخر الإعلانات في الدليل الأعمال."
|
8687 |
|
8688 |
+
#: includes/widgets/widget-latest-listings.php:17
|
8689 |
msgctxt "widgets"
|
8690 |
msgid "Latest Listings"
|
8691 |
msgstr "آخر الإعلانات "
|
8692 |
|
8693 |
+
#: includes/widgets/widget-random-listings.php:12
|
8694 |
msgctxt "widgets"
|
8695 |
msgid "Business Directory - Random Listings"
|
8696 |
msgstr "دليل الأعمال - إعلانات عشوائية"
|
8697 |
|
8698 |
+
#: includes/widgets/widget-random-listings.php:13
|
8699 |
msgctxt "widgets"
|
8700 |
msgid "Displays a list of random listings from the Business Directory."
|
8701 |
msgstr "عرض قائمة من الإعلانات العشوائية من دليل الأعمال"
|
8702 |
|
8703 |
+
#: includes/widgets/widget-random-listings.php:15
|
8704 |
msgctxt "widgets"
|
8705 |
msgid "Random Listings"
|
8706 |
msgstr "إعلانات عشوائية"
|
8707 |
|
8708 |
+
#: includes/widgets/widget-search.php:12
|
8709 |
msgctxt "widgets"
|
8710 |
msgid "Business Directory - Search"
|
8711 |
msgstr "دليل الأعمال - بحث"
|
8712 |
|
8713 |
+
#: includes/widgets/widget-search.php:14
|
8714 |
msgctxt "widgets"
|
8715 |
msgid "Displays a search form to look for Business Directory listings."
|
8716 |
msgstr "عرض نموذج بحث للبحث عن إعلانات دليل الأعمال."
|
8717 |
|
8718 |
+
#: includes/widgets/widget-search.php:23
|
8719 |
msgctxt "widgets"
|
8720 |
msgid "Search the Business Directory"
|
8721 |
msgstr "البحث في دليل الأعمال"
|
8722 |
|
8723 |
+
#: includes/widgets/widget-search.php:36
|
8724 |
msgctxt "widgets"
|
8725 |
msgid "Form Style:"
|
8726 |
msgstr "شكل النموذج:"
|
8727 |
|
8728 |
+
#: includes/widgets/widget-search.php:45
|
8729 |
msgctxt "widgets"
|
8730 |
msgid "Basic"
|
8731 |
msgstr "أساسي"
|
8732 |
|
8733 |
+
#: includes/widgets/widget-search.php:55
|
8734 |
msgctxt "widgets"
|
8735 |
msgid "Advanced"
|
8736 |
msgstr "متقدم"
|
8737 |
|
8738 |
+
#: includes/widgets/widget-search.php:60
|
8739 |
msgctxt "widgets"
|
8740 |
msgid "Search Fields (advanced mode):"
|
8741 |
msgstr "الحقول البحث (الوضع المتقدم):"
|
8742 |
|
8743 |
+
#: includes/widgets/widget-search.php:61
|
8744 |
msgctxt "widgets"
|
8745 |
msgid "Display the following fields in the form."
|
8746 |
msgstr "عرض الحقول التالية في النموذج."
|
8812 |
msgid "Renew listing"
|
8813 |
msgstr "تجديد الإعلان"
|
8814 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8815 |
#: templates/admin/themes-delete-confirm.tpl.php:3
|
8816 |
msgctxt "themes admin"
|
8817 |
msgid "Are you sure you want to delete the directory theme \"%s\"?"
|
9042 |
"لأنك على خطة الرسوم المتكررة لا تحتاج لتجديد الإعلان الخاص بك الآن لأن ذلك "
|
9043 |
"سيتم معالجته تلقائياً عندما يحين وقت التجديد."
|
9044 |
|
9045 |
+
#: templates/renew-listing-manage-subscription.tpl.php:27
|
9046 |
#, fuzzy
|
9047 |
msgctxt "renew"
|
9048 |
msgid ""
|
9053 |
"ومع ذلك، إذا كنت ترغب في إلغاء اشتراكك يمكنك عمل ذلك في هذه الصفحة. عندما "
|
9054 |
"يحين وقت التجديد سوف تتمكن من تغيير الإعدادات الخاصة بك مرة أخرى."
|
9055 |
|
9056 |
+
#: templates/renew-listing-manage-subscription.tpl.php:34
|
9057 |
#, fuzzy
|
9058 |
msgctxt "renew"
|
9059 |
msgid "Go to Manage Recurring Payments page"
|
9069 |
msgid "Continue"
|
9070 |
msgstr "متابعة"
|
9071 |
|
9072 |
+
#, fuzzy
|
9073 |
+
#~ msgid "Is featured listing/sticky?"
|
9074 |
+
#~ msgstr "هذا إعلان مميز/مثبت"
|
9075 |
+
|
9076 |
+
#, fuzzy
|
9077 |
+
#~ msgid "Category Images"
|
9078 |
+
#~ msgstr "التصنيفات"
|
9079 |
+
|
9080 |
+
#, fuzzy
|
9081 |
+
#~ msgid "PayPal Payments"
|
9082 |
+
#~ msgstr "الدفعة الأولية"
|
9083 |
+
|
9084 |
+
#, fuzzy
|
9085 |
+
#~ msgid "Google Maps"
|
9086 |
+
#~ msgstr "وحدة خرائط جوجل"
|
9087 |
+
|
9088 |
+
#, fuzzy
|
9089 |
+
#~ msgid "Regions"
|
9090 |
+
#~ msgstr "وحدة المناطق"
|
9091 |
+
|
9092 |
+
#, fuzzy
|
9093 |
+
#~ msgid "ZIP Code Search"
|
9094 |
+
#~ msgstr "وحدة البحث عن الرمز البريدي"
|
9095 |
+
|
9096 |
+
#, fuzzy
|
9097 |
+
#~ msgid "Ratings"
|
9098 |
+
#~ msgstr "حقول التقييم"
|
9099 |
+
|
9100 |
+
#, fuzzy
|
9101 |
+
#~ msgid "Stripe Payments"
|
9102 |
+
#~ msgstr "الدفع"
|
9103 |
+
|
9104 |
+
#, fuzzy
|
9105 |
+
#~ msgid "Featured Levels"
|
9106 |
+
#~ msgstr "وحدة المستويات المميزة"
|
9107 |
+
|
9108 |
+
#, fuzzy
|
9109 |
+
#~ msgid "Claim Listings"
|
9110 |
+
#~ msgstr "المطالبة بوحدة الإعلانات"
|
9111 |
+
|
9112 |
+
#, fuzzy
|
9113 |
+
#~ msgid "File Upload"
|
9114 |
+
#~ msgstr "وحدة رفع الملفات"
|
9115 |
+
|
9116 |
+
#, fuzzy
|
9117 |
+
#~ msgid "Discount Codes"
|
9118 |
+
#~ msgstr "كود خصم الوحدة"
|
9119 |
+
|
9120 |
+
#, fuzzy
|
9121 |
+
#~ msgid "Modern Business Theme"
|
9122 |
+
#~ msgstr "قالب Elegant Business"
|
9123 |
+
|
9124 |
+
#, fuzzy
|
9125 |
+
#~ msgid "Business Card Theme"
|
9126 |
+
#~ msgstr "قالب Business Card"
|
9127 |
+
|
9128 |
+
#, fuzzy
|
9129 |
+
#~ msgid "Mobile Compact Theme"
|
9130 |
+
#~ msgstr "قالب Mobile Compact"
|
9131 |
+
|
9132 |
+
#, fuzzy
|
9133 |
+
#~ msgid "Restaurant Theme"
|
9134 |
+
#~ msgstr "قالب Restaurant"
|
9135 |
+
|
9136 |
+
#, fuzzy
|
9137 |
+
#~ msgid "Tabbed Business Theme"
|
9138 |
+
#~ msgstr "قالب Tabbed Business"
|
9139 |
+
|
9140 |
+
#, fuzzy
|
9141 |
+
#~ msgid "Elegant Business Theme"
|
9142 |
+
#~ msgstr "قالب Elegant Business"
|
9143 |
+
|
9144 |
+
#, fuzzy
|
9145 |
+
#~ msgid "Like this plugin?"
|
9146 |
+
#~ msgstr "هل أحببت هذه الإضافة؟"
|
9147 |
+
|
9148 |
+
#, fuzzy
|
9149 |
+
#~ msgctxt "admin sidebar"
|
9150 |
+
#~ msgid "If you've found a bug or need support <a>let us know!</a>"
|
9151 |
+
#~ msgstr "إذا كنت قد وجدت خطأ أو بحاجة إلى دعم <a>قم بزيارة المنتديات!</a>"
|
9152 |
+
|
9153 |
#, fuzzy
|
9154 |
#~ msgid ""
|
9155 |
#~ "These are all of the fee plans displayed to the user when they place a "
|
languages/business-directory-plugin-de_DE.mo
CHANGED
Binary file
|
languages/business-directory-plugin-de_DE.po
CHANGED
@@ -5,7 +5,7 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Business Directory Plugin v5.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/business-"
|
7 |
"directory-plugin\n"
|
8 |
-
"POT-Creation-Date: 2021-10-
|
9 |
"PO-Revision-Date: 2020-06-17 15:32-0500\n"
|
10 |
"Last-Translator: Axel J. Metayer <axel@kfz.net>\n"
|
11 |
"Language-Team: Business Directory Plugin <support@businessdirectoryplugin."
|
@@ -32,12 +32,7 @@ msgid ""
|
|
32 |
"payment processor directly."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/admin/class-admin
|
36 |
-
#, fuzzy
|
37 |
-
msgid "Help"
|
38 |
-
msgstr "Hilfe "
|
39 |
-
|
40 |
-
#: includes/admin/class-admin.php:186
|
41 |
#, fuzzy
|
42 |
msgid ""
|
43 |
"Find out how to create a compelling, thriving business directory from "
|
@@ -47,66 +42,67 @@ msgstr ""
|
|
47 |
"von Grund aufbauen mit diesem einfachen (und kostenlosen) 5-teiligen E-Mail-"
|
48 |
"Kurs. Sie erhalten ein kostenloses Premium-Modul nur für die Anmeldung."
|
49 |
|
50 |
-
#: includes/admin/class-admin.php:
|
51 |
#, fuzzy
|
52 |
msgid "Want to know the Secrets of Building an Awesome Business Directory?"
|
53 |
msgstr ""
|
54 |
"Möchten Sie mehr über die Geheimnisse eines erfolgreichen Verzeichnisses "
|
55 |
"wissen?"
|
56 |
|
57 |
-
#: includes/admin/class-admin.php:
|
58 |
#, fuzzy
|
59 |
msgid "Yes, please!"
|
60 |
msgstr "Ja, bitte!"
|
61 |
|
62 |
-
#: includes/admin/class-admin.php:
|
63 |
#, fuzzy
|
64 |
msgid "No, thanks"
|
65 |
msgstr "Nein, danke"
|
66 |
|
67 |
-
#: includes/admin/class-admin.php:
|
68 |
#, fuzzy
|
69 |
msgid "Invalid email address."
|
70 |
msgstr "Ungültiger Erneuerungszustand."
|
71 |
|
72 |
-
#: includes/admin/class-admin.php:
|
73 |
#, fuzzy
|
74 |
msgid "Business Directory Admin"
|
75 |
msgstr "Branchenverzeichnis Administration"
|
76 |
|
77 |
-
#: includes/admin/class-admin.php:
|
78 |
#: includes/admin/settings/class-settings-bootstrap.php:703
|
79 |
#: includes/admin/settings/class-settings-bootstrap.php:704
|
80 |
-
#: includes/helpers/class-app.php:93
|
|
|
81 |
msgid "Directory"
|
82 |
msgstr "Verzeichnis"
|
83 |
|
84 |
-
#: includes/admin/class-admin.php:
|
85 |
msgid "Fee Plans"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: includes/admin/class-admin.php:
|
89 |
#, fuzzy
|
90 |
msgid "Form Fields"
|
91 |
msgstr "Formularfelder"
|
92 |
|
93 |
-
#: includes/admin/class-admin.php:
|
94 |
#: includes/licensing.php:220
|
95 |
#, fuzzy
|
96 |
msgid "Modules"
|
97 |
msgstr "Installierte Module"
|
98 |
|
99 |
-
#: includes/admin/class-admin.php:
|
100 |
#, fuzzy
|
101 |
msgid "Business Directory"
|
102 |
msgstr "Branchenverzeichnis"
|
103 |
|
104 |
-
#: includes/admin/class-admin.php:
|
105 |
#, fuzzy
|
106 |
msgid "Could not send renewal email."
|
107 |
msgstr "Erneuerungsmail an Benutzer schicken"
|
108 |
|
109 |
-
#: includes/admin/class-admin.php:
|
110 |
#: includes/admin/helpers/tables/class-form-fields-table.php:127
|
111 |
#: includes/admin/helpers/tables/class-payments-table.php:54
|
112 |
#: templates/email/listing-added.tpl.php:7
|
@@ -116,17 +112,12 @@ msgstr "Erneuerungsmail an Benutzer schicken"
|
|
116 |
msgid "ID"
|
117 |
msgstr "ID"
|
118 |
|
119 |
-
#: includes/admin/class-admin.php:
|
120 |
#: includes/admin/settings/class-settings-bootstrap.php:729
|
121 |
#, fuzzy
|
122 |
msgid "Listing Count"
|
123 |
msgstr "Anzahl Einträge"
|
124 |
|
125 |
-
#: includes/admin/class-csv-import.php:676
|
126 |
-
#, fuzzy
|
127 |
-
msgid "Listing imported by admin. Payment skipped."
|
128 |
-
msgstr "Eintrag zusenden (Initialbezahlung)"
|
129 |
-
|
130 |
#: includes/admin/class-listing-owner.php:62
|
131 |
#: includes/admin/class-listing-owner.php:89
|
132 |
#, fuzzy
|
@@ -194,8 +185,34 @@ msgstr "Business Directory Plugin"
|
|
194 |
msgid "Are you sure you want to do this?"
|
195 |
msgstr "Möchtest du das wirklich tun?"
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
#: includes/admin/controllers/class-admin-listings.php:185
|
198 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
199 |
#: templates/email/listing-reported.tpl.php:7
|
200 |
msgid "Listing Information"
|
201 |
msgstr "Eintrag Informationen"
|
@@ -227,7 +244,7 @@ msgstr "unterstützter (unbeweglicher) Status"
|
|
227 |
|
228 |
#: includes/admin/controllers/class-admin-listings.php:475
|
229 |
#: includes/class-cpt-integration.php:19
|
230 |
-
#: includes/compatibility/class-navxt-integration.php:
|
231 |
#: templates/submit-listing.tpl.php:15
|
232 |
msgid "Edit Listing"
|
233 |
msgstr "Eintrag bearbeiten"
|
@@ -237,6 +254,27 @@ msgstr "Eintrag bearbeiten"
|
|
237 |
msgid "Delete Listing"
|
238 |
msgstr "Eintrag Löschen"
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
#: includes/admin/controllers/class-themes-admin.php:44
|
241 |
#, fuzzy
|
242 |
msgid "Themes"
|
@@ -262,26 +300,6 @@ msgstr "Beim hochladen der CSV-Datei ist ein Fehler aufgetreten."
|
|
262 |
msgid "Please upload the correct file type."
|
263 |
msgstr "Die hochgeladene Datei ist nicht im CSV Format."
|
264 |
|
265 |
-
#: includes/admin/fees.php:47
|
266 |
-
#: includes/admin/helpers/tables/class-fees-table.php:62
|
267 |
-
#: includes/admin/helpers/tables/class-payments-table.php:57
|
268 |
-
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:273
|
269 |
-
#: templates/admin/metaboxes-listing-information-plan.tpl.php:73
|
270 |
-
#: templates/admin/payments-details.tpl.php:110
|
271 |
-
#: templates/email/listing-payment-completed.tpl.php:21
|
272 |
-
#: templates/payment/payment_items.tpl.php:5
|
273 |
-
#, fuzzy
|
274 |
-
msgid "Amount"
|
275 |
-
msgstr "Preis"
|
276 |
-
|
277 |
-
#: includes/admin/fees.php:49
|
278 |
-
#: includes/admin/helpers/tables/class-fees-table.php:64
|
279 |
-
#: includes/admin/settings/class-settings-bootstrap.php:919
|
280 |
-
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:275
|
281 |
-
#, fuzzy
|
282 |
-
msgid "Images"
|
283 |
-
msgstr "Bilder"
|
284 |
-
|
285 |
#: includes/admin/helpers/class-listing-information-metabox.php:15
|
286 |
#: includes/admin/helpers/tables/class-payments-table.php:53
|
287 |
#: includes/admin/settings/class-settings-bootstrap.php:679
|
@@ -328,6 +346,11 @@ msgstr "Aktiviere Lizenz"
|
|
328 |
msgid "Upgrade Now"
|
329 |
msgstr "Aktualisieren auf %s"
|
330 |
|
|
|
|
|
|
|
|
|
|
|
331 |
#. translators: %1$s: open link html, %2$s close link
|
332 |
#: includes/admin/helpers/tables/class-fees-table.php:30
|
333 |
#, fuzzy
|
@@ -346,18 +369,6 @@ msgstr "Deaktivieren"
|
|
346 |
msgid "Enable"
|
347 |
msgstr "Aktivieren"
|
348 |
|
349 |
-
#: includes/admin/helpers/tables/class-fees-table.php:175
|
350 |
-
#: includes/admin/helpers/tables/class-form-fields-table.php:104
|
351 |
-
#: includes/admin/settings/class-settings-admin.php:536
|
352 |
-
#: templates/admin/metaboxes-listing-flagging-row.tpl.php:19
|
353 |
-
#: templates/admin/payments-note.tpl.php:14
|
354 |
-
#: templates/admin/themes-item.tpl.php:58
|
355 |
-
#: templates/parts/listing-buttons.tpl.php:33
|
356 |
-
#: templates/parts/listing-buttons.tpl.php:67
|
357 |
-
#, fuzzy
|
358 |
-
msgid "Delete"
|
359 |
-
msgstr "Löschen"
|
360 |
-
|
361 |
#: includes/admin/helpers/tables/class-fees-table.php:256
|
362 |
#: includes/admin/helpers/tables/class-fees-table.php:258
|
363 |
#, fuzzy
|
@@ -365,7 +376,7 @@ msgid "Disabled"
|
|
365 |
msgstr "Inaktiv"
|
366 |
|
367 |
#: includes/admin/helpers/tables/class-fees-table.php:264
|
368 |
-
#: includes/templates-ui.php:431
|
369 |
#, fuzzy
|
370 |
msgid "Default"
|
371 |
msgstr "Standard Preis"
|
@@ -393,13 +404,14 @@ msgstr ""
|
|
393 |
"verwalten\" oder vom Branchenverzeichnis automatisch erstellen lassen."
|
394 |
|
395 |
#: includes/admin/helpers/tables/class-form-fields-table.php:222
|
396 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
397 |
#, fuzzy
|
398 |
msgid "Go to \"Form Fields\""
|
399 |
msgstr "zu \"Formularfelder verwalten\""
|
400 |
|
401 |
#: includes/admin/helpers/tables/class-form-fields-table.php:313
|
402 |
-
#: includes/functions
|
|
|
403 |
#, fuzzy
|
404 |
msgid "Go back"
|
405 |
msgstr "Geh zurück"
|
@@ -414,7 +426,7 @@ msgid "Title"
|
|
414 |
msgstr "Titel"
|
415 |
|
416 |
#: includes/admin/helpers/tables/class-form-fields-table.php:524
|
417 |
-
#: templates/admin/fees-form.tpl.php:
|
418 |
#: templates/email/listing-added.tpl.php:21
|
419 |
#: templates/email/listing-edited.tpl.php:29
|
420 |
#, fuzzy
|
@@ -524,17 +536,8 @@ msgstr "OK"
|
|
524 |
msgid "Missing tables: %s"
|
525 |
msgstr "Nicht vorhandene Tabellen: %s"
|
526 |
|
527 |
-
#: includes/admin/settings/class-settings-admin.php:476
|
528 |
-
msgid "Your license key provides access to new features and updates."
|
529 |
-
msgstr ""
|
530 |
-
|
531 |
-
#: includes/admin/settings/class-settings-admin.php:478
|
532 |
-
#, fuzzy
|
533 |
-
msgid "You're using Business Directory Plugin Lite. Enjoy!"
|
534 |
-
msgstr "Warum löscht du die Branchenverzeichnis Erweiterung?"
|
535 |
-
|
536 |
#: includes/admin/settings/class-settings-bootstrap.php:13
|
537 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
538 |
#: includes/form-fields.php:428 templates/admin/payments-details.tpl.php:137
|
539 |
#: templates/listing-contactform.tpl.php:33
|
540 |
#: templates/listing-flagging-form.tpl.php:39
|
@@ -563,7 +566,7 @@ msgid "SEO"
|
|
563 |
msgstr ""
|
564 |
|
565 |
#: includes/admin/settings/class-settings-bootstrap.php:255
|
566 |
-
#: includes/class-assets.php:
|
567 |
#: includes/fields/class-fieldtypes-textarea.php:200
|
568 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
569 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
@@ -583,7 +586,7 @@ msgstr "%s ist ein Pflichtfeld."
|
|
583 |
|
584 |
#: includes/admin/settings/class-settings-bootstrap.php:264
|
585 |
#: includes/admin/settings/class-settings-bootstrap.php:278
|
586 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
587 |
#, fuzzy
|
588 |
msgid "Terms and Conditions"
|
589 |
msgstr "Bedingungen und Konditionen"
|
@@ -798,7 +801,7 @@ msgstr ""
|
|
798 |
#: templates/email/listing-added.tpl.php:13
|
799 |
#: templates/email/listing-edited.tpl.php:19
|
800 |
#: templates/email/listing-reported.tpl.php:13
|
801 |
-
#: templates/email-access-keys.tpl.php:
|
802 |
#, fuzzy
|
803 |
msgid "URL"
|
804 |
msgstr "URL"
|
@@ -876,11 +879,11 @@ msgstr "Authorname"
|
|
876 |
msgid "Uninstall"
|
877 |
msgstr "Deinstallieren"
|
878 |
|
879 |
-
#: includes/admin/settings/class-settings.php:
|
880 |
msgid "%s cannot include spaces, commas, or &"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: includes/admin/tracking.php:
|
884 |
#, fuzzy
|
885 |
msgid "Allow Tracking"
|
886 |
msgstr "Verfolgung erlauben"
|
@@ -983,13 +986,57 @@ msgstr "Ansicht"
|
|
983 |
msgid "Status: %s"
|
984 |
msgstr "Status"
|
985 |
|
986 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:86
|
988 |
#, fuzzy
|
989 |
msgid "Never"
|
990 |
msgstr "niemals"
|
991 |
|
992 |
-
#: includes/class-assets.php:
|
993 |
#: includes/fields/class-fieldtypes-textarea.php:201
|
994 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
995 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
@@ -997,7 +1044,7 @@ msgstr "niemals"
|
|
997 |
msgid "Yes"
|
998 |
msgstr "Ja"
|
999 |
|
1000 |
-
#: includes/class-assets.php:
|
1001 |
#, fuzzy
|
1002 |
msgid ""
|
1003 |
"Preview is only available after you've saved the first draft. This is due to "
|
@@ -1015,7 +1062,8 @@ msgstr "Neuer Eintrag"
|
|
1015 |
msgid "View Listing"
|
1016 |
msgstr "Eintrag anschauen"
|
1017 |
|
1018 |
-
#: includes/class-cpt-integration.php:22
|
|
|
1019 |
#: templates/main-box.tpl.php:23
|
1020 |
msgid "Search Listings"
|
1021 |
msgstr "Einträge durchsuchen"
|
@@ -1095,14 +1143,15 @@ msgstr "Kostenloser Eintrag"
|
|
1095 |
|
1096 |
#: includes/class-meta.php:155
|
1097 |
#: includes/controllers/pages/class-submit-listing.php:32
|
1098 |
-
#: includes/templates-ui.php:329
|
|
|
1099 |
#, fuzzy
|
1100 |
msgid "Add Listing"
|
1101 |
msgstr "Preispaket hinzufügen"
|
1102 |
|
1103 |
#: includes/class-meta.php:165
|
1104 |
#: includes/controllers/pages/class-all-listings.php:6
|
1105 |
-
#: includes/templates-ui.php:316
|
1106 |
msgid "View All Listings"
|
1107 |
msgstr "Alle Einträge anschauen"
|
1108 |
|
@@ -1114,33 +1163,33 @@ msgid ""
|
|
1114 |
"to %1$sFee Plans%2$s to add or edit your fee plan(s)."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: includes/class-wpbdp.php:
|
1118 |
#, fuzzy
|
1119 |
msgid "Upgrade to Premium"
|
1120 |
msgstr "Aktualisieren auf %s"
|
1121 |
|
1122 |
-
#: includes/class-wpbdp.php:
|
1123 |
#, fuzzy
|
1124 |
msgid "Settings"
|
1125 |
msgstr "Einstellungen"
|
1126 |
|
1127 |
-
#: includes/class-wpbdp.php:
|
1128 |
#, fuzzy
|
1129 |
msgid "Could not find listing ID"
|
1130 |
msgstr "Eine Verbindung zum Lizenzserver konnte nicht hergestellt werden."
|
1131 |
|
1132 |
-
#: includes/class-wpbdp.php:
|
1133 |
msgid ""
|
1134 |
"Could not verify the image upload request. If problem persists contact site "
|
1135 |
"admin."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/class-wpbdp.php:
|
1139 |
#, fuzzy
|
1140 |
msgid "Could not find image ID"
|
1141 |
msgstr "Konnte Lizenz nicht deaktivieren: %s"
|
1142 |
|
1143 |
-
#: includes/class-wpbdp.php:
|
1144 |
#, fuzzy
|
1145 |
msgid ""
|
1146 |
"The directory features are disabled at this time because a <a>manual "
|
@@ -1149,14 +1198,14 @@ msgstr ""
|
|
1149 |
"Branchenverzeichnis Hervorhebungen sind aktuell deaktiviert, weil das Modul "
|
1150 |
"manuell aktualisiert werden muss, bevor weiter hervorgehoben werden kann."
|
1151 |
|
1152 |
-
#: includes/class-wpbdp.php:
|
1153 |
msgid ""
|
1154 |
"The directory is not available at this time. Please try again in a few "
|
1155 |
"minutes or contact the administrator if the problem persists."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: includes/compatibility/class-navxt-integration.php:
|
1159 |
-
#: includes/widgets/widget-search.php:
|
1160 |
#: templates/admin/payments-index.tpl.php:13
|
1161 |
#: templates/deprecated/search.tpl.php:8 templates/search-form.tpl.php:27
|
1162 |
#: templates/search.tpl.php:5
|
@@ -1319,49 +1368,39 @@ msgstr "Der Eintrag wurde aktualisiert"
|
|
1319 |
msgid "This is just a preview. The listing has not been published yet."
|
1320 |
msgstr "Dies ist nur eine Vorschau. Der Eintrag wurde bisher nicht publiziert."
|
1321 |
|
1322 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1323 |
-
#, fuzzy
|
1324 |
-
msgid "Select"
|
1325 |
-
msgstr "Liste auswählen"
|
1326 |
-
|
1327 |
-
#: includes/controllers/pages/class-submit-listing.php:81
|
1328 |
-
#, fuzzy
|
1329 |
-
msgid "Selected"
|
1330 |
-
msgstr "Liste auswählen"
|
1331 |
-
|
1332 |
-
#: includes/controllers/pages/class-submit-listing.php:553
|
1333 |
#, fuzzy
|
1334 |
msgid "Listing Images"
|
1335 |
msgstr "Eintrag Bilder"
|
1336 |
|
1337 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1338 |
msgid "Account Creation"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1342 |
#, fuzzy
|
1343 |
msgid "Go to \"Fee Plans\""
|
1344 |
msgstr "zu \"Formularfelder verwalten\""
|
1345 |
|
1346 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1347 |
#, fuzzy
|
1348 |
msgid "Please choose a fee plan."
|
1349 |
msgstr "Bitte wähle eine Preisoption für die Kategorie \"%s\""
|
1350 |
|
1351 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1352 |
msgid "Please check the form for errors, correct them and submit again."
|
1353 |
msgstr ""
|
1354 |
|
1355 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1356 |
msgid "Create a user account on this site"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1360 |
#, fuzzy
|
1361 |
msgid "Username"
|
1362 |
msgstr "Benutzer"
|
1363 |
|
1364 |
-
#: includes/controllers/pages/class-submit-listing.php:
|
1365 |
#, fuzzy
|
1366 |
msgid "Clear Form"
|
1367 |
msgstr "Zurücksetzen"
|
@@ -1667,10 +1706,6 @@ msgid "%s is badly formatted. Valid Phone Number format required."
|
|
1667 |
msgstr ""
|
1668 |
"%s ist falsch formatiert. Bitte geben Sie Ihre E-mailadresse richtig ein."
|
1669 |
|
1670 |
-
#: includes/functions.php:498 templates/admin/fees-index.tpl.php:67
|
1671 |
-
msgid "Free"
|
1672 |
-
msgstr "Kostenlos"
|
1673 |
-
|
1674 |
#: includes/gateways/class-gateway-authorize-net.php:358
|
1675 |
msgid ""
|
1676 |
"An error occurred while trying to cancel your subscription. Please try again "
|
@@ -1683,6 +1718,31 @@ msgid ""
|
|
1683 |
"%s. You can try again later or cancel subscription from gateway dashboard."
|
1684 |
msgstr ""
|
1685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1686 |
#. translators: %1%s: opening <a> tag, %2$s: closing </a> tag
|
1687 |
#: includes/licensing.php:143
|
1688 |
msgid ""
|
@@ -1806,10 +1866,10 @@ msgstr ""
|
|
1806 |
msgid "Please enter a license key."
|
1807 |
msgstr "Bitte eine gültige E-mailadresse eingeben."
|
1808 |
|
1809 |
-
|
1810 |
-
|
1811 |
-
msgid "
|
1812 |
-
msgstr "
|
1813 |
|
1814 |
#: includes/payment.php:34
|
1815 |
msgid "We couldn't find a payment associated with the given subscription."
|
@@ -1832,57 +1892,52 @@ msgstr ""
|
|
1832 |
msgid "Print Receipt"
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/payment.php:
|
1836 |
#, fuzzy
|
1837 |
msgid "Pending Abandonment"
|
1838 |
msgstr "Ausstehende Zahlungen"
|
1839 |
|
1840 |
-
#: includes/payment.php:
|
1841 |
#, fuzzy
|
1842 |
msgid "Abandoned"
|
1843 |
msgstr "Abgebrochen"
|
1844 |
|
1845 |
-
#: includes/
|
1846 |
-
#, fuzzy
|
1847 |
-
msgid "Manage Listings"
|
1848 |
-
msgstr "Bezahlte Einträge verwalten"
|
1849 |
-
|
1850 |
-
#: includes/themes.php:951
|
1851 |
#, fuzzy
|
1852 |
msgid "ZIP file is not a valid Business Directory theme file."
|
1853 |
msgstr "Bitte eine gültige E-mailadresse eingeben."
|
1854 |
|
1855 |
-
#: includes/utils.php:
|
1856 |
#, fuzzy
|
1857 |
msgid "File size (%1$s) exceeds maximum file size of %2$s"
|
1858 |
msgstr "Dateigröße (%s) hat das Maximum von %s erreicht"
|
1859 |
|
1860 |
-
#: includes/utils.php:
|
1861 |
#, fuzzy
|
1862 |
msgid "File size (%1$s) is smaller than the minimum file size of %2$s"
|
1863 |
msgstr "Dateigröße (%s) hat das Maximum von %s erreicht"
|
1864 |
|
1865 |
-
#: includes/utils.php:
|
1866 |
#, fuzzy
|
1867 |
msgid "Image width (%1$s px) is smaller than the minimum width of %2$s px."
|
1868 |
msgstr ""
|
1869 |
"Die Bildbreite (%s Pixel) ist größer als die maximal zulässige Breite von %s "
|
1870 |
"Pixel."
|
1871 |
|
1872 |
-
#: includes/utils.php:
|
1873 |
#, fuzzy
|
1874 |
msgid "Image height (%1$s px) is smaller than the minimum height of %2$s px."
|
1875 |
msgstr ""
|
1876 |
"Die Bildhöhe (%s px) ist größer als die maximal zulässige Höhe von %s px."
|
1877 |
|
1878 |
-
#: includes/utils.php:
|
1879 |
#, fuzzy
|
1880 |
msgid "Image width (%1$s px) is greater than maximum width of %2$s px."
|
1881 |
msgstr ""
|
1882 |
"Die Bildbreite (%s Pixel) ist größer als die maximal zulässige Breite von %s "
|
1883 |
"Pixel."
|
1884 |
|
1885 |
-
#: includes/utils.php:
|
1886 |
#, fuzzy
|
1887 |
msgid "Image height (%1$s px) is greater than maximum height of %2$s px."
|
1888 |
msgstr ""
|
@@ -2083,7 +2138,7 @@ msgstr ""
|
|
2083 |
msgid "Download Debug Information"
|
2084 |
msgstr "Fehlerprotokoll herunterladen"
|
2085 |
|
2086 |
-
#: templates/admin/fees-add-fee.tpl.php:4 templates/admin/fees-form.tpl.php:
|
2087 |
#, fuzzy
|
2088 |
msgid "Add Listing Fee"
|
2089 |
msgstr "Preispaket hinzufügen"
|
@@ -2136,12 +2191,11 @@ msgstr "(wiederkehrend)"
|
|
2136 |
msgid "Should the listing auto-renew at the end of the listing term?"
|
2137 |
msgstr ""
|
2138 |
|
2139 |
-
#: templates/admin/fees-form.tpl.php:
|
2140 |
-
|
2141 |
-
|
2142 |
-
msgstr "Top Einträge"
|
2143 |
|
2144 |
-
#: templates/admin/fees-form.tpl.php:
|
2145 |
#, fuzzy
|
2146 |
msgid ""
|
2147 |
"This floats the listing to the top of search results and browsing the "
|
@@ -2150,15 +2204,15 @@ msgstr ""
|
|
2150 |
"Dies Platziert den Eintrag an die Spitze der Suchergebnisse und durchsucht "
|
2151 |
"das Verzeichnis, wenn der Benutzer dieses Angebot kauft."
|
2152 |
|
2153 |
-
#: templates/admin/fees-form.tpl.php:
|
2154 |
msgid "Listing background color:"
|
2155 |
msgstr ""
|
2156 |
|
2157 |
-
#: templates/admin/fees-form.tpl.php:
|
2158 |
msgid "Used to differentiate listings inside this plan from others."
|
2159 |
msgstr ""
|
2160 |
|
2161 |
-
#: templates/admin/fees-form.tpl.php:
|
2162 |
#: templates/admin/settings-email.tpl.php:104
|
2163 |
#: templates/submit-listing-section.tpl.php:30
|
2164 |
#, fuzzy
|
@@ -2280,7 +2334,7 @@ msgid "Manage Paid Listings"
|
|
2280 |
msgstr "Bezahlte Einträge verwalten"
|
2281 |
|
2282 |
#: templates/admin/metaboxes-listing-information-other.tpl.php:3
|
2283 |
-
#: templates/email-access-keys.tpl.php:
|
2284 |
#: templates/login.tpl.php:71
|
2285 |
#, fuzzy
|
2286 |
msgid "Access Key"
|
@@ -2531,99 +2585,28 @@ msgstr ""
|
|
2531 |
msgid "Your existing listings will NOT be deleted doing this."
|
2532 |
msgstr ""
|
2533 |
|
2534 |
-
#: templates/admin/sidebar.tpl.php:3
|
2535 |
-
#, fuzzy
|
2536 |
-
msgid "Category Images"
|
2537 |
-
msgstr "Kategorien"
|
2538 |
-
|
2539 |
-
#: templates/admin/sidebar.tpl.php:4
|
2540 |
-
#, fuzzy
|
2541 |
-
msgid "PayPal Payments"
|
2542 |
-
msgstr "Initialbezahlung"
|
2543 |
-
|
2544 |
-
#: templates/admin/sidebar.tpl.php:5
|
2545 |
-
#, fuzzy
|
2546 |
-
msgid "Google Maps"
|
2547 |
-
msgstr "Google Maps Module"
|
2548 |
-
|
2549 |
-
#: templates/admin/sidebar.tpl.php:6
|
2550 |
-
#, fuzzy
|
2551 |
-
msgid "Regions"
|
2552 |
-
msgstr "Regions Module"
|
2553 |
-
|
2554 |
#: templates/admin/sidebar.tpl.php:7
|
2555 |
-
|
2556 |
-
|
2557 |
-
msgstr "ZIP Code Search Module"
|
2558 |
-
|
2559 |
-
#: templates/admin/sidebar.tpl.php:8
|
2560 |
-
#, fuzzy
|
2561 |
-
msgid "Ratings"
|
2562 |
-
msgstr "Bewertungsfeld"
|
2563 |
-
|
2564 |
-
#: templates/admin/sidebar.tpl.php:9
|
2565 |
-
#, fuzzy
|
2566 |
-
msgid "Stripe Payments"
|
2567 |
-
msgstr "Bezahlung"
|
2568 |
-
|
2569 |
-
#: templates/admin/sidebar.tpl.php:10
|
2570 |
-
#, fuzzy
|
2571 |
-
msgid "Featured Levels"
|
2572 |
-
msgstr "Featured Levels Module"
|
2573 |
-
|
2574 |
-
#: templates/admin/sidebar.tpl.php:11
|
2575 |
-
#, fuzzy
|
2576 |
-
msgid "Claim Listings"
|
2577 |
-
msgstr "Claim Listings Module"
|
2578 |
-
|
2579 |
-
#: templates/admin/sidebar.tpl.php:12
|
2580 |
-
#, fuzzy
|
2581 |
-
msgid "File Upload"
|
2582 |
-
msgstr "File Upload Module"
|
2583 |
|
2584 |
#: templates/admin/sidebar.tpl.php:13
|
2585 |
-
|
2586 |
-
|
2587 |
-
msgstr "Regions Module"
|
2588 |
-
|
2589 |
-
#: templates/admin/sidebar.tpl.php:17
|
2590 |
-
#, fuzzy
|
2591 |
-
msgid "Modern Business Theme"
|
2592 |
-
msgstr "Elegant Business Theme"
|
2593 |
|
2594 |
#: templates/admin/sidebar.tpl.php:18
|
2595 |
#, fuzzy
|
2596 |
-
msgid "
|
2597 |
-
msgstr "
|
2598 |
-
|
2599 |
-
#: templates/admin/sidebar.tpl.php:19
|
2600 |
-
#, fuzzy
|
2601 |
-
msgid "Mobile Compact Theme"
|
2602 |
-
msgstr "Mobiles Kompaktes Theme"
|
2603 |
-
|
2604 |
-
#: templates/admin/sidebar.tpl.php:20
|
2605 |
-
#, fuzzy
|
2606 |
-
msgid "Restaurant Theme"
|
2607 |
-
msgstr "Restaurant Theme"
|
2608 |
-
|
2609 |
-
#: templates/admin/sidebar.tpl.php:21
|
2610 |
-
#, fuzzy
|
2611 |
-
msgid "Tabbed Business Theme"
|
2612 |
-
msgstr "Tabbed Business Theme"
|
2613 |
|
2614 |
-
#: templates/admin/sidebar.tpl.php:
|
2615 |
#, fuzzy
|
2616 |
-
msgid "
|
2617 |
-
msgstr "
|
2618 |
|
2619 |
-
#: templates/admin/sidebar.tpl.php:
|
2620 |
#, fuzzy
|
2621 |
-
msgid "
|
2622 |
-
msgstr "
|
2623 |
-
|
2624 |
-
#: templates/admin/sidebar.tpl.php:40
|
2625 |
-
msgid "Need help?"
|
2626 |
-
msgstr ""
|
2627 |
|
2628 |
#: templates/admin/themes-delete-confirm.tpl.php:1
|
2629 |
#: templates/admin/themes-delete-confirm.tpl.php:13
|
@@ -3174,56 +3157,223 @@ msgctxt "views"
|
|
3174 |
msgid "Find A Listing"
|
3175 |
msgstr "Eintrag finden"
|
3176 |
|
3177 |
-
#: includes/admin/class-admin
|
3178 |
-
msgctxt "
|
3179 |
-
msgid "
|
3180 |
-
msgstr "
|
3181 |
-
|
3182 |
-
#: includes/admin/class-csv-import.php:533
|
3183 |
-
msgctxt "admin csv-import"
|
3184 |
-
msgid ""
|
3185 |
-
"Could not create listing category \"<category-name>\". The operation failed "
|
3186 |
-
"with the following error: <error-message>."
|
3187 |
-
msgstr ""
|
3188 |
-
"Die Kategorieauflistung \"<category-name>\" konnte nicht erstellt werden. "
|
3189 |
-
"Der Vorgang ist mit dem folgenden Fehler fehlgeschlagen: <error-message>."
|
3190 |
-
|
3191 |
-
#: includes/admin/class-csv-import.php:539
|
3192 |
-
msgctxt "admin csv-import"
|
3193 |
-
msgid "Could not create listing category \"%s\""
|
3194 |
-
msgstr "Konnte Eintragskategorie nicht erstellen \"%s\""
|
3195 |
|
3196 |
-
#: includes/admin/class-
|
3197 |
-
msgctxt "admin
|
3198 |
-
msgid "
|
3199 |
-
msgstr "
|
3200 |
|
3201 |
-
#: includes/admin/class-
|
3202 |
-
msgctxt "admin
|
3203 |
-
msgid "
|
3204 |
msgstr ""
|
|
|
|
|
3205 |
|
3206 |
-
#: includes/admin/class-
|
3207 |
-
msgctxt "admin
|
3208 |
-
msgid "
|
3209 |
-
msgstr "Benötigtes nicht vorhandenes Feld: %s"
|
3210 |
-
|
3211 |
-
#: includes/admin/class-csv-import.php:833
|
3212 |
-
msgctxt "admin csv-import"
|
3213 |
-
msgid "Listing category \"%s\" does not exist"
|
3214 |
-
msgstr "Eintragskategorie \"%s\" existiert nicht"
|
3215 |
-
|
3216 |
-
#: includes/admin/class-csv-import.php:904
|
3217 |
-
msgctxt "admin csv-import"
|
3218 |
-
msgid "The string <string> couldn't be converted into a valid date."
|
3219 |
msgstr ""
|
3220 |
|
3221 |
-
#: includes/admin/
|
3222 |
-
msgctxt "admin
|
3223 |
-
msgid "
|
3224 |
-
msgstr "
|
3225 |
|
3226 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3227 |
msgctxt "admin csv-import"
|
3228 |
msgid "Example CSV Import File"
|
3229 |
msgstr "Beispiel CSV Import Datei"
|
@@ -3254,6 +3404,45 @@ msgstr ""
|
|
3254 |
"Der Import ist im <b>Testmodus</b>. es wird nichts in die Datenbank "
|
3255 |
"geschrieben."
|
3256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3257 |
#: templates/admin/csv-import-progress.tpl.php:5
|
3258 |
msgctxt "admin csv-import"
|
3259 |
msgid "A fatal error occurred during the import. The reason given was: \"%s\"."
|
@@ -3485,453 +3674,237 @@ msgstr ""
|
|
3485 |
"Tag des Eintragende formatiert als YYYY-MM-DD. Benutze diese Spalte, wenn "
|
3486 |
"Einträge aus externen Quellen hinzugefügt oder aktualisiert werden."
|
3487 |
|
3488 |
-
#: includes/admin/class-admin-csv.php:
|
3489 |
#, fuzzy
|
3490 |
msgctxt "admin csv"
|
3491 |
msgid "Import"
|
3492 |
msgstr "CSV Import"
|
3493 |
|
3494 |
-
#: includes/admin/class-admin-csv.php:
|
3495 |
#, fuzzy
|
3496 |
msgctxt "admin csv"
|
3497 |
msgid "Export"
|
3498 |
msgstr "CVS Export"
|
3499 |
|
3500 |
-
#: includes/admin/class-admin.php:
|
3501 |
-
msgctxt "
|
3502 |
-
msgid "
|
3503 |
-
msgstr "
|
3504 |
|
3505 |
-
#: includes/admin/class-admin.php:
|
3506 |
-
msgctxt "
|
3507 |
-
msgid "
|
3508 |
-
msgstr "
|
3509 |
|
3510 |
-
#: includes/admin/class-admin.php:
|
3511 |
-
msgctxt "
|
3512 |
-
msgid "
|
3513 |
-
msgstr ""
|
3514 |
-
"Sie haben alles konfiguriert. Besuchen sie Ihr neues <a>Branchenverzeichnis</"
|
3515 |
-
"a>."
|
3516 |
|
3517 |
-
#: includes/admin/class-admin.php:
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
|
|
3521 |
|
3522 |
-
#: includes/admin/class-admin.php:
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
|
|
3526 |
|
3527 |
-
#: includes/admin/class-admin
|
3528 |
#, fuzzy
|
3529 |
-
msgctxt "admin"
|
3530 |
-
msgid "
|
3531 |
-
|
3532 |
-
msgstr[0] "Der Eintrag wurde aktualisiert"
|
3533 |
-
msgstr[1] "Die Einträge wurden aktualisiert."
|
3534 |
|
3535 |
-
#: includes/admin/class-admin.php:
|
3536 |
-
msgctxt "admin"
|
3537 |
-
msgid "
|
3538 |
-
msgstr "
|
3539 |
|
3540 |
-
#: includes/admin/class-
|
3541 |
-
msgctxt "admin"
|
3542 |
-
msgid "
|
3543 |
-
|
3544 |
-
msgstr[0] "Eintrag wurde aktualisiert."
|
3545 |
-
msgstr[1] "Einträge wurden aktualisiert."
|
3546 |
|
3547 |
-
#: includes/admin/class-
|
3548 |
-
msgctxt "admin"
|
3549 |
-
msgid "
|
3550 |
-
msgstr "
|
3551 |
|
3552 |
-
#: includes/admin/class-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
msgid_plural "Listing reports deleted."
|
3557 |
-
msgstr[0] "Eintrag Enddatum"
|
3558 |
-
msgstr[1] "Eintrag Enddatum"
|
3559 |
|
3560 |
-
#: includes/admin/class-
|
|
|
|
|
|
|
|
|
|
|
3561 |
#, fuzzy
|
3562 |
-
msgctxt "admin"
|
3563 |
-
msgid "
|
3564 |
-
msgstr "
|
3565 |
|
3566 |
-
#: includes/admin/class-
|
3567 |
-
msgctxt "admin"
|
3568 |
-
msgid "
|
3569 |
-
msgstr ""
|
3570 |
|
3571 |
-
#: includes/admin/class-
|
3572 |
-
msgctxt "admin"
|
3573 |
-
msgid ""
|
3574 |
-
"<b>Business Directory Plugin</b> requires a page with the "
|
3575 |
-
"<tt>[businessdirectory]</tt> shortcode to function properly."
|
3576 |
msgstr ""
|
3577 |
-
"<b>Branchenverzeichnis Erweiterung</b> benötigt eine Seite mit dem "
|
3578 |
-
"<tt>[businessdirectory]</tt> shortcode um zu funktionieren."
|
3579 |
|
3580 |
-
#: includes/admin/class-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
msgstr ""
|
3586 |
-
"Du kannst diese Seite selbst erstellen oder vom Branchenverzeichnis "
|
3587 |
-
"automatisch erstellen lassen."
|
3588 |
|
3589 |
-
#: includes/admin/class-
|
3590 |
-
|
3591 |
-
|
3592 |
-
|
|
|
3593 |
|
3594 |
-
#: includes/admin/class-
|
3595 |
-
msgctxt "admin"
|
3596 |
-
msgid ""
|
3597 |
-
"
|
3598 |
-
"or later, but your server is running version <strong>%s</strong>. Please ask "
|
3599 |
-
"your provider to upgrade in order to prevent any issues with the plugin."
|
3600 |
-
msgstr ""
|
3601 |
|
3602 |
-
#: includes/admin/class-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
"
|
3607 |
-
|
3608 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3609 |
msgstr ""
|
3610 |
-
"Wir haben festgestellt du möchtest, dass deine Branchenverzeichnisbenutzer "
|
3611 |
-
"sich registrieren sollen bevor sie sich eintragen, die Registrierung für "
|
3612 |
-
"deine Seite ist momentan ausgeschaltet. Klicke [hier] und prüfe \"Jeder kann "
|
3613 |
-
"sich registrieren\", um sicher zu sein, dass das Branchenverzeichnis korrekt "
|
3614 |
-
"funktioniert."
|
3615 |
|
3616 |
-
#: includes/admin/class-
|
3617 |
#, fuzzy
|
3618 |
-
msgctxt "admin"
|
3619 |
-
msgid "
|
3620 |
-
msgstr "
|
3621 |
|
3622 |
-
#: includes/admin/class-
|
3623 |
#, fuzzy
|
3624 |
-
msgctxt "admin"
|
3625 |
-
msgid "
|
3626 |
-
msgstr "
|
3627 |
|
3628 |
-
#: includes/admin/class-
|
3629 |
#, fuzzy
|
3630 |
-
msgctxt "admin"
|
3631 |
-
msgid "
|
3632 |
-
msgstr "
|
3633 |
|
3634 |
-
#: includes/admin/
|
3635 |
#, fuzzy
|
3636 |
-
msgctxt "admin"
|
3637 |
-
msgid "
|
3638 |
-
msgstr "
|
3639 |
-
|
3640 |
-
#: includes/admin/controllers/class-admin-listings.php:265
|
3641 |
-
msgctxt "admin"
|
3642 |
-
msgid "Categories"
|
3643 |
-
msgstr "Kategorien"
|
3644 |
|
3645 |
-
#: includes/admin/helpers/tables/class-
|
3646 |
-
msgctxt "admin"
|
3647 |
-
msgid ""
|
3648 |
-
|
3649 |
-
"associations in order to work correctly: <b>%s</b>."
|
3650 |
-
msgstr ""
|
3651 |
-
"<b>Branchenverzeichnis Erweiterung</b> benötigt Felder mit den folgenden "
|
3652 |
-
"Verbindungen um korrekt zu funktionieren: <b>%s</b>."
|
3653 |
|
3654 |
-
#:
|
3655 |
-
msgctxt "admin"
|
3656 |
-
msgid ""
|
3657 |
-
"<b>Business Directory Plugin</b> requires a field with a <b>%s</b> "
|
3658 |
-
"association in order to work correctly."
|
3659 |
msgstr ""
|
3660 |
-
"<b>Branchenverzeichnis Erweiterung</b> benötigt ein Feld mit der Verbindung "
|
3661 |
-
"<b>%s</b>, um korrekt zu funktionieren."
|
3662 |
-
|
3663 |
-
#: includes/admin/helpers/tables/class-form-fields-table.php:227
|
3664 |
-
msgctxt "admin"
|
3665 |
-
msgid "Create these required fields for me"
|
3666 |
-
msgstr "Erstelle diese benötigten Felder für mich"
|
3667 |
|
3668 |
-
#:
|
3669 |
#, fuzzy
|
3670 |
-
msgctxt "admin
|
3671 |
-
msgid "
|
3672 |
-
msgstr "
|
3673 |
|
3674 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
3675 |
#, fuzzy
|
3676 |
-
msgctxt "admin
|
3677 |
-
msgid "
|
3678 |
-
msgstr "
|
3679 |
|
3680 |
-
#:
|
3681 |
-
msgctxt "admin
|
3682 |
-
msgid "
|
3683 |
-
msgstr "
|
3684 |
|
3685 |
-
#:
|
3686 |
#, fuzzy
|
3687 |
-
msgctxt "admin
|
3688 |
-
msgid "
|
3689 |
-
msgstr "
|
3690 |
|
3691 |
-
#:
|
3692 |
-
msgctxt "admin
|
3693 |
-
msgid "
|
3694 |
msgstr ""
|
3695 |
-
"Es konnte kein temporäres Verzeichnis erstellt werden um den CSV Export "
|
3696 |
-
"durchzuführen."
|
3697 |
|
3698 |
-
#:
|
3699 |
-
msgctxt "admin
|
3700 |
-
msgid "
|
3701 |
msgstr ""
|
3702 |
-
"Es konnte kein temporäres Verzeichnis erstellt werden um den CSV Export "
|
3703 |
-
"durchzuführen."
|
3704 |
|
3705 |
-
#:
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
|
|
3709 |
|
3710 |
-
#: templates/admin/
|
3711 |
-
msgctxt "admin
|
3712 |
-
msgid ""
|
3713 |
-
"Please note that the export process is a resource intensive task. If your "
|
3714 |
-
"export does not succeed try disabling other plugins first and/or increasing "
|
3715 |
-
"the values of the 'memory_limit' and 'max_execution_time' directives in your "
|
3716 |
-
"server's php.ini configuration file."
|
3717 |
msgstr ""
|
3718 |
-
"Bitte beachte das der Exportprozess eine sehr leistungsintensiver Prozess "
|
3719 |
-
"ist. Wenn der Export nicht funktioniert, versuche zuerst andere "
|
3720 |
-
"Erweiterungen abzuschalten und/oder den Wert von 'memory_limit' und "
|
3721 |
-
"'max_execution_time' in deiner php.ini Konfigurationsdatei anzupassen."
|
3722 |
|
3723 |
-
#: templates/admin/
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
|
|
3727 |
|
3728 |
-
#: templates/admin/
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
|
|
3732 |
|
3733 |
-
#: templates/admin/csv-export.tpl.php:37
|
3734 |
-
msgctxt "admin csv-export"
|
3735 |
-
msgid "All"
|
3736 |
-
msgstr "Alle"
|
3737 |
-
|
3738 |
-
#: templates/admin/csv-export.tpl.php:38
|
3739 |
-
msgctxt "admin csv-export"
|
3740 |
-
msgid "Active Only"
|
3741 |
-
msgstr "Nur Aktiv"
|
3742 |
-
|
3743 |
-
#: templates/admin/csv-export.tpl.php:39
|
3744 |
-
msgctxt "admin csv-export"
|
3745 |
-
msgid "Active + Pending Renewal"
|
3746 |
-
msgstr "Aktiv + Ausstehende Erneuerungen"
|
3747 |
-
|
3748 |
-
#: templates/admin/csv-export.tpl.php:45
|
3749 |
-
msgctxt "admin csv-export"
|
3750 |
-
msgid "Export images?"
|
3751 |
-
msgstr "Bilder exportieren?"
|
3752 |
-
|
3753 |
-
#: templates/admin/csv-export.tpl.php:50
|
3754 |
-
msgctxt "admin csv-export"
|
3755 |
-
msgid "Export images"
|
3756 |
-
msgstr "Bilder exportieren"
|
3757 |
-
|
3758 |
-
#: templates/admin/csv-export.tpl.php:52
|
3759 |
-
msgctxt "admin csv-export"
|
3760 |
-
msgid ""
|
3761 |
-
"When checked, instead of just a CSV file a ZIP file will be generated with "
|
3762 |
-
"both a CSV file and listing images."
|
3763 |
-
msgstr ""
|
3764 |
-
"Wenn aktiviert, wird anstatt nur einer CSV-Datei, eine ZIP Datei generiert, "
|
3765 |
-
"die sowohl eine CSV-Datei und Eintragsbilder enthält."
|
3766 |
-
|
3767 |
-
#: templates/admin/csv-export.tpl.php:58
|
3768 |
-
msgctxt "admin csv-export"
|
3769 |
-
msgid "Additional metadata to export:"
|
3770 |
-
msgstr "zu exportierende zusätzliche Metadaten"
|
3771 |
-
|
3772 |
-
#: templates/admin/csv-export.tpl.php:63
|
3773 |
-
msgctxt "admin csv-export"
|
3774 |
-
msgid "Include unique IDs for each listing (sequence_id column)."
|
3775 |
-
msgstr "Füge Schlüssel Ids für jeden Eintrag hinzu (sequence_id_column)"
|
3776 |
-
|
3777 |
-
#: templates/admin/csv-export.tpl.php:71
|
3778 |
-
msgctxt "admin csv-export"
|
3779 |
-
msgid "Author information (username)"
|
3780 |
-
msgstr "Author Informationen (Benutzername)"
|
3781 |
-
|
3782 |
-
#: templates/admin/csv-export.tpl.php:76
|
3783 |
-
msgctxt "admin csv-export"
|
3784 |
-
msgid "Listing expiration date"
|
3785 |
-
msgstr "Eintrag Enddatum"
|
3786 |
-
|
3787 |
-
#: templates/admin/csv-export.tpl.php:80
|
3788 |
-
#, fuzzy
|
3789 |
-
msgctxt "admin csv-export"
|
3790 |
-
msgid "Listing created date"
|
3791 |
-
msgstr "Eintrag Bilder"
|
3792 |
-
|
3793 |
-
#: templates/admin/csv-export.tpl.php:84
|
3794 |
-
#, fuzzy
|
3795 |
-
msgctxt "admin csv-export"
|
3796 |
-
msgid "Listing last updated date"
|
3797 |
-
msgstr "Eintrag Enddatum"
|
3798 |
-
|
3799 |
-
#: templates/admin/csv-export.tpl.php:88
|
3800 |
-
#, fuzzy
|
3801 |
-
msgctxt "admin csv-export"
|
3802 |
-
msgid "Listing T&C acceptance date"
|
3803 |
-
msgstr "Eintrag Bilder"
|
3804 |
-
|
3805 |
-
#: templates/admin/csv-export.tpl.php:97
|
3806 |
-
msgctxt "admin csv-export"
|
3807 |
-
msgid "What operating system will you use to edit the CSV file?"
|
3808 |
-
msgstr "Welches Betriebssystem verwenden Sie, um die CSV-Datei zu bearbeiten?"
|
3809 |
-
|
3810 |
-
#: templates/admin/csv-export.tpl.php:104
|
3811 |
-
msgctxt "admin csv-export"
|
3812 |
-
msgid "Windows"
|
3813 |
-
msgstr "Windows"
|
3814 |
-
|
3815 |
-
#: templates/admin/csv-export.tpl.php:109
|
3816 |
-
msgctxt "admin csv-export"
|
3817 |
-
msgid "macOS"
|
3818 |
-
msgstr "MacOS"
|
3819 |
-
|
3820 |
-
#: templates/admin/csv-export.tpl.php:111
|
3821 |
-
msgctxt "admin csv-export"
|
3822 |
-
msgid ""
|
3823 |
-
"Windows and macOS versions of MS Excel handle CSV files differently. To make "
|
3824 |
-
"sure all your listings information is displayed properly when you view or "
|
3825 |
-
"edit the CSV file, we need to generate different versions of the file for "
|
3826 |
-
"each operating system."
|
3827 |
-
msgstr ""
|
3828 |
-
"Windows- und MacOS-Versionen von MS Excel behandeln CSV-Dateien "
|
3829 |
-
"unterschiedlich. Um sicherzustellen, dass alle Ihre Listeninformationen "
|
3830 |
-
"korrekt angezeigt werden, wenn Sie die CSV-Datei anzeigen oder bearbeiten, "
|
3831 |
-
"müssen wir für jedes Betriebssystem unterschiedliche Versionen der Datei "
|
3832 |
-
"generieren."
|
3833 |
-
|
3834 |
-
#: templates/admin/csv-export.tpl.php:129
|
3835 |
-
msgctxt "admin csv-export"
|
3836 |
-
msgid "Category Separator"
|
3837 |
-
msgstr "Kategorietrenner"
|
3838 |
-
|
3839 |
-
#: templates/admin/csv-export.tpl.php:141
|
3840 |
-
msgctxt "admin csv-export"
|
3841 |
-
msgid "Export Listings"
|
3842 |
-
msgstr "Export Einträge"
|
3843 |
-
|
3844 |
-
#: templates/admin/csv-export.tpl.php:147
|
3845 |
-
msgctxt "admin csv-export"
|
3846 |
-
msgid "Export in Progress..."
|
3847 |
-
msgstr "Export wird durchgeführt..."
|
3848 |
-
|
3849 |
-
#: templates/admin/csv-export.tpl.php:148
|
3850 |
-
msgctxt "admin csv-export"
|
3851 |
-
msgid ""
|
3852 |
-
"Your export file is being prepared. Please <u>do not leave</u> this page "
|
3853 |
-
"until the export finishes."
|
3854 |
-
msgstr ""
|
3855 |
-
"Die Exportdatei wurde vorbereitet. Bitte <u>verlasse</u> diese Seite nicht "
|
3856 |
-
"bis der Export abgeschlossen wurde."
|
3857 |
-
|
3858 |
-
#: templates/admin/csv-export.tpl.php:151
|
3859 |
-
msgctxt "admin csv-export"
|
3860 |
-
msgid "No. of listings:"
|
3861 |
-
msgstr "Anzahl der Einträge:"
|
3862 |
-
|
3863 |
-
#: templates/admin/csv-export.tpl.php:153
|
3864 |
-
msgctxt "admin csv-export"
|
3865 |
-
msgid "Approximate export file size:"
|
3866 |
-
msgstr "Exportdatei Größe ca. :"
|
3867 |
-
|
3868 |
-
#: templates/admin/csv-export.tpl.php:160
|
3869 |
-
msgctxt "admin csv-export"
|
3870 |
-
msgid "Cancel Export"
|
3871 |
-
msgstr "Export abbrechen"
|
3872 |
-
|
3873 |
-
#: templates/admin/csv-export.tpl.php:165
|
3874 |
-
msgctxt "admin csv-export"
|
3875 |
-
msgid "Export Complete"
|
3876 |
-
msgstr "Export vollständig"
|
3877 |
-
|
3878 |
-
#: templates/admin/csv-export.tpl.php:166
|
3879 |
-
msgctxt "admin csv-export"
|
3880 |
-
msgid ""
|
3881 |
-
"Your export file has been successfully created an
|
5 |
"Project-Id-Version: Business Directory Plugin v5.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/business-"
|
7 |
"directory-plugin\n"
|
8 |
+
"POT-Creation-Date: 2021-10-28 23:34:58+00:00\n"
|
9 |
"PO-Revision-Date: 2020-06-17 15:32-0500\n"
|
10 |
"Last-Translator: Axel J. Metayer <axel@kfz.net>\n"
|
11 |
"Language-Team: Business Directory Plugin <support@businessdirectoryplugin."
|
32 |
"payment processor directly."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/admin/class-admin.php:188
|
|
|
|
|
|
|
|
|
|
|
36 |
#, fuzzy
|
37 |
msgid ""
|
38 |
"Find out how to create a compelling, thriving business directory from "
|
42 |
"von Grund aufbauen mit diesem einfachen (und kostenlosen) 5-teiligen E-Mail-"
|
43 |
"Kurs. Sie erhalten ein kostenloses Premium-Modul nur für die Anmeldung."
|
44 |
|
45 |
+
#: includes/admin/class-admin.php:197
|
46 |
#, fuzzy
|
47 |
msgid "Want to know the Secrets of Building an Awesome Business Directory?"
|
48 |
msgstr ""
|
49 |
"Möchten Sie mehr über die Geheimnisse eines erfolgreichen Verzeichnisses "
|
50 |
"wissen?"
|
51 |
|
52 |
+
#: includes/admin/class-admin.php:199
|
53 |
#, fuzzy
|
54 |
msgid "Yes, please!"
|
55 |
msgstr "Ja, bitte!"
|
56 |
|
57 |
+
#: includes/admin/class-admin.php:201 includes/admin/tracking.php:215
|
58 |
#, fuzzy
|
59 |
msgid "No, thanks"
|
60 |
msgstr "Nein, danke"
|
61 |
|
62 |
+
#: includes/admin/class-admin.php:263
|
63 |
#, fuzzy
|
64 |
msgid "Invalid email address."
|
65 |
msgstr "Ungültiger Erneuerungszustand."
|
66 |
|
67 |
+
#: includes/admin/class-admin.php:297
|
68 |
#, fuzzy
|
69 |
msgid "Business Directory Admin"
|
70 |
msgstr "Branchenverzeichnis Administration"
|
71 |
|
72 |
+
#: includes/admin/class-admin.php:298
|
73 |
#: includes/admin/settings/class-settings-bootstrap.php:703
|
74 |
#: includes/admin/settings/class-settings-bootstrap.php:704
|
75 |
+
#: includes/helpers/class-app.php:93
|
76 |
+
#: includes/helpers/functions/templates-ui.php:307
|
77 |
msgid "Directory"
|
78 |
msgstr "Verzeichnis"
|
79 |
|
80 |
+
#: includes/admin/class-admin.php:309 templates/admin/home.tpl.php:65
|
81 |
msgid "Fee Plans"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/admin/class-admin.php:312 templates/admin/home.tpl.php:60
|
85 |
#, fuzzy
|
86 |
msgid "Form Fields"
|
87 |
msgstr "Formularfelder"
|
88 |
|
89 |
+
#: includes/admin/class-admin.php:341 includes/admin/class-admin.php:342
|
90 |
#: includes/licensing.php:220
|
91 |
#, fuzzy
|
92 |
msgid "Modules"
|
93 |
msgstr "Installierte Module"
|
94 |
|
95 |
+
#: includes/admin/class-admin.php:342
|
96 |
#, fuzzy
|
97 |
msgid "Business Directory"
|
98 |
msgstr "Branchenverzeichnis"
|
99 |
|
100 |
+
#: includes/admin/class-admin.php:846
|
101 |
#, fuzzy
|
102 |
msgid "Could not send renewal email."
|
103 |
msgstr "Erneuerungsmail an Benutzer schicken"
|
104 |
|
105 |
+
#: includes/admin/class-admin.php:980
|
106 |
#: includes/admin/helpers/tables/class-form-fields-table.php:127
|
107 |
#: includes/admin/helpers/tables/class-payments-table.php:54
|
108 |
#: templates/email/listing-added.tpl.php:7
|
112 |
msgid "ID"
|
113 |
msgstr "ID"
|
114 |
|
115 |
+
#: includes/admin/class-admin.php:982 includes/admin/class-admin.php:990
|
116 |
#: includes/admin/settings/class-settings-bootstrap.php:729
|
117 |
#, fuzzy
|
118 |
msgid "Listing Count"
|
119 |
msgstr "Anzahl Einträge"
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
#: includes/admin/class-listing-owner.php:62
|
122 |
#: includes/admin/class-listing-owner.php:89
|
123 |
#, fuzzy
|
185 |
msgid "Are you sure you want to do this?"
|
186 |
msgstr "Möchtest du das wirklich tun?"
|
187 |
|
188 |
+
#: includes/admin/controllers/class-admin-csv.php:41
|
189 |
+
#: templates/admin/csv-import.tpl.php:312
|
190 |
+
#, fuzzy
|
191 |
+
msgid "Help"
|
192 |
+
msgstr "Hilfe "
|
193 |
+
|
194 |
+
#: includes/admin/controllers/class-admin-fees.php:47
|
195 |
+
#: includes/admin/helpers/tables/class-fees-table.php:62
|
196 |
+
#: includes/admin/helpers/tables/class-payments-table.php:57
|
197 |
+
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:273
|
198 |
+
#: templates/admin/metaboxes-listing-information-plan.tpl.php:73
|
199 |
+
#: templates/admin/payments-details.tpl.php:110
|
200 |
+
#: templates/email/listing-payment-completed.tpl.php:21
|
201 |
+
#: templates/payment/payment_items.tpl.php:5
|
202 |
+
#, fuzzy
|
203 |
+
msgid "Amount"
|
204 |
+
msgstr "Preis"
|
205 |
+
|
206 |
+
#: includes/admin/controllers/class-admin-fees.php:49
|
207 |
+
#: includes/admin/helpers/tables/class-fees-table.php:64
|
208 |
+
#: includes/admin/settings/class-settings-bootstrap.php:919
|
209 |
+
#: includes/admin/upgrades/migrations/manual-upgrade-18_0-featured-levels.php:275
|
210 |
+
#, fuzzy
|
211 |
+
msgid "Images"
|
212 |
+
msgstr "Bilder"
|
213 |
+
|
214 |
#: includes/admin/controllers/class-admin-listings.php:185
|
215 |
+
#: includes/controllers/pages/class-submit-listing.php:504
|
216 |
#: templates/email/listing-reported.tpl.php:7
|
217 |
msgid "Listing Information"
|
218 |
msgstr "Eintrag Informationen"
|
244 |
|
245 |
#: includes/admin/controllers/class-admin-listings.php:475
|
246 |
#: includes/class-cpt-integration.php:19
|
247 |
+
#: includes/compatibility/class-navxt-integration.php:204
|
248 |
#: templates/submit-listing.tpl.php:15
|
249 |
msgid "Edit Listing"
|
250 |
msgstr "Eintrag bearbeiten"
|
254 |
msgid "Delete Listing"
|
255 |
msgstr "Eintrag Löschen"
|
256 |
|
257 |
+
#: includes/admin/controllers/class-settings-admin.php:476
|
258 |
+
msgid "Your license key provides access to new features and updates."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: includes/admin/controllers/class-settings-admin.php:478
|
262 |
+
#, fuzzy
|
263 |
+
msgid "You're using Business Directory Plugin Lite. Enjoy!"
|
264 |
+
msgstr "Warum löscht du die Branchenverzeichnis Erweiterung?"
|
265 |
+
|
266 |
+
#: includes/admin/controllers/class-settings-admin.php:536
|
267 |
+
#: includes/admin/helpers/tables/class-fees-table.php:175
|
268 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:104
|
269 |
+
#: templates/admin/metaboxes-listing-flagging-row.tpl.php:19
|
270 |
+
#: templates/admin/payments-note.tpl.php:14
|
271 |
+
#: templates/admin/themes-item.tpl.php:58
|
272 |
+
#: templates/parts/listing-buttons.tpl.php:33
|
273 |
+
#: templates/parts/listing-buttons.tpl.php:67
|
274 |
+
#, fuzzy
|
275 |
+
msgid "Delete"
|
276 |
+
msgstr "Löschen"
|
277 |
+
|
278 |
#: includes/admin/controllers/class-themes-admin.php:44
|
279 |
#, fuzzy
|
280 |
msgid "Themes"
|
300 |
msgid "Please upload the correct file type."
|
301 |
msgstr "Die hochgeladene Datei ist nicht im CSV Format."
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
#: includes/admin/helpers/class-listing-information-metabox.php:15
|
304 |
#: includes/admin/helpers/tables/class-payments-table.php:53
|
305 |
#: includes/admin/settings/class-settings-bootstrap.php:679
|
346 |
msgid "Upgrade Now"
|
347 |
msgstr "Aktualisieren auf %s"
|
348 |
|
349 |
+
#: includes/admin/helpers/csv/class-csv-import.php:676
|
350 |
+
#, fuzzy
|
351 |
+
msgid "Listing imported by admin. Payment skipped."
|
352 |
+
msgstr "Eintrag zusenden (Initialbezahlung)"
|
353 |
+
|
354 |
#. translators: %1$s: open link html, %2$s close link
|
355 |
#: includes/admin/helpers/tables/class-fees-table.php:30
|
356 |
#, fuzzy
|
369 |
msgid "Enable"
|
370 |
msgstr "Aktivieren"
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
#: includes/admin/helpers/tables/class-fees-table.php:256
|
373 |
#: includes/admin/helpers/tables/class-fees-table.php:258
|
374 |
#, fuzzy
|
376 |
msgstr "Inaktiv"
|
377 |
|
378 |
#: includes/admin/helpers/tables/class-fees-table.php:264
|
379 |
+
#: includes/helpers/functions/templates-ui.php:431
|
380 |
#, fuzzy
|
381 |
msgid "Default"
|
382 |
msgstr "Standard Preis"
|
404 |
"verwalten\" oder vom Branchenverzeichnis automatisch erstellen lassen."
|
405 |
|
406 |
#: includes/admin/helpers/tables/class-form-fields-table.php:222
|
407 |
+
#: includes/controllers/pages/class-submit-listing.php:834
|
408 |
#, fuzzy
|
409 |
msgid "Go to \"Form Fields\""
|
410 |
msgstr "zu \"Formularfelder verwalten\""
|
411 |
|
412 |
#: includes/admin/helpers/tables/class-form-fields-table.php:313
|
413 |
+
#: includes/helpers/functions/general.php:1358
|
414 |
+
#: includes/helpers/functions/general.php:1363
|
415 |
#, fuzzy
|
416 |
msgid "Go back"
|
417 |
msgstr "Geh zurück"
|
426 |
msgstr "Titel"
|
427 |
|
428 |
#: includes/admin/helpers/tables/class-form-fields-table.php:524
|
429 |
+
#: templates/admin/fees-form.tpl.php:219
|
430 |
#: templates/email/listing-added.tpl.php:21
|
431 |
#: templates/email/listing-edited.tpl.php:29
|
432 |
#, fuzzy
|
536 |
msgid "Missing tables: %s"
|
537 |
msgstr "Nicht vorhandene Tabellen: %s"
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
#: includes/admin/settings/class-settings-bootstrap.php:13
|
540 |
+
#: includes/controllers/pages/class-submit-listing.php:1237
|
541 |
#: includes/form-fields.php:428 templates/admin/payments-details.tpl.php:137
|
542 |
#: templates/listing-contactform.tpl.php:33
|
543 |
#: templates/listing-flagging-form.tpl.php:39
|
566 |
msgstr ""
|
567 |
|
568 |
#: includes/admin/settings/class-settings-bootstrap.php:255
|
569 |
+
#: includes/class-assets.php:328
|
570 |
#: includes/fields/class-fieldtypes-textarea.php:200
|
571 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
572 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
586 |
|
587 |
#: includes/admin/settings/class-settings-bootstrap.php:264
|
588 |
#: includes/admin/settings/class-settings-bootstrap.php:278
|
589 |
+
#: includes/controllers/pages/class-submit-listing.php:517
|
590 |
#, fuzzy
|
591 |
msgid "Terms and Conditions"
|
592 |
msgstr "Bedingungen und Konditionen"
|
801 |
#: templates/email/listing-added.tpl.php:13
|
802 |
#: templates/email/listing-edited.tpl.php:19
|
803 |
#: templates/email/listing-reported.tpl.php:13
|
804 |
+
#: templates/email-access-keys.tpl.php:6
|
805 |
#, fuzzy
|
806 |
msgid "URL"
|
807 |
msgstr "URL"
|
879 |
msgid "Uninstall"
|
880 |
msgstr "Deinstallieren"
|
881 |
|
882 |
+
#: includes/admin/settings/class-settings.php:515
|
883 |
msgid "%s cannot include spaces, commas, or &"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: includes/admin/tracking.php:222
|
887 |
#, fuzzy
|
888 |
msgid "Allow Tracking"
|
889 |
msgstr "Verfolgung erlauben"
|
986 |
msgid "Status: %s"
|
987 |
msgstr "Status"
|
988 |
|
989 |
+
#: includes/admin/views/review.php:17
|
990 |
+
#, fuzzy
|
991 |
+
msgid "Are you enjoying Business Directory Plugin?"
|
992 |
+
msgstr "Warum löscht du die Branchenverzeichnis Erweiterung?"
|
993 |
+
|
994 |
+
#: includes/admin/views/review.php:20
|
995 |
+
#, fuzzy
|
996 |
+
msgid "Not Really"
|
997 |
+
msgstr "Nicht installiert "
|
998 |
+
|
999 |
+
#: includes/admin/views/review.php:23
|
1000 |
+
msgid "Yes!"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: includes/admin/views/review.php:27
|
1004 |
+
msgid ""
|
1005 |
+
"Awesome! Could you do me a BIG favor and give Business Directory Plugin a "
|
1006 |
+
"review to help me grow my little business and boost our motivation?"
|
1007 |
+
msgstr ""
|
1008 |
+
|
1009 |
+
#: includes/admin/views/review.php:29
|
1010 |
+
#, fuzzy
|
1011 |
+
msgid "Co-Founder and CTO of Business Directory Plugin"
|
1012 |
+
msgstr "Business Directory Plugin"
|
1013 |
+
|
1014 |
+
#: includes/admin/views/review.php:32
|
1015 |
+
msgid "No thanks, maybe later"
|
1016 |
+
msgstr ""
|
1017 |
+
|
1018 |
+
#: includes/admin/views/review.php:35
|
1019 |
+
msgid "Ok, you deserve it"
|
1020 |
+
msgstr ""
|
1021 |
+
|
1022 |
+
#: includes/admin/views/review.php:39
|
1023 |
+
msgid "I already did"
|
1024 |
+
msgstr ""
|
1025 |
+
|
1026 |
+
#: includes/admin/views/review.php:43
|
1027 |
+
msgid ""
|
1028 |
+
"Sorry to hear you aren't enjoying building with Business Directory Plugin. "
|
1029 |
+
"We would love a chance to improve. Could you take a minute and let us know "
|
1030 |
+
"what we can do better?"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: includes/class-assets.php:326
|
1034 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:86
|
1035 |
#, fuzzy
|
1036 |
msgid "Never"
|
1037 |
msgstr "niemals"
|
1038 |
|
1039 |
+
#: includes/class-assets.php:327
|
1040 |
#: includes/fields/class-fieldtypes-textarea.php:201
|
1041 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:110
|
1042 |
#: templates/admin/metaboxes-listing-information-plan.tpl.php:117
|
1044 |
msgid "Yes"
|
1045 |
msgstr "Ja"
|
1046 |
|
1047 |
+
#: includes/class-assets.php:337
|
1048 |
#, fuzzy
|
1049 |
msgid ""
|
1050 |
"Preview is only available after you've saved the first draft. This is due to "
|
1062 |
msgid "View Listing"
|
1063 |
msgstr "Eintrag anschauen"
|
1064 |
|
1065 |
+
#: includes/class-cpt-integration.php:22
|
1066 |
+
#: includes/helpers/functions/templates-ui.php:369
|
1067 |
#: templates/main-box.tpl.php:23
|
1068 |
msgid "Search Listings"
|
1069 |
msgstr "Einträge durchsuchen"
|
1143 |
|
1144 |
#: includes/class-meta.php:155
|
1145 |
#: includes/controllers/pages/class-submit-listing.php:32
|
1146 |
+
#: includes/helpers/functions/templates-ui.php:329
|
1147 |
+
#: templates/submit-listing.tpl.php:17
|
1148 |
#, fuzzy
|
1149 |
msgid "Add Listing"
|
1150 |
msgstr "Preispaket hinzufügen"
|
1151 |
|
1152 |
#: includes/class-meta.php:165
|
1153 |
#: includes/controllers/pages/class-all-listings.php:6
|
1154 |
+
#: includes/helpers/functions/templates-ui.php:316
|
1155 |
msgid "View All Listings"
|
1156 |
msgstr "Alle Einträge anschauen"
|
1157 |
|
1163 |
"to %1$sFee Plans%2$s to add or edit your fee plan(s)."
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: includes/class-wpbdp.php:360
|
1167 |
#, fuzzy
|
1168 |
msgid "Upgrade to Premium"
|
1169 |
msgstr "Aktualisieren auf %s"
|
1170 |
|
1171 |
+
#: includes/class-wpbdp.php:363
|
1172 |
#, fuzzy
|
1173 |
msgid "Settings"
|
1174 |
msgstr "Einstellungen"
|
1175 |
|
1176 |
+
#: includes/class-wpbdp.php:567
|
1177 |
#, fuzzy
|
1178 |
msgid "Could not find listing ID"
|
1179 |
msgstr "Eine Verbindung zum Lizenzserver konnte nicht hergestellt werden."
|
1180 |
|
1181 |
+
#: includes/class-wpbdp.php:574
|
1182 |
msgid ""
|
1183 |
"Could not verify the image upload request. If problem persists contact site "
|
1184 |
"admin."
|
1185 |
msgstr ""
|
1186 |
|
1187 |
+
#: includes/class-wpbdp.php:581 includes/fields/class-fieldtypes-image.php:322
|
1188 |
#, fuzzy
|
1189 |
msgid "Could not find image ID"
|
1190 |
msgstr "Konnte Lizenz nicht deaktivieren: %s"
|
1191 |
|
1192 |
+
#: includes/class-wpbdp.php:613
|
1193 |
#, fuzzy
|
1194 |
msgid ""
|
1195 |
"The directory features are disabled at this time because a <a>manual "
|
1198 |
"Branchenverzeichnis Hervorhebungen sind aktuell deaktiviert, weil das Modul "
|
1199 |
"manuell aktualisiert werden muss, bevor weiter hervorgehoben werden kann."
|
1200 |
|
1201 |
+
#: includes/class-wpbdp.php:620
|
1202 |
msgid ""
|
1203 |
"The directory is not available at this time. Please try again in a few "
|
1204 |
"minutes or contact the administrator if the problem persists."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
+
#: includes/compatibility/class-navxt-integration.php:208
|
1208 |
+
#: includes/widgets/widget-search.php:126
|
1209 |
#: templates/admin/payments-index.tpl.php:13
|
1210 |
#: templates/deprecated/search.tpl.php:8 templates/search-form.tpl.php:27
|
1211 |
#: templates/search.tpl.php:5
|
1368 |
msgid "This is just a preview. The listing has not been published yet."
|
1369 |
msgstr "Dies ist nur eine Vorschau. Der Eintrag wurde bisher nicht publiziert."
|
1370 |
|
1371 |
+
#: includes/controllers/pages/class-submit-listing.php:550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1372 |
#, fuzzy
|
1373 |
msgid "Listing Images"
|
1374 |
msgstr "Eintrag Bilder"
|
1375 |
|
1376 |
+
#: includes/controllers/pages/class-submit-listing.php:618
|
1377 |
msgid "Account Creation"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
+
#: includes/controllers/pages/class-submit-listing.php:817
|
1381 |
#, fuzzy
|
1382 |
msgid "Go to \"Fee Plans\""
|
1383 |
msgstr "zu \"Formularfelder verwalten\""
|
1384 |
|
1385 |
+
#: includes/controllers/pages/class-submit-listing.php:873
|
1386 |
#, fuzzy
|
1387 |
msgid "Please choose a fee plan."
|
1388 |
msgstr "Bitte wähle eine Preisoption für die Kategorie \"%s\""
|
1389 |
|
1390 |
+
#: includes/controllers/pages/class-submit-listing.php:1058
|
1391 |
msgid "Please check the form for errors, correct them and submit again."
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: includes/controllers/pages/class-submit-listing.php:1221
|
1395 |
msgid "Create a user account on this site"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: includes/controllers/pages/class-submit-listing.php:1228
|
1399 |
#, fuzzy
|
1400 |
msgid "Username"
|
1401 |
msgstr "Benutzer"
|
1402 |
|
1403 |
+
#: includes/controllers/pages/class-submit-listing.php:1250
|
1404 |
#, fuzzy
|
1405 |
msgid "Clear Form"
|
1406 |
msgstr "Zurücksetzen"
|
1706 |
msgstr ""
|
1707 |
"%s ist falsch formatiert. Bitte geben Sie Ihre E-mailadresse richtig ein."
|
1708 |
|
|
|
|
|
|
|
|
|
1709 |
#: includes/gateways/class-gateway-authorize-net.php:358
|
1710 |
msgid ""
|
1711 |
"An error occurred while trying to cancel your subscription. Please try again "
|
1718 |
"%s. You can try again later or cancel subscription from gateway dashboard."
|
1719 |
msgstr ""
|
1720 |
|
1721 |
+
#: includes/helpers/class-authenticated-listing-view.php:14
|
1722 |
+
#, fuzzy
|
1723 |
+
msgid "Select"
|
1724 |
+
msgstr "Liste auswählen"
|
1725 |
+
|
1726 |
+
#: includes/helpers/class-authenticated-listing-view.php:17
|
1727 |
+
#, fuzzy
|
1728 |
+
msgid "Selected"
|
1729 |
+
msgstr "Liste auswählen"
|
1730 |
+
|
1731 |
+
#: includes/helpers/functions/general.php:565
|
1732 |
+
#: templates/admin/fees-index.tpl.php:67
|
1733 |
+
msgid "Free"
|
1734 |
+
msgstr "Kostenlos"
|
1735 |
+
|
1736 |
+
#: includes/helpers/functions/listings.php:80
|
1737 |
+
#, fuzzy
|
1738 |
+
msgid "Untitled Listing"
|
1739 |
+
msgstr "Eintrag bearbeiten"
|
1740 |
+
|
1741 |
+
#: includes/helpers/functions/templates-ui.php:323
|
1742 |
+
#, fuzzy
|
1743 |
+
msgid "Manage Listings"
|
1744 |
+
msgstr "Bezahlte Einträge verwalten"
|
1745 |
+
|
1746 |
#. translators: %1%s: opening <a> tag, %2$s: closing </a> tag
|
1747 |
#: includes/licensing.php:143
|
1748 |
msgid ""
|
1866 |
msgid "Please enter a license key."
|
1867 |
msgstr "Bitte eine gültige E-mailadresse eingeben."
|
1868 |
|
1869 |
+
#. translators: %s: User name, %2$d: number of entries
|
1870 |
+
#: includes/models/class-reviews.php:129
|
1871 |
+
msgid "Congratulations %1$s! You have collected %2$d listings."
|
1872 |
+
msgstr ""
|
1873 |
|
1874 |
#: includes/payment.php:34
|
1875 |
msgid "We couldn't find a payment associated with the given subscription."
|
1892 |
msgid "Print Receipt"
|
1893 |
msgstr ""
|
1894 |
|
1895 |
+
#: includes/payment.php:180
|
1896 |
#, fuzzy
|
1897 |
msgid "Pending Abandonment"
|
1898 |
msgstr "Ausstehende Zahlungen"
|
1899 |
|
1900 |
+
#: includes/payment.php:187
|
1901 |
#, fuzzy
|
1902 |
msgid "Abandoned"
|
1903 |
msgstr "Abgebrochen"
|
1904 |
|
1905 |
+
#: includes/themes.php:952
|
|
|
|
|
|
|
|
|
|
|
1906 |
#, fuzzy
|
1907 |
msgid "ZIP file is not a valid Business Directory theme file."
|
1908 |
msgstr "Bitte eine gültige E-mailadresse eingeben."
|
1909 |
|
1910 |
+
#: includes/utils.php:470
|
1911 |
#, fuzzy
|
1912 |
msgid "File size (%1$s) exceeds maximum file size of %2$s"
|
1913 |
msgstr "Dateigröße (%s) hat das Maximum von %s erreicht"
|
1914 |
|
1915 |
+
#: includes/utils.php:479
|
1916 |
#, fuzzy
|
1917 |
msgid "File size (%1$s) is smaller than the minimum file size of %2$s"
|
1918 |
msgstr "Dateigröße (%s) hat das Maximum von %s erreicht"
|
1919 |
|
1920 |
+
#: includes/utils.php:537
|
1921 |
#, fuzzy
|
1922 |
msgid "Image width (%1$s px) is smaller than the minimum width of %2$s px."
|
1923 |
msgstr ""
|
1924 |
"Die Bildbreite (%s Pixel) ist größer als die maximal zulässige Breite von %s "
|
1925 |
"Pixel."
|
1926 |
|
1927 |
+
#: includes/utils.php:545
|
1928 |
#, fuzzy
|
1929 |
msgid "Image height (%1$s px) is smaller than the minimum height of %2$s px."
|
1930 |
msgstr ""
|
1931 |
"Die Bildhöhe (%s px) ist größer als die maximal zulässige Höhe von %s px."
|
1932 |
|
1933 |
+
#: includes/utils.php:553
|
1934 |
#, fuzzy
|
1935 |
msgid "Image width (%1$s px) is greater than maximum width of %2$s px."
|
1936 |
msgstr ""
|
1937 |
"Die Bildbreite (%s Pixel) ist größer als die maximal zulässige Breite von %s "
|
1938 |
"Pixel."
|
1939 |
|
1940 |
+
#: includes/utils.php:561
|
1941 |
#, fuzzy
|
1942 |
msgid "Image height (%1$s px) is greater than maximum height of %2$s px."
|
1943 |
msgstr ""
|
2138 |
msgid "Download Debug Information"
|
2139 |
msgstr "Fehlerprotokoll herunterladen"
|
2140 |
|
2141 |
+
#: templates/admin/fees-add-fee.tpl.php:4 templates/admin/fees-form.tpl.php:245
|
2142 |
#, fuzzy
|
2143 |
msgid "Add Listing Fee"
|
2144 |
msgstr "Preispaket hinzufügen"
|
2191 |
msgid "Should the listing auto-renew at the end of the listing term?"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
+
#: templates/admin/fees-form.tpl.php:109
|
2195 |
+
msgid "Make listings on this plan featured (sticky)?"
|
2196 |
+
msgstr ""
|
|
|
2197 |
|
2198 |
+
#: templates/admin/fees-form.tpl.php:121
|
2199 |
#, fuzzy
|
2200 |
msgid ""
|
2201 |
"This floats the listing to the top of search results and browsing the "
|
2204 |
"Dies Platziert den Eintrag an die Spitze der Suchergebnisse und durchsucht "
|
2205 |
"das Verzeichnis, wenn der Benutzer dieses Angebot kauft."
|
2206 |
|
2207 |
+
#: templates/admin/fees-form.tpl.php:127
|
2208 |
msgid "Listing background color:"
|
2209 |
msgstr ""
|
2210 |
|
2211 |
+
#: templates/admin/fees-form.tpl.php:133
|
2212 |
msgid "Used to differentiate listings inside this plan from others."
|
2213 |
msgstr ""
|
2214 |
|
2215 |
+
#: templates/admin/fees-form.tpl.php:245
|
2216 |
#: templates/admin/settings-email.tpl.php:104
|
2217 |
#: templates/submit-listing-section.tpl.php:30
|
2218 |
#, fuzzy
|
2334 |
msgstr "Bezahlte Einträge verwalten"
|
2335 |
|
2336 |
#: templates/admin/metaboxes-listing-information-other.tpl.php:3
|
2337 |
+
#: templates/email-access-keys.tpl.php:5 templates/login.tpl.php:69
|
2338 |
#: templates/login.tpl.php:71
|
2339 |
#, fuzzy
|
2340 |
msgid "Access Key"
|
2585 |
msgid "Your existing listings will NOT be deleted doing this."
|
2586 |
msgstr ""
|
2587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2588 |
#: templates/admin/sidebar.tpl.php:7
|
2589 |
+
msgid "Need help?"
|
2590 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2591 |
|
2592 |
#: templates/admin/sidebar.tpl.php:13
|
2593 |
+
msgid "Let us know!"
|
2594 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
2595 |
|
2596 |
#: templates/admin/sidebar.tpl.php:18
|
2597 |
#, fuzzy
|
2598 |
+
msgid "Plugin documentation"
|
2599 |
+
msgstr "Vollständige Moduldokumentation"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2600 |
|
2601 |
+
#: templates/admin/sidebar.tpl.php:23
|
2602 |
#, fuzzy
|
2603 |
+
msgid "Quick Start Guide"
|
2604 |
+
msgstr "Schnellstart Anleitung"
|
2605 |
|
2606 |
+
#: templates/admin/sidebar.tpl.php:28
|
2607 |
#, fuzzy
|
2608 |
+
msgid "Video Tutorials"
|
2609 |
+
msgstr "Video Anleitungen"
|
|
|
|
|
|
|
|
|
2610 |
|
2611 |
#: templates/admin/themes-delete-confirm.tpl.php:1
|
2612 |
#: templates/admin/themes-delete-confirm.tpl.php:13
|
3157 |
msgid "Find A Listing"
|
3158 |
msgstr "Eintrag finden"
|
3159 |
|
3160 |
+
#: includes/admin/class-admin.php:190
|
3161 |
+
msgctxt "drip pointer"
|
3162 |
+
msgid "Email Address:"
|
3163 |
+
msgstr "E-Mail Adresse:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3164 |
|
3165 |
+
#: includes/admin/class-admin.php:222
|
3166 |
+
msgctxt "admin"
|
3167 |
+
msgid "Business Directory"
|
3168 |
+
msgstr "Branchenverzeichnis"
|
3169 |
|
3170 |
+
#: includes/admin/class-admin.php:237
|
3171 |
+
msgctxt "admin"
|
3172 |
+
msgid "You're all set. Visit your new <a>Business Directory</a> page."
|
3173 |
msgstr ""
|
3174 |
+
"Sie haben alles konfiguriert. Besuchen sie Ihr neues <a>Branchenverzeichnis</"
|
3175 |
+
"a>."
|
3176 |
|
3177 |
+
#: includes/admin/class-admin.php:412
|
3178 |
+
msgctxt "admin"
|
3179 |
+
msgid "Untitled Menu"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3180 |
msgstr ""
|
3181 |
|
3182 |
+
#: includes/admin/class-admin.php:720
|
3183 |
+
msgctxt "admin"
|
3184 |
+
msgid "Dismiss this notice."
|
3185 |
+
msgstr "Diese Nachricht ignorieren."
|
3186 |
|
3187 |
+
#: includes/admin/class-admin.php:784 includes/admin/class-admin.php:794
|
3188 |
+
#, fuzzy
|
3189 |
+
msgctxt "admin"
|
3190 |
+
msgid "The listing has been updated."
|
3191 |
+
msgid_plural "The listings have been updated."
|
3192 |
+
msgstr[0] "Der Eintrag wurde aktualisiert"
|
3193 |
+
msgstr[1] "Die Einträge wurden aktualisiert."
|
3194 |
+
|
3195 |
+
#: includes/admin/class-admin.php:820
|
3196 |
+
msgctxt "admin"
|
3197 |
+
msgid "The fee was successfully assigned."
|
3198 |
+
msgstr "Der Preis wurde erfolgreich zugewiesen."
|
3199 |
+
|
3200 |
+
#: includes/admin/class-admin.php:830
|
3201 |
+
msgctxt "admin"
|
3202 |
+
msgid "Listing was renewed."
|
3203 |
+
msgid_plural "Listings were renewed."
|
3204 |
+
msgstr[0] "Eintrag wurde aktualisiert."
|
3205 |
+
msgstr[1] "Einträge wurden aktualisiert."
|
3206 |
+
|
3207 |
+
#: includes/admin/class-admin.php:842
|
3208 |
+
msgctxt "admin"
|
3209 |
+
msgid "Renewal email sent."
|
3210 |
+
msgstr "E-mail erneut senden."
|
3211 |
+
|
3212 |
+
#: includes/admin/class-admin.php:855
|
3213 |
+
#, fuzzy
|
3214 |
+
msgctxt "admin"
|
3215 |
+
msgid "Listing report deleted."
|
3216 |
+
msgid_plural "Listing reports deleted."
|
3217 |
+
msgstr[0] "Eintrag Enddatum"
|
3218 |
+
msgstr[1] "Eintrag Enddatum"
|
3219 |
+
|
3220 |
+
#: includes/admin/class-admin.php:904
|
3221 |
+
#, fuzzy
|
3222 |
+
msgctxt "admin"
|
3223 |
+
msgid "Access keys sent."
|
3224 |
+
msgstr "Eintrag Felder / Bilder"
|
3225 |
+
|
3226 |
+
#: includes/admin/class-admin.php:906
|
3227 |
+
msgctxt "admin"
|
3228 |
+
msgid "The access keys couldn't be sent."
|
3229 |
+
msgstr ""
|
3230 |
+
|
3231 |
+
#: includes/admin/class-admin.php:1063
|
3232 |
+
msgctxt "admin"
|
3233 |
+
msgid ""
|
3234 |
+
"<b>Business Directory Plugin</b> requires a page with the "
|
3235 |
+
"<tt>[businessdirectory]</tt> shortcode to function properly."
|
3236 |
+
msgstr ""
|
3237 |
+
"<b>Branchenverzeichnis Erweiterung</b> benötigt eine Seite mit dem "
|
3238 |
+
"<tt>[businessdirectory]</tt> shortcode um zu funktionieren."
|
3239 |
+
|
3240 |
+
#: includes/admin/class-admin.php:1065
|
3241 |
+
msgctxt "admin"
|
3242 |
+
msgid ""
|
3243 |
+
"You can create this page by yourself or let Business Directory do this for "
|
3244 |
+
"you automatically."
|
3245 |
+
msgstr ""
|
3246 |
+
"Du kannst diese Seite selbst erstellen oder vom Branchenverzeichnis "
|
3247 |
+
"automatisch erstellen lassen."
|
3248 |
+
|
3249 |
+
#: includes/admin/class-admin.php:1070
|
3250 |
+
msgctxt "admin"
|
3251 |
+
msgid "Create required pages for me"
|
3252 |
+
msgstr "Erstelle benötigte Seiten für mich"
|
3253 |
+
|
3254 |
+
#: includes/admin/class-admin.php:1123
|
3255 |
+
msgctxt "admin"
|
3256 |
+
msgid ""
|
3257 |
+
"<strong>Business Directory Plugin</strong> requires <strong>PHP 5.6</strong> "
|
3258 |
+
"or later, but your server is running version <strong>%s</strong>. Please ask "
|
3259 |
+
"your provider to upgrade in order to prevent any issues with the plugin."
|
3260 |
+
msgstr ""
|
3261 |
+
|
3262 |
+
#: includes/admin/class-admin.php:1147
|
3263 |
+
#, fuzzy
|
3264 |
+
msgctxt "admin"
|
3265 |
+
msgid ""
|
3266 |
+
"We noticed you want your Business Directory users to register before posting "
|
3267 |
+
"listings, but Registration for your site is currently disabled. Go [here] "
|
3268 |
+
"and check \"Anyone can register\"."
|
3269 |
+
msgstr ""
|
3270 |
+
"Wir haben festgestellt du möchtest, dass deine Branchenverzeichnisbenutzer "
|
3271 |
+
"sich registrieren sollen bevor sie sich eintragen, die Registrierung für "
|
3272 |
+
"deine Seite ist momentan ausgeschaltet. Klicke [hier] und prüfe \"Jeder kann "
|
3273 |
+
"sich registrieren\", um sicher zu sein, dass das Branchenverzeichnis korrekt "
|
3274 |
+
"funktioniert."
|
3275 |
+
|
3276 |
+
#: includes/admin/class-listing-fields-metabox.php:24
|
3277 |
+
#, fuzzy
|
3278 |
+
msgctxt "admin"
|
3279 |
+
msgid "Fields"
|
3280 |
+
msgstr "Feld"
|
3281 |
+
|
3282 |
+
#: includes/admin/class-listing-fields-metabox.php:26
|
3283 |
+
#, fuzzy
|
3284 |
+
msgctxt "admin"
|
3285 |
+
msgid "Images (%s)"
|
3286 |
+
msgstr "Bilder"
|
3287 |
+
|
3288 |
+
#: includes/admin/class-listing-fields-metabox.php:27
|
3289 |
+
#, fuzzy
|
3290 |
+
msgctxt "admin"
|
3291 |
+
msgid "Images"
|
3292 |
+
msgstr "Bilder"
|
3293 |
+
|
3294 |
+
#: includes/admin/controllers/class-admin-listings.php:201
|
3295 |
+
#, fuzzy
|
3296 |
+
msgctxt "admin"
|
3297 |
+
msgid "Directory Listing Fields / Images"
|
3298 |
+
msgstr "Eintrag Felder / Bilder"
|
3299 |
+
|
3300 |
+
#: includes/admin/controllers/class-admin-listings.php:265
|
3301 |
+
msgctxt "admin"
|
3302 |
+
msgid "Categories"
|
3303 |
+
msgstr "Kategorien"
|
3304 |
+
|
3305 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:211
|
3306 |
+
msgctxt "admin"
|
3307 |
+
msgid ""
|
3308 |
+
"<b>Business Directory Plugin</b> requires fields with the following "
|
3309 |
+
"associations in order to work correctly: <b>%s</b>."
|
3310 |
+
msgstr ""
|
3311 |
+
"<b>Branchenverzeichnis Erweiterung</b> benötigt Felder mit den folgenden "
|
3312 |
+
"Verbindungen um korrekt zu funktionieren: <b>%s</b>."
|
3313 |
+
|
3314 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:213
|
3315 |
+
msgctxt "admin"
|
3316 |
+
msgid ""
|
3317 |
+
"<b>Business Directory Plugin</b> requires a field with a <b>%s</b> "
|
3318 |
+
"association in order to work correctly."
|
3319 |
+
msgstr ""
|
3320 |
+
"<b>Branchenverzeichnis Erweiterung</b> benötigt ein Feld mit der Verbindung "
|
3321 |
+
"<b>%s</b>, um korrekt zu funktionieren."
|
3322 |
+
|
3323 |
+
#: includes/admin/helpers/tables/class-form-fields-table.php:227
|
3324 |
+
msgctxt "admin"
|
3325 |
+
msgid "Create these required fields for me"
|
3326 |
+
msgstr "Erstelle diese benötigten Felder für mich"
|
3327 |
+
|
3328 |
+
#: includes/admin/class-admin.php:316
|
3329 |
+
#, fuzzy
|
3330 |
+
msgctxt "admin menu"
|
3331 |
+
msgid "Payment History"
|
3332 |
+
msgstr "Bezahlhistorie"
|
3333 |
+
|
3334 |
+
#: includes/admin/class-admin.php:319
|
3335 |
+
#, fuzzy
|
3336 |
+
msgctxt "admin menu"
|
3337 |
+
msgid "Import & Export"
|
3338 |
+
msgstr "CSV Import"
|
3339 |
+
|
3340 |
+
#: includes/admin/class-admin.php:322
|
3341 |
+
msgctxt "admin menu"
|
3342 |
+
msgid "Debug"
|
3343 |
+
msgstr "Fehlerkorrektur"
|
3344 |
+
|
3345 |
+
#: includes/admin/controllers/class-settings-admin.php:45
|
3346 |
+
#, fuzzy
|
3347 |
+
msgctxt "admin menu"
|
3348 |
+
msgid "Settings"
|
3349 |
+
msgstr "Einstellungen"
|
3350 |
+
|
3351 |
+
#: includes/admin/class-listings-with-no-fee-plan-view.php:58
|
3352 |
+
msgctxt "listings view"
|
3353 |
+
msgid "No Fee Plan"
|
3354 |
+
msgstr ""
|
3355 |
+
|
3356 |
+
#: includes/admin/controllers/class-admin-controller.php:84
|
3357 |
+
msgctxt "admin confirm"
|
3358 |
+
msgid "No, go back"
|
3359 |
+
msgstr ""
|
3360 |
+
|
3361 |
+
#: includes/admin/controllers/class-admin-controller.php:85
|
3362 |
+
msgctxt "admin confirm"
|
3363 |
+
msgid "Yes, I'm sure"
|
3364 |
+
msgstr ""
|
3365 |
+
|
3366 |
+
#: includes/admin/controllers/class-admin-csv.php:40
|
3367 |
+
msgctxt "admin csv-import"
|
3368 |
+
msgid "See an example CSV import file"
|
3369 |
+
msgstr "Beispiel CSV Import Datei anschauen"
|
3370 |
+
|
3371 |
+
#: includes/admin/csv-import.php:177
|
3372 |
+
msgctxt "admin csv-import"
|
3373 |
+
msgid "Whatever"
|
3374 |
+
msgstr "BeispielText"
|
3375 |
+
|
3376 |
+
#: includes/admin/csv-import.php:182
|
3377 |
msgctxt "admin csv-import"
|
3378 |
msgid "Example CSV Import File"
|
3379 |
msgstr "Beispiel CSV Import Datei"
|
3404 |
"Der Import ist im <b>Testmodus</b>. es wird nichts in die Datenbank "
|
3405 |
"geschrieben."
|
3406 |
|
3407 |
+
#: includes/admin/helpers/csv/class-csv-import.php:533
|
3408 |
+
msgctxt "admin csv-import"
|
3409 |
+
msgid ""
|
3410 |
+
"Could not create listing category \"<category-name>\". The operation failed "
|
3411 |
+
"with the following error: <error-message>."
|
3412 |
+
msgstr ""
|
3413 |
+
"Die Kategorieauflistung \"<category-name>\" konnte nicht erstellt werden. "
|
3414 |
+
"Der Vorgang ist mit dem folgenden Fehler fehlgeschlagen: <error-message>."
|
3415 |
+
|
3416 |
+
#: includes/admin/helpers/csv/class-csv-import.php:539
|
3417 |
+
msgctxt "admin csv-import"
|
3418 |
+
msgid "Could not create listing category \"%s\""
|
3419 |
+
msgstr "Konnte Eintragskategorie nicht erstellen \"%s\""
|
3420 |
+
|
3421 |
+
#: includes/admin/helpers/csv/class-csv-import.php:730
|
3422 |
+
msgctxt "admin csv-import"
|
3423 |
+
msgid "Username \"%s\" does not exist"
|
3424 |
+
msgstr "Benutzername \"%s\" existiert nicht"
|
3425 |
+
|
3426 |
+
#: includes/admin/helpers/csv/class-csv-import.php:757
|
3427 |
+
msgctxt "admin csv-import"
|
3428 |
+
msgid "There is no Fee Plan with ID = <fee-id>"
|
3429 |
+
msgstr ""
|
3430 |
+
|
3431 |
+
#: includes/admin/helpers/csv/class-csv-import.php:788
|
3432 |
+
msgctxt "admin csv-import"
|
3433 |
+
msgid "Missing required field: %s"
|
3434 |
+
msgstr "Benötigtes nicht vorhandenes Feld: %s"
|
3435 |
+
|
3436 |
+
#: includes/admin/helpers/csv/class-csv-import.php:833
|
3437 |
+
msgctxt "admin csv-import"
|
3438 |
+
msgid "Listing category \"%s\" does not exist"
|
3439 |
+
msgstr "Eintragskategorie \"%s\" existiert nicht"
|
3440 |
+
|
3441 |
+
#: includes/admin/helpers/csv/class-csv-import.php:904
|
3442 |
+
msgctxt "admin csv-import"
|
3443 |
+
msgid "The string <string> couldn't be converted into a valid date."
|
3444 |
+
msgstr ""
|
3445 |
+
|
3446 |
#: templates/admin/csv-import-progress.tpl.php:5
|
3447 |
msgctxt "admin csv-import"
|
3448 |
msgid "A fatal error occurred during the import. The reason given was: \"%s\"."
|
3674 |
"Tag des Eintragende formatiert als YYYY-MM-DD. Benutze diese Spalte, wenn "
|
3675 |
"Einträge aus externen Quellen hinzugefügt oder aktualisiert werden."
|
3676 |
|
3677 |
+
#: includes/admin/controllers/class-admin-csv.php:47
|
3678 |
#, fuzzy
|
3679 |
msgctxt "admin csv"
|
3680 |
msgid "Import"
|
3681 |
msgstr "CSV Import"
|
3682 |
|
3683 |
+
#: includes/admin/controllers/class-admin-csv.php:48
|
3684 |
#, fuzzy
|
3685 |
msgctxt "admin csv"
|
3686 |
msgid "Export"
|
3687 |
msgstr "CVS Export"
|
3688 |
|
3689 |
+
#: includes/admin/controllers/class-admin-fees.php:46
|
3690 |
+
msgctxt "fees order"
|
3691 |
+
msgid "Label"
|
3692 |
+
msgstr "Bezeichnung"
|
3693 |
|
3694 |
+
#: includes/admin/controllers/class-admin-fees.php:48
|
3695 |
+
msgctxt "fees order"
|
3696 |
+
msgid "Duration"
|
3697 |
+
msgstr "Zeitraum"
|
3698 |
|
3699 |
+
#: includes/admin/controllers/class-admin-fees.php:50
|
3700 |
+
msgctxt "fees order"
|
3701 |
+
msgid "Custom Order"
|
3702 |
+
msgstr "Benutzerdefinierte Reihenfolge"
|
|
|
|
|
3703 |
|
3704 |
+
#: includes/admin/controllers/class-admin-fees.php:110
|
3705 |
+
#, fuzzy
|
3706 |
+
msgctxt "fees admin"
|
3707 |
+
msgid "Fee plan added."
|
3708 |
+
msgstr "Preis aktualisiert."
|
3709 |
|
3710 |
+
#: includes/admin/controllers/class-admin-fees.php:112
|
3711 |
+
#, fuzzy
|
3712 |
+
msgctxt "fees admin"
|
3713 |
+
msgid "Fee plan updated."
|
3714 |
+
msgstr "Preis aktualisiert."
|
3715 |
|
3716 |
+
#: includes/admin/controllers/class-admin-fees.php:171
|
3717 |
#, fuzzy
|
3718 |
+
msgctxt "fees admin"
|
3719 |
+
msgid "Fee \"%s\" deleted."
|
3720 |
+
msgstr "Preis gelöscht."
|
|
|
|
|
3721 |
|
3722 |
+
#: includes/admin/controllers/class-admin-fees.php:183
|
3723 |
+
msgctxt "fees admin"
|
3724 |
+
msgid "Fee disabled."
|
3725 |
+
msgstr "Preis gelöscht."
|
3726 |
|
3727 |
+
#: includes/admin/helpers/tables/class-fees-table.php:20
|
3728 |
+
msgctxt "fees admin"
|
3729 |
+
msgid "fee"
|
3730 |
+
msgstr "Preis"
|
|
|
|
|
3731 |
|
3732 |
+
#: includes/admin/helpers/tables/class-fees-table.php:21
|
3733 |
+
msgctxt "fees admin"
|
3734 |
+
msgid "fees"
|
3735 |
+
msgstr "Preise"
|
3736 |
|
3737 |
+
#: includes/admin/helpers/tables/class-fees-table.php:61
|
3738 |
+
msgctxt "fees admin"
|
3739 |
+
msgid "Label"
|
3740 |
+
msgstr "Bezeichnung"
|
|
|
|
|
|
|
3741 |
|
3742 |
+
#: includes/admin/helpers/tables/class-fees-table.php:63
|
3743 |
+
msgctxt "fees admin"
|
3744 |
+
msgid "Duration"
|
3745 |
+
msgstr "Zeitraum"
|
3746 |
+
|
3747 |
+
#: includes/admin/helpers/tables/class-fees-table.php:65
|
3748 |
#, fuzzy
|
3749 |
+
msgctxt "fees admin"
|
3750 |
+
msgid "Attributes"
|
3751 |
+
msgstr "Feld Attribute"
|
3752 |
|
3753 |
+
#: includes/admin/helpers/tables/class-fees-table.php:138
|
3754 |
+
msgctxt "fees admin"
|
3755 |
+
msgid "Edit"
|
3756 |
+
msgstr "Bearbeiten"
|
3757 |
|
3758 |
+
#: includes/admin/helpers/tables/class-fees-table.php:185
|
3759 |
+
msgctxt "fees admin"
|
3760 |
+
msgid "<strong>Fee ID:</strong> <fee-id>"
|
|
|
|
|
3761 |
msgstr ""
|
|
|
|
|
3762 |
|
3763 |
+
#: includes/admin/helpers/tables/class-fees-table.php:209
|
3764 |
+
#, fuzzy
|
3765 |
+
msgctxt "fees admin"
|
3766 |
+
msgid "Variable"
|
3767 |
+
msgstr "Deaktivieren"
|
|
|
|
|
|
|
3768 |
|
3769 |
+
#: includes/admin/helpers/tables/class-fees-table.php:214
|
3770 |
+
#, fuzzy
|
3771 |
+
msgctxt "fees admin"
|
3772 |
+
msgid "%1$s + %2$s per category"
|
3773 |
+
msgstr "Preis \"%s\" für Kategorie \"%s\""
|
3774 |
|
3775 |
+
#: includes/admin/helpers/tables/class-fees-table.php:222
|
3776 |
+
msgctxt "fees admin"
|
3777 |
+
msgid "Forever"
|
3778 |
+
msgstr "Für immer"
|
|
|
|
|
|
|
3779 |
|
3780 |
+
#: includes/admin/helpers/tables/class-fees-table.php:224
|
3781 |
+
msgctxt "fees admin"
|
3782 |
+
msgid "%d day"
|
3783 |
+
msgid_plural "%d days"
|
3784 |
+
msgstr[0] "%d Tag"
|
3785 |
+
msgstr[1] "%d Tage"
|
3786 |
+
|
3787 |
+
#: includes/admin/helpers/tables/class-fees-table.php:228
|
3788 |
+
msgctxt "fees admin"
|
3789 |
+
msgid "%d image"
|
3790 |
+
msgid_plural "%d images"
|
3791 |
+
msgstr[0] "%d Bild"
|
3792 |
+
msgstr[1] "%d Bilder"
|
3793 |
+
|
3794 |
+
#: includes/admin/helpers/tables/class-fees-table.php:233
|
3795 |
+
msgctxt "fees admin"
|
3796 |
+
msgid "All categories"
|
3797 |
+
msgstr "Alle Kategorien"
|
3798 |
+
|
3799 |
+
#: includes/admin/helpers/tables/class-fees-table.php:268
|
3800 |
+
msgctxt "fees admin"
|
3801 |
+
msgid "Sticky"
|
3802 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
3803 |
|
3804 |
+
#: includes/admin/helpers/tables/class-fees-table.php:272
|
3805 |
#, fuzzy
|
3806 |
+
msgctxt "fees admin"
|
3807 |
+
msgid "Recurring"
|
3808 |
+
msgstr "(wiederkehrend)"
|
3809 |
|
3810 |
+
#: includes/admin/helpers/tables/class-fees-table.php:276
|
3811 |
#, fuzzy
|
3812 |
+
msgctxt "fees admin"
|
3813 |
+
msgid "Private"
|
3814 |
+
msgstr "Aktiviere Lizenz"
|
3815 |
|
3816 |
+
#: includes/admin/helpers/tables/class-payments-table.php:55
|
3817 |
#, fuzzy
|
3818 |
+
msgctxt "fees admin"
|
3819 |
+
msgid "Date"
|
3820 |
+
msgstr "Datum"
|
3821 |
|
3822 |
+
#: includes/admin/helpers/tables/class-payments-table.php:56
|
3823 |
#, fuzzy
|
3824 |
+
msgctxt "fees admin"
|
3825 |
+
msgid "Payment History"
|
3826 |
+
msgstr "Bezahlhistorie"
|
|
|
|
|
|
|
|
|
|
|
3827 |
|
3828 |
+
#: includes/admin/helpers/tables/class-payments-table.php:58
|
3829 |
+
msgctxt "fees admin"
|
3830 |
+
msgid "Status"
|
3831 |
+
msgstr "Status"
|
|
|
|
|
|
|
|
|
3832 |
|
3833 |
+
#: templates/admin/fees-form.tpl.php:138
|
3834 |
+
msgctxt "fees admin"
|
3835 |
+
msgid "Plan Category Policy:"
|
|
|
|
|
3836 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3837 |
|
3838 |
+
#: templates/admin/fees-form.tpl.php:143
|
3839 |
#, fuzzy
|
3840 |
+
msgctxt "fees admin"
|
3841 |
+
msgid "Plan applies to all categories"
|
3842 |
+
msgstr "Erneuere alle Einträge in abgelaufenen Kategorien"
|
3843 |
|
3844 |
+
#: templates/admin/fees-form.tpl.php:144
|
3845 |
+
msgctxt "fees admin"
|
3846 |
+
msgid "Plan applies to only certain categories"
|
3847 |
+
msgstr ""
|
3848 |
+
|
3849 |
+
#: templates/admin/fees-form.tpl.php:148
|
3850 |
#, fuzzy
|
3851 |
+
msgctxt "fees admin"
|
3852 |
+
msgid "Limit plan to the following categories:"
|
3853 |
+
msgstr "Du kannst folgende Platzhalter verwenden:"
|
3854 |
|
3855 |
+
#: templates/admin/fees-form.tpl.php:172
|
3856 |
+
msgctxt "fees admin"
|
3857 |
+
msgid "Click to add categories to the selection."
|
3858 |
+
msgstr ""
|
3859 |
|
3860 |
+
#: templates/admin/fees-form.tpl.php:186
|
3861 |
#, fuzzy
|
3862 |
+
msgctxt "fees admin"
|
3863 |
+
msgid "Pricing"
|
3864 |
+
msgstr "Preis"
|
3865 |
|
3866 |
+
#: templates/admin/fees-form.tpl.php:194
|
3867 |
+
msgctxt "fees admin"
|
3868 |
+
msgid "Pricing model"
|
3869 |
msgstr ""
|
|
|
|
|
3870 |
|
3871 |
+
#: templates/admin/fees-form.tpl.php:198
|
3872 |
+
msgctxt "fees admin"
|
3873 |
+
msgid "Flat price"
|
3874 |
msgstr ""
|
|
|
|
|
3875 |
|
3876 |
+
#: templates/admin/fees-form.tpl.php:199
|
3877 |
+
#, fuzzy
|
3878 |
+
msgctxt "fees admin"
|
3879 |
+
msgid "Different price for different categories"
|
3880 |
+
msgstr "Sortierung für Kategorien"
|
3881 |
|
3882 |
+
#: templates/admin/fees-form.tpl.php:200
|
3883 |
+
msgctxt "fees admin"
|
3884 |
+
msgid "Base price plus an extra amount per category"
|
|
|
|
|
|
|
|
|
3885 |
msgstr ""
|
|
|
|
|
|
|
|
|
3886 |
|
3887 |
+
#: templates/admin/fees-form.tpl.php:206
|
3888 |
+
#, fuzzy
|
3889 |
+
msgctxt "fees admin"
|
3890 |
+
msgid "Fee Price"
|
3891 |
+
msgstr "Preis"
|
3892 |
|
3893 |
+
#: templates/admin/fees-form.tpl.php:214
|
3894 |
+
#, fuzzy
|
3895 |
+
msgctxt "fees admin"
|
3896 |
+
msgid "Prices per category"
|
3897 |
+
msgstr "Kategorie entfernen"
|
3898 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|