VK All in One Expansion Unit - Version 9.15.5.0

Version Description

[ bugfix ][ smoothscroll ]

Download this release

Release Info

Developer kurudrive
Plugin Icon 128x128 VK All in One Expansion Unit
Version 9.15.5.0
Comparing to
See all releases

Code changes from version 9.15.4.0 to 9.15.5.0

.svnignore CHANGED
@@ -6,4 +6,8 @@ Thumbs.db
6
  _notes/
7
  *~
8
  vkexunit.mo
9
- .travis.yml
 
 
 
 
6
  _notes/
7
  *~
8
  vkexunit.mo
9
+ .travis.yml
10
+ vendor/
11
+ .*.before
12
+ Dockerfile
13
+ docker-compose.yml
.travis.yml CHANGED
@@ -2,6 +2,9 @@ language: php
2
 
3
  branches:
4
  - master
 
 
 
5
 
6
  env:
7
  global:
@@ -21,44 +24,10 @@ matrix:
21
  dist: trusty
22
  env:
23
  - WP_VERSION=latest WP_MULTISITE=0
24
- - WP_VERSION=latest WP_MULTISITE=1
25
- - WP_VERSION=4.4 WP_MULTISITE=0
26
- # - php: 7.2
27
- # dist: trusty
28
- # env:
29
- # - WP_VERSION=latest WP_MULTISITE=0
30
- # - WP_VERSION=latest WP_MULTISITE=1
31
- # - WP_VERSION=4.4 WP_MULTISITE=0
32
- # - php: 7.1.4
33
- # dist: precise
34
- # env:
35
- # - WP_VERSION=latest WP_MULTISITE=0
36
- # - php: 7
37
- # dist: precise
38
- # env:
39
- # - WP_VERSION=latest WP_MULTISITE=0
40
- # - php: 5.6
41
- # dist: precise
42
- # env:
43
- # - WP_VERSION=latest WP_MULTISITE=0
44
- # - php: 5.4
45
- # dist: precise
46
- # env: WP_VERSION=latest WP_MULTISITE=0
47
-
48
 
49
  cache:
50
  directories:
51
  - node_modules
52
- - .sass_cache
53
-
54
- before_install:
55
- - gem install ruby
56
- - gem install sass
57
- - gem install compass
58
-
59
- # node_js:
60
- # - '0.8'
61
- # - '0.10'
62
 
63
  before_script:
64
  - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
@@ -66,21 +35,40 @@ before_script:
66
  - echo ${TRAVIS_PHP_VERSION:0:3}
67
  - |
68
  if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then
69
- composer global require "phpunit/phpunit=5.6.*"
70
  else
71
- composer global require "phpunit/phpunit=4.8.*"
72
  fi
 
 
 
 
 
 
 
 
73
 
74
- # - nvm install 4.2
75
- # - npm install gulp gulp-concat gulp-cssmin gulp-jsmin gulp-plumber gulp-rename
76
- - npm install
77
- - npm install -g gulp
78
- - npm install gulp gulp-concat gulp-cssmin gulp-rename gulp-jsmin gulp-plumber gulp-sass gulp-clean-css gulp-merge-media-queries gulp-autoprefixer
79
 
80
  script:
81
- - find ./ -name '*.php'|xargs -I {} php -l {}
82
  - phpunit --version
83
- # - gulp compile
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  after_success:
86
  - bash ./bin/deploy.sh
2
 
3
  branches:
4
  - master
5
+ - develop
6
+ - /^feature\/.*/
7
+ - /^(bug)?fix\/.*/
8
 
9
  env:
10
  global:
24
  dist: trusty
25
  env:
26
  - WP_VERSION=latest WP_MULTISITE=0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  cache:
29
  directories:
30
  - node_modules
 
 
 
 
 
 
 
 
 
 
31
 
32
  before_script:
33
  - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
35
  - echo ${TRAVIS_PHP_VERSION:0:3}
36
  - |
37
  if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then
38
+ composer require "phpunit/phpunit=5.6.*"
39
  else
40
+ composer require "phpunit/phpunit=7.*"
41
  fi
