Skip to content

Commit

Permalink
Merge pull request #32 from uploadcare/fix/errors
Browse files Browse the repository at this point in the history
Fix initialization plugin error
  • Loading branch information
bautrukevich committed Mar 14, 2019
2 parents ee50d5b + ed8273a commit 82c73ef
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based now on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.6.1] — 2019-03-14

### Fixed

* Error with plugin initialization.

## [2.6.0] — 2018-06-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion inc/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function uploadcare_plugin_init() {
$api = uploadcare_api();
$widget = new Uploadcare\Widget($api);
$widget_url = $widget->getScriptSrc(UPLOADCARE_WIDGET_VERSION);
wp_register_script('uploadcare-widget', $widget_url);
wp_register_script('uploadcare-widget', $widget_url, array('jquery'));
$widget_tab_effects_url = 'https://ucarecdn.com/libs/widget-tab-effects/'.UPLOADCARE_TAB_EFFECTS_VERSION.'/uploadcare.tab-effects.min.js';
wp_register_script('uploadcare-tab-effects', $widget_tab_effects_url);

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: grayhound1, dmitry-mukhin, bautrukevich
Tags: media upload, file handling, cdn, storage, facebook, dropbox, instagram, google drive, vk, evernote, box, images, flickr
Requires at least: 3.5+
Tested up to: 5.1.0
Stable tag: 2.6.0
Stable tag: 2.6.1
Requires PHP: 5.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -116,6 +116,9 @@ Access all files in your Uploadcare account via Media Library.

== Changelog ==

= 2.6.1 =
* Fixed error with plugin initialization.

= 2.6.0 =
* Added the `data-integration` attribute to the widget reporting its version together
with the library version used.
Expand Down
26 changes: 13 additions & 13 deletions uploadcare.php
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<?php
/*
Plugin Name: Uploadcare
Plugin URI: http://github.com/uploadcare/uploadcare-wordpress
Description: Uploadcare let's you upload anything from anywhere (Instagram, Facebook, Dropbox, etc.)
Version: 2.6.0
Author: Uploadcare
Author URI: https://uploadcare.com/
License: GPL2
*/

/**
* Plugin Name: Uploadcare
* Plugin URI: http://github.com/uploadcare/uploadcare-wordpress
* Description: Uploadcare let's you upload anything from anywhere (Instagram, Facebook, Dropbox, etc.)
* Version: 2.6.1
* Author: Uploadcare
* Author URI: https://uploadcare.com/
* License: GPL2
*/

if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
exit("Uploadcare plugin requires PHP version <b>5.3+</b>, you've got <b>" . PHP_VERSION . "</b>");
}

define('UPLOADCARE_PLUGIN_VERSION', '2.6.0');
define('UPLOADCARE_PLUGIN_VERSION', '2.6.1');
define('UPLOADCARE_WIDGET_VERSION', '3.x');
define('UPLOADCARE_TAB_EFFECTS_VERSION', '1.x');

define('UPLOADCARE_PLUGIN_URL', plugin_dir_url(__FILE__));
define('UPLOADCARE_PLUGIN_PATH', plugin_dir_path(__FILE__));


require_once UPLOADCARE_PLUGIN_PATH . 'inc/utils.php';
require_once UPLOADCARE_PLUGIN_PATH . 'inc/filters.php';
require_once UPLOADCARE_PLUGIN_PATH . 'inc/actions.php';
require_once UPLOADCARE_PLUGIN_PATH . 'inc/shortcodes.php';

require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/Api.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/File.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/PagedDataIterator.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/FileIterator.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/Group.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/GroupIterator.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/Helper.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/Uploader.php';
require_once UPLOADCARE_PLUGIN_PATH . 'uploadcare-php/src/Uploadcare/Widget.php';


// TODO: delete table on upgrade
register_activation_hook(__FILE__, 'uploadcare_install');
function uploadcare_install() {
Expand Down

0 comments on commit 82c73ef

Please sign in to comment.