Skip to content

Commit

Permalink
Rebranded plugin to WINK
Browse files Browse the repository at this point in the history
  • Loading branch information
MB-Jan committed Jul 19, 2022
1 parent e4b1f7a commit f32333a
Show file tree
Hide file tree
Showing 44 changed files with 1,030 additions and 1,027 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# iko.travel Affiliate WordPress plugin documentation #
# WINK Affiliate WordPress plugin documentation #

### Project information ###

* Summary: Integrates WordPress with your iko.travel seller account at [https://sell.iko.travel][https://sell.iko.travel]
* Summary: Integrates WordPress with your WINK seller account at [https://sell.WINK][https://sell.WINK]

### Setup ###
Once you've created an account with iko.travel, you can install this WordPress plugin on your site. Once installed, the plugin will ask you for your clientId and secretKey to connect with your account on iko.travel.
Once you've created an account with WINK, you can install this WordPress plugin on your site. Once installed, the plugin will ask you for your clientId and secretKey to connect with your account on WINK.

Once you've entered your credentials, you can go to your Gutenberg editor and start embedding our web components into your site.

Available components (short code : description):

* [ikolookup]: Works with ranked content grid. Type in a place you want to visit and have inventory displayed.
* [ikosearch]: Simple button to open up itinerary form.
* [ikoaccount]Account: Button to let you authenticate. Once authenticated, it turns into a dropdown with account options.
* [ikoitinerary]Itinerary: Same as search button, only it contains itinerary information as button text.
* [ikocontent]: Lets you embed the inventory you've selected on iko.travel directly into a page or post.
* [winklookup]: Works with ranked content grid. Type in a place you want to visit and have inventory displayed.
* [winksearch]: Simple button to open up itinerary form.
* [winkaccount]Account: Button to let you authenticate. Once authenticated, it turns into a dropdown with account options.
* [winkitinerary]Itinerary: Same as search button, only it contains itinerary information as button text.
* [winkcontent]: Lets you embed the inventory you've selected on WINK directly into a page or post.

### Options ###
There are 2 ways to use our components:
Expand All @@ -25,6 +25,6 @@ There are 2 ways to use our components:

### Support ###

* Support: bjorn@iko.travel
* Support: bjorn@wink.travel

[https://sell.iko.travel]: https://sell.iko.travel
[https://sell.wink.travel]: https://sell.wink.travel
31 changes: 17 additions & 14 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== iko.travel Affiliate ===
Contributors: MB-Jan, ikotravel
Tags: travel, iko, booking
=== WINK Affiliate ===
Contributors: MB-Jan, wink
Tags: travel, wink, booking
Requires at least: 4.7
Tested up to: 6.0
Stable tag: 1.2.17
Expand All @@ -9,21 +9,21 @@ Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrates WordPress with your iko.travel seller account. Learn more at [https://sell.iko.travel](https://sell.iko.travel "Your favorite travel inventory software").
Integrates WordPress with your WINK seller account. Learn more at [https://sell.wink.travel](https://sell.wink.travel "Your favorite travel inventory software").

== Description ==

Once you've created an account with iko.travel, you can install this WordPress plugin on your site. Once installed, the plugin will ask you for your clientId and secretKey to connect with your account on iko.travel.
Once you've created an account with WINK, you can install this WordPress plugin on your site. Once installed, the plugin will ask you for your clientId and secretKey to connect with your account on WINK.

Once you've entered your credentials, you can go to your Gutenberg editor and start embedding our web components into your site.

Available components:

* [ikolookup]: Works with ranked content grid. Type in a place you want to visit and have inventory displayed.
* [ikosearch]: Simple button to open up itinerary form.
* [ikoaccount]Account: Button to let you authenticate. Once authenticated, it turns into a dropdown with account options.
* [ikoitinerary]Itinerary: Same as search button, only it contains itinerary information as button text.
* [ikocontent]: Lets you embed the inventory you've selected on iko.travel directly into a page or post.
* [winklookup]: Works with ranked content grid. Type in a place you want to visit and have inventory displayed.
* [winksearch]: Simple button to open up itinerary form.
* [winkaccount]Account: Button to let you authenticate. Once authenticated, it turns into a dropdown with account options.
* [winkitinerary]Itinerary: Same as search button, only it contains itinerary information as button text.
* [winkcontent]: Lets you embed the inventory you've selected on WINK directly into a page or post.

== Options ==
There are multiple ways to use our components:
Expand All @@ -33,22 +33,25 @@ There are multiple ways to use our components:

== Frequently Asked Questions ==

= Is a an iko.travel seller account required to use this plugin? =
= Is a an WINK seller account required to use this plugin? =

Yes. Learn more at [https://sell.iko.travel](https://sell.iko.travel "Your favorite travel inventory software").
Yes. Learn more at [https://sell.wink.travel](https://sell.wink.travel "Your favorite travel inventory software").

= Is it compatible with PHP <8.0 =

If you notice any issues, please contact us.

== Support ==

* Support: bjorn@iko.travel
* Support: bjorn@wink.travel

[https://sell.iko.travel](https://sell.iko.travel "Your favorite travel inventory software")
[https://sell.wink.travel](https://sell.wink.travel "Your favorite travel inventory software")

== Changelog ==

= 1.2.18 =
* Rebrand to Wink.

= 1.2.17 =
* Includes multiple fixes + notice if permalinks have not been set in WordPress.

Expand Down
2 changes: 1 addition & 1 deletion css/customize.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* A simple file to customize the WP Customizer */
#customize-control-ikoEnvironment {
#customize-control-winkEnvironment {
display: none !important;
}
Binary file modified img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed includes/.DS_Store
Binary file not shown.
36 changes: 18 additions & 18 deletions includes/elementHandler.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;

if (!array_key_exists('ikoTravelLoaderAlreadyEnqueued',$GLOBALS)) {
$GLOBALS['ikoTravelLoaderAlreadyEnqueued'] = false;
if (!array_key_exists('winkLoaderAlreadyEnqueued',$GLOBALS)) {
$GLOBALS['winkLoaderAlreadyEnqueued'] = false;
}

class ikoTravelElements {
protected $namespace = 'iko-travel';
protected $clientIdKey = 'ikoTravelClientId';
protected $clientSecretKey = 'ikoTravelSecret';
class winkElements {
protected $namespace = 'wink';
protected $clientIdKey = 'winkClientId';
protected $clientSecretKey = 'winkSecret';
function __construct() {
// $this->namespace = 'iko-travel';
// $this->namespace = 'wink';
$this->pluginURL = trailingslashit( plugin_dir_url( __FILE__ ) );
$this->imgURL = trailingslashit( dirname( plugin_dir_url( __FILE__ ) ) ) . 'img/';
$this->environmentVal = get_option('ikoEnvironment', 'production');
$this->environmentVal = get_option('winkEnvironment', 'production');
}

function coreFunction() {
add_action('wp_footer',array($this,'coreComponent'));
}
function coreComponent() {
if ($GLOBALS['ikoTravelLoaderAlreadyEnqueued'] == false) {
if ($GLOBALS['winkLoaderAlreadyEnqueued'] == false) {
$html = '';
$clientId = get_option($this->clientIdKey, false);

echo'<iko-app-loader config=\'{"clientId":"'.esc_html($clientId).'"}\'></iko-app-loader>';
$GLOBALS['ikoTravelLoaderAlreadyEnqueued'] = true;
echo'<wink-app-loader config=\'{"clientId":"'.esc_html($clientId).'"}\'></wink-app-loader>';
$GLOBALS['winkLoaderAlreadyEnqueued'] = true;
}
return $GLOBALS['ikoTravelLoaderAlreadyEnqueued'];
return $GLOBALS['winkLoaderAlreadyEnqueued'];
}
}

require_once('elements/ikolookup.php'); // Lookup element
require_once('elements/ikoitinerary.php'); // Itinerary button element
require_once('elements/ikoitineraryform.php'); // Itinerary form element
require_once('elements/ikosearch.php'); // Search button element
require_once('elements/ikoaccount.php'); // Account button element
require_once('elements/ikocontent.php'); // Content element
require_once('elements/winklookup.php'); // Lookup element
require_once('elements/winkitinerary.php'); // Itinerary button element
require_once('elements/winkitineraryform.php'); // Itinerary form element
require_once('elements/winksearch.php'); // Search button element
require_once('elements/winkaccount.php'); // Account button element
require_once('elements/winkcontent.php'); // Content element

require_once('elements/wpbakery/vcElements.php'); // WPBakery Page Builder
require_once('elements/elementor/elementorWidgets.php'); // Elementor
Expand Down
Binary file modified includes/elements/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions includes/elements/avada/fusionElements.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;

class fusionElements extends ikoTravelElements {
class winkFusionElements extends winkElements {
function __construct() {
add_action('init', array($this, 'checkIfEnabled'));
}
Expand Down Expand Up @@ -36,4 +36,4 @@ function initElements() {
}
}

$vsElements = new vcElements();
$winkFusionElements = new winkFusionElements();
2 changes: 1 addition & 1 deletion includes/elements/css/_account.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikoaccount {
.winkaccount {
width: 100%;
height: 40px;
max-width: 54px;
Expand Down
2 changes: 1 addition & 1 deletion includes/elements/css/_content.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikocontent {
.winkcontent {
width: 100%;
text-align: center;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion includes/elements/css/_itinerary.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikoitinerary {
.winkitinerary {
width: 100%;
text-align: center;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion includes/elements/css/_itineraryform.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikoitineraryform {
.winkitineraryform {
width: 100%;
text-align: center;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion includes/elements/css/_lookup.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikolookup {
.winklookup {
width: 100%;
text-align: left;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion includes/elements/css/_search.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
.ikosearch {
.winksearch {
width: 100%;
height: 40px;
max-width: 54px;
Expand Down
34 changes: 17 additions & 17 deletions includes/elements/css/elements.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f32333a

Please sign in to comment.