Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aldolat committed Feb 27, 2021
2 parents de6f6e5 + 458ba07 commit 08e1d8f
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 41 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.5.0] - 2021-02-27
### Fixed
* Fixed caching issue.

## [0.4.0] - 2020-08-09
### Changed
* Short changes in code.


## [0.3.0] - 2020-07-26
### Changed
* Removed use of gmdate() in favour of wp_date().
Expand Down Expand Up @@ -46,6 +49,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* First release of the plugin.

[Unreleased]: https://github.com/aldolat/aldolat-twitter/commits/develop
[0.5.0]: https://github.com/aldolat/aldolat-twitter/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/aldolat/aldolat-twitter/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/aldolat/aldolat-twitter/compare/0.2.0...0.3.0
[0.2.0]: https://github.com/aldolat/aldolat-twitter/compare/0.1.0...0.2.0
[0.1.0]: https://github.com/aldolat/aldolat-twitter/compare/0.0.4...0.1.0
[0.0.4]: https://github.com/aldolat/aldolat-twitter/compare/0.0.3...0.0.4
Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
# Aldolat Twitter

**Contributors** aldolat
**Donate link** https://dev.aldolat.it/projects/aldolat-twitter/
**Donate link** <https://dev.aldolat.it/projects/aldolat-twitter/>
**Tags** twitter, sidebar, widget
**Requires at least** 5.4
**Tested up to** 5.4
**Stable tag** 0.4.0
**Tested up to** 5.7
**Stable tag** 0.5.0
**License** GPLv3 or later
**License URI** https://www.gnu.org/licenses/gpl-3.0.html
**License URI** <https://www.gnu.org/licenses/gpl-3.0.html>

Display your Tweets in a widget.

