diff --git a/CHANGELOG.md b/CHANGELOG.md index cdeaa91..3d2beba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,223 @@ All notable changes to this project will be documented in this file. +## [1.2.18] - 2022-07-22 + +### Build + +- Bookmark: merge to master +- Bookmark: merge to master +- Updated name of plugin in release script + +## [1.2.17] - 2022-05-19 + +### Documentation + +- :memo: removed console.log statement + +### Build + +- Bookmark: merge to master + +## [1.2.16] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version +- :construction_worker: disabled sslverify in dev env for layout call + +## [1.2.15] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version numbers +- :construction_worker: changed git cliff tag name to fit the actual tag + +## [1.2.14] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number everywhere + +## [1.2.13] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped correct version number in ikotravel.php + +## [1.2.12] - 2022-05-16 + +### Styling + +- :lipstick: added square brand icon + +### Build + +- Bookmark: merge to master + +## [1.2.11] - 2022-05-16 + +### Bug Fixes + +- :bug: fixed local development + +### Build + +- Bookmark: merge to master + +## [1.2.10] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number correctly + +## [1.2.18] - 2022-07-22 + +### Build + +- Bookmark: merge to master +- Updated name of plugin in release script + +## [1.2.17] - 2022-05-19 + +### Documentation + +- :memo: removed console.log statement + +### Build + +- Bookmark: merge to master + +## [1.2.16] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version +- :construction_worker: disabled sslverify in dev env for layout call + +## [1.2.15] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version numbers +- :construction_worker: changed git cliff tag name to fit the actual tag + +## [1.2.14] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number everywhere + +## [1.2.13] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped correct version number in ikotravel.php + +## [1.2.12] - 2022-05-16 + +### Styling + +- :lipstick: added square brand icon + +### Build + +- Bookmark: merge to master + +## [1.2.11] - 2022-05-16 + +### Bug Fixes + +- :bug: fixed local development + +### Build + +- Bookmark: merge to master + +## [1.2.10] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number correctly + +## [1.2.18] - 2022-07-21 + +### Documentation + +- :memo: removed console.log statement + +### Build + +- Updated name of plugin in release script +- Bookmark: merge to master + +## [1.2.16] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version +- :construction_worker: disabled sslverify in dev env for layout call + +## [1.2.15] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version numbers +- :construction_worker: changed git cliff tag name to fit the actual tag + +## [1.2.14] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number everywhere + +## [1.2.13] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped correct version number in ikotravel.php + +## [1.2.12] - 2022-05-16 + +### Styling + +- :lipstick: added square brand icon + +### Build + +- Bookmark: merge to master + +## [1.2.11] - 2022-05-16 + +### Bug Fixes + +- :bug: fixed local development + +### Build + +- Bookmark: merge to master + +## [1.2.10] - 2022-05-16 + +### Build + +- Bookmark: merge to master +- :construction_worker: bumped version number correctly + ## [1.2.17] - 2022-05-19 ### Documentation diff --git a/README.md b/README.md index 1721377..a7c44c2 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 \ No newline at end of file +[https://sell.wink.travel]: https://sell.wink.travel \ No newline at end of file diff --git a/README.txt b/README.txt index 630c72e..19d392b 100644 --- a/README.txt +++ b/README.txt @@ -1,29 +1,29 @@ -=== 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 -Version: 1.2.17 +Tested up to: 6.0.1 +Stable tag: 1.2.18 +Version: 1.2.18 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: @@ -33,9 +33,9 @@ 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 = @@ -43,12 +43,15 @@ 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. diff --git a/css/customize.css b/css/customize.css index 1ae389e..4ca2c8b 100644 --- a/css/customize.css +++ b/css/customize.css @@ -1,4 +1,4 @@ /* A simple file to customize the WP Customizer */ -#customize-control-ikoEnvironment { +#customize-control-winkEnvironment { display: none !important; } \ No newline at end of file diff --git a/img/logo.png b/img/logo.png index 91acfa4..badd8a0 100644 Binary files a/img/logo.png and b/img/logo.png differ diff --git a/includes/.DS_Store b/includes/.DS_Store deleted file mode 100644 index bc2e4f7..0000000 Binary files a/includes/.DS_Store and /dev/null differ diff --git a/includes/elementHandler.php b/includes/elementHandler.php index 5be56b7..fddb40b 100644 --- a/includes/elementHandler.php +++ b/includes/elementHandler.php @@ -1,42 +1,42 @@ 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''; - $GLOBALS['ikoTravelLoaderAlreadyEnqueued'] = true; + echo''; + $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 diff --git a/includes/elements/.DS_Store b/includes/elements/.DS_Store index 6326c6a..d14ce15 100644 Binary files a/includes/elements/.DS_Store and b/includes/elements/.DS_Store differ diff --git a/includes/elements/avada/fusionElements.php b/includes/elements/avada/fusionElements.php index d91ad7c..756fd30 100644 --- a/includes/elements/avada/fusionElements.php +++ b/includes/elements/avada/fusionElements.php @@ -1,7 +1,7 @@ namespace = 'iko-travel'; + $this->namespace = 'wink'; ?>
namespace ); ?>
-
namespace ) . ' '.esc_html(__('here',$this->namespace)).''; ?>
+
namespace ) . ' '.esc_html(__('here',$this->namespace)).''; ?>
controls_manager; - $controls_manager->register_control( 'ikoDefault', new ikoDefault() ); + $controls_manager->register_control( 'winkDefault', new winkDefault() ); } function checkIfEnabled() { @@ -19,22 +19,22 @@ function checkIfEnabled() { 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'); + require_once('winkaccount.php'); + require_once('winkitinerary.php'); + require_once('winklookup.php'); + require_once('winksearch.php'); + require_once('winkcontent.php'); + require_once('winkitineraryform.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() ); + Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorWinkAccount() ); + Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorWinkitinerary() ); + Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorWinkLookup() ); + Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorWinkSearch() ); + Elementor\Plugin::instance()->widgets_manager->register_widget_type( new elementorWinkContent() ); }); } } } -$elementorWidgets = new elementorWidgets(); \ No newline at end of file +$winkElementorWidgets = new winkElementorWidgets(); \ No newline at end of file diff --git a/includes/elements/elementor/ikoaccount.php b/includes/elements/elementor/winkaccount.php similarity index 65% rename from includes/elements/elementor/ikoaccount.php rename to includes/elements/elementor/winkaccount.php index af4355a..5bb5cc4 100644 --- a/includes/elements/elementor/ikoaccount.php +++ b/includes/elements/elementor/winkaccount.php @@ -1,13 +1,13 @@ namespace ); + return esc_html__( 'wink Account', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,7 +20,7 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); @@ -28,7 +28,7 @@ protected function _register_controls() { 'hey', [ 'label' => '', - 'type' => 'ikoDefault', + 'type' => 'winkDefault', 'placeholder' => '' ] ); @@ -39,7 +39,7 @@ protected function _register_controls() { protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikoaccount]'); + echo do_shortcode('[winkaccount]'); } } diff --git a/includes/elements/elementor/ikocontent.php b/includes/elements/elementor/winkcontent.php similarity index 65% rename from includes/elements/elementor/ikocontent.php rename to includes/elements/elementor/winkcontent.php index 2381333..4ecff94 100644 --- a/includes/elements/elementor/ikocontent.php +++ b/includes/elements/elementor/winkcontent.php @@ -1,13 +1,13 @@ namespace ); + return __( 'wink Content', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,15 +20,15 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); $shortcodes = array(); - $shortcodes = apply_filters( 'ikoShortcodes', $shortcodes); - if (!empty($shortcodes['ikocontent'])) { + $shortcodes = apply_filters( 'winkShortcodes', $shortcodes); + if (!empty($shortcodes['winkcontent'])) { $options = array(); - foreach($shortcodes['ikocontent']['params'][0]['value'] as $optionKey => $optionValue) { + foreach($shortcodes['winkcontent']['params'][0]['value'] as $optionKey => $optionValue) { $options[$optionValue] = $optionKey; } $this->add_control( @@ -48,7 +48,7 @@ protected function _register_controls() { } protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikocontent layoutid="'.esc_html($settings['layoutid']).'"]'); + echo do_shortcode('[winkcontent layoutid="'.esc_html($settings['layoutid']).'"]'); } } diff --git a/includes/elements/elementor/ikoitinerary.php b/includes/elements/elementor/winkitinerary.php similarity index 64% rename from includes/elements/elementor/ikoitinerary.php rename to includes/elements/elementor/winkitinerary.php index e688198..ac14a09 100644 --- a/includes/elements/elementor/ikoitinerary.php +++ b/includes/elements/elementor/winkitinerary.php @@ -1,13 +1,13 @@ namespace ); + return esc_html__( 'wink Itinerary Button', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,7 +20,7 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); @@ -28,7 +28,7 @@ protected function _register_controls() { 'hey', [ 'label' => '', - 'type' => 'ikoDefault', + 'type' => 'winkDefault', 'placeholder' => '' ] ); @@ -39,7 +39,7 @@ protected function _register_controls() { protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikoitinerary]'); + echo do_shortcode('[winkitinerary]'); } } diff --git a/includes/elements/elementor/ikoitineraryform.php b/includes/elements/elementor/winkitineraryform.php similarity index 63% rename from includes/elements/elementor/ikoitineraryform.php rename to includes/elements/elementor/winkitineraryform.php index 687f611..54e46b7 100644 --- a/includes/elements/elementor/ikoitineraryform.php +++ b/includes/elements/elementor/winkitineraryform.php @@ -1,13 +1,13 @@ namespace ); + return esc_html__( 'wink Itinerary Form', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,7 +20,7 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); @@ -28,7 +28,7 @@ protected function _register_controls() { 'hey', [ 'label' => '', - 'type' => 'ikoDefault', + 'type' => 'winkDefault', 'placeholder' => '' ] ); @@ -39,7 +39,7 @@ protected function _register_controls() { protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikoitineraryform]'); + echo do_shortcode('[winkitineraryform]'); } } diff --git a/includes/elements/elementor/ikosearch.php b/includes/elements/elementor/winklookup.php similarity index 65% rename from includes/elements/elementor/ikosearch.php rename to includes/elements/elementor/winklookup.php index f53ef29..2d96a41 100644 --- a/includes/elements/elementor/ikosearch.php +++ b/includes/elements/elementor/winklookup.php @@ -1,13 +1,13 @@ namespace ); + return esc_html__( 'wink Lookup', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,7 +20,7 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); @@ -28,7 +28,7 @@ protected function _register_controls() { 'hey', [ 'label' => '', - 'type' => 'ikoDefault', + 'type' => 'winkDefault', 'placeholder' => '' ] ); @@ -39,7 +39,7 @@ protected function _register_controls() { protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikosearch]'); + echo do_shortcode('[winklookup]'); } } diff --git a/includes/elements/elementor/ikolookup.php b/includes/elements/elementor/winksearch.php similarity index 65% rename from includes/elements/elementor/ikolookup.php rename to includes/elements/elementor/winksearch.php index eb2a226..5f38dd9 100644 --- a/includes/elements/elementor/ikolookup.php +++ b/includes/elements/elementor/winksearch.php @@ -1,13 +1,13 @@ namespace ); + return esc_html__( 'wink Search', $this->namespace ); } public function get_icon() { return 'eicon-external-link-square'; @@ -20,7 +20,7 @@ protected function _register_controls() { $this->start_controls_section( 'content_section', [ - 'label' => esc_html__( 'iko Options', $this->namespace ) + 'label' => esc_html__( 'wink Options', $this->namespace ) ] ); @@ -28,7 +28,7 @@ protected function _register_controls() { 'hey', [ 'label' => '', - 'type' => 'ikoDefault', + 'type' => 'winkDefault', 'placeholder' => '' ] ); @@ -39,7 +39,7 @@ protected function _register_controls() { protected function render() { $settings = $this->get_settings_for_display(); - echo do_shortcode('[ikolookup]'); + echo do_shortcode('[winksearch]'); } } diff --git a/includes/elements/js/ikoaccount.js b/includes/elements/js/ikoaccount.js deleted file mode 100644 index fcbb89c..0000000 --- a/includes/elements/js/ikoaccount.js +++ /dev/null @@ -1,80 +0,0 @@ -function initIkoAccount() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikoaccount'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI5NnB4IiBoZWlnaHQ9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1OCw1LjM4NCw1LjQ1OAoJCQljMi45ODksMCw1LjUzMi0yLjQ2Niw1LjUzMi01LjQ1OEM4NC4wODgsNjcuOTQzLDgxLjU0NSw2NS40NzcsNzguNTU2LDY1LjQ3N3oiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'}); - ikoRegisterBlockType( 'ikotravel-blocks/'+blockName, { - title: iko__( 'iko.travel Account Button' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true, - 'align': [ 'left' ] - }, - attributes: { - // "configurationId" : { - // default: '', - // } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'button', - { - class: blockName - }, - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'login.svg' - } - ) - ); - } - - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+']' - ) - ] - ); - - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); -} - -initIkoAccount(); diff --git a/includes/elements/js/ikocontent.js b/includes/elements/js/ikocontent.js deleted file mode 100644 index 31c6338..0000000 --- a/includes/elements/js/ikocontent.js +++ /dev/null @@ -1,263 +0,0 @@ -function initIkoContent() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoSelectControl = wp.components.SelectControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikocontent'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI5NnB4IiBoZWlnaHQ9Ijk2cHgiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOTYgOTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfMV8iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iNzguNzUyOSIgeTE9IjEwMS4yNjQyIiB4Mj0iMTcuMjQ4NSIgeTI9Ii01LjI2NDYiPgoJCTxzdG9wICBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOiMwQjBGN0QiLz4KCQk8c3RvcCAgb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjoj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0Ni4zMSwxNi4wODQsNDQuODcxLDE0LjIyNiw0Mi44MzcsMTMuOTZ6Ii8+CgkJCgkJCTxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfOF8iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iLTIxMi45OTYxIiB5MT0iMTAwMC4xMjA2IiB4Mj0iLTYyNy44NDc3IiB5Mj0iMjgxLjU3NjYiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC45ODI0IC0wLjE4NjcgMC4xODY3IDAuOTgyNCAxNzguMzUyNSAtODYxLjc2ODMpIj4KCQkJPHN0b3AgIG9mZnNldD0iMC4xMjgxIiBzdHlsZT0ic3RvcC1jb2xvcjojRkZGRkZGIi8+CgkJCTxzdG9wICBvZmZzZXQ9IjAuMzAwNSIgc3R5bGU9InN0b3AtY29sb3I6I0ZGRkZGRjtzdG9wLW9wYWNpdHk6MC45Ii8+CgkJPC9saW5lYXJHcmFkaWVudD4KCQk8cGF0aCBmaWxsPSJ1cmwoI1NWR0lEXzhfKSIgZD0iTTc4LjU1Niw2NS40NzdjLTIuOTE2LDAtNS4zODQsMi40NjYtNS4zODQsNS40NThjMCwyLjk5MiwyLjQ2OCw1LjQ1OCw1LjM4NCw1LjQ1OAoJCQljMi45ODksMCw1LjUzMi0yLjQ2Niw1LjUzMi01LjQ1OEM4NC4wODgsNjcuOTQzLDgxLjU0NSw2NS40NzcsNzguNTU2LDY1LjQ3N3oiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'}); - var layoutData = [{ - layout: 'ADD_ON_CARD', // now you know which “layout” to use for iko-content-loader - id: '7d9189da-1a17-4632-a882-ac94b85be49d', // the identifier to inject into the web component - name: 'Add On Cart', // the name you can use to populate the dropdown list - placeholderImageUrl: ikoTravelData.imgURL+'placeholder-bg.png' // an image you can use as background image to fill out the Block similar to an image block - },{ - layout: 'PACKAGE_CARD', // now you know which “layout” to use for iko-content-loader - id: '2b701f2a-cc11-44cd-a4ec-bc2f6e9889bb', // the identifier to inject into the web component - name: 'Package Card', // the name you can use to populate the dropdown list - placeholderImageUrl: ikoTravelData.imgURL+'placeholder-bg.png' // an image you can use as background image to fill out the Block similar to an image block - }]; - if (ikoContentData) { - layoutData = ikoContentData; - loadBlock(); - console.log(layoutData); - // jQuery.getJSON(ikoContentData.endpointURL, function(data) { - // // JSON result in `data` variable - // if (data) { - // layoutData = data; - // } - // loadBlock(); - // }); - } else { - loadBlock(); - } - - function loadFormattedLayoutData(layoutData) { - - var formattedLayoutData = [{ - 'label' : "Choose your travel inventory", - 'value' : "" - }]; - jQuery.each(layoutData,function(index,value){ - var currentData = { - 'label' : value.name, - 'value' : value.id - } - formattedLayoutData.push(currentData); - }); - return formattedLayoutData; - } - - function loadBlock() { - // layoutData.push({ - // layout: 'RANKED_INVENTORY_GRID', // now you know which “layout” to use for iko-content-loader - // id: '0', // the identifier to inject into the web component - // name: 'Ranked Inventory Grid', // the name you can use to populate the dropdown list - // placeholderImageUrl: '' // an image you can use as background image to fill out the Block similar to an image block - // }); - var formattedLayoutData = loadFormattedLayoutData(layoutData); - ikoRegisterBlockType( 'ikotravel-blocks/'+blockName, { - title: iko__( 'iko.travel Content' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true - }, - attributes: { - "layout" : { - default: '', - }, - "layoutId" : { - default: '', - }, - "background" : { - default: '', - } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - - //Function to update slug attribute - function changeLayout(layoutId){ - setAttributes({layoutId}); - if (layoutId !== "") { - setLayoutData(layoutId); - } else { - var layout = ""; - setAttributes({layout}); - var background = ""; - if (background) { - setAttributes({background}); - attributes.background = ""; - } - } - } - - function setLayoutData(layoutid) { - background = ''; - setAttributes({background}); - if (layoutid.type == 'number') { - layoutid = layoutid.toString(); - } - console.log(layoutid); - console.log(layoutData); - jQuery.each(layoutData,function(index,value){ - if (value.id == layoutid) { - var layout = value.layout; - setAttributes({layout}); - background = value.placeholderImageUrl; - if (background) { - setAttributes({background}); - - } - } - }); - - } - - function changeBackground(background){ - setAttributes({background}); - } - - if (attributes.layout === "") { - attributes.background = ""; - } - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'div', - { - class: blockName - }, - ikoCreateElement( - 'p', - { - - }, - iko__('Ranked Inventory Grid') - ), - ikoCreateElement( - 'p', - { - class: 'noPreview' - }, - iko__('No Preview Available') - ), - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'logo.png' - } - ), - ); - - if (attributes.layout === "") { - var preview = ikoCreateElement( - 'div', - { - class: blockName - }, - ikoCreateElement( - 'p', - { - - }, - iko__('Please select a layout in the block settings.') - ), - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'logo.png' - } - ), - ); - } - else if (attributes.layout !== "RANKED_INVENTORY_GRID") { - preview = ikoCreateElement( - 'img', - { - src: attributes.background, - class: 'ikoContentImg' - }, - ); - } - } - - var backgroundURL = []; - if(attributes.layout != '') { - backgroundURL = ikoCreateElement(ikoTextControl, { - value: attributes.background, - label: iko__( 'Background Image URL' ), - onChange: changeBackground, - type: 'text', - key: 'ikoTravelBackground' - }) - } - - var shortcodeAttributes = ""; - jQuery.each(attributes,function(index,value){ - shortcodeAttributes += ' '+index+'=""'; - }); - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'div', - { - - }, - iko__('We strongly recommend to use this block only in full-width content areas and not in columns.') - ), - ikoCreateElement(ikoSelectControl, { - value: attributes.layoutId, - label: iko__( 'Layout' ), - onChange: changeLayout, - type: 'select', - options: formattedLayoutData, - key: 'ikoTravelLayout' - }), - // backgroundURL, - // bgPosition, - // customBGPosition, - // bgSize, - // customBGSize, - ], - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+shortcodeAttributes+']' - ) - ] - ); - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); - } -} -initIkoContent(); diff --git a/includes/elements/js/ikoitinerary.js b/includes/elements/js/ikoitinerary.js deleted file mode 100644 index d2340a4..0000000 --- a/includes/elements/js/ikoitinerary.js +++ /dev/null @@ -1,97 +0,0 @@ -function initIkoItinerary() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikoitinerary'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJ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NS40NThjMCwyLjk5MiwyLjQ2OCw1LjQ1OCw1LjM4NCw1LjQ1OAoJCQljMi45ODksMCw1LjUzMi0yLjQ2Niw1LjUzMi01LjQ1OEM4NC4wODgsNjcuOTQzLDgxLjU0NSw2NS40NzcsNzguNTU2LDY1LjQ3N3oiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'}); - ikoRegisterBlockType( 'ikotravel-blocks/'+blockName, { - title: iko__( 'iko.travel Itinerary Button' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true - }, - attributes: { - // "configurationId" : { - // default: '', - // } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - var date = new Date(); - var mm = date.getMonth() + 1; // getMonth() is zero-based - var dd = date.getDate(); - var yy = date.getFullYear().toString().substr(-2); - - var dateTomorrow = new Date(date); - dateTomorrow.setDate(dateTomorrow.getDate() + 1) - var mmTomorrow = dateTomorrow.getMonth() + 1; // getMonth() is zero-based - var ddTomorrow = dateTomorrow.getDate(); - var yyTomorrow = dateTomorrow.getFullYear().toString().substr(-2); - - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'button', - { - class: blockName - }, - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'calendar.svg' - } - ), - ikoCreateElement( - 'div', - { - - }, - dd+'/'+mm+'/'+yy+' - '+ddTomorrow+'/'+mmTomorrow+'/'+yyTomorrow+', '+iko__( - '1 room, 2 guests') - ), - ); - } - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+']' - ) - ] - ); - - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); -} - -initIkoItinerary(); diff --git a/includes/elements/js/ikoitineraryform.js b/includes/elements/js/ikoitineraryform.js deleted file mode 100644 index 5512f0b..0000000 --- a/includes/elements/js/ikoitineraryform.js +++ /dev/null @@ -1,97 +0,0 @@ -function initIkoItinerary() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikoitineraryform'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI5NnB4IiBoZWlnaHQ9Ijk2cHgiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOTYgOTY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cuOTQzLDgxLjU0NSw2NS40NzcsNzguNTU2LDY1LjQ3N3oiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'}); - ikoRegisterBlockType( 'ikotravel-blocks/'+blockName, { - title: iko__( 'iko.travel Itinerary Form' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true - }, - attributes: { - // "configurationId" : { - // default: '', - // } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - var date = new Date(); - var mm = date.getMonth() + 1; // getMonth() is zero-based - var dd = date.getDate(); - var yy = date.getFullYear().toString().substr(-2); - - var dateTomorrow = new Date(date); - dateTomorrow.setDate(dateTomorrow.getDate() + 1) - var mmTomorrow = dateTomorrow.getMonth() + 1; // getMonth() is zero-based - var ddTomorrow = dateTomorrow.getDate(); - var yyTomorrow = dateTomorrow.getFullYear().toString().substr(-2); - - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'button', - { - class: blockName - }, - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'calendar.svg' - } - ), - ikoCreateElement( - 'div', - { - - }, - dd+'/'+mm+'/'+yy+' - '+ddTomorrow+'/'+mmTomorrow+'/'+yyTomorrow+', '+iko__( - '1 room, 2 guests') - ), - ); - } - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+']' - ) - ] - ); - - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); -} - -initIkoItinerary(); diff --git a/includes/elements/js/ikolookup.js b/includes/elements/js/ikolookup.js deleted file mode 100644 index 864801b..0000000 --- a/includes/elements/js/ikolookup.js +++ /dev/null @@ -1,85 +0,0 @@ -function initIkoLookup() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikolookup'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI5NnB4IiBoZWlnaHQ9Ijk2cHgiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOTYgOTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfMV8iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iNz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Lookup' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true - }, - attributes: { - // "configurationId" : { - // default: '', - // } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'button', - { - class: blockName - }, - ikoCreateElement( - 'div', - { - - }, - iko__('Where are you headed?') - ), - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'arrow-down.svg' - } - ), - ); - } - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+']' - ) - ] - ); - - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); -} - -initIkoLookup(); diff --git a/includes/elements/js/ikosearch.js b/includes/elements/js/ikosearch.js deleted file mode 100644 index 7bc836c..0000000 --- a/includes/elements/js/ikosearch.js +++ /dev/null @@ -1,85 +0,0 @@ -function initIkoSearch() { - const ikoRegisterBlockType = wp.blocks.registerBlockType; //Blocks API - const ikoCreateElement = wp.element.createElement; //React.createElement - const iko__ = wp.i18n.__; //translation functions - const ikoInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper - const ikoTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer - const ikoServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer - const blockName = 'ikosearch'; - const iconEl = ikoCreateElement('img', { width: 24, src: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b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MjgxLjU3NjYiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC45ODI0IC0wLjE4NjcgMC4xODY3IDAuOTgyNCAxNzguMzUyNSAtODYxLjc2ODMpIj4KCQkJPHN0b3AgIG9mZnNldD0iMC4xMjgxIiBzdHlsZT0ic3RvcC1jb2xvcjojRkZGRkZGIi8+CgkJCTxzdG9wICBvZmZzZXQ9IjAuMzAwNSIgc3R5bGU9InN0b3AtY29sb3I6I0ZGRkZGRjtzdG9wLW9wYWNpdHk6MC45Ii8+CgkJPC9saW5lYXJHcmFkaWVudD4KCQk8cGF0aCBmaWxsPSJ1cmwoI1NWR0lEXzhfKSIgZD0iTTc4LjU1Niw2NS40NzdjLTIuOTE2LDAtNS4zODQsMi40NjYtNS4zODQsNS40NThjMCwyLjk5MiwyLjQ2OCw1LjQ1OCw1LjM4NCw1LjQ1OAoJCQljMi45ODksMCw1LjUzMi0yLjQ2Niw1LjUzMi01LjQ1OEM4NC4wODgsNjcuOTQzLDgxLjU0NSw2NS40NzcsNzguNTU2LDY1LjQ3N3oiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'}); - ikoRegisterBlockType( 'ikotravel-blocks/'+blockName, { - title: iko__( 'iko.travel Search Button' ), // Block title. - category: ikoTravelData.blockCat, //category - icon: iconEl, - supports: { - 'multiple' : true, - 'align': [ 'left' ] - }, - attributes: { - // "configurationId" : { - // default: '', - // } - }, - //display the post title - edit(props){ - const attributes = props.attributes; - const setAttributes = props.setAttributes; - - // const preview = ikoCreateElement( ikoServerSideRender, { - // block: 'ikotravel-blocks/'+blockName, - // attributes: attributes, - // key: 'ikoTravelPreview_'+blockName - // } ); - if (ikoTravelData.mode == 'staging' || ikoTravelData.mode == 'development') { - var preview = ikoCreateElement( ikoServerSideRender, { - block: 'ikotravel-blocks/'+blockName, - attributes: attributes, - key: 'ikoTravelPreview_'+blockName - } ); - } else { - var preview = ikoCreateElement( - 'button', - { - class: blockName - }, - ikoCreateElement( - 'img', - { - src: ikoTravelData.imgURL+'search.svg' - } - ) - ); - } - const inspector = ikoCreateElement( ikoInspectorControls, { - key: 'ikoTravelInspector_'+blockName - }, - [ - ikoCreateElement( - 'p', - {}, - iko__('Alternatively to this block, you can also use the following shortcode:') - ) - ], - [ - ikoCreateElement( - 'p', - {}, - '['+blockName+']' - ) - ] - ); - - return ikoCreateElement( - 'div', - {}, - // Children of the main div as an array - [ preview, inspector ] - ); - }, - save(){ - return null;//save has to exist. This all we need - } - }); -} - -initIkoSearch(); diff --git a/includes/elements/js/winkaccount.js b/includes/elements/js/winkaccount.js new file mode 100644 index 0000000..a209f3c --- /dev/null +++ b/includes/elements/js/winkaccount.js @@ -0,0 +1,80 @@ +function initwinkAccount() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winkaccount'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggv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R5oe8IrknbJmubRme6izU3smq1xo7bylVnRkp4FNsmjhcICm+QeQiS3T2J+Ax3d9xvrFCF1gpeErZBqokqlelvwMTmzASlAvnxEZiII8hl/Eu+B62np7opQCy0SXB/RFpn3co6hXDA55TiY6mSCc+xFriB4EGVaNbVigkqFJFUhBQHSqZXK3CiJWcX9nKfiK6UbM3qIxZ8npXmKbskmie83FqYrjd/x5SO8Ud5KwTMs6L8YvbEeTuaRI+lL8KbMWE4VkahPNMkgzTP0t3xPWkBWMKrxvoxuBjxiT32pSSZxGi4IL/pXKxhyPI2GT0Yu43D/PRVW1lkkUnVAyyj6P/Vda+4ohgqOVtHk8fJc6WFlRE1okZu0fUNbroPiaK19sYN0mtJKvlFlXRmR/0LaS/M9uSDtBAsWBEE6Ay5+hiBIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Account Button' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true, + 'align': [ 'left' ] + }, + attributes: { + // "configurationId" : { + // default: '', + // } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'button', + { + class: blockName + }, + winkCreateElement( + 'img', + { + src: winkData.imgURL+'login.svg' + } + ) + ); + } + + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+']' + ) + ] + ); + + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); +} + +initwinkAccount(); diff --git a/includes/elements/js/winkcontent.js b/includes/elements/js/winkcontent.js new file mode 100644 index 0000000..aac6114 --- /dev/null +++ b/includes/elements/js/winkcontent.js @@ -0,0 +1,263 @@ +function initwinkContent() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkSelectControl = wp.components.SelectControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winkcontent'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggvRkLQryfH02j4ZNxlHA7p9PU40s4ikaqDaqJKpXqL/k9D19rbiqH8o1V0ebw8T3JIGVG7o8hN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ZBqokqlelvwMTmzASlAvnxEZiII8hl/Eu+B62np7opQCy0SXB/RFpn3co6hXDA55TiY6mSCc+xFriB4EGVaNbVigkqFJFUhBQHSqZXK3CiJWcX9nKfiK6UbM3qIxZ8npXmKbskmie83FqYrjd/x5SO8Ud5KwTMs6L8YvbEeTuaRI+lL8KbMWE4VkahPNMkgzTP0t3xPWkBWMKrxvoxuBjxiT32pSSZxGi4IL/pXKxhyPI2GT0Yu43D/PRVW1lkkUnVAyyj6P/Vda+4ohgqOVtHk8fJc6WFlRE1okZu0fUNbroPiaK19sYN0mtJKvlFlXRmR/0LaS/M9uSDtBAsWBEE6Ay5+hiBIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + var layoutData = [{ + layout: 'ADD_ON_CARD', // now you know which “layout” to use for wink-content-loader + id: '7d9189da-1a17-4632-a882-ac94b85be49d', // the identifier to inject into the web component + name: 'Add On Cart', // the name you can use to populate the dropdown list + placeholderImageUrl: winkData.imgURL+'placeholder-bg.png' // an image you can use as background image to fill out the Block similar to an image block + },{ + layout: 'PACKAGE_CARD', // now you know which “layout” to use for wink-content-loader + id: '2b701f2a-cc11-44cd-a4ec-bc2f6e9889bb', // the identifier to inject into the web component + name: 'Package Card', // the name you can use to populate the dropdown list + placeholderImageUrl: winkData.imgURL+'placeholder-bg.png' // an image you can use as background image to fill out the Block similar to an image block + }]; + if (winkContentData) { + layoutData = winkContentData; + loadBlock(); + console.log(layoutData); + // jQuery.getJSON(winkContentData.endpointURL, function(data) { + // // JSON result in `data` variable + // if (data) { + // layoutData = data; + // } + // loadBlock(); + // }); + } else { + loadBlock(); + } + + function loadFormattedLayoutData(layoutData) { + + var formattedLayoutData = [{ + 'label' : "Choose your travel inventory", + 'value' : "" + }]; + jQuery.each(layoutData,function(index,value){ + var currentData = { + 'label' : value.name, + 'value' : value.id + } + formattedLayoutData.push(currentData); + }); + return formattedLayoutData; + } + + function loadBlock() { + // layoutData.push({ + // layout: 'RANKED_INVENTORY_GRID', // now you know which “layout” to use for wink-content-loader + // id: '0', // the identifier to inject into the web component + // name: 'Ranked Inventory Grid', // the name you can use to populate the dropdown list + // placeholderImageUrl: '' // an image you can use as background image to fill out the Block similar to an image block + // }); + var formattedLayoutData = loadFormattedLayoutData(layoutData); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Content' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true + }, + attributes: { + "layout" : { + default: '', + }, + "layoutId" : { + default: '', + }, + "background" : { + default: '', + } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + + //Function to update slug attribute + function changeLayout(layoutId){ + setAttributes({layoutId}); + if (layoutId !== "") { + setLayoutData(layoutId); + } else { + var layout = ""; + setAttributes({layout}); + var background = ""; + if (background) { + setAttributes({background}); + attributes.background = ""; + } + } + } + + function setLayoutData(layoutid) { + background = ''; + setAttributes({background}); + if (layoutid.type == 'number') { + layoutid = layoutid.toString(); + } + console.log(layoutid); + console.log(layoutData); + jQuery.each(layoutData,function(index,value){ + if (value.id == layoutid) { + var layout = value.layout; + setAttributes({layout}); + background = value.placeholderImageUrl; + if (background) { + setAttributes({background}); + + } + } + }); + + } + + function changeBackground(background){ + setAttributes({background}); + } + + if (attributes.layout === "") { + attributes.background = ""; + } + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'div', + { + class: blockName + }, + winkCreateElement( + 'p', + { + + }, + wink__('Ranked Inventory Grid') + ), + winkCreateElement( + 'p', + { + class: 'noPreview' + }, + wink__('No Preview Available') + ), + winkCreateElement( + 'img', + { + src: winkData.imgURL+'logo.png' + } + ), + ); + + if (attributes.layout === "") { + var preview = winkCreateElement( + 'div', + { + class: blockName + }, + winkCreateElement( + 'p', + { + + }, + wink__('Please select a layout in the block settings.') + ), + winkCreateElement( + 'img', + { + src: winkData.imgURL+'logo.png' + } + ), + ); + } + else if (attributes.layout !== "RANKED_INVENTORY_GRID") { + preview = winkCreateElement( + 'img', + { + src: attributes.background, + class: 'winkContentImg' + }, + ); + } + } + + var backgroundURL = []; + if(attributes.layout != '') { + backgroundURL = winkCreateElement(winkTextControl, { + value: attributes.background, + label: wink__( 'Background Image URL' ), + onChange: changeBackground, + type: 'text', + key: 'winkBackground' + }) + } + + var shortcodeAttributes = ""; + jQuery.each(attributes,function(index,value){ + shortcodeAttributes += ' '+index+'=""'; + }); + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'div', + { + + }, + wink__('We strongly recommend to use this block only in full-width content areas and not in columns.') + ), + winkCreateElement(winkSelectControl, { + value: attributes.layoutId, + label: wink__( 'Layout' ), + onChange: changeLayout, + type: 'select', + options: formattedLayoutData, + key: 'winkLayout' + }), + // backgroundURL, + // bgPosition, + // customBGPosition, + // bgSize, + // customBGSize, + ], + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+shortcodeAttributes+']' + ) + ] + ); + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); + } +} +initwinkContent(); diff --git a/includes/elements/js/winkitinerary.js b/includes/elements/js/winkitinerary.js new file mode 100644 index 0000000..98fbfba --- /dev/null +++ b/includes/elements/js/winkitinerary.js @@ -0,0 +1,97 @@ +function initwinkItinerary() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winkitinerary'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggvRkLQryfH02j4ZNxlHA7p9PU40s4ikaqDaqJKpXqL/k9D19rbiqH8o1V0ebw8T3JIGVG7o8hN2r6hbZ2j4mitQ7GDdBoWPzGk7XCjtjs5/RYMe7r/OIjLKXJ8iMUGlxdUqllv5+eUC6Yn2wymOpngHXqRK0xEDoMofHIUfQneFNs8lZbyjYh1JS0vRqJf8SDXXyKpVOZFScwq7mc/FV8p25jZQywWLuUZKBTY5glpEixYrRa1H7OIEGbX3es5PcnmhFcU7ZLtJa9IeoT5irYvqUpcEO7fZ0a6q/pEYVfp6c+M1N6i7QU2yaOFwgKblB5CRHC+qp0sBuvsIPWDBauV4BjZDqAEt/u1h6terMMvvmGMt7aFXl70l7hT+PXIWqyz07QKy+wnknVZU+Om1LfNkb5Oa4j4rJc2RL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BIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Itinerary Button' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true + }, + attributes: { + // "configurationId" : { + // default: '', + // } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + var date = new Date(); + var mm = date.getMonth() + 1; // getMonth() is zero-based + var dd = date.getDate(); + var yy = date.getFullYear().toString().substr(-2); + + var dateTomorrow = new Date(date); + dateTomorrow.setDate(dateTomorrow.getDate() + 1) + var mmTomorrow = dateTomorrow.getMonth() + 1; // getMonth() is zero-based + var ddTomorrow = dateTomorrow.getDate(); + var yyTomorrow = dateTomorrow.getFullYear().toString().substr(-2); + + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'button', + { + class: blockName + }, + winkCreateElement( + 'img', + { + src: winkData.imgURL+'calendar.svg' + } + ), + winkCreateElement( + 'div', + { + + }, + dd+'/'+mm+'/'+yy+' - '+ddTomorrow+'/'+mmTomorrow+'/'+yyTomorrow+', '+wink__( + '1 room, 2 guests') + ), + ); + } + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+']' + ) + ] + ); + + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); +} + +initwinkItinerary(); diff --git a/includes/elements/js/winkitineraryform.js b/includes/elements/js/winkitineraryform.js new file mode 100644 index 0000000..bdc93a7 --- /dev/null +++ b/includes/elements/js/winkitineraryform.js @@ -0,0 +1,97 @@ +function initwinkItinerary() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winkitineraryform'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggvRkLQryfH02j4ZNxlHA7p9PU40s4ikaqDaqJKpXqL/k9D19rbiqH8o1V0ebw8T3JIGVG7o8hN2r6hbZ2j4mitQ7GDdBoWPzGk7XCjtjs5/RYMe7r/OIjLKXJ8iMUGlxdUqllv5+eUC6Yn2wymOpngHXqRK0xEDoMofHIUfQneFNs8lZbyjYh1JS0vRqJf8SDXXyKpVOZFScwq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rjd/x5SO8Ud5KwTMs6L8YvbEeTuaRI+lL8KbMWE4VkahPNMkgzTP0t3xPWkBWMKrxvoxuBjxiT32pSSZxGi4IL/pXKxhyPI2GT0Yu43D/PRVW1lkkUnVAyyj6P/Vda+4ohgqOVtHk8fJc6WFlRE1okZu0fUNbroPiaK19sYN0mtJKvlFlXRmR/0LaS/M9uSDtBAsWBEE6Ay5+hiBIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Itinerary Form' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true + }, + attributes: { + // "configurationId" : { + // default: '', + // } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + var date = new Date(); + var mm = date.getMonth() + 1; // getMonth() is zero-based + var dd = date.getDate(); + var yy = date.getFullYear().toString().substr(-2); + + var dateTomorrow = new Date(date); + dateTomorrow.setDate(dateTomorrow.getDate() + 1) + var mmTomorrow = dateTomorrow.getMonth() + 1; // getMonth() is zero-based + var ddTomorrow = dateTomorrow.getDate(); + var yyTomorrow = dateTomorrow.getFullYear().toString().substr(-2); + + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'button', + { + class: blockName + }, + winkCreateElement( + 'img', + { + src: winkData.imgURL+'calendar.svg' + } + ), + winkCreateElement( + 'div', + { + + }, + dd+'/'+mm+'/'+yy+' - '+ddTomorrow+'/'+mmTomorrow+'/'+yyTomorrow+', '+wink__( + '1 room, 2 guests') + ), + ); + } + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+']' + ) + ] + ); + + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); +} + +initwinkItinerary(); diff --git a/includes/elements/js/winklookup.js b/includes/elements/js/winklookup.js new file mode 100644 index 0000000..dad6c08 --- /dev/null +++ b/includes/elements/js/winklookup.js @@ -0,0 +1,85 @@ +function initwinkLookup() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winklookup'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggvRkLQryfH02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bJmubRme6izU3smq1xo7bylVnRkp4FNsmjhcICm+QeQiS3T2J+Ax3d9xvrFCF1gpeErZBqokqlelvwMTmzASlAvnxEZiII8hl/Eu+B62np7opQCy0SXB/RFpn3co6hXDA55TiY6mSCc+xFriB4EGVaNbVigkqFJFUhBQHSqZXK3CiJWcX9nKfiK6UbM3qIxZ8npXmKbskmie83FqYrjd/x5SO8Ud5KwTMs6L8YvbEeTuaRI+lL8KbMWE4VkahPNMkgzTP0t3xPWkBWMKrxvoxuBjxiT32pSSZxGi4IL/pXKxhyPI2GT0Yu43D/PRVW1lkkUnVAyyj6P/Vda+4ohgqOVtHk8fJc6WFlRE1okZu0fUNbroPiaK19sYN0mtJKvlFlXRmR/0LaS/M9uSDtBAsWBEE6Ay5+hiBIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Lookup' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true + }, + attributes: { + // "configurationId" : { + // default: '', + // } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'button', + { + class: blockName + }, + winkCreateElement( + 'div', + { + + }, + wink__('Where are you headed?') + ), + winkCreateElement( + 'img', + { + src: winkData.imgURL+'arrow-down.svg' + } + ), + ); + } + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+']' + ) + ] + ); + + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); +} + +initwinkLookup(); diff --git a/includes/elements/js/winksearch.js b/includes/elements/js/winksearch.js new file mode 100644 index 0000000..7bb3dfa --- /dev/null +++ b/includes/elements/js/winksearch.js @@ -0,0 +1,85 @@ +function initwinkSearch() { + const winkRegisterBlockType = wp.blocks.registerBlockType; //Blocks API + const winkCreateElement = wp.element.createElement; //React.createElement + const wink__ = wp.i18n.__; //translation functions + const winkInspectorControls = wp.editor.InspectorControls; //Block inspector wrapper + const winkTextControl = wp.components.TextControl; //WordPress form inputs and server-side renderer + const winkServerSideRender = wp.components.ServerSideRender; //WordPress form inputs and server-side renderer + const blockName = 'winksearch'; + const iconEl = winkCreateElement('img', { width: 24, src: 'data:image/com/u/98699744?s=200&v=4;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAIAAAByquWKAAA4mElEQVR4nOzdd1RT2dYA8JveCCEQegcBpQiioIC9IfYujr1id9Sxjr2ijr2PvWEDK9hQUUcQEEEQlV6k15AE0su35M57z/fNGwckJzfB8/uD5RI4ewO5O7ecsw/Rd6CZw4QA665MQgdrBIIgSIsR0VLlIeVwBm3AOhkIgqBvwWOdAARBUFPBggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOgAULgiCdAQsWBEE6AxYsCIJ0BixYEATpDFiwIAjSGbBgQRCkM2DBgiBIZ8CCBUGQziBinQCkvZixnEoiUZ9gnEmax/a3fE9aQFEwqvG+9O4GPGJPfYlJBnEaLggvRkLQryfH02j4ZNxlHA7p9PU40s4ikaqDaqJKpXqL/k9D19rbiqH8o1V0ebw8T3JIGVG7o8hN2r6hbZ2j4mitQ7GDdBoW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iII8hl/Eu+B62np7opQCy0SXB/RFpn3co6hXDA55TiY6mSCc+xFriB4EGVaNbVigkqFJFUhBQHSqZXK3CiJWcX9nKfiK6UbM3qIxZ8npXmKbskmie83FqYrjd/x5SO8Ud5KwTMs6L8YvbEeTuaRI+lL8KbMWE4VkahPNMkgzTP0t3xPWkBWMKrxvoxuBjxiT32pSSZxGi4IL/pXKxhyPI2GT0Yu43D/PRVW1lkkUnVAyyj6P/Vda+4ohgqOVtHk8fJc6WFlRE1okZu0fUNbroPiaK19sYN0mtJKvlFlXRmR/0LaS/M9uSDtBAsWBEE6Ay5+hiBIZ8CCBUGQzoAFC4IgnQELFgRBOgMWLAiCdAYsWBAE6QxYsCAI0hmwYEEQpDNgwYIgSGfAggVBkM6ABQuCIJ0BCxYEQToDFiwIgnQGLFgQBOkMWLAgCNIZsGBBEKQzYMGCIEhnwIIFQZDOIApWSedXNdQEiMgF4VgnA0EQ9C3/FwAA//8vBm9ZUR7NewAAAABJRU5ErkJggg=='}); + winkRegisterBlockType( 'wink-blocks/'+blockName, { + title: wink__( 'WINK Search Button' ), // Block title. + category: winkData.blockCat, //category + icon: iconEl, + supports: { + 'multiple' : true, + 'align': [ 'left' ] + }, + attributes: { + // "configurationId" : { + // default: '', + // } + }, + //display the post title + edit(props){ + const attributes = props.attributes; + const setAttributes = props.setAttributes; + + // const preview = winkCreateElement( winkServerSideRender, { + // block: 'wink-blocks/'+blockName, + // attributes: attributes, + // key: 'winkPreview_'+blockName + // } ); + if (winkData.mode == 'staging' || winkData.mode == 'development') { + var preview = winkCreateElement( winkServerSideRender, { + block: 'wink-blocks/'+blockName, + attributes: attributes, + key: 'winkPreview_'+blockName + } ); + } else { + var preview = winkCreateElement( + 'button', + { + class: blockName + }, + winkCreateElement( + 'img', + { + src: winkData.imgURL+'search.svg' + } + ) + ); + } + const inspector = winkCreateElement( winkInspectorControls, { + key: 'winkInspector_'+blockName + }, + [ + winkCreateElement( + 'p', + {}, + wink__('Alternatively to this block, you can also use the following shortcode:') + ) + ], + [ + winkCreateElement( + 'p', + {}, + '['+blockName+']' + ) + ] + ); + + return winkCreateElement( + 'div', + {}, + // Children of the main div as an array + [ preview, inspector ] + ); + }, + save(){ + return null;//save has to exist. This all we need + } + }); +} + +initwinkSearch(); diff --git a/includes/elements/ikoaccount.php b/includes/elements/winkaccount.php similarity index 71% rename from includes/elements/ikoaccount.php rename to includes/elements/winkaccount.php index 76115a4..fb62da8 100644 --- a/includes/elements/ikoaccount.php +++ b/includes/elements/winkaccount.php @@ -1,14 +1,14 @@ blockCode = 'ikoaccount'; - $this->blockName = esc_html__( "iko Account", $this->namespace ); + $this->blockCode = 'winkaccount'; + $this->blockName = esc_html__( "wink Account", $this->namespace ); add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block add_shortcode( $this->blockCode, array( $this,'blockHandler') ); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { $shortcodes[] = array( @@ -20,11 +20,11 @@ function shortcodeData($shortcodes) { } function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement(); + return $this->winkElement(); } - function ikoTravelElement() { + function winkElement() { ob_start(); - ?>blockCode.'.js'; - wp_register_script('ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, + wp_register_script('winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -66,10 +66,10 @@ function gutenbergBlockRegistration() { 'mode' => $this->environmentVal ); - wp_localize_script( 'ikoTravelBlockRenderer_'.$this->blockCode, 'ikoTravelData', $jsData ); + wp_localize_script( 'winkBlockRenderer_'.$this->blockCode, 'winkData', $jsData ); - register_block_type('ikotravel-blocks/'.$this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_'.$this->blockCode, + register_block_type('wink-blocks/'.$this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_'.$this->blockCode, 'render_callback' => array($this,'blockHandler'), 'attributes' => [], 'category' => $this->namespace.'-blocks' @@ -77,4 +77,4 @@ function gutenbergBlockRegistration() { } } -$ikoAccount = new ikoAccount(); +$winkAccount = new winkAccount(); diff --git a/includes/elements/ikocontent.php b/includes/elements/winkcontent.php similarity index 68% rename from includes/elements/ikocontent.php rename to includes/elements/winkcontent.php index f7ed4a0..88c2251 100644 --- a/includes/elements/ikocontent.php +++ b/includes/elements/winkcontent.php @@ -1,11 +1,11 @@ blockCode = 'ikocontent'; - $this->blockName = esc_html__( "iko Content", $this->namespace ); + $this->blockCode = 'winkcontent'; + $this->blockName = esc_html__( "wink Content", $this->namespace ); $this->attributes = [ 'layout' => [ 'default' => '', @@ -22,15 +22,15 @@ function __construct() { ]; add_action('init', array($this, 'gutenbergBlockRegistration')); // Adding Gutenberg Block add_shortcode($this->blockCode, array($this, 'blockHandler')); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { - $ikoContentData = $this->getIkoBearerToken(); + $winkContentData = $this->getwinkBearerToken(); $values = array( esc_html__( 'Select...', $this->namespace ) => '' ); - foreach($ikoContentData as $key => $localValue) { + foreach($winkContentData as $key => $localValue) { $values[$localValue['name']] = $localValue['id']; } $shortcodes[$this->blockCode] = array( @@ -53,10 +53,10 @@ function shortcodeData($shortcodes) { function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement($atts); + return $this->winkElement($atts); } - function ikoTravelElement($atts) { + function winkElement($atts) { $config = array(); if (!empty($atts['layout'])) { $config['layout'] = esc_html($atts['layout']); @@ -68,9 +68,9 @@ function ikoTravelElement($atts) { if (!empty($atts['layoutId'])) { $config['id'] = esc_html($atts['layoutId']); if (empty($atts['layout'])) { - $ikoContentData = $this->getIkoBearerToken(); + $winkContentData = $this->getwinkBearerToken(); $layoutName = ''; - foreach($ikoContentData as $key => $localValue) { + foreach($winkContentData as $key => $localValue) { if ($localValue['id'] == $config['id']) { $layoutName = $localValue['layout']; } @@ -83,9 +83,9 @@ function ikoTravelElement($atts) { } } if (empty($config['layout']) && !empty($config['id'])) { - $ikoContentData = $this->getIkoBearerToken(); + $winkContentData = $this->getwinkBearerToken(); $layoutName = ''; - foreach($ikoContentData as $key => $localValue) { + foreach($winkContentData as $key => $localValue) { if ($localValue['id'] == $config['id']) { $layoutName = $localValue['layout']; } @@ -99,7 +99,7 @@ function ikoTravelElement($atts) { $jsonConfig = json_encode($config); ob_start(); ?> - + environmentVal); + $env = winkCore::environmentURL('json', $this->environmentVal); //error_log($env); $clientId = get_option($this->clientIdKey, false); $clientSecret = get_option($this->clientSecretKey, false); // get current access token time to see if we can use the last one - $bearerTime = get_option('ikocontentTime', 0); + $bearerTime = get_option('winkcontentTime', 0); $currentTime = current_time('timestamp'); $bearerToken = ''; - $ikoLayouts = get_option('ikoData', array()); + $winkLayouts = get_option('winkData', array()); - if ($bearerTime < $currentTime || empty($ikoLayouts)) { + if ($bearerTime < $currentTime || empty($winkLayouts)) { $postBody = array( 'client_id' => $clientId, @@ -147,55 +147,55 @@ function getIkoBearerToken() 'sslverify' => true, ); if ($this->environmentVal == 'development') { - error_log('iko.travel - Development environment. Ignoring self-signed certificates'); + error_log('WINK - Development environment. Ignoring self-signed certificates'); $postArgs['sslverify'] = false; } $url = $env . '/oauth2/token'; $response = wp_remote_post($url,$postArgs); if ( is_wp_error( $response ) ) { // print out any error - error_log('iko.travel - Empty response when trying to retrieve token. Details below:'); + error_log('WINK - Empty response when trying to retrieve token. Details below:'); error_log($response->get_error_message()); } else { if (!empty($response['body'])) { $data = json_decode($response['body'], true); if (!empty($data)) { - // error_log('iko.travel - token $data' . $data); + // error_log('WINK - token $data' . $data); if (!empty($data['access_token']) && !empty($data['expires_in'])) { - update_option('ikocontentBearer', $data['access_token']); - update_option('ikocontentTime', $data['expires_in'] + current_time('timestamp')); + update_option('winkcontentBearer', $data['access_token']); + update_option('winkcontentTime', $data['expires_in'] + current_time('timestamp')); $bearerToken = $data['access_token']; } } else { - error_log('iko.travel - Empty response body when trying to retrieve token.'); + error_log('WINK - Empty response body when trying to retrieve token.'); } } else { - error_log('iko.travel - Unable to get response body content while retrieving token. Response array below:'); + error_log('WINK - Unable to get response body content while retrieving token. Response array below:'); error_log(print_r($response,true)); } } } else { // retrieve existing bearer token - $bearerToken = get_option('ikocontentBearer', ''); + $bearerToken = get_option('winkcontentBearer', ''); } if (!empty($bearerToken)) { - return $this->getIkoLayouts($bearerToken); + return $this->getwinkLayouts($bearerToken); } else { - error_log('iko.travel - Bearer token empty'); + error_log('WINK - Bearer token empty'); } return array(); } - function getIkoLayouts($bearerToken) { - $env = ikoCore::environmentURL('api', $this->environmentVal); + function getwinkLayouts($bearerToken) { + $env = winkCore::environmentURL('api', $this->environmentVal); $currentTime = current_time('timestamp'); - $dataTime = get_option('ikodataTime', 0); + $dataTime = get_option('winkdataTime', 0); - $ikoLayouts = get_option('ikoData', array()); - if ($dataTime < $currentTime || empty($ikoLayouts)) { + $winkLayouts = get_option('winkData', array()); + if ($dataTime < $currentTime || empty($winkLayouts)) { $url = $env . '/api/inventory/campaign/list'; $options = array('http' => array( 'method' => 'GET', @@ -208,36 +208,36 @@ function getIkoLayouts($bearerToken) { ) ); if ($this->environmentVal == 'development') { - error_log('iko.travel - Development environment. Ignoring self-signed certificates'); + error_log('WINK - Development environment. Ignoring self-signed certificates'); $getArgs['sslverify'] = false; } $response = wp_remote_get($url,$getArgs); if ( is_wp_error( $response ) ) { // print out any error - error_log('iko.travel - Empty response when trying to retrieve layouts. Details below:'); + error_log('WINK - Empty response when trying to retrieve layouts. Details below:'); error_log($response->get_error_message()); } else { if (!empty($response['body'])) { $data = json_decode($response['body'], true); if (!empty($data)) { if (!empty($data['status']) && $data['error'] == 404) { - delete_option( 'ikoData' ); - delete_option( 'ikodataTime' ); - error_log('iko.travel - Unable to retrieve layout data.'); + delete_option( 'winkData' ); + delete_option( 'winkdataTime' ); + error_log('WINK - Unable to retrieve layout data.'); } else { - // error_log('iko.travel - layout $data' . $data); - update_option('ikoData', $data); - update_option('ikodataTime', 60 * 2 + current_time('timestamp')); // 2 minutes + // error_log('WINK - layout $data' . $data); + update_option('winkData', $data); + update_option('winkdataTime', 60 * 2 + current_time('timestamp')); // 2 minutes return $data; } } else { - error_log('iko.travel - Unable to get response body content while retrieving layouts. Response array below:'); + error_log('WINK - Unable to get response body content while retrieving layouts. Response array below:'); error_log(print_r($response,true)); } } } } else { - return $ikoLayouts; + return $winkLayouts; } return array(); } @@ -252,7 +252,7 @@ function gutenbergBlockRegistration() $dir = dirname(__FILE__); $gutenbergJS = $this->blockCode . '.js'; - wp_register_script('ikoTravelBlockRenderer_' . $this->blockCode, $this->pluginURL . 'elements/js/' . $gutenbergJS, + wp_register_script('winkBlockRenderer_' . $this->blockCode, $this->pluginURL . 'elements/js/' . $gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -270,14 +270,14 @@ function gutenbergBlockRegistration() 'mode' => $this->environmentVal ); - wp_localize_script('ikoTravelBlockRenderer_' . $this->blockCode, 'ikoTravelData', $jsData); + wp_localize_script('winkBlockRenderer_' . $this->blockCode, 'winkData', $jsData); $clientId = get_option($this->clientIdKey, false); - $ikoContentData = $this->getIkoBearerToken(); - wp_localize_script('ikoTravelBlockRenderer_' . $this->blockCode, 'ikoContentData', $ikoContentData); + $winkContentData = $this->getwinkBearerToken(); + wp_localize_script('winkBlockRenderer_' . $this->blockCode, 'winkContentData', $winkContentData); - register_block_type('ikotravel-blocks/' . $this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_' . $this->blockCode, + register_block_type('wink-blocks/' . $this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_' . $this->blockCode, 'render_callback' => array($this, 'blockHandler'), 'attributes' => $this->attributes, 'category' => $this->namespace . '-blocks' @@ -285,4 +285,4 @@ function gutenbergBlockRegistration() } } -$ikoContent = new ikoContent(); +$winkContent = new winkContent(); diff --git a/includes/elements/ikoitinerary.php b/includes/elements/winkitinerary.php similarity index 73% rename from includes/elements/ikoitinerary.php rename to includes/elements/winkitinerary.php index 77b41d9..9d8539a 100644 --- a/includes/elements/ikoitinerary.php +++ b/includes/elements/winkitinerary.php @@ -1,14 +1,14 @@ blockCode = 'ikoitinerary'; - $this->blockName = esc_html__( "iko Itinerary Button", $this->namespace ); + $this->blockCode = 'winkitinerary'; + $this->blockName = esc_html__( "wink Itinerary Button", $this->namespace ); add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block add_shortcode( $this->blockCode, array( $this,'blockHandler') ); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { $shortcodes[] = array( @@ -20,11 +20,11 @@ function shortcodeData($shortcodes) { } function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement(); + return $this->winkElement(); } - function ikoTravelElement() { + function winkElement() { ob_start(); - ?>blockCode.'.js'; - wp_register_script('ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, + wp_register_script('winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -66,10 +66,10 @@ function gutenbergBlockRegistration() { 'mode' => $this->environmentVal ); - wp_localize_script( 'ikoTravelBlockRenderer_'.$this->blockCode, 'ikoTravelData', $jsData ); + wp_localize_script( 'winkBlockRenderer_'.$this->blockCode, 'winkData', $jsData ); - register_block_type('ikotravel-blocks/'.$this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_'.$this->blockCode, + register_block_type('wink-blocks/'.$this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_'.$this->blockCode, 'render_callback' => array($this,'blockHandler'), 'attributes' => [ // 'configurationId' => [ @@ -82,4 +82,4 @@ function gutenbergBlockRegistration() { } } -$ikoItinerary = new ikoItinerary(); +$winkItinerary = new winkItinerary(); diff --git a/includes/elements/ikoitineraryform.php b/includes/elements/winkitineraryform.php similarity index 73% rename from includes/elements/ikoitineraryform.php rename to includes/elements/winkitineraryform.php index ad8f1ed..242ecd0 100644 --- a/includes/elements/ikoitineraryform.php +++ b/includes/elements/winkitineraryform.php @@ -1,14 +1,14 @@ blockCode = 'ikoitineraryform'; - $this->blockName = esc_html__( "iko Itinerary Form", $this->namespace ); + $this->blockCode = 'winkitineraryform'; + $this->blockName = esc_html__( "wink Itinerary Form", $this->namespace ); add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block add_shortcode( $this->blockCode, array( $this,'blockHandler') ); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { $shortcodes[] = array( @@ -20,11 +20,11 @@ function shortcodeData($shortcodes) { } function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement(); + return $this->winkElement(); } - function ikoTravelElement() { + function winkElement() { ob_start(); - ?>blockCode.'.js'; - wp_register_script('ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, + wp_register_script('winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -66,10 +66,10 @@ function gutenbergBlockRegistration() { 'mode' => $this->environmentVal ); - wp_localize_script( 'ikoTravelBlockRenderer_'.$this->blockCode, 'ikoTravelData', $jsData ); + wp_localize_script( 'winkBlockRenderer_'.$this->blockCode, 'winkData', $jsData ); - register_block_type('ikotravel-blocks/'.$this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_'.$this->blockCode, + register_block_type('wink-blocks/'.$this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_'.$this->blockCode, 'render_callback' => array($this,'blockHandler'), 'attributes' => [ // 'configurationId' => [ @@ -82,4 +82,4 @@ function gutenbergBlockRegistration() { } } -$ikoItineraryForm = new ikoItineraryForm(); +$winkItineraryForm = new winkItineraryForm(); diff --git a/includes/elements/ikolookup.php b/includes/elements/winklookup.php similarity index 74% rename from includes/elements/ikolookup.php rename to includes/elements/winklookup.php index 6385fe0..c349fea 100644 --- a/includes/elements/ikolookup.php +++ b/includes/elements/winklookup.php @@ -1,14 +1,14 @@ blockCode = 'ikolookup'; - $this->blockName = esc_html__( "iko Lookup", $this->namespace ); + $this->blockCode = 'winklookup'; + $this->blockName = esc_html__( "wink Lookup", $this->namespace ); add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block add_shortcode( $this->blockCode, array( $this,'blockHandler') ); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { $shortcodes[] = array( @@ -20,11 +20,11 @@ function shortcodeData($shortcodes) { } function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement(); + return $this->winkElement(); } - function ikoTravelElement() { + function winkElement() { ob_start(); - ?>blockCode.'.js'; - wp_register_script('ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, + wp_register_script('winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -66,10 +66,10 @@ function gutenbergBlockRegistration() { 'mode' => $this->environmentVal ); - wp_localize_script( 'ikoTravelBlockRenderer_'.$this->blockCode, 'ikoTravelData', $jsData ); + wp_localize_script( 'winkBlockRenderer_'.$this->blockCode, 'winkData', $jsData ); - register_block_type('ikotravel-blocks/'.$this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_'.$this->blockCode, + register_block_type('wink-blocks/'.$this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_'.$this->blockCode, 'render_callback' => array($this,'blockHandler'), 'attributes' => [ // 'configurationId' => [ @@ -82,4 +82,4 @@ function gutenbergBlockRegistration() { } } -$ikoLookup = new ikoLookup(); +$winkLookup = new winkLookup(); diff --git a/includes/elements/ikosearch.php b/includes/elements/winksearch.php similarity index 71% rename from includes/elements/ikosearch.php rename to includes/elements/winksearch.php index cfae441..6ef072a 100644 --- a/includes/elements/ikosearch.php +++ b/includes/elements/winksearch.php @@ -1,14 +1,14 @@ blockCode = 'ikosearch'; - $this->blockName = esc_html__( "iko Search", $this->namespace ); + $this->blockCode = 'winksearch'; + $this->blockName = esc_html__( "wink Search", $this->namespace ); add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block add_shortcode( $this->blockCode, array( $this,'blockHandler') ); - add_filter('ikoShortcodes',array( $this, 'shortcodeData') ); + add_filter('winkShortcodes',array( $this, 'shortcodeData') ); } function shortcodeData($shortcodes) { $shortcodes[] = array( @@ -20,11 +20,11 @@ function shortcodeData($shortcodes) { } function blockHandler($atts) { $this->coreFunction(); - return $this->ikoTravelElement(); + return $this->winkElement(); } - function ikoTravelElement() { + function winkElement() { ob_start(); - ?>blockCode.'.js'; - wp_register_script('ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, + wp_register_script('winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/js/'.$gutenbergJS, array( 'wp-blocks', 'wp-i18n', @@ -67,12 +67,12 @@ function gutenbergBlockRegistration() { 'mode' => $this->environmentVal ); - wp_localize_script( 'ikoTravelBlockRenderer_'.$this->blockCode, 'ikoTravelData', $jsData ); + wp_localize_script( 'winkBlockRenderer_'.$this->blockCode, 'winkData', $jsData ); wp_enqueue_style( - 'ikoTravelBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/css/elements.css', array(), false); - register_block_type('ikotravel-blocks/'.$this->blockCode, array( - 'editor_script' => 'ikoTravelBlockRenderer_'.$this->blockCode, + 'winkBlockRenderer_'.$this->blockCode, $this->pluginURL . 'elements/css/elements.css', array(), false); + register_block_type('wink-blocks/'.$this->blockCode, array( + 'editor_script' => 'winkBlockRenderer_'.$this->blockCode, 'render_callback' => array($this,'blockHandler'), 'attributes' => [ // 'configurationId' => [ @@ -85,4 +85,4 @@ function gutenbergBlockRegistration() { } } -$ikoSearch = new ikoSearch(); +$winkSearch = new winkSearch(); diff --git a/includes/elements/wpbakery/vcElements.php b/includes/elements/wpbakery/vcElements.php index 4a99ad1..3bd525b 100644 --- a/includes/elements/wpbakery/vcElements.php +++ b/includes/elements/wpbakery/vcElements.php @@ -1,7 +1,7 @@ $shortcodeData) { $params = $shortcodeData['params']; if (empty($params)) { $params = array( array( - "type" => "ikoText", + "type" => "winkText", "class" => "", "param_name" => "placeholder", "value" => 1, "heading" => esc_html__( "This component does not require any configuration.", $this->namespace ), - "description" => esc_html__( "Simply ensure that you have entered the correct Client-ID and Client-Secret ", $this->namespace ) . ' '. + "description" => esc_html__( "Simply ensure that you have entered the correct Client-ID and Client-Secret ", $this->namespace ) . ' '. esc_html__('here',$this->namespace).' ' ) ); @@ -52,4 +52,4 @@ function initElements() { } } -$vsElements = new vcElements(); +$winkVCElements = new winkVCElements(); diff --git a/releaseToMaster.bash b/releaseToMaster.bash index b7cd8a9..e45f7cb 100755 --- a/releaseToMaster.bash +++ b/releaseToMaster.bash @@ -7,7 +7,7 @@ echo "Disabling git messages for a release" export GIT_MERGE_AUTOEDIT=no -echo "Releasing new version of iko-travel-affiliate WordPress plugin with git flow..." +echo "Releasing new version of Wink Affiliate WordPress plugin with git flow..." echo "Enter version number. E.g. 1.2.3"; read versionNumber @@ -54,4 +54,4 @@ git push echo "Enabling git messages for a release again" export GIT_MERGE_AUTOEDIT=yes -echo "iko-travel-affiliate WordPress plugin $versionNumber has been successfully released" +echo "Wink Affiliate WordPress plugin $versionNumber has been successfully released" diff --git a/ikoTravel.php b/wink.php similarity index 59% rename from ikoTravel.php rename to wink.php index dddc797..7da3f4d 100644 --- a/ikoTravel.php +++ b/wink.php @@ -1,52 +1,52 @@ version = current_time('Y-m-d'); - $this->namespace = 'iko-travel'; - $this->section = 'ikoTravel'; // Customizer Section Name - $this->clientIdKey = 'ikoTravelClientId'; - $this->clientSecretKey = 'ikoTravelSecret'; - $this->environment = 'ikoEnvironment'; + $this->namespace = 'wink'; + $this->section = 'wink'; // Customizer Section Name + $this->clientIdKey = 'winkClientId'; + $this->clientSecretKey = 'winkSecret'; + $this->environment = 'winkEnvironment'; $this->environmentVal = get_option($this->environment, 'production'); $this->pluginURL = trailingslashit( plugin_dir_url( __FILE__ ) ); $this->settingsURL = admin_url( '/customize.php?autofocus[section]='.$this->section); add_action( 'customize_register', array( $this,'addSettings' ) ); // adding plugin settings to WP Customizer add_action('admin_notices', array( $this,'adminNotice' ) ); // adding admin notice if client id has not been entered - //add_shortcode('ikoTravel', array( $this,'blockHandler' ) ); // Adding Shortcode + //add_shortcode('wink', array( $this,'blockHandler' ) ); // Adding Shortcode add_filter( 'block_categories_all', array( $this,'gutenbergBlockCategory' ), 10, 2); // Adding custom Gutenberg Block Category //add_action('init', array( $this,'gutenbergBlockRegistration' ) ); // Adding Gutenberg Block - add_action( 'wp_enqueue_scripts', array($this, 'loadScripts' )); // too resource intensive to search all pages for iko.travel elements. Scripts need to be added all the time. + add_action( 'wp_enqueue_scripts', array($this, 'loadScripts' )); // too resource intensive to search all pages for WINK elements. Scripts need to be added all the time. add_filter( 'clean_url', array($this,'jsHelper'), 11, 1 ); // Helper to add attribute to js tag add_action( 'admin_enqueue_scripts', array($this,'customizeScripts')); add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'settingsLink' )); - add_action( 'customize_save_after' , array($this, 'clearIkoCache' )); + add_action( 'customize_save_after' , array($this, 'clearwinkCache' )); } function settingsLink( $links ) { @@ -57,7 +57,7 @@ function settingsLink( $links ) { get_admin_url() . 'admin.php' ) ); // Create the link. - $settings_link = '' . esc_html__( 'Settings',$this->namespace ) . ''; + $settings_link = '' . esc_html__( 'Settings',$this->namespace ) . ''; // Adds the link to the end of the array. array_push( $links, @@ -66,12 +66,12 @@ function settingsLink( $links ) { return $links; } function customizeScripts() { - if (!isset($_GET['ikoadmin']) && !isset($_GET['ikoAdmin'])) { - wp_enqueue_style( 'ikoCustomizer', $this->pluginURL . 'css/customize.css', array(), $this->version ); + if (!isset($_GET['winkadmin']) && !isset($_GET['winkAdmin'])) { + wp_enqueue_style( 'winkCustomizer', $this->pluginURL . 'css/customize.css', array(), $this->version ); } } function jsHelper($url) { - $env = ikoCore::environmentURL('js', $this->environmentVal); + $env = winkCore::environmentURL('js', $this->environmentVal); $optimize = array( $env.'/elements.js?ver='.$this->version ); @@ -82,32 +82,32 @@ function jsHelper($url) { } function loadScripts() { if (!empty(get_option($this->clientIdKey, false))) { - $env = ikoCore::environmentURL('js', $this->environmentVal); - wp_enqueue_style('ikoTravel',$env.'/styles.css',array(),$this->version); - wp_enqueue_script('ikoTravel-Elements',$env.'/elements.js',array(),$this->version,true); + $env = winkCore::environmentURL('js', $this->environmentVal); + wp_enqueue_style('wink',$env.'/styles.css',array(),$this->version); + wp_enqueue_script('wink-Elements',$env.'/elements.js',array(),$this->version,true); } } function adminNotice() { if (is_admin() && !get_option($this->clientIdKey, false)) { if ( current_user_can( 'manage_options' ) ) { // let's only show this to admin users echo '
- '.esc_html__('iko.travel logo',$this->namespace).'

'. + '.esc_html__('WINK logo',$this->namespace).'

'. esc_html__('Congratulations', $this->namespace). ' '. - esc_html__('on installing the official iko.travel WordPress plugin.',$this->namespace). - ' '. + esc_html__('on installing the official WINK WordPress plugin.',$this->namespace). + ' '. esc_html__('Click here',$this->namespace). ' '. - esc_html__('to add your iko.travel Client-ID and your Client-Secret',$this->namespace). + esc_html__('to add your WINK Client-ID and your Client-Secret',$this->namespace). '.

'; } } else if (is_admin() && empty(get_option('permalink_structure'))) { echo '
- '.esc_html__('iko.travel logo',$this->namespace).'

'. + '.esc_html__('WINK logo',$this->namespace).'

'. esc_html__('Attention!', $this->namespace). ' '. - esc_html__('the iko.travel plugin requires permalinks. Please disable plain permalinks',$this->namespace). + esc_html__('the WINK plugin requires permalinks. Please disable plain permalinks',$this->namespace). ' '. esc_html__('here',$this->namespace). ' '. @@ -118,7 +118,7 @@ function adminNotice() { } function addSettings( $wp_customize ) { $shortcodes = array(); - $allShortcodes = apply_filters( 'ikoShortcodes', $shortcodes); + $allShortcodes = apply_filters( 'winkShortcodes', $shortcodes); if (!empty($allShortcodes)) { foreach ($allShortcodes as $key => $shortcodeData) { if (!empty($shortcodeData['code'])) { @@ -127,9 +127,9 @@ function addSettings( $wp_customize ) { } } $wp_customize->add_section( $this->section, array( - 'title' => esc_html__( 'iko.travel Settings', $this->namespace ), + 'title' => esc_html__( 'WINK Settings', $this->namespace ), 'priority' => 30, - 'description' => '

'.__('iko.travel logo',$this->namespace).'

'.esc_html__('This plugin connects your site to your iko.travel account. Once you entered your Client-ID, you can start using the iko.travel elements either as a Gutenberg block or via the shortcodes below', $this->namespace ).'
'.implode('
',$shortcodes) + 'description' => '

'.__('WINK logo',$this->namespace).'

'.esc_html__('This plugin connects your site to your WINK account. Once you entered your Client-ID, you can start using the WINK elements either as a Gutenberg block or via the shortcodes below', $this->namespace ).'
'.implode('
',$shortcodes) ) ); @@ -138,7 +138,7 @@ function addSettings( $wp_customize ) { )); $wp_customize->add_control( $this->clientIdKey, array( 'label' => esc_html__( 'Client-ID', $this->namespace ), - 'description' => esc_html__('You can find your iko.travel Client-ID in your iko.travel account. After entering your Client-ID start using iko.travel by adding the iko.Travel Gutenberg blocks to your website.', $this->namespace), + 'description' => esc_html__('You can find your WINK Client-ID in your WINK account. After entering your Client-ID start using WINK by adding the WINK Gutenberg blocks to your website.', $this->namespace), 'section' => $this->section, ) ); @@ -147,7 +147,7 @@ function addSettings( $wp_customize ) { )); $wp_customize->add_control( $this->clientSecretKey, array( 'label' => esc_html__( 'Client-Secret', $this->namespace ), - 'description' => esc_html__('You can find your iko.travel Client-Secret in your iko.travel account. After entering your Client-Secret and your Client-ID start using iko.travel by adding the iko.Travel Gutenberg blocks to your website.', $this->namespace), + 'description' => esc_html__('You can find your WINK Client-Secret in your WINK account. After entering your Client-Secret and your Client-ID start using WINK by adding the WINK Gutenberg blocks to your website.', $this->namespace), 'section' => $this->section, ) ); @@ -158,7 +158,7 @@ function addSettings( $wp_customize ) { $wp_customize->add_control( $this->environment, array( 'type' => 'select', 'label' => esc_html__( 'Environment', $this->namespace ), - 'description' => esc_html__('Switch between environments. Use with caution and only if instructed by the iko.travel team.', $this->namespace), + 'description' => esc_html__('Switch between environments. Use with caution and only if instructed by the WINK team.', $this->namespace), 'section' => $this->section, 'choices' => array( 'production' => esc_html__( 'Live' ), @@ -169,11 +169,11 @@ function addSettings( $wp_customize ) { } - function clearIkoCache() { - delete_option( 'ikoData' ); - delete_option( 'ikodataTime' ); - delete_option( 'ikocontentTime' ); - delete_option( 'ikocontentBearer' ); + function clearwinkCache() { + delete_option( 'winkData' ); + delete_option( 'winkdataTime' ); + delete_option( 'winkcontentTime' ); + delete_option( 'winkcontentBearer' ); } function gutenbergBlockCategory($categories, $post) { @@ -182,64 +182,64 @@ function gutenbergBlockCategory($categories, $post) { array( array( 'slug' => $this->namespace.'-blocks', - 'title' => esc_html__( 'iko.travel Blocks', $this->namespace ), + 'title' => esc_html__( 'WINK Blocks', $this->namespace ), ), ) ); } } -$ikoTravel = new ikoTravel(); +$wink = new wink(); -class ikoCore { +class winkCore { function __construct() { } static function environmentURL($target, $environment) { - // error_log('iko.travel - target: '.$target); - // error_log('iko.travel - environment: '.$environment); + // error_log('WINK - target: '.$target); + // error_log('WINK - environment: '.$environment); $environments = array( 'js' => array( - 'staging' => 'https://staging-elements.iko.travel', + 'staging' => 'https://staging-elements.wink.travel', 'development' => 'https://dev.traveliko.com:8011', - 'production' => 'https://elements.iko.travel' + 'production' => 'https://elements.wink.travel' ), 'json' => array( - 'staging' => 'https://staging-iam.iko.travel', + 'staging' => 'https://staging-iam.wink.travel', 'development' => 'https://dev.traveliko.com:9000', - 'production' => 'https://iam.iko.travel' + 'production' => 'https://iam.wink.travel' ), 'api' => array( - 'staging' => 'https://staging-api.iko.travel', + 'staging' => 'https://staging-api.wink.travel', 'development' => 'https://dev.traveliko.com:8443', - 'production' => 'https://api.iko.travel' + 'production' => 'https://api.wink.travel' ) ); return $environments[$target][$environment]; } } -if (!empty(get_option('ikoTravelClientId', false))) { - require_once('includes/elementHandler.php'); // Handles all iko.travel Elements (Only load it if the client id is present) +if (!empty(get_option('winkClientId', false))) { + require_once('includes/elementHandler.php'); // Handles all WINK Elements (Only load it if the client id is present) } // make silent-refresh.html accessible on all sites using rewrite rules -function ikoAddRewriteRules() { +function winkAddRewriteRules() { $page_slug = 'products'; // slug of the page you want to be shown to - $param = 'ikosilent'; // param name you want to handle on the page - add_rewrite_tag('%ikosilent%', '([^&]+)', 'ikosilent='); - add_rewrite_rule('silent-refresh\.html?([^/]*)', 'index.php?ikosilent=true', 'top'); + $param = 'winksilent'; // param name you want to handle on the page + add_rewrite_tag('%winksilent%', '([^&]+)', 'winksilent='); + add_rewrite_rule('silent-refresh\.html?([^/]*)', 'index.php?winksilent=true', 'top'); } -function ikoAddQueryVars($vars) { - $vars[] = 'ikosilent'; // param name you want to handle on the page +function winkAddQueryVars($vars) { + $vars[] = 'winksilent'; // param name you want to handle on the page return $vars; } -add_filter('query_vars', 'ikoAddQueryVars'); +add_filter('query_vars', 'winkAddQueryVars'); -function ikoRenderSilentRefresh( $atts ){ - $do = get_query_var( 'ikosilent' ); +function winkRenderSilentRefresh( $atts ){ + $do = get_query_var( 'winksilent' ); if ( !empty($do) ) { header('Content-type: text/html'); //$dir = plugin_dir_path( __FILE__ ); @@ -249,12 +249,12 @@ function ikoRenderSilentRefresh( $atts ){ die(); } } -add_action( 'parse_query', 'ikoRenderSilentRefresh' ); +add_action( 'parse_query', 'winkRenderSilentRefresh' ); -register_activation_hook( __FILE__, 'ikoActivationRewrite' ); -add_action( 'init' , 'ikoAddRewriteRules', 10, 2 ); +register_activation_hook( __FILE__, 'winkActivationRewrite' ); +add_action( 'init' , 'winkAddRewriteRules', 10, 2 ); -function ikoActivationRewrite() { - ikoAddRewriteRules(); +function winkActivationRewrite() { + winkAddRewriteRules(); flush_rewrite_rules(); } \ No newline at end of file