Instant Images – One Click Unsplash Uploads - Version 4.4.0

Version Description

  • March 26, 2021 =
  • UPDATE - Massive improvement to image download speeds by dynamically resizing the initial download before sending image to media library.
    • Intitial testing revealed up to 4x faster download speeds than previous version of Instant Images .
  • NEW - Added instant_images_after_upload hook that is dispatch after a successful upload allowing users to hook into the attachment and run custom functionality.
  • UPDATE - Upgraded Axios JS libray to 0.21.1.
Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 Instant Images – One Click Unsplash Uploads
Version 4.4.0
Comparing to
See all releases

Code changes from version 4.3.2 to 4.4.0

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
- Tested up to: 5.4.2
7
- Stable tag: 4.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -30,6 +30,7 @@ The perfect tool for users who want to save time and frustration by uploading im
30
  - **Theme/Plugin Developers** - A great tool for developers who want to prototype and develop using real world imagery.
31
  - **Gutenberg** - Instant Images directly integrates with Gutenberg as a plugin sidebar.
32
  - **Media Modal** - Instant Images is available as a tab in the WordPress Media Modal.
 
33
  - **Edit Image Metadata** - Easily edit image filename, alt text and caption prior to uploading to your media library.
34
  - **Accessibility** - Automatically include a relevant alt description for screen readers, visually reduced users, and SEO.
35
  - **Easy to Use** - It couldn't get much more simple, just click an image and it's automatically uploaded to your media library for use on your site.
@@ -120,21 +121,43 @@ How to install Instant Images.
120
  3. Image Metadata - Easily edit image filename, alt text and caption prior to uploading to your media library.
121
  4. Post/Page Edit - Unsplash images in a lightbox on your post edit/new/post pages.
122
  5. Gutenberg post edit screens. Add as featured image, insert into post or just upload photo.
 
123
 
124
  == Changelog ==
125
 
126
- = 4.3.2 - May 28, 2020 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
 
128
  - UPDATE - Switched REST API methods to `POST` requests from `PUT`. This will hopefully reduce issues users are having with `PUT` being disabled on their servers.
129
  - UPDATE - Added Instant Images media button back to Classic Editor post screen.
130
 
131
- = 4.3.1 - April 13, 2020 =
132
 
 
133
  - FIX - Fixed issue with Instant Images causing Yoast SEO metabox to not show correctly in the classic WordPress editor. Not really sure why, but the Instant Images JS dependencies seemed to interfere with Yoast.
134
  - FIX - Added user privileges checks to the new Media Modal functionality.
135
 
136
- = 4.3.0 - April 9, 2020 =
137
 
 
138
  - NEW - Adding `Instant Images` tab to the WordPress Media Modal.
139
  - NEW - When images are uploaded directly to a post the current Post ID is attached to the upload as the parent post.
140
  - NEW - Adding default alt text directly from Unsplash API.
@@ -142,24 +165,24 @@ How to install Instant Images.
142
  - UPDATE - Switching tab navigation from `<a/> to`<button/>` for better accessibility.
143
  - FIX - Added a fix for JS error regarding `PluginSidebar` registration on non-gutenberg editor pages.
144
 
145
- = 4.2.0 - December 14, 2019 =
146
 
 
147
  - NEW - Added image orientation search filter
148
  - FIX - Fixed issue with instant images being rendered in Gutenberg editor for users without permissions.
149
  - UPDATE - Updated WordPress role requirement from `edit_theme_options` to [`upload_files`](https://wordpress.org/support/article/roles-and-capabilities/#upload_files).
150
 
151
- = 4.1.0 - July 23, 2019 =
152
 
 
153
  - NEW - Added support for updating image title prior to upload.
154
  - NEW - Added link to edit image after upload process completes.
155
  - UPDATE - Updated functionality to trigger photo upload immediately after triggering a `Save` when editing image metadata.
156
 
157
- = 4.0.1 - April 18, 2019 =
158
 
 
159
  - FIX - Fixed issue where Instant Images sidebar plugin would not appear in Gutenberg if removed as a pinned item.
160
 
161
- = 4.0.0 - February 12, 2019 =
162
 
 
163
  - 4.0 adds Gutenberg support. You can now access instant images directly from inside the block editor.
164
  - NEW - Added Instant Images to Gutenberg as a Plugin Sidebar.
165
  - NEW - Added Gutenberg featured image support.
@@ -169,57 +192,10 @@ How to install Instant Images.
169
  - UPDATE - Updated REST API methods to prefix function names.
170
  - UPDATE - Various other UI/UX enhancements.
171
 
172
- = 3.3.0 - January 10, 2019 =
173
-
174
- - UPDATE - Removed cURL usage for downloading images in place of core `copy()` PHP function.
175
- - NEW - Adding Axios for HTTP requests
176
- - NEW - Removing `/instant-images` folder in uploads directory on plugin de-activation.
177
- - FIX - Added fix for directory permission issue when creating `uploads/instant-images`.
178
-
179
- = 3.2.1 - September 25, 2018 =
180
-
181
- - NEW - Added Instant Images to media upload tabs. You can now upload a photo and insert it into a page or page immediately. Please note, this is currently not working with the Gutenberg editor.
182
- - UPDATE - Better cURL error handling (hopefully).
183
-
184
- = 3.2 - July 31, 2018
185
- ** NEW - Added functionality to edit image details (filename, alt text and caption) prior to uploading - edit image detail by clicking the options icon in the top right corner of each image 👍.
186
- ** UPDATE - Improved error handling and messaging for common REST API and cURL issues.
187
-
188
- = 3.1.1 - June 15, 2018 =
189
- ** NEW - More stable image uploading 🎉.
190
- ** NEW - Added `instant_images_user_role` filter to allow for control over user capability.
191
- ** FIX - Fixing permission issues with uploads when using basic HTTP authentication on domain.
192
- ** UPDATE - Better error handling
193
- \*\* UPDATE - Added permission 755 to the uploads/instant-images directory created on activation.
194
-
195
- = 3.1 - January 2, 2018 =
196
- ** NEW - Adding support for searching individual photos by ID. Prefix a search term with `id:` to search by Unsplash ID. e.g. `id:ixddk_CepZY`.
197
- ** UPDATED - Updated to meet revised Unsplash API guidelines.
198
- ** UPDATED - Better Error messaging for upload/resize errors.
199
- ** NEW - Added `clear search` button to remove search results.
200
- \*\* FIX - Fixed JS error that occurred when `SCRIPT_DEBUG` was set to `true`.
201
-
202
  = 3.0 - September 21, 2017 =
203
- \*\* NEW - Instant Images has been completely re-built using React and the WordPress REST API.
204
-
205
- = 2.1.1 - June 6, 2017 =
206
- ** NEW - Added infinite scroll while viewing Instant Images on large screens.
207
- ** FIX - Fixed missing js file error in browser console.
208
- \*\* UPDATE - Updated Masonry/Imagesloaded image load functionality.
209
-
210
- = 2.1 - May 12, 2017 =
211
- ** UPDATE - Remove App ID setting - Unsplash API is now open for everyone without API limit restrictions.
212
- ** UPDATE - Updating default image upload from 'Full' to 'Raw'. Raw files are significantly smaller size and should make uploads quicker on slower connections and help to reduce upload errors.
213
- ** UPDATE - UI/UX tweaks and updates.
214
- ** FIX - Updating media_buttons hook. Was causing issues with other plugins.
215
-
216
- = 2.0.1 - January 12, 2017 =
217
-
218
- - FIX - Update to `instant_img_resize_image` function to remove unnecessary function arguments. These args were causing issues on some servers.
219
- - NEW - Refresh Media Library content when uploading images through the Instant Images uploader on edit screen for posts and pages.
220
- - UI Enhancements
221
 
222
- = 2.0 =
223
 
224
  - Initial Commit
225
  - Updating plugin from UnsplashWP to Instant Images
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
+ Tested up to: 5.7
7
+ Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
30
  - **Theme/Plugin Developers** - A great tool for developers who want to prototype and develop using real world imagery.
31
  - **Gutenberg** - Instant Images directly integrates with Gutenberg as a plugin sidebar.
32
  - **Media Modal** - Instant Images is available as a tab in the WordPress Media Modal.
33
+ - **Page Builders** - Instant Images integrates with page builders such as Elementor, Beaver Builder, Brizy and Divi.
34
  - **Edit Image Metadata** - Easily edit image filename, alt text and caption prior to uploading to your media library.
35
  - **Accessibility** - Automatically include a relevant alt description for screen readers, visually reduced users, and SEO.
36
  - **Easy to Use** - It couldn't get much more simple, just click an image and it's automatically uploaded to your media library for use on your site.
121
  3. Image Metadata - Easily edit image filename, alt text and caption prior to uploading to your media library.
122
  4. Post/Page Edit - Unsplash images in a lightbox on your post edit/new/post pages.
123
  5. Gutenberg post edit screens. Add as featured image, insert into post or just upload photo.
124
+ 6. Instant Images is available in the WordPress media modal as a custom tab. It is available in front end page builder like Elementor, Beaver Builder and Divi.
125
 
126
  == Changelog ==
127
 
128
+ = 4.4.0 - March 26, 2021 =
129
+ * UPDATE - 🎉 Massive improvement to image download speeds by [dynamically resizing](https://unsplash.com/documentation#dynamically-resizable-images) the initial download before sending image to media library.
130
+ * Intitial testing revealed up to 4x faster download speeds than previous version of Instant Images 🤯.
131
+ * NEW - Added `instant_images_after_upload` hook that is dispatch after a successful upload allowing users to hook into the attachment and run custom functionality.
132
+ * UPDATE - Upgraded Axios JS libray to `0.21.1`.
133
+
134
+
135
+ = 4.3.5 - August 14, 2020 =
136
+ * FIX - Fixed issue with WP 5.5 and REST API warning messages when `WP_DEBUG` is `true`.
137
+ * FIX - Fixed issue with undefined `$suffix` variable when `WP_DEBUG` is `true`.
138
+
139
+
140
+ = 4.3.4 - August 11, 2020 =
141
+ * FIX - Fixed issue with Yoast SEO meta boxes not appearing in Classic Editor.
142
+ * UPDATE - Code cleanup and some refactoring of media enqueue scripts.
143
+
144
+
145
+ = 4.3.3 - August 10, 2020 =
146
+ * NEW - Adding Instant Images tab to Media Modal windows everywhere, including page builders and taxonomy terms pages.
147
+ * NEW - Added new plugin setting to hide the Instant Images tab in the Media Modals
148
+
149
 
150
+ = 4.3.2 - May 28, 2020 =
151
  - UPDATE - Switched REST API methods to `POST` requests from `PUT`. This will hopefully reduce issues users are having with `PUT` being disabled on their servers.
152
  - UPDATE - Added Instant Images media button back to Classic Editor post screen.
153
 
 
154
 
155
+ = 4.3.1 - April 13, 2020 =
156
  - FIX - Fixed issue with Instant Images causing Yoast SEO metabox to not show correctly in the classic WordPress editor. Not really sure why, but the Instant Images JS dependencies seemed to interfere with Yoast.
157
  - FIX - Added user privileges checks to the new Media Modal functionality.
158
 
 
159
 
160
+ = 4.3.0 - April 9, 2020 =
161
  - NEW - Adding `Instant Images` tab to the WordPress Media Modal.
162
  - NEW - When images are uploaded directly to a post the current Post ID is attached to the upload as the parent post.
163
  - NEW - Adding default alt text directly from Unsplash API.
165
  - UPDATE - Switching tab navigation from `<a/> to`<button/>` for better accessibility.
166
  - FIX - Added a fix for JS error regarding `PluginSidebar` registration on non-gutenberg editor pages.
167
 
 
168
 
169
+ = 4.2.0 - December 14, 2019 =
170
  - NEW - Added image orientation search filter
171
  - FIX - Fixed issue with instant images being rendered in Gutenberg editor for users without permissions.