42
+ - npm install -D
43
+ - cp assets/js/all.min.js .all.min.js.before
44
+ - cp assets/css/vkExUnit_sns_editor_style.css .vkExUnit_sns_editor_style.css.before
45
+ - cp assets/css/vkExUnit_style.css .vkExUnit_style.css.before
46
+ - cp assets/css/vkExUnit_style_in_bs.css .vkExUnit_style_in_bs.css.before
47
+ - cp assets/css/vkExUnit_editor_style.css .vkExUnit_editor_style.css.before
48
+ - cp assets/css/vkExUnit_admin.css .vkExUnit_admin.css.before
49
+ - cp inc/sns/package/block.min.js .block.min.js.before
50
 
 
 
 
 
 
51
 
52
  script:
53
+ - find ./ -type d -name vendor -prune -o -name '*.php'|xargs -I {} php -l {}
54
  - phpunit --version
55
+ # script compile check
56
+ - npm run gulp scripts
57
+ - diff assets/js/all.min.js .all.min.js.before
58
+ # block script compile check
59
+ - npm run gulp block
60
+ - diff inc/sns/package/block.min.js .block.min.js.before
61
+ # scss compile check
62
+ - npm run gulp sass
63
+ - diff assets/css/vkExUnit_sns_editor_style.css .vkExUnit_sns_editor_style.css.before
64
+ - diff assets/css/vkExUnit_style.css .vkExUnit_style.css.before
65
+ - diff assets/css/vkExUnit_style_in_bs.css .vkExUnit_style_in_bs.css.before
66
+ - diff assets/css/vkExUnit_editor_style.css .vkExUnit_editor_style.css.before
67
+ - diff assets/css/vkExUnit_admin.css .vkExUnit_admin.css.before
68
+ - vendor/bin/phpunit -c phpunit.xml
69
+
70
+ after_script:
71
+ - rm -v .*.before
72
 
73
  after_success:
74
  - bash ./bin/deploy.sh
