{instant_img_localize.edit_details}
583 |{instant_img_localize.edit_details_intro}.
584 |├── .babelrc
├── .jshintrc
├── .gitignore
├── dist
├── img
│ ├── logo-48x48.png
│ ├── ajax-loader.gif
│ └── ajax-loader-lg.gif
└── js
│ ├── instant-images-styles.min.js
│ └── instant-images-styles.js
├── src
├── img
│ ├── ajax-loader.gif
│ ├── logo-48x48.png
│ ├── ajax-loader-lg.gif
│ └── icon-256x256.png
├── js
│ ├── components
│ │ ├── API.js
│ │ ├── ResultsToolTip.js
│ │ ├── Helpers.js
│ │ ├── PhotoList.js
│ │ └── Photo.js
│ ├── block
│ │ ├── components
│ │ │ ├── setFeaturedImage.js
│ │ │ ├── insertImage.js
│ │ │ ├── unsplash
│ │ │ │ ├── menu.js
│ │ │ │ └── index.js
│ │ │ └── icon.js
│ │ └── index.js
│ └── index.js
└── scss
│ ├── partials
│ ├── _editor.scss
│ ├── _no-results.scss
│ ├── _gutenberg.scss
│ ├── _onboarding.scss
│ ├── _settings.scss
│ ├── _nav.scss
│ ├── _admin.scss
│ └── _photos.scss
│ └── style.scss
├── postcss.config.js
├── admin
├── assets
│ ├── img
│ │ └── bolt.svg
│ └── js
│ │ └── admin.js
├── includes
│ ├── cta
│ │ └── permissions.php
│ ├── unsplash-settings.php
│ └── settings.php
├── views
│ └── unsplash.php
└── admin.php
├── .editorconfig
├── vendor
└── connekt-plugin-installer
│ ├── .editorconfig
│ ├── README.md
│ ├── assets
│ ├── installer.js
│ └── installer.css
│ ├── class-connekt-plugin-installer.php
│ └── LICENSE
├── webpack
├── dev.config.js
└── prod.config.js
├── api
├── test.php
├── upload.php
└── resize.php
├── webpack.config.js
├── package.json
├── instant-images.php
├── lang
└── instant-images.pot
├── README.txt
└── LICENSE.txt
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["env"]
3 | }
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "esversion": 6
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.map
2 | /node_nodules
3 | .DS_Store
4 |
--------------------------------------------------------------------------------
/dist/img/logo-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/dist/img/logo-48x48.png
--------------------------------------------------------------------------------
/src/img/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/src/img/ajax-loader.gif
--------------------------------------------------------------------------------
/src/img/logo-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/src/img/logo-48x48.png
--------------------------------------------------------------------------------
/dist/img/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/dist/img/ajax-loader.gif
--------------------------------------------------------------------------------
/src/img/ajax-loader-lg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/src/img/ajax-loader-lg.gif
--------------------------------------------------------------------------------
/src/img/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/src/img/icon-256x256.png
--------------------------------------------------------------------------------
/dist/img/ajax-loader-lg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/derweili/instant-images/master/dist/img/ajax-loader-lg.gif
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | 'autoprefixer': {browsers: ['last 10 versions']},
4 | }
5 | }
--------------------------------------------------------------------------------
/admin/assets/img/bolt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/js/components/API.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | photo_api: 'https://api.unsplash.com/photos',
3 | search_api: 'https://api.unsplash.com/search/photos',
4 | app_id: '/?client_id='+ instant_img_localize.unsplash_app_id,
5 | posts_per_page: '&per_page=20'
6 | }
--------------------------------------------------------------------------------
/src/js/block/components/setFeaturedImage.js:
--------------------------------------------------------------------------------
1 | const { dispatch } = wp.data;
2 |
3 | const SetFeaturedImage = (imageId) => {
4 | if(imageId === null){
5 | return false;
6 | }
7 | dispatch("core/editor").editPost({ featured_media: imageId });
8 | }
9 | export default SetFeaturedImage;
--------------------------------------------------------------------------------
/src/scss/partials/_editor.scss:
--------------------------------------------------------------------------------
1 | // Media context popup window
2 | .instant-img-container[data-media-popup="true"]{
3 | background: #fff;
4 | .header-wrap{
5 | display: none;
6 | }
7 | .instant-images-wrapper{
8 | padding: 0 16px;
9 | }
10 | #photos{
11 | .photo{}
12 | }
13 | }
--------------------------------------------------------------------------------
/src/scss/style.scss:
--------------------------------------------------------------------------------
1 | @import url('//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
2 | @import 'partials/admin';
3 | @import 'partials/nav';
4 | @import 'partials/photos';
5 | @import 'partials/settings';
6 | @import 'partials/editor';
7 | @import 'partials/gutenberg';
8 | @import 'partials/no-results';
--------------------------------------------------------------------------------
/src/scss/partials/_no-results.scss:
--------------------------------------------------------------------------------
1 | .no-results{
2 | display: none;
3 | padding: 150px 100px;
4 | text-align: center;
5 | &.show{
6 | display: block;
7 | }
8 | h3{
9 | font-size: 24px;
10 | line-height: 29px;
11 | margin: 0 0 10px;
12 | }
13 | p{
14 | font-size: 16px;
15 | margin: 0;
16 | }
17 | @media screen and (max-width: $small){
18 | padding: 50px;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/js/block/components/insertImage.js:
--------------------------------------------------------------------------------
1 | const { createBlock } = wp.blocks;
2 |
3 | const InsertImage = (url = '', caption = '', alt = '') => {
4 | if(url === ''){
5 | return false;
6 | }
7 | const block = createBlock("core/image", {
8 | url: url,
9 | caption: caption,
10 | alt: alt
11 | });
12 | wp.data.dispatch('core/editor').insertBlocks(block)
13 | }
14 | export default InsertImage;
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | # PHP PSR-2 Coding Standards
6 | # http://www.php-fig.org/psr/psr-2/
7 |
8 | root = true
9 |
10 | [*]
11 | charset = utf-8
12 | end_of_line = lf
13 | insert_final_newline = true
14 | trim_trailing_whitespace = true
15 | indent_style = tab
16 | indent_size = 3
17 |
--------------------------------------------------------------------------------
/vendor/connekt-plugin-installer/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | # PHP PSR-2 Coding Standards
6 | # http://www.php-fig.org/psr/psr-2/
7 |
8 | root = true
9 |
10 | [*]
11 | charset = utf-8
12 | end_of_line = lf
13 | insert_final_newline = true
14 | trim_trailing_whitespace = true
15 | indent_style = tab
16 | indent_size = 3
17 |
--------------------------------------------------------------------------------
/src/js/block/components/unsplash/menu.js:
--------------------------------------------------------------------------------
1 | import classnames from "classnames";
2 | import Icon from "../icon";
3 |
4 | const { Component } = wp.element;
5 | const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;
6 |
7 | const UnsplashMenu = () => (
8 |
'; 75 | //print_r($api); 76 | //echo ''; 77 | 78 | 79 | if ( !is_wp_error( $api ) ) { // confirm error free 80 | 81 | $main_plugin_file = Connekt_Plugin_Installer::get_plugin_file($plugin['slug']); // Get main plugin file 82 | //echo $main_plugin_file; 83 | if(self::check_file_extension($main_plugin_file)){ // check file extension 84 | if(is_plugin_active($main_plugin_file)){ 85 | // plugin activation, confirmed! 86 | $button_classes = 'button disabled'; 87 | $button_text = __('Activated', 'framework'); 88 | } else { 89 | // It's installed, let's activate it 90 | $button_classes = 'activate button button-primary'; 91 | $button_text = __('Activate', 'framework'); 92 | } 93 | } 94 | 95 | // Send plugin data to template 96 | self::render_template($plugin, $api, $button_text, $button_classes); 97 | 98 | } 99 | 100 | endforeach; 101 | ?> 102 |
short_description; ?>
128 | 129 | 130 |{ instant_img_localize.no_results_desc }
453 |{instant_img_localize.edit_details}
583 |{instant_img_localize.edit_details_intro}.
584 |