Version Description
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 5.9.0 |
Comparing to | |
See all releases |
Code changes from version 5.8.2 to 5.9.0
- js/all.js +134 -93
- js/all.min.js +2 -3
- js/master.js +134 -93
- languages/vkExUnit-ja.mo +0 -0
- languages/vkExUnit-ja.po +117 -91
- packages.php +1 -1
- plugins/contact-section/contact-section.php +474 -0
- plugins/contact-section/customizer.php +223 -0
- plugins/related_posts/related_posts.php +198 -103
- plugins/sns/function_snsBtns.php +6 -0
- plugins/sns/hide_controller.php +131 -0
- plugins/sns/sns.php +2 -0
- plugins_admin/customize-panel.php +3 -0
- plugins_admin/vk-admin/class-vk-admin.php +268 -262
- readme.txt +1 -2
- vkExUnit.php +37 -28
js/all.js
CHANGED
@@ -121,44 +121,44 @@ jQuery(document).ready(function($){
|
|
121 |
/* Lightning Charm 1.2.0 での表示崩れ回避用
|
122 |
/* Lightning Charm 1.4.0 以降になったら削除
|
123 |
/*-------------------------------------------*/
|
124 |
-
(function($){
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
})(jQuery);
|
144 |
|
145 |
/*-------------------------------------------*/
|
146 |
/* facebookLikeBox
|
147 |
/*-------------------------------------------*/
|
148 |
-
/* jquery.flatheights.js
|
149 |
/*-------------------------------------------*/
|
150 |
/* snsCount
|
151 |
/*-------------------------------------------*/
|
152 |
|
153 |
pagePluginReSize();
|
154 |
-
jQuery(window).resize(function(){
|
155 |
pagePluginReSize();
|
156 |
});
|
157 |
|
158 |
/*-------------------------------------------*/
|
159 |
/* facebookLikeBox
|
160 |
/*-------------------------------------------*/
|
161 |
-
function pagePluginReSize(){
|
162 |
// jQuery('.fb_iframe_widget').each(function(){
|
163 |
// var element = jQuery(this).parent().width();
|
164 |
// console.log(element);
|
@@ -168,89 +168,130 @@ function pagePluginReSize(){
|
|
168 |
// });
|
169 |
}
|
170 |
|
171 |
-
!function(d,s,id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
/*-------------------------------------------*/
|
174 |
-
/* jquery.flatheights.js
|
175 |
/*-------------------------------------------*/
|
176 |
-
(function($){
|
177 |
-
$(function() {
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
});
|
182 |
-
window.onload
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
186 |
})(jQuery);
|
187 |
|
188 |
/*-------------------------------------------*/
|
189 |
/* snsCount
|
190 |
/*-------------------------------------------*/
|
191 |
-
(function($){
|
192 |
-
var socials = $('.veu_socialSet');
|
193 |
-
if(typeof socials[0] === "undefined")return;
|
194 |
-
var linkurl = encodeURIComponent((
|
195 |
-
var facebook = {
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
}
|
208 |
|
209 |
-
window.twttr=(function(d,s,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
-
var hatena = {
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
}
|
229 |
-
var pocket = {
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
}
|
247 |
-
facebook.init();
|
248 |
-
hatena.init();
|
249 |
-
pocket.init();
|
250 |
})(jQuery);
|
251 |
|
252 |
|
253 |
/// master.jsのも同じコードがあるので注意
|
254 |
-
;
|
255 |
-
|
256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
/* Lightning Charm 1.2.0 での表示崩れ回避用
|
122 |
/* Lightning Charm 1.4.0 以降になったら削除
|
123 |
/*-------------------------------------------*/
|
124 |
+
(function($) {
|
125 |
+
// veu_postList のサムネイルがない場合にクラスを付与
|
126 |
+
$veu_postList = $('.veu_postList');
|
127 |
+
if ($veu_postList.length) {
|
128 |
+
var $postList_item_veu = $('.veu_postList .postList > .postList_item'),
|
129 |
+
cnt = 0;
|
130 |
+
|
131 |
+
$postList_item_veu.each(function() {
|
132 |
+
var $post_thumb = $(this).find('.postList_thumbnail');
|
133 |
+
if (!($post_thumb.length)) {
|
134 |
+
$(this).addClass('no_img');
|
135 |
+
} else {
|
136 |
+
cnt++;
|
137 |
+
if ((cnt % 2) == 0) {
|
138 |
+
$(this).addClass('even');
|
139 |
+
}
|
140 |
+
}
|
141 |
+
});
|
142 |
+
}
|
143 |
})(jQuery);
|
144 |
|
145 |
/*-------------------------------------------*/
|
146 |
/* facebookLikeBox
|
147 |
/*-------------------------------------------*/
|
148 |
+
/* jquery.flatheights.js
|
149 |
/*-------------------------------------------*/
|
150 |
/* snsCount
|
151 |
/*-------------------------------------------*/
|
152 |
|
153 |
pagePluginReSize();
|
154 |
+
jQuery(window).resize(function() {
|
155 |
pagePluginReSize();
|
156 |
});
|
157 |
|
158 |
/*-------------------------------------------*/
|
159 |
/* facebookLikeBox
|
160 |
/*-------------------------------------------*/
|
161 |
+
function pagePluginReSize() {
|
162 |
// jQuery('.fb_iframe_widget').each(function(){
|
163 |
// var element = jQuery(this).parent().width();
|
164 |
// console.log(element);
|
168 |
// });
|
169 |
}
|
170 |
|
171 |
+
! function(d, s, id) {
|
172 |
+
var js, fjs = d.getElementsByTagName(s)[0],
|
173 |
+
p = /^http:/.test(d.location) ? 'http' : 'https';
|
174 |
+
if (!d.getElementById(id)) {
|
175 |
+
js = d.createElement(s);
|
176 |
+
js.id = id;
|
177 |
+
js.src = p + '://platform.twitter.com/widgets.js';
|
178 |
+
fjs.parentNode.insertBefore(js, fjs);
|
179 |
+
}
|
180 |
+
}(document, 'script', 'twitter-wjs');
|
181 |
|
182 |
/*-------------------------------------------*/
|
183 |
+
/* jquery.flatheights.js
|
184 |
/*-------------------------------------------*/
|
185 |
+
(function($) {
|
186 |
+
$(function() {
|
187 |
+
$('.prArea > .subSection-title').flatHeights();
|
188 |
+
$('.prArea > .summary').flatHeights();
|
189 |
+
// $('.childPage_list_title').flatHeights();
|
190 |
+
});
|
191 |
+
// window.onload は複数使うと一つしか動作しなくなるので使用しない
|
192 |
+
window.addEventListener('DOMContentLoaded', function() {
|
193 |
+
$('.childPage_list_text').flatHeights();
|
194 |
+
// $('.childPage_list_box').flatHeights();
|
195 |
+
})
|
196 |
})(jQuery);
|
197 |
|
198 |
/*-------------------------------------------*/
|
199 |
/* snsCount
|
200 |
/*-------------------------------------------*/
|
201 |
+
(function($) {
|
202 |
+
var socials = $('.veu_socialSet');
|
203 |
+
if (typeof socials[0] === "undefined") return;
|
204 |
+
var linkurl = encodeURIComponent((typeof vkExOpt !== "undefined" && vkExOpt.sns_linkurl) || location.href);
|
205 |
+
var facebook = {
|
206 |
+
init: function() {
|
207 |
+
var url = 'https://graph.facebook.com/?id=' + linkurl;
|
208 |
+
$.ajax({
|
209 |
+
url: url,
|
210 |
+
dataType: 'jsonp',
|
211 |
+
success: function(response) {
|
212 |
+
if (!response.share || response.share.share_count === undefined) return;
|
213 |
+
socials.find('.veu_count_sns_fb').html(response.share.share_count);
|
214 |
+
}
|
215 |
+
});
|
216 |
+
}
|
217 |
+
}
|
218 |
|
219 |
+
window.twttr = (function(d, s, id) {
|
220 |
+
var js, fjs = d.getElementsByTagName(s)[0],
|
221 |
+
t = window.twttr || {};
|
222 |
+
if (d.getElementById(id)) return t;
|
223 |
+
js = d.createElement(s);
|
224 |
+
js.id = id;
|
225 |
+
js.src = "https://platform.twitter.com/widgets.js";
|
226 |
+
fjs.parentNode.insertBefore(js, fjs);
|
227 |
+
t._e = [];
|
228 |
+
t.ready = function(f) {
|
229 |
+
t._e.push(f);
|
230 |
+
};
|
231 |
+
return t;
|
232 |
+
}(document, "script", "twitter-wjs"));
|
233 |
|
234 |
+
var hatena = {
|
235 |
+
init: function() {
|
236 |
+
var url = (location.protocol === 'https:' ? 'https://b.hatena.ne.jp' : 'http://api.b.st-hatena.com') +
|
237 |
+
'/entry.count?url=' + linkurl;
|
238 |
+
$.ajax({
|
239 |
+
url: url,
|
240 |
+
dataType: 'jsonp',
|
241 |
+
success: function(response) {
|
242 |
+
var count = response ? response : 0;
|
243 |
+
socials.find('.veu_count_sns_hb').html(count);
|
244 |
|
245 |
+
if (typeof(count) == 'undefined') {
|
246 |
+
count = 0;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
});
|
250 |
+
}
|
251 |
+
}
|
252 |
+
var pocket = {
|
253 |
+
init: function() {
|
254 |
+
$.ajax({
|
255 |
+
url: vkExOpt.ajax_url,
|
256 |
+
type: 'POST',
|
257 |
+
data: {
|
258 |
+
'action': 'vkex_pocket_tunnel',
|
259 |
+
'linkurl': linkurl
|
260 |
+
},
|
261 |
+
dataType: 'html',
|
262 |
+
success: function(response) {
|
263 |
+
var count = $(response).find("#cnt").html();
|
264 |
+
if (count === undefined) return;
|
265 |
+
socials.find('.veu_count_sns_pocket').html(count);
|
266 |
+
}
|
267 |
+
})
|
268 |
+
}
|
269 |
+
}
|
270 |
+
facebook.init();
|
271 |
+
hatena.init();
|
272 |
+
pocket.init();
|
273 |
})(jQuery);
|
274 |
|
275 |
|
276 |
/// master.jsのも同じコードがあるので注意
|
277 |
+
;
|
278 |
+
(function($, d) {
|
279 |
+
var a = false,
|
280 |
+
b = '',
|
281 |
+
c = '',
|
282 |
+
f = function() {
|
283 |
+
if (a) {
|
284 |
+
a = false;
|
285 |
+
c.show();
|
286 |
+
b.removeClass('active');
|
287 |
+
} else {
|
288 |
+
a = true;
|
289 |
+
c.hide();
|
290 |
+
b.addClass('active');
|
291 |
+
}
|
292 |
+
};
|
293 |
+
$(d).ready(function() {
|
294 |
+
b = $('#wp-admin-bar-veu_disable_admin_edit .ab-item').on('click', f);
|
295 |
+
c = $('.veu_adminEdit');
|
296 |
+
});
|
297 |
+
})(jQuery, document);
|
js/all.min.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
|
2 |
jQuery.changeLetterSize={handlers:[],interval:1000,currentSize:0};(function($){var self=$.changeLetterSize;var ins=$('<ins>M</ins>').css({display:'block',visibility:'hidden',position:'absolute',padding:'0',top:'0'});var isChanged=function(){ins.appendTo('body');var size=ins[0].offsetHeight;ins.remove();if(self.currentSize==size)return false;self.currentSize=size;return true;};$(isChanged);var observer=function(){if(!isChanged())return;$.each(self.handlers,function(i,handler){handler();});};self.addHandler=function(func){self.handlers.push(func);if(self.handlers.length==1){}};})(jQuery);(function($){var sets=[];var flatHeights=function(set){var maxHeight=0;set.each(function(){var height=this.offsetHeight;if(height>maxHeight)maxHeight=height;});set.css('height',maxHeight+'px');};jQuery.fn.flatHeights=function(){if(this.length>1){flatHeights(this);sets.push(this);}
|
3 |
return this;};var reflatting=function(){$.each(sets,function(){this.height('auto');flatHeights(this);});};$.changeLetterSize.addHandler(reflatting);$(window).resize(reflatting);})(jQuery);jQuery(document).ready(function($){jQuery('.topPrTit a').flatHeights();jQuery('.topPrDescription').flatHeights();jQuery('.child_page_block h4 a').flatHeights();});(function($){$veu_postList=$('.veu_postList');if($veu_postList.length){var $postList_item_veu=$('.veu_postList .postList > .postList_item'),cnt=0;$postList_item_veu.each(function(){var $post_thumb=$(this).find('.postList_thumbnail');if(!($post_thumb.length)){$(this).addClass('no_img');}else{cnt++;if((cnt%2)==0){$(this).addClass('even');}}});}})(jQuery);pagePluginReSize();jQuery(window).resize(function(){pagePluginReSize();});function pagePluginReSize(){}
|
4 |
-
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','twitter-wjs');(function($){$(function(){$('.prArea > .subSection-title').flatHeights();$('.prArea > .summary').flatHeights();});window.
|
5 |
-
window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));var hatena={init:function(){var url=(location.protocol==='https:'?'https://b.hatena.ne.jp':'http://api.b.st-hatena.com')
|
6 |
-
+'/entry.count?url='+linkurl;$.ajax({url:url,dataType:'jsonp',success:function(response){var count=response?response:0;socials.find('.veu_count_sns_hb').html(count);if(typeof(count)=='undefined'){count=0;}}});}}
|
7 |
var pocket={init:function(){$.ajax({url:vkExOpt.ajax_url,type:'POST',data:{'action':'vkex_pocket_tunnel','linkurl':linkurl},dataType:'html',success:function(response){var count=$(response).find("#cnt").html();if(count===undefined)return;socials.find('.veu_count_sns_pocket').html(count);}})}}
|
8 |
facebook.init();hatena.init();pocket.init();})(jQuery);;(function($,d){var a=false,b='',c='',f=function(){if(a){a=false;c.show();b.removeClass('active');}else{a=true;c.hide();b.addClass('active');}};$(d).ready(function(){b=$('#wp-admin-bar-veu_disable_admin_edit .ab-item').on('click',f);c=$('.veu_adminEdit');});})(jQuery,document);
|
1 |
|
2 |
jQuery.changeLetterSize={handlers:[],interval:1000,currentSize:0};(function($){var self=$.changeLetterSize;var ins=$('<ins>M</ins>').css({display:'block',visibility:'hidden',position:'absolute',padding:'0',top:'0'});var isChanged=function(){ins.appendTo('body');var size=ins[0].offsetHeight;ins.remove();if(self.currentSize==size)return false;self.currentSize=size;return true;};$(isChanged);var observer=function(){if(!isChanged())return;$.each(self.handlers,function(i,handler){handler();});};self.addHandler=function(func){self.handlers.push(func);if(self.handlers.length==1){}};})(jQuery);(function($){var sets=[];var flatHeights=function(set){var maxHeight=0;set.each(function(){var height=this.offsetHeight;if(height>maxHeight)maxHeight=height;});set.css('height',maxHeight+'px');};jQuery.fn.flatHeights=function(){if(this.length>1){flatHeights(this);sets.push(this);}
|
3 |
return this;};var reflatting=function(){$.each(sets,function(){this.height('auto');flatHeights(this);});};$.changeLetterSize.addHandler(reflatting);$(window).resize(reflatting);})(jQuery);jQuery(document).ready(function($){jQuery('.topPrTit a').flatHeights();jQuery('.topPrDescription').flatHeights();jQuery('.child_page_block h4 a').flatHeights();});(function($){$veu_postList=$('.veu_postList');if($veu_postList.length){var $postList_item_veu=$('.veu_postList .postList > .postList_item'),cnt=0;$postList_item_veu.each(function(){var $post_thumb=$(this).find('.postList_thumbnail');if(!($post_thumb.length)){$(this).addClass('no_img');}else{cnt++;if((cnt%2)==0){$(this).addClass('even');}}});}})(jQuery);pagePluginReSize();jQuery(window).resize(function(){pagePluginReSize();});function pagePluginReSize(){}
|
4 |
+
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','twitter-wjs');(function($){$(function(){$('.prArea > .subSection-title').flatHeights();$('.prArea > .summary').flatHeights();});window.addEventListener('DOMContentLoaded',function(){$('.childPage_list_text').flatHeights();})})(jQuery);(function($){var socials=$('.veu_socialSet');if(typeof socials[0]==="undefined")return;var linkurl=encodeURIComponent((typeof vkExOpt!=="undefined"&&vkExOpt.sns_linkurl)||location.href);var facebook={init:function(){var url='https://graph.facebook.com/?id='+linkurl;$.ajax({url:url,dataType:'jsonp',success:function(response){if(!response.share||response.share.share_count===undefined)return;socials.find('.veu_count_sns_fb').html(response.share.share_count);}});}}
|
5 |
+
window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));var hatena={init:function(){var url=(location.protocol==='https:'?'https://b.hatena.ne.jp':'http://api.b.st-hatena.com')+'/entry.count?url='+linkurl;$.ajax({url:url,dataType:'jsonp',success:function(response){var count=response?response:0;socials.find('.veu_count_sns_hb').html(count);if(typeof(count)=='undefined'){count=0;}}});}}
|
|
|
6 |
var pocket={init:function(){$.ajax({url:vkExOpt.ajax_url,type:'POST',data:{'action':'vkex_pocket_tunnel','linkurl':linkurl},dataType:'html',success:function(response){var count=$(response).find("#cnt").html();if(count===undefined)return;socials.find('.veu_count_sns_pocket').html(count);}})}}
|
7 |
facebook.init();hatena.init();pocket.init();})(jQuery);;(function($,d){var a=false,b='',c='',f=function(){if(a){a=false;c.show();b.removeClass('active');}else{a=true;c.hide();b.addClass('active');}};$(d).ready(function(){b=$('#wp-admin-bar-veu_disable_admin_edit .ab-item').on('click',f);c=$('.veu_adminEdit');});})(jQuery,document);
|
js/master.js
CHANGED
@@ -2,44 +2,44 @@
|
|
2 |
/* Lightning Charm 1.2.0 での表示崩れ回避用
|
3 |
/* Lightning Charm 1.4.0 以降になったら削除
|
4 |
/*-------------------------------------------*/
|
5 |
-
(function($){
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
})(jQuery);
|
25 |
|
26 |
/*-------------------------------------------*/
|
27 |
/* facebookLikeBox
|
28 |
/*-------------------------------------------*/
|
29 |
-
/* jquery.flatheights.js
|
30 |
/*-------------------------------------------*/
|
31 |
/* snsCount
|
32 |
/*-------------------------------------------*/
|
33 |
|
34 |
pagePluginReSize();
|
35 |
-
jQuery(window).resize(function(){
|
36 |
pagePluginReSize();
|
37 |
});
|
38 |
|
39 |
/*-------------------------------------------*/
|
40 |
/* facebookLikeBox
|
41 |
/*-------------------------------------------*/
|
42 |
-
function pagePluginReSize(){
|
43 |
// jQuery('.fb_iframe_widget').each(function(){
|
44 |
// var element = jQuery(this).parent().width();
|
45 |
// console.log(element);
|
@@ -49,89 +49,130 @@ function pagePluginReSize(){
|
|
49 |
// });
|
50 |
}
|
51 |
|
52 |
-
!function(d,s,id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
/*-------------------------------------------*/
|
55 |
-
/* jquery.flatheights.js
|
56 |
/*-------------------------------------------*/
|
57 |
-
(function($){
|
58 |
-
$(function() {
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
});
|
63 |
-
window.onload
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
67 |
})(jQuery);
|
68 |
|
69 |
/*-------------------------------------------*/
|
70 |
/* snsCount
|
71 |
/*-------------------------------------------*/
|
72 |
-
(function($){
|
73 |
-
var socials = $('.veu_socialSet');
|
74 |
-
if(typeof socials[0] === "undefined")return;
|
75 |
-
var linkurl = encodeURIComponent((
|
76 |
-
var facebook = {
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
}
|
89 |
|
90 |
-
window.twttr=(function(d,s,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
var hatena = {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
}
|
110 |
-
var pocket = {
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
}
|
128 |
-
facebook.init();
|
129 |
-
hatena.init();
|
130 |
-
pocket.init();
|
131 |
})(jQuery);
|
132 |
|
133 |
|
134 |
/// master.jsのも同じコードがあるので注意
|
135 |
-
;
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/* Lightning Charm 1.2.0 での表示崩れ回避用
|
3 |
/* Lightning Charm 1.4.0 以降になったら削除
|
4 |
/*-------------------------------------------*/
|
5 |
+
(function($) {
|
6 |
+
// veu_postList のサムネイルがない場合にクラスを付与
|
7 |
+
$veu_postList = $('.veu_postList');
|
8 |
+
if ($veu_postList.length) {
|
9 |
+
var $postList_item_veu = $('.veu_postList .postList > .postList_item'),
|
10 |
+
cnt = 0;
|
11 |
+
|
12 |
+
$postList_item_veu.each(function() {
|
13 |
+
var $post_thumb = $(this).find('.postList_thumbnail');
|
14 |
+
if (!($post_thumb.length)) {
|
15 |
+
$(this).addClass('no_img');
|
16 |
+
} else {
|
17 |
+
cnt++;
|
18 |
+
if ((cnt % 2) == 0) {
|
19 |
+
$(this).addClass('even');
|
20 |
+
}
|
21 |
+
}
|
22 |
+
});
|
23 |
+
}
|
24 |
})(jQuery);
|
25 |
|
26 |
/*-------------------------------------------*/
|
27 |
/* facebookLikeBox
|
28 |
/*-------------------------------------------*/
|
29 |
+
/* jquery.flatheights.js
|
30 |
/*-------------------------------------------*/
|
31 |
/* snsCount
|
32 |
/*-------------------------------------------*/
|
33 |
|
34 |
pagePluginReSize();
|
35 |
+
jQuery(window).resize(function() {
|
36 |
pagePluginReSize();
|
37 |
});
|
38 |
|
39 |
/*-------------------------------------------*/
|
40 |
/* facebookLikeBox
|
41 |
/*-------------------------------------------*/
|
42 |
+
function pagePluginReSize() {
|
43 |
// jQuery('.fb_iframe_widget').each(function(){
|
44 |
// var element = jQuery(this).parent().width();
|
45 |
// console.log(element);
|
49 |
// });
|
50 |
}
|
51 |
|
52 |
+
! function(d, s, id) {
|
53 |
+
var js, fjs = d.getElementsByTagName(s)[0],
|
54 |
+
p = /^http:/.test(d.location) ? 'http' : 'https';
|
55 |
+
if (!d.getElementById(id)) {
|
56 |
+
js = d.createElement(s);
|
57 |
+
js.id = id;
|
58 |
+
js.src = p + '://platform.twitter.com/widgets.js';
|
59 |
+
fjs.parentNode.insertBefore(js, fjs);
|
60 |
+
}
|
61 |
+
}(document, 'script', 'twitter-wjs');
|
62 |
|
63 |
/*-------------------------------------------*/
|
64 |
+
/* jquery.flatheights.js
|
65 |
/*-------------------------------------------*/
|
66 |
+
(function($) {
|
67 |
+
$(function() {
|
68 |
+
$('.prArea > .subSection-title').flatHeights();
|
69 |
+
$('.prArea > .summary').flatHeights();
|
70 |
+
// $('.childPage_list_title').flatHeights();
|
71 |
+
});
|
72 |
+
// window.onload は複数使うと一つしか動作しなくなるので使用しない
|
73 |
+
window.addEventListener('DOMContentLoaded', function() {
|
74 |
+
$('.childPage_list_text').flatHeights();
|
75 |
+
// $('.childPage_list_box').flatHeights();
|
76 |
+
})
|
77 |
})(jQuery);
|
78 |
|
79 |
/*-------------------------------------------*/
|
80 |
/* snsCount
|
81 |
/*-------------------------------------------*/
|
82 |
+
(function($) {
|
83 |
+
var socials = $('.veu_socialSet');
|
84 |
+
if (typeof socials[0] === "undefined") return;
|
85 |
+
var linkurl = encodeURIComponent((typeof vkExOpt !== "undefined" && vkExOpt.sns_linkurl) || location.href);
|
86 |
+
var facebook = {
|
87 |
+
init: function() {
|
88 |
+
var url = 'https://graph.facebook.com/?id=' + linkurl;
|
89 |
+
$.ajax({
|
90 |
+
url: url,
|
91 |
+
dataType: 'jsonp',
|
92 |
+
success: function(response) {
|
93 |
+
if (!response.share || response.share.share_count === undefined) return;
|
94 |
+
socials.find('.veu_count_sns_fb').html(response.share.share_count);
|
95 |
+
}
|
96 |
+
});
|
97 |
+
}
|
98 |
+
}
|
99 |
|
100 |
+
window.twttr = (function(d, s, id) {
|
101 |
+
var js, fjs = d.getElementsByTagName(s)[0],
|
102 |
+
t = window.twttr || {};
|
103 |
+
if (d.getElementById(id)) return t;
|
104 |
+
js = d.createElement(s);
|
105 |
+
js.id = id;
|
106 |
+
js.src = "https://platform.twitter.com/widgets.js";
|
107 |
+
fjs.parentNode.insertBefore(js, fjs);
|
108 |
+
t._e = [];
|
109 |
+
t.ready = function(f) {
|
110 |
+
t._e.push(f);
|
111 |
+
};
|
112 |
+
return t;
|
113 |
+
}(document, "script", "twitter-wjs"));
|
114 |
|
115 |
+
var hatena = {
|
116 |
+
init: function() {
|
117 |
+
var url = (location.protocol === 'https:' ? 'https://b.hatena.ne.jp' : 'http://api.b.st-hatena.com') +
|
118 |
+
'/entry.count?url=' + linkurl;
|
119 |
+
$.ajax({
|
120 |
+
url: url,
|
121 |
+
dataType: 'jsonp',
|
122 |
+
success: function(response) {
|
123 |
+
var count = response ? response : 0;
|
124 |
+
socials.find('.veu_count_sns_hb').html(count);
|
125 |
|
126 |
+
if (typeof(count) == 'undefined') {
|
127 |
+
count = 0;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
});
|
131 |
+
}
|
132 |
+
}
|
133 |
+
var pocket = {
|
134 |
+
init: function() {
|
135 |
+
$.ajax({
|
136 |
+
url: vkExOpt.ajax_url,
|
137 |
+
type: 'POST',
|
138 |
+
data: {
|
139 |
+
'action': 'vkex_pocket_tunnel',
|
140 |
+
'linkurl': linkurl
|
141 |
+
},
|
142 |
+
dataType: 'html',
|
143 |
+
success: function(response) {
|
144 |
+
var count = $(response).find("#cnt").html();
|
145 |
+
if (count === undefined) return;
|
146 |
+
socials.find('.veu_count_sns_pocket').html(count);
|
147 |
+
}
|
148 |
+
})
|
149 |
+
}
|
150 |
+
}
|
151 |
+
facebook.init();
|
152 |
+
hatena.init();
|
153 |
+
pocket.init();
|
154 |
})(jQuery);
|
155 |
|
156 |
|
157 |
/// master.jsのも同じコードがあるので注意
|
158 |
+
;
|
159 |
+
(function($, d) {
|
160 |
+
var a = false,
|
161 |
+
b = '',
|
162 |
+
c = '',
|
163 |
+
f = function() {
|
164 |
+
if (a) {
|
165 |
+
a = false;
|
166 |
+
c.show();
|
167 |
+
b.removeClass('active');
|
168 |
+
} else {
|
169 |
+
a = true;
|
170 |
+
c.hide();
|
171 |
+
b.addClass('active');
|
172 |
+
}
|
173 |
+
};
|
174 |
+
$(d).ready(function() {
|
175 |
+
b = $('#wp-admin-bar-veu_disable_admin_edit .ab-item').on('click', f);
|
176 |
+
c = $('.veu_adminEdit');
|
177 |
+
});
|
178 |
+
})(jQuery, document);
|
languages/vkExUnit-ja.mo
CHANGED
Binary file
|
languages/vkExUnit-ja.po
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date:
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: Kurudrive <kurudrive@gmail.com>\n"
|
7 |
"Language-Team: Vektor translate Team <info@vektor-inc.co.jp>\n"
|
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.0.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_x;_ex;_ex:1,2c;_x:1,2c;_n:1,2;esc_attr__\n"
|
@@ -325,7 +325,7 @@ msgstr "広告の挿入"
|
|
325 |
msgid "Insert ads to content."
|
326 |
msgstr "記事に広告を挿入します"
|
327 |
|
328 |
-
#: packages.php:343 plugins/related_posts/related_posts.php:
|
329 |
msgid "Related posts"
|
330 |
msgstr "関連記事を表示"
|
331 |
|
@@ -395,132 +395,132 @@ msgstr "キーカラー"
|
|
395 |
msgid "Key color(dark)"
|
396 |
msgstr "キーカラー(暗)"
|
397 |
|
398 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
399 |
#: plugins/call-to-action/view-actionbox.php:64
|
400 |
msgid "Edit CTA"
|
401 |
msgstr "CTAの編集"
|
402 |
|
403 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
404 |
msgid "Add new CTA"
|
405 |
msgstr "CTAの新規作成"
|
406 |
|
407 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
408 |
msgid "New CTA"
|
409 |
msgstr "CTA 新規作成"
|
410 |
|
411 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:91
|
412 |
#: plugins/call-to-action/class-vk-call-to-action.php:93
|
413 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
|
|
414 |
msgid "Call to Action setting"
|
415 |
msgstr "CTA設定"
|
416 |
|
417 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
418 |
msgid "CTA Contents"
|
419 |
msgstr "CTA Contents"
|
420 |
|
421 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
422 |
#: plugins/call-to-action/class-vk-call-to-action.php:549
|
423 |
#: plugins/call-to-action/widget-call-to-action.php:74
|
424 |
msgid "Random"
|
425 |
msgstr "ランダム表示"
|
426 |
|
427 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
428 |
#: plugins/call-to-action/class-vk-call-to-action.php:551
|
429 |
msgid "Disable display"
|
430 |
msgstr "表示しない"
|
431 |
|
432 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
433 |
msgid "Follow common setting"
|
434 |
msgstr "共通設定を使用"
|
435 |
|
436 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
437 |
msgid "CTA common setting"
|
438 |
msgstr "CTA共通設定"
|
439 |
|
440 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
441 |
#: plugins/call-to-action/view-adminsetting.php:31
|
442 |
#: plugins/call-to-action/widget-call-to-action.php:86
|
443 |
msgid "Show CTA index page"
|
444 |
msgstr "CTAの一覧を表示"
|
445 |
|
446 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
447 |
msgid "CTA image"
|
448 |
msgstr "CTA画像"
|
449 |
|
450 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
451 |
msgid "Add image"
|
452 |
msgstr "画像を追加"
|
453 |
|
454 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
455 |
msgid "Change image"
|
456 |
msgstr "画像を変更"
|
457 |
|
458 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
459 |
msgid "Remove image"
|
460 |
msgstr "画像を削除"
|
461 |
|
462 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
463 |
msgid "CTA image position"
|
464 |
msgstr "CTA画像の位置"
|
465 |
|
466 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
467 |
msgid "right"
|
468 |
msgstr "右寄せ"
|
469 |
|
470 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
471 |
msgid "center"
|
472 |
msgstr "中央"
|
473 |
|
474 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
475 |
msgid "left"
|
476 |
msgstr "左寄せ"
|
477 |
|
478 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
479 |
msgid "Button text"
|
480 |
msgstr "ボタンの表記文言"
|
481 |
|
482 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
483 |
msgid "Button icon"
|
484 |
msgstr "ボタンアイコン"
|
485 |
|
486 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
487 |
#: plugins/other_widget/widget-button.php:104
|
488 |
#: plugins/other_widget/widget-pr-blocks.php:113
|
489 |
msgid "To choose your favorite icon, and enter the class."
|
490 |
msgstr "アイコンフォントを選んでそのクラス名を入力してください。"
|
491 |
|
492 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
493 |
#: plugins/other_widget/widget-button.php:105
|
494 |
msgid "Before :"
|
495 |
msgstr "文字の前 :"
|
496 |
|
497 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
498 |
#: plugins/other_widget/widget-button.php:107
|
499 |
msgid "After :"
|
500 |
msgstr "文字の後 :"
|
501 |
|
502 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
503 |
#: plugins/other_widget/widget-button.php:109
|
504 |
msgid " ex:fa-arrow-circle-o-right"
|
505 |
msgstr "例: fa-arrow-circle-o-right"
|
506 |
|
507 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
508 |
msgid "Button link url"
|
509 |
msgstr "ボタンのリンク先URL"
|
510 |
|
511 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
512 |
msgid "Target window"
|
513 |
msgstr "リンク先ターゲット"
|
514 |
|
515 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
516 |
msgid "Open in a self window"
|
517 |
msgstr "同じウィンドウで開く"
|
518 |
|
519 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
520 |
msgid "Text message"
|
521 |
msgstr "テキストメッセージ"
|
522 |
|
523 |
-
#: plugins/call-to-action/class-vk-call-to-action.php:
|
524 |
#: plugins/call-to-action/widget-call-to-action.php:89
|
525 |
msgid "CTA setting"
|
526 |
msgstr "CTA設定"
|
@@ -576,30 +576,32 @@ msgstr "詳しくはこちら"
|
|
576 |
msgid "Display a child page index"
|
577 |
msgstr "子ページ一覧の表示"
|
578 |
|
579 |
-
#: plugins/
|
|
|
580 |
msgid "Contact Information"
|
581 |
msgstr "お問い合わせ情報"
|
582 |
|
583 |
-
#: plugins/
|
|
|
584 |
msgid "Please feel free to inquire."
|
585 |
msgstr "お気軽にお問い合わせください。"
|
586 |
|
587 |
-
#: plugins/
|
588 |
msgid "Office hours 9:00 - 18:00 [ Weekdays except holidays ]"
|
589 |
msgstr "受付時間 9:00-18:00 [ 土・日・祝日除く ]"
|
590 |
|
591 |
-
#: plugins/
|
592 |
msgid "Contact us"
|
593 |
msgstr "お問い合わせ"
|
594 |
|
595 |
-
#: plugins/
|
596 |
msgid ""
|
597 |
"Contents input here are displayed on an \"Contact Button\" widget and each "
|
598 |
"fixed page."
|
599 |
msgstr ""
|
600 |
"ここに入力された内容がお問い合わせウィジェットと各固定ページに表示されます。"
|
601 |
|
602 |
-
#: plugins/
|
603 |
msgid ""
|
604 |
"When I display it on the page, it is necessary to classify a check into "
|
605 |
"\"Display Contact Section\" checkbox with the edit page of each page."
|
@@ -607,110 +609,128 @@ msgstr ""
|
|
607 |
"固定ページに表示する場合は、各固定ページの編集画面で\"お問い合わせ情報の表示"
|
608 |
"\"にチェックを入れる必要があります。"
|
609 |
|
610 |
-
#: plugins/
|
|
|
611 |
msgid "Message"
|
612 |
msgstr "メッセージ"
|
613 |
|
614 |
-
#: plugins/
|
615 |
-
#: plugins/
|
616 |
-
#: plugins/
|
|
|
|
|
|
|
617 |
#: plugins/google_analytics/ga_admin.php:16 plugins/sns/sns_admin.php:31
|
618 |
msgid "ex) "
|
619 |
msgstr "例: "
|
620 |
|
621 |
-
#: plugins/
|
|
|
622 |
msgid "Phone number"
|
623 |
msgstr "電話番号"
|
624 |
|
625 |
-
#: plugins/
|
|
|
|
|
626 |
msgid "Office hours"
|
627 |
msgstr "営業時間"
|
628 |
|
629 |
-
#: plugins/
|
630 |
msgid "Weekdays except holidays"
|
631 |
msgstr "土日・祝日除く"
|
632 |
|
633 |
-
#: plugins/
|
|
|
634 |
msgid "The contact page URL"
|
635 |
msgstr "お問い合わせ先URL"
|
636 |
|
637 |
-
#: plugins/
|
638 |
msgid "or"
|
639 |
msgstr "もしくは"
|
640 |
|
641 |
-
#: plugins/
|
642 |
msgid "* If you fill in the blank, widget's contact button does not appear."
|
643 |
msgstr "※ 未入力の場合、お問い合わせウィジェットには何も表示されません。"
|
644 |
|
645 |
-
#: plugins/
|
|
|
646 |
msgid "Contact button Text"
|
647 |
msgstr "お問い合わせボタンに表示するテキスト"
|
648 |
|
649 |
-
#: plugins/
|
650 |
msgid "Contact Us from email."
|
651 |
msgstr "メールでのお問い合わせはこちら"
|
652 |
|
653 |
-
#: plugins/
|
|
|
654 |
msgid "Contact button text( sub )"
|
655 |
msgstr "お問い合わせボタンに表示するテキスト2(オプション)"
|
656 |
|
657 |
-
#: plugins/
|
658 |
msgid "Email contact form"
|
659 |
msgstr "お気軽にお問い合わせください。"
|
660 |
|
661 |
-
#: plugins/
|
|
|
662 |
msgid "Contact button short text for side widget"
|
663 |
msgstr "お問い合わせボタンウィジェットに表示するテキスト"
|
664 |
|
665 |
-
#: plugins/
|
666 |
msgid "This will used to \"Contact Button\" widget."
|
667 |
msgstr ""
|
668 |
"このテキストはお問い合わせボタンウィジェットで使用されます。サイドバーでの利"
|
669 |
"用を想定していますので少ない文字数で設定してください。"
|
670 |
|
671 |
-
#: plugins/
|
672 |
msgid "Advanced Setting"
|
673 |
msgstr "高度な設定"
|
674 |
|
675 |
-
#: plugins/
|
|
|
|
|
676 |
msgid "Inquiry Banner image"
|
677 |
msgstr "お問い合わせバナー画像"
|
678 |
|
679 |
-
#: plugins/
|
680 |
msgid "Select Image"
|
681 |
msgstr "画像を選択"
|
682 |
|
683 |
-
#: plugins/
|
|
|
684 |
msgid "Display the image instead of the above inquiry information"
|
685 |
msgstr ""
|
686 |
"画像が登録されている場合は標準のお問い合わせ情報ではなく画像が表示されます。"
|
687 |
|
688 |
-
#: plugins/
|
|
|
689 |
msgid "Display HTML message instead of the standard"
|
690 |
msgstr "お問い合わせ情報として表示するHTML"
|
691 |
|
692 |
-
#: plugins/
|
|
|
693 |
msgid "HTML takes precedence over image"
|
694 |
msgstr "HTMLが登録されている場合は画像より優先されます。"
|
695 |
|
696 |
-
#: plugins/
|
697 |
msgid "Display Contact Section"
|
698 |
msgstr "お問い合わせ情報の表示"
|
699 |
|
700 |
-
#: plugins/
|
|
|
701 |
msgid "Edit contact information"
|
702 |
msgstr "Contact情報を編集"
|
703 |
|
704 |
-
#: plugins/
|
705 |
msgid "Contact Button"
|
706 |
msgstr "お問い合わせボタン"
|
707 |
|
708 |
-
#: plugins/
|
709 |
msgid "Display contact button."
|
710 |
msgstr "お問い合わせボタンを表示します。"
|
711 |
|
712 |
-
#: plugins/
|
713 |
-
#: plugins/
|
|
|
714 |
#, php-format
|
715 |
msgid ""
|
716 |
"It is necessary to set the \"%s\" -> \"Contact Information\" section in "
|
@@ -718,19 +738,19 @@ msgid ""
|
|
718 |
msgstr ""
|
719 |
"「%s」→ 「メイン設定」ページで『お問い合わせ情報』を設定する必要があります。"
|
720 |
|
721 |
-
#: plugins/
|
722 |
msgid "Display contact button"
|
723 |
msgstr "お問い合わせボタンを表示します。"
|
724 |
|
725 |
-
#: plugins/
|
726 |
msgid "Contact Section HTML"
|
727 |
msgstr "お問い合わせ情報"
|
728 |
|
729 |
-
#: plugins/
|
730 |
msgid "Display Phone number and contact button etc."
|
731 |
msgstr "電話番号とお問い合わせボタンなどを表示します。"
|
732 |
|
733 |
-
#: plugins/
|
734 |
#, php-format
|
735 |
msgid ""
|
736 |
"*It is necessary to set the \"%s\" -> \"Contact Information\" section in "
|
@@ -739,6 +759,10 @@ msgstr ""
|
|
739 |
"* 「%s」→ 「メイン設定」ページで『お問い合わせ情報』を設定する必要がありま"
|
740 |
"す。"
|
741 |
|
|
|
|
|
|
|
|
|
742 |
#: plugins/css_customize/css_customize-edit.php:2
|
743 |
#: plugins/css_customize/css_customize.php:28
|
744 |
#: plugins/css_customize/css_customize.php:44
|
@@ -988,7 +1012,7 @@ msgstr "3PR エリア設定"
|
|
988 |
#: plugins/other_widget/widget-page.php:126
|
989 |
#: plugins/other_widget/widget-pr-blocks.php:89
|
990 |
#: plugins/other_widget/widget-profile.php:48
|
991 |
-
#: plugins/related_posts/related_posts.php:
|
992 |
#: plugins/sns/function_fbPagePlugin.php:79
|
993 |
msgid "Title:"
|
994 |
msgstr "タイトル"
|
@@ -1341,7 +1365,7 @@ msgid "Solid color"
|
|
1341 |
msgstr "塗りつぶし"
|
1342 |
|
1343 |
#: plugins/other_widget/widget-pr-blocks.php:129
|
1344 |
-
#: plugins/other_widget/widget-profile.php:143 plugins/sns/sns.php:
|
1345 |
msgid "No background"
|
1346 |
msgstr "背景なし"
|
1347 |
|
@@ -1584,7 +1608,7 @@ msgid ""
|
|
1584 |
msgstr ""
|
1585 |
"設定を更新したら<a href=\"%s\">パーマリンク設定</a>を保存してください。"
|
1586 |
|
1587 |
-
#: plugins/related_posts/related_posts.php:
|
1588 |
msgid "Related Settings"
|
1589 |
msgstr "関連記事設定"
|
1590 |
|
@@ -1652,20 +1676,32 @@ msgstr ""
|
|
1652 |
"このエリアにタイトルを入力すると、このページのOGP,ツイッターカードに出力され"
|
1653 |
"るタイトルを上書きすることができます"
|
1654 |
|
1655 |
-
#: plugins/sns/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1656 |
msgid "SNS"
|
1657 |
msgstr "SNS"
|
1658 |
|
1659 |
-
#: plugins/sns/sns.php:
|
1660 |
msgctxt "facebook language code"
|
1661 |
msgid "en_US"
|
1662 |
msgstr "ja_JP"
|
1663 |
|
1664 |
-
#: plugins/sns/sns.php:
|
1665 |
msgid "SNS Settings"
|
1666 |
msgstr "SNS設定"
|
1667 |
|
1668 |
-
#: plugins/sns/sns.php:
|
1669 |
msgid "Btn color"
|
1670 |
msgstr "ボタンの色:"
|
1671 |
|
@@ -1989,7 +2025,7 @@ msgstr "メイン設定"
|
|
1989 |
msgid "Setting of insert items"
|
1990 |
msgstr "挿入アイテムの設定"
|
1991 |
|
1992 |
-
#: plugins_admin/customize-panel.php:
|
1993 |
msgid "ExUnit Settings"
|
1994 |
msgstr "ExUnit 設定"
|
1995 |
|
@@ -1997,15 +2033,11 @@ msgstr "ExUnit 設定"
|
|
1997 |
msgid "Edit Guide"
|
1998 |
msgstr "編集ガイド"
|
1999 |
|
2000 |
-
#: plugins_admin/vk-admin/class-vk-admin.php:
|
2001 |
-
msgid "Vektor WordPress フォーラム"
|
2002 |
-
msgstr ""
|
2003 |
-
|
2004 |
-
#: plugins_admin/vk-admin/class-vk-admin.php:243
|
2005 |
msgid "Sorry, there is no post"
|
2006 |
msgstr "お知らせはありません。"
|
2007 |
|
2008 |
-
#: plugins_admin/vk-admin/class-vk-admin.php:
|
2009 |
msgid "Vektor WordPress Information"
|
2010 |
msgstr ""
|
2011 |
|
@@ -2175,12 +2207,6 @@ msgstr "%s がサポートしているPHPのバージョンは5.6以降です。
|
|
2175 |
#~ msgid "OGP default image"
|
2176 |
#~ msgstr "OGP デフォルト画像"
|
2177 |
|
2178 |
-
#~ msgid "Social buttons"
|
2179 |
-
#~ msgstr "ソーシャルボタン"
|
2180 |
-
|
2181 |
-
#~ msgid "Please check the type of page that displays the social button."
|
2182 |
-
#~ msgstr "ページに表示するソーシャルボタンの種類を選択して下さい。"
|
2183 |
-
|
2184 |
#~ msgid "Home page"
|
2185 |
#~ msgstr "トップページ"
|
2186 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2018-02-07 14:32+0900\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: Kurudrive <kurudrive@gmail.com>\n"
|
7 |
"Language-Team: Vektor translate Team <info@vektor-inc.co.jp>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.0.3\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_x;_ex;_ex:1,2c;_x:1,2c;_n:1,2;esc_attr__\n"
|
325 |
msgid "Insert ads to content."
|
326 |
msgstr "記事に広告を挿入します"
|
327 |
|
328 |
+
#: packages.php:343 plugins/related_posts/related_posts.php:201
|
329 |
msgid "Related posts"
|
330 |
msgstr "関連記事を表示"
|
331 |
|
395 |
msgid "Key color(dark)"
|
396 |
msgstr "キーカラー(暗)"
|
397 |
|
398 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:63
|
399 |
#: plugins/call-to-action/view-actionbox.php:64
|
400 |
msgid "Edit CTA"
|
401 |
msgstr "CTAの編集"
|
402 |
|
403 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:64
|
404 |
msgid "Add new CTA"
|
405 |
msgstr "CTAの新規作成"
|
406 |
|
407 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:65
|
408 |
msgid "New CTA"
|
409 |
msgstr "CTA 新規作成"
|
410 |
|
|
|
411 |
#: plugins/call-to-action/class-vk-call-to-action.php:93
|
412 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:95
|
413 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:96
|
414 |
msgid "Call to Action setting"
|
415 |
msgstr "CTA設定"
|
416 |
|
417 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:98
|
418 |
msgid "CTA Contents"
|
419 |
msgstr "CTA Contents"
|
420 |
|
421 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:123
|
422 |
#: plugins/call-to-action/class-vk-call-to-action.php:549
|
423 |
#: plugins/call-to-action/widget-call-to-action.php:74
|
424 |
msgid "Random"
|
425 |
msgstr "ランダム表示"
|
426 |
|
427 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:124
|
428 |
#: plugins/call-to-action/class-vk-call-to-action.php:551
|
429 |
msgid "Disable display"
|
430 |
msgstr "表示しない"
|
431 |
|
432 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:125
|
433 |
msgid "Follow common setting"
|
434 |
msgstr "共通設定を使用"
|
435 |
|
436 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:136
|
437 |
msgid "CTA common setting"
|
438 |
msgstr "CTA共通設定"
|
439 |
|
440 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:137
|
441 |
#: plugins/call-to-action/view-adminsetting.php:31
|
442 |
#: plugins/call-to-action/widget-call-to-action.php:86
|
443 |
msgid "Show CTA index page"
|
444 |
msgstr "CTAの一覧を表示"
|
445 |
|
446 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:205
|
447 |
msgid "CTA image"
|
448 |
msgstr "CTA画像"
|
449 |
|
450 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:211
|
451 |
msgid "Add image"
|
452 |
msgstr "画像を追加"
|
453 |
|
454 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:212
|
455 |
msgid "Change image"
|
456 |
msgstr "画像を変更"
|
457 |
|
458 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:213
|
459 |
msgid "Remove image"
|
460 |
msgstr "画像を削除"
|
461 |
|
462 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:218
|
463 |
msgid "CTA image position"
|
464 |
msgstr "CTA画像の位置"
|
465 |
|
466 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:221
|
467 |
msgid "right"
|
468 |
msgstr "右寄せ"
|
469 |
|
470 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:222
|
471 |
msgid "center"
|
472 |
msgstr "中央"
|
473 |
|
474 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:223
|
475 |
msgid "left"
|
476 |
msgstr "左寄せ"
|
477 |
|
478 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:227
|
479 |
msgid "Button text"
|
480 |
msgstr "ボタンの表記文言"
|
481 |
|
482 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:231
|
483 |
msgid "Button icon"
|
484 |
msgstr "ボタンアイコン"
|
485 |
|
486 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:232
|
487 |
#: plugins/other_widget/widget-button.php:104
|
488 |
#: plugins/other_widget/widget-pr-blocks.php:113
|
489 |
msgid "To choose your favorite icon, and enter the class."
|
490 |
msgstr "アイコンフォントを選んでそのクラス名を入力してください。"
|
491 |
|
492 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:233
|
493 |
#: plugins/other_widget/widget-button.php:105
|
494 |
msgid "Before :"
|
495 |
msgstr "文字の前 :"
|
496 |
|
497 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:235
|
498 |
#: plugins/other_widget/widget-button.php:107
|
499 |
msgid "After :"
|
500 |
msgstr "文字の後 :"
|
501 |
|
502 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:237
|
503 |
#: plugins/other_widget/widget-button.php:109
|
504 |
msgid " ex:fa-arrow-circle-o-right"
|
505 |
msgstr "例: fa-arrow-circle-o-right"
|
506 |
|
507 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:242
|
508 |
msgid "Button link url"
|
509 |
msgstr "ボタンのリンク先URL"
|
510 |
|
511 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:255
|
512 |
msgid "Target window"
|
513 |
msgstr "リンク先ターゲット"
|
514 |
|
515 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:257
|
516 |
msgid "Open in a self window"
|
517 |
msgstr "同じウィンドウで開く"
|
518 |
|
519 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:259
|
520 |
msgid "Text message"
|
521 |
msgstr "テキストメッセージ"
|
522 |
|
523 |
+
#: plugins/call-to-action/class-vk-call-to-action.php:265
|
524 |
#: plugins/call-to-action/widget-call-to-action.php:89
|
525 |
msgid "CTA setting"
|
526 |
msgstr "CTA設定"
|
576 |
msgid "Display a child page index"
|
577 |
msgstr "子ページ一覧の表示"
|
578 |
|
579 |
+
#: plugins/contact-section/contact-section.php:96
|
580 |
+
#: plugins/contact-section/contact-section.php:124
|
581 |
msgid "Contact Information"
|
582 |
msgstr "お問い合わせ情報"
|
583 |
|
584 |
+
#: plugins/contact-section/contact-section.php:106
|
585 |
+
#: plugins/contact-section/contact-section.php:135
|
586 |
msgid "Please feel free to inquire."
|
587 |
msgstr "お気軽にお問い合わせください。"
|
588 |
|
589 |
+
#: plugins/contact-section/contact-section.php:108
|
590 |
msgid "Office hours 9:00 - 18:00 [ Weekdays except holidays ]"
|
591 |
msgstr "受付時間 9:00-18:00 [ 土・日・祝日除く ]"
|
592 |
|
593 |
+
#: plugins/contact-section/contact-section.php:112
|
594 |
msgid "Contact us"
|
595 |
msgstr "お問い合わせ"
|
596 |
|
597 |
+
#: plugins/contact-section/contact-section.php:126
|
598 |
msgid ""
|
599 |
"Contents input here are displayed on an \"Contact Button\" widget and each "
|
600 |
"fixed page."
|
601 |
msgstr ""
|
602 |
"ここに入力された内容がお問い合わせウィジェットと各固定ページに表示されます。"
|
603 |
|
604 |
+
#: plugins/contact-section/contact-section.php:128
|
605 |
msgid ""
|
606 |
"When I display it on the page, it is necessary to classify a check into "
|
607 |
"\"Display Contact Section\" checkbox with the edit page of each page."
|
609 |
"固定ページに表示する場合は、各固定ページの編集画面で\"お問い合わせ情報の表示"
|
610 |
"\"にチェックを入れる必要があります。"
|
611 |
|
612 |
+
#: plugins/contact-section/contact-section.php:132
|
613 |
+
#: plugins/contact-section/customizer.php:41
|
614 |
msgid "Message"
|
615 |
msgstr "メッセージ"
|
616 |
|
617 |
+
#: plugins/contact-section/contact-section.php:135
|
618 |
+
#: plugins/contact-section/contact-section.php:142
|
619 |
+
#: plugins/contact-section/contact-section.php:149
|
620 |
+
#: plugins/contact-section/contact-section.php:157
|
621 |
+
#: plugins/contact-section/contact-section.php:165
|
622 |
+
#: plugins/contact-section/contact-section.php:173
|
623 |
#: plugins/google_analytics/ga_admin.php:16 plugins/sns/sns_admin.php:31
|
624 |
msgid "ex) "
|
625 |
msgstr "例: "
|
626 |
|
627 |
+
#: plugins/contact-section/contact-section.php:139
|
628 |
+
#: plugins/contact-section/customizer.php:61
|
629 |
msgid "Phone number"
|
630 |
msgstr "電話番号"
|
631 |
|
632 |
+
#: plugins/contact-section/contact-section.php:146
|
633 |
+
#: plugins/contact-section/contact-section.php:149
|
634 |
+
#: plugins/contact-section/customizer.php:81
|
635 |
msgid "Office hours"
|
636 |
msgstr "営業時間"
|
637 |
|
638 |
+
#: plugins/contact-section/contact-section.php:149
|
639 |
msgid "Weekdays except holidays"
|
640 |
msgstr "土日・祝日除く"
|
641 |
|
642 |
+
#: plugins/contact-section/contact-section.php:154
|
643 |
+
#: plugins/contact-section/customizer.php:101
|
644 |
msgid "The contact page URL"
|
645 |
msgstr "お問い合わせ先URL"
|
646 |
|
647 |
+
#: plugins/contact-section/contact-section.php:157
|
648 |
msgid "or"
|
649 |
msgstr "もしくは"
|
650 |
|
651 |
+
#: plugins/contact-section/contact-section.php:158
|
652 |
msgid "* If you fill in the blank, widget's contact button does not appear."
|
653 |
msgstr "※ 未入力の場合、お問い合わせウィジェットには何も表示されません。"
|
654 |
|
655 |
+
#: plugins/contact-section/contact-section.php:162
|
656 |
+
#: plugins/contact-section/customizer.php:121
|
657 |
msgid "Contact button Text"
|
658 |
msgstr "お問い合わせボタンに表示するテキスト"
|
659 |
|
660 |
+
#: plugins/contact-section/contact-section.php:165
|
661 |
msgid "Contact Us from email."
|
662 |
msgstr "メールでのお問い合わせはこちら"
|
663 |
|
664 |
+
#: plugins/contact-section/contact-section.php:170
|
665 |
+
#: plugins/contact-section/customizer.php:141
|
666 |
msgid "Contact button text( sub )"
|
667 |
msgstr "お問い合わせボタンに表示するテキスト2(オプション)"
|
668 |
|
669 |
+
#: plugins/contact-section/contact-section.php:174
|
670 |
msgid "Email contact form"
|
671 |
msgstr "お気軽にお問い合わせください。"
|
672 |
|
673 |
+
#: plugins/contact-section/contact-section.php:179
|
674 |
+
#: plugins/contact-section/customizer.php:161
|
675 |
msgid "Contact button short text for side widget"
|
676 |
msgstr "お問い合わせボタンウィジェットに表示するテキスト"
|
677 |
|
678 |
+
#: plugins/contact-section/contact-section.php:183
|
679 |
msgid "This will used to \"Contact Button\" widget."
|
680 |
msgstr ""
|
681 |
"このテキストはお問い合わせボタンウィジェットで使用されます。サイドバーでの利"
|
682 |
"用を想定していますので少ない文字数で設定してください。"
|
683 |
|
684 |
+
#: plugins/contact-section/contact-section.php:187
|
685 |
msgid "Advanced Setting"
|
686 |
msgstr "高度な設定"
|
687 |
|
688 |
+
#: plugins/contact-section/contact-section.php:196
|
689 |
+
#: plugins/contact-section/customizer.php:187
|
690 |
+
#: plugins/contact-section/customizer.php:219
|
691 |
msgid "Inquiry Banner image"
|
692 |
msgstr "お問い合わせバナー画像"
|
693 |
|
694 |
+
#: plugins/contact-section/contact-section.php:198
|
695 |
msgid "Select Image"
|
696 |
msgstr "画像を選択"
|
697 |
|
698 |
+
#: plugins/contact-section/contact-section.php:199
|
699 |
+
#: plugins/contact-section/customizer.php:223
|
700 |
msgid "Display the image instead of the above inquiry information"
|
701 |
msgstr ""
|
702 |
"画像が登録されている場合は標準のお問い合わせ情報ではなく画像が表示されます。"
|
703 |
|
704 |
+
#: plugins/contact-section/contact-section.php:203
|
705 |
+
#: plugins/contact-section/customizer.php:240
|
706 |
msgid "Display HTML message instead of the standard"
|
707 |
msgstr "お問い合わせ情報として表示するHTML"
|
708 |
|
709 |
+
#: plugins/contact-section/contact-section.php:205
|
710 |
+
#: plugins/contact-section/customizer.php:245
|
711 |
msgid "HTML takes precedence over image"
|
712 |
msgstr "HTMLが登録されている場合は画像より優先されます。"
|
713 |
|
714 |
+
#: plugins/contact-section/contact-section.php:227
|
715 |
msgid "Display Contact Section"
|
716 |
msgstr "お問い合わせ情報の表示"
|
717 |
|
718 |
+
#: plugins/contact-section/contact-section.php:342
|
719 |
+
#: plugins/contact-section/contact-section.php:370
|
720 |
msgid "Edit contact information"
|
721 |
msgstr "Contact情報を編集"
|
722 |
|
723 |
+
#: plugins/contact-section/contact-section.php:391
|
724 |
msgid "Contact Button"
|
725 |
msgstr "お問い合わせボタン"
|
726 |
|
727 |
+
#: plugins/contact-section/contact-section.php:392
|
728 |
msgid "Display contact button."
|
729 |
msgstr "お問い合わせボタンを表示します。"
|
730 |
|
731 |
+
#: plugins/contact-section/contact-section.php:393
|
732 |
+
#: plugins/contact-section/contact-section.php:421
|
733 |
+
#: plugins/contact-section/contact-section.php:440
|
734 |
#, php-format
|
735 |
msgid ""
|
736 |
"It is necessary to set the \"%s\" -> \"Contact Information\" section in "
|
738 |
msgstr ""
|
739 |
"「%s」→ 「メイン設定」ページで『お問い合わせ情報』を設定する必要があります。"
|
740 |
|
741 |
+
#: plugins/contact-section/contact-section.php:420
|
742 |
msgid "Display contact button"
|
743 |
msgstr "お問い合わせボタンを表示します。"
|
744 |
|
745 |
+
#: plugins/contact-section/contact-section.php:438
|
746 |
msgid "Contact Section HTML"
|
747 |
msgstr "お問い合わせ情報"
|
748 |
|
749 |
+
#: plugins/contact-section/contact-section.php:439
|
750 |
msgid "Display Phone number and contact button etc."
|
751 |
msgstr "電話番号とお問い合わせボタンなどを表示します。"
|
752 |
|
753 |
+
#: plugins/contact-section/contact-section.php:468
|
754 |
#, php-format
|
755 |
msgid ""
|
756 |
"*It is necessary to set the \"%s\" -> \"Contact Information\" section in "
|
759 |
"* 「%s」→ 「メイン設定」ページで『お問い合わせ情報』を設定する必要がありま"
|
760 |
"す。"
|
761 |
|
762 |
+
#: plugins/contact-section/customizer.php:23
|
763 |
+
msgid "Contact Settings"
|
764 |
+
msgstr "お問い合わせ情報"
|
765 |
+
|
766 |
#: plugins/css_customize/css_customize-edit.php:2
|
767 |
#: plugins/css_customize/css_customize.php:28
|
768 |
#: plugins/css_customize/css_customize.php:44
|
1012 |
#: plugins/other_widget/widget-page.php:126
|
1013 |
#: plugins/other_widget/widget-pr-blocks.php:89
|
1014 |
#: plugins/other_widget/widget-profile.php:48
|
1015 |
+
#: plugins/related_posts/related_posts.php:252
|
1016 |
#: plugins/sns/function_fbPagePlugin.php:79
|
1017 |
msgid "Title:"
|
1018 |
msgstr "タイトル"
|
1365 |
msgstr "塗りつぶし"
|
1366 |
|
1367 |
#: plugins/other_widget/widget-pr-blocks.php:129
|
1368 |
+
#: plugins/other_widget/widget-profile.php:143 plugins/sns/sns.php:189
|
1369 |
msgid "No background"
|
1370 |
msgstr "背景なし"
|
1371 |
|
1608 |
msgstr ""
|
1609 |
"設定を更新したら<a href=\"%s\">パーマリンク設定</a>を保存してください。"
|
1610 |
|
1611 |
+
#: plugins/related_posts/related_posts.php:235
|
1612 |
msgid "Related Settings"
|
1613 |
msgstr "関連記事設定"
|
1614 |
|
1676 |
"このエリアにタイトルを入力すると、このページのOGP,ツイッターカードに出力され"
|
1677 |
"るタイトルを上書きすることができます"
|
1678 |
|
1679 |
+
#: plugins/sns/hide_controller.php:28
|
1680 |
+
msgid "Share bottons"
|
1681 |
+
msgstr "ソーシャルボタン"
|
1682 |
+
|
1683 |
+
#: plugins/sns/hide_controller.php:65
|
1684 |
+
msgid "This post type is not set to display the share button."
|
1685 |
+
msgstr "この投稿タイプはシェアボタンを表示するように設定されていません。"
|
1686 |
+
|
1687 |
+
#: plugins/sns/hide_controller.php:86
|
1688 |
+
msgid "Don't display share bottons."
|
1689 |
+
msgstr "ソーシャルボタンを表示しない"
|
1690 |
+
|
1691 |
+
#: plugins/sns/sns.php:26
|
1692 |
msgid "SNS"
|
1693 |
msgstr "SNS"
|
1694 |
|
1695 |
+
#: plugins/sns/sns.php:126
|
1696 |
msgctxt "facebook language code"
|
1697 |
msgid "en_US"
|
1698 |
msgstr "ja_JP"
|
1699 |
|
1700 |
+
#: plugins/sns/sns.php:175 plugins/sns/sns_admin.php:1
|
1701 |
msgid "SNS Settings"
|
1702 |
msgstr "SNS設定"
|
1703 |
|
1704 |
+
#: plugins/sns/sns.php:205
|
1705 |
msgid "Btn color"
|
1706 |
msgstr "ボタンの色:"
|
1707 |
|
2025 |
msgid "Setting of insert items"
|
2026 |
msgstr "挿入アイテムの設定"
|
2027 |
|
2028 |
+
#: plugins_admin/customize-panel.php:31
|
2029 |
msgid "ExUnit Settings"
|
2030 |
msgstr "ExUnit 設定"
|
2031 |
|
2033 |
msgid "Edit Guide"
|
2034 |
msgstr "編集ガイド"
|
2035 |
|
2036 |
+
#: plugins_admin/vk-admin/class-vk-admin.php:263
|
|
|
|
|
|
|
|
|
2037 |
msgid "Sorry, there is no post"
|
2038 |
msgstr "お知らせはありません。"
|
2039 |
|
2040 |
+
#: plugins_admin/vk-admin/class-vk-admin.php:317
|
2041 |
msgid "Vektor WordPress Information"
|
2042 |
msgstr ""
|
2043 |
|
2207 |
#~ msgid "OGP default image"
|
2208 |
#~ msgstr "OGP デフォルト画像"
|
2209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2210 |
#~ msgid "Home page"
|
2211 |
#~ msgstr "トップページ"
|
2212 |
|
packages.php
CHANGED
@@ -274,7 +274,7 @@ $required_packages[] = array(
|
|
274 |
),
|
275 |
),
|
276 |
'default' => true,
|
277 |
-
'include' => '
|
278 |
);
|
279 |
|
280 |
/*-------------------------------------------*/
|
274 |
),
|
275 |
),
|
276 |
'default' => true,
|
277 |
+
'include' => 'contact-section/contact-section.php',
|
278 |
);
|
279 |
|
280 |
/*-------------------------------------------*/
|
plugins/contact-section/contact-section.php
ADDED
@@ -0,0 +1,474 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* VkExUnit contact_section.php
|
4 |
+
* display contaxt box at after content of page.
|
5 |
+
*
|
6 |
+
* @package VkExUnit
|
7 |
+
* @author shoji imamura<imamura@vektor-inc.co.jp>
|
8 |
+
* @since 26/Jun/2015
|
9 |
+
*/
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
/*-------------------------------------------*/
|
14 |
+
/* load files
|
15 |
+
/*-------------------------------------------*/
|
16 |
+
/* vExUnit_Contact
|
17 |
+
public static function instance() {
|
18 |
+
private function __construct() {
|
19 |
+
protected function run_init() {
|
20 |
+
public function set_content_loopend( $query ) {
|
21 |
+
public function activate_metavox( $flag ) {
|
22 |
+
public function options_init() {
|
23 |
+
public static function get_option() {
|
24 |
+
public function options_page() {
|
25 |
+
public function option_sanitaize( $option ) {
|
26 |
+
public function render_meta_box() {
|
27 |
+
public function save_custom_field_postdata( $post_id ) {
|
28 |
+
public static function is_my_turn() {
|
29 |
+
public function set_content( $content ) {
|
30 |
+
public static function render_contact_section_html() {
|
31 |
+
/*-------------------------------------------*/
|
32 |
+
/* Contact Section Widget
|
33 |
+
/*-------------------------------------------*/
|
34 |
+
|
35 |
+
|
36 |
+
/*-------------------------------------------*/
|
37 |
+
/* load files
|
38 |
+
/*-------------------------------------------*/
|
39 |
+
require_once 'customizer.php';
|
40 |
+
|
41 |
+
/*-------------------------------------------*/
|
42 |
+
/* vExUnit_Contact
|
43 |
+
/*-------------------------------------------*/
|
44 |
+
class vExUnit_Contact {
|
45 |
+
|
46 |
+
// singleton instance
|
47 |
+
private static $instance;
|
48 |
+
|
49 |
+
public static function instance() {
|
50 |
+
if ( isset( self::$instance ) ) {
|
51 |
+
return self::$instance;
|
52 |
+
}
|
53 |
+
|
54 |
+
self::$instance = new vExUnit_Contact;
|
55 |
+
self::$instance->run_init();
|
56 |
+
return self::$instance;
|
57 |
+
}
|
58 |
+
|
59 |
+
private function __construct() {
|
60 |
+
/***
|
61 |
+
* do noting
|
62 |
+
***/
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
protected function run_init() {
|
67 |
+
add_action( 'vkExUnit_package_init', array( $this, 'options_init' ) );
|
68 |
+
add_action( 'save_post', array( $this, 'save_custom_field_postdata' ) );
|
69 |
+
add_shortcode( 'vkExUnit_contact_section', array( $this, 'shortcode' ) );
|
70 |
+
add_filter( 'veu_content_meta_box_activation', array( $this, 'activate_metavox' ), 10, 1 );
|
71 |
+
add_action( 'veu_content_meta_box_content', array( $this, 'render_meta_box' ) );
|
72 |
+
|
73 |
+
if ( veu_content_filter_state() == 'content' ) {
|
74 |
+
add_filter( 'the_content', array( $this, 'set_content' ), 10, 1 );
|
75 |
+
} else {
|
76 |
+
add_action( 'loop_end', array( $this, 'set_content_loopend' ), 10, 1 );
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
public function set_content_loopend( $query ) {
|
82 |
+
if ( ! $query->is_main_query() ) {
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
echo self::render_contact_section_html();
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
public function activate_metavox( $flag ) {
|
90 |
+
return true;
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
public function options_init() {
|
95 |
+
vkExUnit_register_setting(
|
96 |
+
__( 'Contact Information', 'vkExUnit' ), // tab label.
|
97 |
+
'vkExUnit_contact', // name attr
|
98 |
+
array( $this, 'option_sanitaize' ), // sanitaise function name
|
99 |
+
array( $this, 'options_page' ) // setting_page function name
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
+
public static function get_option() {
|
105 |
+
$default = array(
|
106 |
+
'contact_txt' => __( 'Please feel free to inquire.', 'vkExUnit' ),
|
107 |
+
'tel_number' => '000-000-0000',
|
108 |
+
'contact_time' => __( 'Office hours 9:00 - 18:00 [ Weekdays except holidays ]', 'vkExUnit' ),
|
109 |
+
'contact_link' => '',
|
110 |
+
'button_text' => '',
|
111 |
+
'button_text_small' => '',
|
112 |
+
'short_text' => __( 'Contact us', 'vkExUnit' ),
|
113 |
+
'contact_image' => '',
|
114 |
+
'contact_html' => '',
|
115 |
+
);
|
116 |
+
$option = get_option( 'vkExUnit_contact' );
|
117 |
+
return wp_parse_args( $option, $default );
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
public function options_page() {
|
122 |
+
$options = self::get_option();
|
123 |
+
?>
|
124 |
+
<h3><?php _e( 'Contact Information', 'vkExUnit' ); ?></h3>
|
125 |
+
<div id="meta_description" class="sectionBox">
|
126 |
+
<?php _e( 'Contents input here are displayed on an "Contact Button" widget and each fixed page.', 'vkExUnit' ); ?>
|
127 |
+
<br/>
|
128 |
+
<?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.', 'vkExUnit' ); ?>
|
129 |
+
|
130 |
+
<table class="form-table">
|
131 |
+
<tr>
|
132 |
+
<th scope="row"><label for="contact_txt"><?php _e( 'Message', 'vkExUnit' ); ?></label></th>
|
133 |
+
<td>
|
134 |
+
<input type="text" name="vkExUnit_contact[contact_txt]" id="contact_txt" value="<?php echo esc_attr( $options['contact_txt'] ); ?>" style="width:50%;" /><br />
|
135 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?><?php _e( 'Please feel free to inquire.', 'vkExUnit' ); ?></span>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
<tr>
|
139 |
+
<th scope="row"><label for="tel_number"><?php _e( 'Phone number', 'vkExUnit' ); ?></label></th>
|
140 |
+
<td>
|
141 |
+
<input type="text" name="vkExUnit_contact[tel_number]" id="tel_number" value="<?php echo esc_attr( $options['tel_number'] ); ?>" style="width:50%;" /><br />
|
142 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?>000-000-0000</span>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
<tr>
|
146 |
+
<th scope="row"><label for="contact_time"><?php _e( 'Office hours', 'vkExUnit' ); ?></label></th>
|
147 |
+
<td>
|
148 |
+
<textarea cols="20" rows="2" name="vkExUnit_contact[contact_time]" id="contact_time" value="" style="width:50%;" /><?php echo esc_attr( $options['contact_time'] ); ?></textarea><br />
|
149 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?><?php _e( 'Office hours', 'vkExUnit' ); ?> 9:00 - 18:00 [ <?php _e( 'Weekdays except holidays', 'vkExUnit' ); ?> ]</span>
|
150 |
+
</td>
|
151 |
+
</tr>
|
152 |
+
<!-- he URL of contact page -->
|
153 |
+
<tr>
|
154 |
+
<th scope="row"><label for="contact_link"><?php _e( 'The contact page URL', 'vkExUnit' ); ?></label></th>
|
155 |
+
<td>
|
156 |
+
<input type="text" name="vkExUnit_contact[contact_link]" id="contact_link" value="<?php echo esc_attr( $options['contact_link'] ); ?>" class="width-500" /><br />
|
157 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?>http://www.********.co.jp/contact/ <?php _e( 'or', 'vkExUnit' ); ?> /******/</span><br />
|
158 |
+
<?php _e( '* If you fill in the blank, widget\'s contact button does not appear.', 'vkExUnit' ); ?>
|
159 |
+
</td>
|
160 |
+
</tr>
|
161 |
+
<tr>
|
162 |
+
<th scope="row"><label for="sub_sitename"><?php _e( 'Contact button Text', 'vkExUnit' ); ?></label></th>
|
163 |
+
<td>
|
164 |
+
<textarea cols="20" rows="2" name="vkExUnit_contact[button_text]" id="sub_sitename" value="" style="width:50%;" /><?php echo esc_attr( $options['button_text'] ); ?></textarea><br />
|
165 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?><?php _e( 'Contact Us from email.', 'vkExUnit' ); ?></span>
|
166 |
+
</td>
|
167 |
+
</tr>
|
168 |
+
<!-- Company address -->
|
169 |
+
<tr>
|
170 |
+
<th scope="row"><label for="button_text_small"><?php _e( 'Contact button text( sub )', 'vkExUnit' ); ?></label></th>
|
171 |
+
<td>
|
172 |
+
<textarea cols="20" rows="2" name="vkExUnit_contact[button_text_small]" id="button_text_small" value="" style="width:50%;" /><?php echo $options['button_text_small']; ?></textarea><br />
|
173 |
+
<span><?php _e( 'ex) ', 'vkExUnit' ); ?>
|
174 |
+
<?php _e( 'Email contact form', 'vkExUnit' ); ?>
|
175 |
+
</span>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
<tr>
|
179 |
+
<th scope="row"><label for="widget_text"><?php _e( 'Contact button short text for side widget', 'vkExUnit' ); ?></label></th>
|
180 |
+
<td>
|
181 |
+
<?php $short_text = ( isset( $options['short_text'] ) && $options['short_text'] ) ? $options['short_text'] : ''; ?>
|
182 |
+
<input type="text" name="vkExUnit_contact[short_text]" id="widget_text" value="<?php echo esc_attr( $short_text ); ?>" style="width:50%;" /><br />
|
183 |
+
<span><?php _e( 'This will used to "Contact Button" widget.', 'vkExUnit' ); ?></span>
|
184 |
+
</td>
|
185 |
+
</tr>
|
186 |
+
</table>
|
187 |
+
<button onclick="javascript:jQuery('#vkEx_contact_info').toggle(); return false;" class="button"><?php _e( 'Advanced Setting', 'vkExUnit' ); ?></button>
|
188 |
+
<table class="form-table" id="vkEx_contact_info" style="
|
189 |
+
<?php
|
190 |
+
if ( ! $options['contact_image'] and ! $options['contact_html'] ) {
|
191 |
+
echo 'display:none;';
|
192 |
+
}
|
193 |
+
?>
|
194 |
+
">
|
195 |
+
<tr>
|
196 |
+
<th><?php _e( 'Inquiry Banner image', 'vkExUnit' ); ?></th>
|
197 |
+
<td><input type="text" name="vkExUnit_contact[contact_image]" id="contact_image" value="<?php echo $options['contact_image']; ?>" style="width:60%;" />
|
198 |
+
<button id="media_src_contact_image" class="media_btn button button-default"><?php _e( 'Select Image' ); ?></button>
|
199 |
+
<p><?php _e( 'Display the image instead of the above inquiry information', 'vkExUnit' ); ?><p>
|
200 |
+
</td>
|
201 |
+
</tr>
|
202 |
+
<tr>
|
203 |
+
<th><?php _e( 'Display HTML message instead of the standard', 'vkExUnit' ); ?></th>
|
204 |
+
<td><textarea cols="20" rows="5" name="vkExUnit_contact[contact_html]" id="contact_html" value="" style="width:100%;"><?php echo $options['contact_html']; ?></textarea>
|
205 |
+
<p><?php _e( 'HTML takes precedence over image', 'vkExUnit' ); ?></p>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
</table>
|
209 |
+
<?php submit_button(); ?>
|
210 |
+
</div>
|
211 |
+
<?php
|
212 |
+
}
|
213 |
+
|
214 |
+
public function option_sanitaize( $option ) {
|
215 |
+
$option['contact_html'] = stripslashes( $option['contact_html'] );
|
216 |
+
return $option;
|
217 |
+
}
|
218 |
+
|
219 |
+
|
220 |
+
public function render_meta_box() {
|
221 |
+
$enable = get_post_meta( get_the_id(), 'vkExUnit_contact_enable', true );
|
222 |
+
?>
|
223 |
+
<div>
|
224 |
+
<input type="hidden" name="_nonce_vkExUnit_contact" id="_nonce_vkExUnit__custom_auto_eyecatch_noonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" />
|
225 |
+
<label for="vkExUnit_contact">
|
226 |
+
<input type="checkbox" id="vkExUnit_contact" name="vkExUnit_contact_enable"<?php echo ( $enable ) ? ' checked' : ''; ?> />
|
227 |
+
<?php _e( 'Display Contact Section', 'vkExUnit' ); ?>
|
228 |
+
</label>
|
229 |
+
</div>
|
230 |
+
<?php
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
+
public function save_custom_field_postdata( $post_id ) {
|
235 |
+
$childPageIndex = isset( $_POST['_nonce_vkExUnit_contact'] ) ? htmlspecialchars( $_POST['_nonce_vkExUnit_contact'] ) : null;
|
236 |
+
|
237 |
+
if ( ! wp_verify_nonce( $childPageIndex, plugin_basename( __FILE__ ) ) ) {
|
238 |
+
return $post_id;
|
239 |
+
}
|
240 |
+
|
241 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
242 |
+
return $post_id;
|
243 |
+
}
|
244 |
+
|
245 |
+
$data = isset( $_POST['vkExUnit_contact_enable'] ) ? htmlspecialchars( $_POST['vkExUnit_contact_enable'] ) : null;
|
246 |
+
|
247 |
+
if ( 'page' == $data ) {
|
248 |
+
if ( ! current_user_can( 'edit_page', $post_id ) ) {
|
249 |
+
return $post_id;
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( '' == get_post_meta( $post_id, 'vkExUnit_contact_enable' ) ) {
|
254 |
+
add_post_meta( $post_id, 'vkExUnit_contact_enable', $data, true );
|
255 |
+
} elseif ( $data != get_post_meta( $post_id, 'vkExUnit_contact_enable' ) ) {
|
256 |
+
update_post_meta( $post_id, 'vkExUnit_contact_enable', $data );
|
257 |
+
} elseif ( '' == $data ) {
|
258 |
+
delete_post_meta( $post_id, 'vkExUnit_contact_enable' );
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
|
263 |
+
public static function is_my_turn() {
|
264 |
+
// 固定ページウィジェットの場合出力しない
|
265 |
+
global $is_pagewidget;
|
266 |
+
if ( $is_pagewidget ) {
|
267 |
+
return false;
|
268 |
+
}
|
269 |
+
|
270 |
+
// 抜粋では表示しない
|
271 |
+
if ( vkExUnit_is_excerpt() ) {
|
272 |
+
return false;
|
273 |
+
}
|
274 |
+
|
275 |
+
// 固定ページ以外では表示しない
|
276 |
+
if ( get_post_type() == 'page' ) {
|
277 |
+
// 固定ページで問い合わせ先情報にチェックが入っている時
|
278 |
+
if ( get_post_meta( get_the_id(), 'vkExUnit_contact_enable', true ) ) {
|
279 |
+
return true;
|
280 |
+
}
|
281 |
+
} else {
|
282 |
+
return false;
|
283 |
+
}
|
284 |
+
|
285 |
+
}
|
286 |
+
|
287 |
+
public function set_content( $content ) {
|
288 |
+
if ( ! self::is_my_turn() ) {
|
289 |
+
return $content;
|
290 |
+
}
|
291 |
+
|
292 |
+
$content .= '[vkExUnit_contact_section]';
|
293 |
+
return $content;
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
/*-------------------------------------------*/
|
298 |
+
/* contact bottom html
|
299 |
+
/*-------------------------------------------*/
|
300 |
+
|
301 |
+
public static function render_contact_section_html() {
|
302 |
+
$options = self::get_option();
|
303 |
+
$cont = '';
|
304 |
+
$cont .= '<section class="veu_contact veu_contentAddSection">';
|
305 |
+
|
306 |
+
if ( $options['contact_html'] ) {
|
307 |
+
$cont .= $options['contact_html'];
|
308 |
+
|
309 |
+
} elseif ( $options['contact_image'] ) {
|
310 |
+
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '">';
|
311 |
+
$cont .= '<img src="' . esc_attr( $options['contact_image'] ) . '" alt="contact_txt">';
|
312 |
+
$cont .= '</a>';
|
313 |
+
|
314 |
+
} else {
|
315 |
+
$cont .= '<div class="contact_frame">';
|
316 |
+
$cont .= '<p class="contact_txt">';
|
317 |
+
$cont .= '<span class="contact_txt_catch">' . nl2br( esc_textarea( $options['contact_txt'] ) ) . '</span>';
|
318 |
+
if ( wp_is_mobile() ) {
|
319 |
+
$cont .= '<a href="tel:' . $options['tel_number'] . '" >';
|
320 |
+
}
|
321 |
+
$cont .= '<span class="contact_txt_tel veu_color_txt_key">' . $options['tel_number'] . '</span>';
|
322 |
+
if ( wp_is_mobile() ) {
|
323 |
+
$cont .= '</a>';
|
324 |
+
}
|
325 |
+
$cont .= '<span class="contact_txt_time">' . nl2br( esc_textarea( $options['contact_time'] ) ) . '</span>';
|
326 |
+
$cont .= '</p>';
|
327 |
+
|
328 |
+
if ( $options['contact_link'] && $options['button_text'] ) {
|
329 |
+
$cont .= '<a href="' . $options['contact_link'] . '" class="btn btn-primary btn-lg contact_bt">';
|
330 |
+
$cont .= '<span class="contact_bt_txt">' . wp_kses_post( $options['button_text'] ) . '</span>';
|
331 |
+
|
332 |
+
if ( isset( $options['button_text_small'] ) && $options['button_text_small'] ) {
|
333 |
+
$cont .= '<span class="contact_bt_subTxt">' . $options['button_text_small'] . '</span>';
|
334 |
+
}
|
335 |
+
|
336 |
+
$cont .= '</a>';
|
337 |
+
}
|
338 |
+
$cont .= '</div>';
|
339 |
+
}
|
340 |
+
$cont .= '</section>';
|
341 |
+
if ( current_user_can( 'edit_theme_options' ) && ! is_customize_preview() ) {
|
342 |
+
$cont .= '<div class="veu_adminEdit"><a href="' . admin_url() . 'admin.php?page=vkExUnit_main_setting#vkExUnit_contact" class="btn btn-default" target="_blank">' . __( 'Edit contact information', 'vkExUnit' ) . '</a></div>';
|
343 |
+
}
|
344 |
+
|
345 |
+
$cont = apply_filters( 'vkExUnit_contact_custom', $cont );
|
346 |
+
|
347 |
+
return $cont;
|
348 |
+
}
|
349 |
+
|
350 |
+
/*-------------------------------------------*/
|
351 |
+
/* widget html
|
352 |
+
/*-------------------------------------------*/
|
353 |
+
|
354 |
+
public static function render_widget_contact_btn_html() {
|
355 |
+
$options = self::get_option();
|
356 |
+
$cont = '';
|
357 |
+
|
358 |
+
if ( ( isset( $options['contact_link'] ) && $options['contact_link'] )
|
359 |
+
&& ( isset( $options['short_text'] ) && $options['short_text'] )
|
360 |
+
) {
|
361 |
+
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '" class="btn btn-primary btn-lg btn-block contact_bt"><span class="contact_bt_txt">';
|
362 |
+
$cont .= $options['short_text'];
|
363 |
+
$cont .= '</span>';
|
364 |
+
if ( isset( $options['button_text_small'] ) && $options['button_text_small'] ) {
|
365 |
+
$cont .= '<span class="contact_bt_subTxt contact_bt_subTxt_side">' . $options['button_text_small'] . '</span>';
|
366 |
+
}
|
367 |
+
$cont .= '</a>';
|
368 |
+
}
|
369 |
+
if ( current_user_can( 'edit_theme_options' ) ) {
|
370 |
+
$cont .= '<div class="veu_adminEdit"><a href="' . admin_url() . 'admin.php?page=vkExUnit_main_setting#vkExUnit_contact" class="btn btn-default" target="_blank">' . __( 'Edit contact information', 'vkExUnit' ) . '</a></div>';
|
371 |
+
}
|
372 |
+
return $cont;
|
373 |
+
}
|
374 |
+
|
375 |
+
|
376 |
+
public function shortcode() {
|
377 |
+
return self::render_contact_section_html();
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
vExUnit_Contact::instance();
|
382 |
+
|
383 |
+
|
384 |
+
/*-------------------------------------------*/
|
385 |
+
/* Contact Button Widget
|
386 |
+
/*-------------------------------------------*/
|
387 |
+
class WP_Widget_vkExUnit_contact_link extends WP_Widget {
|
388 |
+
|
389 |
+
|
390 |
+
function __construct() {
|
391 |
+
$widget_name = veu_get_short_name() . '_' . __( 'Contact Button', 'vkExUnit' );
|
392 |
+
$widget_description = __( 'Display contact button.', 'vkExUnit' );
|
393 |
+
$widget_description .= ' ( ' . sprintf( __( 'It is necessary to set the "%s" -> "Contact Information" section in "Main setting" page.', 'vkExUnit' ), veu_get_little_short_name() ) . ' ) ';
|
394 |
+
parent::__construct(
|
395 |
+
'vkExUnit_contact',
|
396 |
+
$widget_name,
|
397 |
+
array(
|
398 |
+
'description' => $widget_description,
|
399 |
+
)
|
400 |
+
);
|
401 |
+
}
|
402 |
+
|
403 |
+
|
404 |
+
function widget( $args, $instance ) {
|
405 |
+
echo $args['before_widget'];
|
406 |
+
echo '<div class="veu_contact">';
|
407 |
+
echo vExUnit_Contact::render_widget_contact_btn_html();
|
408 |
+
echo '</div>';
|
409 |
+
echo $args['after_widget'];
|
410 |
+
}
|
411 |
+
|
412 |
+
|
413 |
+
function update( $new_instance, $old_instance ) {
|
414 |
+
return $new_instance;
|
415 |
+
}
|
416 |
+
|
417 |
+
|
418 |
+
function form( $instance ) {
|
419 |
+
echo '<div style="padding:1em 0;">';
|
420 |
+
$widget_description = __( 'Display contact button', 'vkExUnit' );
|
421 |
+
$widget_description .= ' ( ' . sprintf( __( 'It is necessary to set the "%s" -> "Contact Information" section in "Main setting" page.', 'vkExUnit' ), veu_get_little_short_name() ) . ' ) ';
|
422 |
+
echo $widget_description;
|
423 |
+
echo '</div>';
|
424 |
+
return $instance;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
add_action( 'widgets_init', create_function( '', 'return register_widget("WP_Widget_vkExUnit_contact_link");' ) );
|
429 |
+
|
430 |
+
/*-------------------------------------------*/
|
431 |
+
/* Contact Section Widget
|
432 |
+
/*-------------------------------------------*/
|
433 |
+
class WP_Widget_vkExUnit_Contact_Section extends WP_Widget {
|
434 |
+
|
435 |
+
|
436 |
+
function __construct() {
|
437 |
+
|
438 |
+
$widget_name = veu_get_short_name() . '_' . __( 'Contact Section HTML', 'vkExUnit' );
|
439 |
+
$widget_description = __( 'Display Phone number and contact button etc.', 'vkExUnit' );
|
440 |
+
$widget_description .= ' ( ' . sprintf( __( 'It is necessary to set the "%s" -> "Contact Information" section in "Main setting" page.', 'vkExUnit' ), veu_get_little_short_name() ) . ' ) ';
|
441 |
+
|
442 |
+
parent::__construct(
|
443 |
+
'vkExUnit_contact_section',
|
444 |
+
$widget_name,
|
445 |
+
array(
|
446 |
+
'description' => $widget_description,
|
447 |
+
)
|
448 |
+
);
|
449 |
+
}
|
450 |
+
|
451 |
+
|
452 |
+
function widget( $args, $instance ) {
|
453 |
+
echo $args['before_widget'];
|
454 |
+
echo '<div class="veu_contact">';
|
455 |
+
echo vExUnit_Contact::render_contact_section_html();
|
456 |
+
echo '</div>';
|
457 |
+
echo $args['after_widget'];
|
458 |
+
}
|
459 |
+
|
460 |
+
|
461 |
+
function update( $new_instance, $old_instance ) {
|
462 |
+
return $new_instance;
|
463 |
+
}
|
464 |
+
|
465 |
+
|
466 |
+
function form( $instance ) {
|
467 |
+
echo '<div style="padding:1em 0;">';
|
468 |
+
_e( sprintf( __( '*It is necessary to set the "%s" -> "Contact Information" section in "Main setting" page.', 'vkExUnit' ), veu_get_little_short_name() ) );
|
469 |
+
echo '</div>';
|
470 |
+
return $instance;
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
add_action( 'widgets_init', create_function( '', 'return register_widget("WP_Widget_vkExUnit_Contact_Section");' ) );
|
plugins/contact-section/customizer.php
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*-------------------------------------------*/
|
3 |
+
/* Add Customize Panel
|
4 |
+
/*-------------------------------------------*/
|
5 |
+
// カスタマイザーで「ExUnit設定」のパネルが表示されるようにする
|
6 |
+
add_filter( 'veu_customize_panel_activation', 'veu_customize_panel_activation_contact' );
|
7 |
+
function veu_customize_panel_activation_contact() {
|
8 |
+
return true;
|
9 |
+
}
|
10 |
+
|
11 |
+
// カスタマイズ関数を実行
|
12 |
+
// if ( apply_filters('veu_customize_panel_activation', false ) ){
|
13 |
+
add_action( 'customize_register', 'veu_customize_register_contact' );
|
14 |
+
// }
|
15 |
+
|
16 |
+
function veu_customize_register_contact( $wp_customize ) {
|
17 |
+
|
18 |
+
/*-------------------------------------------*/
|
19 |
+
/* Contact Settings
|
20 |
+
/*-------------------------------------------*/
|
21 |
+
$wp_customize->add_section(
|
22 |
+
'veu_contact_setting', array(
|
23 |
+
'title' => __( 'Contact Settings', 'vkExUnit' ),
|
24 |
+
'priority' => 1000,
|
25 |
+
'panel' => 'veu_setting',
|
26 |
+
)
|
27 |
+
);
|
28 |
+
|
29 |
+
// Message
|
30 |
+
$wp_customize->add_setting(
|
31 |
+
'vkExUnit_contact[contact_txt]', array(
|
32 |
+
'default' => __( 'Please feel free to inquire.', 'vkExUnit' ),
|
33 |
+
'type' => 'option', // 保存先 option or theme_mod
|
34 |
+
'capability' => 'edit_theme_options',
|
35 |
+
'sanitize_callback' => 'sanitize_text_field',
|
36 |
+
)
|
37 |
+
);
|
38 |
+
|
39 |
+
$wp_customize->add_control(
|
40 |
+
'contact_txt', array(
|
41 |
+
'label' => __( 'Message', 'vkExUnit' ),
|
42 |
+
'section' => 'veu_contact_setting',
|
43 |
+
'settings' => 'vkExUnit_contact[contact_txt]',
|
44 |
+
'type' => 'text',
|
45 |
+
'priority' => 1,
|
46 |
+
)
|
47 |
+
);
|
48 |
+
|
49 |
+
// Phone number
|
50 |
+
$wp_customize->add_setting(
|
51 |
+
'vkExUnit_contact[tel_number]', array(
|
52 |
+
'default' => '000-000-0000',
|
53 |
+
'type' => 'option', // 保存先 option or theme_mod
|
54 |
+
'capability' => 'edit_theme_options',
|
55 |
+
'sanitize_callback' => 'sanitize_text_field',
|
56 |
+
)
|
57 |
+
);
|
58 |
+
|
59 |
+
$wp_customize->add_control(
|
60 |
+
'tel_number', array(
|
61 |
+
'label' => __( 'Phone number', 'vkExUnit' ),
|
62 |
+
'section' => 'veu_contact_setting',
|
63 |
+
'settings' => 'vkExUnit_contact[tel_number]',
|
64 |
+
'type' => 'text',
|
65 |
+
'priority' => 1,
|
66 |
+
)
|
67 |
+
);
|
68 |
+
|
69 |
+
// Office hours
|
70 |
+
$wp_customize->add_setting(
|
71 |
+
'vkExUnit_contact[contact_time]', array(
|
72 |
+
'default' => __( 'Office hours 9:00 - 18:00 [ Weekdays except holidays ]', 'vkExUnit' ),
|
73 |
+
'type' => 'option', // 保存先 option or theme_mod
|
74 |
+
'capability' => 'edit_theme_options',
|
75 |
+
'sanitize_callback' => 'sanitize_text_field',
|
76 |
+
)
|
77 |
+
);
|
78 |
+
|
79 |
+
$wp_customize->add_control(
|
80 |
+
'contact_time', array(
|
81 |
+
'label' => __( 'Office hours', 'vkExUnit' ),
|
82 |
+
'section' => 'veu_contact_setting',
|
83 |
+
'settings' => 'vkExUnit_contact[contact_time]',
|
84 |
+
'type' => 'text',
|
85 |
+
'priority' => 1,
|
86 |
+
)
|
87 |
+
);
|
88 |
+
|
89 |
+
// The contact page URL
|
90 |
+
$wp_customize->add_setting(
|
91 |
+
'vkExUnit_contact[contact_link]', array(
|
92 |
+
'default' => '',
|
93 |
+
'type' => 'option', // 保存先 option or theme_mod
|
94 |
+
'capability' => 'edit_theme_options',
|
95 |
+
'sanitize_callback' => 'sanitize_text_field',
|
96 |
+
)
|
97 |
+
);
|
98 |
+
|
99 |
+
$wp_customize->add_control(
|
100 |
+
'contact_link', array(
|
101 |
+
'label' => __( 'The contact page URL', 'vkExUnit' ),
|
102 |
+
'section' => 'veu_contact_setting',
|
103 |
+
'settings' => 'vkExUnit_contact[contact_link]',
|
104 |
+
'type' => 'text',
|
105 |
+
'priority' => 1,
|
106 |
+
)
|
107 |
+
);
|
108 |
+
|
109 |
+
// Contact button Text
|
110 |
+
$wp_customize->add_setting(
|
111 |
+
'vkExUnit_contact[button_text]', array(
|
112 |
+
'default' => '',
|
113 |
+
'type' => 'option', // 保存先 option or theme_mod
|
114 |
+
'capability' => 'edit_theme_options',
|
115 |
+
'sanitize_callback' => 'sanitize_text_field',
|
116 |
+
)
|
117 |
+
);
|
118 |
+
|
119 |
+
$wp_customize->add_control(
|
120 |
+
'button_text', array(
|
121 |
+
'label' => __( 'Contact button Text', 'vkExUnit' ),
|
122 |
+
'section' => 'veu_contact_setting',
|
123 |
+
'settings' => 'vkExUnit_contact[button_text]',
|
124 |
+
'type' => 'text',
|
125 |
+
'priority' => 1,
|
126 |
+
)
|
127 |
+
);
|
128 |
+
|
129 |
+
// Contact button text( sub )
|
130 |
+
$wp_customize->add_setting(
|
131 |
+
'vkExUnit_contact[button_text_small]', array(
|
132 |
+
'default' => '',
|
133 |
+
'type' => 'option', // 保存先 option or theme_mod
|
134 |
+
'capability' => 'edit_theme_options',
|
135 |
+
'sanitize_callback' => 'sanitize_text_field',
|
136 |
+
)
|
137 |
+
);
|
138 |
+
|
139 |
+
$wp_customize->add_control(
|
140 |
+
'button_text_small', array(
|
141 |
+
'label' => __( 'Contact button text( sub )', 'vkExUnit' ),
|
142 |
+
'section' => 'veu_contact_setting',
|
143 |
+
'settings' => 'vkExUnit_contact[button_text_small]',
|
144 |
+
'type' => 'textarea',
|
145 |
+
'priority' => 1,
|
146 |
+
)
|
147 |
+
);
|
148 |
+
|
149 |
+
// Contact button short text for side widget
|
150 |
+
$wp_customize->add_setting(
|
151 |
+
'vkExUnit_contact[short_text]', array(
|
152 |
+
'default' => __( 'Contact us', 'vkExUnit' ),
|
153 |
+
'type' => 'option', // 保存先 option or theme_mod
|
154 |
+
'capability' => 'edit_theme_options',
|
155 |
+
'sanitize_callback' => 'sanitize_text_field',
|
156 |
+
)
|
157 |
+
);
|
158 |
+
|
159 |
+
$wp_customize->add_control(
|
160 |
+
'short_text', array(
|
161 |
+
'label' => __( 'Contact button short text for side widget', 'vkExUnit' ),
|
162 |
+
'section' => 'veu_contact_setting',
|
163 |
+
'settings' => 'vkExUnit_contact[short_text]',
|
164 |
+
'type' => 'text',
|
165 |
+
'priority' => 1,
|
166 |
+
)
|
167 |
+
);
|
168 |
+
|
169 |
+
// image up load
|
170 |
+
$wp_customize->add_setting(
|
171 |
+
'vkExUnit_contact[contact_image]', array(
|
172 |
+
'default' => '',
|
173 |
+
'type' => 'option',
|
174 |
+
'capability' => 'edit_theme_options',
|
175 |
+
'sanitize_callback' => 'esc_url_raw',
|
176 |
+
)
|
177 |
+
);
|
178 |
+
|
179 |
+
$wp_customize->add_control(
|
180 |
+
new WP_Customize_Image_Control(
|
181 |
+
$wp_customize,
|
182 |
+
'contact_image',
|
183 |
+
array(
|
184 |
+
'label' => __( 'Inquiry Banner image', 'vkExUnit' ),
|
185 |
+
'section' => 'veu_contact_setting',
|
186 |
+
'settings' => 'vkExUnit_contact[contact_image]',
|
187 |
+
'priority' => 1,
|
188 |
+
'description' => __( 'Display the image instead of the above inquiry information', 'vkExUnit' ),
|
189 |
+
)
|
190 |
+
)
|
191 |
+
);
|
192 |
+
|
193 |
+
// Display HTML message instead of the standard
|
194 |
+
$wp_customize->add_setting(
|
195 |
+
'vkExUnit_contact[contact_html]', array(
|
196 |
+
'default' => '',
|
197 |
+
'type' => 'option', // 保存先 option or theme_mod
|
198 |
+
'capability' => 'edit_theme_options',
|
199 |
+
'sanitize_callback' => 'esc_textarea',
|
200 |
+
)
|
201 |
+
);
|
202 |
+
|
203 |
+
$wp_customize->add_control(
|
204 |
+
'contact_html', array(
|
205 |
+
'label' => __( 'Display HTML message instead of the standard', 'vkExUnit' ),
|
206 |
+
'section' => 'veu_contact_setting',
|
207 |
+
'settings' => 'vkExUnit_contact[contact_html]',
|
208 |
+
'type' => 'textarea',
|
209 |
+
'priority' => 1,
|
210 |
+
'description' => __( 'HTML takes precedence over image', 'vkExUnit' ),
|
211 |
+
)
|
212 |
+
);
|
213 |
+
|
214 |
+
/*-------------------------------------------*/
|
215 |
+
/* Add Edit Customize Link Btn
|
216 |
+
/*-------------------------------------------*/
|
217 |
+
$wp_customize->selective_refresh->add_partial(
|
218 |
+
'vkExUnit_contact[contact_txt]', array(
|
219 |
+
'selector' => '.veu_contact',
|
220 |
+
'render_callback' => '',
|
221 |
+
)
|
222 |
+
);
|
223 |
+
}
|
plugins/related_posts/related_posts.php
CHANGED
@@ -1,23 +1,78 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
function
|
8 |
-
if( ! $query->is_main_query() )
|
9 |
-
|
|
|
|
|
10 |
}
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$posts_array = '';
|
14 |
-
$post_id
|
15 |
|
16 |
$terms = get_the_terms( $post_id, $taxonomy );
|
17 |
|
18 |
-
if ( ! $terms
|
|
|
19 |
$tags = array();
|
20 |
-
foreach ( $terms as $t ) {
|
|
|
21 |
|
22 |
$args_base = array(
|
23 |
'posts_per_page' => $max_show_posts,
|
@@ -32,102 +87,132 @@ function vkExUnit_get_relatedPosts( $post_type = 'post', $taxonomy = 'post_tag',
|
|
32 |
|
33 |
$args = $args_base;
|
34 |
|
35 |
-
$args['tax_query'] = array(
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
|
43 |
$posts_array = get_posts( $args );
|
44 |
|
45 |
-
if ( !is_array( $posts_array ) ) {
|
|
|
46 |
|
47 |
$post_shortage = $max_show_posts - count( $posts_array );
|
48 |
if ( $post_shortage > 0 ) {
|
49 |
-
$args
|
50 |
$args['posts_per_page'] = $post_shortage;
|
51 |
foreach ( $posts_array as $post ) {
|
52 |
$args['post__not_in'][] = $post->ID;
|
53 |
}
|
54 |
-
$args['tax_query'] = array(
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
$related_posts = $posts_array;
|
66 |
return $related_posts;
|
67 |
}
|
68 |
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
global $is_pagewidget;
|
74 |
-
if ( $is_pagewidget )
|
|
|
|
|
75 |
|
76 |
$related_post_types = apply_filters( 'veu_related_post_types', array( 'post' ) );
|
77 |
-
if ( !in_array( get_post_type(), $related_post_types ) )
|
|
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
$related_posts = vkExUnit_get_relatedPosts( $related_post_args['post_type'], $related_post_args['taxonomy'], $related_post_args['max_show_posts'] );
|
88 |
|
89 |
-
if (
|
|
|
90 |
|
91 |
// $posts_count = mb_convert_kana($relatedPostCount, "a", "UTF-8");
|
92 |
if ( $related_posts ) {
|
93 |
-
$relatedPostsHtml
|
94 |
$relatedPostsHtml .= '<aside class="veu_relatedPosts veu_contentAddSection">';
|
95 |
|
96 |
-
$output = get_option( 'vkExUnit_related_options');
|
97 |
-
|
98 |
if ( ! empty( $output['related_title'] ) ) {
|
99 |
$relatedPostTitle = $output['related_title'];
|
100 |
} else {
|
101 |
-
|
102 |
-
$relatedPostTitle = __( 'Related posts','vkExUnit' );
|
103 |
}
|
104 |
// 書き換え用フィルターフック(カスタマイザーで変更出来るが、既存ユーザーで使用しているかもしれないため削除不可)
|
105 |
-
$relatedPostTitle
|
106 |
-
$relatedPostsHtml .= '<h1 class="mainSection-title">'
|
107 |
|
108 |
-
$i
|
109 |
$relatedPostsHtml .= '<div class="row">';
|
110 |
foreach ( $related_posts as $key => $post ) {
|
111 |
-
$relatedPostsHtml .=
|
112 |
-
$relatedPostsHtml .= '<div class="media">';
|
113 |
-
if ( has_post_thumbnail( $post->ID ) ) :
|
114 |
-
$relatedPostsHtml .= '<div class="media-left postList_thumbnail">';
|
115 |
-
$relatedPostsHtml .= '<a href="'.get_the_permalink( $post->ID ).'">';
|
116 |
-
$relatedPostsHtml .= get_the_post_thumbnail( $post->ID,'thumbnail' );
|
117 |
-
$relatedPostsHtml .= '</a>';
|
118 |
-
$relatedPostsHtml .= '</div>';
|
119 |
-
endif;
|
120 |
-
$relatedPostsHtml .= '<div class="media-body">';
|
121 |
-
$relatedPostsHtml .= '<div class="media-heading"><a href="'.get_the_permalink( $post->ID ).'">'.$post->post_title.'</a></div>';
|
122 |
-
$relatedPostsHtml .= '<div><i class="fa fa-calendar"></i> '.get_the_date( false , $post->ID ).'</div>';
|
123 |
-
$relatedPostsHtml .= '</div>';
|
124 |
-
$relatedPostsHtml .= '</div>';
|
125 |
-
$relatedPostsHtml .= '</div>'."\n";
|
126 |
$i++;
|
127 |
} // foreach
|
128 |
$relatedPostsHtml .= '</div>';
|
129 |
$relatedPostsHtml .= '</aside><!-- [ /.relatedPosts ] -->';
|
130 |
-
$content
|
131 |
}
|
132 |
|
133 |
wp_reset_postdata();
|
@@ -135,41 +220,51 @@ function vkExUnit_add_relatedPosts_html( $content ) {
|
|
135 |
return $content;
|
136 |
}
|
137 |
|
138 |
-
|
|
|
|
|
139 |
|
140 |
-
if ( apply_filters('veu_customize_panel_activation', false ) ){
|
141 |
add_action( 'customize_register', 'veu_customize_register_related' );
|
142 |
}
|
143 |
|
144 |
function veu_customize_register_related( $wp_customize ) {
|
145 |
-
|
146 |
-
$wp_customize->add_section(
|
147 |
-
'
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
151 |
// セッティング
|
152 |
-
$wp_customize->add_setting(
|
153 |
-
'
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
'
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
166 |
/*-------------------------------------------*/
|
167 |
-
|
168 |
-
|
169 |
-
$wp_customize->selective_refresh->add_partial(
|
170 |
-
'
|
171 |
-
|
172 |
-
|
|
|
|
|
173 |
}
|
174 |
|
175 |
/*
|
@@ -178,20 +273,20 @@ hook sample
|
|
178 |
|
179 |
add_filter('veu_related_post_types', 'veu_related_post_types_custom');
|
180 |
function veu_related_post_types_custom( $related_post_types ){
|
181 |
-
|
182 |
-
|
183 |
}
|
184 |
|
185 |
add_filter('veu_related_post_args', 'veu_related_post_args_custom');
|
186 |
function veu_related_post_args_custom( $related_post_args ){
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
}
|
196 |
|
197 |
*/
|
1 |
<?php
|
2 |
|
3 |
+
/*-------------------------------------------*/
|
4 |
+
/* 非推奨タグ / Deprecated Tag
|
5 |
+
/*-------------------------------------------*/
|
6 |
+
/* 出力先
|
7 |
+
/*-------------------------------------------*/
|
8 |
+
/* veu_get_related_posts()
|
9 |
+
/*-------------------------------------------*/
|
10 |
+
/* veu_add_related_posts_item_html()
|
11 |
+
/*-------------------------------------------*/
|
12 |
+
/* veu_add_related_posts_html()
|
13 |
+
/*-------------------------------------------*/
|
14 |
+
/* Customizer
|
15 |
+
/*-------------------------------------------*/
|
16 |
+
|
17 |
+
/*-------------------------------------------*/
|
18 |
+
/* 非推奨タグ / Deprecated Tag
|
19 |
+
/*-------------------------------------------*/
|
20 |
+
/*
|
21 |
+
キャメルケースは非推奨なので関数名を変更したが、
|
22 |
+
プラグイン外で関数が使用されているかもしれないので念の為旧関数でも動作するように
|
23 |
+
※ いずれ完全に廃止するので、キャメルケースの関数は外部で使用しないでください。
|
24 |
+
*/
|
25 |
+
function vkExUnit_add_relatedPosts_item_html( $post ) {
|
26 |
+
veu_add_related_posts_item_html( $post );
|
27 |
+
}
|
28 |
+
function vkExUnit_add_related_loopend( $query ) {
|
29 |
+
veu_add_related_loopend( $query );
|
30 |
+
}
|
31 |
+
function vkExUnit_add_relatedPosts_html( $content ) {
|
32 |
+
veu_add_related_posts_html( $content );
|
33 |
+
}
|
34 |
+
function vkExUnit_get_relatedPosts( $post_type = 'post', $taxonomy = 'post_tag', $max_show_posts = 10 ) {
|
35 |
+
veu_get_related_posts( $post_type, $taxonomy, $max_show_posts );
|
36 |
+
}
|
37 |
|
38 |
+
/*-------------------------------------------*/
|
39 |
+
/* 出力先
|
40 |
+
/*-------------------------------------------*/
|
41 |
+
/*
|
42 |
+
loop_end でも出力出来るように一時期していたが、
|
43 |
+
コンテンツエリアのタグより外に出力されるなどで、
|
44 |
+
レイアウトの不具合が発生するので実質的には content にしかならないようになっている。
|
45 |
+
*/
|
46 |
+
if ( veu_content_filter_state() == 'content' ) {
|
47 |
+
add_filter( 'the_content', 'veu_add_related_posts_html', 800, 1 );
|
48 |
+
} else {
|
49 |
+
add_action( 'loop_end', 'veu_add_related_loopend', 800, 1 );
|
50 |
+
}
|
51 |
|
52 |
+
function veu_add_related_loopend( $query ) {
|
53 |
+
if ( ! $query->is_main_query() ) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
echo veu_add_related_posts_html( '' );
|
57 |
}
|
58 |
|
59 |
+
/*-------------------------------------------*/
|
60 |
+
/* veu_get_related_posts()
|
61 |
+
/*-------------------------------------------*/
|
62 |
+
/*
|
63 |
+
関連記事の投稿データを取得
|
64 |
+
*/
|
65 |
+
function veu_get_related_posts( $post_type = 'post', $taxonomy = 'post_tag', $max_show_posts = 10 ) {
|
66 |
$posts_array = '';
|
67 |
+
$post_id = get_the_id();
|
68 |
|
69 |
$terms = get_the_terms( $post_id, $taxonomy );
|
70 |
|
71 |
+
if ( ! $terms || ! is_array( $terms ) ) {
|
72 |
+
return $posts_array; }
|
73 |
$tags = array();
|
74 |
+
foreach ( $terms as $t ) {
|
75 |
+
$tags[] = $t->term_id; }
|
76 |
|
77 |
$args_base = array(
|
78 |
'posts_per_page' => $max_show_posts,
|
87 |
|
88 |
$args = $args_base;
|
89 |
|
90 |
+
$args['tax_query'] = array(
|
91 |
+
array(
|
92 |
+
'taxonomy' => $taxonomy,
|
93 |
+
'field' => 'id',
|
94 |
+
'terms' => $tags,
|
95 |
+
'include_children' => false,
|
96 |
+
'operator' => 'AND',
|
97 |
+
),
|
98 |
+
);
|
99 |
|
100 |
$posts_array = get_posts( $args );
|
101 |
|
102 |
+
if ( ! is_array( $posts_array ) ) {
|
103 |
+
$posts_array = array(); }
|
104 |
|
105 |
$post_shortage = $max_show_posts - count( $posts_array );
|
106 |
if ( $post_shortage > 0 ) {
|
107 |
+
$args = $args_base;
|
108 |
$args['posts_per_page'] = $post_shortage;
|
109 |
foreach ( $posts_array as $post ) {
|
110 |
$args['post__not_in'][] = $post->ID;
|
111 |
}
|
112 |
+
$args['tax_query'] = array(
|
113 |
+
array(
|
114 |
+
'taxonomy' => $taxonomy,
|
115 |
+
'field' => 'id',
|
116 |
+
'terms' => $tags,
|
117 |
+
'include_children' => false,
|
118 |
+
'operator' => 'IN',
|
119 |
+
),
|
120 |
+
);
|
121 |
+
$singletags = get_posts( $args );
|
122 |
+
if ( is_array( $singletags ) && count( $singletags ) ) {
|
123 |
+
$posts_array = array_merge( $posts_array, $singletags ); }
|
124 |
}
|
125 |
|
126 |
$related_posts = $posts_array;
|
127 |
return $related_posts;
|
128 |
}
|
129 |
|
130 |
+
/*-------------------------------------------*/
|
131 |
+
/* veu_add_related_posts_item_html()
|
132 |
+
/*-------------------------------------------*/
|
133 |
+
/*
|
134 |
+
関連記事の1件分のHTML
|
135 |
+
*/
|
136 |
+
function veu_add_related_posts_item_html( $post ) {
|
137 |
+
$post_item_html = '<div class="col-sm-6 relatedPosts_item">';
|
138 |
+
$post_item_html .= '<div class="media">';
|
139 |
+
if ( has_post_thumbnail( $post->ID ) ) :
|
140 |
+
$post_item_html .= '<div class="media-left postList_thumbnail">';
|
141 |
+
$post_item_html .= '<a href="' . get_the_permalink( $post->ID ) . '">';
|
142 |
+
$post_item_html .= get_the_post_thumbnail( $post->ID, 'thumbnail' );
|
143 |
+
$post_item_html .= '</a>';
|
144 |
+
$post_item_html .= '</div>';
|
145 |
+
endif;
|
146 |
+
$post_item_html .= '<div class="media-body">';
|
147 |
+
$post_item_html .= '<div class="media-heading"><a href="' . get_the_permalink( $post->ID ) . '">' . $post->post_title . '</a></div>';
|
148 |
+
$post_item_html .= '<div class="media-date published"><i class="fa fa-calendar"></i> ' . get_the_date( false, $post->ID ) . '</div>';
|
149 |
+
$post_item_html .= '</div>';
|
150 |
+
$post_item_html .= '</div>';
|
151 |
+
$post_item_html .= '</div>' . "\n";
|
152 |
+
$post_item_html = apply_filters( 'veu_related_post_item', $post_item_html );
|
153 |
+
return $post_item_html;
|
154 |
+
}
|
155 |
|
156 |
+
/*-------------------------------------------*/
|
157 |
+
/* veu_add_related_posts_html()
|
158 |
+
/*-------------------------------------------*/
|
159 |
+
/*
|
160 |
+
関連記事のHTML
|
161 |
+
*/
|
162 |
+
function veu_add_related_posts_html( $content ) {
|
163 |
+
|
164 |
+
if ( ! is_single() ) {
|
165 |
+
return $content;
|
166 |
+
}
|
167 |
|
168 |
global $is_pagewidget;
|
169 |
+
if ( $is_pagewidget ) {
|
170 |
+
return $content;
|
171 |
+
}
|
172 |
|
173 |
$related_post_types = apply_filters( 'veu_related_post_types', array( 'post' ) );
|
174 |
+
if ( ! in_array( get_post_type(), $related_post_types ) ) {
|
175 |
+
return $content;
|
176 |
+
}
|
177 |
|
178 |
+
$related_post_args = apply_filters(
|
179 |
+
'veu_related_post_args', array(
|
180 |
+
'post_type' => 'post',
|
181 |
+
'taxonomy' => 'post_tag',
|
182 |
+
'max_show_posts' => 10,
|
183 |
+
)
|
184 |
+
);
|
185 |
+
$related_posts = veu_get_related_posts( $related_post_args['post_type'], $related_post_args['taxonomy'], $related_post_args['max_show_posts'] );
|
|
|
186 |
|
187 |
+
if ( ! $related_posts ) {
|
188 |
+
return $content; }
|
189 |
|
190 |
// $posts_count = mb_convert_kana($relatedPostCount, "a", "UTF-8");
|
191 |
if ( $related_posts ) {
|
192 |
+
$relatedPostsHtml = '<!-- [ .relatedPosts ] -->';
|
193 |
$relatedPostsHtml .= '<aside class="veu_relatedPosts veu_contentAddSection">';
|
194 |
|
195 |
+
$output = get_option( 'vkExUnit_related_options' );
|
196 |
+
// テキストフィールドに値が入っていたら、表示させる。
|
197 |
if ( ! empty( $output['related_title'] ) ) {
|
198 |
$relatedPostTitle = $output['related_title'];
|
199 |
} else {
|
200 |
+
// 何も入っていなかったら既存のタイトルを表示させる。
|
201 |
+
$relatedPostTitle = __( 'Related posts', 'vkExUnit' );
|
202 |
}
|
203 |
// 書き換え用フィルターフック(カスタマイザーで変更出来るが、既存ユーザーで使用しているかもしれないため削除不可)
|
204 |
+
$relatedPostTitle = apply_filters( 'veu_related_post_title', $relatedPostTitle );
|
205 |
+
$relatedPostsHtml .= '<h1 class="mainSection-title">' . $relatedPostTitle . '</h1>';
|
206 |
|
207 |
+
$i = 1;
|
208 |
$relatedPostsHtml .= '<div class="row">';
|
209 |
foreach ( $related_posts as $key => $post ) {
|
210 |
+
$relatedPostsHtml .= veu_add_related_posts_item_html( $post );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
$i++;
|
212 |
} // foreach
|
213 |
$relatedPostsHtml .= '</div>';
|
214 |
$relatedPostsHtml .= '</aside><!-- [ /.relatedPosts ] -->';
|
215 |
+
$content .= $relatedPostsHtml;
|
216 |
}
|
217 |
|
218 |
wp_reset_postdata();
|
220 |
return $content;
|
221 |
}
|
222 |
|
223 |
+
/*-------------------------------------------*/
|
224 |
+
/* Customizer
|
225 |
+
/*-------------------------------------------*/
|
226 |
|
227 |
+
if ( apply_filters( 'veu_customize_panel_activation', false ) ) {
|
228 |
add_action( 'customize_register', 'veu_customize_register_related' );
|
229 |
}
|
230 |
|
231 |
function veu_customize_register_related( $wp_customize ) {
|
232 |
+
// セクション追加
|
233 |
+
$wp_customize->add_section(
|
234 |
+
'veu_related_setting', array(
|
235 |
+
'title' => __( 'Related Settings', 'vkExUnit' ),
|
236 |
+
'priority' => 1000,
|
237 |
+
'panel' => 'veu_setting',
|
238 |
+
)
|
239 |
+
);
|
240 |
// セッティング
|
241 |
+
$wp_customize->add_setting(
|
242 |
+
'vkExUnit_related_options[related_title]', array(
|
243 |
+
'default' => '',
|
244 |
+
'type' => 'option', // 保存先 option or theme_mod
|
245 |
+
'capability' => 'edit_theme_options',
|
246 |
+
'sanitize_callback' => 'sanitize_text_field',
|
247 |
+
)
|
248 |
+
);
|
249 |
+
// コントロール
|
250 |
+
$wp_customize->add_control(
|
251 |
+
'related_title', array(
|
252 |
+
'label' => __( 'Title:', 'vkExUnit' ),
|
253 |
+
'section' => 'veu_related_setting',
|
254 |
+
'settings' => 'vkExUnit_related_options[related_title]',
|
255 |
+
'type' => 'text',
|
256 |
+
'priority' => 1,
|
257 |
+
)
|
258 |
+
);
|
259 |
/*-------------------------------------------*/
|
260 |
+
/* Add Edit Customize Link Btn
|
261 |
+
/*-------------------------------------------*/
|
262 |
+
$wp_customize->selective_refresh->add_partial(
|
263 |
+
'vkExUnit_related_options[related_title]', array(
|
264 |
+
'selector' => '.veu_relatedPosts',
|
265 |
+
'render_callback' => '',
|
266 |
+
)
|
267 |
+
);
|
268 |
}
|
269 |
|
270 |
/*
|
273 |
|
274 |
add_filter('veu_related_post_types', 'veu_related_post_types_custom');
|
275 |
function veu_related_post_types_custom( $related_post_types ){
|
276 |
+
$related_post_types[] = 'item';
|
277 |
+
return $related_post_types;
|
278 |
}
|
279 |
|
280 |
add_filter('veu_related_post_args', 'veu_related_post_args_custom');
|
281 |
function veu_related_post_args_custom( $related_post_args ){
|
282 |
+
if ( get_post_type() == 'item' ) {
|
283 |
+
$related_post_args = array(
|
284 |
+
'post_type' => 'item',
|
285 |
+
'taxonomy' => 'item-category',
|
286 |
+
'max_show_posts' => 10
|
287 |
+
);
|
288 |
+
}
|
289 |
+
return $related_post_args;
|
290 |
}
|
291 |
|
292 |
*/
|
plugins/sns/function_snsBtns.php
CHANGED
@@ -109,6 +109,12 @@ function veu_sns_icon_css( $options )
|
|
109 |
|
110 |
function veu_add_sns_btns( $content ) {
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
// ウィジェットなら表示しない
|
113 |
global $is_pagewidget;
|
114 |
if ( $is_pagewidget ) { return $content; }
|
109 |
|
110 |
function veu_add_sns_btns( $content ) {
|
111 |
|
112 |
+
// 個別の記事で ボタンを表示しない指定にしてある場合
|
113 |
+
global $post;
|
114 |
+
if ( $post->sns_share_botton_hide ){
|
115 |
+
return $content;
|
116 |
+
}
|
117 |
+
|
118 |
// ウィジェットなら表示しない
|
119 |
global $is_pagewidget;
|
120 |
if ( $is_pagewidget ) { return $content; }
|
plugins/sns/hide_controller.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*-------------------------------------------*/
|
3 |
+
/* 著者情報非表示用のメタボックスを追加
|
4 |
+
/*-------------------------------------------*/
|
5 |
+
add_action( 'admin_menu', 'veu_sns_add_hide_meta_box' );
|
6 |
+
|
7 |
+
// add meta_box
|
8 |
+
function veu_sns_add_hide_meta_box() {
|
9 |
+
|
10 |
+
$options = get_option('vkExUnit_sns_options');
|
11 |
+
// ExUnitのメイン設定画面で「シェアボタンを表示する」にチェックが入っていない場合
|
12 |
+
if ( empty( $options['enableSnsBtns']) ){
|
13 |
+
// 何も表示しないで終了
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
// 現在存在する投稿タイプを取得
|
18 |
+
/*-------------------------------------------*/
|
19 |
+
// 取得する条件
|
20 |
+
$args = array(
|
21 |
+
'public' => true,
|
22 |
+
);
|
23 |
+
// タイプの取得を実行
|
24 |
+
$post_types = get_post_types( $args );
|
25 |
+
foreach ( (array) $post_types as $post_type ) {
|
26 |
+
add_meta_box(
|
27 |
+
'sns', // metaboxのID
|
28 |
+
veu_get_little_short_name().' '. __( 'Share bottons', 'vkExUnit' ), // metaboxの表示名
|
29 |
+
'veu_sns_share_botton_hide_meta_box_body', // このメタボックスに表示する中身の関数名
|
30 |
+
$post_type, // このメタボックスをどの投稿タイプで表示するのか?
|
31 |
+
'side' // 表示する位置
|
32 |
+
);
|
33 |
+
} // foreach ( (array) $post_types as $post_type ) {
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
/*-------------------------------------------*/
|
38 |
+
/* 入力フィールドの生成
|
39 |
+
/*-------------------------------------------*/
|
40 |
+
|
41 |
+
function veu_sns_share_botton_hide_meta_box_body(){
|
42 |
+
|
43 |
+
// SNS設定のオプション値を取得
|
44 |
+
$options = veu_get_sns_options();
|
45 |
+
|
46 |
+
// シェアボタンを表示しない投稿タイプの情報を格納する変数を定義
|
47 |
+
$exclude_post_types = array();
|
48 |
+
|
49 |
+
// シェアボタンを表示しない投稿タイプが配列で指定されている場合(チェックが入ってたら)
|
50 |
+
if ( isset( $options['snsBtn_exclude_post_types'] ) && is_array( $options['snsBtn_exclude_post_types'] ) ){
|
51 |
+
|
52 |
+
// $exclude_post_typesに格納
|
53 |
+
foreach ($options['snsBtn_exclude_post_types'] as $key => $value) {
|
54 |
+
$exclude_post_types[] = $key;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
//今編集している投稿の投稿タイプを取得
|
59 |
+
$post_type = get_post_type();
|
60 |
+
|
61 |
+
// 編集中のページの投稿タイプ が シェアボタンを表示しない投稿タイプに含まれている場合
|
62 |
+
if ( in_array( $post_type, $exclude_post_types) ){
|
63 |
+
|
64 |
+
// 「この投稿タイプではシェアボタンを表示しないように設定されています。」を表示
|
65 |
+
echo __('This post type is not set to display the share button.','vkExUnit').'<br>';
|
66 |
+
echo' <a href="'.admin_url('/admin.php?page=vkExUnit_main_setting#vkExUnit_sns_options').'" target="_blank">シェアボタンの表示設定</a>';
|
67 |
+
|
68 |
+
} else {
|
69 |
+
|
70 |
+
// シェアボタンを表示しない設定をするチェックボックスを表示
|
71 |
+
|
72 |
+
//CSRF対策の設定(フォームにhiddenフィールドとして追加するためのnonceを「'noncename__sns_share_botton_hide」として設定)
|
73 |
+
wp_nonce_field( wp_create_nonce(__FILE__), 'noncename__sns_share_botton_hide' );
|
74 |
+
|
75 |
+
global $post;
|
76 |
+
// カスタムフィールド 'sns_share_botton_hide' の値を取得
|
77 |
+
$sns_share_botton_hide = get_post_meta( $post->ID,'sns_share_botton_hide',true );
|
78 |
+
|
79 |
+
// チェックが入っている場合( 表示しない )
|
80 |
+
if ( $sns_share_botton_hide ) {
|
81 |
+
$checked = ' checked';
|
82 |
+
} else {
|
83 |
+
$checked = '';
|
84 |
+
}
|
85 |
+
|
86 |
+
$label = __('Don\'t display share bottons.', 'vkExUnit' );
|
87 |
+
echo '<ul>';
|
88 |
+
echo '<li><label>'.'<input type="checkbox" id="sns_share_botton_hide" name="sns_share_botton_hide" value="true"'.$checked.'> '.$label.'</label></li>';
|
89 |
+
echo '</ul>';
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
/*-------------------------------------------*/
|
96 |
+
/* 入力された値の保存
|
97 |
+
/*-------------------------------------------*/
|
98 |
+
add_action('save_post', 'sns_save_hide_items');
|
99 |
+
|
100 |
+
function sns_save_hide_items($post_id){
|
101 |
+
global $post;
|
102 |
+
|
103 |
+
//設定したnonce を取得(CSRF対策)
|
104 |
+
$noncename__sns_share_botton_hide = isset($_POST['noncename__sns_share_botton_hide']) ? $_POST['noncename__sns_share_botton_hide'] : null;
|
105 |
+
|
106 |
+
//nonce を確認し、値が書き換えられていれば、何もしない(CSRF対策)
|
107 |
+
if(!wp_verify_nonce($noncename__sns_share_botton_hide, wp_create_nonce(__FILE__))) {
|
108 |
+
return $post_id;
|
109 |
+
}
|
110 |
+
|
111 |
+
//自動保存ルーチンかどうかチェック。そうだった場合は何もしない(記事の自動保存処理として呼び出された場合の対策)
|
112 |
+
if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; }
|
113 |
+
|
114 |
+
$field = 'sns_share_botton_hide';
|
115 |
+
$field_value = ( isset( $_POST[$field] ) ) ? $_POST[$field] : '';
|
116 |
+
// データが空だったら入れる
|
117 |
+
if( get_post_meta($post_id, $field ) == ""){
|
118 |
+
add_post_meta($post_id, $field , $field_value, true);
|
119 |
+
// 今入ってる値と違ってたらアップデートする
|
120 |
+
} elseif( $field_value != get_post_meta( $post_id, $field , true)){
|
121 |
+
update_post_meta($post_id, $field , $field_value);
|
122 |
+
// 入力がなかったら消す
|
123 |
+
} elseif( $field_value == "" ){
|
124 |
+
delete_post_meta($post_id, $field , get_post_meta( $post_id, $field , true ));
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
/*-------------------------------------------*/
|
130 |
+
/* 非表示を実行
|
131 |
+
/*-------------------------------------------*/
|
plugins/sns/sns.php
CHANGED
@@ -15,6 +15,8 @@
|
|
15 |
/* Add Customize Panel
|
16 |
/*-------------------------------------------*/
|
17 |
|
|
|
|
|
18 |
|
19 |
function veu_sns_options_init() {
|
20 |
if ( false === veu_get_sns_options() ) {
|
15 |
/* Add Customize Panel
|
16 |
/*-------------------------------------------*/
|
17 |
|
18 |
+
// シェアボタンを表示する設定の読み込み
|
19 |
+
require_once(dirname(__FILE__)."/hide_controller.php");
|
20 |
|
21 |
function veu_sns_options_init() {
|
22 |
if ( false === veu_get_sns_options() ) {
|
plugins_admin/customize-panel.php
CHANGED
@@ -11,12 +11,15 @@
|
|
11 |
* Add Customize Panel
|
12 |
*/
|
13 |
function veu_add_customize_panel(){
|
|
|
14 |
if ( apply_filters('veu_customize_panel_activation', false ) ){
|
|
|
15 |
add_action( 'customize_register', 'veu_customize_register' );
|
16 |
}
|
17 |
}
|
18 |
add_action( 'after_setup_theme', 'veu_add_customize_panel' );
|
19 |
|
|
|
20 |
function veu_customize_register( $wp_customize ) {
|
21 |
/*-------------------------------------------*/
|
22 |
/* ExUnit Panel
|
11 |
* Add Customize Panel
|
12 |
*/
|
13 |
function veu_add_customize_panel(){
|
14 |
+
// 基本的にはカスタマイズ画面で「ExUnit設定」パネルは表示されない
|
15 |
if ( apply_filters('veu_customize_panel_activation', false ) ){
|
16 |
+
// 各機能からカスタマイザー機能を有効化する指定がされてたら、親パネルである「ExUnit設定」を出力する関数を実行する
|
17 |
add_action( 'customize_register', 'veu_customize_register' );
|
18 |
}
|
19 |
}
|
20 |
add_action( 'after_setup_theme', 'veu_add_customize_panel' );
|
21 |
|
22 |
+
// 「ExUnit設定」パネルを出力する関数
|
23 |
function veu_customize_register( $wp_customize ) {
|
24 |
/*-------------------------------------------*/
|
25 |
/* ExUnit Panel
|
plugins_admin/vk-admin/class-vk-admin.php
CHANGED
@@ -9,178 +9,176 @@ https://github.com/vektor-inc/vektor-wp-libraries
|
|
9 |
各プラグインのリポジトリにプルリクエストで結構です。
|
10 |
*/
|
11 |
|
12 |
-
if ( ! class_exists( 'Vk_Admin' ) )
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
static function admin_directory_url (){
|
29 |
-
$vk_admin_url = plugin_dir_url( __FILE__ );
|
30 |
-
return $vk_admin_url;
|
31 |
-
}
|
32 |
-
|
33 |
-
static function admin_common_css (){
|
34 |
-
wp_enqueue_style( 'vk-admin-style', self::admin_directory_url().'css/vk_admin.css', array(), self::$version, 'all' );
|
35 |
-
}
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
}
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
static function admin_scripts( $admin_pages ){
|
46 |
-
foreach ($admin_pages as $key => $value) {
|
47 |
-
$hook = 'admin_print_styles-'.$value;
|
48 |
-
add_action( $hook, array( __CLASS__, 'admin_enqueue_scripts' ) );
|
49 |
}
|
50 |
-
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
/*--------------------------------------------------*/
|
60 |
-
/* admin _ Dashboard Widget
|
61 |
-
/*--------------------------------------------------*/
|
62 |
-
/* admin _ sub
|
63 |
-
/*--------------------------------------------------*/
|
64 |
-
/* admin _ page_frame
|
65 |
-
/*--------------------------------------------------*/
|
66 |
-
|
67 |
-
/*--------------------------------------------------*/
|
68 |
-
/* get_admin_banner
|
69 |
-
/*--------------------------------------------------*/
|
70 |
-
public static function get_admin_banner() {
|
71 |
-
$banner = '';
|
72 |
-
$dir_url = self::admin_directory_url();
|
73 |
-
$lang = ( get_locale() == 'ja' ) ? 'ja' : 'en' ;
|
74 |
-
|
75 |
-
$banner .= '<div class="vk-admin-banner">';
|
76 |
-
$banner .= '<div class="vk-admin-banner-grid">';
|
77 |
-
|
78 |
-
// プラグイン Link Target Controller を有効化していない人にバナーを表示
|
79 |
-
if ( !is_plugin_active('vk-link-target-controller/vk-link-target-controller.php') ){
|
80 |
-
if ( $lang == 'ja' ){
|
81 |
-
$bnr_file_name = 'vk-link-target-controller_bnr.jpg';
|
82 |
-
} else {
|
83 |
-
$bnr_file_name = 'vk-link-target-controller_notxt_bnr.jpg';
|
84 |
}
|
85 |
-
$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>';
|
86 |
}
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
Display" /></a>';
|
97 |
-
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
$theme != 'Lightning' &&
|
103 |
$theme != 'lightning' &&
|
104 |
$theme != 'Lightning-master'
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
if ( $lang == 'ja' && $theme != 'bill-vektor' && $theme != 'bill-vektor-master' ) {
|
114 |
-
$banner .= '<a href="//billvektor.com" target="_blank" class="admin_banner"><img src="'.$dir_url.'images/billvektor_banner.png" alt="見積書・請求書管理用WordPressテーマ" /></a>';
|
115 |
-
}
|
116 |
|
117 |
-
|
118 |
-
$banner .= '<a href="//
|
119 |
-
|
120 |
|
121 |
-
|
122 |
-
$banner .= '<a href="
|
123 |
-
|
124 |
|
125 |
-
|
|
|
|
|
126 |
|
127 |
-
|
128 |
|
129 |
-
|
130 |
|
131 |
-
|
132 |
-
}
|
133 |
|
134 |
-
|
135 |
-
/* get_news_body
|
136 |
-
/*--------------------------------------------------*/
|
137 |
-
public static function get_news_body(){
|
138 |
-
if ( 'ja' == get_locale() ) {
|
139 |
-
return Vk_Admin::get_news_from_rest_api();
|
140 |
}
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
-
}
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
|
151 |
-
|
152 |
-
{
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
$html .= '<ul id="vk-wp-forum" class="vk-metabox-post-list"></ul>';
|
172 |
-
*/
|
173 |
-
$html = apply_filters( 'vk_admin_news_html' , $html );
|
174 |
|
175 |
-
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
|
|
181 |
|
182 |
-
|
183 |
-
|
|
|
184 |
<script>
|
185 |
/*-------------------------------------------*/
|
186 |
/* REST API でお知らせを取得
|
@@ -212,139 +210,147 @@ class Vk_Admin {
|
|
212 |
});
|
213 |
});
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
|
224 |
});
|
225 |
})(jQuery);
|
226 |
</script>
|
227 |
-
<?php
|
228 |
-
}
|
229 |
-
|
230 |
-
/*--------------------------------------------------*/
|
231 |
-
/* get_news_from_rss
|
232 |
-
/* RSS方針で現在は日本語以外でのみ使用
|
233 |
-
/*--------------------------------------------------*/
|
234 |
-
public static function get_news_from_rss() {
|
235 |
-
|
236 |
-
$output = '';
|
237 |
-
|
238 |
-
include_once( ABSPATH . WPINC . '/feed.php' );
|
239 |
-
|
240 |
-
if ( 'ja' == get_locale() ) {
|
241 |
-
$exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://ex-unit.nagoya/ja/feed' );
|
242 |
-
// $exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://www.vektor-inc.co.jp/feed/?category_name=internship' );
|
243 |
-
} else {
|
244 |
-
$exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL', 'https://ex-unit.nagoya/feed' );
|
245 |
}
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
250 |
|
251 |
-
|
252 |
-
$rss = fetch_feed( $feed['feed_url'] );
|
253 |
|
254 |
-
|
255 |
-
$output = '';
|
256 |
|
257 |
-
|
258 |
-
$
|
259 |
-
$
|
260 |
-
|
261 |
-
$
|
|
|
262 |
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
$output .= '</li>';
|
267 |
-
} else {
|
268 |
-
foreach ( $rss_items as $item ) {
|
269 |
-
$test_date = $item->get_local_date();
|
270 |
-
$content = $item->get_content();
|
271 |
-
|
272 |
-
if ( isset( $test_date ) && ! is_null( $test_date ) ) {
|
273 |
-
$item_date = $item->get_date( get_option( 'date_format' ) ) . '<br />'; } else {
|
274 |
-
$item_date = ''; }
|
275 |
-
|
276 |
-
$output .= '<li style="color:#777;">';
|
277 |
-
$output .= $item_date;
|
278 |
-
$output .= '<a href="' . esc_url( $item->get_permalink() ) . '" title="' . $item_date . '" target="_blank">';
|
279 |
-
$output .= esc_html( $item->get_title() );
|
280 |
-
$output .= '</a>';
|
281 |
-
$output .= '</li>';
|
282 |
-
}
|
283 |
-
}
|
284 |
|
285 |
-
|
286 |
-
$
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
-
|
|
|
|
|
|
|
290 |
|
291 |
-
|
292 |
-
|
293 |
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
|
|
315 |
}
|
316 |
-
}
|
317 |
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
|
|
340 |
|
341 |
-
|
342 |
|
343 |
-
|
344 |
<div id="adminContent_sub" class="scrTracking">
|
345 |
<div class="pageLogo"><?php echo $get_logo_html; ?></div>
|
346 |
<?php if ( $get_page_title ) : ?>
|
347 |
-
<h2 class="page_title"><?php echo $get_page_title
|
348 |
<?php endif; ?>
|
349 |
<div class="vk_option_nav">
|
350 |
<ul>
|
@@ -354,29 +360,29 @@ class Vk_Admin {
|
|
354 |
</div><!-- [ /#adminContent_sub ] -->
|
355 |
<?php endif; ?>
|
356 |
|
357 |
-
|
358 |
<div class="pageLogo"><?php echo $get_logo_html; ?></div>
|
359 |
<?php if ( $get_page_title ) : ?>
|
360 |
-
<h1 class="page_title"><?php echo $get_page_title
|
361 |
<?php endif; ?>
|
362 |
<?php endif; ?>
|
363 |
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
|
368 |
-
|
369 |
|
370 |
-
|
371 |
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
|
376 |
-
|
377 |
|
|
|
378 |
}
|
379 |
-
}
|
380 |
} // if ( ! class_exists( 'Vk_Admin' ) )
|
381 |
|
382 |
Vk_Admin::init();
|
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.0.0';
|
21 |
+
|
22 |
+
static function init() {
|
23 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_common_css' ) );
|
24 |
+
add_action( 'wp_dashboard_setup', array( __CLASS__, 'dashboard_widget' ), 1 );
|
25 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
static function admin_directory_url() {
|
28 |
+
$vk_admin_url = plugin_dir_url( __FILE__ );
|
29 |
+
return $vk_admin_url;
|
30 |
+
}
|
|
|
31 |
|
32 |
+
static function admin_common_css() {
|
33 |
+
wp_enqueue_style( 'vk-admin-style', self::admin_directory_url() . 'css/vk_admin.css', array(), self::$version, 'all' );
|
|
|
|
|
|
|
|
|
34 |
}
|
|
|
35 |
|
36 |
+
static function admin_enqueue_scripts() {
|
37 |
+
wp_enqueue_script( 'jquery' );
|
38 |
+
wp_enqueue_media();
|
39 |
+
wp_enqueue_script( 'vk-admin-js', self::admin_directory_url() . 'js/vk_admin.js', array( 'jquery' ), self::$version );
|
40 |
+
}
|
41 |
|
42 |
+
// 管理画面用のjsを読み込むページを配列で指定する
|
43 |
+
// $admin_pages は vk-admin-config.php に記載
|
44 |
+
static function admin_scripts( $admin_pages ) {
|
45 |
+
foreach ( $admin_pages as $key => $value ) {
|
46 |
+
$hook = 'admin_print_styles-' . $value;
|
47 |
+
add_action( $hook, array( __CLASS__, 'admin_enqueue_scripts' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
|
|
49 |
}
|
50 |
|
51 |
+
|
52 |
+
/*--------------------------------------------------*/
|
53 |
+
/* get_admin_banner
|
54 |
+
/*--------------------------------------------------*/
|
55 |
+
/* get_news_body_api
|
56 |
+
/*--------------------------------------------------*/
|
57 |
+
/* get_news_from_rss
|
58 |
+
/*--------------------------------------------------*/
|
59 |
+
/* admin _ Dashboard Widget
|
60 |
+
/*--------------------------------------------------*/
|
61 |
+
/* admin _ sub
|
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 = self::admin_directory_url();
|
72 |
+
$lang = ( get_locale() == 'ja' ) ? 'ja' : 'en';
|
73 |
+
|
74 |
+
$banner .= '<div class="vk-admin-banner">';
|
75 |
+
$banner .= '<div class="vk-admin-banner-grid">';
|
76 |
+
|
77 |
+
// プラグイン Link Target Controller を有効化していない人にバナーを表示
|
78 |
+
if ( ! is_plugin_active( 'vk-link-target-controller/vk-link-target-controller.php' ) ) {
|
79 |
+
if ( $lang == 'ja' ) {
|
80 |
+
$bnr_file_name = 'vk-link-target-controller_bnr.jpg';
|
81 |
+
} else {
|
82 |
+
$bnr_file_name = 'vk-link-target-controller_notxt_bnr.jpg';
|
83 |
+
}
|
84 |
+
$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>';
|
85 |
}
|
86 |
+
|
87 |
+
// プラグイン VK Aost Author Display を有効化していない人にバナーを表示
|
88 |
+
if ( ! is_plugin_active( 'vk-post-author-display/post-author-display.php' ) ) {
|
89 |
+
if ( $lang == 'ja' ) {
|
90 |
+
$bnr_file_name = 'post_author_display_bnr_ja.jpg';
|
91 |
+
} else {
|
92 |
+
$bnr_file_name = 'post_author_display_bnr_en.jpg';
|
93 |
+
}
|
94 |
+
$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
|
95 |
Display" /></a>';
|
96 |
+
}
|
97 |
|
98 |
+
// 現在のテーマを取得
|
99 |
+
$theme = get_template();
|
100 |
+
if (
|
101 |
$theme != 'Lightning' &&
|
102 |
$theme != 'lightning' &&
|
103 |
$theme != 'Lightning-master'
|
104 |
+
) {
|
105 |
+
if ( $lang == 'ja' ) {
|
106 |
+
$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>';
|
107 |
+
} else {
|
108 |
+
$banner .= '<a href="//lightning.nagoya/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/lightning_bnr_en.jpg" alt="lightning_bnr_en" /></a>';
|
109 |
+
} // if ( $lang == 'ja' ) {
|
110 |
+
} // if ( $theme != 'lightning' ) {
|
|
|
|
|
|
|
|
|
111 |
|
112 |
+
if ( $lang == 'ja' && $theme != 'bill-vektor' && $theme != 'bill-vektor-master' ) {
|
113 |
+
$banner .= '<a href="//billvektor.com" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/billvektor_banner.png" alt="見積書・請求書管理用WordPressテーマ" /></a>';
|
114 |
+
}
|
115 |
|
116 |
+
if ( $lang == 'ja' && ! is_plugin_active( 'lightning-skin-jpnstyle/lightning_skin_jpnstyle.php' ) ) {
|
117 |
+
$banner .= '<a href="//lightning.nagoya/ja/plugins/ex_plugin/lightning-jpnstyle" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/jpnstyle-bnr.jpg" alt="" /></a>';
|
118 |
+
}
|
119 |
|
120 |
+
if ( $lang == 'ja' && ! is_plugin_active( 'vk-all-in-one-expansion-unit/vkExUnit.php' ) ) {
|
121 |
+
$banner .= '<a href="https://ex-unit.nagoya/ja/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/ExUnit_bnr.png" alt="" /></a>';
|
122 |
+
}
|
123 |
|
124 |
+
$banner .= '</div>';
|
125 |
|
126 |
+
$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>';
|
127 |
|
128 |
+
$banner .= '</div>';
|
|
|
129 |
|
130 |
+
return apply_filters( 'vk_admin_banner_html', $banner );
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
+
|
133 |
+
/*--------------------------------------------------*/
|
134 |
+
/* get_news_body
|
135 |
+
/*--------------------------------------------------*/
|
136 |
+
public static function get_news_body() {
|
137 |
+
if ( 'ja' == get_locale() ) {
|
138 |
+
return Vk_Admin::get_news_from_rest_api();
|
139 |
+
}
|
140 |
+
// English
|
141 |
+
if ( 'ja' != get_locale() ) {
|
142 |
+
return Vk_Admin::get_news_from_rss();
|
143 |
+
}
|
144 |
}
|
|
|
145 |
|
146 |
+
/*--------------------------------------------------*/
|
147 |
+
/* get_news_body_api
|
148 |
+
/*--------------------------------------------------*/
|
149 |
|
150 |
+
public static function get_news_from_rest_api() {
|
|
|
151 |
|
152 |
+
$html = '<h4 class="vk-metabox-sub-title">';
|
153 |
+
$html .= 'Vektor WordPress Information';
|
154 |
+
$html .= '<a href="https://www.vektor-inc.co.jp/info-cat/vk-wp-info/" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
|
155 |
+
$html .= '</h4>';
|
156 |
+
$html .= '<ul id="vk-wp-info" class="vk-metabox-post-list"></ul>';
|
157 |
|
158 |
+
$html .= '<h4 class="vk-metabox-sub-title">';
|
159 |
+
$html .= 'Vektor WordPress ブログ';
|
160 |
+
$html .= '<a href="https://www.vektor-inc.co.jp/category/wordpress-info/" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
|
161 |
+
$html .= '</h4>';
|
162 |
+
$html .= '<ul id="vk-wp-blog" class="vk-metabox-post-list"></ul>';
|
163 |
|
164 |
+
$html .= '<h4 class="vk-metabox-sub-title">';
|
165 |
+
$html .= 'Vektor WordPress フォーラム';
|
166 |
+
$html .= '<a href="https://forum.vektor-inc.co.jp/" target="_blank" class="vk-metabox-more-link">記事一覧<span aria-hidden="true" class="dashicons dashicons-external"></span></a>';
|
167 |
+
$html .= '</h4>';
|
168 |
+
$html .= '<ul id="vk-wp-forum" class="vk-metabox-post-list"></ul>';
|
|
|
|
|
|
|
169 |
|
170 |
+
$html = apply_filters( 'vk_admin_news_html', $html );
|
171 |
|
172 |
+
add_action( 'admin_footer', array( __CLASS__, 'load_rest_api_js' ) );
|
173 |
+
|
174 |
+
return $html;
|
175 |
+
?>
|
176 |
+
<?php
|
177 |
+
}
|
178 |
|
179 |
+
public static function load_rest_api_js() {
|
180 |
+
|
181 |
+
?>
|
182 |
<script>
|
183 |
/*-------------------------------------------*/
|
184 |
/* REST API でお知らせを取得
|
210 |
});
|
211 |
});
|
212 |
|
213 |
+
$.getJSON( "https://forum.vektor-inc.co.jp/wp-json/wp/v2/topics/?per_page=5",
|
214 |
+
function(results) {
|
215 |
+
$.each(results, function(i, item) {
|
216 |
+
var date = new Date(item.date_gmt);
|
217 |
+
var formate_date = date.toLocaleDateString();
|
218 |
+
$("ul#vk-wp-forum").append('<li><a href="' + item.link + '" target="_blank">' + item.title.rendered + '</a></li>');
|
219 |
+
});
|
220 |
+
});
|
221 |
|
222 |
});
|
223 |
})(jQuery);
|
224 |
</script>
|
225 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
}
|
227 |
|
228 |
+
/*--------------------------------------------------*/
|
229 |
+
/* get_news_from_rss
|
230 |
+
/* RSS方針で現在は日本語以外でのみ使用
|
231 |
+
/*--------------------------------------------------*/
|
232 |
+
public static function get_news_from_rss() {
|
233 |
|
234 |
+
$output = '';
|
|
|
235 |
|
236 |
+
include_once( ABSPATH . WPINC . '/feed.php' );
|
|
|
237 |
|
238 |
+
if ( 'ja' == get_locale() ) {
|
239 |
+
$exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://ex-unit.nagoya/ja/feed' );
|
240 |
+
// $exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL_ja', 'https://www.vektor-inc.co.jp/feed/?category_name=internship' );
|
241 |
+
} else {
|
242 |
+
$exUnit_feed_url = apply_filters( 'vkAdmin_news_RSS_URL', 'https://ex-unit.nagoya/feed' );
|
243 |
+
}
|
244 |
|
245 |
+
$my_feeds = array(
|
246 |
+
array( 'feed_url' => $exUnit_feed_url ),
|
247 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
+
foreach ( $my_feeds as $feed ) {
|
250 |
+
$rss = fetch_feed( $feed['feed_url'] );
|
251 |
+
|
252 |
+
if ( ! is_wp_error( $rss ) ) {
|
253 |
+
$output = '';
|
254 |
+
|
255 |
+
$maxitems = $rss->get_item_quantity( 5 ); //number of news to display (maximum)
|
256 |
+
$rss_items = $rss->get_items( 0, $maxitems );
|
257 |
+
$output .= '<div class="rss-widget">';
|
258 |
+
$output .= '<h4 class="vk-metabox-sub-title">' . apply_filters( 'vk-admin-sub-title-text', 'Information' ) . '</h4>';
|
259 |
+
$output .= '<ul>';
|
260 |
+
|
261 |
+
if ( $maxitems == 0 ) {
|
262 |
+
$output .= '<li>';
|
263 |
+
$output .= __( 'Sorry, there is no post', 'vkExUnit' );
|
264 |
+
$output .= '</li>';
|
265 |
+
} else {
|
266 |
+
foreach ( $rss_items as $item ) {
|
267 |
+
$test_date = $item->get_local_date();
|
268 |
+
$content = $item->get_content();
|
269 |
+
|
270 |
+
if ( isset( $test_date ) && ! is_null( $test_date ) ) {
|
271 |
+
$item_date = $item->get_date( get_option( 'date_format' ) ) . '<br />'; } else {
|
272 |
+
$item_date = ''; }
|
273 |
+
|
274 |
+
$output .= '<li style="color:#777;">';
|
275 |
+
$output .= $item_date;
|
276 |
+
$output .= '<a href="' . esc_url( $item->get_permalink() ) . '" title="' . $item_date . '" target="_blank">';
|
277 |
+
$output .= esc_html( $item->get_title() );
|
278 |
+
$output .= '</a>';
|
279 |
+
$output .= '</li>';
|
280 |
+
}
|
281 |
+
}
|
282 |
|
283 |
+
$output .= '</ul>';
|
284 |
+
$output .= '</div>';
|
285 |
+
}
|
286 |
+
} // if ( ! is_wp_error( $rss ) ) {
|
287 |
|
288 |
+
echo $output;
|
289 |
+
}
|
290 |
|
291 |
+
public static function is_dashboard_active() {
|
292 |
+
$flag = false;
|
293 |
+
if ( 'ja' == get_locale() ) {
|
294 |
+
$flag = true;
|
295 |
+
}
|
296 |
+
if ( is_plugin_active( 'vk-all-in-one-expansion-unit/vkExUnit.php' ) ) {
|
297 |
+
$flag = true;
|
298 |
+
}
|
299 |
+
if ( ! is_plugin_active( 'vk-post-author-display/post-author-display.php' ) ) {
|
300 |
+
$flag = true;
|
301 |
+
}
|
302 |
+
$theme = wp_get_theme()->get( 'Template' );
|
303 |
+
if ( $theme != 'lightning' ) {
|
304 |
+
$flag = true;
|
305 |
+
}
|
306 |
|
307 |
+
return apply_filters( 'vk-admin-is-dashboard-active', $flag );
|
308 |
+
}
|
309 |
+
/*--------------------------------------------------*/
|
310 |
+
/* admin _ Dashboard Widget
|
311 |
+
/*--------------------------------------------------*/
|
312 |
+
public static function dashboard_widget() {
|
313 |
+
global $vk_admin_textdomain;
|
314 |
+
if ( Vk_Admin::is_dashboard_active() ) {
|
315 |
+
wp_add_dashboard_widget(
|
316 |
+
'vk_dashboard_widget',
|
317 |
+
__( 'Vektor WordPress Information', $vk_admin_textdomain ),
|
318 |
+
array( __CLASS__, 'dashboard_widget_body' )
|
319 |
+
);
|
320 |
+
}
|
321 |
}
|
|
|
322 |
|
323 |
+
public static function dashboard_widget_body() {
|
324 |
+
echo Vk_Admin::get_news_body();
|
325 |
+
echo Vk_Admin::get_admin_banner();
|
326 |
+
}
|
327 |
|
328 |
+
/*--------------------------------------------------*/
|
329 |
+
/* admin _ sub
|
330 |
+
/*--------------------------------------------------*/
|
331 |
+
// 2016.08.07 ExUnitの有効化ページでは直接 admin_subを呼び出しているので注意
|
332 |
+
public static function admin_sub() {
|
333 |
+
$adminSub = '<div class="adminSub scrTracking">' . "\n";
|
334 |
+
$adminSub .= '<div class="infoBox">' . Vk_Admin::get_news_body() . '</div>' . "\n";
|
335 |
+
$adminSub .= '<div class="vk-admin-banner">' . Vk_Admin::get_admin_banner() . '</div>' . "\n";
|
336 |
+
$adminSub .= '</div><!-- [ /.adminSub ] -->' . "\n";
|
337 |
+
return $adminSub;
|
338 |
+
}
|
339 |
|
340 |
+
/*--------------------------------------------------*/
|
341 |
+
/* admin _ page_frame
|
342 |
+
/*--------------------------------------------------*/
|
343 |
+
public static function admin_page_frame( $get_page_title, $the_body_callback, $get_logo_html = '', $get_menu_html = '', $get_layout = 'column_3' ) {
|
344 |
+
?>
|
345 |
+
<div class="wrap vk_admin_page">
|
346 |
|
347 |
+
<div class="adminMain <?php echo $get_layout; ?>">
|
348 |
|
349 |
+
<?php if ( $get_layout == 'column_3' ) : ?>
|
350 |
<div id="adminContent_sub" class="scrTracking">
|
351 |
<div class="pageLogo"><?php echo $get_logo_html; ?></div>
|
352 |
<?php if ( $get_page_title ) : ?>
|
353 |
+
<h2 class="page_title"><?php echo $get_page_title; ?></h2>
|
354 |
<?php endif; ?>
|
355 |
<div class="vk_option_nav">
|
356 |
<ul>
|
360 |
</div><!-- [ /#adminContent_sub ] -->
|
361 |
<?php endif; ?>
|
362 |
|
363 |
+
<?php if ( $get_layout == 'column_2' ) : ?>
|
364 |
<div class="pageLogo"><?php echo $get_logo_html; ?></div>
|
365 |
<?php if ( $get_page_title ) : ?>
|
366 |
+
<h1 class="page_title"><?php echo $get_page_title; ?></h1>
|
367 |
<?php endif; ?>
|
368 |
<?php endif; ?>
|
369 |
|
370 |
+
<div id="adminContent_main">
|
371 |
+
<?php call_user_func_array( $the_body_callback, array() ); ?>
|
372 |
+
</div><!-- [ /#adminContent_main ] -->
|
373 |
|
374 |
+
</div><!-- [ /.adminMain ] -->
|
375 |
|
376 |
+
<?php echo Vk_Admin::admin_sub(); ?>
|
377 |
|
378 |
+
</div><!-- [ /.vkExUnit_admin_page ] -->
|
379 |
+
<?php
|
380 |
+
}
|
381 |
|
382 |
+
public function __construct() {
|
383 |
|
384 |
+
}
|
385 |
}
|
|
|
386 |
} // if ( ! class_exists( 'Vk_Admin' ) )
|
387 |
|
388 |
Vk_Admin::init();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.9.2
|
7 |
-
Stable tag: 5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -61,7 +61,6 @@ e.g.
|
|
61 |
|
62 |
1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
|
63 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
64 |
-
1. Place `<?php do_action('plugin_name_hook'); ?>` in your templates
|
65 |
|
66 |
== Frequently Asked Questions ==
|
67 |
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.9.2
|
7 |
+
Stable tag: 5.9.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
61 |
|
62 |
1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
|
63 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
|
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
|
vkExUnit.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: VK All in One Expansion Unit
|
4 |
-
* Plugin URI:
|
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: 5.
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vkExUnit
|
9 |
* Domain Path: /languages
|
@@ -11,7 +11,7 @@
|
|
11 |
* License: GPL2
|
12 |
*/
|
13 |
/*
|
14 |
-
Copyright 2015-
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -43,56 +43,65 @@ function vkExUnit_get_directory( $path = '' ) {
|
|
43 |
}
|
44 |
|
45 |
function vkExUnit_get_directory_uri( $path = '' ) {
|
46 |
-
return plugins_url( $path
|
47 |
}
|
48 |
|
49 |
|
50 |
if ( function_exists( 'register_deactivation_hook' ) ) {
|
51 |
-
|
52 |
}
|
53 |
|
54 |
function vkExUnit_uninstall_function() {
|
55 |
|
56 |
-
|
57 |
}
|
58 |
|
59 |
|
60 |
/// PHP Version check
|
61 |
-
if ( version_compare( phpversion(), '5.4.45') >= 0) {
|
62 |
require_once vkExUnit_get_directory() . '/initialize.php';
|
63 |
-
if ( version_compare(phpversion(), '5.6') < 0 && is_admin())
|
64 |
-
add_filter( 'admin_notices', 'vkExUnit_phpversion_warning_notice');
|
65 |
-
}
|
66 |
-
|
|
|
67 |
}
|
68 |
|
69 |
-
function vkExUnit_phpversion_error($val){
|
70 |
-
if (!current_user_can('activate_plugins'))
|
71 |
-
|
|
|
|
|
72 |
<div class="notice notice-error error is-dismissible"><p>
|
73 |
<?php
|
74 |
/*
|
75 |
本来システム名は vkExUnit_get_little_short_name() で引っ張るが、PHPのバージョンが低くて vkExUnit_get_little_short_name() 関数が読み込まれていないので"VK ExUnit"直書き
|
76 |
*/
|
77 |
-
printf(
|
78 |
-
|
79 |
-
|
|
|
|
|
80 |
</p></div>
|
81 |
-
|
82 |
-
|
83 |
}
|
84 |
|
85 |
-
function vkExUnit_phpversion_warning_notice($val){
|
86 |
-
if (!current_user_can('activate_plugins'))
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
<div class="notice notice-warning is-dismissible"><p>
|
91 |
-
<?php printf(__(
|
92 |
-
|
93 |
</p></div>
|
94 |
-
|
95 |
-
|
96 |
}
|
97 |
|
98 |
// add_filter('vk-admin-is-dashboard-active','vk_dashboard_hidden');
|
1 |
<?php
|
2 |
/*
|
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: 5.9.0
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vkExUnit
|
9 |
* Domain Path: /languages
|
11 |
* License: GPL2
|
12 |
*/
|
13 |
/*
|
14 |
+
Copyright 2015-2018 Vektor,Inc. ( email : kurudrive@gmail.com )
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License, version 2, as
|
43 |
}
|
44 |
|
45 |
function vkExUnit_get_directory_uri( $path = '' ) {
|
46 |
+
return plugins_url( $path, __FILE__ );
|
47 |
}
|
48 |
|
49 |
|
50 |
if ( function_exists( 'register_deactivation_hook' ) ) {
|
51 |
+
register_deactivation_hook( __FILE__, 'vkExUnit_uninstall_function' );
|
52 |
}
|
53 |
|
54 |
function vkExUnit_uninstall_function() {
|
55 |
|
56 |
+
include vkExUnit_get_directory( '/uninstaller.php' );
|
57 |
}
|
58 |
|
59 |
|
60 |
/// PHP Version check
|
61 |
+
if ( version_compare( phpversion(), '5.4.45' ) >= 0 ) {
|
62 |
require_once vkExUnit_get_directory() . '/initialize.php';
|
63 |
+
if ( version_compare( phpversion(), '5.6' ) < 0 && is_admin() ) {
|
64 |
+
add_filter( 'admin_notices', 'vkExUnit_phpversion_warning_notice' );
|
65 |
+
}
|
66 |
+
} else {
|
67 |
+
add_filter( 'admin_notices', 'vkExUnit_phpversion_error' );
|
68 |
}
|
69 |
|
70 |
+
function vkExUnit_phpversion_error( $val ) {
|
71 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
72 |
+
return $val;
|
73 |
+
}
|
74 |
+
?>
|
75 |
<div class="notice notice-error error is-dismissible"><p>
|
76 |
<?php
|
77 |
/*
|
78 |
本来システム名は vkExUnit_get_little_short_name() で引っ張るが、PHPのバージョンが低くて vkExUnit_get_little_short_name() 関数が読み込まれていないので"VK ExUnit"直書き
|
79 |
*/
|
80 |
+
printf(
|
81 |
+
__( 'The current PHP version(%s) is too old, so VK ExUnit will not work.', 'vkExUnit' ), phpversion()
|
82 |
+
);
|
83 |
+
?>
|
84 |
+
<?php _e( 'VK ExUnit supports PHP5.6 or later.', 'vkExUnit' ); ?>
|
85 |
</p></div>
|
86 |
+
<?php
|
87 |
+
return $val;
|
88 |
}
|
89 |
|
90 |
+
function vkExUnit_phpversion_warning_notice( $val ) {
|
91 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
92 |
+
return $val;
|
93 |
+
}
|
94 |
+
global $hook_suffix;
|
95 |
+
if ( strpos( $hook_suffix, 'vkExUnit' ) == false ) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
?>
|
99 |
<div class="notice notice-warning is-dismissible"><p>
|
100 |
+
<?php printf( __( 'Current PHP Version(%s) is old.', 'vkExUnit' ), phpversion() ); ?>
|
101 |
+
<?php printf( __( '%s supports PHP5.6 or later.', 'vkExUnit' ), vkExUnit_get_little_short_name() ); ?>
|
102 |
</p></div>
|
103 |
+
<?php
|
104 |
+
return $val;
|
105 |
}
|
106 |
|
107 |
// add_filter('vk-admin-is-dashboard-active','vk_dashboard_hidden');
|