Skip to content

Commit

Permalink
Merge pull request #1027 from vektor-inc/develop
Browse files Browse the repository at this point in the history
[ Change version ] 1.25.0
  • Loading branch information
kurudrive authored Feb 22, 2022
2 parents df3ef8a + 28b0877 commit a58861d
Show file tree
Hide file tree
Showing 26 changed files with 7,175 additions and 7,200 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.6
14.19.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bin/dist_kuru.sh

## Watch
```
// CSSの変更のみ監視
// CSS、JSの監視
npm run watch
```

Expand Down
2 changes: 1 addition & 1 deletion bin/deploy-free.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rm -rf src/*
# プロ版のディレクトリに移動
cd ../
# 指定したファイルを除外して、Pro版を無料版(vk-blocks-copy-target)へコピー&上書き
rsync -arvc --exclude 'vk-blocks-copy-target/' --exclude 'test/' --exclude 'bin/' --exclude 'build/_pro/' --exclude 'src/blocks/_pro/' --exclude 'inc/vk-blocks-pro/' --exclude '.git/' --exclude '.github/' --exclude 'inc/vk-blocks/build/block-build.css' --exclude 'inc/vk-blocks-pro-config.php' --exclude 'src/blocks/bundle-pro.js' --exclude '.gitignore' --exclude 'inc/vk-blocks/build/*.css' --exclude 'inc/vk-blocks/build/*.js' --exclude 'editor-css/*.css' --exclude 'editor-css/*.css.map' --exclude 'vk-blocks-pro.code-workspace' --exclude 'phpunit.xml.dist' ./* ./vk-blocks-copy-target/
rsync -arvc --exclude 'vk-blocks-copy-target/' --exclude 'test/' --exclude 'bin/' --exclude 'build/_pro/' --exclude 'src/blocks/_pro/' --exclude 'inc/vk-blocks-pro/' --exclude '.git/' --exclude '.github/' --exclude 'build/block-build.css' --exclude 'inc/vk-blocks-pro-config.php' --exclude 'src/blocks/bundle-pro.js' --exclude '.gitignore' --exclude 'build/*.css' --exclude 'build/*.js' --exclude 'editor-css/*.css' --exclude 'editor-css/*.css.map' --exclude 'vk-blocks-pro.code-workspace' --exclude 'phpunit.xml.dist' ./* ./vk-blocks-copy-target/
# 無料版のディレクトリに移動
cd ./vk-blocks-copy-target/
# プラグイン名を通常版へリネーム(vk-blocks.php の 3行目の /Pro/ を // に変更 )
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"vektor-inc/font-awesome-versions": "^0.0.2",
"tgmpa/tgm-plugin-activation": "dev-develop",
"yahnis-elsts/plugin-update-checker": "*",
"vektor-inc/vk-color-palette-manager": "^0.1.0"
"vektor-inc/vk-color-palette-manager": "^0.3.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "*",
Expand All @@ -31,5 +31,10 @@
"format": "phpcbf --standard=./.phpcs.xml.dist --report-summary --report-source",
"lint": "phpcs --standard=./.phpcs.xml.dist",
"phpcs": "phpcs --standard=./.phpcs.xml.dist"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ gulp.task('helper-js', (done) => {
gulp.src('src/blocks/faq2/enque-front.js')
.pipe(uglify())
.pipe(rename('vk-faq2.min.js'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

gulp.task('helper-js-pro', (done) => {
gulp.src('src/blocks/_pro/accordion/enque-front.js')
.pipe(uglify())
.pipe(rename('vk-accordion.min.js'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
gulp.src('src/blocks/_pro/animation/enque-front.js')
.pipe(uglify())
.pipe(rename('vk-animation.min.js'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
gulp.src('src/blocks/_pro/slider/enque-front.js')
.pipe(uglify())
.pipe(rename('vk-slider.min.js'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

Expand All @@ -71,7 +71,7 @@ gulp.task('sass', (done) => {
)
.pipe(autoprefixer())
.pipe(concat('block-build.css'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

Expand All @@ -91,7 +91,7 @@ gulp.task('sass_editor', (done) => {
)
.pipe(autoprefixer())
.pipe(concat('block-build-editor.css'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

Expand All @@ -107,7 +107,7 @@ gulp.task('sass_bootstrap', (done) => {
)
.pipe(autoprefixer())
.pipe(concat('bootstrap_vk_using.css'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

Expand All @@ -123,7 +123,7 @@ gulp.task('sass_vk_components', (done) => {
)
.pipe(autoprefixer())
.pipe(concat('vk-components.css'))
.pipe(gulp.dest('./inc/vk-blocks/build/'));
.pipe(gulp.dest('./build/'));
done();
});

Expand Down Expand Up @@ -179,7 +179,9 @@ gulp.task('sass-separate-pro', (done) => {
gulp.task('watch', () => {
gulp.watch('editor-css/_editor_before.scss', gulp.parallel('sass_editor'));
// gulp.watch('editor-css/*.scss', gulp.parallel('sass_editor'));
gulp.watch('src/**/*.scss', gulp.series('sass', 'sass_editor'));
gulp.watch('src/**/*.scss', gulp.series('sass', 'sass_editor', 'sass-separate-free', 'sass-separate-pro'));
//watch enque-front.js
gulp.watch('src/**/*.js', gulp.series('helper-js', 'helper-js-pro'));
gulp.watch(
'lib/bootstrap/scss/*.scss',
gulp.parallel('sass_bootstrap', 'sass_editor')
Expand Down
12 changes: 3 additions & 9 deletions inc/font-awesome/font-awesome-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@
* @package vk_blocks
*/

// Load composer autoload.
require_once dirname( dirname( dirname( __FILE__ ) ) ) . '/vendor/autoload.php';

use VektorInc\VK_Font_Awesome_Versions\VkFontAwesomeVersions;

/*
* Font Awesome Load modules
*/
if ( ! class_exists( 'Vk_Font_Awesome_Versions' ) ) {
if ( ! vk_blocks_is_lightning() ) {
new VkFontAwesomeVersions();
global $font_awesome_directory_uri;
$font_awesome_directory_uri = plugins_url( '', __FILE__ ) . '/package/'; //phpcs:ignore

global $set_enqueue_handle_style;
$set_enqueue_handle_style = 'vkExUnit_common_style'; //phpcs:ignore
// phpcs:ignore
$font_awesome_directory_uri = VK_BLOCKS_DIR_URL . 'vendor/vektor-inc/font-awesome-versions/src/';
}
} elseif ( class_exists( 'VkFontAwesomeVersions' ) ) {
$vk_blocks_font_awesome_versions = new VkFontAwesomeVersions();
}
8 changes: 4 additions & 4 deletions inc/vk-blocks-pro/vk-blocks-pro-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ function vk_blocks_pro_load_scripts() {
}

// Accordion Block
wp_enqueue_script( 'vk-blocks-accordion', VK_BLOCKS_URL . 'build/vk-accordion.min.js', array(), VK_BLOCKS_VERSION, true );
wp_enqueue_script( 'vk-blocks-accordion', VK_BLOCKS_DIR_URL . 'build/vk-accordion.min.js', array(), VK_BLOCKS_VERSION, true );

// Faq Block
wp_enqueue_script( 'vk-blocks-faq2', VK_BLOCKS_URL . 'build/vk-faq2.min.js', array(), VK_BLOCKS_VERSION, true );
wp_enqueue_script( 'vk-blocks-faq2', VK_BLOCKS_DIR_URL . 'build/vk-faq2.min.js', array(), VK_BLOCKS_VERSION, true );

// Animation Block
wp_enqueue_script( 'vk-blocks-animation', VK_BLOCKS_URL . 'build/vk-animation.min.js', array(), VK_BLOCKS_VERSION, true );
wp_enqueue_script( 'vk-blocks-animation', VK_BLOCKS_DIR_URL . 'build/vk-animation.min.js', array(), VK_BLOCKS_VERSION, true );

// Slider Block
global $vk_swiper_url;
wp_enqueue_style( 'vk-swiper-style', $vk_swiper_url . 'assets/css/swiper.min.css', array(), SWIPER_VERSION );

wp_enqueue_script( 'vk-blocks-slider', VK_BLOCKS_URL . 'build/vk-slider.min.js', array( 'vk-swiper-script' ), VK_BLOCKS_VERSION, true );
wp_enqueue_script( 'vk-blocks-slider', VK_BLOCKS_DIR_URL . 'build/vk-slider.min.js', array( 'vk-swiper-script' ), VK_BLOCKS_VERSION, true );
}
add_action( 'wp_enqueue_scripts', 'vk_blocks_pro_load_scripts' );
12 changes: 12 additions & 0 deletions inc/vk-blocks/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,15 @@ function vk_blocks_setting_option_save() {
// wp_safe_redirect( menu_page_url( 'vk_blocks_options', false ) );
}
add_action( 'admin_init', 'vk_blocks_setting_option_save', 10, 2 );

