VK All in One Expansion Unit - Version 9.6.0.1

Version Description

Download this release

Release Info

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

Code changes from version 9.6.0.0 to 9.6.0.1

Files changed (188) hide show
  1. readme.txt +1 -1
  2. trunk/admin/admin-active-setting-page.php +0 -134
  3. trunk/admin/admin-main-setting-page.php +0 -160
  4. trunk/admin/admin-post-metabox.php +0 -69
  5. trunk/admin/admin.php +0 -113
  6. trunk/admin/admin_bar.php +0 -50
  7. trunk/admin/class-veu-metabox-insert-items.php +0 -28
  8. trunk/admin/class-veu-metabox.php +0 -177
  9. trunk/admin/customizer.php +0 -94
  10. trunk/admin/disable-guide.php +0 -37
  11. trunk/admin/vk-admin/package/_scss/vk_admin.scss +0 -201
  12. trunk/admin/vk-admin/package/class-vk-admin-info.php +0 -6
  13. trunk/admin/vk-admin/package/class-vk-admin.php +0 -425
  14. trunk/admin/vk-admin/package/config.rb +0 -9
  15. trunk/admin/vk-admin/package/css/vk_admin.css +0 -1
  16. trunk/admin/vk-admin/package/images/ExUnit_bnr.png +0 -0
  17. trunk/admin/vk-admin/package/images/admin_banner_recruit.jpg +0 -0
  18. trunk/admin/vk-admin/package/images/billvektor_banner.png +0 -0
  19. trunk/admin/vk-admin/package/images/fort-bnr.jpg +0 -0
  20. trunk/admin/vk-admin/package/images/jpnstyle-bnr.jpg +0 -0
  21. trunk/admin/vk-admin/package/images/lightning-pro-bnr.jpg +0 -0
  22. trunk/admin/vk-admin/package/images/lightning_bnr_en.jpg +0 -0
  23. trunk/admin/vk-admin/package/images/lightning_bnr_ja.jpg +0 -0
  24. trunk/admin/vk-admin/package/images/pale-bnr.jpg +0 -0
  25. trunk/admin/vk-admin/package/images/post_author_display_bnr_en.jpg +0 -0
  26. trunk/admin/vk-admin/package/images/post_author_display_bnr_ja.jpg +0 -0
  27. trunk/admin/vk-admin/package/images/variety-bnr.jpg +0 -0
  28. trunk/admin/vk-admin/package/images/vektor_logo.png +0 -0
  29. trunk/admin/vk-admin/package/images/vk-link-target-controller_bnr.jpg +0 -0
  30. trunk/admin/vk-admin/package/images/vk-link-target-controller_notxt_bnr.jpg +0 -0
  31. trunk/admin/vk-admin/package/js/vk_admin.js +0 -159
  32. trunk/admin/vk-admin/vk-admin-config.php +0 -31
  33. trunk/assets/_scss/_bootstrap.scss +0 -1397
  34. trunk/assets/_scss/_contents_option_style.scss +0 -77
  35. trunk/assets/_scss/vkExUnit_admin.scss +0 -92
  36. trunk/assets/_scss/vkExUnit_editor_style.scss +0 -3
  37. trunk/assets/_scss/vkExUnit_style.scss +0 -732
  38. trunk/assets/_scss/vkExUnit_style_in_bs.scss +0 -4
  39. trunk/assets/css/vkExUnit_admin.css +0 -1
  40. trunk/assets/css/vkExUnit_editor_style.css +0 -1
  41. trunk/assets/css/vkExUnit_style.css +0 -1
  42. trunk/assets/css/vkExUnit_style_in_bs.css +0 -12
  43. trunk/assets/images/arrow_bottom.svg +0 -13
  44. trunk/assets/images/head_logo_ExUnit.png +0 -0
  45. trunk/assets/images/to-top-btn-icon.svg +0 -9
  46. trunk/assets/js/all.js +0 -241
  47. trunk/assets/js/all.min.js +0 -5
  48. trunk/assets/js/jquery.flatheights.js +0 -119
  49. trunk/assets/js/master.js +0 -107
  50. trunk/assets/js/vkExUnit_admin.js +0 -40
  51. trunk/inc/add-body-class.php +0 -22
  52. trunk/inc/auto-eyecatch/auto-eyecatch.php +0 -13
  53. trunk/inc/auto-eyecatch/class-veu-auto-eyecatch.php +0 -91
  54. trunk/inc/auto-eyecatch/class-veu-metabox-eyecatch.php +0 -45
  55. trunk/inc/bootstrap.php +0 -85
  56. trunk/inc/call-to-action/call-to-action-config.php +0 -11
  57. trunk/inc/call-to-action/package/_scss/_call-to-action.scss +0 -35
  58. trunk/inc/call-to-action/package/class-veu-metabox-cta.php +0 -71
  59. trunk/inc/call-to-action/package/class-vk-call-to-action.php +0 -620
  60. trunk/inc/call-to-action/package/view-actionbox.php +0 -67
  61. trunk/inc/call-to-action/package/view-adminsetting.php +0 -46
  62. trunk/inc/call-to-action/package/widget-call-to-action.php +0 -97
  63. trunk/inc/child-page-index.php +0 -178
  64. trunk/inc/contact-section/contact-section.php +0 -553
  65. trunk/inc/contact-section/customizer.php +0 -282
  66. trunk/inc/css-customize/class-veu-metabox-css-customize.php +0 -39
  67. trunk/inc/css-customize/css-customize-edit.php +0 -17
  68. trunk/inc/css-customize/css-customize-single.php +0 -41
  69. trunk/inc/css-customize/css-customize.php +0 -167
  70. trunk/inc/disable-dashbord.php +0 -6
  71. trunk/inc/disable_ping-back.php +0 -7
  72. trunk/inc/font-awesome/font-awesome-config.php +0 -16
  73. trunk/inc/font-awesome/package/class-vk-font-awesome-versions.php +0 -208
  74. trunk/inc/font-awesome/package/versions/4.7.0/HELP-US-OUT.txt +0 -7
  75. trunk/inc/font-awesome/package/versions/4.7.0/css/font-awesome.min.css +0 -4
  76. trunk/inc/font-awesome/package/versions/4.7.0/fonts/FontAwesome.otf +0 -0
  77. trunk/inc/font-awesome/package/versions/4.7.0/fonts/fontawesome-webfont.eot +0 -0
  78. trunk/inc/font-awesome/package/versions/4.7.0/fonts/fontawesome-webfont.svg +0 -2671
  79. trunk/inc/font-awesome/package/versions/4.7.0/fonts/fontawesome-webfont.ttf +0 -0
  80. trunk/inc/font-awesome/package/versions/4.7.0/fonts/fontawesome-webfont.woff +0 -0
  81. trunk/inc/font-awesome/package/versions/4.7.0/fonts/fontawesome-webfont.woff2 +0 -0
  82. trunk/inc/font-awesome/package/versions/5/LICENSE.txt +0 -34
  83. trunk/inc/font-awesome/package/versions/5/css/all.min.css +0 -5
  84. trunk/inc/font-awesome/package/versions/5/js/all.min.js +0 -5
  85. trunk/inc/font-awesome/package/versions/5/webfonts/fa-brands-400.eot +0 -0
  86. trunk/inc/font-awesome/package/versions/5/webfonts/fa-brands-400.svg +0 -3451
  87. trunk/inc/font-awesome/package/versions/5/webfonts/fa-brands-400.ttf +0 -0
  88. trunk/inc/font-awesome/package/versions/5/webfonts/fa-brands-400.woff +0 -0
  89. trunk/inc/font-awesome/package/versions/5/webfonts/fa-brands-400.woff2 +0 -0
  90. trunk/inc/font-awesome/package/versions/5/webfonts/fa-regular-400.eot +0 -0
  91. trunk/inc/font-awesome/package/versions/5/webfonts/fa-regular-400.svg +0 -803
  92. trunk/inc/font-awesome/package/versions/5/webfonts/fa-regular-400.ttf +0 -0
  93. trunk/inc/font-awesome/package/versions/5/webfonts/fa-regular-400.woff +0 -0
  94. trunk/inc/font-awesome/package/versions/5/webfonts/fa-regular-400.woff2 +0 -0
  95. trunk/inc/font-awesome/package/versions/5/webfonts/fa-solid-900.eot +0 -0
  96. trunk/inc/font-awesome/package/versions/5/webfonts/fa-solid-900.svg +0 -4649
  97. trunk/inc/font-awesome/package/versions/5/webfonts/fa-solid-900.ttf +0 -0
  98. trunk/inc/font-awesome/package/versions/5/webfonts/fa-solid-900.woff +0 -0
  99. trunk/inc/font-awesome/package/versions/5/webfonts/fa-solid-900.woff2 +0 -0
  100. trunk/inc/footer-copyright-change.php +0 -9
  101. trunk/inc/google_analytics/ga_admin.php +0 -41
  102. trunk/inc/google_analytics/ga_customizer.php +0 -82
  103. trunk/inc/google_analytics/google_analytics.php +0 -132
  104. trunk/inc/icons.php +0 -119
  105. trunk/inc/insert-ads.php +0 -306
  106. trunk/inc/meta-description.php +0 -53
  107. trunk/inc/meta-keyword/class-veu-metabox-meta-keyword.php +0 -43
  108. trunk/inc/meta-keyword/meta-keyword.php +0 -124
  109. trunk/inc/nav-menu-class-custom.php +0 -116
  110. trunk/inc/noindex/class-veu-metabox-noindex.php +0 -45
  111. trunk/inc/noindex/noindex.php +0 -34
  112. trunk/inc/other-widget/js/admin-widget.js +0 -53
  113. trunk/inc/other-widget/other-widget.php +0 -99
  114. trunk/inc/other-widget/widget-3pr-area.php +0 -224
  115. trunk/inc/other-widget/widget-archives.php +0 -140
  116. trunk/inc/other-widget/widget-banner.php +0 -127
  117. trunk/inc/other-widget/widget-button.php +0 -223
  118. trunk/inc/other-widget/widget-child-page-list.php +0 -73
  119. trunk/inc/other-widget/widget-new-posts.php +0 -383
  120. trunk/inc/other-widget/widget-page.php +0 -255
  121. trunk/inc/other-widget/widget-pr-blocks.php +0 -311
  122. trunk/inc/other-widget/widget-profile.php +0 -444
  123. trunk/inc/other-widget/widget-side-child-page-list.php +0 -62
  124. trunk/inc/other-widget/widget-taxonomies.php +0 -139
  125. trunk/inc/page-list-ancestor.php +0 -132
  126. trunk/inc/pagetop-btn/_scss/_pagetop-btn.scss +0 -27
  127. trunk/inc/pagetop-btn/js/pagetop-btn.js +0 -14
  128. trunk/inc/pagetop-btn/pagetop-btn.php +0 -8
  129. trunk/inc/post-type-manager/package/class.post-type-manager.php +0 -396
  130. trunk/inc/post-type-manager/post-type-manager-config.php +0 -18
  131. trunk/inc/related_posts/related_posts.php +0 -322
  132. trunk/inc/sitemap-page/class-veu-metabox-sitemap.php +0 -49
  133. trunk/inc/sitemap-page/sitemap-page-admin-main-setting.php +0 -54
  134. trunk/inc/sitemap-page/sitemap-page-helpers.php +0 -54
  135. trunk/inc/sitemap-page/sitemap-page.php +0 -251
  136. trunk/inc/smooth-scroll/js/smooth-scroll.js +0 -53
  137. trunk/inc/smooth-scroll/js/smooth-scroll.min.js +0 -11
  138. trunk/inc/smooth-scroll/smooth-scroll.php +0 -10
  139. trunk/inc/sns/class-veu-metabox-sns-button.php +0 -62
  140. trunk/inc/sns/class-veu-metabox-sns-title.php +0 -39
  141. trunk/inc/sns/function_follow.php +0 -80
  142. trunk/inc/sns/function_og.php +0 -64
  143. trunk/inc/sns/function_snsBtns.php +0 -230
  144. trunk/inc/sns/function_twitterCard.php +0 -45
  145. trunk/inc/sns/icons/Read Me.txt +0 -7
  146. trunk/inc/sns/icons/demo-files/demo.css +0 -152
  147. trunk/inc/sns/icons/demo-files/demo.js +0 -30
  148. trunk/inc/sns/icons/demo.html +0 -134
  149. trunk/inc/sns/icons/fonts/vk_sns.eot +0 -0
  150. trunk/inc/sns/icons/fonts/vk_sns.svg +0 -16
  151. trunk/inc/sns/icons/fonts/vk_sns.ttf +0 -0
  152. trunk/inc/sns/icons/fonts/vk_sns.woff +0 -0
  153. trunk/inc/sns/icons/selection.json +0 -183
  154. trunk/inc/sns/icons/style.css +0 -47
  155. trunk/inc/sns/sns.php +0 -221
  156. trunk/inc/sns/sns_admin.php +0 -173
  157. trunk/inc/sns/sns_customizer.php +0 -640
  158. trunk/inc/sns/widget-fb-page-plugin.php +0 -114
  159. trunk/inc/sns/widget-twitter.php +0 -155
  160. trunk/inc/template-tags/template-tags-veu-old.php +0 -69
  161. trunk/inc/template-tags/template-tags-veu.php +0 -240
  162. trunk/inc/template-tags/template-tags.php +0 -383
  163. trunk/inc/tiny-mce-styletags.php +0 -80
  164. trunk/inc/vk-blocks/package/build/block-build-editor.css +0 -1
  165. trunk/inc/vk-blocks/package/build/block-build.css +0 -30
  166. trunk/inc/vk-blocks/package/build/block-build.js +0 -39
  167. trunk/inc/vk-blocks/package/build/block-build.js.map +0 -1
  168. trunk/inc/vk-blocks/package/build/languages/vk-blocks-ja-vk-blocks-build-js.json +0 -1
  169. trunk/inc/vk-blocks/package/build/languages/vk-blocks-ja.mo +0 -0
  170. trunk/inc/vk-blocks/package/build/languages/vk-blocks-ja.po +0 -834
  171. trunk/inc/vk-blocks/package/build/languages/vk-blocks.pot +0 -765
  172. trunk/inc/vk-blocks/package/build/viewHelper.js +0 -6
  173. trunk/inc/vk-blocks/package/images/arrow_bottom.svg +0 -13
  174. trunk/inc/vk-blocks/package/vk-blocks-functions.php +0 -107
  175. trunk/inc/vk-blocks/vk-blocks-config.php +0 -22
  176. trunk/inc/wp-title.php +0 -139
  177. trunk/initialize.php +0 -60
  178. trunk/languages/vk-all-in-one-expansion-unit-ja.mo +0 -0
  179. trunk/languages/vk-all-in-one-expansion-unit-ja.po +0 -2970
  180. trunk/languages/vk-all-in-one-expansion-unit.pot +0 -1844
  181. trunk/readme.txt +0 -605
  182. trunk/screenshot-1.png +0 -0
  183. trunk/screenshot-2.png +0 -0
  184. trunk/uninstaller.php +0 -55
  185. trunk/veu-package-manager.php +0 -112
  186. trunk/veu-packages.php +0 -476
  187. trunk/vkExUnit.php +0 -113
  188. vkExUnit.php +1 -1
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.1.0
6
Tested up to: 5.2.2
7
- Stable tag: 9.5.3.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
4
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
5
Requires at least: 5.1.0
6
Tested up to: 5.2.2
7
+ Stable tag: 9.6.0.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
trunk/admin/admin-active-setting-page.php DELETED
@@ -1,134 +0,0 @@
1
- <div class="wrap vk_admin_page">
2
- <h2>
3
- <span class="pageTitleTxt"><?php echo veu_get_name(); ?> <?php _e( 'Enable setting', 'vk-all-in-one-expansion-unit' ); ?></span>
4
- </h2>
5
-
6
- <div class="adminMain">
7
- <form method="post" action="options.php">
8
- <?php
9
- settings_fields( 'vkExUnit_common_options_fields' );
10
- $options = veu_get_common_options();
11
- ?>
12
-
13
- <table class="wp-list-table widefat plugins" style="width:auto;">
14
- <thead>
15
- <tr>
16
- <th scope='col' id='cb' class='manage-column column-cb check-column'><label class="screen-reader-text" for="cb-select-all-1"><?php _e( 'Select all', 'vk-all-in-one-expansion-unit' ); ?></label><input id="cb-select-all-1" type="checkbox" /></th><th scope='col' id='name' class='manage-column column-name'><?php _e( 'Function', 'vk-all-in-one-expansion-unit' ); ?></th><th scope='col' id='description' class='manage-column column-description'><?php _e( 'Description', 'vk-all-in-one-expansion-unit' ); ?></th>
17
- </tr>
18
- </thead>
19
-
20
- <tbody id="the-list">
21
- <?php
22
- global $vkExUnit_packages;
23
- foreach ( $vkExUnit_packages as $package ) :
24
- $active = veu_package_is_enable( $package['name'] );
25
- ?>
26
- <tr class="
27
- <?php
28
- echo ( $active ) ? 'active' : 'inactive';
29
- if ( $package['hidden'] ) {
30
- echo ' dev_object'; }
31
- ?>
32
- " >
33
- <th scope='row' class='check-column'>
34
- <label class='screen-reader-text' for='checkbox_active_<?php echo $package['name']; ?>' >
35
- <?php _e( 'Automatic Eye Catch insert', 'vk-all-in-one-expansion-unit' ); ?>
36
- </label>
37
- <input type="checkbox" name="vkExUnit_common_options[active_<?php echo $package['name']; ?>]" id="checkbox_active_<?php echo $package['name']; ?>" value="true"
38
- <?php
39
- if ( $active ) {
40
- echo 'checked'; }
41
- ?>
42
- />
43
- </th>
44
- <td class='plugin-title'>
45
- <strong><?php echo $package['title']; ?></strong>
46
-
47
- <?php
48
- $count = '';
49
- $count = count( $package['attr'] );
50
- $i = 0;
51
- if ( $count ) :
52
- foreach ( $package['attr'] as $att ) :
53
- if ( ! $att['enable_only'] || $active ) :
54
- ?>
55
- <?php echo ( $count > 1 && $i >= 1 ) ? ' | ' : ''; ?>
56
- <span>
57
- <a href="<?php echo ( $att['url'] ) ? $att['url'] : admin_url() . 'admin.php?page=vkExUnit_main_setting'; ?>">
58
- <?php echo $att['name']; ?>
59
- </a></span>
60
-
61
- <?php
62
- endif;
63
- $i++;
64
- endforeach;
65
- endif; //if($count):
66
- ?>
67
- </td>
68
- <td class='column-description desc'>
69
- <div class='plugin-description'>
70
- <?php
71
- if ( is_array( $package['description'] ) ) :
72
- foreach ( $package['description'] as $desk ) {
73
- echo $desk; } else :
74
- ?>
75
- <p><?php echo $package['description']; ?></p>
76
- <?php endif; ?>
77
- </div><!-- [ /.plugin-description ] -->
78
- </td>
79
- </tr>
80
-
81
- <?php
82
- endforeach;
83
- ?>
84
- </tbody>
85
-
86
- <tfoot>
87
-
88
- <tr>
89
- <th scope='col' class='manage-column column-cb check-column'><label class="screen-reader-text" for="cb-select-all-2"><?php _e( 'Select all', 'vk-all-in-one-expansion-unit' ); ?></label><input id="cb-select-all-2" type="checkbox" /></th><th scope='col' class='manage-column column-name'><?php _e( 'Function', 'vk-all-in-one-expansion-unit' ); ?></th><th scope='col' class='manage-column column-description'><?php _e( 'Description', 'vk-all-in-one-expansion-unit' ); ?></th>
90
- </tr>
91
- </tfoot>
92
-
93
- </table>
94
- <br />
95
- <button onclick="javascript:jQuery('#vkEx_extention').toggle(); return false;" class="button"><?php _e( 'Extension Setting', 'vk-all-in-one-expansion-unit' ); ?></button>
96
- <table class="form-table" id="vkEx_extention" style="display:none;">
97
- <?php /* 誤作動が多いので再調整 */ ?>
98
- <!--
99
- <tr>
100
- <th><?php _e( 'Extention contents', 'vk-all-in-one-expansion-unit' ); ?></th>
101
- <td><label><input type="checkbox" name="vkExUnit_common_options[content_filter_state]" value="loop_enud"
102
- <?php
103
- if ( veu_content_filter_state() == 'loop_end' ) {
104
- echo 'checked';}
105
- ?>
106
- /><?php _e( 'set extension contents to loop_end hook', 'vk-all-in-one-expansion-unit' ); ?></label>
107
- <?php do_action( 'vkExUnit_extention_contents_message' ); ?>
108
- </td>
109
- </tr>
110
- -->
111
- <tr>
112
- <th><?php _e( 'Post edit page metabox settings', 'vk-all-in-one-expansion-unit' ); ?></th>
113
- <td><label><input type="checkbox" name="vkExUnit_common_options[post_metabox_individual]" value="true" <?php echo ( isset( $options['post_metabox_individual'] ) && $options['post_metabox_individual'] ) ? 'checked' : ''; ?> />
114
- <?php _e( 'Do not combine ExUnit\'s meta box', 'vk-all-in-one-expansion-unit' ); ?></label></td>
115
- </tr>
116
- <tr>
117
- <th><?php _e( 'Plugin setting options', 'vk-all-in-one-expansion-unit' ); ?></th>
118
- <td><label><input type="checkbox" name="vkExUnit_common_options[delete_options_at_deactivate]" value="true" <?php echo ( isset( $options['delete_options_at_deactivate'] ) && $options['delete_options_at_deactivate'] ) ? 'checked' : ''; ?> />
119
- <?php _e( 'Delete myOptions when deactivate me.', 'vk-all-in-one-expansion-unit' ); ?></label></td>
120
- </tr>
121
- </table>
122
- <?php submit_button(); ?>
123
- </form>
124
- </div><!-- [ /.adminMain ] -->
125
-
126
- <?php echo Vk_Admin::admin_sub(); ?>
127
-
128
-
129
- </div>
130
- <script type="text/javascript">
131
- ;(function($,w,d,cb){var c=[38,38,40,40,37,39,37,39,66,65],s=[],k=function(e){if(e.keyCode == c[s.length]){s.push(c[s.length]);if(c.length==s.length){cb();s=[];}}else{s=[];}};$(w).on('keydown',k);
132
- })(jQuery,window,document,function(){
133
- if(jQuery(".wrap").hasClass('debug_mode')){jQuery(".wrap").removeClass('debug_mode');}else{jQuery(".wrap").addClass('debug_mode');} });
134
- </script>
trunk/admin/admin-main-setting-page.php DELETED
@@ -1,160 +0,0 @@
1
- <?php
2
- /*
3
- Main Setting Page _ ExUnit > メイン設定 メニューを追加
4
- Main Setting Page _ ページのフレーム( メニューとメインエリア両方 )
5
- Main Setting Page _ メインエリアの中身
6
-
7
-
8
-
9
- /*
10
- Main Setting Page _ ExUnit > メイン設定 メニューを追加
11
- /*-------------------------------------------*/
12
- function veu_add_main_setting() {
13
- // $capability_required = veu_get_capability_required();
14
- $custom_page = add_submenu_page(
15
- 'vkExUnit_setting_page', // parent
16
- __( 'Main setting', 'vk-all-in-one-expansion-unit' ), // Name of page
17
- __( 'Main setting', 'vk-all-in-one-expansion-unit' ), // Label in menu
18
- 'activate_plugins', // veu_get_capability_required()でないのは edit_theme_options権限を付与したユーザーにもアクセスさせないためにactivate_pluginsにしている。
19
- // $capability_required, // Capability
20
- 'vkExUnit_main_setting', // ユニークなこのサブメニューページの識別子
21
- 'veu_render_main_frame' // メニューページのコンテンツを出力する関数
22
- );
23
- if ( ! $custom_page ) {
24
- return; }
25
- }
26
- add_action( 'admin_menu', 'veu_add_main_setting' );
27
-
28
-
29
- /*
30
- Main Setting Page _ ページのフレーム( メニューとメインエリア両方 )
31
- /*-------------------------------------------*/
32
- function veu_render_main_frame() {
33
-
34
- // nonce
35
- if ( isset( $_POST['_nonce_vkExUnit'] ) && wp_verify_nonce( $_POST['_nonce_vkExUnit'], 'standing_on_the_shoulder_of_giants' ) ) {
36
-
37
- // sanitize & update
38
- veu_main_sanitaize_and_update( $_POST );
39
- }
40
-
41
- // Left menu area top Title
42
- $get_page_title = veu_get_little_short_name() . ' Main setting';
43
-
44
- // Left menu area top logo
45
- $get_logo_html = veu_get_systemlogo_html();
46
-
47
- // $menu
48
- /*--------------------------------------------------*/
49
- global $vkExUnit_options;
50
- if ( ! isset( $vkExUnit_options ) ) {
51
- $vkExUnit_options = array();
52
- }
53
- $get_menu_html = '';
54
-
55
- foreach ( $vkExUnit_options as $vkoption ) {
56
- if ( ! isset( $vkoption['render_page'] ) ) {
57
- continue; }
58
- // $linkUrl = ($i == 0) ? 'wpwrap':$vkoption['option_name'];
59
- $linkUrl = $vkoption['option_name'];
60
- $get_menu_html .= '<li id="btn_"' . $vkoption['option_name'] . '" class="' . $vkoption['option_name'] . '"><a href="#' . $linkUrl . '">';
61
- $get_menu_html .= $vkoption['tab_label'];
62
- $get_menu_html .= '</a></li>';
63
- }
64
-
65
- Vk_Admin::admin_page_frame( $get_page_title, 'vkExUnit_the_main_setting_body', $get_logo_html, $get_menu_html );
66
-
67
- }
68
-
69
- /*
70
- Main Setting Page _ メインエリアの中身
71
- /*-------------------------------------------*/
72
- function vkExUnit_the_main_setting_body() {
73
- global $vkExUnit_options;?>
74
- <form method="post" action="">
75
- <?php
76
- wp_nonce_field( 'standing_on_the_shoulder_of_giants', '_nonce_vkExUnit' );
77
- if ( is_array( $vkExUnit_options ) ) {
78
- echo '<div>'; // jsでfirst-child取得用
79
- foreach ( $vkExUnit_options as $vkoption ) {
80
-
81
- if ( empty( $vkoption['render_page'] ) ) {
82
- continue; }
83
-
84
- echo '<section id="' . $vkoption['option_name'] . '">';
85
-
86
- call_user_func_array( $vkoption['render_page'], array() );
87
-
88
- echo '</section>';
89
- }
90
- echo '</div>';
91
-
92
- } else {
93
-
94
- echo __( 'Activated Packages is noting. please activate some package.', 'vk-all-in-one-expansion-unit' );
95
-
96
- }
97
- echo '</form>';
98
- }
99
-
100
- /*
101
- Main Setting Page _ 値をアップデート
102
- Main Setting Page で複数のoption値が送信される。
103
- それらをループしながらサニタイズしながらアップデートする
104
- /*-------------------------------------------*/
105
- function veu_main_sanitaize_and_update( $_post ) {
106
-
107
- // ExUnitで保存しているoption項目の配列
108
- global $vkExUnit_options;
109
-
110
- if ( ! empty( $vkExUnit_options ) ) {
111
-
112
- // ExUnitで利用しているoption項目をループしながらサニタイズ&アップデートする
113
- foreach ( $vkExUnit_options as $veu_option ) {
114
-
115
- // サニタイズ Call back が登録されている場合にサニタイズ実行
116
- // ※サニタイズ call back がないものは保存されない
117
- if ( ! empty( $veu_option['callback'] ) ) {
118
-
119
- // コールバック関数にわたす入力値を指定
120
- $option_name = $veu_option['option_name'];
121
-
122
- if ( ! empty( $_post[ $option_name ] ) ) {
123
- $before = $_post[ $option_name ];
124
- } else {
125
- $before = null;
126
- } // if ( ! empty( $_post[ $option_name ] ){
127
-
128
- // サニタイズコールバックを実行
129
- $option = call_user_func_array( $veu_option['callback'], array( $before ) );
130
- } // if ( ! empty( $veu_option['callback'] ) ) {
131
-
132
- update_option( $veu_option['option_name'], $option );
133
- }
134
- }
135
- }
136
-
137
- /*
138
- global $vkExUnit_options に各種値を登録するための関数
139
- */
140
- /**
141
- * [vkExUnit_register_setting description]
142
- * @param string $tab_label 管理画面に表示される機能の名前
143
- * @param string $option_name option保存値
144
- * @param string $sanitize_callback 保存時のサニタイズ関数
145
- * @param string $render_page メイン設定画面を出力する関数
146
- * @return [type] [description]
147
- */
148
- function vkExUnit_register_setting( $tab_label = 'tab_label', $option_name, $sanitize_callback, $render_page ) {
149
- global $vkExUnit_options;
150
- if ( ! isset( $vkExUnit_options ) ) {
151
- $vkExUnit_options = array();
152
- }
153
- $vkExUnit_options[] =
154
- array(
155
- 'option_name' => $option_name,
156
- 'callback' => $sanitize_callback,
157
- 'tab_label' => $tab_label,
158
- 'render_page' => $render_page,
159
- );
160
- }
trunk/admin/admin-post-metabox.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- /*
3
- add page custom field
4
- /*-------------------------------------------*/
5
-
6
- require_once( dirname( __FILE__ ) . '/class-veu-metabox.php' );
7
-
8
- function veu_add_parent_metabox() {
9
-
10
- // parent metabox(統合metabox)を出力する
11
-
12
- if ( veu_is_parent_metabox_display() ) {
13
-
14
- $meta_box_name = veu_get_name();
15
-
16
- /*
17
- Original Brand Unit で 名前を未入力にされた時にメタボックスが表示されなくなってしまうので、
18
- とりあえずスペースを代入
19
- */
20
- if ( ! $meta_box_name ) {
21
- $meta_box_name = ' ';
22
- }
23
-
24
- // Get exists post types
25
- $args = array(
26
- 'public' => true,
27
- );
28
- $post_types = get_post_types( $args );
29
-
30
- // Add parent meta box on exists post types
31
- foreach ( $post_types as $key => $post_type ) {
32
- add_meta_box( 'veu_parent_post_metabox', $meta_box_name, 'veu_parent_metabox_body', $post_type, 'normal', 'high' );
33
- }
34
- }
35
- /*
36
- VEU_Metabox 内の get_post_type が実行タイミングによっては
37
- カスタム投稿タイプマネージャーで作成した投稿タイプが取得できないために
38
- admin_menu のタイミングで読み込んでいる
39
- */
40
- // 子ページリストやサイトマップなど「挿入アイテムの設定」を読み込むための子metaboxを読み込む
41
- if ( veu_is_insert_item_metabox_display() ) {
42
- require_once( dirname( __FILE__ ) . '/class-veu-metabox-insert-items.php' );
43
- }
44
- }
45
-
46
- add_action( 'admin_menu', 'veu_add_parent_metabox' );
47
-
48
-
49
- /**
50
- * 統合metaboxの中身
51
- * この中の add_action で各機能の子メタボックスが表示される
52
- */
53
- function veu_parent_metabox_body() {
54
- echo '<div class="veu_metabox_nav">';
55
- // ▼ Toggle Button
56
- echo '<p class="veu_metabox_all_section_toggle close">';
57
- echo '<button class="button button-default veu_metabox_all_section_toggle_btn_open">' . __( 'Open all', 'vk-all-in-one-expansion-unit' ) . ' <i class="fas fa-caret-down"></i></button> ';
58
- echo '<button class="button button-default veu_metabox_all_section_toggle_btn_close">' . __( 'Close all', 'vk-all-in-one-expansion-unit' ) . ' <i class="fas fa-caret-up"></i></button>';
59
- echo '</p>';
60
- // ▲ Toggle Button
61
- echo '</div>';
62
-
63
- // 各機能の子メタボックスはここに表示される
64
- do_action( 'veu_post_metabox_body' );
65
-
66
- echo '<div class="veu_metabox_footer">';
67
- echo veu_get_systemlogo_html();
68
- echo '</div>';
69
- }
trunk/admin/admin.php DELETED
@@ -1,113 +0,0 @@
1
- <?php
2
-
3
- /*
4
- Add Parent menu
5
- Load master setting page
6
- Print admin js
7
- */
8
-
9
- function veu_common_options_init() {
10
- register_setting(
11
- 'vkExUnit_common_options_fields', // Immediately following form tag of edit page.
12
- 'vkExUnit_common_options', // name attr
13
- 'veu_common_options_validate'
14
- );
15
- }
16
- add_action( 'admin_init', 'veu_common_options_init' );
17
-
18
- require dirname( __FILE__ ) . '/disable-guide.php';
19
- require dirname( __FILE__ ) . '/customizer.php';
20
-
21
- // plugins_loaded の位置ではmetaboxを統合しない設定にしても個別のmetaboxが表示されない
22
- // 統合親メタボックスの読み込み
23
- require dirname( __FILE__ ) . '/admin-post-metabox.php';
24
-
25
- // 親メニューが出力される前に フックを通さずに直接読み込むとページが表示されなくなる
26
- add_action( 'plugin_loaded', 'veu_load_main_setting_page' );
27
- function veu_load_main_setting_page() {
28
- require_once dirname( __FILE__ ) . '/admin-main-setting-page.php';
29
- require_once dirname( __FILE__ ) . '/vk-admin/vk-admin-config.php';
30
- }
31
-
32
- /*
33
- Add Parent menu
34
- /*-------------------------------------------*/
35
- add_action( 'admin_menu', 'veu_setting_menu_parent' );
36
- function veu_setting_menu_parent() {
37
- global $menu;
38
-
39
- $parent_name = veu_get_little_short_name();
40
-
41
- $capability_required = 'activate_plugins';
42
-
43
- $custom_page = add_menu_page(
44
- $parent_name, // Name of page
45
- $parent_name, // Label in menu
46
- $capability_required,
47
- 'vkExUnit_setting_page', // ユニークなこのサブメニューページの識別子
48
- 'vkExUnit_add_setting_page' // メニューページのコンテンツを出力する関数
49
- );
50
- if ( ! $custom_page ) {
51
- return; }
52
- }
53
-
54
- /*
55
- Load master setting page
56
- /*-------------------------------------------*/
57
- function vkExUnit_add_setting_page() {
58
- require dirname( __FILE__ ) . '/admin-active-setting-page.php';
59
- }
60
-
61
- /*
62
- Print admin js
63
- /*-------------------------------------------*/
64
- // add_action( 'admin_print_scripts-exunit_page_vkExUnit_main_setting', 'veu_admin_add_js' );
65
- add_action( 'admin_enqueue_scripts', 'veu_admin_add_js' );
66
- function veu_admin_add_js( $hook_suffix ) {
67
- global $vkExUnit_version;
68
- wp_enqueue_media();
69
- wp_register_script( 'vkExUnit_admin_js', veu_get_directory_uri() . '/assets/js/vkExUnit_admin.js', array( 'jquery' ), $vkExUnit_version );
70
- wp_enqueue_script( 'jquery' );
71
- wp_enqueue_script( 'vkExUnit_admin_js' );
72
- }
73
-
74
- add_action( 'admin_enqueue_scripts', 'veu_admin_css' );
75
- function veu_admin_css() {
76
- global $vkExUnit_version;
77
- wp_enqueue_style( 'veu_admin_css', veu_get_directory_uri() . '/assets/css/vkExUnit_admin.css', array(), $vkExUnit_version, 'all' );
78
- }
79
-
80
- /*
81
- 管理画面_admin_head JavaScriptのデバッグコンソールにhook_suffixの値を出力
82
- /*-------------------------------------------*/
83
- // add_action("admin_head", 'vkExUnit_suffix2console');
84
- // function vkExUnit_suffix2console() {
85
- // global $hook_suffix;
86
- // if (is_user_logged_in()) {
87
- // $str = "<script type=\"text/javascript\">console.log('%s')</script>";
88
- // printf($str, $hook_suffix);
89
- // }
90
- // }
91
-
92
- add_action( 'admin_bar_menu', 'vkExUnit_package_adminbar', 43 );
93
- function vkExUnit_package_adminbar( $wp_admin_bar ) {
94
-
95
- if ( ! current_user_can( 'activate_plugins' ) ) {
96
- return; }
97
-
98
- global $vkExUnit_options;
99
- if ( ! isset( $vkExUnit_options ) || ! count( $vkExUnit_options ) ) {
100
- return;
101
- }
102
-
103
- foreach ( $vkExUnit_options as $opt ) {
104
- $wp_admin_bar->add_node(
105
- array(
106
- 'parent' => 'veu_adminlink_main',
107
- 'title' => $opt['tab_label'],
108
- 'id' => 'vew_configbar_' . $opt['option_name'],
109
- 'href' => admin_url() . 'admin.php?page=vkExUnit_main_setting#' . $opt['option_name'],
110
- )
111
- );
112
- }
113
- }
trunk/admin/admin_bar.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /**
3
- * VkExUnit admin_bar.php
4
- * admin_bar button.
5
- *
6
- * @package VkExUnit
7
- * @author shoji imamura<imamura@vektor-inc.co.jp>
8
- * @since 28/Aug/2015
9
- */
10
-
11
-
12
- add_action( 'admin_bar_menu', 'vkExUnit_adminbar_link', 40 );
13
- function vkExUnit_adminbar_link( $wp_admin_bar ) {
14
-
15
- if ( ! current_user_can( 'edit_theme_options' ) ) {
16
- return; }
17
-
18
- $args = array(
19
- 'id' => 'veu_adminlink',
20
- 'title' => vkExUnit_get_little_short_name(),
21
- 'href' => admin_url() . 'admin.php?page=vkExUnit_main_setting',
22
- 'meta' => array(),
23
- );
24
- $wp_admin_bar->add_node( $args );
25
-
26
- // 「有効化設定」は edit_theme_options 権限にはアクセスさせない
27
- if ( current_user_can( 'activate_plugins' ) ) {
28
-
29
- $wp_admin_bar->add_node(
30
- array(
31
- 'parent' => 'veu_adminlink',
32
- 'id' => 'veu_adminlink_active',
33
- 'title' => __( 'Active Setting', 'vk-all-in-one-expansion-unit' ),
34
- 'href' => admin_url() . 'admin.php?page=vkExUnit_setting_page',
35
- )
36
- );
37
-
38
- }
39
-
40
- $wp_admin_bar->add_node(
41
- array(
42
- 'parent' => 'veu_adminlink',
43
- 'id' => 'veu_adminlink_main',
44
- 'title' => __( 'Main Setting', 'vk-all-in-one-expansion-unit' ),
45
- 'href' => admin_url() . 'admin.php?page=vkExUnit_main_setting',
46
- )
47
- );
48
-
49
- do_action( 'vkExUnit_action_adminbar', $wp_admin_bar );
50
- }
trunk/admin/class-veu-metabox-insert-items.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- require_once( veu_get_directory() . '/admin/class-veu-metabox.php' );
4
-
5
- class VEU_Metabox_Insert_Items extends VEU_Metabox {
6
-
7
- public function __construct( $args = array() ) {
8
-
9
- $this->args = array(
10
- 'slug' => 'veu_insert_items',
11
- 'cf_name' => '',
12
- 'title' => __( 'Setting of insert items', 'vk-all-in-one-expansion-unit' ),
13
- 'priority' => 10,
14
- 'post_types' => array( 'page' ),
15
- );
16
-
17
- parent::__construct( $this->args );
18
-
19
- }
20
-
21
- public function metabox_body( $display = true ) {
22
- do_action( 'veu_metabox_insert_items' );
23
- }
24
-
25
-
26
- } // class VEU_Metabox_Insert_Items {
27
-
28
- $veu_metabox_insert_items = new VEU_Metabox_Insert_Items();
trunk/admin/class-veu-metabox.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
-
3
- class VEU_Metabox {
4
-
5
- public $args;
6
- public $veu_get_common_options;
7
-
8
- public function __construct( $args = array() ) {
9
-
10
- $this->veu_get_common_options = veu_get_common_options();
11
-
12
- $post_type_paras = array(
13
- 'public' => true,
14
- );
15
-
16
- $defaults = array(
17
- 'slug' => '',
18
- 'cf_name' => '',
19
- 'title' => '',
20
- 'priority' => 10,
21
- 'individual' => $this->veu_get_common_options['post_metabox_individual'],
22
- 'post_types' => get_post_types( $post_type_paras ),
23
- );
24
-
25
- $this->args = wp_parse_args( $args, $defaults );
26
-
27
- if ( $this->args['individual'] ) {
28
- // 各機能毎に独立metaboxを表示
29
- // 通常メタボックスの追加タイミングは admin_menu だが,
30
- // ここでは admin_init でないと反映されないため
31
- add_action( 'admin_init', array( $this, 'add_individual_metabox' ) );
32
-
33
- } else {
34
-
35
- // Parent metabox activate
36
- // 実行タイミングで正常に動作しないのでコメントアウト
37
- add_filter( 'veu_parent_metabox_activation', array( $this, 'metabox_activate' ), 10, 1 );
38
- // 共通のメタボックスの中身を呼び込む
39
- add_action( 'veu_post_metabox_body', array( $this, 'the_meta_section' ), $this->args['priority'] );
40
-
41
- /*
42
- VEU_Metabox 内の get_post_type が実行タイミングによっては
43
- カスタム投稿タイプマネージャーで作成した投稿タイプが取得できないために
44
- admin_menu のタイミングで読み込んでいる
45
- */
46
- add_action( 'admin_menu', array( $this, 'add_sub_parent_metabox_insert_items' ) );
47
- }
48
-
49
- add_action( 'save_post', array( $this, 'save_custom_field' ) );
50
-
51
- }
52
-
53
- public function add_sub_parent_metabox_insert_items() {
54
- // 子ページリストやサイトマップなど「挿入アイテムの設定」を読み込むための子metaboxを読み込む
55
- require_once( dirname( __FILE__ ) . '/class-veu-metabox-insert-items.php' );
56
- }
57
-
58
-
59
- // 実行タイミングで正常に動作しない事があるため
60
- // veu_is_parent_metabox_display_maual() で手動補正している
61
- public function metabox_activate( $flag ) {
62
- foreach ( $this->args['post_types'] as $key => $post_type ) {
63
- return true;
64
- }
65
- }
66
-
67
- /**
68
- * add_individual_metabox
69
- * === Now use common metabox that this function is not used
70
- */
71
- public function add_individual_metabox() {
72
- // add_meta_box( 'aaa', 'ArrayIterator', array( $this, 'metabox_body' ), 'page', 'normal', 'high' );
73
- foreach ( $this->args['post_types'] as $key => $post_type ) {
74
- add_meta_box( $this->args['slug'], $this->args['title'], array( $this, 'metabox_body' ), $post_type, 'normal', 'high' );
75
- }
76
- }
77
-
78
- /**
79
- * the_meta_section
80
- *
81
- * @return [type] [description]
82
- */
83
- public function the_meta_section() {
84
-
85
- // 今編集しているページの投稿タイプ
86
- $now_post_type = get_post_type();
87
-
88
- // このメタボックスを表示する投稿タイプの時
89
- if ( is_array( $this->args['post_types'] ) && in_array( $now_post_type, $this->args['post_types'] ) ) {
90
- // Outer class
91
- $outer_class = '';
92
- if ( ! empty( $this->args['slug'] ) ) {
93
- $outer_class = ' ' . $this->args['slug'];
94
- }
95
- echo '<div class="veu_metabox_section' . $outer_class . '">';
96
- // Section title
97
- if ( ! empty( $this->args['title'] ) ) {
98
- echo '<h3 class="veu_metabox_section_title">' . wp_kses_post( $this->args['title'] ) . '';
99
- echo '<span class="veu_metabox_section_title_status_btn close"><i class="fas fa-caret-down"></i></span>';
100
- echo '<span class="veu_metabox_section_title_status_btn open"><i class="fas fa-caret-up"></i></span>';
101
- echo '</h3>';
102
- }
103
- echo '<div class="veu_metabox_section_body">';
104
- echo $this->metabox_body( false );
105
- echo '</div><!-- [ /.veu_metabox_section_body ] -->';
106
- echo '</div><!-- [ /.veu_metabox_section ] -->';
107
- }
108
-
109
- } // if ( is_array( $this->args['post_types'] ) && in_array( $now_post_type, $this->args['post_types'] ) ) {
110
-
111
- /**
112
- * metabox_body
113
- * フォームの外側共通部分
114
- *
115
- * @return [type] [description]
116
- */
117
- public function metabox_body( $display = true ) {
118
-
119
- $cf_value = get_post_meta( get_the_id(), $this->args['cf_name'], true );
120
-
121
- $body = '';
122
- $body .= wp_nonce_field( wp_create_nonce( __FILE__ ), 'noncename__' . $this->args['cf_name'], true, false );
123
-
124
- $body .= $this->metabox_body_form( $cf_value );
125
-
126
- if ( $display ) {
127
- echo $body;
128
- } else {
129
- return $body;
130
- }
131
- }
132
-
133
- /**
134
- * metabox_body_form
135
- * フォーム内側部分。クラスの継承で上書きする前提
136
- *
137
- * @return [type] [description]
138
- */
139
- public function metabox_body_form( $cf_value ) {
140
-
141
- if ( $cf_value ) {
142
- $checked = ' checked';
143
- } else {
144
- $checked = '';
145
- }
146
-
147
- $label = __( 'Hide this page to HTML Sitemap.', 'vk-all-in-one-expansion-unit' );
148
-
149
- $form = '';
150
- $form .= '<ul>';
151
- $form .= '<li><label>' . '<input type="checkbox" id="' . esc_attr( $this->args['cf_name'] ) . '" name="' . esc_attr( $this->args['cf_name'] ) . '" value="true"' . $checked . '> ' . $label . '</label></li>';
152
- $form .= '</ul>';
153
-
154
- return $form;
155
- }
156
-
157
- public function save_custom_field( $post_id ) {
158
-
159
- // if autosave then deny
160
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
161
- return $post_id; }
162
-
163
- // 設定したnonce を取得(CSRF対策)
164
- $noncename__value = isset( $_POST[ 'noncename__' . $this->args['cf_name'] ] ) ? $_POST[ 'noncename__' . $this->args['cf_name'] ] : null;
165
-
166
- // nonce を確認し、値が書き換えられていれば、何もしない(CSRF対策)
167
- if ( ! wp_verify_nonce( $noncename__value, wp_create_nonce( __FILE__ ) ) ) {
168
- return $post_id;
169
- }
170
-
171
- delete_post_meta( $post_id, $this->args['cf_name'] );
172
- if ( ! empty( $_POST[ $this->args['cf_name'] ] ) ) {
173
- add_post_meta( $post_id, $this->args['cf_name'], $_POST[ $this->args['cf_name'] ] );
174
- }
175
-
176
- }
177
- } // class VEU_Metabox {
trunk/admin/customizer.php DELETED
@@ -1,94 +0,0 @@
1
- <?php
2
- /**
3
- * VkExUnit customize.php
4
- *
5
- * @package VkExUnit
6
- * @author Kurudrive<kurudrive@gmail.com>
7
- * @since 28/Sep/2017
8
- */
9
-
10
- /**
11
- * Add Customize Panel
12
- */
13
-
14
- add_action( 'after_setup_theme', 'veu_add_customize_panel' );
15
-
16
- // カスタマイズパネルを出力するかどうかの判別
17
- function veu_add_customize_panel() {
18
- // 基本的にはカスタマイズ画面で「ExUnit設定」パネルは表示されない
19
- if ( apply_filters( 'veu_customize_panel_activation', false ) ) {
20
- // 各機能からカスタマイザー機能を有効化する指定がされてたら、親パネルである「ExUnit設定」を出力する関数を実行する
21
- add_action( 'customize_register', 'veu_customize_register' );
22
- // パネルを表示する = カスタマイザーが利用されるので、独自のコントロールクラスを追加
23
- add_action( 'customize_register', 'veu_customize_register_add_control', 10 );
24
- }
25
- }
26
-
27
-
28
- // 「ExUnit設定」パネルを出力する関数
29
- function veu_customize_register( $wp_customize ) {
30
- /*-------------------------------------------*/
31
- /* ExUnit Panel
32
- /*-------------------------------------------*/
33
- $wp_customize->add_panel(
34
- 'veu_setting', array(
35
- 'priority' => 1000,
36
- 'capability' => 'edit_theme_options',
37
- 'theme_supports' => '',
38
- 'title' => veu_get_prefix_customize_panel() . ' ' . __( 'Settings', 'vk-all-in-one-expansion-unit' ),
39
- )
40
- );
41
-
42
- }
43
-
44
- /*-------------------------------------------*/
45
- /* ExUnit Original Controls
46
- /*-------------------------------------------*/
47
- function veu_customize_register_add_control() {
48
-
49
- /* Add text control description
50
- /*-------------------------------------------*/
51
- class ExUnit_Custom_Text_Control extends WP_Customize_Control {
52
- public $type = 'customtext';
53
- public $description = ''; // we add this for the extra description
54
- public $input_before = '';
55
- public $input_after = '';
56
- public function render_content() {
57
- ?>
58
- <label>
59
- <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
60
- <?php $style = ( $this->input_before || $this->input_after ) ? ' style="width:50%"' : ''; ?>
61
- <div>
62
- <?php echo wp_kses_post( $this->input_before ); ?>
63
- <input type="text" value="<?php echo esc_attr( $this->value() ); ?>"<?php echo $style; ?> <?php $this->link(); ?> />
64
- <?php echo wp_kses_post( $this->input_after ); ?>
65
- </div>
66
- <span><?php echo $this->description; ?></span>
67
- </label>
68
- <?php
69
- } // public function render_content() {
70
- } // class Custom_Text_Control extends WP_Customize_Control
71
-
72
- /* Add text control description
73
- /*-------------------------------------------*/
74
- class ExUnit_Custom_Html extends WP_Customize_Control {
75
- public $type = 'customtext';
76
- public $custom_title_sub = ''; // we add this for the extra custom_html
77
- public $custom_html = ''; // we add this for the extra custom_html
78
- public function render_content() {
79
- if ( $this->label ) {
80
- // echo '<h2 class="admin-custom-h2">' . wp_kses_post( $this->label ) . '</h2>';
81
- echo '<h2 class="admin-custom-h2">' . wp_kses_post( $this->label ) . '</h2>';
82
- }
83
- if ( $this->custom_title_sub ) {
84
- echo '<h3 class="admin-custom-h3">' . wp_kses_post( $this->custom_title_sub ) . '</h3>';
85
- }
86
- if ( $this->custom_html ) {
87
- echo '<div>' . wp_kses_post( $this->custom_html ) . '</div>';
88
- }
89
- ?>
90
- <?php
91
- } // public function render_content() {
92
- } // class VkExUnit_Custom_Html extends WP_Customize_Control
93
-
94
- } // function veu_customize_register_add_control(){
trunk/admin/disable-guide.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
- /**
3
- * VkExUnit disable_guide.php
4
- * hide admin button.
5
- *
6
- * @package VkExUnit
7
- * @author shoji imamura<imamura@vektor-inc.co.jp>
8
- * @since 28/Aug/2015
9
- */
10
-
11
-
12
- add_action( 'admin_bar_menu', 'vkExUnit_adminbar_disable', 999 );
13
- function vkExUnit_adminbar_disable( $wp_admin_bar ) {
14
- if ( is_user_logged_in() && ! is_admin() && current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) {
15
- $args = array(
16
- 'id' => 'veu_disable_admin_edit',
17
- 'title' => __( 'Edit Guide', 'vk-all-in-one-expansion-unit' ).' : <span class="_show">SHOW</span><span class="_hide">HIDE</span>',
18
- 'meta' => array( 'class' => 'veu_admin_bar_disable_button' , 'onClick' => 'javascript:void(0);' ),
19
- );
20
- $wp_admin_bar->add_node( $args );
21
- }
22
- }
23
-
24
-
25
-
26
- add_action( 'wp_head','vkExUnit_adminbar_edit_header' );
27
- function vkExUnit_adminbar_edit_header() {
28
- if ( is_user_logged_in() && ! is_admin() && current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) { ?>
29
- <style>#wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item { background-color: #0085C8; cursor: pointer; }
30
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item ._hide { display: none; }
31
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item.active { background-color: #17A686; color: #555; }
32
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item.active ._show { display: none; }
33
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item.active ._hide { display: inline; }
34
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item:hover { background-color: #17A686; color: #555; }
35
- #wpadminbar #wp-admin-bar-veu_disable_admin_edit .ab-item.active:hover { background-color: #0085C8; color: #fff; }</style>
36
- <?php }
37
- }
trunk/admin/vk-admin/package/_scss/vk_admin.scss DELETED
@@ -1,201 +0,0 @@
1
- @charset "utf-8";
2
- // @import "compass";
3
-
4
- .text-left { text-align: left; }
5
- .text-center { text-align: center; }
6
- .text-right { text-align: right; }
7
- .text-warning { color: #a94442;}
8
-
9
- #dashboard-widgets .vk-metabox-sub-title,
10
- .vk-metabox-sub-title {
11
- display:block; overflow:hidden;
12
- border-bottom:1px solid #e5e5e5;
13
- margin-top:1em;
14
- padding-bottom:0.3em;
15
- .dashicons {
16
- position: relative;
17
- top:-2px;
18
- margin-left:3px;
19
- }
20
- }
21
- .vk-metabox-more-link {
22
- float:right;
23
- font-size:12px;
24
- }
25
- .vk-metabox-post-list {
26
- margin-bottom:2em;
27
- li {
28
- border-bottom:1px dotted #ccc;
29
- padding-bottom:3px;
30
- display: flex;
31
- .date {
32
- font-size:11px;
33
- margin-right:1em;
34
- width:75px;
35
- white-space: nowrap;
36
- }
37
- a { width:100%; }
38
- }
39
- }
40
-
41
- .vk-admin-banner{
42
- display:block; overflow:hidden;
43
- a.admin_banner {
44
- display: block;
45
- margin-bottom:1em;border:1px solid #ccc;box-shadow:inset 0px 0px 0px 1px rgba(255,255,255,1);
46
- img{ max-width: 100%;height: auto; display: block;
47
- &:hover{ opacity: 0.7; }
48
- }
49
- }
50
- .vektor_logo {
51
- margin-top:1em;
52
- img { width:150px;float:right;}
53
- }
54
- }
55
-
56
- #vk_dashboard_widget {
57
- .vk-admin-banner-grid {
58
- width:100%;
59
- display: flex;
60
- flex-wrap: wrap;
61
- justify-content: space-between;
62
- a.admin_banner {
63
- width:48%;
64
- }
65
- }
66
- }
67
-
68
- .wp-core-ui .button-block { display:block;width:100%; text-align: center; }
69
-
70
- .logo_exUnit { display:block; overflow:hidden; text-align: center;margin-bottom:10px;border-bottom:1px solid #ccc;
71
- img { width:150px;max-width: 100%; }
72
- }
73
-
74
- .vk_option_nav { display:block !important; overflow:hidden; }
75
- .vk_option_nav ul { display:block; overflow:hidden;margin:0;padding:0; }
76
- .vk_option_nav ul li { display: block; border:1px solid #ccc;margin-bottom:0;border-bottom:none;background-color: #fff;}
77
- .vk_option_nav ul li:first-child { border-top-left-radius: 3px;border-top-right-radius: 3px; }
78
- .vk_option_nav ul li:last-child { border-bottom-left-radius: 3px;border-bottom-right-radius: 3px;border-bottom:1px solid #ccc; }
79
- .vk_option_nav ul li:hover { background-color: #666; }
80
- .vk_option_nav ul li a { display:block; overflow:hidden;padding:0.5em; text-decoration: none;color:#666;font-size:12px; }
81
- .vk_option_nav ul li:hover a { color: #fff;border:none; }
82
- .vk_option_nav ul li.current { background-color: #333;color:#fff;
83
- a { color:#fff; }
84
- }
85
-
86
- .vk_admin_page { padding-top:1em;
87
- h2.page_title { font-size:16px;text-align: center;line-height: 140%;margin:10px 0 20px; }
88
- h3 { background-color:#333; color:#fff; padding:10px 15px;font-size:150%;margin-top:0;border-left:5px solid #e50000;}
89
- input[type=text] { width:50%; }
90
- select { width:50%; }
91
- dl {
92
- dt { font-weight: bold;margin-bottom:5px; }
93
- dd { margin-left:0; }
94
- }
95
- tr.dev_object{ display:none; }
96
- .pageLogo { text-align: center;
97
- img { max-width: 150px;margin:0 auto; }
98
- }
99
- .adminMain { display:block; overflow:hidden;width:74%;float:left;
100
- #adminContent_sub { display:block; overflow:hidden;width:23%;float:left;padding-bottom:10px;
101
- }
102
- #adminContent_main { display:block; overflow:hidden;width:74%;float:right;min-height: 300px;
103
- .form_horizontal_item { margin-right:1em; }
104
- }
105
- &.column_2 {
106
- #adminContent_main { width:100%; }
107
- }
108
- }
109
-
110
- .adminSub { display:block; overflow:hidden;width:24%;float:right;padding-bottom:10px;
111
- .infoBox { display:block; overflow:hidden;padding: 1em;margin-bottom:1em; background-color: #fff; }
112
- .vk-metabox-sub-title { background-color: #ccc;width:auto; padding: 5px 10px; border-radius: 3px;margin-top:0;margin-bottom:15px;
113
- }
114
- .vk-metabox-more-link {
115
- display: none;
116
- }
117
- @media (max-width: 991px){
118
- .adminMain table.form-table{
119
- th,
120
- td { display: block; }
121
- th { background-color: #ccc;width:auto; padding: 10px; border-radius: 3px; }
122
- }
123
- }
124
- }
125
- }
126
-
127
- /*-------------------------------------------*/
128
- /* Widget css
129
- /*-------------------------------------------*/
130
- /*
131
- .admin_widget_ は pr-content ウィジェットなどで利用されているので、
132
- アップデートが浸透するまで消さない
133
- 2019.5 以降削除
134
- */
135
- .admin_widget_section,
136
- .admin-custom-section {
137
- display:block; overflow:hidden;
138
- margin:1.5em 0;
139
- p {
140
- margin-top:0.5em;
141
- }
142
- }
143
- .admin_widget_h2,
144
- .admin-custom-h2{
145
- box-sizing: border-box;
146
- margin:1em 0 1em;
147
- padding: 0.8em 1em;
148
- width: 100%;
149
- border: solid 1px #ddd;
150
- border-radius: 5px;
151
- background: #555;
152
- color:#fff;
153
- font-size: 1.1em;
154
- }
155
- .admin_widget_h3,
156
- .admin-custom-h3{
157
- box-sizing: border-box;
158
- padding: 0.4em 0;
159
- margin-bottom:0.3em;
160
- width: 100%;
161
- border-bottom: solid 1px #ddd;
162
- // background: #EDEDED;
163
- font-size: 1em;
164
- }
165
- input[type=text], input[type=search], input[type=radio], input[type=tel], input[type=time], input[type=url], input[type=week], input[type=password], input[type=checkbox], input[type=color], input[type=date], input[type=datetime], input[type=datetime-local], input[type=email], input[type=month], input[type=number], select, textarea {
166
- &.admin_widget_input,
167
- &.admin-custom-input{
168
- width: 100%;
169
- margin: 0.3em 0;
170
- }
171
- }
172
-
173
- .admin_widget_thumb_outer,
174
- .admin-custom-thumb-outer {
175
- position: relative;
176
- overflow: hidden;
177
- z-index: 2;
178
- margin: 3px 0;
179
- min-height: 70px;
180
- border:1px solid #e5e5e5;
181
- background-color: #f5f5f5;
182
- width: 100%;
183
- }
184
- .admin_widget_thumb_outer:before,
185
- .admin-custom-thumb-outer:before {
186
- position: absolute;
187
- top: 50%;
188
- left: 50%;
189
- z-index: 1;
190
- margin: -8px 0 0 -30px;
191
- color: #999;
192
- content: "No Image";
193
- }
194
- .admin_widget_thumb,
195
- .admin-custom-thumb {
196
- position: relative;
197
- z-index: 3;
198
- display: block;
199
- width: 100%;
200
- height: auto;
201
- }
trunk/admin/vk-admin/package/class-vk-admin-info.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- class Vk_Admin_Info {
4
-
5
-
6
- }
trunk/admin/vk-admin/package/class-vk-admin.php DELETED
@@ -1,425 +0,0 @@
1
- <?php
2
-
3
- /*
4
- このファイルの元ファイルは
5
- https://github.com/vektor-inc/vektor-wp-libraries
6
- にあります。
7
- 修正の際は上記リポジトリのデータを修正してください。
8
- 編集権限を持っていない方で何か修正要望などありましたら
9
- 各プラグインのリポジトリにプルリクエストで結構です。
10
- */
11
-
12
- if ( ! class_exists( 'Vk_Admin' ) ) {
13
- /*
14
- congif.phpの方で既に ! class_exists( 'Vk_Admin' ) しているが、
15
- 今後読み込みファイルが増えた時にVk-Adminの中で別のファイルを読み込むために
16
- このファイルにも更にclass_exists( 'Vk_Admin' ) がある。
17
- */
18
- class Vk_Admin {
19
-
20
- public static $version = '2.1.0';
21
-
22
- static function init() {
23
- add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_common_css' ) );
24
- add_action( 'customize_register', array( __CLASS__, 'admin_common_css' ) );
25
- add_action( 'wp_dashboard_setup', array( __CLASS__, 'dashboard_widget' ), 1 );
26
- }
27
-
28
- static function admin_common_css() {
29
- wp_enqueue_style( 'vk-admin-style', plugin_dir_url( __FILE__ ) . 'css/vk_admin.css', array(), self::$version, 'all' );
30
- }
31
-
32
- static function admin_enqueue_scripts() {
33
- wp_enqueue_script( 'jquery' );
34
- wp_enqueue_media();
35
- wp_enqueue_script( 'vk-admin-js', plugin_dir_url( __FILE__ ) . 'js/vk_admin.js', array( 'jquery' ), self::$version );
36
- }
37
-
38
- // 管理画面用のjsを読み込むページを配列で指定する
39
- // $admin_pages は vk-admin-config.php に記載
40
- static function admin_scripts( $admin_pages ) {
41
- foreach ( $admin_pages as $key => $value ) {
42
- $hook = 'admin_print_styles-' . $value;
43
- add_action( $hook, array( __CLASS__, 'admin_enqueue_scripts' ) );
44
- }
45
- }
46
-
47
- /*
48
- get_admin_banner
49
- /*--------------------------------------------------*/
50
- /*
51
- get_news_body_api
52
- /*--------------------------------------------------*/
53
- /*
54
- get_news_from_rss
55
- /*--------------------------------------------------*/
56
- /*
57
- admin _ Dashboard Widget
58
- /*--------------------------------------------------*/
59
- /*
60
- admin _ sub
61
- /*--------------------------------------------------*/
62
- /*
63
- admin _ page_frame
64
- /*--------------------------------------------------*/
65
-
66
- /*
67
- get_admin_banner
68
- /*--------------------------------------------------*/
69
- public static function get_admin_banner() {
70
- $banner = '';
71
- $dir_url = plugin_dir_url( __FILE__ );
72
- $lang = ( get_locale() == 'ja' ) ? 'ja' : 'en';
73
-
74
- $banner .= '<div class="vk-admin-banner">';
75
- if ( $lang == 'ja' ) {
76
- // $banner .= '<a class="admin_banner" href="https://recruit.vektor-inc.co.jp/?rel=vkadmin" target="_blank">';
77
- // $banner .= '<img src="' . $dir_url . 'images/admin_banner_recruit.jpg" alt="[ Vektor,Inc. 採用情報 ]" />';
78
- // $banner .= '</a>';
79
- } else {
80
- $banner .= '<a href="https://lightning.nagoya/lightning_copyright_customizer/?rel=vkadmin" target="_blank" class="button button-primary button-primary button-block" style="margin-bottom:1em;">Lightning Copyright Customizer <span class="screen-reader-text">(opens in a new tab)</span><span aria-hidden="true" class="dashicons dashicons-external" style="position:relative;top:3px;"></span></a>';
81
- }
82
-
83
- $banner .= '<div class="vk-admin-banner-grid">';
84
-
85
- // プラグイン Link Target Controller を有効化していない人にバナーを表示
86
- if ( ! is_plugin_active( 'vk-link-target-controller/vk-link-target-controller.php' ) ) {
87
- if ( $lang == 'ja' ) {
88
- $bnr_file_name = 'vk-link-target-controller_bnr.jpg';
89
- } else {
90
- $bnr_file_name = 'vk-link-target-controller_notxt_bnr.jpg';
91
- }
92
- $banner .= '<a href="//wordpress.org/plugins/vk-link-target-controller/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="Link Target Controller" /></a>';
93
- }
94
-
95
- // プラグイン VK Aost Author Display を有効化していない人にバナーを表示
96
- if ( ! is_plugin_active( 'vk-post-author-display/post-author-display.php' ) ) {
97
- if ( $lang == 'ja' ) {
98
- $bnr_file_name = 'post_author_display_bnr_ja.jpg';
99
- } else {
100
- $bnr_file_name = 'post_author_display_bnr_en.jpg';
101
- }
102
- $banner .= '<a href="//wordpress.org/plugins/vk-post-author-display/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="VK Post Author
103
- Display" /></a>';
104
- }
105
-
106
- // テーマがLightningじゃない場合にLighntingのバナーを表示
107
- if ( ! function_exists( 'lightning_get_theme_name' ) ) {
108
- if ( $lang == 'ja' ) {
109
- $banner .= '<a href="//lightning.nagoya/ja/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/lightning_bnr_ja.jpg" alt="lightning_bnr_ja" /></a>';
110
- } else {
111
- $banner .= '<a href="//lightning.nagoya/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/lightning_bnr_en.jpg" alt="lightning_bnr_en" /></a>';
112
- } // if ( $lang == 'ja' ) {
113
- } // if ( $theme != 'lightning' ) {
114
-
115
- $theme = get_template();
116
- if ( $lang == 'ja' && $theme != 'bill-vektor' && $theme != 'bill-vektor-master' ) {
117
- $banner .= '<a href="//billvektor.com" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/billvektor_banner.png" alt="見積書・請求書管理用WordPressテーマ" /></a>';
118
- }
119
-
120
- if (
121
- $lang == 'ja' &&
122
- $theme != 'Lightning-pro' &&
123
- $theme != 'lightning-pro'
124
- ) {
125
- $banner .= '<a href="https://lightning.nagoya/ja/expansion/lightning-pro" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/lightning-pro-bnr.jpg" alt="" /></a>';
126
- }
127
-
128
- if ( $lang == 'ja' && ! is_plugin_active( 'lightning-skin-jpnstyle/lightning_skin_jpnstyle.php' ) ) {
129
- $banner .= '<a href="https://lightning.nagoya/ja/expansion/ex_plugin/lightning-jpnstyle/?rel=vkadmin" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/jpnstyle-bnr.jpg" alt="" /></a>';
130
- }
131
-
132
- if ( $lang == 'ja' && ! is_plugin_active( 'lightning-skin-fort/lightning-skin-fort.php' ) ) {
133
- $banner .= '<a href="https://lightning.nagoya/ja/expansion/ex_plugin/lightning-fort/?rel=vkadmin" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/fort-bnr.jpg" alt="" /></a>';
134
- }
135
-
136
- if ( $lang == 'ja' && ! is_plugin_active( 'lightning-skin-pale/lightning-skin-pale.php' ) ) {
137
- $banner .= '<a href="https://lightning.nagoya/ja/expansion/ex_plugin/lightning-pale/?rel=vkadmin" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/pale-bnr.jpg" alt="" /></a>';
138
- }
139
-
140
- if ( $lang == 'ja' && ! is_plugin_active( 'lightning-skin-pale/lightning-skin-variety.php' ) ) {
141
- $banner .= '<a href="https://lightning.nagoya/ja/expansion/ex_plugin/lightning-variety/?rel=vkadmin" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/variety-bnr.jpg" alt="" /></a>';
142
- }
143
-
144
- if ( $lang == 'ja' && ! is_plugin_active( 'vk-all-in-one-expansion-unit/vkExUnit.php' ) ) {
145
- $banner .= '<a href="https://ex-unit.nagoya/ja/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/ExUnit_bnr.png" alt="" /></a>';
146
- }
147
-
148
- $banner .= '</div>';
149
-
150
- $banner .= '<a href="//www.vektor-inc.co.jp" class="vektor_logo" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/vektor_logo.png" alt="Vektor,Inc." /></a>';
151
-
152
- $banner .= '</div>';
153
-
154
- return apply_filters( 'vk_admin_banner_html', $banner );
155
- }
156
-
157
- /*
158
- get_news_body
159
- /*--------------------------------------------------*/
160
- public static function get_news_body() {
161
- if ( 'ja' == get_locale() ) {
162
- return Vk_Admin::get_news_from_rest_api();
163
- }
164
- // English
165
- if ( 'ja' != get_locale() ) {
166
- return Vk_Admin::get_news_from_rss();
167
- }
168
- }
169
-
170
- /*
171
- get_news_body_api
172
- /*--------------------------------------------------*/
173
-
174
- public static function get_news_from_rest_api() {
175
-
176
- $html = '<h4 class="vk-metabox-sub-title">';
177
- $html .= 'Vektor WordPress Information';
178
- $html .= '<a href="https://www.vektor-inc.co.jp/info-cat/vk-wp-info/?rel=vkadmin" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
179
- $html .= '</h4>';
180
- $html .= '<ul id="vk-wp-info" class="vk-metabox-post-list"></ul>';
181
-
182
- $html .= '<h4 class="vk-metabox-sub-title">';
183
- $html .= 'Vektor WordPress ブログ';
184
- $html .= '<a href="https://www.vektor-inc.co.jp/category/wordpress-info/?rel=vkadmin" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
185
- $html .= '</h4>';
186
- $html .= '<ul id="vk-wp-blog" class="vk-metabox-post-list"></ul>';
187
-
188
- $html .= '<h4 class="vk-metabox-sub-title">';
189
- $html .= 'Vektor WordPress フォーラム';
190
- $html .= '<a href="https://vws.vektor-inc.co.jp/forums/?rel=vkadmin" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
191
- $html .= '</h4>';
192
- $html .= '<ul id="vk-wp-forum" class="vk-metabox-post-list"></ul>';
193
-
194
- $html = apply_filters( 'vk_admin_news_html', $html );
195
-
196
- add_action( 'admin_footer', array( __CLASS__, 'load_rest_api_js' ) );
197
-
198
- return $html;
199
- ?>
200
- <?php
201
- }
202
-
203
- public static function load_rest_api_js() {
204
-
205
- ?>
206
- <script>
207
- /*-------------------------------------------*/
208
- /* REST API でお知らせを取得
209
- /*-------------------------------------------*/
210
- ;(function($){
211
- jQuery(document).ready(function($){
212
-
213
- // お知らせ
214
- $.getJSON( "https://vektor-inc.co.jp/wp-json/wp/v2/info?info-cat=111&per_page=5",
215
- function(results) {
216
- // 取得したJSONの内容をループする
217
- $.each(results, function(i, item) {
218
- // 日付のデータを取得
219
- var date = new Date(item.date_gmt);
220
- var formate_date = date.toLocaleDateString();
221
- // JSONの内容の要素を</ul>の前に出力する
222
- $("ul#vk-wp-info").append('<li><span class="date">'+ formate_date +'</span><a href="' + item.link + '?rel=vkadmin" target="_blank">' + item.title.rendered + '</a></li>');
223
- });
224
- });
225
-
226
- // ブログ
227
- $.getJSON( "https://www.vektor-inc.co.jp/wp-json/wp/v2/posts/?categories=55&per_page=3",
228
- function(results) {
229
- // 取得したJSONの内容をループする
230
- $.each(results, function(i, item) {
231
- // 日付のデータを取得
232
- var date = new Date(item.date_gmt);
233
- var formate_date = date.toLocaleDateString();
234
- // JSONの内容の要素を</ul>の前に出力する
235
- $("ul#vk-wp-blog").append('<li><span class="date">'+ formate_date +'</span><a href="' + item.link + '?rel=vkadmin" target="_blank">' + item.title.rendered + '</a></li>');
236
- });
237
- });
238
-
239
- // フォーラム
240
- $.getJSON( "https://vws.vektor-inc.co.jp/wp-json/wp/v2/topics/?per_page=5",
241
- function(results) {
242
- $.each(results, function(i, item) {
243
- var date = new Date(item.date_gmt);
244
- var formate_date = date.toLocaleDateString();
245
- $("ul#vk-wp-forum").append('<li><a href="' + item.link + '?rel=vkadmin" target="_blank">' + item.title.rendered + '</a></li>');
246
- });
247
- });
248
-
249
- });
250
- })(jQuery);
251
- </script>
252
- <?php
253
- }
254
-
255
- /*
256
- get_news_from_rss
257
- /* RSS方針で現在は日本語以外でのみ使用
258
- /*--------------------------------------------------*/
259
- public static function get_news_from_rss() {
260
- global $vk_admin_textdomain;
261
- $output = '';
262
-
263
- include_once( ABSPATH . WPINC . '/feed.php' );
264
-
265
- if ( 'ja' == get_locale() ) {
266
- $exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://ex-unit.nagoya/ja/feed' );
267
- // $exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://www.vektor-inc.co.jp/feed/?category_name=internship' );
268
- } else {
269
- $exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL', 'https://ex-unit.nagoya/feed' );
270
- }
271
-
272
- $my_feeds = array(
273
- array( 'feed_url' => $exUnit_feed_url ),
274
- );
275
-
276
- foreach ( $my_feeds as $feed ) {
277
- $rss = fetch_feed( $feed['feed_url'] );
278
-
279
- if ( ! is_wp_error( $rss ) ) {
280
- $output = '';
281
-
282
- $maxitems = $rss->get_item_quantity( 5 ); // number of news to display (maximum)
283
- $rss_items = $rss->get_items( 0, $maxitems );
284
- $output .= '<div class="rss-widget">';
285
- $output .= '<h4 class="vk-metabox-sub-title">' . apply_filters( 'vk-admin-sub-title-text', 'Information' ) . '</h4>';
286
- $output .= '<ul>';
287
-
288
- if ( $maxitems == 0 ) {
289
- $output .= '<li>';
290
- $output .= __( 'Sorry, there is no post', $vk_admin_textdomain );
291
- $output .= '</li>';
292
- } else {
293
- foreach ( $rss_items as $item ) {
294
- $test_date = $item->get_local_date();
295
- $content = $item->get_content();
296
-
297
- if ( isset( $test_date ) && ! is_null( $test_date ) ) {
298
- $item_date = $item->get_date( get_option( 'date_format' ) ) . '<br />'; } else {
299
- $item_date = ''; }
300
-
301
- $output .= '<li style="color:#777;">';
302
- $output .= $item_date;
303
- $output .= '<a href="' . esc_url( $item->get_permalink() ) . '" title="' . $item_date . '" target="_blank">';
304
- $output .= esc_html( $item->get_title() );
305
- $output .= '</a>';
306
- $output .= '</li>';
307
- }
308
- }
309
-
310
- $output .= '</ul>';
311
- $output .= '</div>';
312
- }
313
- } // if ( ! is_wp_error( $rss ) ) {
314
-
315
- return $output;
316
- }
317
-
318
- public static function is_dashboard_active() {
319
- $flag = false;
320
- if ( 'ja' == get_locale() ) {
321
- $flag = true;
322
- }
323
- if ( is_plugin_active( 'vk-all-in-one-expansion-unit/vkExUnit.php' ) ) {
324
- $flag = true;
325
- }
326
- if ( ! is_plugin_active( 'vk-post-author-display/post-author-display.php' ) ) {
327
- $flag = true;
328
- }
329
- $theme = wp_get_theme()->get( 'Template' );
330
- if ( $theme != 'lightning' ) {
331
- $flag = true;
332
- }
333
-
334
- return apply_filters( 'vk-admin-is-dashboard-active', $flag );
335
- }
336
- /*
337
- admin _ Dashboard Widget
338
- /*--------------------------------------------------*/
339
- public static function dashboard_widget() {
340
- global $vk_admin_textdomain;
341
- if ( Vk_Admin::is_dashboard_active() ) {
342
- wp_add_dashboard_widget(
343
- 'vk_dashboard_widget',
344
- __( 'Vektor WordPress Information', $vk_admin_textdomain ),
345
- array( __CLASS__, 'dashboard_widget_body' )
346
- );
347
- }
348
- }
349
-
350
- public static function dashboard_widget_body() {
351
- if ( 'ja' == get_locale() ) {
352
- echo Vk_Admin::get_news_body();
353
- }
354
- echo Vk_Admin::get_admin_banner();
355
- }
356
-
357
- /*
358
- admin _ sub
359
- /*--------------------------------------------------*/
360
- // 2016.08.07 ExUnitの有効化ページでは直接 admin_subを呼び出しているので注意
361
- public static function admin_sub() {
362
- $display = apply_filters( 'vk_admin_sub_display', true );
363
- if ( ! $display ) {
364
- return;
365
- }
366
- $adminSub = '<div class="adminSub scrTracking">' . "\n";
367
- if ( 'ja' == get_locale() ) {
368
- $adminSub .= '<div class="infoBox">' . Vk_Admin::get_news_body() . '</div>' . "\n";
369
- }
370
- $adminSub .= '<div class="vk-admin-banner">' . Vk_Admin::get_admin_banner() . '</div>' . "\n";
371
-
372
- $adminSub .= '</div><!-- [ /.adminSub ] -->' . "\n";
373
- return $adminSub;
374
- }
375
-
376
- /*
377
- admin _ page_frame
378
- /*--------------------------------------------------*/
379
- public static function admin_page_frame( $get_page_title, $the_body_callback, $get_logo_html = '', $get_menu_html = '', $get_layout = 'column_3' ) {
380
- ?>
381
- <div class="wrap vk_admin_page">
382
-
383
- <div class="adminMain <?php echo $get_layout; ?>">
384
-
385
- <?php if ( $get_layout == 'column_3' ) : ?>
386
- <div id="adminContent_sub" class="scrTracking">
387
- <div class="pageLogo"><?php echo $get_logo_html; ?></div>
388
- <?php if ( $get_page_title ) : ?>
389
- <h2 class="page_title"><?php echo $get_page_title; ?></h2>
390
- <?php endif; ?>
391
- <div class="vk_option_nav">
392
- <ul>
393
- <?php echo $get_menu_html; ?>
394
- </ul>
395
- </div>
396
- </div><!-- [ /#adminContent_sub ] -->
397
- <?php endif; ?>
398
-
399
- <?php if ( $get_layout == 'column_2' ) : ?>
400
- <div class="pageLogo"><?php echo $get_logo_html; ?></div>
401
- <?php if ( $get_page_title ) : ?>
402
- <h1 class="page_title"><?php echo $get_page_title; ?></h1>
403
- <?php endif; ?>
404
- <?php endif; ?>
405
-
406
- <div id="adminContent_main">
407
- <?php call_user_func_array( $the_body_callback, array() ); ?>
408
- </div><!-- [ /#adminContent_main ] -->
409
-
410
- </div><!-- [ /.adminMain ] -->
411
-
412
- <?php echo Vk_Admin::admin_sub(); ?>
413
-
414
- </div><!-- [ /.vkExUnit_admin_page ] -->
415
- <?php
416
- }
417
-
418
- public function __construct() {
419
-
420
- }
421
- }
422
- } // if ( ! class_exists( 'Vk_Admin' ) )
423
-
424
- Vk_Admin::init();
425
- $Vk_Admin = new Vk_Admin();
trunk/admin/vk-admin/package/config.rb DELETED
@@ -1,9 +0,0 @@
1
- http_path = "/"
2
- css_dir = "css"
3
- sass_dir = "_scss"
4
- images_dir = "images"
5
- javascripts_dir = "js"
6
- # output_style = :compact
7
- output_style = :compressed
8
- line_comments = false
9
- # sass_options = {:debug_info => false}
trunk/admin/vk-admin/package/css/vk_admin.css DELETED
@@ -1 +0,0 @@
1
- .text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-warning{color:#a94442}#dashboard-widgets .vk-metabox-sub-title,.vk-metabox-sub-title{display:block;overflow:hidden;border-bottom:1px solid #e5e5e5;margin-top:1em;padding-bottom:.3em}#dashboard-widgets .vk-metabox-sub-title .dashicons,.vk-metabox-sub-title .dashicons{position:relative;top:-2px;margin-left:3px}.vk-metabox-more-link{float:right;font-size:12px}.vk-metabox-post-list{margin-bottom:2em}.vk-metabox-post-list li{border-bottom:1px dotted #ccc;padding-bottom:3px;display:-webkit-box;display:-ms-flexbox;display:flex}.vk-metabox-post-list li .date{font-size:11px;margin-right:1em;width:75px;white-space:nowrap}.vk-metabox-post-list li a{width:100%}.vk-admin-banner{display:block;overflow:hidden}.vk-admin-banner a.admin_banner{display:block;margin-bottom:1em;border:1px solid #ccc;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}.vk-admin-banner a.admin_banner img{max-width:100%;height:auto;display:block}.vk-admin-banner a.admin_banner img:hover{opacity:.7}.vk-admin-banner .vektor_logo{margin-top:1em}.vk-admin-banner .vektor_logo img{width:150px;float:right}#vk_dashboard_widget .vk-admin-banner-grid{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}#vk_dashboard_widget .vk-admin-banner-grid a.admin_banner{width:48%}.wp-core-ui .button-block{display:block;width:100%;text-align:center}.logo_exUnit{display:block;overflow:hidden;text-align:center;margin-bottom:10px;border-bottom:1px solid #ccc}.logo_exUnit img{width:150px;max-width:100%}.vk_option_nav{display:block!important;overflow:hidden}.vk_option_nav ul{display:block;overflow:hidden;margin:0;padding:0}.vk_option_nav ul li{display:block;border:1px solid #ccc;margin-bottom:0;border-bottom:none;background-color:#fff}.vk_option_nav ul li:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.vk_option_nav ul li:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom:1px solid #ccc}.vk_option_nav ul li:hover{background-color:#666}.vk_option_nav ul li a{display:block;overflow:hidden;padding:.5em;text-decoration:none;color:#666;font-size:12px}.vk_option_nav ul li:hover a{color:#fff;border:none}.vk_option_nav ul li.current{background-color:#333;color:#fff}.vk_option_nav ul li.current a{color:#fff}.vk_admin_page{padding-top:1em}.vk_admin_page h2.page_title{font-size:16px;text-align:center;line-height:140%;margin:10px 0 20px}.vk_admin_page h3{background-color:#333;color:#fff;padding:10px 15px;font-size:150%;margin-top:0;border-left:5px solid #e50000}.vk_admin_page input[type=text]{width:50%}.vk_admin_page select{width:50%}.vk_admin_page dl dt{font-weight:700;margin-bottom:5px}.vk_admin_page dl dd{margin-left:0}.vk_admin_page tr.dev_object{display:none}.vk_admin_page .pageLogo{text-align:center}.vk_admin_page .pageLogo img{max-width:150px;margin:0 auto}.vk_admin_page .adminMain{display:block;overflow:hidden;width:74%;float:left}.vk_admin_page .adminMain #adminContent_sub{display:block;overflow:hidden;width:23%;float:left;padding-bottom:10px}.vk_admin_page .adminMain #adminContent_main{display:block;overflow:hidden;width:74%;float:right;min-height:300px}.vk_admin_page .adminMain #adminContent_main .form_horizontal_item{margin-right:1em}.vk_admin_page .adminMain.column_2 #adminContent_main{width:100%}.vk_admin_page .adminSub{display:block;overflow:hidden;width:24%;float:right;padding-bottom:10px}.vk_admin_page .adminSub .infoBox{display:block;overflow:hidden;padding:1em;margin-bottom:1em;background-color:#fff}.vk_admin_page .adminSub .vk-metabox-sub-title{background-color:#ccc;width:auto;padding:5px 10px;border-radius:3px;margin-top:0;margin-bottom:15px}.vk_admin_page .adminSub .vk-metabox-more-link{display:none}.admin-custom-section,.admin_widget_section{display:block;overflow:hidden;margin:1.5em 0}.admin-custom-section p,.admin_widget_section p{margin-top:.5em}.admin-custom-h2,.admin_widget_h2{-webkit-box-sizing:border-box;box-sizing:border-box;margin:1em 0 1em;padding:.8em 1em;width:100%;border:solid 1px #ddd;border-radius:5px;background:#555;color:#fff;font-size:1.1em}.admin-custom-h3,.admin_widget_h3{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.4em 0;margin-bottom:.3em;width:100%;border-bottom:solid 1px #ddd;font-size:1em}input[type=checkbox].admin-custom-input,input[type=checkbox].admin_widget_input,input[type=color].admin-custom-input,input[type=color].admin_widget_input,input[type=date].admin-custom-input,input[type=date].admin_widget_input,input[type=datetime-local].admin-custom-input,input[type=datetime-local].admin_widget_input,input[type=datetime].admin-custom-input,input[type=datetime].admin_widget_input,input[type=email].admin-custom-input,input[type=email].admin_widget_input,input[type=month].admin-custom-input,input[type=month].admin_widget_input,input[type=number].admin-custom-input,input[type=number].admin_widget_input,input[type=password].admin-custom-input,input[type=password].admin_widget_input,input[type=radio].admin-custom-input,input[type=radio].admin_widget_input,input[type=search].admin-custom-input,input[type=search].admin_widget_input,input[type=tel].admin-custom-input,input[type=tel].admin_widget_input,input[type=text].admin-custom-input,input[type=text].admin_widget_input,input[type=time].admin-custom-input,input[type=time].admin_widget_input,input[type=url].admin-custom-input,input[type=url].admin_widget_input,input[type=week].admin-custom-input,input[type=week].admin_widget_input,select.admin-custom-input,select.admin_widget_input,textarea.admin-custom-input,textarea.admin_widget_input{width:100%;margin:.3em 0}.admin-custom-thumb-outer,.admin_widget_thumb_outer{position:relative;overflow:hidden;z-index:2;margin:3px 0;min-height:70px;border:1px solid #e5e5e5;background-color:#f5f5f5;width:100%}.admin-custom-thumb-outer:before,.admin_widget_thumb_outer:before{position:absolute;top:50%;left:50%;z-index:1;margin:-8px 0 0 -30px;color:#999;content:"No Image"}.admin-custom-thumb,.admin_widget_thumb{position:relative;z-index:3;display:block;width:100%;height:auto}@media (max-width:991px){.vk_admin_page .adminSub .adminMain table.form-table td,.vk_admin_page .adminSub .adminMain table.form-table th{display:block}.vk_admin_page .adminSub .adminMain table.form-table th{background-color:#ccc;width:auto;padding:10px;border-radius:3px}}
trunk/admin/vk-admin/package/images/ExUnit_bnr.png DELETED
Binary file
trunk/admin/vk-admin/package/images/admin_banner_recruit.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/billvektor_banner.png DELETED
Binary file
trunk/admin/vk-admin/package/images/fort-bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/jpnstyle-bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/lightning-pro-bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/lightning_bnr_en.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/lightning_bnr_ja.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/pale-bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/post_author_display_bnr_en.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/post_author_display_bnr_ja.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/variety-bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/vektor_logo.png DELETED
Binary file
trunk/admin/vk-admin/package/images/vk-link-target-controller_bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/images/vk-link-target-controller_notxt_bnr.jpg DELETED
Binary file
trunk/admin/vk-admin/package/js/vk_admin.js DELETED
@@ -1,159 +0,0 @@
1
- /*-------------------------------------------*/
2
- /* メディアアップローダー
3
- /*-------------------------------------------*/
4
- jQuery(document).ready(function($){
5
- var custom_uploader;
6
- // var media_id = new Array(2); //配列の宣言
7
- // media_id[0] = "head_logo";
8
- // media_id[1] = "foot_logo";
9
-
10
- //for (i = 0; i < media_id.length; i++) { //iという変数に0をいれループ一回ごとに加算する
11
-
12
- // var media_btn = '#media_' + media_id[i];
13
- // var media_target = '#' + media_id[i];
14
- jQuery('.media_btn').click(function(e) {
15
-
16
- // 画像URLで値を返す場合
17
- media_target_src = jQuery(this).attr('id').replace(/media_src_/g,'#');
18
- // id で値を返す場合
19
- media_target = jQuery(this).attr('id').replace(/media_/g,'#');
20
- thumb_src = jQuery(this).attr('id').replace(/media_/g,'#thumb_');
21
-
22
- e.preventDefault();
23
- if (custom_uploader) {
24
- custom_uploader.open();
25
- return;
26
- }
27
- custom_uploader = wp.media({
28
- // title: 'Choose Image',
29
- // 以下のコメントアウトを解除すると画像のみに限定される。 → されないみたい
30
- library: {
31
- type: 'image'
32
- },
33
- // button: {
34
- // text: 'Choose Image'
35
- // },
36
- multiple: false, // falseにすると画像を1つしか選択できなくなる
37
- });
38
- custom_uploader.on('select', function() {
39
- var images = custom_uploader.state().get('selection');
40
- images.each(function(file){
41
- // urlを返す場合
42
- jQuery(media_target_src).attr('value', file.toJSON().url );
43
- // idを返す場合
44
- jQuery(media_target).attr('value', file.toJSON().id );
45
- jQuery(thumb_src).attr('src', file.toJSON().url );
46
- });
47
- });
48
- custom_uploader.open();
49
- });
50
- //}
51
-
52
- });
53
-
54
- /*-------------------------------------------*/
55
- /* ページ内の表示/非表示切り替えセクションの追加
56
- /*-------------------------------------------*/
57
- jQuery(document).ready(function($){
58
- jQuery('.showHideSection .showHideBtn').on("click", function() {
59
- jQuery(this).next().slideToggle();
60
- });
61
- });
62
-
63
- /*-------------------------------------------*/
64
- /* スクロール時の位置固定
65
- /*-------------------------------------------*/
66
- jQuery(document).ready(function(){
67
-
68
- // サイドバー要素のデフォルトの絶対位置
69
- var default_offset = jQuery('.scrTracking').offset();
70
-
71
- // コンテンツエリアの高さを取得
72
- var contentHeight = jQuery('.adminMain').height();
73
-
74
- navMove( default_offset, contentHeight );
75
-
76
- // スクロールしたら
77
- jQuery(window).scroll(function () {
78
- navMove( default_offset, contentHeight );
79
- });
80
- jQuery(window).resize(function(){
81
- navMove( default_offset, contentHeight );
82
- });
83
- });
84
-
85
- function navMove( default_offset, contentHeight ){
86
-
87
- // ウィンドウの高さを取得
88
- var windowHeight = jQuery(window).height();
89
-
90
- // スクロール量
91
- var scrollHeight = jQuery(this).scrollTop();
92
-
93
- var marginBottom = 15;
94
-
95
- jQuery('.scrTracking').each(function(i){
96
-
97
- // サイドバー要素の高さ
98
- var itemHeight = jQuery(this).height();
99
-
100
- // ウィンドウサイズからはみ出すサイズ
101
- if ( itemHeight < windowHeight ){
102
- var overHeight = 0;
103
- } else {
104
- var overHeight = itemHeight - windowHeight;
105
- }
106
-
107
- if ( scrollHeight < contentHeight ){ // これがないと延々とスクロールする
108
-
109
- if ( windowHeight < itemHeight ) {
110
- // アイテムがウィンドウサイズより高い場合
111
-
112
- if ( scrollHeight > overHeight ) {
113
- // はみ出してる高さよりスクロールが大きい場合
114
- // スクロール量からはみ出してる高さを引いた余白を追加
115
- var marginTop = scrollHeight - overHeight - default_offset['top'] - marginBottom;
116
- jQuery(this).css({"margin-top":marginTop});
117
- } else {
118
- // はみ出してる高さよりスクロールが小さい場合
119
- jQuery(this).css({"margin-top":0});
120
- }
121
-
122
- } else {
123
- // アイテムがウィンドウサイズより低い場合
124
- jQuery(this).css({ "margin-top" : scrollHeight });
125
- }
126
- }
127
-
128
- });
129
- }
130
-
131