-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
29 changed files
with
1,338 additions
and
143 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
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,42 @@ | ||
=== iko.travel Affiliate === | ||
Contributors: MB-Jan | ||
Tags: travel, iko, booking | ||
Requires at least: 4.7 | ||
Tested up to: 5.7.2 | ||
Stable tag: 4.3 | ||
Requires PHP: 7.3 | ||
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"). | ||
|
||
== 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 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. | ||
|
||
== Options == | ||
There are multiple ways to use our components: | ||
|
||
1. By selecting our custom Gutenberg, Elementor, WPBakery or Avada blocks directly in the editor | ||
2. Using the shortcode that accompanies each web component | ||
|
||
== Support == | ||
|
||
* Support: bjorn@iko.travel | ||
|
||
[https://sell.iko.travel](https://sell.iko.travel "Your favorite travel inventory software") | ||
|
||
== Changelog == | ||
|
||
= 1.0.19 = | ||
* Initial Launch |
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
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
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,39 @@ | ||
<?php | ||
if ( ! defined( 'ABSPATH' ) ) exit; | ||
|
||
class fusionElements extends ikoTravelElements { | ||
function __construct() { | ||
add_action('init', array($this, 'checkIfEnabled')); | ||
} | ||
function checkIfEnabled() { | ||
parent::__construct(); | ||
add_action( 'fusion_builder_before_init', array( $this, 'initElements' )); | ||
|
||
} | ||
function initElements() { | ||
if (function_exists('fusion_builder_map')) { | ||
$shortcodes = array(); | ||
$shortcodes = apply_filters( 'ikoShortcodes', $shortcodes); | ||
foreach ($shortcodes as $key => $shortcodeData) { | ||
$params = $shortcodeData['params']; | ||
if (!empty($params)) { | ||
foreach($params as $paramKey => $param) { | ||
if (!empty($param['type']) && $param['type'] == 'dropdown') { | ||
$params[$paramKey]['type'] = 'select'; | ||
} | ||
} | ||
} | ||
fusion_builder_map( array( | ||
"name" => $shortcodeData['name'], | ||
"shortcode" => $shortcodeData['code'], | ||
"class" => "", | ||
"category" => __( "Content", $this->namespace), | ||
"icon" => 'fusion-module-icon fusiona-widget', | ||
"params" => $params | ||
)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
$vsElements = new vcElements(); |
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 @@ | ||
<?php // Silence is golden |
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,24 @@ | ||
body { | ||
.ikoitineraryform { | ||
width: 100%; | ||
text-align: center; | ||
border: none; | ||
border-radius: 5px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); | ||
padding: 0; | ||
background-color: #F8F9FA; | ||
padding: 10px 5px; | ||
img { | ||
display: inline; | ||
margin: 0; | ||
width: 14px; | ||
vertical-align: middle; | ||
margin-bottom: 3px; | ||
} | ||
div { | ||
display: inline-block; | ||
margin-left: 8px; | ||
font-size: 0.8em; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 +1,6 @@ | ||
@use "search"; | ||
@use "account"; | ||
@use "itinerary"; | ||
@use "itineraryform"; | ||
@use "lookup"; | ||
@use "content"; |
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,22 @@ | ||
<?php | ||
if ( ! defined( 'ABSPATH' ) ) exit; | ||
|
||
class ikoDefault extends \Elementor\Base_Control { | ||
public $namespace; | ||
public function get_type() { | ||
return 'ikoDefault'; | ||
} | ||
|
||
public function content_template() { | ||
$this->namespace = 'iko-travel'; | ||
?> | ||
<div class="elementor-control-field"> | ||
<div class="elementor-control-input-wrapper"><b><?= __( "This component does not require any configuration.", $this->namespace ); ?></b></div> | ||
</div> | ||
<div class="elementor-control-field"> | ||
<div class="elementor-control-input-wrapper"><?=__( "Simply ensure that you have entered the correct Client-ID and Client-Secret ", $this->namespace ) . ' <a href="'.admin_url( '/customize.php?autofocus[section]=ikoTravel').'" title="'.__('iko.travel settings',$this->namespace).'" target="_blank">'.__('here',$this->namespace).'</a>'; ?> </div> | ||
</div> | ||
<?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,40 @@ | ||
<?php | ||
if ( ! defined( 'ABSPATH' ) ) exit; | ||
|
||
class elementorWidgets extends ikoTravelElements { | ||
function __construct() { | ||
add_action('init', array($this, 'checkIfEnabled')); | ||
|
||
add_action( 'elementor/controls/controls_registered', [ $this, 'register_controls' ] ); | ||
} | ||
public function register_controls() { | ||
require_once('elementorControls.php'); | ||
$controls_manager = \Elementor\Plugin::$instance->controls_manager; | ||
$controls_manager->register_control( 'ikoDefault', new ikoDefault() ); | ||
|
||
} | ||
function checkIfEnabled() { | ||
if( defined( 'ELEMENTOR_VERSION' ) ) { | ||
parent::__construct(); | ||
add_action( 'elementor/widgets/widgets_registered', function() { | ||
|
||
|
||
require_once('ikoaccount.php'); | ||
require_once('ikoitinerary.php'); | ||
require_once('ikolookup.php'); | ||
require_once('ikosearch.php'); | ||
require_once('ikocontent.php'); | ||
require_once('ikoitineraryform.php'); | ||
// Let Elementor know about our widget | ||
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorIkoAccount() ); | ||
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorIkoitinerary() ); | ||
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorIkoLookup() ); | ||
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorIkoSearch() ); | ||
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorIkoContent() ); | ||
|
||
}); | ||
} | ||
} | ||
} | ||
|
||
$elementorWidgets = new elementorWidgets(); |
Oops, something went wrong.