VK All in One Expansion Unit - Version 9.77.0.0

Version Description

[ Specification Change ][ Custom Post Type Manager ] Change to Cope with Block Editor default [ Bug Fix ] Fix register thumbnail on edit screen under welcart environment

Download this release

Release Info

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

Code changes from version 9.76.3.0 to 9.77.0.0

admin/admin.php CHANGED
@@ -106,7 +106,7 @@ function veu_add_setting_page() {
106
  // add_action( 'admin_print_scripts-exunit_page_vkExUnit_main_setting', 'veu_admin_add_js' );
107
  add_action( 'admin_enqueue_scripts', 'veu_admin_add_js' );
108
  function veu_admin_add_js( $hook_suffix ) {
109
- wp_enqueue_media();
110
  wp_register_script( 'vkExUnit_admin_js', VEU_DIRECTORY_URI . '/assets/js/vkExUnit_admin.js', array( 'jquery' ), VEU_VERSION );
111
  wp_enqueue_script( 'jquery' );
112
  wp_enqueue_script( 'vkExUnit_admin_js' );
106
  // add_action( 'admin_print_scripts-exunit_page_vkExUnit_main_setting', 'veu_admin_add_js' );
107
  add_action( 'admin_enqueue_scripts', 'veu_admin_add_js' );
108
  function veu_admin_add_js( $hook_suffix ) {
109
+ // wp_enqueue_media(); // WelCart でアイキャッチ画像の操作ができなくなる。が、そもそもこれ不要では? 2022.11.30以降もコメントアウトされたままなら削除
110
  wp_register_script( 'vkExUnit_admin_js', VEU_DIRECTORY_URI . '/assets/js/vkExUnit_admin.js', array( 'jquery' ), VEU_VERSION );
111
  wp_enqueue_script( 'jquery' );
112
  wp_enqueue_script( 'vkExUnit_admin_js' );
inc/other-widget/widget-3pr-area.php CHANGED
@@ -218,10 +218,13 @@ class WP_Widget_vkExUnit_3PR_area extends WP_Widget {
218
  }
219
 
220
  // メディアアップローダーjs
221
- add_action( 'admin_print_scripts', 'admin_scripts_3pr_media' );
222
  function admin_scripts_3pr_media() {
223
- wp_enqueue_media();
224
- wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
225
- wp_enqueue_script( 'vk-admin-widget' );
 
 
 
226
  }
 
227
 
218
  }
219
 
220
  // メディアアップローダーjs
 
221
  function admin_scripts_3pr_media() {
222
+ global $hook_suffix;
223
+ if ( 'widgets.php' === $hook_suffix || 'customize.php' === $hook_suffix) {
224
+ wp_enqueue_media();
225
+ wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
226
+ wp_enqueue_script( 'vk-admin-widget' );
227
+ }
228
  }
229
+ add_action( 'admin_print_scripts', 'admin_scripts_3pr_media' );
230
 
inc/other-widget/widget-pr-blocks.php CHANGED
@@ -311,9 +311,12 @@ for ( $i = 1; $i <= intval( $instance['block_count'] ); ) {
311
  }
312
 
313
  // uploader js
314
- add_action( 'admin_print_scripts', 'admin_scripts_pr_media' );
315
  function admin_scripts_pr_media() {
316
- wp_enqueue_media();
317
- wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
318
- wp_enqueue_script( 'vk-admin-widget' );
 
 
 
319
  }
 
311
  }
312
 
313
  // uploader js
 
314
  function admin_scripts_pr_media() {
315
+ global $hook_suffix;
316
+ if ( 'widgets.php' === $hook_suffix || 'customize.php' === $hook_suffix) {
317
+ wp_enqueue_media();
318
+ wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
319
+ wp_enqueue_script( 'vk-admin-widget' );
320
+ }
321
  }
322
+ add_action( 'admin_print_scripts', 'admin_scripts_pr_media' );
inc/other-widget/widget-profile.php CHANGED
@@ -475,8 +475,11 @@ echo $args['after_widget'];
475
 
476
  // Profile widget uploader js
477
  function vkExUnit_profile_admin_scripts() {
478
- wp_enqueue_media();
479
- wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
480
- wp_enqueue_script( 'vk-admin-widget' );
 
 
 
481
  }
482
  add_action( 'admin_print_scripts', 'vkExUnit_profile_admin_scripts' );
475
 
476
  // Profile widget uploader js
477
  function vkExUnit_profile_admin_scripts() {
478
+ global $hook_suffix;
479
+ if ( 'widgets.php' === $hook_suffix || 'customize.php' === $hook_suffix) {
480
+ wp_enqueue_media();
481
+ wp_register_script( 'vk-admin-widget', plugin_dir_url( __FILE__ ) . 'js/admin-widget.js', array( 'jquery' ), false, true );
482
+ wp_enqueue_script( 'vk-admin-widget' );
483
+ }
484
  }
485
  add_action( 'admin_print_scripts', 'vkExUnit_profile_admin_scripts' );
inc/post-type-manager/package/class.post-type-manager.php CHANGED
@@ -140,15 +140,14 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
140
 
141
  // 現在保存されているカスタムフィールドの値を取得.
142
  $export_to_api_value = get_post_meta( $post->ID, 'veu_post_type_export_to_api', true );
143
-
144
- // 保存されているデータが true だったら $checked = ' checked' にする。.
145
- if ( $export_to_api_value ) {
146
- $checked = ' checked';
147
- } else {
148
- $checked = '';
149
  }
150
 
151
- echo '<label><input type="checkbox" id="veu_post_type_export_to_api" name="veu_post_type_export_to_api" value="true"' . esc_html( $checked ) . '> ' . esc_html__( 'Corresponds to the block editor ( Export to REST API / optional )', 'vk-all-in-one-expansion-unit' ) . '</label>';
 
 
 
152
  echo '<p>' . esc_html__( 'If you want to use the block editor that, you have to use the REST API.', 'vk-all-in-one-expansion-unit' ) . '</p>';
153
  echo '<hr>';
154
 
@@ -205,10 +204,22 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
205
  echo '<tr>';
206
 
207
  // チェックが元々入ってるかどうか.
208
- $checked = ( isset( $taxonomy[ $i ]['rest_api'] ) && $taxonomy[ $i ]['rest_api'] ) ? ' checked' : '';
 
 
 
 
 
 
 
 
209
 
210
  echo '<td>' . esc_html__( 'Corresponds to the block editor', 'vk-all-in-one-expansion-unit' ) . '</td>';
211
- echo '<td><label><input type="checkbox" id="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" name="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" value="true"' . esc_attr( $checked ) . '> ' . esc_html__( 'Corresponds to the block editor ( Export to REST API / optional )', 'vk-all-in-one-expansion-unit' ) . '</label></td>';
 
 
 
 
212
  echo '</tr>';
213
 
214
  }
