Skip to content

Commit

Permalink
Bumped version and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yadenis committed Oct 2, 2022
1 parent 226f1ea commit 63aafae
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 16 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ With plugin settings you can:
- Manually moderate comments with attachments.

You can also:
- Add, replace or delete an attachment from a comment on Edit Comment screen.
- Add, replace or delete an attachment from a comment on the Edit Comment screen.
- Attach an unlimited number of attachments to the comment in the admin panel.
- Delete an attachment on Comments screen.
- Delete an attachment from a specific comment or bulk delete attachments from comments on the Comments screen.
- Display attachments attached to comments to the current post (or a specific post) with the `[dco_ca]` shortcode. You can also filter by type. See [FAQ](#faq) for details.

Attachments are uploaded to the WordPress Media Library and deleted along with the comment (if this is set in the settings).

Expand All @@ -29,7 +30,7 @@ REST API is supported.
DCO Comment Attachment is also available on [WordPress.org](https://wordpress.org/plugins/dco-comment-attachment/).

# Version
2.3.1
2.4.0

[![Build Status](https://travis-ci.org/yadenis/DCO-Comment-Attachment.svg?branch=master)](https://travis-ci.org/yadenis/DCO-Comment-Attachment)

Expand All @@ -46,8 +47,25 @@ DCO Comment Attachment tested with:

Feel free to create [a new issue](https://github.com/yadenis/DCO-Comment-Attachment/issues) if you need integration with another plugin.

## How to use the [dco_ca] shortcode?

Without attributes specified, the `[dco_ca]` shortcode will display all attachments attached to current post.

You can filter attachments using the `type` attribute. By default it is `all`. Also supported: `image`, `video`, `audio` and `misc`.
You can specify one value `[dco_ca type="image"]` or multiple values, separated by commas `[dco_ca type="video,audio"]`.

You can also display attachments from the comments of another post using the `post_id` attribute.
For example, [dco_ca post_id="45"], where `45` is the ID of the specific post.

You can also combine these attributes. For example, `[dco_ca post_id="45" type="image"]` will display all images attached to comments to the post with ID `45`.

# Changelog
# 2.3.1
## 2.4.0
- Added bulk delete attachments action on the Comments screen.
- Added the `[dco_ca]` shortcode for display attachments attached to comments (see FAQ for details).
- Fixed bug: now if there is no attachment, the empty array is not saved to the database.

## 2.3.1
- Fixed a bug with the accept attribute of the attachment upload field.
- Added compatibility with Loco Translate plugin.

Expand Down
4 changes: 2 additions & 2 deletions dco-comment-attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: DCO Comment Attachment
* Plugin URI: https://denisco.pro/dco-comment-attachment/
* Description: Allows your visitors to attach files with their comments
* Version: 2.3.1
* Version: 2.4.0
* Author: Denis Yanchevskiy
* Author URI: https://denisco.pro
* License: GPLv2 or later
Expand All @@ -24,7 +24,7 @@
define( 'DCO_CA_URL', plugin_dir_url( __FILE__ ) );
define( 'DCO_CA_PATH', plugin_dir_path( __FILE__ ) );
define( 'DCO_CA_BASENAME', plugin_basename( __FILE__ ) );
define( 'DCO_CA_VERSION', '2.3.1' );
define( 'DCO_CA_VERSION', '2.4.0' );

require_once DCO_CA_PATH . 'includes/functions.php';

Expand Down
8 changes: 4 additions & 4 deletions includes/class-dco-ca-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function delete_attachment_action() {
/**
* Adds additional bulk actions.
*
* @since x.x.x
* @since 2.4.0
*
* @param array $actions An array of the available bulk actions.
* @return array An array with standard bulk actions
Expand All @@ -142,7 +142,7 @@ public function add_comments_bulk_actions( $actions ) {
/**
* Handles a bulk action to delete comment attachments on the comments page.
*
* @since x.x.x
* @since 2.4.0
*/
public function delete_attachment_bulk_action() {
check_admin_referer( 'bulk-comments' );
Expand Down Expand Up @@ -188,7 +188,7 @@ public function delete_attachment_bulk_action() {
/**
* Shows bulk action updated message.
*
* @since x.x.x
* @since 2.4.0
*
* @param string $translation Translated text.
* @param string $single The text to be used if the number is singular.
Expand Down Expand Up @@ -220,7 +220,7 @@ public function show_bulk_action_message( $translation, $single, $plural, $numbe
/**
* Adds single-use URL parameters.
*
* @since x.x.x
* @since 2.4.0
*
* @param array $removable_query_args An array of query variable names to remove from the URL.
* @return array An array of query variable names to remove from the URL.
Expand Down
4 changes: 2 additions & 2 deletions includes/class-dco-ca.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public function display_attachment( $comment_text = '', $comment = null ) {
/**
* Generates an attachment markup.
*
* @since x.x.x
* @since 2.4.0
*
* @param int|array $attachment_id The attachment ID(s).
* @return string The attachment HTML markup.
Expand Down Expand Up @@ -665,7 +665,7 @@ public function add_rest_api_links( $response, $comment ) {
/**
* The dco_ca shortcode handler.
*
* @since x.x.x
* @since 2.4.0
*
* @param array $atts {
* An array of shortcode attributes.
Expand Down
26 changes: 22 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: denisco
Tags: comment, comment attachment, attachment, image, video
Requires at least: 4.6
Tested up to: 5.8
Tested up to: 6.0
Requires PHP: 5.6
Stable tag: 2.3.1
Stable tag: 2.4.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://www.donationalerts.com/r/denisco
Expand Down Expand Up @@ -32,9 +32,10 @@ With plugin settings you can:

You can also:

* Add, replace or delete an attachment from a comment on Edit Comment screen.
* Add, replace or delete an attachment from a comment on the Edit Comment screen.
* Attach an unlimited number of attachments to the comment in the admin panel.
* Delete an attachment on Comments screen.
* Delete an attachment from a specific comment or bulk delete attachments from comments on the Comments screen.
* Display attachments attached to comments to the current post (or a specific post) with the `[dco_ca]` shortcode. You can also filter by type. See [FAQ](#faq) for details.

Attachments are uploaded to the WordPress Media Library and deleted along with the comment (if this is set in the settings).

Expand All @@ -59,8 +60,25 @@ DCO Comment Attachment tested with:

Feel free to create [a new topic](https://wordpress.org/support/plugin/dco-comment-attachment/) on support forum if you need integration with another plugin.

= How to use the [dco_ca] shortcode? =

Without attributes specified, the `[dco_ca]` shortcode will display all attachments attached to current post.

You can filter attachments using the `type` attribute. By default it is `all`. Also supported: `image`, `video`, `audio` and `misc`.
You can specify one value `[dco_ca type="image"]` or multiple values, separated by commas `[dco_ca type="video,audio"]`.

You can also display attachments from the comments of another post using the `post_id` attribute.
For example, [dco_ca post_id="45"], where `45` is the ID of the specific post.

You can also combine these attributes. For example, `[dco_ca post_id="45" type="image"]` will display all images attached to comments to the post with ID `45`.

== Changelog ==

= 2.4.0 =
* Added bulk delete attachments action on the Comments screen.
* Added the `[dco_ca]` shortcode for display attachments attached to comments (see FAQ for details).
* Fixed bug: now if there is no attachment, the empty array is not saved to the database.

= 2.3.1 =
* Fixed a bug with the accept attribute of the attachment upload field.
* Added compatibility with Loco Translate plugin.
Expand Down

0 comments on commit 63aafae

Please sign in to comment.