172
  - UPDATE - Updated WordPress role requirement from `edit_theme_options` to [`upload_files`](https://wordpress.org/support/article/roles-and-capabilities/#upload_files).
173
 
 
174
 
175
+ = 4.1.0 - July 23, 2019 =
176
  - NEW - Added support for updating image title prior to upload.
177
  - NEW - Added link to edit image after upload process completes.
178
  - UPDATE - Updated functionality to trigger photo upload immediately after triggering a `Save` when editing image metadata.
179
 
 
180
 
181
+ = 4.0.1 - April 18, 2019 =
182
  - FIX - Fixed issue where Instant Images sidebar plugin would not appear in Gutenberg if removed as a pinned item.
183
 
 
184
 
185
+ = 4.0.0 - February 12, 2019 =
186
  - 4.0 adds Gutenberg support. You can now access instant images directly from inside the block editor.
187
  - NEW - Added Instant Images to Gutenberg as a Plugin Sidebar.
188
  - NEW - Added Gutenberg featured image support.
192
  - UPDATE - Updated REST API methods to prefix function names.
193
  - UPDATE - Various other UI/UX enhancements.
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  = 3.0 - September 21, 2017 =
196
+ ** NEW - Instant Images has been completely re-built using React and the WordPress REST API.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
198
+ = 2.0 - January 12, 2017 =
199
 
200
  - Initial Commit
201
  - Updating plugin from UnsplashWP to Instant Images
admin/admin.php CHANGED
@@ -3,13 +3,10 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
 
5
  /**
6
- * instant_img_admin_menu
7
- * Create admin menu item under 'Media'
8
- *
9
- * @since 2.0
10
- */
11
-
12
- function instant_img_admin_menu() {
13
  $usplash_settings_page = add_submenu_page(
14
  'upload.php',
15
  INSTANT_IMG_TITLE,
@@ -20,80 +17,43 @@ function instant_img_admin_menu() {
20
  );
21
  add_action( 'load-' . $usplash_settings_page, 'instant_img_load_scripts' ); //Add our admin scripts
22
  }
23
- add_action( 'admin_menu', 'instant_img_admin_menu' );
24
-
25
 
26
 
27
  /**
28
- * instant_img_post_enqueue_scripts
29
- * Classic Editor Only - Add Instant Images scripts to post edit screens
30
- *
31
- * @since 4.3
32
- */
33
- function instant_img_post_enqueue_scripts($hook) {
34
-
35
- // Confirm User Privileges
36
- if (!current_user_can( apply_filters('instant_images_user_role', 'upload_files') )){
37
- return false;
38
- }
39
-
40
- // Exit if not post or edit screen
41
- if ( $hook !== 'post-new.php' && $hook !== 'post.php' ) {
42
- return false;
43
- }
44
-
45
- $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
46
-
47
- // CSS
48
- wp_enqueue_style( 'admin-instant-images', INSTANT_IMG_URL. 'dist/css/instant-images'. $suffix .'.css', '', INSTANT_IMAGES_VERSION );
49
-
50
- // JS
51
- wp_enqueue_script(
52
- 'instant-images-media-router',
53
- INSTANT_IMG_URL. 'dist/js/instant-images-media'. $suffix .'.js',
54
- array( 'jquery'),
55
- INSTANT_IMAGES_VERSION,
56
- true
57
- );
58
- InstantImages::instant_img_localize( 'instant-images-media-router' );
59
-
60
  }
61
- add_action( 'admin_enqueue_scripts', 'instant_img_post_enqueue_scripts' );
62
-
63
 
64
 
65
  /**
66
- * instant_img_load_scripts
67
- * Load Admin CSS and JS
68
- *
69
- * @since 1.0
70
- */
71
-
72
  function instant_img_load_scripts(){
73
  add_action( 'admin_enqueue_scripts', 'instant_img_enqueue_scripts' );
74
  }
75
 
76
 
77
-
78
  /**
79
- * instant_img_enqueue_scripts
80
- * Admin Enqueue Scripts
81
- *
82
- * @since 2.0
83
- */
84
-
85
  function instant_img_enqueue_scripts(){
86
  instant_img_scripts();
87
  }
88
 
89
 
90
-
91
  /**
92
- * instant_img_scripts
93
- * Localize vars and scripts
94
- *
95
- * @since 3.0
96
- */
97
  function instant_img_scripts(){
98
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
99
 
@@ -104,121 +64,67 @@ function instant_img_scripts(){
104
  wp_enqueue_script('instant-images-react', INSTANT_IMG_URL. 'dist/js/instant-images'. $suffix .'.js', '', INSTANT_IMAGES_VERSION, true);
105
  wp_enqueue_script('instant-images', INSTANT_IMG_ADMIN_URL. 'assets/js/admin.js', 'jquery', INSTANT_IMAGES_VERSION, true);
106
 
107
- InstantImages::instant_img_localize();
108
 
109
  }
 
 
110
  /**
111
- * instant_img_show_tabs
112
- * Show tab to upload image on post edit screens
113
- *
114
- * @return $show_tab boolean
115
- * @since 3.2.1
116
- */
117
- function instant_img_show_tabs() {
118
- $options = get_option( 'instant_img_settings' );
119
- $show_tab = true;
120
- if(isset($options['instant_img_btn_display'])){
121
- if($options['instant_img_btn_display'] == 1){
122
- $show_tab = false; // Hide the tab
123
- }
124
- }
125
-
126
- return $show_tab;
127
- }
128
-
129
-
130
-
131
- /**
132
- * instant_img_media_upload_tabs_handler
133
- * Add tab to media upload window
134
- *
135
- * @since 3.2.1
136
- */
137
- function instant_img_media_upload_tabs_handler($tabs) {
138
- $options = get_option( 'instant_img_settings' );
139
- $show_tab = instant_img_show_tabs();
140
-
141
- if($show_tab){
142
- $newtab = array ( 'instant_img_tab' => __('Instant Images', 'instant-images') );
143
  $tabs = array_merge( $tabs, $newtab );
144
- return $tabs;
145
  }
146
  }
147
  add_filter('media_upload_tabs', 'instant_img_media_upload_tabs_handler');
148
 
149
 
150
-
151
  /**
152
- * instant_img_media_buttons_context_handler
153
- * Add pop up content to edit, new and post pages
154
- *
155
- * @since 3.2.1
156
- */
157
- function instant_img_media_buttons() {
158
- $show_tab = instant_img_show_tabs();
159
- if($show_tab){
160
- echo '<a href="'.add_query_arg('tab', 'instant_img_tab', esc_url(get_upload_iframe_src())).'" class="thickbox button" title="'.esc_attr__('Instant Images', 'instant-images').'">&nbsp;'. __('Instant Images', 'instant-images') .'&nbsp;</a>';
161
  }
162
  }
163
  add_filter('media_buttons', 'instant_img_media_buttons');
164
 
165
 
166
-
167
  /**
168
- * media_upload_instant_images_handler
169
- * Add instant images to the iframe
170
- *
171
- * @since 3.2.1
172
  */
173
  function media_upload_instant_images_handler() {
174
- wp_iframe('media_instant_img_tab');
175
  }
176
  add_action('media_upload_instant_img_tab', 'media_upload_instant_images_handler');
177
 
178
 
179
-
180
  /**
181
- * media_instant_img_popup_content
182
- * Add pop up content to edit, new and post pages
183
- *
184
- * @since 2.0
185
- */
186
  function media_instant_img_tab() {
187
- //media_upload_header();
188
  instant_img_scripts();
189
  $show_settings = false;
190
- ?>
191
  <div class="instant-img-container editor" data-media-popup="true">
192
- <?php include( INSTANT_IMG_PATH . 'admin/views/unsplash.php'); ?>
193
  </div>
194
  <?php
195
  }
196
 
197
-
198
-
199
- /*
200
- * instant_img_settings_page
201
- * Settings page
202
- *
203
- * @since 2.0
204
- */
205
-
206
- function instant_img_settings_page(){
207
- $show_settings = true;
208
- echo '<div class="instant-img-container" data-media-popup="false">';
209
- include( INSTANT_IMG_PATH . 'admin/views/unsplash.php');
210
- echo '</div>';
211
- }
212
-
213
-
214
-
215
- /*
216
- * instant_img_filter_admin_footer_text
217
- * Filter the WP Admin footer text
218
- *
219
- * @since 2.0
220
- */
221
-
222
  function instant_img_filter_admin_footer_text( $text ) {
223
  $screen = get_current_screen();
224
  $base = 'media_page_'.INSTANT_IMG_NAME;
@@ -227,4 +133,3 @@ function instant_img_filter_admin_footer_text( $text ) {
227
  }
228
  }
229
  add_filter( 'admin_footer_text', 'instant_img_filter_admin_footer_text'); // Admin menu text
230
-
3
 
4
 
5
  /**
6
+ * Create admin menu item under 'Media'
7
+ * @since 2.0
8
+ */
9
+ function instant_img_create_page() {
 
 
 
10
  $usplash_settings_page = add_submenu_page(
11
  'upload.php',
12
  INSTANT_IMG_TITLE,
17
  );
18
  add_action( 'load-' . $usplash_settings_page, 'instant_img_load_scripts' ); //Add our admin scripts
19
  }
20
+ add_action( 'admin_menu', 'instant_img_create_page' );
 
21
 
22
 
23
  /**
24
+ * Settings page callback
25
+ * @since 2.0
26
+ */
27
+ function instant_img_settings_page(){
28
+ $show_settings = true;
29
+ echo '<div class="instant-img-container" data-media-popup="false">';
30
+ include( INSTANT_IMG_PATH . 'admin/views/unsplash.php');
31
+ echo '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
 
 
33
 
34
 
35
  /**
36
+ * Load Admin CSS and JS
37
+ * @since 1.0
38
+ */
 
 
 
39
  function instant_img_load_scripts(){
40
  add_action( 'admin_enqueue_scripts', 'instant_img_enqueue_scripts' );
41
  }
42
 
43
 
 
44
  /**
45
+ * Admin Enqueue Scripts
46
+ * @since 2.0
47
+ */
 
 
 
48
  function instant_img_enqueue_scripts(){
49
  instant_img_scripts();
50
  }
51
 
52
 
 
53
  /**
54
+ * Localize vars and scripts
55
+ * @since 3.0
56
+ */
 
 
57
  function instant_img_scripts(){
58
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
59
 
64
  wp_enqueue_script('instant-images-react', INSTANT_IMG_URL. 'dist/js/instant-images'. $suffix .'.js', '', INSTANT_IMAGES_VERSION, true);
65
  wp_enqueue_script('instant-images', INSTANT_IMG_ADMIN_URL. 'assets/js/admin.js', 'jquery', INSTANT_IMAGES_VERSION, true);
66
 
67
+ InstantImages::instant_img_localize();
68
 
69
  }
70
+
71
+
72
  /**
73
+ * Add tab to media upload window (left hand sidebar)
74
+ * @since 3.2.1
75
+ */
76
+ function instant_img_media_upload_tabs_handler($tabs) {
77
+ $show_media_tab = InstantImages::instant_img_show_tab('media_modal_display');
78
+ if($show_media_tab){
79
+ $newtab = array ( 'instant_img_tab' => __('Instant Images', 'instant-images') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  $tabs = array_merge( $tabs, $newtab );
81
+ return $tabs;
82
  }
83
  }
84
  add_filter('media_upload_tabs', 'instant_img_media_upload_tabs_handler');
85
 
86
 
 
87
  /**
88
+ * Add Instant Images media button to classic editor screens
89
+ * @since 3.2.1
90
+ */
91
+ function instant_img_media_buttons() {
92
+ $show_button = InstantImages::instant_img_show_tab('media_modal_display');
93
+ if($show_button){
94
+ echo '<a href="'.add_query_arg('tab', 'instant_img_tab', esc_url(get_upload_iframe_src())).'" class="thickbox button" title="'.esc_attr__('Instant Images', 'instant-images').'">&nbsp;'. __('Instant Images', 'instant-images') .'&nbsp;</a>';
 
 
95
  }
96
  }
97
  add_filter('media_buttons', 'instant_img_media_buttons');
98
 
99
 
 
100
  /**
101
+ * Add instant images iframe to classic editor screens
102
+ * @since 3.2.1
 
 
103
  */
104
  function media_upload_instant_images_handler() {
105
+ wp_iframe('media_instant_img_tab');
106
  }
107
  add_action('media_upload_instant_img_tab', 'media_upload_instant_images_handler');
108
 
109
 
 
110
  /**
111
+ * Add pop up content to edit, new and post pages on classic editor screens
112
+ * @since 2.0
113
+ */
 
 
114
  function media_instant_img_tab() {
 
115
  instant_img_scripts();
116
  $show_settings = false;
117
+ ?>
118
  <div class="instant-img-container editor" data-media-popup="true">
119
+ <?php include( INSTANT_IMG_PATH . 'admin/views/unsplash.php'); ?>
120
  </div>
121
  <?php
122
  }
123
 
124
+ /**
125
+ * Filter the WP Admin footer text
126
+ * @since 2.0
127
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  function instant_img_filter_admin_footer_text( $text ) {
129
  $screen = get_current_screen();
130
  $base = 'media_page_'.INSTANT_IMG_NAME;
133
  }
134
  }
135
  add_filter( 'admin_footer_text', 'instant_img_filter_admin_footer_text'); // Admin menu text
 
admin/includes/settings.php CHANGED
@@ -1,13 +1,10 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
- /*
5
- * instant_img_admin_init
6
- * Initiate the plugin, create our setting variables.
7
- *
8
- * @since 2.0
9
- */
10
-
11
  add_action( 'admin_init', 'instant_img_admin_init');
12
  function instant_img_admin_init(){
13
  register_setting(
@@ -18,7 +15,7 @@ function instant_img_admin_init(){
18
 
19
  add_settings_section(
20
  'unsplash_general_settings',
21
- __('Unsplash Settings', 'instant-images'),
22
  'unsplash_general_settings_callback',
23
  'instant-images'
24
  );
@@ -42,49 +39,37 @@ function instant_img_admin_init(){
42
  );
43
 
44
  // Button Display
45
- add_settings_field(
46
- 'instant_img_btn_display',
47
- __('Button', 'instant-images' ),
48
- 'instant_images_button_display_callback',
49
  'instant-images',
50
  'unsplash_general_settings'
51
  );
52
-
53
- }
54
-
55
 
 
56
 
57
- /*
58
- * unsplash_general_settings_callback
59
- * Some general settings text
60
- *
61
- * @since 1.0
62
- */
63
-
64
  function unsplash_general_settings_callback() {
65
- echo '<p class="desc">' . __('Manage your media upload settings', 'instant-images') . '.</p>';
66
  }
67
 
68
 
69
- /*
70
- * unsplash_sanitize
71
- * Sanitize our form fields
72
- *
73
- * @since 1.0
74
- */
75
-
76
  function unsplash_sanitize( $input ) {
77
  return $input;
78
  }
79
 
80
-
81
- /*
82
- * unsplash_download_w_callback
83
- * Max File download width
84
- *
85
- * @since 1.0
86
- */
87
-
88
  function unsplash_download_w_callback(){
89
  $options = get_option( 'instant_img_settings' );
90
 
@@ -95,15 +80,10 @@ function unsplash_download_w_callback(){
95
  echo '<input type="number" id="instant_img_settings[unsplash_download_w]" name="instant_img_settings[unsplash_download_w]" value="'.$options['unsplash_download_w'].'" class="sm" step="20" max="3200" /> ';
96
  }
97
 
98
-
99
-
100
- /*
101
- * unsplash_download_h_callback
102
- * Max File download height
103
- *
104
- * @since 1.0
105
- */
106
-
107
  function unsplash_download_h_callback(){
108
  $options = get_option( 'instant_img_settings' );
109
 
@@ -114,25 +94,22 @@ function unsplash_download_h_callback(){
114
  echo '<input type="number" id="instant_img_settings[unsplash_download_h]" name="instant_img_settings[unsplash_download_h]" value="'.$options['unsplash_download_h'].'" class="sm" step="20" max="3200" /> ';
115
  }
116
 
117
- /*
118
- * instant_images_button_display_callback
119
- * Show the Instant Images button in media context
120
- *
121
- * @since 3.2.1
122
- */
123
-
124
- function instant_images_button_display_callback(){
125
  $options = get_option( 'instant_img_settings' );
126
- if(!isset($options['instant_img_btn_display']))
127
- $options['instant_img_btn_display'] = '0';
128
-
129
  $style = 'style="position: absolute; left: 0; top: 9px;"'; // CSS style
130
-
131
- $html = '<label style="cursor: default;"><strong>'.__('Button:', 'instant-images').'</strong></label>';
132
- $html .= '<label for="instant_img_btn_display" style="padding-left: 24px; position: relative;">';
133
- $html .= '<input type="hidden" name="instant_img_settings[instant_img_btn_display]" value="0" />';
134
- $html .= '<input '. $style .' type="checkbox" name="instant_img_settings[instant_img_btn_display]" id="instant_img_btn_display" value="1"'. (($options['instant_img_btn_display']) ? ' checked="checked"' : '') .' />';
135
- $html .= __('Hide Instant Images button next to "Add Media" on classic editor screens.', 'instant-images');
136
  $html .= '</label>';
137
 
138
  echo $html;
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
+ /**
5
+ * Initiate the plugin setting, create settings variables.
6
+ * @since 2.0
7
+ */
 
 
 
8
  add_action( 'admin_init', 'instant_img_admin_init');
9
  function instant_img_admin_init(){
10
  register_setting(
15
 
16
  add_settings_section(
17
  'unsplash_general_settings',
18
+ __('Global Settings', 'instant-images'),
19
  'unsplash_general_settings_callback',
20
  'instant-images'
21
  );
39
  );
40
 
41
  // Button Display
42
+ add_settings_field(
43
+ 'media_modal_display',
44
+ __('Media Tab', 'instant-images' ),
45
+ 'instant_images_tab_display_callback',
46
  'instant-images',
47
  'unsplash_general_settings'
48
  );
 
 
 
49
 
50
+ }
51
 
52
+ /**
53
+ * Some general settings text
54
+ * @since 1.0
55
+ */
 
 
 
56
  function unsplash_general_settings_callback() {
57
+ echo '<p class="desc">' . __('Manage your media upload settings.', 'instant-images') . '</p>';
58
  }
59
 
60
 
61
+ /**
62
+ * Sanitize form fields
63
+ * @since 1.0
64
+ */
 
 
 
65
  function unsplash_sanitize( $input ) {
66
  return $input;
67
  }
68
 
69
+ /**
70
+ * Max File download width
71
+ * @since 1.0
72
+ */
 
 
 
 
73
  function unsplash_download_w_callback(){
74
  $options = get_option( 'instant_img_settings' );
75
 
80
  echo '<input type="number" id="instant_img_settings[unsplash_download_w]" name="instant_img_settings[unsplash_download_w]" value="'.$options['unsplash_download_w'].'" class="sm" step="20" max="3200" /> ';
81
  }
82
 
83
+ /**
84
+ * Max File download height
85
+ * @since 1.0
86
+ */
 
 
 
 
 
87
  function unsplash_download_h_callback(){
88
  $options = get_option( 'instant_img_settings' );
89
 
94
  echo '<input type="number" id="instant_img_settings[unsplash_download_h]" name="instant_img_settings[unsplash_download_h]" value="'.$options['unsplash_download_h'].'" class="sm" step="20" max="3200" /> ';
95
  }
96
 
97
+ /**
98
+ * Show the Instant Images Tab in Media Modal
99
+ * @since 3.2.1
100
+ */
101
+ function instant_images_tab_display_callback(){
 
 
 
102
  $options = get_option( 'instant_img_settings' );
103
+ if(!isset($options['media_modal_display']))
104
+ $options['media_modal_display'] = '0';
105
+
106
  $style = 'style="position: absolute; left: 0; top: 9px;"'; // CSS style
107
+
108
+ $html = '<label style="cursor: default;"><strong>'.__('Media Modal:', 'instant-images').'</strong></label>';
109
+ $html .= '<label for="media_modal_display" style="padding-left: 24px; position: relative;">';
110
+ $html .= '<input type="hidden" name="instant_img_settings[media_modal_display]" value="0" />';
111
+ $html .= '<input '. $style .' type="checkbox" name="instant_img_settings[media_modal_display]" id="media_modal_display" value="1"'. (($options['media_modal_display']) ? ' checked="checked"' : '') .' />';
112
+ $html .= __('Hide the <b>Instant Images</b> tab in admin Media Modal windows.', 'instant-images');
113
  $html .= '</label>';
114
 
115
  echo $html;
admin/includes/unsplash-settings.php CHANGED
@@ -1,15 +1,15 @@
1
  <section class="instant-images-settings">
2
-
3
  <div class="cnkt-sidebar">
4
 
5
  <section class="cta ii-settings">
6
- <h2><?php _e('Unsplash Settings', 'instant-images'); ?></h2>
7
  <p><?php _e('Manage your media upload settings', 'instant-images'); ?>.</p>
8
  <div class="cta-wrap">
9
  <form action="options.php" method="post" id="unsplash-form-options">
10
  <?php
11
  settings_fields( 'instant-img-setting-group' );
12
- do_settings_sections( 'instant-images' );
13
  $options = get_option( 'instant_img_settings' ); //get the older values, wont work the first time
14
  ?>
15
  <div class="save-settings">
@@ -23,18 +23,17 @@
23
  <h2 class="w-border"><?php _e('What\'s New', 'instant-images'); ?></h2>
24
  <p><?php _e('The latest Instant Images updates', 'instant-images'); ?>.</p>
25
  <div class="cta-wrap">
26
- <h4><span>4.3</span></h4>
27
  <ul class="whats-new">
28
- <li>Instant Images tab added to the WordPress Media Modal.</li>
29
- <li>Gutenberg Support - Instant Images directly integrates with Gutenberg as a plugin sidebar.</li>
30
- <li>Added `instant_images_user_role` filter to allow for control over user capability.</li>
31
- <li>Updated to meet revised <a href="https://medium.com/unsplash/unsplash-api-guidelines-28e0216e6daa" target="_blank">Unsplash API guidelines</a>.</li>
32
- <li>Adding support for searching individual photos by Unsplash ID - searching <pre>id:{photo_id}</pre> will return a single result.<br/>e.g. <pre>id:YiUi00uqKk8</pre></li>
33
  </ul>
34
  </div>
35
  </section>
36
-
37
- <?php
38
  $plugin_array = array(
39
  array(
40
  'slug' => 'ajax-load-more',
@@ -49,19 +48,19 @@
49
  'slug' => 'velocity',
50
  )
51
  );
52
- ?>
53
  <section class="cta ii-plugins">
54
  <h2><?php _e('Our Plugins', 'instant-images'); ?></h2>
55
  <p><strong>Instant Images</strong> is made with <span style="color: #e25555;">♥</span> by <a target="blank" href="https://connekthq.com/?utm_source=WPAdmin&utm_medium=InstantImages&utm_campaign=OurPlugins">Connekt</a></p>
56
  <div class="cta-wrap">
57
- <?php
58
  if(class_exists('Connekt_Plugin_Installer')){
59
  Connekt_Plugin_Installer::init($plugin_array);
60
  }
61
  ?>
62
  </div>
63
  </section>
64
-
65
  </div>
66
 
67
- </section>
1
  <section class="instant-images-settings">
2
+
3
  <div class="cnkt-sidebar">
4
 
5
  <section class="cta ii-settings">
6
+ <h2><?php _e('Global Settings', 'instant-images'); ?></h2>
7
  <p><?php _e('Manage your media upload settings', 'instant-images'); ?>.</p>
8
  <div class="cta-wrap">
9
  <form action="options.php" method="post" id="unsplash-form-options">
10
  <?php
11
  settings_fields( 'instant-img-setting-group' );
12
+ do_settings_sections( 'instant-images' );
13
  $options = get_option( 'instant_img_settings' ); //get the older values, wont work the first time
14
  ?>
15
  <div class="save-settings">
23
  <h2 class="w-border"><?php _e('What\'s New', 'instant-images'); ?></h2>
24
  <p><?php _e('The latest Instant Images updates', 'instant-images'); ?>.</p>
25
  <div class="cta-wrap">
 
26
  <ul class="whats-new">
27
+ <li><strong>Improved Download Speeds</strong>: Instant Images <em>v+</em> is now up to 4x faster than previous versions after a critical update in the initial image fetching process.</li>
28
+ <li><strong>Media Modals</strong>: Instant Images tab added to all WordPress Media Modal windows.</li>
29
+ <li><strong>Gutenberg Support</strong>: Instant Images directly integrates with Gutenberg as a plugin sidebar.</li>
30
+ <li><strong>User Roles</strong>: Added <em>instant_images_user_role</em> filter to allow for control over user capability.</li>
31
+ <li><strong>Image Search</strong>: Added support for searching individual photos by Unsplash ID - searching <pre>id:{photo_id}</pre> will return a single result.<br/>e.g. <pre>id:YiUi00uqKk8</pre></li>
32
  </ul>
33
  </div>
34
  </section>
35
+
36
+ <?php
37
  $plugin_array = array(
38
  array(
39
  'slug' => 'ajax-load-more',
48
  'slug' => 'velocity',
49
  )
50
  );
51
+ ?>
52
  <section class="cta ii-plugins">
53
  <h2><?php _e('Our Plugins', 'instant-images'); ?></h2>
54
  <p><strong>Instant Images</strong> is made with <span style="color: #e25555;">♥</span> by <a target="blank" href="https://connekthq.com/?utm_source=WPAdmin&utm_medium=InstantImages&utm_campaign=OurPlugins">Connekt</a></p>
55
  <div class="cta-wrap">
56
+ <?php
57
  if(class_exists('Connekt_Plugin_Installer')){
58
  Connekt_Plugin_Installer::init($plugin_array);
59
  }
60
  ?>
61
  </div>
62
  </section>
63
+
64
  </div>
65
 
66
+ </section>
admin/views/unsplash.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  ?>
4
-
5
- <?php if($show_settings){ ?>
6
  <header class="header-wrap">
7
  <h1>
8
- <?php echo INSTANT_IMG_TITLE; ?>
9
  <span>
10
- <?php
11
  $tagline = __('One click photo uploads from %s', 'instant-images');
12
  echo sprintf($tagline, '<a href="https://unsplash.com/" target="_blank">unsplash.com</a>');
13
  ?>
@@ -15,14 +15,14 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15
  <button type="button" class="button button-secondary button-large">
16
  <i class="fa fa-cog" aria-hidden="true"></i> <?php _e('Settings', 'instant-images'); ?>
17
  </button>
18
- </header>
19
  <?php } ?>
20
  <?php include( INSTANT_IMG_PATH . 'admin/includes/cta/permissions.php'); ?>
21
- <?php
22
  if($show_settings){
23
- include( INSTANT_IMG_PATH . 'admin/includes/unsplash-settings.php');
24
  }
25
- ?>
26
- <section class="instant-images-wrapper">
27
  <div id="app"></div>
28
- </section>
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  ?>
4
+
5
+ <?php if($show_settings){ ?>
6
  <header class="header-wrap">
7
  <h1>
8
+ <?php echo INSTANT_IMG_TITLE; ?> <em><?php echo INSTANT_IMAGES_VERSION; ?></em>
9
  <span>
10
+ <?php
11
  $tagline = __('One click photo uploads from %s', 'instant-images');
12
  echo sprintf($tagline, '<a href="https://unsplash.com/" target="_blank">unsplash.com</a>');
13
  ?>
15
  <button type="button" class="button button-secondary button-large">
16
  <i class="fa fa-cog" aria-hidden="true"></i> <?php _e('Settings', 'instant-images'); ?>
17
  </button>
18
+ </header>
19
  <?php } ?>
20
  <?php include( INSTANT_IMG_PATH . 'admin/includes/cta/permissions.php'); ?>
21
+ <?php
22
  if($show_settings){
23
+ include( INSTANT_IMG_PATH . 'admin/includes/unsplash-settings.php');
24
  }
25
+ ?>
26
+ <section class="instant-images-wrapper">
27
  <div id="app"></div>
28
+ </section>
api/download.php CHANGED
@@ -1,146 +1,169 @@
1
  <?php
2
-
3
- /*
4
- * rest_api_init
5
- * Custom /resize route
6
- *
7
- * @since 3.0
8
- */
9
 
10
  add_action( 'rest_api_init', function () {
11
- $my_namespace = 'instant-images';
12
- $my_endpoint = '/download';
13
- register_rest_route( $my_namespace, $my_endpoint,
14
- array(
15
- 'methods' => 'POST',
16
- 'callback' => 'instant_images_download',
17
- )
18
- );
 
 
 
 
 
19
  });
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
 
22
 
23
- /*
24
- * resize_image
25
- * Resize Image and run thru media uploader
26
- *
27
- * @param $request $_POST
28
- * @return $response json
29
- * @since 3.0
30
- */
31
 
32
- function instant_images_download( WP_REST_Request $request ) {
33
-
34
- if (is_user_logged_in() && current_user_can( apply_filters('instant_images_user_role', 'upload_files') )){
35
-
36
- error_reporting(E_ALL|E_STRICT);
37
-
38
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
39
- require_once( ABSPATH . 'wp-admin/includes/image.php' );
40
-
41
- // Get JSON Data
42
- $data = json_decode($request->get_body(), true); // Get contents of request body
43
-
44
- if($data){
45
-
46
- $id = $data['id']; // ID
47
- $image_url = $data['image_url']; // Image URL
48
- $filename = sanitize_text_field($data['filename']); // $filename
49
- $title = sanitize_text_field($data['title']); // Title
50
- $alt = sanitize_text_field($data['alt']); // Alt text
51
- $caption = sanitize_text_field($data['caption']); // Caption text
52
- $custom_filename = sanitize_title($data['custom_filename']); // Custom filename
53
- $parent_id = ($data['parent_id']) ? sanitize_title($data['parent_id']) : 0; // Parent Post
54
-
55
- // Actual filename
56
- $name = (!empty($custom_filename)) ? $custom_filename .'.jpg' : $filename;
57
-
58
-
59
- // Check if remote file exists
60
- if( !instant_images_remote_file_exists( $image_url ) ){
61
- // Error
62
- $response = array(
63
- 'success' => false,
64
- 'msg' => __('Image does not exist or there was an error accessing the remote file.', 'instant-images'),
65
- 'id' => $id,
66
- 'attachment' => '',
67
- 'admin_url' => admin_url(),
68
- );
69
- wp_send_json($response);
70
- }
71
-
72
-
73
- // Send request to `wp_remote_get`
74
- $response = wp_remote_get( $image_url );
75
- if ( is_wp_error( $response ) ) {
76
- return new WP_Error( 100, __( 'Image download failed, please try again. Errors:', 'instant-images' ) . PHP_EOL . $response->get_error_message() );
77
- }
78
-
79
- // Get Headers
80
- $type = wp_remote_retrieve_header( $response, 'content-type' );
81
- if (!$type) {
82
- return new WP_Error( 100, __( 'Image type could not be determined', 'instant-images' ) );
83
- }
84
-
85
- // Upload remote file
86
- $mirror = wp_upload_bits( $name, '', wp_remote_retrieve_body( $response ) );
87
-
88
-
89
- // Build Attachment Data Array
90
- $attachment = array(
91
- 'post_title' => $title,
92
- 'post_excerpt' => $caption,
93
- 'post_content' => '',
94
- 'post_status' => 'inherit',
95
- 'post_mime_type' => $type
96
- );
97
-
98
-
99
- // Insert as attachment
100
- $image_id = wp_insert_attachment($attachment, $mirror['file'], $parent_id);
101
-
102
-
103
- // Add Alt Text as Post Meta
104
- update_post_meta( $image_id, '_wp_attachment_image_alt', $alt );
105
-
106
-
107
- // Generate Metadata
108
- $attach_data = wp_generate_attachment_metadata( $image_id, $mirror['file'] );
109
- wp_update_attachment_metadata( $image_id, $attach_data );
110
-
111
-
112
- // Resize original image to max size (set in Instant Images settings)
113
- instant_images_resize_download($name);
114
-
115
- // Success
116
- $response = array(
117
- 'success' => true,
118
- 'msg' => __('Image successfully uploaded to the media library!', 'instant-images'),
119
- 'id' => $id,
120
- 'attachment' => array(
121
- 'id' => $image_id,
122
- 'url' => wp_get_attachment_url( $image_id ),
123
- 'alt' => $alt,
124
- 'caption' => $caption
125
- ),
126
- 'admin_url' => admin_url(),
127
- );
128
-
129
- wp_send_json($response);
130
-
131
- } else {
132
-
133
- $response = array(
134
- 'success' => false,
135
- 'msg' => __('There was an error getting image details from the request, please try again.', 'instant-images'),
136
- 'id' => '',
137
- 'attachment' => '',
138
- 'url' => ''
139
- );
140
- wp_send_json($response);
141
-
142
- }
143
- }
144
  }
145
 
146
 
@@ -149,6 +172,9 @@ function instant_images_download( WP_REST_Request $request ) {
149
  *
150
  * @param string $url The url to the remote image.
151
  * @return bool Whether the remote image exists.
 
 
 
152
  */
153
  function instant_images_remote_file_exists( $url ) {
154
  $response = wp_remote_head( $url );
@@ -158,26 +184,26 @@ function instant_images_remote_file_exists( $url ) {
158
 
159
 
160
  /**
161
- * instant_images_resize_download
162
  * Resize original image to max size (set in Instant Images settings)
163
  *
 
 
 
 
164
  */
165
-
166
- function instant_images_resize_download($filename){
167
-
168
- // WP Options
169
- $options = get_option( 'instant_img_settings' );
170
- $download_w = isset($options['unsplash_download_w']) ? $options['unsplash_download_w'] : 1600; // width
171
- $download_h = isset($options['unsplash_download_h']) ? $options['unsplash_download_h'] : 1200; // height
172
-
173
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
174
- require_once( ABSPATH . 'wp-admin/includes/image.php' );
175
-
176
- $uploads_dir = wp_upload_dir();
177
- $original_image = wp_get_image_editor( $uploads_dir['path']. '/'. $filename );
178
- if ( !is_wp_error( $original_image ) ) {
179
- $original_image->resize( $download_w, $download_h, false );
180
- $original_image->save( $uploads_dir['path']. '/'. $filename );
181
- }
182
-
183
  }
1
  <?php
2
+ /**
3
+ * Custom download API route
4
+ *
5
+ * @since 3.0
6
+ * @author dcooney
7
+ * @package instant-images
8
+ */
9
 
10
  add_action( 'rest_api_init', function () {
11
+ $my_namespace = 'instant-images';
12
+ $my_endpoint = '/download';
13
+ register_rest_route(
14
+ $my_namespace,
15
+ $my_endpoint,
16
+ array(
17
+ 'methods' => 'POST',
18
+ 'callback' => 'instant_images_download',
19
+ 'permission_callback' => function () {
20
+ return InstantImages::instant_img_has_access();
21
+ },
22
+ )
23
+ );
24
  });
25
 
26
+ /**
27
+ * Resize Image and run through media uploader process.
28
+ *
29
+ * @param WP_REST_Request $request Rest request object.
30
+ * @return $response
31
+ * @since 3.0
32
+ * @author dcooney
33
+ * @package instant-images
34
+ */
35
+ function instant_images_download( WP_REST_Request $request ) {
36
+
37
+ if ( ! InstantImages::instant_img_has_access() ) {
38
+ // Exit if not allowed.
39
+ $response = array(
40
+ 'success' => false,
41
+ 'msg' => __( 'You do not have sufficient access to upload images with Instant Images.', 'instant-images' ),
42
+ 'id' => '',
43
+ 'attachment' => '',
44
+ 'url' => '',
45
+ );
46
+ wp_send_json( $response );
47
 
48
+ }
49
 
50
+ // Global settings.
51
+ $options = get_option( 'instant_img_settings' );
52
+ $max_width = isset( $options['unsplash_download_w'] ) ? $options['unsplash_download_w'] : 1600; // width.
53
+ $max_height = isset( $options['unsplash_download_h'] ) ? $options['unsplash_download_h'] : 1200; // height.
 
 
 
 
54
 
55
+ // Core WP includes.
56
+ require_once ABSPATH . 'wp-admin/includes/file.php';
57
+ require_once ABSPATH . 'wp-admin/includes/image.php';
58
+
59
+ // Get JSON Data.
60
+ $data = json_decode( $request->get_body(), true ); // Get contents of request body.
61
+
62
+ if ( $data ) {
63
+
64
+ $id = $data['id']; // Image ID.
65
+ $image_url = $data['image_url'] . '&fit=clip&w=' . $max_width . '&h=' . $max_height; // Image URL.
66
+ $filename = sanitize_text_field( $data['filename'] ); // The filename.
67
+ $title = sanitize_text_field( $data['title'] ); // Title.
68
+ $alt = sanitize_text_field( $data['alt'] ); // Alt text.
69
+ $caption = sanitize_text_field( $data['caption'] ); // Caption text.
70
+ $cfilename = sanitize_title( $data['custom_filename'] ); // Custom filename.
71
+ $parent_id = ( $data['parent_id'] ) ? sanitize_title( $data['parent_id'] ) : 0; // Parent post ID.
72
+ $name = ( ! empty( $cfilename ) ) ? $cfilename . '.jpg' : $filename; // Actual filename.
73
+
74
+ // Check if remote file exists.
75
+ if ( ! instant_images_remote_file_exists( $image_url ) ) {
76
+ // Errorhandling.
77
+ $response = array(
78
+ 'success' => false,
79
+ 'msg' => __( 'Image does not exist or there was an error accessing the remote file.', 'instant-images' ),
80
+ 'id' => $id,
81
+ 'attachment' => '',
82
+ 'admin_url' => admin_url(),
83
+ );
84
+ wp_send_json( $response );
85
+ }
86
+
87
+ // Send request to `wp_remote_get`.
88
+ $response = wp_remote_get( $image_url );
89
+ if ( is_wp_error( $response ) ) {
90
+ return new WP_Error( 100, __( 'Image download failed, please try again. Errors:', 'instant-images' ) . PHP_EOL . $response->get_error_message() );
91
+ }
92
+
93
+ // Get Headers.
94
+ $type = wp_remote_retrieve_header( $response, 'content-type' );
95
+ if ( ! $type ) {
96
+ return new WP_Error( 100, __( 'Image type could not be determined', 'instant-images' ) );
97
+ }
98
+
99
+ // Upload remote file.
100
+ $mirror = wp_upload_bits( $name, null, wp_remote_retrieve_body( $response ) );
101
+
102
+ // Build Attachment Data Array.
103
+ $attachment = array(
104
+ 'post_title' => $title,
105
+ 'post_excerpt' => $caption,
106
+ 'post_content' => '',
107
+ 'post_status' => 'inherit',
108
+ 'post_mime_type' => $type,
109
+ );
110
+
111
+ // Insert as attachment.
112
+ $image_id = wp_insert_attachment( $attachment, $mirror['file'], $parent_id );
113
+
114
+ // Add Alt Text as Post Meta.
115
+ update_post_meta( $image_id, '_wp_attachment_image_alt', $alt );
116
+
117
+ // Generate Metadata.
118
+ $attach_data = wp_generate_attachment_metadata( $image_id, $mirror['file'] );
119
+ wp_update_attachment_metadata( $image_id, $attach_data );
120
+
121
+ /**
122
+ * Instant Images Core Hook
123
+ * Fired after a successful image upload to media library.
124
+ *
125
+ * @since 4.4.0
126
+ */
127
+ do_action( 'instant_images_after_upload', array(
128
+ 'filename' => $name,
129
+ 'unsplash_id' => $id,
130
+ 'attachment_id' => $image_id,
131
+ 'attachment_url' => wp_get_attachment_url( $image_id ),
132
+ ) );
133
+
134
+ // Resize original image to max size (set in Instant Images settings).
135
+ // @deprecated in .
136
+ // instant_images_resize_download( $name ); .
137
+
138
+ // Success.
139
+ $response = array(
140
+ 'success' => true,
141
+ 'msg' => __( 'Image successfully uploaded to the media library!', 'instant-images' ),
142
+ 'id' => $id,
143
+ 'admin_url' => admin_url(),
144
+ 'attachment' => array(
145
+ 'id' => $image_id,
146
+ 'url' => wp_get_attachment_url( $image_id ),
147
+ 'alt' => $alt,
148
+ 'caption' => $caption,
149
+ ),
150
+ );
151
+
152
+ wp_send_json( $response );
153
+
154
+ } else {
155
+
156
+ $response = array(
157
+ 'success' => false,
158
+ 'msg' => __( 'There was an error getting image details from the request, please try again.', 'instant-images' ),
159
+ 'id' => '',
160
+ 'attachment' => '',
161
+ 'url' => '',
162
+ );
163
+
164
+ wp_send_json( $response );
165
+
166
+ }
167
  }
168
 
169
 
172
  *
173
  * @param string $url The url to the remote image.
174
  * @return bool Whether the remote image exists.
175
+ * @since 3.0
176
+ * @author dcooney
177
+ * @package instant-images
178
  */
179
  function instant_images_remote_file_exists( $url ) {
180
  $response = wp_remote_head( $url );
184
 
185
 
186
  /**
 
187
  * Resize original image to max size (set in Instant Images settings)
188
  *
189
+ * @param string $filename the image filename.
190
+ * @since 3.0
191
+ * @author dcooney
192
+ * @package instant-images
193
  */
194
+ function instant_images_resize_download( $filename ) {
195
+
196
+ $options = get_option( 'instant_img_settings' );
197
+ $download_w = isset( $options['unsplash_download_w'] ) ? $options['unsplash_download_w'] : 1600; // width.
198
+ $download_h = isset( $options['unsplash_download_h'] ) ? $options['unsplash_download_h'] : 1200; // height.
199
+
200
+ require_once ABSPATH . 'wp-admin/includes/file.php';
201
+ require_once ABSPATH . 'wp-admin/includes/image.php';
202
+
203
+ $uploads_dir = wp_upload_dir();
204
+ $original_image = wp_get_image_editor( $uploads_dir['path'] . '/' . $filename );
205
+ if ( ! is_wp_error( $original_image ) ) {
206
+ $original_image->resize( $download_w, $download_h, false );
207
+ $original_image->save( $uploads_dir['path'] . '/' . $filename );
208
+ }
 
 
 
209
  }
api/test.php CHANGED
@@ -1,48 +1,44 @@
1
  <?php
2
-
3
- /*
4
- * rest_api_init
5
- * Custom /resize route
6
- *
7
- * @since 3.0
8
- */
9
 
10
  add_action( 'rest_api_init', function () {
11
- $my_namespace = 'instant-images';
12
- $my_endpoint = '/test';
13
- register_rest_route( $my_namespace, $my_endpoint,
14
- array(
15
- 'methods' => 'POST',
16
- 'callback' => 'instant_images_test',
17
- )
18
- );
 
 
 
 
 
19
  });
20
 
 
 
 
 
 
 
 
 
 
21
 
 
22
 
23
- /*
24
- * test
25
- * Test REST API access
26
- *
27
- * @param $request $_PUT
28
- * @return $response json
29
- * @since 3.2
30
-
31
- */
32
 
33
- function instant_images_test( WP_REST_Request $request ) {
34
-
35
- if (is_user_logged_in() && current_user_can( apply_filters('instant_images_user_role', 'upload_files') )){
36
-
37
- error_reporting(E_ALL|E_STRICT);
38
-
39
- // Access is enable, send the response
40
- $response = array(
41
- 'success' => true
42
- );
43
-
44
- // Send response as JSON
45
- wp_send_json($response);
46
-
47
- }
48
  }
1
  <?php
2
+ /**
3
+ * Custom /resize route
4
+ *
5
+ * @since 3.0
6
+ * @author dcooney
7
+ * @package instant-images
8
+ */
9
 
10
  add_action( 'rest_api_init', function () {
11
+ $my_namespace = 'instant-images';
12
+ $my_endpoint = '/test';
13
+ register_rest_route(
14
+ $my_namespace,
15
+ $my_endpoint,
16
+ array(
17
+ 'methods' => 'POST',
18
+ 'callback' => 'instant_images_test',
19
+ 'permission_callback' => function () {
20
+ return InstantImages::instant_img_has_access();
21
+ },
22
+ )
23
+ );
24
  });
25
 
26
+ /**
27
+ * Test REST API access
28
+ *
29
+ * @param WP_REST_Request $request API request.
30
+ * @since 3.2
31
+ * @author dcooney
32
+ * @package instant-images
33
+ */
34
+ function instant_images_test( WP_REST_Request $request ) {
35
 
36
+ if ( InstantImages::instant_img_has_access() ) {
37
 
38
+ // Access is enable, send the response.
39
+ $response = array( 'success' => true );
 
 
 
 
 
 
 
40
 
41
+ // Send response as JSON.
42
+ wp_send_json( $response );
43
+ }
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
dist/css/instant-images.css CHANGED
@@ -46,7 +46,7 @@ body.media_page_instant-images #wpfooter p {
46
  font-size: 14px;
47
  color: #666;
48
  position: relative;
49
- /*
50
  Admin Screens - Setting page
51
  wp-admin/upload.php?page=instant-images
52
  */
@@ -117,8 +117,8 @@ body.media_page_instant-images #wpfooter p {
117
  }
118
 
119
  .instant-img-container .error-messaging.active:before {
120
- font-family: 'FontAwesome';
121
- content: '\F06A';
122
  display: block;
123
  left: 17px;
124
  top: 50%;
@@ -163,9 +163,26 @@ body.media_page_instant-images #wpfooter p {
163
  }
164
  }
165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  .instant-img-container .header-wrap h1 span {
167
  display: block;
168
- padding: 8px 0 0;
169
  color: #888;
170
  font-size: 15px;
171
  font-weight: 400;
@@ -281,8 +298,8 @@ body.media_page_instant-images #wpfooter p {
281
  margin-top: 0;
282
  }
283
 
284
- /*
285
- * Settings
286
  */
287
  .instant-img-container .save-settings p.submit {
288
  float: left;
@@ -298,7 +315,7 @@ body.media_page_instant-images #wpfooter p {
298
  background: #fff url(../img/ajax-loader.gif) no-repeat center center;
299
  }
300
 
301
- /*
302
  * Thickbox styles
303
  */
304
  #TB_ajaxContent {
@@ -342,7 +359,7 @@ body.media_page_instant-images #wpfooter p {
342
 
343
  .instant-img-container .form-table td {
344
  border-top: 0;
345
- padding: 5px 0 20px;
346
  float: left;
347
  width: 100%;
348
  margin: 0;
@@ -411,8 +428,8 @@ body.media_page_instant-images #wpfooter p {
411
  display: none;
412
  }
413
 
414
- .instant-img-container input[type=text],
415
- .instant-img-container input[type=number],
416
  .instant-img-container textarea {
417
  padding: 10px;
418
  line-height: 1;
@@ -424,7 +441,7 @@ body.media_page_instant-images #wpfooter p {
424
  height: auto;
425
  }
426
 
427
- .instant-img-container input[type=text]:focus,
428
  .instant-img-container textarea:focus {
429
  border-color: #999;
430
  -webkit-box-shadow: 0 0 3px #ccc;
@@ -433,7 +450,7 @@ body.media_page_instant-images #wpfooter p {
433
  }
434
 
435
  /* Helpers */
436
- .spacer {
437
  display: block;
438
  height: 40px;
439
  overflow: hidden;
@@ -441,11 +458,11 @@ body.media_page_instant-images #wpfooter p {
441
  width: 100%;
442
  }
443
 
444
- .spacer.sm {
445
  height: 20px;
446
  }
447
 
448
- input:-webkit-autofill {
449
  -webkit-box-shadow: 0 0 0px 1000px white inset;
450
  }
451
 
@@ -573,7 +590,8 @@ input:-webkit-autofill {
573
  cursor: help;
574
  }
575
 
576
- .instant-img-container .control-nav li.search-field .searchResults span, .instant-img-container .control-nav li.search-field .searchResults a {
 
577
  line-height: 34px;
578
  }
579
 
@@ -608,7 +626,7 @@ input:-webkit-autofill {
608
  }
609
 
610
  .instant-img-container .control-nav li.search-field .searchResults:before {
611
- border-color: transparent;
612
  border-left-color: #ebebae;
613
  border-width: 7px;
614
  margin-top: -7px;
@@ -690,28 +708,28 @@ input:-webkit-autofill {
690
  color: #5d72c3;
691
  }
692
 
693
- .instant-img-container .control-nav li.search-field input[type=search]::-webkit-input-placeholder {
694
  color: #ccc;
695
  font-weight: 300;
696
  font-style: normal;
697
  font-size: 14px;
698
  }
699
 
700
- .instant-img-container .control-nav li.search-field input[type=search]:-moz-placeholder {
701
  color: #ccc;
702
  font-weight: 300;
703
  font-style: normal;
704
  font-size: 14px;
705
  }
706
 
707
- .instant-img-container .control-nav li.search-field input[type=search]::-moz-placeholder {
708
  color: #ccc;
709
  font-weight: 300;
710
  font-style: normal;
711
  font-size: 14px;
712
  }
713
 
714
- .instant-img-container .control-nav li.search-field input[type=search]:-ms-input-placeholder {
715
  color: #ccc;
716
  font-weight: 300;
717
  font-style: normal;
@@ -858,7 +876,7 @@ input:-webkit-autofill {
858
  }
859
 
860
  #photos .photo a.upload .status:before {
861
- font-family: 'FontAwesome';
862
  display: block;
863
  color: #fff;
864
  font-size: 24px;
@@ -907,7 +925,7 @@ input:-webkit-autofill {
907
  }
908
 
909
  #photos .photo a.upload.success .status:before {
910
- content: '\F00C';
911
  color: #fff;
912
  }
913
 
@@ -928,7 +946,7 @@ input:-webkit-autofill {
928
  }
929
 
930
  #photos .photo a.upload.errors .status:before {
931
- content: '\F12A';
932
  color: #fff;
933
  opacity: 0.8;
934
  }
@@ -937,8 +955,10 @@ input:-webkit-autofill {
937
  opacity: 0.25 !important;
938
  }
939
 
940
- #photos .photo.uploaded .user-controls {
941
- opacity: 0.5;
 
 
942
  }
943
 
944
  #photos .photo:hover a.upload img, #photos .photo.in-progress a.upload img {
@@ -1012,7 +1032,8 @@ input:-webkit-autofill {
1012
  opacity: 0.9;
1013
  }
1014
 
1015
- #photos .photo .options a, #photos .photo .options span {
 
1016
  display: inline-block;
1017
  vertical-align: top;
1018
  line-height: 30px;
@@ -1592,7 +1613,7 @@ input:-webkit-autofill {
1592
  display: block;
1593
  }
1594
 
1595
- #tooltip {
1596
  display: inline-block;
1597
  padding: 8px 10px;
1598
  background: #fff;
@@ -1617,7 +1638,7 @@ input:-webkit-autofill {
1617
  transition: all 0.15s ease;
1618
  }
1619
 
1620
- #tooltip:after {
1621
  top: 100%;
1622
  right: 17px;
1623
  border: solid transparent;
@@ -1632,16 +1653,16 @@ input:-webkit-autofill {
1632
  margin-left: -5px;
1633
  }
1634
 
1635
- #tooltip.over {
1636
  opacity: 0.9;
1637
  visibility: visible;
1638
  }
1639
 
1640
- #tooltip.above {
1641
  margin-top: 37px;
1642
  }
1643
 
1644
- #tooltip.above:after {
1645
  top: -5px;
1646
  border-top: none;
1647
  border-bottom-color: #ffffff;
46
  font-size: 14px;
47
  color: #666;
48
  position: relative;
49
+ /*
50
  Admin Screens - Setting page
51
  wp-admin/upload.php?page=instant-images
52
  */
117
  }
118
 
119
  .instant-img-container .error-messaging.active:before {
120
+ font-family: "FontAwesome";
121
+ content: "\F06A";
122
  display: block;
123
  left: 17px;
124
  top: 50%;
163
  }
164
  }
165
 
166
+ .instant-img-container .header-wrap h1 em {
167
+ font-weight: 400;
168
+ font-size: 14px;
169
+ background-color: rgba(0, 0, 0, 0.055);
170
+ color: rgba(0, 0, 0, 0.5);
171
+ display: inline-block;
172
+ -webkit-border-radius: 2px;
173
+ border-radius: 2px;
174
+ padding: 3px 3px;
175
+ position: relative;
176
+ top: -2px;
177
+ left: 2px;
178
+ text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.4);
179
+ font-style: normal;
180
+ line-height: 1;
181
+ }
182
+
183
  .instant-img-container .header-wrap h1 span {
184
  display: block;
185
+ padding: 3px 0 0;
186
  color: #888;
187
  font-size: 15px;
188
  font-weight: 400;
298
  margin-top: 0;
299
  }
300
 
301
+ /*
302
+ * Settings
303
  */
304
  .instant-img-container .save-settings p.submit {
305
  float: left;
315
  background: #fff url(../img/ajax-loader.gif) no-repeat center center;
316
  }
317
 
318
+ /*
319
  * Thickbox styles
320
  */
321
  #TB_ajaxContent {
359
 
360
  .instant-img-container .form-table td {
361
  border-top: 0;
362
+ padding: 0 0 15px;
363
  float: left;
364
  width: 100%;
365
  margin: 0;
428
  display: none;
429
  }
430
 
431
+ .instant-img-container input[type="text"],
432
+ .instant-img-container input[type="number"],
433
  .instant-img-container textarea {
434
  padding: 10px;
435
  line-height: 1;
441
  height: auto;
442
  }
443
 
444
+ .instant-img-container input[type="text"]:focus,
445
  .instant-img-container textarea:focus {
446
  border-color: #999;
447
  -webkit-box-shadow: 0 0 3px #ccc;
450
  }
451
 
452
  /* Helpers */
453
+ .instant-img-container .spacer {
454
  display: block;
455
  height: 40px;
456
  overflow: hidden;
458
  width: 100%;
459
  }
460
 
461
+ .instant-img-container .spacer.sm {
462
  height: 20px;
463
  }
464
 
465
+ .instant-img-container input:-webkit-autofill {
466
  -webkit-box-shadow: 0 0 0px 1000px white inset;
467
  }
468
 
590
  cursor: help;
591
  }
592
 
593
+ .instant-img-container .control-nav li.search-field .searchResults span,
594
+ .instant-img-container .control-nav li.search-field .searchResults a {
595
  line-height: 34px;
596
  }
597
 
626
  }
627
 
628
  .instant-img-container .control-nav li.search-field .searchResults:before {
629
+ border-color: rgba(0, 0, 0, 0);
630
  border-left-color: #ebebae;
631
  border-width: 7px;
632
  margin-top: -7px;
708
  color: #5d72c3;
709
  }
710
 
711
+ .instant-img-container .control-nav li.search-field input[type="search"]::-webkit-input-placeholder {
712
  color: #ccc;
713
  font-weight: 300;
714
  font-style: normal;
715
  font-size: 14px;
716
  }
717
 
718
+ .instant-img-container .control-nav li.search-field input[type="search"]:-moz-placeholder {
719
  color: #ccc;
720
  font-weight: 300;
721
  font-style: normal;
722
  font-size: 14px;
723
  }
724
 
725
+ .instant-img-container .control-nav li.search-field input[type="search"]::-moz-placeholder {
726
  color: #ccc;
727
  font-weight: 300;
728
  font-style: normal;
729
  font-size: 14px;
730
  }
731
 
732
+ .instant-img-container .control-nav li.search-field input[type="search"]:-ms-input-placeholder {
733
  color: #ccc;
734
  font-weight: 300;
735
  font-style: normal;
876
  }
877
 
878
  #photos .photo a.upload .status:before {
879
+ font-family: "FontAwesome";
880
  display: block;
881
  color: #fff;
882
  font-size: 24px;
925
  }
926
 
927
  #photos .photo a.upload.success .status:before {
928
+ content: "\F00C";
929
  color: #fff;
930
  }
931
 
946
  }
947
 
948
  #photos .photo a.upload.errors .status:before {
949
+ content: "\F12A";
950
  color: #fff;
951
  opacity: 0.8;
952
  }
955
  opacity: 0.25 !important;
956
  }
957
 
958
+ #photos .photo.uploaded .user-controls,
959
+ #photos .photo.uploaded .options {
960
+ opacity: 0 !important;
961
+ visibility: hidden !important;
962
  }