@@ -338,7 +349,7 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
338
  // REST API に出力するかどうかをカスタムフィールドから取得.
339
  $rest_api = get_post_meta( $post->ID, 'veu_post_type_export_to_api', true );
340
  // REST APIに出力する場合.
341
- if ( $rest_api ) {
342
  $rest_args = array(
343
  'show_in_rest' => true,
344
  'rest_base' => $post_type_id,
@@ -363,7 +374,15 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
363
  // カスタム分類を階層化するかどうか.
364
  $hierarchical_true = ( empty( $taxonomy['tag'] ) ) ? true : false;
365
  // REST API を使用するかどうか.
366
- $rest_api_true = ( empty( $taxonomy['rest_api'] ) ) ? false : true;
 
 
 
 
 
 
 
 
367
 
368
  $labels = array(
369
  'name' => $taxonomy['label'],
140
 
141
  // 現在保存されているカスタムフィールドの値を取得.
142
  $export_to_api_value = get_post_meta( $post->ID, 'veu_post_type_export_to_api', true );
143
+ if ( 'false' !== $export_to_api_value && 'true' !== $export_to_api_value ) {
144
+ $export_to_api_value = 'true';
 
 
 
 
145
  }
146
 
147
+ echo '<label><input type="radio" id="veu_post_type_export_to_api" name="veu_post_type_export_to_api" value="true"' . checked( $export_to_api_value, 'true', false ) . '> ' . esc_html__( 'Corresponds to the block editor ( Export to REST API / optional )', 'vk-all-in-one-expansion-unit' ) . '</label>';
148
+ echo '<br />';
149
+ echo '<label><input type="radio" id="veu_post_type_export_to_api" name="veu_post_type_export_to_api" value="false"' . checked( $export_to_api_value, 'false', false ) . '> ' . esc_html__( 'Does not correspond to the block editor', 'vk-all-in-one-expansion-unit' ) . '</label>';
150
+
151
  echo '<p>' . esc_html__( 'If you want to use the block editor that, you have to use the REST API.', 'vk-all-in-one-expansion-unit' ) . '</p>';
152
  echo '<hr>';
153
 
204
  echo '<tr>';
205
 
206
  // チェックが元々入ってるかどうか.
207
+ // 過去の仕様ではデフォルトで REST API はチェック無しだった.
208
+ // しかし、一般的にブロックエディタ対応にする方が需要が高いため、デフォルトで true になるように変更した。
209
+ // そのため、そのため、設定画面においては true で保存されていない場合は true にして返す.
210
+ if ( isset( $taxonomy[ $i ]['rest_api'] ) ) {
211
+ $checked = $taxonomy[ $i ]['rest_api'];
212
+ }
213
+ if ( 'false' !== $checked && 'true' !== $checked ) {
214
+ $checked = 'true';
215
+ }
216
 
217
  echo '<td>' . esc_html__( 'Corresponds to the block editor', 'vk-all-in-one-expansion-unit' ) . '</td>';
218
+ echo '<td>';
219
+ echo '<label><input type="radio" id="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" name="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" value="true"' . checked( $checked, 'true', false ) . '> ' . esc_html__( 'Corresponds to the block editor ( Export to REST API / optional )', 'vk-all-in-one-expansion-unit' ) . '</label>';
220
+ echo '<br />';
221
+ echo '<label><input type="radio" id="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" name="veu_taxonomy[' . esc_attr( $i ) . '][rest_api]" value="false"' . checked( $checked, 'false', false ) . '> ' . esc_html__( 'Does not correspond to the block editor', 'vk-all-in-one-expansion-unit' ) . '</label>';
222
+ echo '</td>';
223
  echo '</tr>';
224
 
225
  }
349
  // REST API に出力するかどうかをカスタムフィールドから取得.
350
  $rest_api = get_post_meta( $post->ID, 'veu_post_type_export_to_api', true );
351
  // REST APIに出力する場合.
352
+ if ( 'true' === $rest_api || '1' === $rest_api ) {
353
  $rest_args = array(
354
  'show_in_rest' => true,
355
  'rest_base' => $post_type_id,
374
  // カスタム分類を階層化するかどうか.
375
  $hierarchical_true = ( empty( $taxonomy['tag'] ) ) ? true : false;
376
  // REST API を使用するかどうか.
377
+ if ( isset( $taxonomy['rest_api'] ) ) {
378
+ $rest_api = $taxonomy['rest_api'];
379
+ }
380
+
381
+ if ( 'true' === $rest_api || '1' === $rest_api ) {
382
+ $rest_api_true = true;
383
+ } else {
384
+ $rest_api_true = false;
385
+ }
386
 
387
  $labels = array(
388
  'name' => $taxonomy['label'],
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Fa
5
  Requires at least: 5.3.0
6
  Tested up to: 6.0.0
7
  Requires PHP: 7.2
8
- Stable tag: 9.76.3.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -81,6 +81,10 @@ e.g.
81
 
82
  == Changelog ==
83
 
 
 
 
 
84
  = 9.76.3.0 =
85
  * [ Bug Fix ][ HTML Site Map ] Delete wp_reset_postdata();
86
 
5
  Requires at least: 5.3.0
6
  Tested up to: 6.0.0
7
  Requires PHP: 7.2
8
+ Stable tag: 9.77.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
81
 
82
  == Changelog ==
83
 
84
+ = 9.77.0.0 =
85
+ [ Specification Change ][ Custom Post Type Manager ] Change to Cope with Block Editor default
86
+ [ Bug Fix ] Fix register thumbnail on edit screen under welcart environment
87
+
88
  = 9.76.3.0 =
89
  * [ Bug Fix ][ HTML Site Map ] Delete wp_reset_postdata();
90
 
vendor/autoload.php CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
- return ComposerAutoloaderInit6c35ace2cce8f5f38cb08d8459fe3a85::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit11f27f9ab9a7f1fdb9f53e28a7991c8a::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6c35ace2cce8f5f38cb08d8459fe3a85
6
  {
7
  private static $loader;
8
 
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit6c35ace2cce8f5f38cb08d8459fe3a85
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit6c35ace2cce8f5f38cb08d8459fe3a85', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit6c35ace2cce8f5f38cb08d8459fe3a85', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
- call_user_func(\Composer\Autoload\ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit11f27f9ab9a7f1fdb9f53e28a7991c8a
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit11f27f9ab9a7f1fdb9f53e28a7991c8a', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit11f27f9ab9a7f1fdb9f53e28a7991c8a', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
+ call_user_func(\Composer\Autoload\ComposerStaticInit11f27f9ab9a7f1fdb9f53e28a7991c8a::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'V' =>
@@ -46,9 +46,9 @@ class ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
- $loader->prefixLengthsPsr4 = ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85::$prefixLengthsPsr4;
50
- $loader->prefixDirsPsr4 = ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85::$prefixDirsPsr4;
51
- $loader->classMap = ComposerStaticInit6c35ace2cce8f5f38cb08d8459fe3a85::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit11f27f9ab9a7f1fdb9f53e28a7991c8a
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'V' =>
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
+ $loader->prefixLengthsPsr4 = ComposerStaticInit11f27f9ab9a7f1fdb9f53e28a7991c8a::$prefixLengthsPsr4;
50
+ $loader->prefixDirsPsr4 = ComposerStaticInit11f27f9ab9a7f1fdb9f53e28a7991c8a::$prefixDirsPsr4;
51
+ $loader->classMap = ComposerStaticInit11f27f9ab9a7f1fdb9f53e28a7991c8a::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
vendor/composer/installed.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php return array(
2
  'root' => array(
3
  'name' => 'vektor-inc/vk-all-in-one-expansion-unit',
4
- 'pretty_version' => '9.76.3.0',
5
- 'version' => '9.76.3.0',
6
- 'reference' => '009ee28bc61691faa7ff286bdac8e62181ca059a',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -20,9 +20,9 @@
20
  'dev_requirement' => false,
21
  ),
22
  'vektor-inc/vk-all-in-one-expansion-unit' => array(
23
- 'pretty_version' => '9.76.3.0',
24
- 'version' => '9.76.3.0',
25
- 'reference' => '009ee28bc61691faa7ff286bdac8e62181ca059a',
26
  'type' => 'project',
27
  'install_path' => __DIR__ . '/../../',
28
  'aliases' => array(),
1
  <?php return array(
2
  'root' => array(
3
  'name' => 'vektor-inc/vk-all-in-one-expansion-unit',
4
+ 'pretty_version' => '9.77.0.0',
5
+ 'version' => '9.77.0.0',
6
+ 'reference' => 'c37ad02137c9f1bacea4560868424d287c63f8e7',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
20
  'dev_requirement' => false,
21
  ),
22
  'vektor-inc/vk-all-in-one-expansion-unit' => array(
23
+ 'pretty_version' => '9.77.0.0',
24
+ 'version' => '9.77.0.0',
25
+ 'reference' => 'c37ad02137c9f1bacea4560868424d287c63f8e7',
26
  'type' => 'project',
27
  'install_path' => __DIR__ . '/../../',
28
  'aliases' => array(),
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.76.3.0
7
  * Requires PHP: 7.2
8
  * Author: Vektor,Inc.
9
  * Text Domain: vk-all-in-one-expansion-unit
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.77.0.0
7
  * Requires PHP: 7.2
8
  * Author: Vektor,Inc.
9
  * Text Domain: vk-all-in-one-expansion-unit