/**
* VK Blocks add setting link
*
* @param array $links VK Blocks action links.
*/
function vk_blocks_add_setting_link( $links ) {
$settings_link = '<a href="' . esc_url( admin_url( '/options-general.php?page=vk_blocks_options' ) ) . '">' . __( 'Setting', 'vk-blocks' ) . '</a>';
array_unshift( $links, $settings_link );
return $links;
}
add_filter( 'plugin_action_links', 'vk_blocks_add_setting_link' );
4 changes: 2 additions & 2 deletions inc/vk-blocks/class-vk-blocks-block-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ public function register_blocks_assets() {
wp_register_style( 'vk-blocks-utils-common-css', VK_BLOCKS_DIR_URL . 'build/utils/common.css', array(), VK_BLOCKS_VERSION );
} else {
// 一括読み込みの場合 : 結合CSSを登録.
wp_register_style( 'vk-blocks-build-css', $this->assets_build_url . 'block-build.css', array(), VK_BLOCKS_VERSION );
wp_register_style( 'vk-blocks-build-css', VK_BLOCKS_DIR_URL . 'build/block-build.css', array(), VK_BLOCKS_VERSION );
}

// 編集画面のCSS登録 : 設定に関わらず結合CSSを登録 -> 各ブロックのindex.phpから呼び出される
wp_register_style( 'vk-blocks-build-editor-css', $this->assets_build_url . 'block-build-editor.css', array(), VK_BLOCKS_VERSION );
wp_register_style( 'vk-blocks-build-editor-css', VK_BLOCKS_DIR_URL . 'build/block-build-editor.css', array(), VK_BLOCKS_VERSION );

// 編集画面のjs登録 : 設定に関わらず結合JSを登録 -> 各ブロックのindex.phpから呼び出される
wp_register_script(
Expand Down
Loading

0 comments on commit a58861d

Please sign in to comment.