963
 
964
  #photos .photo:hover a.upload img, #photos .photo.in-progress a.upload img {
1032
  opacity: 0.9;
1033
  }
1034
 
1035
+ #photos .photo .options a,
1036
+ #photos .photo .options span {
1037
  display: inline-block;
1038
  vertical-align: top;
1039
  line-height: 30px;
1613
  display: block;
1614
  }
1615
 
1616
+ .instant-img-container #tooltip {
1617
  display: inline-block;
1618
  padding: 8px 10px;
1619
  background: #fff;
1638
  transition: all 0.15s ease;
1639
  }
1640
 
1641
+ .instant-img-container #tooltip:after {
1642
  top: 100%;
1643
  right: 17px;
1644
  border: solid transparent;
1653
  margin-left: -5px;
1654
  }
1655
 
1656
+ .instant-img-container #tooltip.over {
1657
  opacity: 0.9;
1658
  visibility: visible;
1659
  }
1660
 
1661
+ .instant-img-container #tooltip.above {
1662
  margin-top: 37px;
1663
  }
1664
 
1665
+ .instant-img-container #tooltip.above:after {
1666
  top: -5px;
1667
  border-top: none;
1668
  border-bottom-color: #ffffff;
dist/css/instant-images.min.css CHANGED
@@ -1 +1 @@
1
- @import url(//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css);html{overflow-y:scroll}body.media_page_instant-images{background:#fff}body.media_page_instant-images #wpcontent{padding-left:0;padding-bottom:40px}@media screen and (max-width:800px){body.media_page_instant-images #wpcontent{padding-bottom:0}}body.media_page_instant-images #wpbody-content{padding-bottom:0}body.media_page_instant-images #wpfooter{padding-top:0;padding-bottom:0;line-height:40px;background:#f7f7f7;border-top:1px solid #efefef;position:fixed;bottom:0;z-index:1100}body.media_page_instant-images #wpfooter p{line-height:40px}@media screen and (max-width:800px){body.media_page_instant-images #wpfooter{display:none}}.instant-img-container{font-size:14px;color:#666;position:relative}.instant-img-container .offscreen{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}.instant-img-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.instant-img-container a{color:#5d72c3;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease}.instant-img-container a:hover{color:#5568ae;text-decoration:none}.instant-img-container img{max-width:100%}.instant-img-container p{color:#666;width:100%;display:block;clear:both;text-transform:none;padding:0;margin:0 0 15px;font-size:14px}.instant-img-container.loading .loading-block{display:block}.instant-img-container .error-messaging{display:none}.instant-img-container .error-messaging.active{padding:17px 17px 17px 57px;-webkit-border-radius:3px;border-radius:3px;background:#df3333;color:#fff;font-size:13px;margin-bottom:25px;display:block;position:relative}.instant-img-container .error-messaging.active:before{font-family:FontAwesome;content:"\F06A";display:block;left:17px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);position:absolute;font-size:30px;opacity:.75}.instant-img-container .header-wrap{background:#f7f7f7 url(../img/logo-48x48.png) no-repeat 25px 20px;padding:20px 25px 20px 83px;min-height:88px;overflow:hidden;border-bottom:1px solid #efefef;position:relative}@media screen and (max-width:800px){.instant-img-container .header-wrap{background-position:center 20px;padding:80px 25px 20px;text-align:center}}.instant-img-container .header-wrap h1{padding:0;margin:4px 0 0;font-weight:700;font-size:26px;max-width:70%}@media screen and (max-width:800px){.instant-img-container .header-wrap h1{max-width:100%;width:100%;text-align:center}}.instant-img-container .header-wrap h1 span{display:block;padding:8px 0 0;color:#888;font-size:15px;font-weight:400}.instant-img-container .header-wrap button{position:absolute;right:25px;bottom:26px}@media screen and (max-width:800px){.instant-img-container .header-wrap button{position:static;margin-top:20px;display:inline-block}}.instant-img-container .header-wrap button i{margin-right:2px}.instant-img-container .instant-images-wrapper{padding:0 25px;display:block;overflow:hidden;min-height:400px;background:url(../img/ajax-loader-lg.gif) no-repeat 50%}.instant-img-container .instant-images-wrapper.loaded{background:none}.instant-img-container .permissions-warning{padding:0 25px}.instant-img-container .permissions-warning .inner{border-bottom:1px solid #efefef;padding:32px 0}.instant-img-container .permissions-warning input{max-width:500px}.instant-img-container .permissions-warning h3{font-size:22px;margin:0 0 15px}.instant-img-container .permissions-warning h3 i{margin:0 2px 0 0;position:relative}.instant-img-container .permissions-warning p:first-of-type{font-size:18px;margin:0 0 2px}.instant-img-container .loading-block{display:none;padding:50px;background:url(../img/ajax-loader-lg.gif) no-repeat 50%}.instant-img-container .load-more-wrap{margin:1% 0 0;padding:25px 0;text-align:center;display:none;border-top:1px solid #efefef}.instant-img-container .load-more-wrap button{display:inline-block;margin:0;padding:12px 15px;font-size:15px;font-weight:600;-webkit-transition:all .1s ease;-o-transition:all .1s ease;transition:all .1s ease;height:auto;line-height:1;cursor:pointer;background-image:none;background-repeat:no-repeat!important;background-position:15px!important}.instant-img-container .load-more-wrap button.disabled{opacity:.3;cursor:default}.instant-img-container .cnkt-main{width:100%;float:none;background:none!important;position:relative}.instant-img-container h2,.instant-img-container h3,.instant-img-container h4{margin-top:0}.instant-img-container .save-settings p.submit{float:left;margin:0 2px 0 0;width:auto}.instant-img-container .save-settings .loading{width:46px;height:28px;display:none;float:left;background:#fff url(../img/ajax-loader.gif) no-repeat 50%}#TB_ajaxContent{clear:both;line-height:1.4em;overflow:auto;text-align:left;width:100%!important;-webkit-box-sizing:border-box;box-sizing:border-box;padding:15px!important}.cnkt-sidebar .form-table{margin:0;border:none}.cnkt-sidebar .form-table label,.cnkt-sidebar .form-table p,.cnkt-sidebar .form-table td{font-size:13px}.cnkt-sidebar .form-table label{display:block;clear:both;float:none}.cnkt-sidebar .form-table label span{opacity:.8;font-size:13px;font-style:italic}.cnkt-sidebar .form-table th{display:none}.instant-img-container .form-table td{border-top:0;padding:5px 0 20px;float:left;width:100%;margin:0}.instant-img-container .form-table tr:first-of-type td{padding:10px 0}.cnkt-main .form-msg,.cnkt-sidebar .form-table .form-msg{display:block;line-height:18px;padding:12px 12px 12px 15px;margin:15px 0 0;color:#666;background-color:#fff9ea;border-left:5px solid #dfd8c2;-webkit-border-radius:2px;border-radius:2px}.cnkt-main .form-msg span,.cnkt-sidebar .form-table .form-msg span{display:block;padding:6px 0 3px}.instant-img-container h1,.instant-img-container h3,.instant-img-container h4{color:#222;margin-top:0}.instant-img-container h4+p{margin-top:-6px}.instant-img-container p.small{font-size:12px;margin-top:-10px;opacity:.7}.instant-img-container ul{padding:0;margin:0;list-style:none}.instant-img-container input,.instant-img-container label,.instant-img-container select,.instant-img-container textarea{-webkit-box-shadow:none;box-shadow:none}.instant-img-container label{padding:5px 0}#unsplash-form-options h2,#unsplash-form-options p.desc{display:none}.instant-img-container input[type=number],.instant-img-container input[type=text],.instant-img-container textarea{padding:10px;line-height:1;border:1px solid #ccc;background:#f7f7f7;width:100%;-webkit-border-radius:2px;border-radius:2px;height:auto}.instant-img-container input[type=text]:focus,.instant-img-container textarea:focus{border-color:#999;-webkit-box-shadow:0 0 3px #ccc;box-shadow:0 0 3px #ccc;background:#efefef}.spacer{display:block;height:40px;overflow:hidden;clear:both;width:100%}.spacer.sm{height:20px}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset}.instant-img-container .control-nav{display:block;margin:0;padding:25px 0;list-style:none}.instant-img-container .control-nav:after{content:"";display:table;clear:both}.instant-img-container .control-nav li{padding:0;margin:0 3px 0 0;float:left;background:none;font-size:18px;position:relative}.instant-img-container .control-nav li button{padding:0 24px 0 2px;height:48px;line-height:48px;display:block;color:#999;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;background-color:transparent;background-position:96%;background-repeat:no-repeat;border:none;cursor:pointer}.instant-img-container .control-nav li button:focus,.instant-img-container .control-nav li button:hover{color:#111;outline:none;-webkit-box-shadow:none;box-shadow:none}.instant-img-container .control-nav li button:focus{text-decoration:underline}.instant-img-container .control-nav li button.active{color:#333;cursor:default;font-weight:600}.instant-img-container .control-nav li button.loading{background-image:url(../img/ajax-loader.gif)}@media screen and (max-width:800px){.instant-img-container .control-nav li{font-size:16px;margin:0}.instant-img-container .control-nav li button{padding-left:3px}}@media screen and (max-width:600px){.instant-img-container .control-nav li{width:33.333%;text-align:center;margin:0;padding-bottom:15px}}.instant-img-container .control-nav li.search-field{float:right;width:49%;margin:0;max-width:500px}@media screen and (max-width:600px){.instant-img-container .control-nav li.search-field{width:100%;display:block;position:static;padding-bottom:15px;text-align:left;max-width:100%}}.instant-img-container .control-nav li.search-field .searchResults{position:absolute;right:100.5%;top:7px;width:auto;height:34px;line-height:34px;padding:0 30px 0 10px;background:#ffffbf;border:1px solid #ebebae;-webkit-border-radius:3px;border-radius:3px;z-index:99;font-size:13px;font-weight:600;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;color:#444;text-shadow:0 1px 1px hsla(0,0%,100%,.3);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05)}.instant-img-container .control-nav li.search-field .searchResults span{cursor:help}.instant-img-container .control-nav li.search-field .searchResults a,.instant-img-container .control-nav li.search-field .searchResults span{line-height:34px}.instant-img-container .control-nav li.search-field .searchResults button{padding:0 10px;height:32px;line-height:32px;width:30px;position:absolute;left:auto;right:0;top:0}.instant-img-container .control-nav li.search-field .searchResults:after,.instant-img-container .control-nav li.search-field .searchResults:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;z-index:100}.instant-img-container .control-nav li.search-field .searchResults:after{border-color:hsla(62,46%,78%,0);border-left-color:#ffffbf;border-width:6px;margin-top:-6px}.instant-img-container .control-nav li.search-field .searchResults:before{border-color:transparent;border-left-color:#ebebae;border-width:7px;margin-top:-7px}.instant-img-container .control-nav li.search-field .searchResults.hide{opacity:0;visibility:hidden}.instant-img-container .control-nav li.search-field form{padding:0 1px 0 0;margin:0;position:relative;height:48px;display:block}.instant-img-container .control-nav li.search-field form:hover button{opacity:1}.instant-img-container .control-nav li.search-field input{width:100%;padding:0 10px 0 42px;border:1px solid #e1e1e1;background-color:#f7f7f7!important;height:46px;line-height:46px;-webkit-border-radius:3px;border-radius:3px;font-size:16px;-webkit-transition:padding .15s ease;-o-transition:padding .15s ease;transition:padding .15s ease}.instant-img-container .control-nav li.search-field input:focus{border-color:#999;-webkit-box-shadow:0 0 0 4px rgba(0,0,0,.075);box-shadow:0 0 0 4px rgba(0,0,0,.075)}.instant-img-container .control-nav li.search-field input.searching{padding-left:62px;background-image:url(../img/ajax-loader.gif);background-position:37px;background-repeat:no-repeat}.instant-img-container .control-nav li.search-field button{position:absolute;left:-2px;top:-1px;width:48px;height:48px;z-index:1;border:none!important;background:transparent!important;cursor:pointer;color:#666;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;opacity:.5;margin:0;padding:0}.instant-img-container .control-nav li.search-field button:focus,.instant-img-container .control-nav li.search-field button:hover{outline:none;color:#5d72c3}.instant-img-container .control-nav li.search-field input[type=search]::-webkit-input-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}.instant-img-container .control-nav li.search-field input[type=search]:-moz-placeholder,.instant-img-container .control-nav li.search-field input[type=search]::-moz-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}.instant-img-container .control-nav li.search-field input[type=search]:-ms-input-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}#photos{width:100%;width:-webkit-calc(100% + 10px);width:calc(100% + 10px);margin:0 0 0 -5px;padding:0;position:relative}#photos .photo{width:20%;margin:0;padding:0 5px 10px;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}#photos .photo--wrap{position:relative}#photos .photo.in-view{opacity:1}#photos .photo.in-progress .fade{opacity:0!important;visibility:hidden!important}#photos .photo .img-wrap{display:block;overflow:hidden;position:relative}@media screen and (min-width:2000px){#photos .photo{width:20%}}@media screen and (max-width:1570px){#photos .photo{width:25%}}@media screen and (max-width:1270px){#photos .photo{width:33.333333%}}@media screen and (max-width:800px){#photos .photo{width:50%}}@media screen and (max-width:600px){#photos .photo{width:100%;margin:0 0 2%}}#photos .photo:focus a.upload img{opacity:.6}#photos .photo:focus .fade{opacity:1;visibility:visible}#photos .photo:focus .fade.user{opacity:.7}#photos .photo:focus-within .user-controls{opacity:1}#photos .photo a.upload{display:block;position:relative;background-color:#222;background-position:50%;background-repeat:no-repeat;background-image:url(../img/ajax-loader.gif);overflow:hidden}#photos .photo a.upload.loaded{background-image:none}#photos .photo a.upload:active,#photos .photo a.upload:focus{outline:none;border:none}#photos .photo a.upload img{-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;width:100%;height:auto!important;padding:0;vertical-align:top}#photos .photo a.upload .status{visibility:hidden;opacity:0;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;width:60px;height:60px;line-height:60px;-webkit-border-radius:4px;border-radius:4px;position:absolute;left:50%;top:50%;z-index:5;-webkit-transform:translate(-50%,-50%) scale(1.2);-ms-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.25);box-shadow:0 2px 3px rgba(0,0,0,.25);background-position:50%;background-repeat:no-repeat}#photos .photo a.upload .status:before{font-family:FontAwesome;display:block;color:#fff;font-size:24px;opacity:.8}#photos .photo a.upload .status a{color:#fff}#photos .photo a.upload.errors .status,#photos .photo a.upload.success .status,#photos .photo a.upload.uploading .status{text-align:center;left:50%;top:50%;-webkit-transform:translate(-50%,-50%) scale(1);-ms-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}#photos .photo a.upload.uploading{cursor:default!important}#photos .photo a.upload.uploading .status{visibility:visible;opacity:1;background:hsla(0,0%,100%,.95) url(../img/ajax-loader-lg.gif) no-repeat 50%;-webkit-background-size:24px 24px;background-size:24px 24px}#photos .photo a.upload.uploading .status:before{display:none}#photos .photo a.upload.success{cursor:default!important}#photos .photo a.upload.success .status{visibility:visible;opacity:1;background-color:#63d875}#photos .photo a.upload.success .status:before{content:"\F00C";color:#fff}#photos .photo a.upload.success img{-webkit-transform:scale(1)!important;-ms-transform:scale(1)!important;transform:scale(1)!important}#photos .photo a.upload.errors{cursor:help!important}#photos .photo a.upload.errors .status{visibility:visible;opacity:1;background-color:#df3333}#photos .photo a.upload.errors .status:before{content:"\F12A";color:#fff;opacity:.8}#photos .photo.uploaded a.upload img{opacity:.25!important}#photos .photo.uploaded .user-controls{opacity:.5}#photos .photo.in-progress a.upload img,#photos .photo:hover a.upload img{opacity:.7;-webkit-transform:scale(1.075);-ms-transform:scale(1.075);transform:scale(1.075)}#photos .photo.in-progress .options,#photos .photo:hover .options{opacity:1;visibility:visible}#photos .photo.in-progress .options i.heart-like,#photos .photo:hover .options i.heart-like{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}#photos .photo.in-progress .user-controls,#photos .photo:hover .user-controls{opacity:1}#photos .photo.in-progress .notice-msg{top:0;opacity:1}#photos .photo.in-progress .options,#photos .photo.in-progress .user-controls{opacity:0!important}#photos .photo .options{position:absolute;top:5px;right:5px;z-index:6;display:inline-block;width:auto;cursor:default!important;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;opacity:0;visibility:hidden;font-size:13px}#photos .photo .options i{font-size:14px}#photos .photo .options i.heart-like{color:#d13714;-webkit-transition:all .25s ease .05s;-o-transition:all .25s ease .05s;transition:all .25s ease .05s;-webkit-transform:scale(.55);-ms-transform:scale(.55);transform:scale(.55);margin-right:2px;position:relative;top:0;font-size:14px;opacity:.9}#photos .photo .options a,#photos .photo .options span{display:inline-block;vertical-align:top;line-height:30px;padding:0 10px;padding-top:1px;background:hsla(0,0%,100%,.5);margin:0;-webkit-border-radius:2px;border-radius:2px;color:#23282d;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}#photos .photo .options span{cursor:default}#photos .photo .options span:focus,#photos .photo .options span:hover{background-color:#fff}#photos .photo .options a{margin-left:2px}#photos .photo .options a:focus,#photos .photo .options a:hover{background-color:#fff}#photos .photo .options a i{position:relative;top:1px;left:1px}#photos .photo .user-controls{position:absolute;z-index:6;bottom:0;left:0;width:100%;background:rgba(0,0,0,.4);padding:0;opacity:.35;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}#photos .photo .photo-options{float:right;text-align:right;max-width:50%}#photos .photo .fade{-webkit-transition:all .35s ease;-o-transition:all .35s ease;transition:all .35s ease;color:#fff;background:hsla(0,0%,100%,.75);background:transparent;-webkit-border-radius:2px;border-radius:2px;height:34px;line-height:34px;font-size:17px;z-index:6;float:left;margin:1px 1px 1px 0;padding:0;color:hsla(0,0%,100%,.75);border:none!important;outline:none;cursor:pointer}#photos .photo .fade.edit-photo,#photos .photo .fade.edit-photo-admin,#photos .photo .fade.insert,#photos .photo .fade.set-featured{display:inline-block;width:34px;text-align:center;position:relative}#photos .photo .fade.edit-photo-admin i,#photos .photo .fade.edit-photo i,#photos .photo .fade.insert i,#photos .photo .fade.set-featured i{line-height:27px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#photos .photo .fade.edit-photo-admin:focus,#photos .photo .fade.edit-photo-admin:hover,#photos .photo .fade.edit-photo:focus,#photos .photo .fade.edit-photo:hover,#photos .photo .fade.insert:focus,#photos .photo .fade.insert:hover,#photos .photo .fade.set-featured:focus,#photos .photo .fade.set-featured:hover{color:#222;background:hsla(0,0%,100%,.95)}#photos .photo .fade.edit-photo-admin{display:none}#photos .photo .fade.user{background:none;font-size:13px;max-width:48%;cursor:pointer;text-decoration:none;border:none;line-height:35px;height:36px;margin:0}#photos .photo .fade.user:focus,#photos .photo .fade.user:hover{text-decoration:underline}#photos .photo .fade.user .user-wrap{position:relative;padding-left:35px;display:block;width:100%;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#photos .photo .fade.user img{width:20px;max-width:20px;-webkit-border-radius:100%;border-radius:100%;position:absolute;left:8px;top:8px}#photos .photo .notice-msg{position:absolute;z-index:999;top:-40px;left:0;height:40px;line-height:40px;width:100%;background:rgba(0,0,0,.6);text-align:center;color:hsla(0,0%,100%,.9);font-size:12px;margin:0;padding:0;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;opacity:0;z-index:9999}#photos .photo .notice-msg.has-error{top:-40px;opacity:0}#photos .edit-screen{position:absolute;left:0;top:0;width:100%;height:100%;z-index:999;background:hsla(0,0%,100%,.9);opacity:0;visibility:hidden;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;padding:8px;overflow-y:auto;-webkit-overflow-scrolling:touch;border:1px solid #e1e1e1;-webkit-transform:scale(1.025);-ms-transform:scale(1.025);transform:scale(1.025)}#photos .edit-screen.editing{visibility:visible;opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}#photos .edit-screen--controls,#photos .edit-screen--title{display:block;background:#f7f7f7;border:1px solid #e1e1e1;padding:15px;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}#photos .edit-screen--controls .button-primary,#photos .edit-screen--title .button-primary{float:right}#photos .edit-screen--controls{-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}#photos .edit-screen--title{border-bottom:none}#photos .edit-screen--title p{font-size:12px;line-height:1.25;margin:0;color:#999}#photos .edit-screen--title p.heading{color:#222;margin:0 0 5px;font-weight:600;text-transform:uppercase}#photos .edit-screen label{margin:0;padding:15px;display:block;background:#fff;border:1px solid #e1e1e1;border-bottom:none;-webkit-border-radius:2px;border-radius:2px;position:relative}#photos .edit-screen span{display:block;font-size:11px;text-transform:uppercase;font-weight:600;margin:0 0 5px;color:#222;line-height:1}#photos .edit-screen textarea{resize:none}#photos .edit-screen input{font-size:12px;padding:0 5px;margin:0;height:30px;line-height:30px}#photos .edit-screen em{position:absolute;bottom:15px;right:15px;height:30px;line-height:30px;background:#777;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;color:#e1e1e1;font-style:normal;font-size:11px;padding:0 10px}.instant-images-settings{display:none;background-color:#efefef;border-top:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar{padding:20px 25px;overflow:hidden}.instant-images-settings .cnkt-sidebar .cta{float:left;width:50%}@media screen and (max-width:800px){.instant-images-settings .cnkt-sidebar .cta{float:none!important;width:100%!important}}.instant-images-settings .cnkt-sidebar .cta.ii-settings{width:31.333%}.instant-images-settings .cnkt-sidebar .cta.ii-plugins{width:68.666%;width:-webkit-calc(68.666% - 25px);width:calc(68.666% - 25px);float:right}.instant-images-settings .cnkt-sidebar .cta h2{border:none;padding:17px 20px 3px;font-size:16px}.instant-images-settings .cnkt-sidebar .cta h2.w-border{border-top:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta h2+p{padding:0 20px 15px;margin:0!important;border-bottom:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta h2,.instant-images-settings .cnkt-sidebar .cta h2+p{background:#f7f7f7;margin:0}.instant-images-settings .cnkt-sidebar .cta ul.whats-new{list-style:disc;padding:0 0 10px 20px}.instant-images-settings .cnkt-sidebar .cta ul.whats-new li{margin:10px 0 0}.instant-images-settings .cnkt-sidebar .cta ul.whats-new li pre{display:inline-block;margin:0;padding:3px;background:#f7f7f7;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 0 1px #efefef;box-shadow:0 0 0 1px #efefef}.instant-images-settings .cnkt-sidebar .cta{background:#fff;padding:0 0 20px;margin:0 0 20px;overflow:hidden;position:relative;border:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta.padding-bottom{padding-bottom:66px}.instant-images-settings .cnkt-sidebar .cnkt-sidebar h3,.instant-images-settings .cnkt-sidebar .cnkt-sidebar h4{margin-top:0}.instant-images-settings .cnkt-sidebar .cta-wrap{display:block;padding:10px 20px}.instant-images-settings .cnkt-sidebar .cta-wrap h4{padding:10px 0 7px;margin:0}.instant-images-settings .cnkt-sidebar .cta-wrap h4 span{display:inline-block;line-height:1;padding:8px 10px;-webkit-border-radius:2px;border-radius:2px;background:#ffc;color:#666}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin{width:48%;margin:2% 1% 0}@media screen and (max-width:1170px){.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin{width:100%;margin:2% 0 0}}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2{border:none;padding:0;font-size:16px}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2+p{padding:0;margin:0!important;border-bottom:none}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2,.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2+p{background:none;margin:0}.instant-images-settings table{margin-top:5px}.instant-img-container[data-media-popup=true]{background:#fff}.instant-img-container[data-media-popup=true] .header-wrap{display:none}.instant-img-container[data-media-popup=true] .instant-images-wrapper{padding:0 16px}.instant-images-sidebar-icon,.instant-images-sidebar-icon svg{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.instant-images-sidebar-icon svg{height:20px;width:20px}.instant-images-sidebar-icon svg,.instant-images-sidebar-icon svg *{stroke:#5d72c3!important;fill:#5d72c3!important}.components-panel .instant-img-container .load-more-wrap{display:block}.components-panel .no-results{padding:40px}.components-panel .no-results h3{font-size:18px}.components-panel .no-results p{font-size:13px}.components-panel #photos{width:100%;margin:0;padding:5px}.components-panel #photos .photo{width:100%;display:block;opacity:1!important;margin:0 0 5px;padding:0}.components-panel .control-nav{padding:0 16px 8px;border-bottom:1px solid #e2e4e7}.components-panel .control-nav li{font-size:13px}.components-panel .control-nav li a{padding:16px 24px 16px 0;height:auto;line-height:1.2}.components-panel .control-nav li.search-field{float:none;width:100%;padding:0;clear:both}.components-panel .control-nav li.search-field form{height:auto;width:-webkit-calc(100% + 16px);width:calc(100% + 16px);margin-left:-8px}.components-panel .control-nav li.search-field:before{content:"";display:table;clear:both}.components-panel .control-nav li.search-field input{line-height:36px;height:36px;padding-right:8px;padding-left:30px;-webkit-border-radius:0;border-radius:0;border-color:#e2e4e7;font-size:13px;-webkit-border-radius:3px!important;border-radius:3px!important}.components-panel .control-nav li.search-field input.searching{padding-left:30px;background-position:95%}.components-panel .control-nav li.search-field button{position:absolute;right:auto;top:0;width:40px;height:36px;line-height:36px;padding:0;margin:0}.components-panel .control-nav li.search-field .searchResults{right:1px;left:auto;top:1px}.components-panel .control-nav li.search-field .searchResults:after,.components-panel .control-nav li.search-field .searchResults:before{display:none}.media-frame-content .instant-img-container .load-more-wrap{display:block}#tooltip{display:inline-block;padding:8px 10px;background:#fff;position:fixed;left:auto;top:auto;z-index:999;display:block;opacity:0;visibility:hidden;margin-top:-37px;font-size:12px;color:#999;text-align:center;line-height:1;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 2px 3px rgba(0,0,0,.1);box-shadow:0 2px 3px rgba(0,0,0,.1);-webkit-transition:all .15s ease;-o-transition:all .15s ease;transition:all .15s ease}#tooltip:after{top:100%;right:17px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:hsla(0,0%,100%,0);border-top-color:#fff;border-width:5px;margin-left:-5px}#tooltip.over{opacity:.9;visibility:visible}#tooltip.above{margin-top:37px}#tooltip.above:after{top:-5px;border-top:none;border-bottom-color:#fff}.no-results{display:none;padding:150px 100px;text-align:center}.no-results.show{display:block}.no-results h3{font-size:24px;line-height:29px;margin:0 0 10px}.no-results p{font-size:16px;margin:0}@media screen and (max-width:800px){.no-results{padding:50px}}.orientation-list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;padding:7px 0;margin:0 0 10px;border-top:1px solid #efefef;border-bottom:1px solid #efefef;position:relative;top:-7px}.orientation-list span{opacity:.5;margin:0 10px 0 0;font-size:13px}.orientation-list ul{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.orientation-list ul li{margin:0 1px 0 0;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;padding:4px 6px;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;border:1px solid transparent;color:#999;font-size:13px}.orientation-list ul li:hover{color:#111}.orientation-list ul li:focus{border-color:#5d72c3;color:#111;outline:none}.orientation-list ul li.active{background-color:#5d72c3;border-color:#5d72c3;color:#fff;outline:none}.components-panel .orientation-list{position:static;text-align:center;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;border-top:none;background:#f7f7f7;margin-bottom:10px}.components-panel .orientation-list span{display:none}.components-panel .orientation-list ul{padding:0;width:100%;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}
1
+ @import url(//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css);html{overflow-y:scroll}body.media_page_instant-images{background:#fff}body.media_page_instant-images #wpcontent{padding-left:0;padding-bottom:40px}@media screen and (max-width:800px){body.media_page_instant-images #wpcontent{padding-bottom:0}}body.media_page_instant-images #wpbody-content{padding-bottom:0}body.media_page_instant-images #wpfooter{padding-top:0;padding-bottom:0;line-height:40px;background:#f7f7f7;border-top:1px solid #efefef;position:fixed;bottom:0;z-index:1100}body.media_page_instant-images #wpfooter p{line-height:40px}@media screen and (max-width:800px){body.media_page_instant-images #wpfooter{display:none}}.instant-img-container{font-size:14px;color:#666;position:relative}.instant-img-container .offscreen{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}.instant-img-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.instant-img-container a{color:#5d72c3;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease}.instant-img-container a:hover{color:#5568ae;text-decoration:none}.instant-img-container img{max-width:100%}.instant-img-container p{color:#666;width:100%;display:block;clear:both;text-transform:none;padding:0;margin:0 0 15px;font-size:14px}.instant-img-container.loading .loading-block{display:block}.instant-img-container .error-messaging{display:none}.instant-img-container .error-messaging.active{padding:17px 17px 17px 57px;-webkit-border-radius:3px;border-radius:3px;background:#df3333;color:#fff;font-size:13px;margin-bottom:25px;display:block;position:relative}.instant-img-container .error-messaging.active:before{font-family:FontAwesome;content:"\F06A";display:block;left:17px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);position:absolute;font-size:30px;opacity:.75}.instant-img-container .header-wrap{background:#f7f7f7 url(../img/logo-48x48.png) no-repeat 25px 20px;padding:20px 25px 20px 83px;min-height:88px;overflow:hidden;border-bottom:1px solid #efefef;position:relative}@media screen and (max-width:800px){.instant-img-container .header-wrap{background-position:center 20px;padding:80px 25px 20px;text-align:center}}.instant-img-container .header-wrap h1{padding:0;margin:4px 0 0;font-weight:700;font-size:26px;max-width:70%}@media screen and (max-width:800px){.instant-img-container .header-wrap h1{max-width:100%;width:100%;text-align:center}}.instant-img-container .header-wrap h1 em{font-weight:400;font-size:14px;background-color:rgba(0,0,0,.055);color:rgba(0,0,0,.5);display:inline-block;-webkit-border-radius:2px;border-radius:2px;padding:3px;position:relative;top:-2px;left:2px;text-shadow:1px 1px 1px hsla(0,0%,100%,.4);font-style:normal;line-height:1}.instant-img-container .header-wrap h1 span{display:block;padding:3px 0 0;color:#888;font-size:15px;font-weight:400}.instant-img-container .header-wrap button{position:absolute;right:25px;bottom:26px}@media screen and (max-width:800px){.instant-img-container .header-wrap button{position:static;margin-top:20px;display:inline-block}}.instant-img-container .header-wrap button i{margin-right:2px}.instant-img-container .instant-images-wrapper{padding:0 25px;display:block;overflow:hidden;min-height:400px;background:url(../img/ajax-loader-lg.gif) no-repeat 50%}.instant-img-container .instant-images-wrapper.loaded{background:none}.instant-img-container .permissions-warning{padding:0 25px}.instant-img-container .permissions-warning .inner{border-bottom:1px solid #efefef;padding:32px 0}.instant-img-container .permissions-warning input{max-width:500px}.instant-img-container .permissions-warning h3{font-size:22px;margin:0 0 15px}.instant-img-container .permissions-warning h3 i{margin:0 2px 0 0;position:relative}.instant-img-container .permissions-warning p:first-of-type{font-size:18px;margin:0 0 2px}.instant-img-container .loading-block{display:none;padding:50px;background:url(../img/ajax-loader-lg.gif) no-repeat 50%}.instant-img-container .load-more-wrap{margin:1% 0 0;padding:25px 0;text-align:center;display:none;border-top:1px solid #efefef}.instant-img-container .load-more-wrap button{display:inline-block;margin:0;padding:12px 15px;font-size:15px;font-weight:600;-webkit-transition:all .1s ease;-o-transition:all .1s ease;transition:all .1s ease;height:auto;line-height:1;cursor:pointer;background-image:none;background-repeat:no-repeat!important;background-position:15px!important}.instant-img-container .load-more-wrap button.disabled{opacity:.3;cursor:default}.instant-img-container .cnkt-main{width:100%;float:none;background:none!important;position:relative}.instant-img-container h2,.instant-img-container h3,.instant-img-container h4{margin-top:0}.instant-img-container .save-settings p.submit{float:left;margin:0 2px 0 0;width:auto}.instant-img-container .save-settings .loading{width:46px;height:28px;display:none;float:left;background:#fff url(../img/ajax-loader.gif) no-repeat 50%}#TB_ajaxContent{clear:both;line-height:1.4em;overflow:auto;text-align:left;width:100%!important;-webkit-box-sizing:border-box;box-sizing:border-box;padding:15px!important}.cnkt-sidebar .form-table{margin:0;border:none}.cnkt-sidebar .form-table label,.cnkt-sidebar .form-table p,.cnkt-sidebar .form-table td{font-size:13px}.cnkt-sidebar .form-table label{display:block;clear:both;float:none}.cnkt-sidebar .form-table label span{opacity:.8;font-size:13px;font-style:italic}.cnkt-sidebar .form-table th{display:none}.instant-img-container .form-table td{border-top:0;padding:0 0 15px;float:left;width:100%;margin:0}.instant-img-container .form-table tr:first-of-type td{padding:10px 0}.cnkt-main .form-msg,.cnkt-sidebar .form-table .form-msg{display:block;line-height:18px;padding:12px 12px 12px 15px;margin:15px 0 0;color:#666;background-color:#fff9ea;border-left:5px solid #dfd8c2;-webkit-border-radius:2px;border-radius:2px}.cnkt-main .form-msg span,.cnkt-sidebar .form-table .form-msg span{display:block;padding:6px 0 3px}.instant-img-container h1,.instant-img-container h3,.instant-img-container h4{color:#222;margin-top:0}.instant-img-container h4+p{margin-top:-6px}.instant-img-container p.small{font-size:12px;margin-top:-10px;opacity:.7}.instant-img-container ul{padding:0;margin:0;list-style:none}.instant-img-container input,.instant-img-container label,.instant-img-container select,.instant-img-container textarea{-webkit-box-shadow:none;box-shadow:none}.instant-img-container label{padding:5px 0}#unsplash-form-options h2,#unsplash-form-options p.desc{display:none}.instant-img-container input[type=number],.instant-img-container input[type=text],.instant-img-container textarea{padding:10px;line-height:1;border:1px solid #ccc;background:#f7f7f7;width:100%;-webkit-border-radius:2px;border-radius:2px;height:auto}.instant-img-container input[type=text]:focus,.instant-img-container textarea:focus{border-color:#999;-webkit-box-shadow:0 0 3px #ccc;box-shadow:0 0 3px #ccc;background:#efefef}.instant-img-container .spacer{display:block;height:40px;overflow:hidden;clear:both;width:100%}.instant-img-container .spacer.sm{height:20px}.instant-img-container input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset}.instant-img-container .control-nav{display:block;margin:0;padding:25px 0;list-style:none}.instant-img-container .control-nav:after{content:"";display:table;clear:both}.instant-img-container .control-nav li{padding:0;margin:0 3px 0 0;float:left;background:none;font-size:18px;position:relative}.instant-img-container .control-nav li button{padding:0 24px 0 2px;height:48px;line-height:48px;display:block;color:#999;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;background-color:transparent;background-position:96%;background-repeat:no-repeat;border:none;cursor:pointer}.instant-img-container .control-nav li button:focus,.instant-img-container .control-nav li button:hover{color:#111;outline:none;-webkit-box-shadow:none;box-shadow:none}.instant-img-container .control-nav li button:focus{text-decoration:underline}.instant-img-container .control-nav li button.active{color:#333;cursor:default;font-weight:600}.instant-img-container .control-nav li button.loading{background-image:url(../img/ajax-loader.gif)}@media screen and (max-width:800px){.instant-img-container .control-nav li{font-size:16px;margin:0}.instant-img-container .control-nav li button{padding-left:3px}}@media screen and (max-width:600px){.instant-img-container .control-nav li{width:33.333%;text-align:center;margin:0;padding-bottom:15px}}.instant-img-container .control-nav li.search-field{float:right;width:49%;margin:0;max-width:500px}@media screen and (max-width:600px){.instant-img-container .control-nav li.search-field{width:100%;display:block;position:static;padding-bottom:15px;text-align:left;max-width:100%}}.instant-img-container .control-nav li.search-field .searchResults{position:absolute;right:100.5%;top:7px;width:auto;height:34px;line-height:34px;padding:0 30px 0 10px;background:#ffffbf;border:1px solid #ebebae;-webkit-border-radius:3px;border-radius:3px;z-index:99;font-size:13px;font-weight:600;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;color:#444;text-shadow:0 1px 1px hsla(0,0%,100%,.3);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05)}.instant-img-container .control-nav li.search-field .searchResults span{cursor:help}.instant-img-container .control-nav li.search-field .searchResults a,.instant-img-container .control-nav li.search-field .searchResults span{line-height:34px}.instant-img-container .control-nav li.search-field .searchResults button{padding:0 10px;height:32px;line-height:32px;width:30px;position:absolute;left:auto;right:0;top:0}.instant-img-container .control-nav li.search-field .searchResults:after,.instant-img-container .control-nav li.search-field .searchResults:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;z-index:100}.instant-img-container .control-nav li.search-field .searchResults:after{border-color:hsla(62,46%,78%,0);border-left-color:#ffffbf;border-width:6px;margin-top:-6px}.instant-img-container .control-nav li.search-field .searchResults:before{border-color:transparent;border-left-color:#ebebae;border-width:7px;margin-top:-7px}.instant-img-container .control-nav li.search-field .searchResults.hide{opacity:0;visibility:hidden}.instant-img-container .control-nav li.search-field form{padding:0 1px 0 0;margin:0;position:relative;height:48px;display:block}.instant-img-container .control-nav li.search-field form:hover button{opacity:1}.instant-img-container .control-nav li.search-field input{width:100%;padding:0 10px 0 42px;border:1px solid #e1e1e1;background-color:#f7f7f7!important;height:46px;line-height:46px;-webkit-border-radius:3px;border-radius:3px;font-size:16px;-webkit-transition:padding .15s ease;-o-transition:padding .15s ease;transition:padding .15s ease}.instant-img-container .control-nav li.search-field input:focus{border-color:#999;-webkit-box-shadow:0 0 0 4px rgba(0,0,0,.075);box-shadow:0 0 0 4px rgba(0,0,0,.075)}.instant-img-container .control-nav li.search-field input.searching{padding-left:62px;background-image:url(../img/ajax-loader.gif);background-position:37px;background-repeat:no-repeat}.instant-img-container .control-nav li.search-field button{position:absolute;left:-2px;top:-1px;width:48px;height:48px;z-index:1;border:none!important;background:transparent!important;cursor:pointer;color:#666;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;opacity:.5;margin:0;padding:0}.instant-img-container .control-nav li.search-field button:focus,.instant-img-container .control-nav li.search-field button:hover{outline:none;color:#5d72c3}.instant-img-container .control-nav li.search-field input[type=search]::-webkit-input-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}.instant-img-container .control-nav li.search-field input[type=search]:-moz-placeholder,.instant-img-container .control-nav li.search-field input[type=search]::-moz-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}.instant-img-container .control-nav li.search-field input[type=search]:-ms-input-placeholder{color:#ccc;font-weight:300;font-style:normal;font-size:14px}#photos{width:100%;width:calc(100% + 10px);margin:0 0 0 -5px;padding:0;position:relative}#photos .photo{width:20%;margin:0;padding:0 5px 10px;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}#photos .photo--wrap{position:relative}#photos .photo.in-view{opacity:1}#photos .photo.in-progress .fade{opacity:0!important;visibility:hidden!important}#photos .photo .img-wrap{display:block;overflow:hidden;position:relative}@media screen and (min-width:2000px){#photos .photo{width:20%}}@media screen and (max-width:1570px){#photos .photo{width:25%}}@media screen and (max-width:1270px){#photos .photo{width:33.333333%}}@media screen and (max-width:800px){#photos .photo{width:50%}}@media screen and (max-width:600px){#photos .photo{width:100%;margin:0 0 2%}}#photos .photo:focus a.upload img{opacity:.6}#photos .photo:focus .fade{opacity:1;visibility:visible}#photos .photo:focus .fade.user{opacity:.7}#photos .photo:focus-within .user-controls{opacity:1}#photos .photo a.upload{display:block;position:relative;background-color:#222;background-position:50%;background-repeat:no-repeat;background-image:url(../img/ajax-loader.gif);overflow:hidden}#photos .photo a.upload.loaded{background-image:none}#photos .photo a.upload:active,#photos .photo a.upload:focus{outline:none;border:none}#photos .photo a.upload img{-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;width:100%;height:auto!important;padding:0;vertical-align:top}#photos .photo a.upload .status{visibility:hidden;opacity:0;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;width:60px;height:60px;line-height:60px;-webkit-border-radius:4px;border-radius:4px;position:absolute;left:50%;top:50%;z-index:5;-webkit-transform:translate(-50%,-50%) scale(1.2);-ms-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.25);box-shadow:0 2px 3px rgba(0,0,0,.25);background-position:50%;background-repeat:no-repeat}#photos .photo a.upload .status:before{font-family:FontAwesome;display:block;color:#fff;font-size:24px;opacity:.8}#photos .photo a.upload .status a{color:#fff}#photos .photo a.upload.errors .status,#photos .photo a.upload.success .status,#photos .photo a.upload.uploading .status{text-align:center;left:50%;top:50%;-webkit-transform:translate(-50%,-50%) scale(1);-ms-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}#photos .photo a.upload.uploading{cursor:default!important}#photos .photo a.upload.uploading .status{visibility:visible;opacity:1;background:hsla(0,0%,100%,.95) url(../img/ajax-loader-lg.gif) no-repeat 50%;-webkit-background-size:24px 24px;background-size:24px 24px}#photos .photo a.upload.uploading .status:before{display:none}#photos .photo a.upload.success{cursor:default!important}#photos .photo a.upload.success .status{visibility:visible;opacity:1;background-color:#63d875}#photos .photo a.upload.success .status:before{content:"\F00C";color:#fff}#photos .photo a.upload.success img{-webkit-transform:scale(1)!important;-ms-transform:scale(1)!important;transform:scale(1)!important}#photos .photo a.upload.errors{cursor:help!important}#photos .photo a.upload.errors .status{visibility:visible;opacity:1;background-color:#df3333}#photos .photo a.upload.errors .status:before{content:"\F12A";color:#fff;opacity:.8}#photos .photo.uploaded a.upload img{opacity:.25!important}#photos .photo.uploaded .options,#photos .photo.uploaded .user-controls{opacity:0!important;visibility:hidden!important}#photos .photo.in-progress a.upload img,#photos .photo:hover a.upload img{opacity:.7;-webkit-transform:scale(1.075);-ms-transform:scale(1.075);transform:scale(1.075)}#photos .photo.in-progress .options,#photos .photo:hover .options{opacity:1;visibility:visible}#photos .photo.in-progress .options i.heart-like,#photos .photo:hover .options i.heart-like{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}#photos .photo.in-progress .user-controls,#photos .photo:hover .user-controls{opacity:1}#photos .photo.in-progress .notice-msg{top:0;opacity:1}#photos .photo.in-progress .options,#photos .photo.in-progress .user-controls{opacity:0!important}#photos .photo .options{position:absolute;top:5px;right:5px;z-index:6;display:inline-block;width:auto;cursor:default!important;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;opacity:0;visibility:hidden;font-size:13px}#photos .photo .options i{font-size:14px}#photos .photo .options i.heart-like{color:#d13714;-webkit-transition:all .25s ease .05s;-o-transition:all .25s ease .05s;transition:all .25s ease .05s;-webkit-transform:scale(.55);-ms-transform:scale(.55);transform:scale(.55);margin-right:2px;position:relative;top:0;font-size:14px;opacity:.9}#photos .photo .options a,#photos .photo .options span{display:inline-block;vertical-align:top;line-height:30px;padding:0 10px;padding-top:1px;background:hsla(0,0%,100%,.5);margin:0;-webkit-border-radius:2px;border-radius:2px;color:#23282d;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}#photos .photo .options span{cursor:default}#photos .photo .options span:focus,#photos .photo .options span:hover{background-color:#fff}#photos .photo .options a{margin-left:2px}#photos .photo .options a:focus,#photos .photo .options a:hover{background-color:#fff}#photos .photo .options a i{position:relative;top:1px;left:1px}#photos .photo .user-controls{position:absolute;z-index:6;bottom:0;left:0;width:100%;background:rgba(0,0,0,.4);padding:0;opacity:.35;-webkit-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}#photos .photo .photo-options{float:right;text-align:right;max-width:50%}#photos .photo .fade{-webkit-transition:all .35s ease;-o-transition:all .35s ease;transition:all .35s ease;color:#fff;background:hsla(0,0%,100%,.75);background:transparent;-webkit-border-radius:2px;border-radius:2px;height:34px;line-height:34px;font-size:17px;z-index:6;float:left;margin:1px 1px 1px 0;padding:0;color:hsla(0,0%,100%,.75);border:none!important;outline:none;cursor:pointer}#photos .photo .fade.edit-photo,#photos .photo .fade.edit-photo-admin,#photos .photo .fade.insert,#photos .photo .fade.set-featured{display:inline-block;width:34px;text-align:center;position:relative}#photos .photo .fade.edit-photo-admin i,#photos .photo .fade.edit-photo i,#photos .photo .fade.insert i,#photos .photo .fade.set-featured i{line-height:27px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#photos .photo .fade.edit-photo-admin:focus,#photos .photo .fade.edit-photo-admin:hover,#photos .photo .fade.edit-photo:focus,#photos .photo .fade.edit-photo:hover,#photos .photo .fade.insert:focus,#photos .photo .fade.insert:hover,#photos .photo .fade.set-featured:focus,#photos .photo .fade.set-featured:hover{color:#222;background:hsla(0,0%,100%,.95)}#photos .photo .fade.edit-photo-admin{display:none}#photos .photo .fade.user{background:none;font-size:13px;max-width:48%;cursor:pointer;text-decoration:none;border:none;line-height:35px;height:36px;margin:0}#photos .photo .fade.user:focus,#photos .photo .fade.user:hover{text-decoration:underline}#photos .photo .fade.user .user-wrap{position:relative;padding-left:35px;display:block;width:100%;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#photos .photo .fade.user img{width:20px;max-width:20px;-webkit-border-radius:100%;border-radius:100%;position:absolute;left:8px;top:8px}#photos .photo .notice-msg{position:absolute;z-index:999;top:-40px;left:0;height:40px;line-height:40px;width:100%;background:rgba(0,0,0,.6);text-align:center;color:hsla(0,0%,100%,.9);font-size:12px;margin:0;padding:0;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;opacity:0;z-index:9999}#photos .photo .notice-msg.has-error{top:-40px;opacity:0}#photos .edit-screen{position:absolute;left:0;top:0;width:100%;height:100%;z-index:999;background:hsla(0,0%,100%,.9);opacity:0;visibility:hidden;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;padding:8px;overflow-y:auto;-webkit-overflow-scrolling:touch;border:1px solid #e1e1e1;-webkit-transform:scale(1.025);-ms-transform:scale(1.025);transform:scale(1.025)}#photos .edit-screen.editing{visibility:visible;opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}#photos .edit-screen--controls,#photos .edit-screen--title{display:block;background:#f7f7f7;border:1px solid #e1e1e1;padding:15px;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}#photos .edit-screen--controls .button-primary,#photos .edit-screen--title .button-primary{float:right}#photos .edit-screen--controls{-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}#photos .edit-screen--title{border-bottom:none}#photos .edit-screen--title p{font-size:12px;line-height:1.25;margin:0;color:#999}#photos .edit-screen--title p.heading{color:#222;margin:0 0 5px;font-weight:600;text-transform:uppercase}#photos .edit-screen label{margin:0;padding:15px;display:block;background:#fff;border:1px solid #e1e1e1;border-bottom:none;-webkit-border-radius:2px;border-radius:2px;position:relative}#photos .edit-screen span{display:block;font-size:11px;text-transform:uppercase;font-weight:600;margin:0 0 5px;color:#222;line-height:1}#photos .edit-screen textarea{resize:none}#photos .edit-screen input{font-size:12px;padding:0 5px;margin:0;height:30px;line-height:30px}#photos .edit-screen em{position:absolute;bottom:15px;right:15px;height:30px;line-height:30px;background:#777;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;color:#e1e1e1;font-style:normal;font-size:11px;padding:0 10px}.instant-images-settings{display:none;background-color:#efefef;border-top:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar{padding:20px 25px;overflow:hidden}.instant-images-settings .cnkt-sidebar .cta{float:left;width:50%}@media screen and (max-width:800px){.instant-images-settings .cnkt-sidebar .cta{float:none!important;width:100%!important}}.instant-images-settings .cnkt-sidebar .cta.ii-settings{width:31.333%}.instant-images-settings .cnkt-sidebar .cta.ii-plugins{width:68.666%;width:calc(68.666% - 25px);float:right}.instant-images-settings .cnkt-sidebar .cta h2{border:none;padding:17px 20px 3px;font-size:16px}.instant-images-settings .cnkt-sidebar .cta h2.w-border{border-top:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta h2+p{padding:0 20px 15px;margin:0!important;border-bottom:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta h2,.instant-images-settings .cnkt-sidebar .cta h2+p{background:#f7f7f7;margin:0}.instant-images-settings .cnkt-sidebar .cta ul.whats-new{list-style:disc;padding:0 0 10px 20px}.instant-images-settings .cnkt-sidebar .cta ul.whats-new li{margin:10px 0 0}.instant-images-settings .cnkt-sidebar .cta ul.whats-new li pre{display:inline-block;margin:0;padding:3px;background:#f7f7f7;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 0 1px #efefef;box-shadow:0 0 0 1px #efefef}.instant-images-settings .cnkt-sidebar .cta{background:#fff;padding:0 0 20px;margin:0 0 20px;overflow:hidden;position:relative;border:1px solid #e7e7e7}.instant-images-settings .cnkt-sidebar .cta.padding-bottom{padding-bottom:66px}.instant-images-settings .cnkt-sidebar .cnkt-sidebar h3,.instant-images-settings .cnkt-sidebar .cnkt-sidebar h4{margin-top:0}.instant-images-settings .cnkt-sidebar .cta-wrap{display:block;padding:10px 20px}.instant-images-settings .cnkt-sidebar .cta-wrap h4{padding:10px 0 7px;margin:0}.instant-images-settings .cnkt-sidebar .cta-wrap h4 span{display:inline-block;line-height:1;padding:8px 10px;-webkit-border-radius:2px;border-radius:2px;background:#ffc;color:#666}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin{width:48%;margin:2% 1% 0}@media screen and (max-width:1170px){.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin{width:100%;margin:2% 0 0}}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2{border:none;padding:0;font-size:16px}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2+p{padding:0;margin:0!important;border-bottom:none}.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2,.instant-images-settings .cnkt-sidebar .cnkt-plugin-installer .plugin h2+p{background:none;margin:0}.instant-images-settings table{margin-top:5px}.instant-img-container[data-media-popup=true]{background:#fff}.instant-img-container[data-media-popup=true] .header-wrap{display:none}.instant-img-container[data-media-popup=true] .instant-images-wrapper{padding:0 16px}.instant-images-sidebar-icon,.instant-images-sidebar-icon svg{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.instant-images-sidebar-icon svg{height:20px;width:20px}.instant-images-sidebar-icon svg,.instant-images-sidebar-icon svg *{stroke:#5d72c3!important;fill:#5d72c3!important}.components-panel .instant-img-container .load-more-wrap{display:block}.components-panel .no-results{padding:40px}.components-panel .no-results h3{font-size:18px}.components-panel .no-results p{font-size:13px}.components-panel #photos{width:100%;margin:0;padding:5px}.components-panel #photos .photo{width:100%;display:block;opacity:1!important;margin:0 0 5px;padding:0}.components-panel .control-nav{padding:0 16px 8px;border-bottom:1px solid #e2e4e7}.components-panel .control-nav li{font-size:13px}.components-panel .control-nav li a{padding:16px 24px 16px 0;height:auto;line-height:1.2}.components-panel .control-nav li.search-field{float:none;width:100%;padding:0;clear:both}.components-panel .control-nav li.search-field form{height:auto;width:calc(100% + 16px);margin-left:-8px}.components-panel .control-nav li.search-field:before{content:"";display:table;clear:both}.components-panel .control-nav li.search-field input{line-height:36px;height:36px;padding-right:8px;padding-left:30px;-webkit-border-radius:0;border-radius:0;border-color:#e2e4e7;font-size:13px;-webkit-border-radius:3px!important;border-radius:3px!important}.components-panel .control-nav li.search-field input.searching{padding-left:30px;background-position:95%}.components-panel .control-nav li.search-field button{position:absolute;right:auto;top:0;width:40px;height:36px;line-height:36px;padding:0;margin:0}.components-panel .control-nav li.search-field .searchResults{right:1px;left:auto;top:1px}.components-panel .control-nav li.search-field .searchResults:after,.components-panel .control-nav li.search-field .searchResults:before{display:none}.media-frame-content .instant-img-container .load-more-wrap{display:block}.instant-img-container #tooltip{display:inline-block;padding:8px 10px;background:#fff;position:fixed;left:auto;top:auto;z-index:999;display:block;opacity:0;visibility:hidden;margin-top:-37px;font-size:12px;color:#999;text-align:center;line-height:1;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 2px 3px rgba(0,0,0,.1);box-shadow:0 2px 3px rgba(0,0,0,.1);-webkit-transition:all .15s ease;-o-transition:all .15s ease;transition:all .15s ease}.instant-img-container #tooltip:after{top:100%;right:17px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:hsla(0,0%,100%,0);border-top-color:#fff;border-width:5px;margin-left:-5px}.instant-img-container #tooltip.over{opacity:.9;visibility:visible}.instant-img-container #tooltip.above{margin-top:37px}.instant-img-container #tooltip.above:after{top:-5px;border-top:none;border-bottom-color:#fff}.no-results{display:none;padding:150px 100px;text-align:center}.no-results.show{display:block}.no-results h3{font-size:24px;line-height:29px;margin:0 0 10px}.no-results p{font-size:16px;margin:0}@media screen and (max-width:800px){.no-results{padding:50px}}.orientation-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:7px 0;margin:0 0 10px;border-top:1px solid #efefef;border-bottom:1px solid #efefef;position:relative;top:-7px}.orientation-list span{opacity:.5;margin:0 10px 0 0;font-size:13px}.orientation-list ul{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex}.orientation-list ul li{margin:0 1px 0 0;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;padding:4px 6px;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;border:1px solid transparent;color:#999;font-size:13px}.orientation-list ul li:hover{color:#111}.orientation-list ul li:focus{border-color:#5d72c3;color:#111;outline:none}.orientation-list ul li.active{background-color:#5d72c3;border-color:#5d72c3;color:#fff;outline:none}.components-panel .orientation-list{position:static;text-align:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-top:none;background:#f7f7f7;margin-bottom:10px}.components-panel .orientation-list span{display:none}.components-panel .orientation-list ul{padding:0;width:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
dist/img/ajax-loader-lg.gif CHANGED
File without changes
dist/img/ajax-loader.gif CHANGED
File without changes
dist/img/logo-48x48.png CHANGED
Binary file
dist/js/instant-images-block.js CHANGED
@@ -109,11 +109,12 @@ module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/li
109
 
110
  var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
111
  var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js");
 
112
  var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
 
113
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js");
114
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
115
  var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js");
116
- var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(/*! ./../helpers/btoa */ "./node_modules/axios/lib/helpers/btoa.js");
117
 
118
  module.exports = function xhrAdapter(config) {
119
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -125,38 +126,23 @@ module.exports = function xhrAdapter(config) {
125
  }
126
 
127
  var request = new XMLHttpRequest();
128
- var loadEvent = 'onreadystatechange';
129
- var xDomain = false;
130
-
131
- // For IE 8/9 CORS support
132
- // Only supports POST and GET calls and doesn't returns the response headers.
133
- // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
134
- if ( true &&
135
- typeof window !== 'undefined' &&
136
- window.XDomainRequest && !('withCredentials' in request) &&
137
- !isURLSameOrigin(config.url)) {
138
- request = new window.XDomainRequest();
139
- loadEvent = 'onload';
140
- xDomain = true;
141
- request.onprogress = function handleProgress() {};
142
- request.ontimeout = function handleTimeout() {};
143
- }
144
 
145
  // HTTP basic authentication
146
  if (config.auth) {
147
  var username = config.auth.username || '';
148
- var password = config.auth.password || '';
149
  requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
150
  }
151
 
152
- request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
 
153
 
154
  // Set the request timeout in MS
155
  request.timeout = config.timeout;
156
 
157
  // Listen for ready state
158
- request[loadEvent] = function handleLoad() {
159
- if (!request || (request.readyState !== 4 && !xDomain)) {
160
  return;
161
  }
162
 
@@ -173,9 +159,8 @@ module.exports = function xhrAdapter(config) {
173
  var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
174
  var response = {
175
  data: responseData,
176
- // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)
177
- status: request.status === 1223 ? 204 : request.status,
178
- statusText: request.status === 1223 ? 'No Content' : request.statusText,
179
  headers: responseHeaders,
180
  config: config,
181
  request: request
@@ -187,6 +172,18 @@ module.exports = function xhrAdapter(config) {
187
  request = null;
188
  };
189
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  // Handle low level network errors
191
  request.onerror = function handleError() {
192
  // Real errors are hidden from us by the browser
@@ -199,7 +196,11 @@ module.exports = function xhrAdapter(config) {
199
 
200
  // Handle timeout
201
  request.ontimeout = function handleTimeout() {
202
- reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
 
 
 
 
203
  request));
204
 
205
  // Clean up request
@@ -210,12 +211,10 @@ module.exports = function xhrAdapter(config) {
210
  // This is only done if running in a standard browser environment.
211
  // Specifically not if we're in a web worker, or react-native.
212
  if (utils.isStandardBrowserEnv()) {
213
- var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js");
214
-
215
  // Add xsrf header
216
- var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
217
- cookies.read(config.xsrfCookieName) :
218
- undefined;
219
 
220
  if (xsrfValue) {
221
  requestHeaders[config.xsrfHeaderName] = xsrfValue;
@@ -236,8 +235,8 @@ module.exports = function xhrAdapter(config) {
236
  }
237
 
238
  // Add withCredentials to request if needed
239
- if (config.withCredentials) {
240
- request.withCredentials = true;
241
  }
242
 
243
  // Add responseType to request if needed
@@ -277,7 +276,7 @@ module.exports = function xhrAdapter(config) {
277
  });
278
  }
279
 
280
- if (requestData === undefined) {
281
  requestData = null;
282
  }
283
 
@@ -302,6 +301,7 @@ module.exports = function xhrAdapter(config) {
302
  var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
303
  var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
304
  var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js");
 
305
  var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults.js");
306
 
307
  /**
@@ -331,7 +331,7 @@ axios.Axios = Axios;
331
 
332
  // Factory for creating new instances
333
  axios.create = function create(instanceConfig) {
334
- return createInstance(utils.merge(defaults, instanceConfig));
335
  };
336
 
337
  // Expose Cancel & CancelToken
@@ -345,6 +345,9 @@ axios.all = function all(promises) {
345
  };
346
  axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js");
347
 
 
 
 
348
  module.exports = axios;
349
 
350
  // Allow use of default import syntax in TypeScript
@@ -480,10 +483,11 @@ module.exports = function isCancel(value) {
480
  "use strict";
481
 
482
 
483
- var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/axios/lib/defaults.js");
484
  var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
 
485
  var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js");
486
  var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js");
 
487
 
488
  /**
489
  * Create a new instance of Axios
@@ -507,13 +511,22 @@ Axios.prototype.request = function request(config) {
507
  /*eslint no-param-reassign:0*/
508
  // Allow for axios('example/url'[, config]) a la fetch API
509
  if (typeof config === 'string') {
510
- config = utils.merge({
511
- url: arguments[0]
512
- }, arguments[1]);
 
513
  }
514
 
515
- config = utils.merge(defaults, {method: 'get'}, this.defaults, config);
516
- config.method = config.method.toLowerCase();
 
 
 
 
 
 
 
 
517
 
518
  // Hook up interceptors middleware
519
  var chain = [dispatchRequest, undefined];
@@ -534,13 +547,19 @@ Axios.prototype.request = function request(config) {
534
  return promise;
535
  };
536
 
 
 
 
 
 
537
  // Provide aliases for supported request methods
538
  utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
539
  /*eslint func-names:0*/
540
  Axios.prototype[method] = function(url, config) {
541
- return this.request(utils.merge(config || {}, {
542
  method: method,
543
- url: url
 
544
  }));
545
  };
546
  });
@@ -548,7 +567,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
548
  utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
549
  /*eslint func-names:0*/
550
  Axios.prototype[method] = function(url, data, config) {
551
- return this.request(utils.merge(config || {}, {
552
  method: method,
553
  url: url,
554
  data: data
@@ -623,6 +642,38 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
623
  module.exports = InterceptorManager;
624
 
625
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
  /***/ }),
627
 
628
  /***/ "./node_modules/axios/lib/core/createError.js":
@@ -669,8 +720,6 @@ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/util
669
  var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js");
670
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
671
  var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults.js");
672
- var isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
673
- var combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js");
674
 
675
  /**
676
  * Throws a `Cancel` if cancellation has been requested.
@@ -690,11 +739,6 @@ function throwIfCancellationRequested(config) {
690
  module.exports = function dispatchRequest(config) {
691
  throwIfCancellationRequested(config);
692
 
693
- // Support baseURL config
694
- if (config.baseURL && !isAbsoluteURL(config.url)) {
695
- config.url = combineURLs(config.baseURL, config.url);
696
- }
697
-
698
  // Ensure headers exist
699
  config.headers = config.headers || {};
700
 
@@ -709,7 +753,7 @@ module.exports = function dispatchRequest(config) {
709
  config.headers = utils.merge(
710
  config.headers.common || {},
711
  config.headers[config.method] || {},
712
- config.headers || {}
713
  );
714
 
715
  utils.forEach(
@@ -778,12 +822,132 @@ module.exports = function enhanceError(error, config, code, request, response) {
778
  if (code) {
779
  error.code = code;
780
  }
 
781
  error.request = request;
782
  error.response = response;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  return error;
784
  };
785
 
786
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
787
  /***/ }),
788
 
789
  /***/ "./node_modules/axios/lib/core/settle.js":
@@ -807,7 +971,6 @@ var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios
807
  */
808
  module.exports = function settle(resolve, reject, response) {
809
  var validateStatus = response.config.validateStatus;
810
- // Note: status is not exposed by XDomainRequest
811
  if (!response.status || !validateStatus || validateStatus(response.status)) {
812
  resolve(response);
813
  } else {
@@ -884,7 +1047,7 @@ function getDefaultAdapter() {
884
  if (typeof XMLHttpRequest !== 'undefined') {
885
  // For browsers use XHR adapter
886
  adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js");
887
- } else if (typeof process !== 'undefined') {
888
  // For node use HTTP adapter
889
  adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/axios/lib/adapters/xhr.js");
890
  }
@@ -895,6 +1058,7 @@ var defaults = {
895
  adapter: getDefaultAdapter(),
896
 
897
  transformRequest: [function transformRequest(data, headers) {
 
898
  normalizeHeaderName(headers, 'Content-Type');
899
  if (utils.isFormData(data) ||
900
  utils.isArrayBuffer(data) ||
@@ -939,6 +1103,7 @@ var defaults = {
939
  xsrfHeaderName: 'X-XSRF-TOKEN',
940
 
941
  maxContentLength: -1,
 
942
 
943
  validateStatus: function validateStatus(status) {
944
  return status >= 200 && status < 300;
@@ -986,54 +1151,6 @@ module.exports = function bind(fn, thisArg) {
986
  };
987
 
988
 
989
- /***/ }),
990
-
991
- /***/ "./node_modules/axios/lib/helpers/btoa.js":
992
- /*!************************************************!*\
993
- !*** ./node_modules/axios/lib/helpers/btoa.js ***!
994
- \************************************************/
995
- /*! no static exports found */
996
- /***/ (function(module, exports, __webpack_require__) {
997
-
998
- "use strict";
999
-
1000
-
1001
- // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
1002
-
1003
- var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
1004
-
1005
- function E() {
1006
- this.message = 'String contains an invalid character';
1007
- }
1008
- E.prototype = new Error;
1009
- E.prototype.code = 5;
1010
- E.prototype.name = 'InvalidCharacterError';
1011
-
1012
- function btoa(input) {
1013
- var str = String(input);
1014
- var output = '';
1015
- for (
1016
- // initialize result and counter
1017
- var block, charCode, idx = 0, map = chars;
1018
- // if the next str index does not exist:
1019
- // change the mapping table to "="
1020
- // check if d has no fractional digits
1021
- str.charAt(idx | 0) || (map = '=', idx % 1);
1022
- // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
1023
- output += map.charAt(63 & block >> 8 - idx % 1 * 8)
1024
- ) {
1025
- charCode = str.charCodeAt(idx += 3 / 4);
1026
- if (charCode > 0xFF) {
1027
- throw new E();
1028
- }
1029
- block = block << 8 | charCode;
1030
- }
1031
- return output;
1032
- }
1033
-
1034
- module.exports = btoa;
1035
-
1036
-
1037
  /***/ }),
1038
 
1039
  /***/ "./node_modules/axios/lib/helpers/buildURL.js":
@@ -1050,7 +1167,6 @@ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/util
1050
 
1051
  function encode(val) {
1052
  return encodeURIComponent(val).
1053
- replace(/%40/gi, '@').
1054
  replace(/%3A/gi, ':').
1055
  replace(/%24/g, '$').
1056
  replace(/%2C/gi, ',').
@@ -1105,6 +1221,11 @@ module.exports = function buildURL(url, params, paramsSerializer) {
1105
  }
1106
 
1107
  if (serializedParams) {
 
 
 
 
 
1108
  url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1109
  }
1110
 
@@ -1156,50 +1277,50 @@ module.exports = (
1156
  utils.isStandardBrowserEnv() ?
1157
 
1158
  // Standard browser envs support document.cookie
1159
- (function standardBrowserEnv() {
1160
- return {
1161
- write: function write(name, value, expires, path, domain, secure) {
1162
- var cookie = [];
1163
- cookie.push(name + '=' + encodeURIComponent(value));
1164
 
1165
- if (utils.isNumber(expires)) {
1166
- cookie.push('expires=' + new Date(expires).toGMTString());
1167
- }
1168
 
1169
- if (utils.isString(path)) {
1170
- cookie.push('path=' + path);
1171
- }
1172
 
1173
- if (utils.isString(domain)) {
1174
- cookie.push('domain=' + domain);
1175
- }
1176
 
1177
- if (secure === true) {
1178
- cookie.push('secure');
1179
- }
1180
 
1181
- document.cookie = cookie.join('; ');
1182
- },
1183
 
1184
- read: function read(name) {
1185
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1186
- return (match ? decodeURIComponent(match[3]) : null);
1187
- },
1188
 
1189
- remove: function remove(name) {
1190
- this.write(name, '', Date.now() - 86400000);
1191
- }
1192
- };