Skip to content

Commit

Permalink
Merge pull request #21 from kestrelwp/release/1.2.0
Browse files Browse the repository at this point in the history
1.2.0 Release
  • Loading branch information
maxrice authored Mar 28, 2024
2 parents c55656d + edee024 commit 8dc9e6c
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 36 deletions.
9 changes: 1 addition & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
root = true

[*]
indent_style = space
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

eclint_block_comment_start = /*
eclint_block_comment = *
eclint_block_comment_end = */

[*.{php,js}]
indent_style = tab

[*.{yml,yaml}]
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/package.json export-ignore
/package-lock.json export-ignore
/composer.lock export-ignore
/.scoper.inc.php export-ignore
17 changes: 10 additions & 7 deletions better-recent-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
* The main plugin file for Better Recent Comments.
*
* @package Barn2\better-recent-comments
* @author Barn2 Plugins <support@barn2.com>
* @author Kestrel <support@kestrelwp.com>
* @license GPL-3.0
* @copyright Barn2 Media Ltd
* @copyright Kestrel
*
* @wordpress-plugin
* Plugin Name: Better Recent Comments
* Plugin URI: https://wordpress.org/plugins/better-recent-comments/
* Description: This plugin provides an improved widget and shortcode to show your most recent comments. If using WPML, comments are limited to posts in the current language.
* Version: 1.1.9
* Author: Barn2 Plugins
* Author URI: https://barn2.com
* Version: 1.2.0
* Author: Kestrel
* Author URI: https://kestrelwp.com
* Text Domain: better-recent-comments
* Domain Path: /languages
* Requires at least: 6.0
* Tested up to: 6.5
* Requires PHP: 7.4
*
* Copyright: Barn2 Media Ltd
* Copyright: Kestrel
* License: GNU General Public License v3.0
* License URI: https://www.gnu.org/licenses/gpl.html
*/
Expand All @@ -29,7 +32,7 @@
exit;
}

const PLUGIN_VERSION = '1.1.9';
const PLUGIN_VERSION = '1.2.0';
const PLUGIN_FILE = __FILE__;

// Include autoloader.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "barn2/better-recent-comments",
"name": "kestrelwp/better-recent-comments",
"description": "Better Recent Comments WordPress plugin",
"type": "wordpress-plugin",
"license": "GPL-3.0",
"authors": [
{
"name": "Barn2 Plugins",
"email": "support@barn2.com"
"name": "Kestrel",
"email": "support@kestrelwp.com"
}
],
"require": {},
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "better-recent-comments",
"version": "1.1.9",
"version": "1.2.0",
"description": "Better Recent Comments WordPress plugin",
"main": "gulpfile.js",
"directories": {
Expand All @@ -15,12 +15,12 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/andykeith/better-recent-comments.git"
"url": "git+https://github.com/kestrelwp/better-recent-comments.git"
},
"author": "Barn2 Plugins <support@barn2.com>",
"author": "Kestrel <support@kestrelwp.com>",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/andykeith/better-recent-comments/issues"
"url": "https://github.com/kestrelwp/better-recent-comments/issues"
},
"homepage": "https://github.com/andykeith/better-recent-comments#readme"
"homepage": "https://github.com/kestrelwp/better-recent-comments#readme"
}
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== Better Recent Comments ===
Contributors: andykeith, barn2media, amirition
Donate link: https://barn2.com
Contributors: kestrelwp
Donate link: https://kestrelwp.com
Tags: comments, widget, avatar, shortcode, wpml
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 1.1.9
Stable tag: 1.2.0
License: GPL-3.0
License URI: https://www.gnu.org/licenses/gpl.html

Expand Down Expand Up @@ -104,6 +104,11 @@ Please visit our [Knowledge Base](https://barn2.com/kb-categories/better-recent-

== Changelog ==

= 1.2.0 =
Release date 27 March 2024
* Fix notices in PHP 8.2
* Misc: Update author to Kestrel

= 1.1.9 =
Release date 14 November 2023

Expand Down
4 changes: 2 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* The main plugin class.
*
* @package Barn2\better-recent-comments
* @author Barn2 Plugins <support@barn2.com>
* @author Kestrel <support@kestrelwp.com>
* @license GPL-3.0
* @copyright Barn2 Media Ltd
* @copyright Kestrel
*/
class Plugin extends Simple_Plugin implements Registerable {

Expand Down
4 changes: 2 additions & 2 deletions src/Plugin_Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* Factory to create/return the shared plugin instance.
*
* @package Barn2\better-recent-comments
* @author Barn2 Plugins <support@barn2.com>
* @author Kestrel <support@kestrelwp.com>
* @license GPL-3.0
* @copyright Barn2 Media Ltd
* @copyright Kestrel
*/
class Plugin_Factory {

Expand Down
4 changes: 2 additions & 2 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* This class provides utility functions for the Better Recent Comments plugin.
*
* @package Barn2\better-recent-comments
* @author Barn2 Plugins <support@barn2.com>
* @author Kestrel <support@kestrelwp.com>
* @license GPL-3.0
* @copyright Barn2 Media Ltd
* @copyright Kestrel
*/
class Util {

Expand Down
16 changes: 12 additions & 4 deletions src/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* This class provides the Better Recent Comments widget.
*
* @package Barn2\better-recent-comments
* @author Barn2 Plugins <support@barn2.com>
* @author Kestrel <support@kestrelwp.com>
* @license GPL-3.0
* @copyright Barn2 Media Ltd
* @copyright Kestrel
*/
class Widget extends WP_Widget {

Expand Down Expand Up @@ -58,11 +58,19 @@ public function widget( $args, $instance ) {
return;
}

$instance = wp_parse_args( $instance, [
'date' => '',
'comment' => '',
'link' => '',
'avatar' => '',
] );

$instance['title'] = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Recent Comments', 'better-recent-comments' );

$output = $args['before_widget'];

$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments', 'better-recent-comments' );
// This filter is documented in wp-includes/default-widgets.php
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );

if ( $title ) {
$output .= $args['before_title'] . $title . $args['after_title'];
Expand Down

0 comments on commit 8dc9e6c

Please sign in to comment.