* [Aldolat Twitter](#aldolat-twitter)
* [Description](#description)
* [Filing Bugs](#filing-bugs)
* [Privacy Policy](#privacy-policy)
* [Installation](#installation)
* [Installing the plugin](#installing-the-plugin)
* [Uninstalling the plugin](#uninstalling-the-plugin)
* [Description](#description)
* [Filing Bugs](#filing-bugs)
* [Privacy Policy](#privacy-policy)
* [Installation](#installation)
* [Installing the plugin](#installing-the-plugin)
* [Uninstalling the plugin](#uninstalling-the-plugin)

## Description

This plugin provides a widget where to display your tweets.

This plugin uses a modified version of the original script made by [Gabriele Romanato](https://gabrieleromanato.com/2018/06/wordpress-creare-un-plugin-per-reperire-i-dati-da-twitter). Thanks to him for his work.


## Filing Bugs

If you have found a bug, please report it on [GitHub](https://github.com/aldolat/aldolat-twitter/issues).
Expand Down
4 changes: 2 additions & 2 deletions aldolat-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
* Plugin URI: https://dev.aldolat.it/projects/aldolat-twitter/
* Author: Aldo Latino
* Author URI: https://www.aldolat.it/
* Version: 0.4.0
* Version: 0.5.0
* License: GPLv3 or later
* Text Domain: aldolat-twitter
* Domain Path: /languages/
*/

/*
* Copyright (C) 2020 Aldo Latino (email : [email protected])
* Copyright (C) 2020, 2021 Aldo Latino (email : [email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== Changelog ==

= 0.5.0 =

* Fixed caching issue.

= 0.4.0 =

* Short changes in code.
Expand Down
21 changes: 11 additions & 10 deletions includes/class-aldolat-twitter-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ public function __construct( $args ) {
$args = wp_parse_args( $args, $defaults );

$this->plugin_settings = $args;

$this->connection = new TwitterOAuth(
array(
'consumer_key' => $this->plugin_settings['consumer_key'],
'consumer_secret' => $this->plugin_settings['consumer_secret'],
'oauth_token' => $this->plugin_settings['oauth_token'],
'oauth_token_secret' => $this->plugin_settings['oauth_token_secret'],
'output_format' => 'text',
)
);
}

/**
Expand Down Expand Up @@ -105,7 +95,18 @@ private function fetch() {
if ( $transient ) {
$tweets = $transient;
} else {
$this->connection = new TwitterOAuth(
array(
'consumer_key' => $this->plugin_settings['consumer_key'],
'consumer_secret' => $this->plugin_settings['consumer_secret'],
'oauth_token' => $this->plugin_settings['oauth_token'],
'oauth_token_secret' => $this->plugin_settings['oauth_token_secret'],
'output_format' => 'text',
)
);

$response = $this->get_response();

if ( $response ) {
$tweets = json_decode( $response );
set_transient( 'aldolat-twitter-tweets-' . $the_widget_id, $tweets, $this->plugin_settings['cache_duration'] * MINUTE_IN_SECONDS );
Expand Down
2 changes: 1 addition & 1 deletion includes/class-aldolat-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Aldolat_Twitter {
* @since 0.0.4
*/
public function __construct() {
$this->plugin_version = '0.4.0';
$this->plugin_version = '0.5.0';
$this->plugin_dir_path = trailingslashit( dirname( plugin_dir_path( __FILE__ ) ) );
$this->plugin_dirname = trailingslashit( dirname( plugin_basename( __FILE__ ), 2 ) );
}
Expand Down
Binary file modified languages/aldolat-twitter-it_IT.mo
Binary file not shown.
12 changes: 6 additions & 6 deletions languages/aldolat-twitter-it_IT.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Aldolat Twitter 0.0.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aldolat-twitter\n"
"POT-Creation-Date: 2020-08-09T17:19:34+02:00\n"
"POT-Creation-Date: 2021-02-27T18:51:26+01:00\n"
"PO-Revision-Date: 2020-08-09 17:20+0200\n"
"Last-Translator: Aldo Latino <[email protected]>\n"
"Language-Team: Italian <[email protected]>\n"
Expand Down Expand Up @@ -43,25 +43,25 @@ msgstr "https://www.aldolat.it/"
msgid "My latest tweets"
msgstr "I miei ultimi tweet"

#: includes/class-aldolat-twitter-core.php:87
#: includes/class-aldolat-twitter-core.php:77
msgid "No response from Twitter"
msgstr "Nessuna risposta da Twitter"

#. translators: The original tweet author name and link.
#: includes/class-aldolat-twitter-core.php:193
#: includes/class-aldolat-twitter-core.php:194
msgid "In reply to %s"
msgstr "In risposta a %s"

#: includes/class-aldolat-twitter-core.php:219
#: includes/class-aldolat-twitter-core.php:220
msgid "by"
msgstr "da"

#. translators: date and tweet author name
#: includes/class-aldolat-twitter-core.php:226
#: includes/class-aldolat-twitter-core.php:227
msgid "(RT on %1$s by %2$s)"
msgstr "(RT il %1$s da %2$s)"

#: includes/class-aldolat-twitter-core.php:328
#: includes/class-aldolat-twitter-core.php:329
msgid "ago"
msgstr "fa"

Expand Down
16 changes: 8 additions & 8 deletions languages/aldolat-twitter.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2020 Aldo Latino
# Copyright (C) 2021 Aldo Latino
# This file is distributed under the same license as the Aldolat Twitter plugin.
msgid ""
msgstr ""
"Project-Id-Version: Aldolat Twitter 0.4.0\n"
"Project-Id-Version: Aldolat Twitter 0.5.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aldolat-twitter\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-08-09T17:19:34+02:00\n"
"POT-Creation-Date: 2021-02-27T18:51:26+01:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: aldolat-twitter\n"
Expand Down Expand Up @@ -40,25 +40,25 @@ msgstr ""
msgid "My latest tweets"
msgstr ""

#: includes/class-aldolat-twitter-core.php:87
#: includes/class-aldolat-twitter-core.php:77
msgid "No response from Twitter"
msgstr ""

#. translators: The original tweet author name and link.
#: includes/class-aldolat-twitter-core.php:193
#: includes/class-aldolat-twitter-core.php:194
msgid "In reply to %s"
msgstr ""

#: includes/class-aldolat-twitter-core.php:219
#: includes/class-aldolat-twitter-core.php:220
msgid "by"
msgstr ""

#. translators: date and tweet author name
#: includes/class-aldolat-twitter-core.php:226
#: includes/class-aldolat-twitter-core.php:227
msgid "(RT on %1$s by %2$s)"
msgstr ""

#: includes/class-aldolat-twitter-core.php:328
#: includes/class-aldolat-twitter-core.php:329
msgid "ago"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: aldolat
Donate link: https://dev.aldolat.it/projects/aldolat-twitter/
Tags: twitter, sidebar, widget
Requires at least: 5.4
Tested up to: 5.4
Stable tag: 0.4.0
Tested up to: 5.7
Stable tag: 0.5.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down

0 comments on commit 08e1d8f

Please sign in to comment.