-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fb7523
commit c456391
Showing
636 changed files
with
572,810 additions
and
1,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,84 @@ | ||
# WP SweepBright PRO | ||
|
||
**Note ⚠️** as of version 1.4.0 a license is required in order to use this plugin. | ||
3rd party WordPress plugin for SweepBright. | ||
|
||
The license allows you to make use of our publication scheduling server, which automatically manages SweepBright publications. | ||
## 1. Introduction | ||
|
||
## Requirements | ||
### 1.1. Requirements | ||
|
||
- PHP >= 7.1.0 | ||
- ACF PRO | ||
- WP SweepBright License | ||
- PHP 7.1+ | ||
- [Advanced Custom Fields PRO](https://www.advancedcustomfields.com/pro/) | ||
- Yearly license (€99,00 annually, per website). | ||
|
||
## Documentation | ||
### 1.2. Features | ||
|
||
We're currently working on a detailed README. For more information in the meantime, please contact us at info[at]compagnon.agency. | ||
- Seamless synchronization between properties | ||
- Integration with [Advanced Custom Fields PRO](https://www.advancedcustomfields.com/pro/) for easy data manipulation | ||
- Ability to return JSON | ||
- Built-in contact form synchronization with SweepBright | ||
- Easy multi-language support | ||
|
||
### 1.3. Table of Contents | ||
|
||
1. [Changelog](1.-changelog) | ||
2. [Installation](2.-installation) | ||
3. [Dashboard](3.-dashboard) | ||
4. [Settings](4.-settings) | ||
5. [Publishing in SweepBright](5.-publishing-in-sweepbright) | ||
6. [Retrieving data](6.-retrieving-data) | ||
7. [Helpers](7.-helpers) | ||
8. [Filtering properties](8.-filtering-properties) | ||
9. [Multilanguage](9.-multilanguage) | ||
10. [License](license) | ||
11. [Terms & Conditions](terms-&-conditions) | ||
|
||
## 2. License | ||
|
||
### 2.1. Why do I need a yearly license? | ||
|
||
SweepBright uses a [webhook](https://website.sweepbright.com/docs/#header-1.-publish-a-property-to-the-custom-website) for publishing properties to your website. The webhook on your website should be responsible for retrieving and storing all of the property's information whenever a publication occurs in SweepBright. | ||
|
||
However, if you have a lot of publications scheduled at the same time it could take up a lot of processing resources. | ||
Potentially leading to unpredictable or unreliable behavior. | ||
|
||
We've solved this by creating our own webhook server which acts as a "man in the middle" between SweepBright and your website. | ||
|
||
Whenever a publication is scheduled in SweepBright it will first connect to our dedicated webhook server where it will first schedule your publication. Once scheduled, it will publish the properties back to your website, one at a time. This makes publishing more reliable, so you don't have to stress about the synchronization. | ||
|
||
### 2.2. What's included in my annual license? | ||
|
||
- License for 1 website | ||
- Dedicated webhook server | ||
- Support via e-mail | ||
|
||
### 2.4. What's the price / additional costs? | ||
|
||
> €99,00 annually, per website. | ||
Additional costs may occur depending on your usage of our webhook server. | ||
For regular use or less than 15 publications per day on average, there are no additional costs. | ||
|
||
If you're running a high traffic real estate website, please contact [sales]([email protected]) for our large business & enterprise solutions. | ||
|
||
### 2.5. How to obtain a license? | ||
|
||
In order to retrieve your license, please contact [sales]([email protected]). | ||
|
||
### 2.6. Free trial | ||
|
||
When purchasing a license you have a free trial of two weeks. Within this period you're able to cancel your license at any time without costs. | ||
|
||
## 3. Warranty | ||
|
||
Our product is provided “as is” without warranty of any kind, expressed or implied. We shall not be liable for any damages, including but not limited to, direct, indirect, special, incidental or consequential damages or losses that occur out of the use or inability to use our products. | ||
|
||
## 4. Copyright | ||
|
||
Copyright (C) Compagnon Agency - All Rights Reserved. | ||
|
||
- You may not claim intellectual or exclusive ownership rights to our product | ||
- This product and all of its contents are intellectual property of Compagnon Agency | ||
- Unauthorized copying of this plugin, via any medium is strictly prohibited | ||
- This product may not be redistributed | ||
|
||
[[https://compagnon.agency/wp-content/themes/compagnon/assets/img/sweepbright.png | width=150px | alt=Compagnon SweepBright Certified Partner]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ | |
* @subpackage WP_SweepBright/admin | ||
* @author Falko Joseph <[email protected]> | ||
*/ | ||
class WP_SweepBright_Admin { | ||
class WP_SweepBright_Admin | ||
{ | ||
|
||
/** | ||
* The ID of this plugin. | ||
|
@@ -41,17 +42,18 @@ class WP_SweepBright_Admin { | |
* @param string $plugin_name The name of this plugin. | ||
* @param string $version The version of this plugin. | ||
*/ | ||
public function __construct( $plugin_name, $version ) { | ||
public function __construct($plugin_name, $version) | ||
{ | ||
|
||
$this->plugin_name = $plugin_name; | ||
$this->version = $version; | ||
|
||
} | ||
|
||
/** | ||
* Register the stylesheets for the admin area. | ||
*/ | ||
public function enqueue_styles() { | ||
public function enqueue_styles() | ||
{ | ||
|
||
/** | ||
* This function is provided for demonstration purposes only. | ||
|
@@ -67,15 +69,20 @@ public function enqueue_styles() { | |
|
||
if (get_current_screen()->base === "toplevel_page_wp-sweepbright-properties") { | ||
wp_enqueue_style('font-awesome', 'https://pro.fontawesome.com/releases/v5.15.0/css/all.css'); | ||
wp_enqueue_style( $this->plugin_name, plugins_url('wp-sweepbright') . '/dist/wp-sweepbright-admin.css', array(), $this->version, 'all' ); | ||
wp_enqueue_style($this->plugin_name, plugins_url('wp-sweepbright') . '/dist/wp-sweepbright-admin.css', array(), $this->version, 'all'); | ||
} | ||
|
||
if (get_current_screen()->base === "sweepbright_page_wp-sweepbright-pages") { | ||
wp_enqueue_style('font-awesome', 'https://pro.fontawesome.com/releases/v5.15.0/css/all.css'); | ||
wp_enqueue_style($this->plugin_name, plugins_url('wp-sweepbright') . '/dist/wp-sweepbright-admin.css', array(), $this->version, 'all'); | ||
} | ||
} | ||
|
||
/** | ||
* Register the JavaScript for the admin area. | ||
*/ | ||
public function enqueue_scripts() { | ||
public function enqueue_scripts() | ||
{ | ||
|
||
/** | ||
* This function is provided for demonstration purposes only. | ||
|
@@ -88,62 +95,78 @@ public function enqueue_scripts() { | |
* between the defined hooks and the functions defined in this | ||
* class. | ||
*/ | ||
|
||
wp_enqueue_script( $this->plugin_name, plugins_url('wp-sweepbright') . '/dist/wp-sweepbright-admin.js', array(), $this->version, false ); | ||
|
||
wp_enqueue_script($this->plugin_name, plugins_url('wp-sweepbright') . '/dist/wp-sweepbright-admin.js', array(), $this->version, false); | ||
} | ||
|
||
/** | ||
* Load the data module which creates the custom post type. | ||
*/ | ||
public function load_wp_sweepbright_data() { | ||
require_once plugin_dir_path( __DIR__ ). 'modules/class-wp-sweepbright-data.php'; | ||
public function load_wp_sweepbright_data() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'modules/class-wp-sweepbright-data.php'; | ||
$wp_sweepbright_data = new WP_SweepBright_Data(); | ||
} | ||
|
||
/** | ||
* Load the contact form. | ||
*/ | ||
public function load_wp_sweepbright_contact() { | ||
require_once plugin_dir_path( __DIR__ ). 'admin/pages/class-wp-sweepbright-contact.php'; | ||
public function load_wp_sweepbright_contact() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'admin/pages/class-wp-sweepbright-contact.php'; | ||
$wp_sweepbright_contact = new WP_SweepBright_Contact(); | ||
} | ||
|
||
/** | ||
* Load the geo location library. | ||
*/ | ||
public function load_wp_sweepbright_geo() { | ||
require_once plugin_dir_path( __DIR__ ). 'modules/class-wp-sweepbright-geo.php'; | ||
public function load_wp_sweepbright_geo() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'modules/class-wp-sweepbright-geo.php'; | ||
} | ||
|
||
/** | ||
* Load the general SweepBright class containing global helpers. | ||
*/ | ||
public function load_wp_sweepbright_helpers() { | ||
require_once plugin_dir_path( __DIR__ ). 'modules/class-wp-sweepbright-helpers.php'; | ||
public function load_wp_sweepbright_helpers() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'modules/class-wp-sweepbright-helpers.php'; | ||
$wp_sweepbright_helpers = new WP_SweepBright_Helpers(); | ||
} | ||
|
||
/** | ||
* Load the SweepBright class containing filters and queries. | ||
*/ | ||
public function load_wp_sweepbright_query() { | ||
require_once plugin_dir_path( __DIR__ ). 'modules/class-wp-sweepbright-query.php'; | ||
public function load_wp_sweepbright_query() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'modules/class-wp-sweepbright-query.php'; | ||
$wp_sweepbright_query = new WP_SweepBright_Query(); | ||
} | ||
|
||
/** | ||
* Load the pages API. | ||
*/ | ||
public function load_wp_sweepbright_pages() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'api/class-controller-pages.php'; | ||
$wp_sweepbright_controller_pages = new WP_SweepBright_Controller_Pages(); | ||
} | ||
|
||
|
||
/** | ||
* Load the API router. | ||
*/ | ||
public function load_wp_sweepbright_router() { | ||
require_once plugin_dir_path( __DIR__ ). 'api/class-router.php'; | ||
public function load_wp_sweepbright_router() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'api/class-router.php'; | ||
$wp_sweepbright_router = new WP_SweepBright_Router(); | ||
} | ||
|
||
/** | ||
* Create the WP SweepBright menu page with add_menu_page(); | ||
*/ | ||
public function add_admin_page() { | ||
public function add_admin_page() | ||
{ | ||
$icon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjAwIDIwMCI+CiAgPHBhdGggaWQ9IlBhdGhfMSIgZGF0YS1uYW1lPSJQYXRoIDEiIGQ9Ik0xNTIwLjE2NywzNzFjLTE1LjAyMiwwLTUwLjItNTcuMTktNTAuMi04MS41NzlhNTAuMTk1LDUwLjE5NSwwLDEsMSwxMDAuMzksMEMxNTcwLjM2MiwzMTMuODEsMTUzNS4xNzcsMzcxLDE1MjAuMTY3LDM3MVptMC0xMTkuMjM5YTM3LjcsMzcuNywwLDAsMC0zNy42NDksMzcuNjZjMCwyMS4xNTUsMjguODIsNjMuMzE3LDM3LjY0OSw2OC43MjIsOC44Mi01LjQwNiwzNy42NTYtNDcuNTY3LDM3LjY1Ni02OC43MjJBMzcuNywzNy43LDAsMCwwLDE1MjAuMTY3LDI1MS43NjFabTAsMjUuMTA2YTkuNDE3LDkuNDE3LDAsMSwxLTkuNDEsOS40MTdBOS40MTksOS40MTksMCwwLDEsMTUyMC4xNjksMjc2Ljg2N1ptLTEuMjM1LTcxLjEzMmE2LjAxNCw2LjAxNCwwLDAsMS02LjAwOS02LjAxMlYxNzcuMDA5YTYuMDEsNi4wMSwwLDAsMSwxMi4wMjEsMHYyMi43MTRBNi4wMTEsNi4wMTEsMCwwLDEsMTUxOC45MzQsMjA1LjczNVptNDMuODEyLDEyLjA2OWE2LjAxMSw2LjAxMSwwLDAsMS00Ljc3OC05LjY1OWwxMy43NjMtMTguMDZhNi4wMTEsNi4wMTEsMCwxLDEsOS41NjMsNy4yODVsLTEzLjc2MywxOC4wNjNBNi4wMDksNi4wMDksMCwwLDEsMTU2Mi43NDYsMjE3LjhabS04OC4xNTIsMi4yNzFhNS45ODksNS45ODksMCwwLDEtNC43ODgtMi4zNzFsLTEzLjc2MS0xOC4wNjZhNi4wMSw2LjAxLDAsMCwxLDkuNTYyLTcuMjgybDEzLjc2OCwxOC4wNjlhNi4wMTUsNi4wMTUsMCwwLDEtNC43ODEsOS42NVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNDE4LjgxNSAtMTcxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo="; | ||
|
||
// Main page | ||
|
@@ -164,9 +187,21 @@ public function add_admin_page() { | |
'Properties', | ||
'publish_pages', | ||
$this->plugin_name . '-properties', | ||
array( $this, 'load_admin_properties' ), | ||
array($this, 'load_admin_properties'), | ||
); | ||
|
||
/* | ||
// Pages | ||
add_submenu_page( | ||
$this->plugin_name . '-properties', | ||
'Pages', | ||
'Pages', | ||
'publish_pages', | ||
$this->plugin_name . '-pages', | ||
array($this, 'load_admin_pages'), | ||
); | ||
*/ | ||
|
||
// Database | ||
add_submenu_page( | ||
$this->plugin_name . '-properties', | ||
|
@@ -177,24 +212,14 @@ public function add_admin_page() { | |
false, | ||
); | ||
|
||
// Logs | ||
add_submenu_page( | ||
$this->plugin_name . '-properties', | ||
'Logs', | ||
'Logs', | ||
'activate_plugins', | ||
$this->plugin_name . '-logs', | ||
array( $this, 'load_admin_logs' ), | ||
); | ||
|
||
// Contact | ||
add_submenu_page( | ||
$this->plugin_name . '-properties', | ||
'Contact', | ||
'Contact', | ||
'activate_plugins', | ||
$this->plugin_name . '-contact', | ||
array( $this, 'load_admin_contact' ), | ||
array($this, 'load_admin_contact'), | ||
); | ||
|
||
// Settings | ||
|
@@ -204,42 +229,45 @@ public function add_admin_page() { | |
'Settings', | ||
'activate_plugins', | ||
$this->plugin_name . '-settings', | ||
array( $this, 'load_admin_settings' ), | ||
array($this, 'load_admin_settings'), | ||
); | ||
} | ||
|
||
/** | ||
* Load properties. | ||
*/ | ||
public function load_admin_properties() { | ||
require_once plugin_dir_path( __DIR__ ). 'admin/pages/class-wp-sweepbright-properties.php'; | ||
public function load_admin_properties() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'admin/pages/class-wp-sweepbright-properties.php'; | ||
$wp_sweepbright_properties = new WP_SweepBright_Properties(); | ||
require_once plugin_dir_path( __FILE__ ). 'partials/properties.php'; | ||
require_once plugin_dir_path(__FILE__) . 'partials/properties.php'; | ||
} | ||
|
||
/** | ||
* Load the logs page. | ||
* Load pages. | ||
*/ | ||
public function load_admin_logs() { | ||
require_once plugin_dir_path( __DIR__ ). 'admin/pages/class-wp-sweepbright-logs.php'; | ||
$wp_sweepbright_logs = new WP_SweepBright_Logs(); | ||
require_once plugin_dir_path( __FILE__ ). 'partials/logs.php'; | ||
public function load_admin_pages() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'admin/pages/class-wp-sweepbright-pages.php'; | ||
$wp_sweepbright_pages = new WP_SweepBright_Pages(); | ||
require_once plugin_dir_path(__FILE__) . 'partials/pages.php'; | ||
} | ||
|
||
/** | ||
* Load the contact page. | ||
*/ | ||
public function load_admin_contact() { | ||
require_once plugin_dir_path( __FILE__ ). 'partials/contact.php'; | ||
public function load_admin_contact() | ||
{ | ||
require_once plugin_dir_path(__FILE__) . 'partials/contact.php'; | ||
} | ||
|
||
/** | ||
* Load the settings page. | ||
*/ | ||
public function load_admin_settings() { | ||
require_once plugin_dir_path( __DIR__ ). 'admin/pages/class-wp-sweepbright-settings.php'; | ||
public function load_admin_settings() | ||
{ | ||
require_once plugin_dir_path(__DIR__) . 'admin/pages/class-wp-sweepbright-settings.php'; | ||
$wp_sweepbright_settings = new WP_SweepBright_Settings(); | ||
require_once plugin_dir_path( __FILE__ ). 'partials/settings.php'; | ||
require_once plugin_dir_path(__FILE__) . 'partials/settings.php'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Buttons | ||
* ---------------------------------------------------------------------------*/ | ||
|
||
/* Button */ | ||
.btn, | ||
.dg-btn { | ||
@apply appearance-none relative inline-block px-4 py-3 text-center text-sm font-medium transition duration-200 cursor-pointer rounded shadow-sm border; | ||
} | ||
|
||
.btn:focus, | ||
.dg-btn:focus { | ||
@apply outline-none; | ||
} | ||
|
||
/* Default */ | ||
.btn-default:hover, | ||
.dg-btn--cancel:hover { | ||
@apply border-gray-400 text-blue-500; | ||
} | ||
|
||
.btn-default:active, | ||
.dg-btn--cancel:active { | ||
@apply border-gray-500; | ||
} | ||
|
||
/* Primary */ | ||
.btn-primary, | ||
.dg-btn--ok { | ||
@apply text-white bg-blue-500 border-blue-600 border-opacity-50; | ||
} | ||
|
||
.btn-primary:hover, | ||
.dg-btn--ok:hover { | ||
@apply bg-blue-400; | ||
} | ||
|
||
.btn-primary:active, | ||
.dg-btn--ok:active { | ||
@apply bg-blue-600; | ||
} |
Oops, something went wrong.