Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions inc/sns/widget-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@ 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::widget_name(), // Name
array( 'description' => self::widget_description() ) // Args
);
// widget actual processes
}

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;
}

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() ) );
}

/**
* ウィジェットの内容を出力
*
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ e.g.

== Changelog ==

[ Specification Change ][ Twitter widget ] Added "Not recommended" to the name and added a note to the description.
[ Add setting ][ Category list ] Enable to specify ascending/descending order

= 9.99.6 =
Expand Down
Loading