Dockerfile ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ FROM wordpress:cli-php7.3
2
+ USER root
3
+
4
+ RUN apk add --no-cache bash subversion
5
+ RUN cd /opt/ && curl -sS https://getcomposer.org/installer | php
6
+ RUN cd /opt && php /opt/composer.phar require --dev "phpunit/phpunit=7.5.9"
7
+ ADD bin /var/www/html/bin
8
+ RUN bash /var/www/html/bin/install-wp-tests.sh wordpress wordpress wordpress db latest true
9
+
10
+ CMD "/opt/vendor/bin/phpunit"
assets/js/all.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";jQuery.changeLetterSize={handlers:[],interval:1e3,currentSize:0},function(t){function e(){i.appendTo("body");var t=i[0].offsetHeight;return i.remove(),n.currentSize!=t&&(n.currentSize=t,!0)}var n=t.changeLetterSize,i=t("<ins>M</ins>").css({display:"block",visibility:"hidden",position:"absolute",padding:"0",top:"0"});t(e);n.addHandler=function(t){n.handlers.push(t),n.handlers.length}}(jQuery),function(t){function e(t){var e=0;t.each(function(){var t=this.offsetHeight;e<t&&(e=t)}),t.css("height",e+"px")}var n=[];jQuery.fn.flatHeights=function(){return 1<this.length&&(e(this),n.push(this)),this};function i(){t.each(n,function(){this.height("auto"),e(this)})}t.changeLetterSize.addHandler(i),t(window).resize(i)}(jQuery),jQuery(document).ready(function(t){jQuery(".topPrTit a").flatHeights(),jQuery(".topPrDescription").flatHeights(),jQuery(".child_page_block h4 a").flatHeights()});var a=null;!function(t){t(function(){t(".prArea > .subSection-title").flatHeights(),t(".prArea > .summary").flatHeights()}),window.addEventListener("DOMContentLoaded",function(){t(".childPage_list_text").flatHeights()})}(jQuery),function(t,e){t.addEventListener("load",function(){var n=e.getElementsByClassName("veu_count_sns_hb");if(0!=n.length){var t=encodeURIComponent(location.href);fetch(vkExOpt.hatena_entry+t,{method:"GET"}).then(function(t){t.ok&&t.json().then(function(e){void 0!==e.count&&Array.prototype.forEach.call(n,function(t){return t.innerHTML=e.count})})}).catch(function(t){})}},!1)}(window,document),function(a,c){vkExOpt.enable_smooth_scroll&&a.addEventListener("load",function(){function n(t){for(var e=0;e<t.path.length&&!t.path[e].getAttribute("href");e++);var n=t.path[e].getAttribute("href");if(n){var i=0,o=c.getElementById(n.slice(1));if(o){var r=a.pageYOffset||c.documentElement.scrollTop;i=o.getBoundingClientRect().top+r}a.scrollTo({top:i,behavior:"smooth"}),t.preventDefault()}}Array.prototype.forEach.call(c.getElementsByTagName("a"),function(t){var e=t.getAttribute("href");e&&0==e.indexOf("#")&&t.addEventListener("click",n)})})}(window,document),function(t,e,n){t.addEventListener("scroll",function(){0<t.pageYOffset?e.body.classList.add(n):e.body.classList.remove(n)})}(window,document,"scrolled");
1
+ "use strict";jQuery.changeLetterSize={handlers:[],interval:1e3,currentSize:0},function(t){function e(){i.appendTo("body");var t=i[0].offsetHeight;return i.remove(),n.currentSize!=t&&(n.currentSize=t,!0)}var n=t.changeLetterSize,i=t("<ins>M</ins>").css({display:"block",visibility:"hidden",position:"absolute",padding:"0",top:"0"});t(e);n.addHandler=function(t){n.handlers.push(t),n.handlers.length}}(jQuery),function(t){function e(t){var e=0;t.each(function(){var t=this.offsetHeight;e<t&&(e=t)}),t.css("height",e+"px")}var n=[];jQuery.fn.flatHeights=function(){return 1<this.length&&(e(this),n.push(this)),this};function i(){t.each(n,function(){this.height("auto"),e(this)})}t.changeLetterSize.addHandler(i),t(window).resize(i)}(jQuery),jQuery(document).ready(function(t){jQuery(".topPrTit a").flatHeights(),jQuery(".topPrDescription").flatHeights(),jQuery(".child_page_block h4 a").flatHeights()});var a=null;!function(t){t(function(){t(".prArea > .subSection-title").flatHeights(),t(".prArea > .summary").flatHeights()}),window.addEventListener("DOMContentLoaded",function(){t(".childPage_list_text").flatHeights()})}(jQuery),function(t,e){t.addEventListener("load",function(){var n=e.getElementsByClassName("veu_count_sns_hb");if(0!=n.length){var t=encodeURIComponent(location.href);fetch(vkExOpt.hatena_entry+t,{method:"GET"}).then(function(t){t.ok&&t.json().then(function(e){void 0!==e.count&&Array.prototype.forEach.call(n,function(t){return t.innerHTML=e.count})})}).catch(function(t){})}},!1)}(window,document),function(a,c){vkExOpt.enable_smooth_scroll&&a.addEventListener("load",function(){function n(t){for(var e=0;e<t.path.length&&!t.path[e].getAttribute("href");e++);var n=t.path[e].getAttribute("href");if(n&&!(0<["tab","button"].indexOf(t.path[e].getAttribute("role"))||t.path[e].getAttribute("data-toggle")||t.path[e].getAttribute("carousel-control"))){var i=0,o=c.getElementById(n.slice(1));if(o){var r=a.pageYOffset||c.documentElement.scrollTop;i=o.getBoundingClientRect().top+r}a.scrollTo({top:i,behavior:"smooth"}),t.preventDefault()}}Array.prototype.forEach.call(c.getElementsByTagName("a"),function(t){var e=t.getAttribute("href");e&&0==e.indexOf("#")&&t.addEventListener("click",n)})})}(window,document),function(t,e,n){t.addEventListener("scroll",function(){0<t.pageYOffset?e.body.classList.add(n):e.body.classList.remove(n)})}(window,document,"scrolled");
bin/deploy.sh CHANGED
@@ -5,11 +5,11 @@
5
  # exit
6
  # fi
7
  if [[ "master" != "$TRAVIS_BRANCH" ]]; then
8
- echo "Not on the 'master' branch."
9
- exit
10
  fi
11
 
12
- set -e
13
 
14
  ## -b オプションはチェックアウト
15
  git clone -b dist --quiet "https://github.com/${TRAVIS_REPO_SLUG}.git" dist
@@ -19,3 +19,5 @@ cd dist
19
  git add -A
20
  git commit -m "Update from travis $TRAVIS_COMMIT"
21
  git push --quiet "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" dist 2> /dev/null
 
 
5
  # exit
6
  # fi
