Version Description
[ Add function ][ Noindex ] Cope with print to archive page [ Add function ][ Before loop widget area ] Add widget area to before loop on archive page
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 9.49.0.0 |
Comparing to | |
See all releases |
Code changes from version 9.48.3.0 to 9.49.0.0
- admin/vk-admin/package/_scss/vk_admin.scss +31 -0
- admin/vk-admin/package/css/vk_admin.css +1 -1
- inc/add_archive_loop_before_widget_area.php +103 -0
- inc/contact-section/contact-section.php +2 -2
- inc/noindex/noindex.php +266 -1
- inc/other-widget/widget-archives.php +8 -7
- inc/pagetop-btn/pagetop-btn.php +6 -4
- inc/sns/sns_admin.php +6 -3
- inc/template-tags/package/template-tags.php +1 -1
- readme.txt +7 -3
- veu-packages.php +37 -12
- vkExUnit.php +1 -1
admin/vk-admin/package/_scss/vk_admin.scss
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
@charset "utf-8";
|
2 |
// @import "compass";
|
|
|
|
|
|
|
|
|
3 |
body{margin:0;}
|
4 |
.text-left {
|
5 |
text-align: left;
|
@@ -156,6 +160,11 @@ body{margin:0;}
|
|
156 |
|
157 |
.vk_admin_page {
|
158 |
padding-top: 1em;
|
|
|
|
|
|
|
|
|
|
|
159 |
h2.page_title {
|
160 |
font-size: 16px;
|
161 |
text-align: center;
|
@@ -175,6 +184,15 @@ body{margin:0;}
|
|
175 |
font-size:16px;
|
176 |
margin-bottom:1em;
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
input[type="text"] {
|
179 |
width: 50%;
|
180 |
}
|
@@ -182,6 +200,7 @@ body{margin:0;}
|
|
182 |
width: 50%;
|
183 |
}
|
184 |
dl {
|
|
|
185 |
dt {
|
186 |
font-weight: bold;
|
187 |
margin-bottom: 5px;
|
@@ -247,9 +266,21 @@ body{margin:0;}
|
|
247 |
li ol {
|
248 |
margin-top:0.5em;
|
249 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
&_content {
|
251 |
margin-bottom:3em;
|
252 |
}
|
|
|
|
|
|
|
253 |
}
|
254 |
}
|
255 |
|
1 |
@charset "utf-8";
|
2 |
// @import "compass";
|
3 |
+
|
4 |
+
$text-size : 14px;
|
5 |
+
$line-height : 1.7;
|
6 |
+
|
7 |
body{margin:0;}
|
8 |
.text-left {
|
9 |
text-align: left;
|
160 |
|
161 |
.vk_admin_page {
|
162 |
padding-top: 1em;
|
163 |
+
|
164 |
+
p,li,td {
|
165 |
+
line-height: $line-height;
|
166 |
+
font-size: $text-size;
|
167 |
+
}
|
168 |
h2.page_title {
|
169 |
font-size: 16px;
|
170 |
text-align: center;
|
184 |
font-size:16px;
|
185 |
margin-bottom:1em;
|
186 |
}
|
187 |
+
.form-table td p,
|
188 |
+
p {
|
189 |
+
margin-bottom:1em;
|
190 |
+
font-size: $text-size;
|
191 |
+
line-height: $line-height;
|
192 |
+
&:last-child {
|
193 |
+
margin-bottom:0;
|
194 |
+
}
|
195 |
+
}
|
196 |
input[type="text"] {
|
197 |
width: 50%;
|
198 |
}
|
200 |
width: 50%;
|
201 |
}
|
202 |
dl {
|
203 |
+
line-height: 1.5;
|
204 |
dt {
|
205 |
font-weight: bold;
|
206 |
margin-bottom: 5px;
|
266 |
li ol {
|
267 |
margin-top:0.5em;
|
268 |
}
|
269 |
+
ul.no-style {
|
270 |
+
margin-left:0;
|
271 |
+
ul {
|
272 |
+
margin-left:1.5em;
|
273 |
+
}
|
274 |
+
li {
|
275 |
+
list-style: none;
|
276 |
+
}
|
277 |
+
}
|
278 |
&_content {
|
279 |
margin-bottom:3em;
|
280 |
}
|
281 |
+
input[type=text] {
|
282 |
+
margin-bottom:5px;
|
283 |
+
}
|
284 |
}
|
285 |
}
|
286 |
|
admin/vk-admin/package/css/vk_admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{margin:0}.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: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;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:flex;flex-wrap:wrap;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;border-radius:4px}.vk_admin_page h5{font-size:16px;margin-bottom:1em}.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 .adminMain_main ol,.vk_admin_page .adminMain_main ul{margin-top:0;margin-left:1.5em;padding-top:0}.vk_admin_page .adminMain_main ol>li{list-style:decimal}.vk_admin_page .adminMain_main ul>li{list-style:disc}.vk_admin_page .adminMain_main li ol,.vk_admin_page .adminMain_main li ul{margin-top:.5em}.vk_admin_page .adminMain_main_content{margin-bottom:3em}.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;border-radius:4px}.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}.vk_admin_page .alert{border-radius:4px;padding:.8em;font-weight:400}.vk_admin_page .alert-danger{border:1px solid #ebccd1;background-color:#f2dede;color:#a94442}.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{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{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}.vk_checklist_item-style-vertical{display:flex}.vk_checklist_item .vk_checklist_item_input{margin-top:0}@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}}
|
1 |
+
body{margin:0}.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: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;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:flex;flex-wrap:wrap;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 li,.vk_admin_page p,.vk_admin_page td{line-height:1.7;font-size:14px}.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;border-radius:4px}.vk_admin_page h5{font-size:16px;margin-bottom:1em}.vk_admin_page .form-table td p,.vk_admin_page p{margin-bottom:1em;font-size:14px;line-height:1.7}.vk_admin_page .form-table td p:last-child,.vk_admin_page p:last-child{margin-bottom:0}.vk_admin_page input[type=text]{width:50%}.vk_admin_page select{width:50%}.vk_admin_page dl{line-height:1.5}.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 .adminMain_main ol,.vk_admin_page .adminMain_main ul{margin-top:0;margin-left:1.5em;padding-top:0}.vk_admin_page .adminMain_main ol>li{list-style:decimal}.vk_admin_page .adminMain_main ul>li{list-style:disc}.vk_admin_page .adminMain_main li ol,.vk_admin_page .adminMain_main li ul{margin-top:.5em}.vk_admin_page .adminMain_main ul.no-style{margin-left:0}.vk_admin_page .adminMain_main ul.no-style ul{margin-left:1.5em}.vk_admin_page .adminMain_main ul.no-style li{list-style:none}.vk_admin_page .adminMain_main_content{margin-bottom:3em}.vk_admin_page .adminMain_main input[type=text]{margin-bottom:5px}.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;border-radius:4px}.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}.vk_admin_page .alert{border-radius:4px;padding:.8em;font-weight:400}.vk_admin_page .alert-danger{border:1px solid #ebccd1;background-color:#f2dede;color:#a94442}.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{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{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}.vk_checklist_item-style-vertical{display:flex}.vk_checklist_item .vk_checklist_item_input{margin-top:0}@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}}
|
inc/add_archive_loop_before_widget_area.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function veu_set_archive_loop_before_widget_area(){
|
3 |
+
|
4 |
+
// 公開されている投稿タイプを呼び出し
|
5 |
+
$postTypes = get_post_types( array( 'public' => true ) );
|
6 |
+
// 固定ページはアーカイブないので削除
|
7 |
+
unset( $postTypes['page'] );
|
8 |
+
|
9 |
+
foreach ( $postTypes as $postType ) {
|
10 |
+
|
11 |
+
// Get post type name
|
12 |
+
/*-------------------------------------------*/
|
13 |
+
$post_type_object = get_post_type_object( $postType );
|
14 |
+
if ( $post_type_object ) {
|
15 |
+
|
16 |
+
// Set post type name
|
17 |
+
$postType_name = esc_html( $post_type_object->labels->name );
|
18 |
+
|
19 |
+
// Set post type widget area
|
20 |
+
register_sidebar(
|
21 |
+
array(
|
22 |
+
'name' => sprintf( __( 'Post type archive before loop (%s)', 'lightning-pro' ), $postType_name ),
|
23 |
+
'id' => $postType . '-archive-loop-before',
|
24 |
+
'description' => '',
|
25 |
+
'before_widget' => '<aside class="widget %2$s" id="%1$s">',
|
26 |
+
'after_widget' => '</aside>',
|
27 |
+
'before_title' => '<h2 class="widget-title">',
|
28 |
+
'after_title' => '</h2>',
|
29 |
+
)
|
30 |
+
);
|
31 |
+
} // if( $post_type_object ){
|
32 |
+
|
33 |
+
} // foreach ($postTypes as $postType) {
|
34 |
+
|
35 |
+
}
|
36 |
+
add_action( 'widgets_init', 'veu_set_archive_loop_before_widget_area' );
|
37 |
+
|
38 |
+
function veu_display_archive_loop_before_widget_area( $query ){
|
39 |
+
|
40 |
+
$loop_action_point = veu_get_loop_before_widget_action_point();
|
41 |
+
if ( veu_get_loop_before_widget_action_point() === 'loop_start' ) {
|
42 |
+
// $loop_action_point を loop_start にする場合メインクエリ以外の場所に出ないように終了
|
43 |
+
if ( ! $query->is_main_query() ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
if ( ! is_post_type_archive() && ! is_home() && ! is_front_page() ){
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
if ( is_home() ){
|
54 |
+
$post_type = 'post';
|
55 |
+
}
|
56 |
+
|
57 |
+
global $wp_query;
|
58 |
+
|
59 |
+
if ( ! empty( $wp_query->query_vars['post_type'] ) ){
|
60 |
+
$post_type = $wp_query->query_vars['post_type'];
|
61 |
+
}
|
62 |
+
|
63 |
+
if ( empty ( $post_type ) ) {
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( ! empty( $wp_query->posts ) ){
|
68 |
+
// 2ページ目以外は非表示
|
69 |
+
if ( get_query_var( 'paged', 0 ) !== 0 ){
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
// ※ get_post_type() は該当記事がない場合に投稿タイプが取得できないため
|
75 |
+
$widget_area = $post_type . '-archive-loop-before';
|
76 |
+
if ( is_active_sidebar( $widget_area ) ) {
|
77 |
+
dynamic_sidebar( $widget_area );
|
78 |
+
}
|
79 |
+
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* ウィジェットエリアを追加するアクションフックポイント
|
84 |
+
*/
|
85 |
+
function veu_get_loop_before_widget_action_point(){
|
86 |
+
$template = wp_get_theme()->Template;
|
87 |
+
$loop_action_point = 'loop_start';
|
88 |
+
if ( $template == 'katawara' ) {
|
89 |
+
// Katawaraの場合
|
90 |
+
$loop_action_point = 'katawara_loop_before';
|
91 |
+
} elseif ( $template == 'lightning' || $template == 'lightning-pro' ) {
|
92 |
+
// Lightningの場合
|
93 |
+
$loop_action_point = 'lightning_loop_before';
|
94 |
+
}
|
95 |
+
return $loop_action_point;
|
96 |
+
}
|
97 |
+
|
98 |
+
function veu_loop_before_widget_run(){
|
99 |
+
$loop_action_point = veu_get_loop_before_widget_action_point();
|
100 |
+
add_action( $loop_action_point, 'veu_display_archive_loop_before_widget_area' );
|
101 |
+
}
|
102 |
+
add_action( 'after_setup_theme', 'veu_loop_before_widget_run' );
|
103 |
+
|
inc/contact-section/contact-section.php
CHANGED
@@ -211,9 +211,9 @@ class VkExUnit_Contact {
|
|
211 |
?>
|
212 |
<h3><?php _e( 'Contact Information', 'vk-all-in-one-expansion-unit' ); ?></h3>
|
213 |
<div id="meta_description" class="sectionBox">
|
214 |
-
|
215 |
<br/>
|
216 |
-
<?php _e( 'When I display it on the page, it is necessary to classify a check into "Display Contact Section" checkbox with the edit page of each page.', 'vk-all-in-one-expansion-unit' );
|
217 |
|
218 |
<table class="form-table">
|
219 |
<tr>
|
211 |
?>
|
212 |
<h3><?php _e( 'Contact Information', 'vk-all-in-one-expansion-unit' ); ?></h3>
|
213 |
<div id="meta_description" class="sectionBox">
|
214 |
+
<p><?php _e( 'The contents entered here will be reflected in the bottom of each fixed page, the "Contact Section" widget, the "Contact Button" widget, etc.', 'vk-all-in-one-expansion-unit' ); ?>
|
215 |
<br/>
|
216 |
+
<?php _e( 'When I display it on the page, it is necessary to classify a check into "Display Contact Section" checkbox with the edit page of each page.', 'vk-all-in-one-expansion-unit' ); ?></p>
|
217 |
|
218 |
<table class="form-table">
|
219 |
<tr>
|
inc/noindex/noindex.php
CHANGED
@@ -16,6 +16,7 @@ admin_menu のタイミングで読み込んでいる
|
|
16 |
add_action(
|
17 |
'admin_menu', function() {
|
18 |
require_once( dirname( __FILE__ ) . '/class-veu-metabox-noindex.php' );
|
|
|
19 |
}
|
20 |
);
|
21 |
|
@@ -24,11 +25,275 @@ add_action(
|
|
24 |
/*-------------------------------------------*/
|
25 |
add_action( 'wp_head', 'veu_noindex_print_head' );
|
26 |
function veu_noindex_print_head() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
global $post;
|
|
|
28 |
if ( is_singular() ) {
|
29 |
$vk_print_noindex = get_post_meta( $post->ID, '_vk_print_noindex', true );
|
30 |
if ( $vk_print_noindex ) {
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
}
|
|
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
add_action(
|
17 |
'admin_menu', function() {
|
18 |
require_once( dirname( __FILE__ ) . '/class-veu-metabox-noindex.php' );
|
19 |
+
|
20 |
}
|
21 |
);
|
22 |
|
25 |
/*-------------------------------------------*/
|
26 |
add_action( 'wp_head', 'veu_noindex_print_head' );
|
27 |
function veu_noindex_print_head() {
|
28 |
+
|
29 |
+
$noindex = veu_is_noindex_print_head();
|
30 |
+
|
31 |
+
apply_filters( 'veu_noindex_print_head', $noindex );
|
32 |
+
|
33 |
+
if ( $noindex ){
|
34 |
+
echo '<meta name="robots" content="noindex,follow" />';
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* noindex を出力するかどうか
|
40 |
+
*/
|
41 |
+
function veu_is_noindex_print_head() {
|
42 |
global $post;
|
43 |
+
$noindex = false;
|
44 |
if ( is_singular() ) {
|
45 |
$vk_print_noindex = get_post_meta( $post->ID, '_vk_print_noindex', true );
|
46 |
if ( $vk_print_noindex ) {
|
47 |
+
$noindex = true;
|
48 |
+
}
|
49 |
+
} else {
|
50 |
+
$options = veu_noindex_options();
|
51 |
+
$veu_noindex_targets = veu_noindex_targets();
|
52 |
+
|
53 |
+
$post_type_info = vk_get_post_type();
|
54 |
+
|
55 |
+
foreach ( $veu_noindex_targets as $key => $value ) {
|
56 |
+
|
57 |
+
// $keyを条件分岐の関数名にセット
|
58 |
+
$function = $key;
|
59 |
+
// 条件分岐の引値をnullに
|
60 |
+
$args = null;
|
61 |
+
|
62 |
+
// 配列のキー名と条件分岐タグが違う場合
|
63 |
+
if ( ! empty( $value['function'] ) ) {
|
64 |
+
$function = $value['function'];
|
65 |
+
}
|
66 |
+
if ( ! empty( $value['args'] ) ) {
|
67 |
+
$args = $value['args'];
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( function_exists( $function ) ){
|
71 |
+
if ( call_user_func( $function, $args ) ){
|
72 |
+
// 保存値でtrueになっている場合のみ出力可否を上書き
|
73 |
+
if ( ! empty( $options[$key] ) ) {
|
74 |
+
$noindex = true;
|
75 |
+
} else {
|
76 |
+
$noindex = false;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
// print '<pre style="text-align:left">';print_r( $noindex );print '</pre>';
|
83 |
+
return $noindex;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* ExUnitの機能管理パッケージに登録
|
89 |
+
* @return [type] [description]
|
90 |
+
*/
|
91 |
+
function veu_noindex_admin_register() {
|
92 |
+
$tab_label = __( 'Noindex ', 'vk-all-in-one-expansion-unit' );
|
93 |
+
$option_name = 'vkExUnit_noindex';
|
94 |
+
$sanitize_callback = 'veu_noindex_sanitize';
|
95 |
+
$render_page = 'veu_noindex_admin';
|
96 |
+
vkExUnit_register_setting( $tab_label, $option_name, $sanitize_callback, $render_page );
|
97 |
+
}
|
98 |
+
add_action( 'veu_package_init', 'veu_noindex_admin_register' );
|
99 |
+
|
100 |
+
/**
|
101 |
+
* ExUnit メイン設定画面
|
102 |
+
*/
|
103 |
+
function veu_noindex_admin() {
|
104 |
+
?>
|
105 |
+
<div class="sectionBox">
|
106 |
+
<h3><?php _e( 'Noindex', 'vk-all-in-one-expansion-unit' ); ?></h3>
|
107 |
+
<table class="form-table">
|
108 |
+
<tr>
|
109 |
+
<th><?php _e( 'Add noindex page', 'vk-all-in-one-expansion-unit' ); ?> </th>
|
110 |
+
<td>
|
111 |
+
<ul>
|
112 |
+
<?php
|
113 |
+
|
114 |
+
$options = veu_noindex_options();
|
115 |
+
$veu_noindex_targets = veu_noindex_targets();
|
116 |
+
|
117 |
+
// 新しく作る階層を持った配列
|
118 |
+
$new_array = array();
|
119 |
+
// 元の配列
|
120 |
+
$raw_array = $veu_noindex_targets;
|
121 |
+
|
122 |
+
// 先祖階層は parent が 空になって下層とは処理が違うのでまずは先祖階層だけの新しい配列を作成
|
123 |
+
// 元配列をループ {
|
124 |
+
foreach ( $raw_array as $key => $value ) {
|
125 |
+
// 親指定がない場合 {
|
126 |
+
if ( empty( $value['parent'] ) ){
|
127 |
+
// 新しい配列に格納
|
128 |
+
$new_array[$key] = array();
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
$new_array = veu_create_nest_array( $new_array, $raw_array );
|
133 |
+
|
134 |
+
veu_display_nest_checkbox( $new_array, $raw_array, $options );
|
135 |
+
?>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
</table>
|
139 |
+
<?php submit_button(); ?>
|
140 |
+
</div>
|
141 |
+
<?php
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* デフォルト値
|
146 |
+
*/
|
147 |
+
function veu_noindex_default() {
|
148 |
+
$default_options = array(
|
149 |
+
'is_archive' => false,
|
150 |
+
// 'is_date' => false,
|
151 |
+
// 'is_author' => false,
|
152 |
+
// 'is_post_type_archive' => false,
|
153 |
+
// 'is_category_and_tax' => false,
|
154 |
+
);
|
155 |
+
return apply_filters( 'veu_noindex_default', $default_options );
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* オプション保存値取得
|
160 |
+
*/
|
161 |
+
function veu_noindex_options() {
|
162 |
+
$options = get_option( 'vkExUnit_noindex', array() );
|
163 |
+
$options = wp_parse_args( $options, veu_noindex_default() );
|
164 |
+
return $options;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* 保存時サニタイズ
|
169 |
+
*/
|
170 |
+
function veu_noindex_sanitize( $input ) {
|
171 |
+
$output = $input;
|
172 |
+
$output = array();
|
173 |
+
$veu_noindex_targets = veu_noindex_targets();
|
174 |
+
foreach ( $veu_noindex_targets as $key => $value ) {
|
175 |
+
if ( isset( $input[$key] ) ){
|
176 |
+
$output[$key] = esc_attr( $input[$key] );
|
177 |
}
|
178 |
}
|
179 |
+
return $output;
|
180 |
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* noindex対象の配列
|
184 |
+
*/
|
185 |
+
function veu_noindex_targets(){
|
186 |
+
|
187 |
+
/*
|
188 |
+
この配列は後に書いてある情報で優先上書きされるので順番には注意する事
|
189 |
+
*/
|
190 |
+
|
191 |
+
$array = array(
|
192 |
+
'is_archive' => array(
|
193 |
+
'label' => __( 'Archive', 'vk-all-in-one-expansion-unit' ),
|
194 |
+
'parent' => '',
|
195 |
+
'para' => null,
|
196 |
+
),
|
197 |
+
'is_date' => array(
|
198 |
+
'label' => __( 'Date ( Yearly / Monthly / Daily /time ) archive', 'vk-all-in-one-expansion-unit' ),
|
199 |
+
'parent' => 'is_archive',
|
200 |
+
),
|
201 |
+
// 'is_year' => array(
|
202 |
+
// 'label' => __( 'Yearly archive', 'vk-all-in-one-expansion-unit' ),
|
203 |
+
// 'parent' => 'is_date',
|
204 |
+
// ),
|
205 |
+
'is_author' => array(
|
206 |
+
'label' => __( 'Author archive', 'vk-all-in-one-expansion-unit' ),
|
207 |
+
'parent' => 'is_archive',
|
208 |
+
),
|
209 |
+
'is_post_type_archive' => array(
|
210 |
+
'label' => __( 'Post type archive', 'vk-all-in-one-expansion-unit' ),
|
211 |
+
'parent' => 'is_archive',
|
212 |
+
),
|
213 |
+
// 'is_post_type_archive_post' => array(
|
214 |
+
// 'label' => __( 'Post type archive', 'vk-all-in-one-expansion-unit' ) .' [ '. $post_types['post']->label . ' ]',
|
215 |
+
// 'parent' => 'is_post_type_archive',
|
216 |
+
// 'function' => 'is_home',
|
217 |
+
// ),
|
218 |
+
'is_category' => array(
|
219 |
+
'label' => __( 'Category archive', 'vk-all-in-one-expansion-unit' ),
|
220 |
+
'parent' => 'is_archive',
|
221 |
+
),
|
222 |
+
'is_tag' => array(
|
223 |
+
'label' => __( 'Tag archive', 'vk-all-in-one-expansion-unit' ),
|
224 |
+
'parent' => 'is_archive',
|
225 |
+
),
|
226 |
+
'is_tax' => array(
|
227 |
+
'label' => __( 'Custom taxonomy archive', 'vk-all-in-one-expansion-unit' ),
|
228 |
+
'parent' => 'is_archive',
|
229 |
+
),
|
230 |
+
);
|
231 |
+
|
232 |
+
$args = array(
|
233 |
+
'post_types_args' => array(
|
234 |
+
'public' => true,
|
235 |
+
),
|
236 |
+
'name' => '',
|
237 |
+
'checked' => array( 'post' => true ),
|
238 |
+
'id' => '',
|
239 |
+
);
|
240 |
+
$post_types = get_post_types( $args['post_types_args'], 'object' );
|
241 |
+
|
242 |
+
unset( $post_types['post'] );
|
243 |
+
unset( $post_types['page'] );
|
244 |
+
|
245 |
+
foreach ( $post_types as $key => $value ) {
|
246 |
+
$array['is_post_type_archive_'.$key] = array(
|
247 |
+
'label' => __( 'Post type archive', 'vk-all-in-one-expansion-unit' ) .' [ '. $value->label . ' ]',
|
248 |
+
'parent' => 'is_post_type_archive',
|
249 |
+
'function' => 'is_post_type_archive',
|
250 |
+
'args' => $key,
|
251 |
+
);
|
252 |
+
}
|
253 |
+
return $array;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* 配列の下階層を辿って新しい多次元配列を整形する関数
|
258 |
+
*/
|
259 |
+
function veu_create_nest_array( $array = array(), $raw_array ){
|
260 |
+
if ( is_array( $array ) && count( $array ) ){
|
261 |
+
foreach ( $array as $key => $child ) {
|
262 |
+
// 元の配列をループ {
|
263 |
+
foreach ( $raw_array as $raw_key => $value) {
|
264 |
+
// ループ中の $key を 親に項目に指定している項目(子)がある場合 {
|
265 |
+
if ( ! empty( $value['parent'] ) && $value['parent'] === $key ){
|
266 |
+
// 子項目をを新しい配列に格納
|
267 |
+
$array[$key][$raw_key] = array();
|
268 |
+
|
269 |
+
// 同様に下階層を処理 /////////////////////////
|
270 |
+
$array[$key] = veu_create_nest_array( $array[$key], $raw_array );
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
return $array;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* 多次元配列を階層を維持しながらチェックボックスを出力
|
280 |
+
*/
|
281 |
+
function veu_display_nest_checkbox( $array = array(), $raw_array, $options ){
|
282 |
+
// echo checked( $options, true );
|
283 |
+
if ( is_array( $array ) && count( $array ) ){
|
284 |
+
echo '<ul class="no-style">';
|
285 |
+
foreach ( $array as $key => $child ) {
|
286 |
+
echo '<li><label><input type="checkbox" name="vkExUnit_noindex[' . esc_attr( $key ) . ']" value="true" ';
|
287 |
+
echo checked( $options[$key], "true" );
|
288 |
+
echo ' /> ';
|
289 |
+
// print '<pre style="text-align:left">';print_r($options[$key]);print '</pre>';
|
290 |
+
echo esc_html( $raw_array[$key]['label'] );
|
291 |
+
echo '</label>';
|
292 |
+
|
293 |
+
veu_display_nest_checkbox( $child, $raw_array, $options );
|
294 |
+
|
295 |
+
echo '</li>';
|
296 |
+
}
|
297 |
+
echo '</ul>';
|
298 |
+
}
|
299 |
+
}
|
inc/other-widget/widget-archives.php
CHANGED
@@ -145,15 +145,15 @@ class WP_Widget_VK_archive_list extends WP_Widget {
|
|
145 |
<div>
|
146 |
|
147 |
<!-- タイトル -->
|
148 |
-
<div>
|
149 |
<label for="<?php echo $this->get_field_id( 'label' ); ?>"><?php _e( 'Title', 'vk-all-in-one-expansion-unit' ); ?>:</label>
|
150 |
-
<input type="text" id="<?php echo $this->get_field_id( 'label' ); ?>-title" name="<?php echo $this->get_field_name( 'label' ); ?>" value="<?php echo esc_attr( $instance['label'] ); ?>"
|
151 |
</div>
|
152 |
|
153 |
<!-- 投稿タイプ -->
|
154 |
<div>
|
155 |
<label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><?php _e( 'Post type', 'vk-all-in-one-expansion-unit' ); ?>:</label>
|
156 |
-
<select name="<?php echo $this->get_field_name( 'post_type' ); ?>" >
|
157 |
<?php foreach ( $select_post_types as $select_post_type ) : ?>
|
158 |
<option value="<?php echo $select_post_type['value']; ?>" <?php selected( $select_post_type['value'], $instance['post_type'] , true ); ?>>
|
159 |
<?php echo $select_post_type['label']; ?>
|
@@ -167,22 +167,23 @@ class WP_Widget_VK_archive_list extends WP_Widget {
|
|
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( '
|
184 |
</select>
|
185 |
</div>
|
|
|
186 |
</div>
|
187 |
<?php
|
188 |
}
|
145 |
<div>
|
146 |
|
147 |
<!-- タイトル -->
|
148 |
+
<div style="margin-top:15px;">
|
149 |
<label for="<?php echo $this->get_field_id( 'label' ); ?>"><?php _e( 'Title', 'vk-all-in-one-expansion-unit' ); ?>:</label>
|
150 |
+
<input type="text" id="<?php echo $this->get_field_id( 'label' ); ?>-title" name="<?php echo $this->get_field_name( 'label' ); ?>" value="<?php echo esc_attr( $instance['label'] ); ?>" class="admin-custom-input">
|
151 |
</div>
|
152 |
|
153 |
<!-- 投稿タイプ -->
|
154 |
<div>
|
155 |
<label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><?php _e( 'Post type', 'vk-all-in-one-expansion-unit' ); ?>:</label>
|
156 |
+
<select name="<?php echo $this->get_field_name( 'post_type' ); ?>" class="admin-custom-input">
|
157 |
<?php foreach ( $select_post_types as $select_post_type ) : ?>
|
158 |
<option value="<?php echo $select_post_type['value']; ?>" <?php selected( $select_post_type['value'], $instance['post_type'] , true ); ?>>
|
159 |
<?php echo $select_post_type['label']; ?>
|
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' ); ?>" class="admin-custom-input">
|
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 style="margin-bottom:2em;">
|
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' ); ?>" class="admin-custom-input">
|
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( 'Drop down', 'vk-all-in-one-expansion-unit' ); ?></option>
|
184 |
</select>
|
185 |
</div>
|
186 |
+
|
187 |
</div>
|
188 |
<?php
|
189 |
}
|
inc/pagetop-btn/pagetop-btn.php
CHANGED
@@ -79,8 +79,8 @@ function veu_pagetop_admin() {
|
|
79 |
<!-- Google Analytics -->
|
80 |
<tr>
|
81 |
<th><?php _e( 'Page Top Button', 'vk-all-in-one-expansion-unit' ); ?> </th>
|
82 |
-
<td>
|
83 |
-
<input type="checkbox" name="vkExUnit_pagetop[hide_mobile]" value="true"<?php if( ! empty( $options['hide_mobile'] ) ) echo ' checked'; ?> /> <?php _e( 'Do not display on touch screen devices', 'vk-all-in-one-expansion-unit' ); ?>
|
84 |
</td>
|
85 |
</tr>
|
86 |
</table>
|
@@ -100,11 +100,13 @@ function veu_pagetop_default() {
|
|
100 |
$default_options = array(
|
101 |
'hide_mobile' => false,
|
102 |
);
|
103 |
-
return apply_filters( '
|
104 |
}
|
105 |
|
106 |
function veu_pagetop_sanitize( $input ) {
|
107 |
$output = array();
|
108 |
-
|
|
|
|
|
109 |
return $output;
|
110 |
}
|
79 |
<!-- Google Analytics -->
|
80 |
<tr>
|
81 |
<th><?php _e( 'Page Top Button', 'vk-all-in-one-expansion-unit' ); ?> </th>
|
82 |
+
<td><label>
|
83 |
+
<input type="checkbox" name="vkExUnit_pagetop[hide_mobile]" value="true"<?php if( ! empty( $options['hide_mobile'] ) ) echo ' checked'; ?> /> <?php _e( 'Do not display on touch screen devices', 'vk-all-in-one-expansion-unit' ); ?> </label>
|
84 |
</td>
|
85 |
</tr>
|
86 |
</table>
|
100 |
$default_options = array(
|
101 |
'hide_mobile' => false,
|
102 |
);
|
103 |
+
return apply_filters( 'veu_pagetop_default', $default_options );
|
104 |
}
|
105 |
|
106 |
function veu_pagetop_sanitize( $input ) {
|
107 |
$output = array();
|
108 |
+
if ( isset($input['hide_mobile']) ){
|
109 |
+
$output['hide_mobile'] = esc_attr( $input['hide_mobile'] );
|
110 |
+
}
|
111 |
return $output;
|
112 |
}
|
inc/sns/sns_admin.php
CHANGED
@@ -39,8 +39,11 @@
|
|
39 |
<!-- OGP -->
|
40 |
<tr>
|
41 |
<th><?php _e( 'OG default image', 'vk-all-in-one-expansion-unit' ); ?></th>
|
42 |
-
<td
|
|
|
|
|
43 |
<?php _e( 'If a featured image is specified for the page, it takes precedence.', 'vk-all-in-one-expansion-unit' ); ?><br />
|
|
|
44 |
<input type="text" name="vkExUnit_sns_options[ogImage]" id="ogImage" value="<?php echo esc_attr( $options['ogImage'] ); ?>" />
|
45 |
<button id="media_src_ogImage" class="media_btn button"><?php _e( 'Select an image', 'vk-all-in-one-expansion-unit' ); ?></button><br />
|
46 |
<span><?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' ); ?>https://www.vektor-inc.co.jp/images/ogImage.png</span><br />
|
@@ -110,7 +113,7 @@ _e( 'example', 'vk-all-in-one-expansion-unit' );
|
|
110 |
<tr>
|
111 |
<th><label><?php _e( 'Share button for display', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
112 |
<td><label></label>
|
113 |
-
<ul>
|
114 |
<li><label><input type="checkbox" name="vkExUnit_sns_options[useFacebook]" value="true"
|
115 |
<?php
|
116 |
if ( $options['useFacebook'] ) {
|
@@ -148,7 +151,7 @@ if ( $options['useLine'] ) {
|
|
148 |
<tr>
|
149 |
<th><label><?php _e( 'Share button display Position', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
150 |
<td><label></label>
|
151 |
-
<ul>
|
152 |
<li><label><input type="checkbox" name="vkExUnit_sns_options[snsBtn_position][before]" value="true"
|
153 |
<?php
|
154 |
if ( ! empty( $options['snsBtn_position']['before'] ) ) {
|
39 |
<!-- OGP -->
|
40 |
<tr>
|
41 |
<th><?php _e( 'OG default image', 'vk-all-in-one-expansion-unit' ); ?></th>
|
42 |
+
<td>
|
43 |
+
<p>
|
44 |
+
<?php _e( 'If, for example someone pressed the Facebook [Like] button, this is the image that appears on the Facebook timeline.', 'vk-all-in-one-expansion-unit' ); ?><br />
|
45 |
<?php _e( 'If a featured image is specified for the page, it takes precedence.', 'vk-all-in-one-expansion-unit' ); ?><br />
|
46 |
+
</p>
|
47 |
<input type="text" name="vkExUnit_sns_options[ogImage]" id="ogImage" value="<?php echo esc_attr( $options['ogImage'] ); ?>" />
|
48 |
<button id="media_src_ogImage" class="media_btn button"><?php _e( 'Select an image', 'vk-all-in-one-expansion-unit' ); ?></button><br />
|
49 |
<span><?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' ); ?>https://www.vektor-inc.co.jp/images/ogImage.png</span><br />
|
113 |
<tr>
|
114 |
<th><label><?php _e( 'Share button for display', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
115 |
<td><label></label>
|
116 |
+
<ul class="no-style">
|
117 |
<li><label><input type="checkbox" name="vkExUnit_sns_options[useFacebook]" value="true"
|
118 |
<?php
|
119 |
if ( $options['useFacebook'] ) {
|
151 |
<tr>
|
152 |
<th><label><?php _e( 'Share button display Position', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
153 |
<td><label></label>
|
154 |
+
<ul class="no-style">
|
155 |
<li><label><input type="checkbox" name="vkExUnit_sns_options[snsBtn_position][before]" value="true"
|
156 |
<?php
|
157 |
if ( ! empty( $options['snsBtn_position']['before'] ) ) {
|
inc/template-tags/package/template-tags.php
CHANGED
@@ -369,7 +369,7 @@ if ( ! function_exists( 'vk_the_post_type_check_list' ) ) {
|
|
369 |
$args = wp_parse_args( $args, $default );
|
370 |
$post_types = get_post_types( $args['post_types_args'], 'object' );
|
371 |
|
372 |
-
echo '<ul>';
|
373 |
foreach ( $post_types as $key => $value ) {
|
374 |
|
375 |
if ( ! in_array( $key, $args['exclude_post_types'] ) ) {
|
369 |
$args = wp_parse_args( $args, $default );
|
370 |
$post_types = get_post_types( $args['post_types_args'], 'object' );
|
371 |
|
372 |
+
echo '<ul class="no-style">';
|
373 |
foreach ( $post_types as $key => $value ) {
|
374 |
|
375 |
if ( ! in_array( $key, $args['exclude_post_types'] ) ) {
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: vektor-inc,kurudrive,hinaloe,jim912,hideokamoto,nc30,SaoriMiyazaki,catherine8007,naoki0h,rickaddison7634,una9,kaorock72,kurishimak
|
3 |
Donate link:
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
-
Requires at least: 5.
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -81,6 +81,10 @@ e.g.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= 9.48.3.0 =
|
85 |
[ Bug fix ] Cope with before 5.0
|
86 |
|
2 |
Contributors: vektor-inc,kurudrive,hinaloe,jim912,hideokamoto,nc30,SaoriMiyazaki,catherine8007,naoki0h,rickaddison7634,una9,kaorock72,kurishimak
|
3 |
Donate link:
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
+
Requires at least: 5.3.0
|
6 |
+
Tested up to: 5.6.0
|
7 |
+
Stable tag: 9.49.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 9.49.0.0 =
|
85 |
+
[ Add function ][ Noindex ] Cope with print to archive page
|
86 |
+
[ Add function ][ Before loop widget area ] Add widget area to before loop on archive page
|
87 |
+
|
88 |
= 9.48.3.0 =
|
89 |
[ Bug fix ] Cope with before 5.0
|
90 |
|
veu-packages.php
CHANGED
@@ -158,6 +158,24 @@ function veu_get_packages() {
|
|
158 |
'include' => 'meta-description.php',
|
159 |
);
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
/*
|
162 |
otherWidgets
|
163 |
/*-------------------------------------------*/
|
@@ -192,7 +210,25 @@ function veu_get_packages() {
|
|
192 |
'default' => true,
|
193 |
'include' => 'other-widget/other-widget.php',
|
194 |
);
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
/**
|
197 |
* Defualt Thumbnail
|
198 |
*/
|
@@ -343,17 +379,6 @@ function veu_get_packages() {
|
|
343 |
'include' => 'related_posts/related_posts.php',
|
344 |
);
|
345 |
|
346 |
-
/*
|
347 |
-
noindex
|
348 |
-
/*-------------------------------------------*/
|
349 |
-
$required_packages[] = array(
|
350 |
-
'name' => 'noindex',
|
351 |
-
'title' => __( 'Noindex additional function', 'vk-all-in-one-expansion-unit' ),
|
352 |
-
'description' => __( 'Outputs the noindex tag to the html head of the specified page.', 'vk-all-in-one-expansion-unit' ).'<br>'.__( 'If you want to add the noindex tag to specific page that, move to that post edit screen and set from VK All in One Expansion Unit metabox in lower part of content editing field.', 'vk-all-in-one-expansion-unit' ),
|
353 |
-
'default' => true,
|
354 |
-
'include' => 'noindex/noindex.php',
|
355 |
-
);
|
356 |
-
|
357 |
/*
|
358 |
disable_ping-back
|
359 |
/*-------------------------------------------*/
|
158 |
'include' => 'meta-description.php',
|
159 |
);
|
160 |
|
161 |
+
/*
|
162 |
+
noindex
|
163 |
+
/*-------------------------------------------*/
|
164 |
+
$required_packages[] = array(
|
165 |
+
'name' => 'noindex',
|
166 |
+
'title' => __( 'Noindex additional function', 'vk-all-in-one-expansion-unit' ),
|
167 |
+
'description' => __( 'Outputs the noindex tag to the html head of the specified page.', 'vk-all-in-one-expansion-unit' ).'<br>'.__( 'If you want to add the noindex tag to specific page that, move to that post edit screen and set from VK All in One Expansion Unit metabox in lower part of content editing field.', 'vk-all-in-one-expansion-unit' ).'<br>'.__( 'If you want add to the other page such as archive page that, you can set to ExUnit Main Setting Page.', 'vk-all-in-one-expansion-unit' ),
|
168 |
+
'attr' => array(
|
169 |
+
array(
|
170 |
+
'name' => __( 'Setting', 'vk-all-in-one-expansion-unit' ),
|
171 |
+
'url' => admin_url() . 'admin.php?page=vkExUnit_main_setting#vkExUnit_noindex',
|
172 |
+
'enable_only' => 1,
|
173 |
+
),
|
174 |
+
),
|
175 |
+
'default' => true,
|
176 |
+
'include' => 'noindex/noindex.php',
|
177 |
+
);
|
178 |
+
|
179 |
/*
|
180 |
otherWidgets
|
181 |
/*-------------------------------------------*/
|
210 |
'default' => true,
|
211 |
'include' => 'other-widget/other-widget.php',
|
212 |
);
|
213 |
+
|
214 |
+
/*
|
215 |
+
Before loop widget area
|
216 |
+
/*-------------------------------------------*/
|
217 |
+
$required_packages[] = array(
|
218 |
+
'name' => 'archive_loop_before_widget_area',
|
219 |
+
'title' => __( 'Before loop widget area', 'vk-all-in-one-expansion-unit' ),
|
220 |
+
'description' => __( 'Add widget area before loop at published post type archive page', 'vk-all-in-one-expansion-unit' ),
|
221 |
+
'attr' => array(
|
222 |
+
// array(
|
223 |
+
// 'name' => __( 'Setting', 'vk-all-in-one-expansion-unit' ),
|
224 |
+
// 'url' => admin_url() . 'edit.php?post_type=post_type_manage',
|
225 |
+
// 'enable_only' => 1,
|
226 |
+
// ),
|
227 |
+
),
|
228 |
+
'default' => false,
|
229 |
+
'include' => 'add_archive_loop_before_widget_area.php',
|
230 |
+
);
|
231 |
+
|
232 |
/**
|
233 |
* Defualt Thumbnail
|
234 |
*/
|
379 |
'include' => 'related_posts/related_posts.php',
|
380 |
);
|
381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
/*
|
383 |
disable_ping-back
|
384 |
/*-------------------------------------------*/
|
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.
|
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.49.0.0
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vk-all-in-one-expansion-unit
|
9 |
* Domain Path: /languages
|