Skip to content

Commit

Permalink
Merge pull request #76 from uploadcare/develop
Browse files Browse the repository at this point in the history
Develop for 3.0.2
  • Loading branch information
andrew72ru committed Jan 20, 2021
2 parents ef7ca80 + dfd4123 commit 24e4734
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
/.git
/.github
/node_modules
/compiled-js
/vendor
composer.lock

vendor/symfony/polyfill-intl-idn/bootstrap80.php
vendor/symfony/polyfill-ctype/bootstrap80.php
vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
vendor/symfony/polyfill-mbstring/bootstrap80.php
vendor/symfony/polyfill-uuid/bootstrap80.php

.distignore
.gitignore
.gitmodules
14 changes: 14 additions & 0 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Install dependencies
uses: php-actions/composer@v5
with:
php_version: 7.1
version: 1
dev: no
- name: Install npm dependencies
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install nodejs-dev node-gyp libssl1.0-dev yarn
yarn --version
yarn && yarn run build
rm -rf node_modules
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@458ceae
env:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,3 @@ jobs:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: uploadcare
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@458ceae
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: uploadcare
5 changes: 4 additions & 1 deletion admin/UcAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ public function add_uploadcare_js_to_admin($hook)
\wp_enqueue_style('uc-editor');

if (\in_array($hook, ['post.php', 'post-new.php'], true)) {
\wp_enqueue_script('image-block', null, require \dirname(__DIR__).'/compiled-js/blocks.asset.php');
$scr = \get_current_screen();
if (\method_exists($scr, 'is_block_editor') && $scr->is_block_editor()) {
\wp_enqueue_script('image-block', null, require \dirname(__DIR__).'/compiled-js/blocks.asset.php');
}
}
}

Expand Down

0 comments on commit 24e4734

Please sign in to comment.