VK All in One Expansion Unit - Version 7.0.2

Version Description

  • [ bug fix ][ Site Map ] Excrude no show ui taxonomy.
Download this release

Release Info

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

Code changes from version 7.0.1 to 7.0.2

plugins/sitemap_page/sitemap_page.php CHANGED
@@ -162,7 +162,7 @@ function vkExUnit_sitemap( $atts ) {
162
  /*-------------------------------------------*/
163
  $sitemap_html .= '<div class="col-md-6 sitemap-col">' . PHP_EOL;
164
 
165
- $page_for_posts = vkExUnit_get_page_for_posts();
166
  $allPostTypes = get_post_types( array( 'public' => true ) );
167
 
168
  $p = get_posts(
@@ -179,83 +179,56 @@ function vkExUnit_sitemap( $atts ) {
179
 
180
  foreach ( $allPostTypes as $postType ) {
181
  $post_type_object = get_post_type_object( $postType );
182
-
183
  if ( $post_type_object ) {
184
  $sitemap_html .= '<div class="sitemap-' . esc_attr( $postType ) . '">' . PHP_EOL;
185
- $postType_name = esc_html( $post_type_object->name );
186
- // post-type is post
187
- if ( $postType_name === 'post' ) {
188
-
189
- $postTypes = array( 'post' );
190
- $taxonomies = get_taxonomies();
191
- // Loop all post types
192
- foreach ( $postTypes as $key => $postType ) {
193
-
194
- $sitemap_html .= '<div class="sectionBox">' . PHP_EOL;
195
- $post_type_object = get_post_type_object( $postType );
196
- if ( $post_type_object ) {
197
-
198
- // Post type name
199
- if ( $postType == 'post' && $page_for_posts['post_top_use'] ) {
200
- $postTypeName = $page_for_posts['post_top_name'];
201
- $postTypeTopUrl = get_the_permalink( $page_for_posts['post_top_id'] );
202
- } else {
203
- $postTypeName = $post_type_object->labels->name;
204
- $postTypeTopUrl = get_post_type_archive_link( $postType );
205
- }
206
- $sitemap_html .= '<h4><a href="' . $postTypeTopUrl . '">' . esc_html( $postTypeName ) . '</a></h4>' . PHP_EOL;
207
-
208
- // Loop for all taxonomies
209
- foreach ( $taxonomies as $key => $taxonomy ) {
210
- $taxonomy_info = get_taxonomy( $taxonomy );
211
-
212
- // Get tax related post type
213
- $taxonomy_postType = $taxonomy_info->object_type[0];
214
- if ( $taxonomy_postType == $postType && ( $taxonomy_info->name != 'post_format' ) ) {
215
- $args = array(
216
- 'taxonomy' => $taxonomy,
217
- 'title_li' => '',
218
- 'orderby' => 'order',
219
- 'echo' => 0,
220
- 'show_option_none' => '',
221
- );
222
- $tax_sitemap_html = wp_list_categories( $args );
223
-
224
- if ( $tax_sitemap_html ) {
225
- $sitemap_html .= '<h5>' . $taxonomy_info->labels->name . '</h5>';
226
- $sitemap_html .= '<ul class="link-list">' . $tax_sitemap_html . '</ul>';
227
- }
228
- }
229
- } // foreach ( $taxonomies as $key => $taxonomy ) {
230
- } // end if($post_type_object)
231
- } // end foreach ($postTypes as $key => $postType)
232
- } // end post-type is post
233
- // not page_type and post_type
234
- elseif ( $postType_name !== 'page' && $postType_name !== 'attachment' ) {
235
- $customPost_url = get_post_type_archive_link( $postType );
236
- $sitemap_html .= '<h4><a href="' . $customPost_url . '">' . $post_type_object->labels->name . '</a></h4>' . PHP_EOL;
237
-
238
- $termNames = get_object_taxonomies( $postType_name );
239
-
240
- foreach ( $termNames as $termName ) {
241
- $termDate = get_taxonomy( $termName );
242
- $sitemap_html .= '<h5>' . $termDate->label . '</h5>' . PHP_EOL;
243
- $sitemap_html .= '<ul class="link-list">' . PHP_EOL;
244
- $args = array(
245
- 'taxonomy' => $termDate->name,
246
- 'title_li' => '',
247
- 'orderby' => 'order',
248
- 'echo' => 0,
249
- 'show_option_none' => '',
250
- );
251
- $sitemap_html .= wp_list_categories( $args );
252
- $sitemap_html .= '</ul>' . PHP_EOL;
253
- } // foreach ( $termNames as $termName ) {
254
- } // end not page_type and post_type
255
  $sitemap_html .= '</div>' . PHP_EOL;
256
- } // end if($post_type_object)
257
- } // end foreach ($allPostTypes as $postType)
258
- $sitemap_html .= '</div>' . PHP_EOL; // <!-- [ /.sectionBox ] -->
 
259
  $sitemap_html .= '</div>' . PHP_EOL; // <!-- [ /.sitemap-col ] -->
260
  $sitemap_html .= '</div>' . PHP_EOL; // <!-- [ /.sitemap ] -->
261
 
162
  /*-------------------------------------------*/
163
  $sitemap_html .= '<div class="col-md-6 sitemap-col">' . PHP_EOL;
164
 
165
+ $page_for_posts = vk_get_page_for_posts();
166
  $allPostTypes = get_post_types( array( 'public' => true ) );
167
 
168
  $p = get_posts(
179
 
180
  foreach ( $allPostTypes as $postType ) {
181
  $post_type_object = get_post_type_object( $postType );
 
182
  if ( $post_type_object ) {
183
  $sitemap_html .= '<div class="sitemap-' . esc_attr( $postType ) . '">' . PHP_EOL;
184
+ $sitemap_html .= '<div class="sectionBox">' . PHP_EOL;
185
+
186
+ /* Post type name
187
+ /*-------------------------------------------*/
188
+ if ( $postType == 'post' && $page_for_posts['post_top_use'] ) {
189
+ $postTypeName = $page_for_posts['post_top_name'];
190
+ $postTypeTopUrl = get_the_permalink( $page_for_posts['post_top_id'] );
191
+ } else {
192
+ $postTypeName = $post_type_object->labels->name;
193
+ $postTypeTopUrl = get_post_type_archive_link( $postType );
194
+ }
195
+ $sitemap_html .= '<h4><a href="' . $postTypeTopUrl . '">' . esc_html( $postTypeName ) . '</a></h4>' . PHP_EOL;
196
+
197
+ /* Taxonomy name
198
+ /*-------------------------------------------*/
199
+ // 投稿タイプに紐付いている taxonomy名だけ配列で取得
200
+ $taxonomies = get_object_taxonomies( $postType );
201
+
202
+ foreach ( $taxonomies as $taxonomy ) {
203
+ // taxonomyの詳細情報を取得
204
+ $taxonomy_object = get_taxonomy( $taxonomy );
205
+
206
+ // 管理画面のUIに表示させているものだけに限定
207
+ if ( $taxonomy_object->show_in_menu ) {
208
+ $sitemap_html .= '<h5>' . $taxonomy_object->label . '</h5>' . PHP_EOL;
209
+
210
+ /* Term
211
+ /*-------------------------------------------*/
212
+ $sitemap_html .= '<ul class="link-list">' . PHP_EOL;
213
+ $args = array(
214
+ 'taxonomy' => $taxonomy_object->name,
215
+ 'title_li' => '',
216
+ 'orderby' => 'order',
217
+ 'echo' => 0,
218
+ 'show_option_none' => '',
219
+ );
220
+ $sitemap_html .= wp_list_categories( $args );
221
+ $sitemap_html .= '</ul>' . PHP_EOL;
222
+ } // if ( $taxonomy_object->show_in_menu ) {
223
+
224
+ } // foreach ( $taxonomies as $taxonomy ) {
225
+
226
+ $sitemap_html .= '</div><!-- [ /.sectionBox ] -->' . PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  $sitemap_html .= '</div>' . PHP_EOL;
228
+
229
+ } // if ( $post_type_object ) {
230
+ } // foreach ( $allPostTypes as $postType ) {
231
+
232
  $sitemap_html .= '</div>' . PHP_EOL; // <!-- [ /.sitemap-col ] -->
233
  $sitemap_html .= '</div>' . PHP_EOL; // <!-- [ /.sitemap ] -->
234
 
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: 4.4
6
  Tested up to: 5.0.2
7
- Stable tag: 7.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -80,6 +80,9 @@ e.g.
80
 
81
  == Changelog ==
82
 
 
 
 
83
  = 7.0.1 =
84
  * [ bug fix ][ Page Top Button ] js error fixed.
85
 
4
  Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
5
  Requires at least: 4.4
6
  Tested up to: 5.0.2
7
+ Stable tag: 7.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
80
 
81
  == Changelog ==
82
 
83
+ = 7.0.2 =
84
+ * [ bug fix ][ Site Map ] Excrude no show ui taxonomy.
85
+
86
  = 7.0.1 =
87
  * [ bug fix ][ Page Top Button ] js error fixed.
88
 
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: 7.0.1
7
  * Author: Vektor,Inc.
8
  * Text Domain: vkExUnit
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: 7.0.2
7
  * Author: Vektor,Inc.
8
  * Text Domain: vkExUnit
9
  * Domain Path: /languages