7
  if [[ "master" != "$TRAVIS_BRANCH" ]]; then
8
+ echo "Not on the 'master' branch. abort."
9
+ exit 0
10
  fi
11
 
12
+ set -ex
13
 
14
  ## -b オプションはチェックアウト
15
  git clone -b dist --quiet "https://github.com/${TRAVIS_REPO_SLUG}.git" dist
19
  git add -A
20
  git commit -m "Update from travis $TRAVIS_COMMIT"
21
  git push --quiet "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" dist 2> /dev/null
22
+
23
+ exit 0
docker-compose.yml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3'
2
+ services:
3
+ db:
4
+ image: mysql:5.7
5
+ restart: always
6
+ environment:
7
+ MYSQL_ROOT_PASSWORD: wordpress
8
+ MYSQL_DATABASE: wordpress
9
+ MYSQL_USER: wordpress
10
+ MYSQL_PASSWORD: wordpress
11
+ wp:
12
+ build:
13
+ context: .
14
+ dockerfile: Dockerfile
15
+ volumes:
16
+ - .:/var/www/html
17
+ depends_on:
18
+ - db
19
+ command: "/opt/vendor/bin/phpunit"
gulpfile.js CHANGED
@@ -25,11 +25,21 @@ var cleanCss = require('gulp-clean-css');
25
  var runSequence = require('run-sequence');
26
  var replace = require('gulp-replace');
27
 
 
 
 
 
 
 
 
 
 
 
28
  /*
29
  * transpile block editor js
30
  */
