Version Description
[ Add function ][ contact section ] Add link target setting [ bug fix ] fix when plugin VK Blocks activation that ExUnit widget activation setting was delete
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 9.38.0.0 |
Comparing to | |
See all releases |
Code changes from version 9.37.2.0 to 9.38.0.0
inc/contact-section/contact-section.php
CHANGED
@@ -192,6 +192,7 @@ class VkExUnit_Contact {
|
|
192 |
'tel_number' => '000-000-0000',
|
193 |
'contact_time' => __( 'Office hours 9:00 - 18:00 [ Weekdays except holidays ]', 'vk-all-in-one-expansion-unit' ),
|
194 |
'contact_link' => home_url(),
|
|
|
195 |
'button_text' => __( 'Contact us', 'vk-all-in-one-expansion-unit' ),
|
196 |
'button_text_small' => '',
|
197 |
'short_text' => __( 'Contact us', 'vk-all-in-one-expansion-unit' ),
|
@@ -251,6 +252,14 @@ class VkExUnit_Contact {
|
|
251 |
<span><?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' ); ?>http://www.********.com/contact/ <?php _e( 'or', 'vk-all-in-one-expansion-unit' ); ?> /contact/</span><br />
|
252 |
<?php _e( '* If you fill in the blank, widget\'s contact button does not appear.', 'vk-all-in-one-expansion-unit' ); ?>
|
253 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
</tr>
|
255 |
<tr>
|
256 |
<th scope="row"><label for="sub_sitename"><?php _e( 'Contact button Text', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
@@ -393,8 +402,9 @@ class VkExUnit_Contact {
|
|
393 |
/*-------------------------------------------*/
|
394 |
|
395 |
public static function render_contact_section_html( $additional_classes='', $show_edit_button=true ) {
|
396 |
-
$options
|
397 |
-
$
|
|
|
398 |
|
399 |
if ( $options['contact_html'] ) {
|
400 |
|
@@ -405,7 +415,7 @@ class VkExUnit_Contact {
|
|
405 |
} elseif ( $options['contact_image'] ) {
|
406 |
|
407 |
$cont .= '<section class="veu_contentAddSection ' . $additional_classes . '">';
|
408 |
-
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '
|
409 |
$cont .= '<img src="' . esc_attr( $options['contact_image'] ) . '" alt="contact_txt">';
|
410 |
$cont .= '</a>';
|
411 |
$cont .= '</section>';
|
@@ -433,7 +443,7 @@ class VkExUnit_Contact {
|
|
433 |
$cont .= '</p>';
|
434 |
|
435 |
if ( $options['contact_link'] && $options['button_text'] ) {
|
436 |
-
$cont .= '<a href="' . $options['contact_link'] . '" class="btn btn-primary btn-lg contact_bt">';
|
437 |
$cont .= '<span class="contact_bt_txt">';
|
438 |
|
439 |
// Envelope Icon
|
@@ -482,14 +492,15 @@ class VkExUnit_Contact {
|
|
482 |
/*-------------------------------------------*/
|
483 |
|
484 |
public static function render_widget_contact_btn_html() {
|
485 |
-
$options
|
486 |
-
$
|
|
|
487 |
|
488 |
if ( ( isset( $options['contact_link'] ) && $options['contact_link'] )
|
489 |
&& ( isset( $options['short_text'] ) && $options['short_text'] )
|
490 |
) {
|
491 |
|
492 |
-
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '" class="btn btn-primary btn-lg btn-block contact_bt"><span class="contact_bt_txt">';
|
493 |
|
494 |
// Envelope Icon
|
495 |
$class = 'fa fa-envelope-o';
|
192 |
'tel_number' => '000-000-0000',
|
193 |
'contact_time' => __( 'Office hours 9:00 - 18:00 [ Weekdays except holidays ]', 'vk-all-in-one-expansion-unit' ),
|
194 |
'contact_link' => home_url(),
|
195 |
+
'contact_target_blank' => false,
|
196 |
'button_text' => __( 'Contact us', 'vk-all-in-one-expansion-unit' ),
|
197 |
'button_text_small' => '',
|
198 |
'short_text' => __( 'Contact us', 'vk-all-in-one-expansion-unit' ),
|
252 |
<span><?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' ); ?>http://www.********.com/contact/ <?php _e( 'or', 'vk-all-in-one-expansion-unit' ); ?> /contact/</span><br />
|
253 |
<?php _e( '* If you fill in the blank, widget\'s contact button does not appear.', 'vk-all-in-one-expansion-unit' ); ?>
|
254 |
</td>
|
255 |
+
</tr>
|
256 |
+
<!-- Contact Target -->
|
257 |
+
<tr>
|
258 |
+
<th scope="row"><label for="contact_target_blank"><?php _e( 'Contact button link target setting', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
259 |
+
<td>
|
260 |
+
<input type="checkbox" name="vkExUnit_contact[contact_target_blank]" id="contact_target_blank" <?php checked( ! empty( $options['contact_target_blank'] ) ) ?> />
|
261 |
+
<?php _e( 'Open in New Tab', 'vk-all-in-one-expansion-unit' ); ?>
|
262 |
+
</td>
|
263 |
</tr>
|
264 |
<tr>
|
265 |
<th scope="row"><label for="sub_sitename"><?php _e( 'Contact button Text', 'vk-all-in-one-expansion-unit' ); ?></label></th>
|
402 |
/*-------------------------------------------*/
|
403 |
|
404 |
public static function render_contact_section_html( $additional_classes='', $show_edit_button=true ) {
|
405 |
+
$options = self::get_option();
|
406 |
+
$link_target = ! empty( $options['contact_target_blank'] ) ? ' target="_blank"' : '';
|
407 |
+
$cont = '';
|
408 |
|
409 |
if ( $options['contact_html'] ) {
|
410 |
|
415 |
} elseif ( $options['contact_image'] ) {
|
416 |
|
417 |
$cont .= '<section class="veu_contentAddSection ' . $additional_classes . '">';
|
418 |
+
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '"' . $link_target . '>';
|
419 |
$cont .= '<img src="' . esc_attr( $options['contact_image'] ) . '" alt="contact_txt">';
|
420 |
$cont .= '</a>';
|
421 |
$cont .= '</section>';
|
443 |
$cont .= '</p>';
|
444 |
|
445 |
if ( $options['contact_link'] && $options['button_text'] ) {
|
446 |
+
$cont .= '<a href="' . $options['contact_link'] . '"' . $link_target . ' class="btn btn-primary btn-lg contact_bt">';
|
447 |
$cont .= '<span class="contact_bt_txt">';
|
448 |
|
449 |
// Envelope Icon
|
492 |
/*-------------------------------------------*/
|
493 |
|
494 |
public static function render_widget_contact_btn_html() {
|
495 |
+
$options = self::get_option();
|
496 |
+
$link_target = ! empty( $options['contact_target_blank'] ) ? ' target="_blank"' : '';
|
497 |
+
$cont = '';
|
498 |
|
499 |
if ( ( isset( $options['contact_link'] ) && $options['contact_link'] )
|
500 |
&& ( isset( $options['short_text'] ) && $options['short_text'] )
|
501 |
) {
|
502 |
|
503 |
+
$cont .= '<a href="' . esc_url( $options['contact_link'] ) . '"' . $link_target . ' class="btn btn-primary btn-lg btn-block contact_bt"><span class="contact_bt_txt">';
|
504 |
|
505 |
// Envelope Icon
|
506 |
$class = 'fa fa-envelope-o';
|
inc/contact-section/customizer.php
CHANGED
@@ -152,6 +152,26 @@ function veu_customize_register_contact( $wp_customize ) {
|
|
152 |
)
|
153 |
);
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
// Contact button Text
|
156 |
$wp_customize->add_setting(
|
157 |
'vkExUnit_contact[button_text]', array(
|
152 |
)
|
153 |
);
|
154 |
|
155 |
+
// The contact Target
|
156 |
+
$wp_customize->add_setting(
|
157 |
+
'vkExUnit_contact[contact_target_blank]', array(
|
158 |
+
'default' => false,
|
159 |
+
'type' => 'option', // 保存先 option or theme_mod
|
160 |
+
'capability' => 'edit_theme_options',
|
161 |
+
'sanitize_callback' => 'veu_sanitize_boolean',
|
162 |
+
)
|
163 |
+
);
|
164 |
+
|
165 |
+
$wp_customize->add_control(
|
166 |
+
'contact_target', array(
|
167 |
+
'label' => __( 'Open in New Tab', 'vk-all-in-one-expansion-unit' ),
|
168 |
+
'section' => 'veu_contact_setting',
|
169 |
+
'settings' => 'vkExUnit_contact[contact_target_blank]',
|
170 |
+
'type' => 'checkbox',
|
171 |
+
'priority' => 1,
|
172 |
+
)
|
173 |
+
);
|
174 |
+
|
175 |
// Contact button Text
|
176 |
$wp_customize->add_setting(
|
177 |
'vkExUnit_contact[button_text]', array(
|
inc/other-widget/class-veu-other-widget-admin-control.php
CHANGED
@@ -6,23 +6,36 @@ class VEU_Other_Widget_Admin_Control {
|
|
6 |
}
|
7 |
|
8 |
function add_hooks() {
|
|
|
9 |
add_action( 'vew_admin_setting_block', array( $this, 'admin_setting' ), 10, 1 );
|
|
|
|
|
|
|
10 |
add_filter( 'vkExUnit_common_options_validate', array( $this, 'admin_config_validate' ), 10, 3 );
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
public function admin_config_validate( $output, $input, $defaults ) {
|
14 |
$_v = array();
|
|
|
|
|
15 |
if ( ! empty( $input['enable_widgets'] ) && is_array( $input['enable_widgets'] ) ) {
|
16 |
foreach ( $input['enable_widgets'] as $v ) {
|
17 |
array_push( $_v, $v );
|
18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
-
|
21 |
-
VEU_Widget_Control::update_options( $_v );
|
22 |
-
return $output;
|
23 |
}
|
24 |
|
25 |
public function admin_setting( $options ) {
|
26 |
include veu_get_directory() . '/inc/other-widget/template/admin_setting.php';
|
27 |
}
|
28 |
}
|
|
6 |
}
|
7 |
|
8 |
function add_hooks() {
|
9 |
+
// Add Widget activation list table to ExUnit Active Setting page.
|
10 |
add_action( 'vew_admin_setting_block', array( $this, 'admin_setting' ), 10, 1 );
|
11 |
+
// veu_get_common_options_default() の中で走る。
|
12 |
+
// 普通はアクションフックでええんちゃう?と思ったりするが
|
13 |
+
// $input の値を受け取る手法としてこのフィルターを使っているっぽい
|
14 |
add_filter( 'vkExUnit_common_options_validate', array( $this, 'admin_config_validate' ), 10, 3 );
|
15 |
}
|
16 |
|
17 |
+
/**
|
18 |
+
* ウィジェット有効化設定
|
19 |
+
*/
|
20 |
public function admin_config_validate( $output, $input, $defaults ) {
|
21 |
$_v = array();
|
22 |
+
|
23 |
+
// ウィジェットの有効化情報($input['enable_widgets'])がちゃんと落ちてきたら update 処理する
|
24 |
if ( ! empty( $input['enable_widgets'] ) && is_array( $input['enable_widgets'] ) ) {
|
25 |
foreach ( $input['enable_widgets'] as $v ) {
|
26 |
array_push( $_v, $v );
|
27 |
}
|
28 |
+
/*
|
29 |
+
有効化設定ページ以外だと $input['enable_widgets'] が入ってこないので $_v が空のまま
|
30 |
+
option値 vkExUnit_enable_widgets を上書きしてしまい、全てのウィジェットが有効化解除されてしまうので注意
|
31 |
+
*/
|
32 |
+
VEU_Widget_Control::update_options( $_v );
|
33 |
+
return $output;
|
34 |
}
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
public function admin_setting( $options ) {
|
38 |
include veu_get_directory() . '/inc/other-widget/template/admin_setting.php';
|
39 |
}
|
40 |
}
|
41 |
+
new VEU_Other_Widget_Admin_Control();
|
inc/other-widget/other-widget.php
CHANGED
@@ -14,8 +14,8 @@ require dirname( __FILE__ ) . '/widget-button.php';
|
|
14 |
require dirname( __FILE__ ) . '/widget-banner.php';
|
15 |
|
16 |
if (is_admin()) {
|
|
|
17 |
require_once veu_get_directory() . '/inc/other-widget/class-veu-other-widget-admin-control.php';
|
18 |
-
new VEU_Other_Widget_Admin_Control();
|
19 |
}
|
20 |
|
21 |
function veu_widget_packages() {
|
14 |
require dirname( __FILE__ ) . '/widget-banner.php';
|
15 |
|
16 |
if (is_admin()) {
|
17 |
+
// ウィジェットの個別有効化機能管理画面読み込み
|
18 |
require_once veu_get_directory() . '/inc/other-widget/class-veu-other-widget-admin-control.php';
|
|
|
19 |
}
|
20 |
|
21 |
function veu_widget_packages() {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 5.0.0
|
6 |
Tested up to: 5.5.1
|
7 |
-
Stable tag: 9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -81,6 +81,10 @@ e.g.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= 9.37.2.0 =
|
85 |
[ Design bug fix ] Scrolled Page top button CSS bug fix
|
86 |
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 5.0.0
|
6 |
Tested up to: 5.5.1
|
7 |
+
Stable tag: 9.38.0.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 9.38.0.0 =
|
85 |
+
[ Add function ][ contact section ] Add link target setting
|
86 |
+
[ bug fix ] fix when plugin VK Blocks activation that ExUnit widget activation setting was delete
|
87 |
+
|
88 |
= 9.37.2.0 =
|
89 |
[ Design bug fix ] Scrolled Page top button CSS bug fix
|
90 |
|
vkExUnit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: VK All in One Expansion Unit
|
4 |
* Plugin URI: https://ex-unit.nagoya
|
5 |
* Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
-
* Version: 9.
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vk-all-in-one-expansion-unit
|
9 |
* Domain Path: /languages
|
3 |
* Plugin Name: VK All in One Expansion Unit
|
4 |
* Plugin URI: https://ex-unit.nagoya
|
5 |
* Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
+
* Version: 9.38.0.0
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vk-all-in-one-expansion-unit
|
9 |
* Domain Path: /languages
|