VK All in One Expansion Unit - Version 9.48.0.0

Version Description

[ Specification Change ][ Archive widget ] default setting tuning and add no select option.

Download this release

Release Info

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

Code changes from version 9.47.0.0 to 9.48.0.0

Files changed (3) hide show
  1. inc/other-widget/widget-archives.php +37 -18
  2. readme.txt +4 -1
  3. vkExUnit.php +1 -1
inc/other-widget/widget-archives.php CHANGED
@@ -10,16 +10,16 @@ class WP_Widget_VK_archive_list extends WP_Widget {
10
  public function __construct() {
11
  parent::__construct(
12
  'WP_Widget_VK_archive_list',
13
- self::veu_widget_name(),
14
- array( 'description' => self::veu_widget_description() )
15
  );
16
  }
17
 
18
- public static function veu_widget_name() {
19
  return veu_get_prefix() . __( 'archive list', 'vk-all-in-one-expansion-unit' );
20
  }
21
 
22
- public static function veu_widget_description() {
23
  return __( 'Displays a list of archives. You can choose the post type and also to display archives by month or by year.', 'vk-all-in-one-expansion-unit' );
24
  }
25
 
@@ -27,6 +27,10 @@ class WP_Widget_VK_archive_list extends WP_Widget {
27
  * ウィジェットの表示画面
28
  */
29
  public function widget( $args, $instance ) {
 
 
 
 
30
  $arg = array(
31
  'echo' => 1,
32
  );
@@ -61,18 +65,21 @@ class WP_Widget_VK_archive_list extends WP_Widget {
61
  <?php echo $args['before_widget']; ?>
62
  <div class="sideWidget widget_archive">
63
  <?php
64
- if ( ( isset( $instance['label'] ) ) && $instance['label'] ) {
65
- echo $args['before_title'] . $instance['label'] . $args['after_title'];
 
 
66
  }
67
  ?>
68
- <?php if ( 'option' === $arg['format'] ) : ?>
69
- <select class="localNavi" name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
70
- <?php wp_get_archives( $arg ); ?>
71
- </select>
72
- <?php else : ?>
73
  <ul class="localNavi">
74
  <?php wp_get_archives( $arg ); ?>
75
  </ul>
 
 
 
 
 
76
  <?php endif; ?>
77
 
78
  </div>
@@ -82,16 +89,24 @@ class WP_Widget_VK_archive_list extends WP_Widget {
82
  }
83
 
84
  /**
85
- * ウィジェットの設定画面
86
  */
87
- public function form( $instance ) {
88
- // インスタンスを初期化&調整.
89
  $defaults = array(
90
  'post_type' => 'post',
91
  'display_type' => 'm',
92
  'label' => __( 'Monthly archives', 'vk-all-in-one-expansion-unit' ),
93
  'display_design' => 'list',
94
  );
 
 
 
 
 
 
 
 
 
95
  $instance = wp_parse_args( (array) $instance, $defaults );
96
 
97
  // 投稿タイプをオブジェクトで取得.
@@ -147,18 +162,22 @@ class WP_Widget_VK_archive_list extends WP_Widget {
147
  </select>
148
  </div>
149
 
150
- <!-- 表示タイプ -->
151
  <div>
152
- <label for="<?php echo $this->get_field_id( 'display_type' ); ?>">表示タイプ</label>
 
 
153
  <select name="<?php echo $this->get_field_name( 'display_type' ); ?>" >
154
  <option value="m" <?php selected( $instance['display_type'], 'm', true ); ?>><?php _e( 'Monthly', 'vk-all-in-one-expansion-unit' ); ?></option>
155
  <option value="y" <?php selected( $instance['display_type'], 'y', true ); ?>><?php _e( 'Yearly', 'vk-all-in-one-expansion-unit' ); ?></option>
156
  </select>
157
  </div>
158
 
159
- <!-- デザイン -->
160
  <div>
161
- <label for="<?php echo $this->get_field_id( 'display_design' ); ?>">デザイン</label>
 
 
162
  <select name="<?php echo $this->get_field_name( 'display_design' ); ?>" >
163
  <option value="list" <?php selected( $instance['display_design'],'list',true ); ?>><?php _e( 'Lists', 'vk-all-in-one-expansion-unit' ); ?></option>
164
  <option value="select" <?php selected( $instance['display_design'],'select',true ); ?>><?php _e( 'Select', 'vk-all-in-one-expansion-unit' ); ?></option>
10
  public function __construct() {
11
  parent::__construct(
12
  'WP_Widget_VK_archive_list',
13
+ self::widget_name(),
14
+ array( 'description' => self::widget_description() )
15
  );
16
  }
17
 
18
+ public static function widget_name() {
19
  return veu_get_prefix() . __( 'archive list', 'vk-all-in-one-expansion-unit' );
20
  }
21
 
22
+ public static function widget_description() {
23
  return __( 'Displays a list of archives. You can choose the post type and also to display archives by month or by year.', 'vk-all-in-one-expansion-unit' );
24
  }
25
 
27
  * ウィジェットの表示画面
28
  */
29
  public function widget( $args, $instance ) {
30
+
31
+ $defaults = self::get_option_defaults();
32
+ $instance = wp_parse_args( (array) $instance, $defaults );
33
+
34
  $arg = array(
35
  'echo' => 1,
36
  );
65
  <?php echo $args['before_widget']; ?>
66
  <div class="sideWidget widget_archive">
67
  <?php
68
+ if ( ! empty( $instance['label'] ) ) {
69
+ echo $args['before_title'];
70
+ echo VK_Helpers::sanitize_textarea( $instance['label'] );
71
+ echo $args['after_title'];
72
  }
73
  ?>
74
+ <?php if ( 'html' === $arg['format'] ) : ?>
 
 
 
 
75
  <ul class="localNavi">
76
  <?php wp_get_archives( $arg ); ?>
77
  </ul>
78
+ <?php else : ?>
79
+ <select class="localNavi" name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
80
+ <option value="" <?php selected( $instance['display_type'], '', true ); ?>><?php _e( 'Please select', 'vk-all-in-one-expansion-unit' ); ?></option>
81
+ <?php wp_get_archives( $arg ); ?>
82
+ </select>
83
  <?php endif; ?>
84
 
85
  </div>
89
  }
90
 
91
  /**
92
+ *
93
  */
94
+ public function get_option_defaults() {
 
95
  $defaults = array(
96
  'post_type' => 'post',
97
  'display_type' => 'm',
98
  'label' => __( 'Monthly archives', 'vk-all-in-one-expansion-unit' ),
99
  'display_design' => 'list',
100
  );
101
+ return $defaults;
102
+ }
103
+
104
+ /**
105
+ * ウィジェットの設定画面
106
+ */
107
+ public function form( $instance ) {
108
+ // インスタンスを初期化&調整.
109
+ $defaults = self::get_option_defaults();
110
  $instance = wp_parse_args( (array) $instance, $defaults );
111
 
112
  // 投稿タイプをオブジェクトで取得.
162
  </select>
163
  </div>
164
 
165
+ <!-- Archiveタイプ -->
166
  <div>
167
+ <label for="<?php echo $this->get_field_id( 'display_type' ); ?>">
168
+ <?php _e( 'Archive type', 'vk-all-in-one-expansion-unit' ); ?>
169
+ </label>
170
  <select name="<?php echo $this->get_field_name( 'display_type' ); ?>" >
171
  <option value="m" <?php selected( $instance['display_type'], 'm', true ); ?>><?php _e( 'Monthly', 'vk-all-in-one-expansion-unit' ); ?></option>
172
  <option value="y" <?php selected( $instance['display_type'], 'y', true ); ?>><?php _e( 'Yearly', 'vk-all-in-one-expansion-unit' ); ?></option>
173
  </select>
174
  </div>
175
 
176
+ <!-- Displayデザイン -->
177
  <div>
178
+ <label for="<?php echo $this->get_field_id( 'display_design' ); ?>">
179
+ <?php _e( 'Display design', 'vk-all-in-one-expansion-unit' ); ?>
180
+ </label>
181
  <select name="<?php echo $this->get_field_name( 'display_design' ); ?>" >
182
  <option value="list" <?php selected( $instance['display_design'],'list',true ); ?>><?php _e( 'Lists', 'vk-all-in-one-expansion-unit' ); ?></option>
183
  <option value="select" <?php selected( $instance['display_design'],'select',true ); ?>><?php _e( 'Select', 'vk-all-in-one-expansion-unit' ); ?></option>
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.5.3
7
- Stable tag: 9.47.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -81,6 +81,9 @@ e.g.
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 9.47.0.0 =
85
  [ Specification Change ] Dashboard information adjustment.
86
 
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.5.3
7
+ Stable tag: 9.48.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 9.48.0.0 =
85
+ [ Specification Change ][ Archive widget ] default setting tuning and add no select option.
86
+
87
  = 9.47.0.0 =
88
  [ Specification Change ] Dashboard information adjustment.
89
 
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.47.0.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.48.0.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vk-all-in-one-expansion-unit
9
  * Domain Path: /languages