31
- gulp.task('block', function () {
32
- return gulp.src('./inc/sns/package/block.js')
33
  .pipe(babel({
34
  plugins: ['transform-react-jsx']
35
  }))
@@ -43,15 +53,23 @@ gulp.task('block', function () {
43
 
44
  gulp.task('text-domain', function () {
45
  return gulp.src(['./inc/font-awesome/**/*'])
46
- .pipe(replace('vk_font_awesome_version_textdomain', 'vk-all-in-one-expansion-unit' ))
47
- .pipe(gulp.dest('./inc/font-awesome/'));
48
  });
49
 
50
  gulp.task('sass', function() {
51
- return gulp.src('./assets/_scss/*.scss',{ base: './assets/_scss' })
52
- .pipe(plumber())
 
 
 
 
53
  .pipe(sass())
54
- .pipe(cmq({log: true}))
 
 
 
 
55
  .pipe(autoprefixer())
56
  .pipe(cleanCss())
57
  .pipe(gulp.dest('./assets/css/'));
@@ -79,6 +97,9 @@ gulp.task('scripts', function() {
79
 
80
  // Watch
81
  gulp.task('watch', function() {
 
 
 
82
  gulp.watch(
83
  [
84
  './assets/_js/*.js',
@@ -93,7 +114,7 @@ gulp.task('watch', function() {
93
 
94
  // gulp.task('default', ['scripts','watch','sprite']);
95
  gulp.task('default', gulp.series('text-domain','watch'))
96
- gulp.task('compile', gulp.series('scripts','text-domain','scripts', 'sass'))
97
 
98
  // copy dist ////////////////////////////////////////////////
99
 
@@ -138,3 +159,4 @@ gulp.task('dist', function(cb){
138
  // return runSequence( 'build:dist', 'copy_dist', cb );
139
  return runSequence( 'copy_dist', cb );
140
  });
 
25
  var runSequence = require('run-sequence');
26
  var replace = require('gulp-replace');
27
 
28
+ let error_stop = true
29
+
30
+ function src(list, option) {
31
+ if(error_stop) {
32
+ return gulp.src(list, option)
33
+ }else{
34
+ return gulp.src(list, option).pipe(plumber())
35
+ }
36
+ }
37
+
38
  /*
39
  * transpile block editor js
40
  */
41
+ gulp.task('block', function (done) {
42
+ return src('./inc/sns/package/block.jsx')
43
  .pipe(babel({
44
  plugins: ['transform-react-jsx']
45
  }))
53
 
54
  gulp.task('text-domain', function () {
55
  return gulp.src(['./inc/font-awesome/**/*'])
56
+ .pipe(replace('vk_font_awesome_version_textdomain', 'vk-all-in-one-expansion-unit' ))
57
+ .pipe(gulp.dest('./inc/font-awesome/'));
58
  });
59
 
60
  gulp.task('sass', function() {
61
+ return src(
62
+ './assets/_scss/*.scss',
63
+ {
64
+ base: './assets/_scss'
65
+ }
66
+ )
67
  .pipe(sass())
68
+ .pipe(cmq(
69
+ {
70
+ log: true
71
+ }
72
+ ))
73
  .pipe(autoprefixer())
74
  .pipe(cleanCss())
75
  .pipe(gulp.dest('./assets/css/'));
97
 
98
  // Watch
99
  gulp.task('watch', function() {
100
+ error_stop = false
101
+
102
+ gulp.watch('./inc/sns/package/block.jsx', gulp.series('block'))
103
  gulp.watch(
104
  [
105
  './assets/_js/*.js',
114
 
115
  // gulp.task('default', ['scripts','watch','sprite']);
116
  gulp.task('default', gulp.series('text-domain','watch'))
117
+ gulp.task('compile', gulp.series('scripts', 'sass', 'block'))
118
 
119
  // copy dist ////////////////////////////////////////////////
120
 
159
  // return runSequence( 'build:dist', 'copy_dist', cb );
160
  return runSequence( 'copy_dist', cb );
161
  });
162
+
inc/smooth-scroll/js/smooth-scroll.js CHANGED
@@ -13,12 +13,18 @@
13
  }
14
  let href = e.path[i].getAttribute('href')
15
  if (!href) return;
 
 
 
 
 
16
  let y = 0,
17
  destination = document.getElementById(href.slice(1))
18
  if(destination){
19
  let scroll = window.pageYOffset || document.documentElement.scrollTop
20
  y = destination.getBoundingClientRect().top + scroll
21
  }
 
22
  window.scrollTo({
23
  top: y,
24
  behavior: 'smooth'
13
  }
14
  let href = e.path[i].getAttribute('href')
15
  if (!href) return;
16
+
17
+ if (['tab', 'button'].indexOf(e.path[i].getAttribute('role')) > 0) return;
18
+ if (e.path[i].getAttribute('data-toggle')) return;
19
+ if (e.path[i].getAttribute('carousel-control')) return;
20
+
21
  let y = 0,
22
  destination = document.getElementById(href.slice(1))
23
  if(destination){
24
  let scroll = window.pageYOffset || document.documentElement.scrollTop
25
  y = destination.getBoundingClientRect().top + scroll
26
  }
27
+
28
  window.scrollTo({
29
  top: y,
30
  behavior: 'smooth'
inc/sns/sns.php CHANGED
@@ -29,6 +29,7 @@ add_action(
29
 
30
  add_action( 'init', 'vew_sns_block_setup', 15 );
31
  function vew_sns_block_setup() {
 
32
  register_block_type(
33
  'vk-blocks/share-button',
34
  array(
29
 
30
  add_action( 'init', 'vew_sns_block_setup', 15 );
31
  function vew_sns_block_setup() {
32
+ if ( ! function_exists( 'register_block_type' ) ) { return; }
33
  register_block_type(
34
  'vk-blocks/share-button',
35
  array(
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
5
  Requires at least: 5.0.0
6
  Tested up to: 5.3.2
7
- Stable tag: 9.15.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -93,6 +93,9 @@ e.g.
93
 
94
  == Changelog ==
95
 
 
 
 
96
  = 9.15.4.0 =
97
  [ bugfix ][ smoothscroll ]
98
  [ bugfix ][ metakeyword ]
4
  Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
5
  Requires at least: 5.0.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 9.15.5.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
93
 
94
  == Changelog ==
95
 
96
+ = 9.15.5.0 =
97
+ [ bugfix ][ smoothscroll ]
98
+
99
  = 9.15.4.0 =
100
  [ bugfix ][ smoothscroll ]
101
  [ bugfix ][ metakeyword ]
vkExUnit.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: VK All in One Expansion Unit
4
  * Plugin URI: https://ex-unit.nagoya
5
  * Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
6
- * Version: 9.15.4.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vk-all-in-one-expansion-unit
9
  * Domain Path: /languages
3
  * Plugin Name: VK All in One Expansion Unit
4
  * Plugin URI: https://ex-unit.nagoya
5
  * Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
6
+ * Version: 9.15.5.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vk-all-in-one-expansion-unit
9
  * Domain Path: /languages