From ff5fd40e4aeb5601ede14b4c0f6c9caddecff8d3 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 08:11:01 +0900 Subject: [PATCH 1/6] Added 'Not recommended' --- inc/sns/widget-twitter.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/inc/sns/widget-twitter.php b/inc/sns/widget-twitter.php index 2e31bcb79..7daaa4bbf 100644 --- a/inc/sns/widget-twitter.php +++ b/inc/sns/widget-twitter.php @@ -5,16 +5,26 @@ class VK_Twitter_Widget extends WP_Widget { /** * ウィジェット名などを設定 */ - public function __construct() { - $widget_name = veu_get_prefix() . __( 'Twitter', 'vk-all-in-one-expansion-unit' ); + function __construct() { parent::__construct( 'vk_twitter_widget', // Base ID - $widget_name, // Name - array( 'description' => __( 'Display Twitter timeline.', 'vk-all-in-one-expansion-unit' ) ) // Args + self::veu_widget_name(), // Name + array( 'description' => self::veu_widget_description() ) // Args ); // widget actual processes } + public static function veu_widget_name() { + $name = veu_get_prefix() . __( 'Twitter', 'vk-all-in-one-expansion-unit' ); + $name .= ' ( ' . __( 'Not recommended', 'vk-all-in-one-expansion-unit' ) . ' )'; + return $name; + } + + public static function veu_widget_description() { + $description = __( 'Display Twitter timeline.', 'vk-all-in-one-expansion-unit' ); + return $description; + } + /** * ウィジェットの内容を出力 * From f1cef128f33817bed52210ad06fe105a47a1ae23 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 08:39:22 +0900 Subject: [PATCH 2/6] Add not for description --- inc/sns/widget-twitter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/sns/widget-twitter.php b/inc/sns/widget-twitter.php index 7daaa4bbf..86ca50f37 100644 --- a/inc/sns/widget-twitter.php +++ b/inc/sns/widget-twitter.php @@ -22,7 +22,8 @@ public static function veu_widget_name() { public static function veu_widget_description() { $description = __( 'Display Twitter timeline.', 'vk-all-in-one-expansion-unit' ); - return $description; + $description .= __( 'Note: ', 'vk-all-in-one-expansion-unit' ) . __( 'Due to recent changes in X policies, embedded timelines may not display as expected.', 'vk-all-in-one-expansion-unit' ); + return wp_kses( $description, array( 'br' => array() ) ); } /** From 63dd84b71684743d2dcf82453695b951236d24d5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 08:44:05 +0900 Subject: [PATCH 3/6] Add changelog --- readme.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.txt b/readme.txt index 6d977e0c3..99d25b230 100644 --- a/readme.txt +++ b/readme.txt @@ -83,6 +83,8 @@ e.g. == Changelog == +[ Specification Change ][ Twitter widget ] Added "Not recommended" to the name and added a note to the description. + = 9.94.2 = [ Add filter ][ HTML Sitemap ] veu_sitemap_exclude_post_types [ Bug Fix ] Update CSS Optimizer 0.2.2 From c4de364bc410e93c0933a3f0f8456d56f6b76d01 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 13:19:30 +0900 Subject: [PATCH 4/6] Refactor: Rename Co-authored-by: Hidekazu Ishikawa --- inc/sns/widget-twitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/sns/widget-twitter.php b/inc/sns/widget-twitter.php index 86ca50f37..c6ac39804 100644 --- a/inc/sns/widget-twitter.php +++ b/inc/sns/widget-twitter.php @@ -8,8 +8,8 @@ class VK_Twitter_Widget extends WP_Widget { function __construct() { parent::__construct( 'vk_twitter_widget', // Base ID - self::veu_widget_name(), // Name - array( 'description' => self::veu_widget_description() ) // Args + self::widget_name(), // Name + array( 'description' => self::widget_description() ) // Args ); // widget actual processes } From d943b96351ddd8f1996789d07a178e204150b019 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 13:19:39 +0900 Subject: [PATCH 5/6] Refactor: Rename Co-authored-by: Hidekazu Ishikawa --- inc/sns/widget-twitter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/sns/widget-twitter.php b/inc/sns/widget-twitter.php index c6ac39804..e556ec33c 100644 --- a/inc/sns/widget-twitter.php +++ b/inc/sns/widget-twitter.php @@ -14,7 +14,7 @@ function __construct() { // widget actual processes } - public static function veu_widget_name() { + public static function widget_name() { $name = veu_get_prefix() . __( 'Twitter', 'vk-all-in-one-expansion-unit' ); $name .= ' ( ' . __( 'Not recommended', 'vk-all-in-one-expansion-unit' ) . ' )'; return $name; From 84af9e31d1b45f8e738ff20756886d39777fe9f3 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 30 Oct 2024 13:19:49 +0900 Subject: [PATCH 6/6] Refactor: Rename Co-authored-by: Hidekazu Ishikawa --- inc/sns/widget-twitter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/sns/widget-twitter.php b/inc/sns/widget-twitter.php index e556ec33c..aad947a26 100644 --- a/inc/sns/widget-twitter.php +++ b/inc/sns/widget-twitter.php @@ -20,7 +20,7 @@ public static function widget_name() { return $name; } - public static function veu_widget_description() { + public static function widget_description() { $description = __( 'Display Twitter timeline.', 'vk-all-in-one-expansion-unit' ); $description .= __( 'Note: ', 'vk-all-in-one-expansion-unit' ) . __( 'Due to recent changes in X policies, embedded timelines may not display as expected.', 'vk-all-in-one-expansion-unit' ); return wp_kses( $description, array( 'br' => array() ) );