Skip to content

Commit

Permalink
Extra filter arg, see #36
Browse files Browse the repository at this point in the history
  • Loading branch information
janboddez committed Nov 13, 2022
1 parent f610d85 commit cf06d6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/class-post-handler.php
Expand Up @@ -329,7 +329,7 @@ public function post_to_mastodon( $post_id ) {
$status .= ' ' . esc_url_raw( get_permalink( $post->ID ) );

$status = apply_filters( 'share_on_mastodon_status', $status, $post );
$args = apply_filters( 'share_on_mastodon_toot_args', array( 'status' => $status ) );
$args = apply_filters( 'share_on_mastodon_toot_args', array( 'status' => $status ), $post );

if ( apply_filters( 'share_on_mastodon_cutoff', false ) ) {
// May render hashtags or URLs, or unfiltered HTML, at the very end
Expand Down
9 changes: 8 additions & 1 deletion readme.txt
@@ -1,7 +1,8 @@
=== Share on Mastodon ===
Contributors: janboddez
Tags: mastodon, share, publicize, crosspost, fediverse
Tested up to: 6.0
Tested up to: 6.1
Stable tag: 0.9.0
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand All @@ -27,6 +28,12 @@ After activation, head over to *Settings > Share on Mastodon* to authorize WordP
More detailed instructions can be found on [this plugin's GitHub page](https://github.com/janboddez/share-on-mastodon).

== Changelog ==
= 0.9.0 -
Additional `share_on_mastodon_toot_args` filter argument. Add stable tag.

= 0.8.0 =
Add as Micropub syndication target.

= 0.7.0 =
Include option to delay crossposting. Might be used to try to fix issues with slow image uploads and the like.

Expand Down
2 changes: 1 addition & 1 deletion share-on-mastodon.php
Expand Up @@ -8,7 +8,7 @@
* License: GNU General Public License v3
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: share-on-mastodon
* Version: 0.8.0
* Version: 0.9.0
*
* @author Jan Boddez <jan@janboddez.be>
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
Expand Down

0 comments on commit cf06d6e

Please sign in to comment.