diff --git a/LICENSE b/LICENSE index 35daf66..7a57354 100644 --- a/LICENSE +++ b/LICENSE @@ -7,7 +7,7 @@ https://directory.fsf.org/wiki/License:Expat -Copyright 2022 wolfgang.lol +Copyright 2024 wolfgang.lol Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index cf5840d..039e11b 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ Place the following shortcode right into the page. Either as shortcode block or ### Supported shortcode attributes - | Attribute | Default value | Example | Description | +| Attribute | Default value | Example | Description | | ------------------- | ----------------------------- | ------------------------- | ----------------------------------------------------------------- | +| **instance** | | instance="example.org" | (required attribute) Domain name of the instance without https:// | | **account** | | id="012345678910" | (required attribute) Your account ID ([a long number](#how-do-i-find-my-account-id)) | | tag | | tag="travel" | use **tag** instead of **account** if you want to embed a tag feed instead of a personal feed | -| **instance** | | instance="example.org" | (required attribute) Domain name of the instance without https:// | | limit | 20 | limit="10" | Maximum number of statuses | | excludeBoosts | false | excludeBoosts="true" | Exclude boosted statuses | | excludeReplies | false | excludeReplies="true" | Exclude replies to other accounts | @@ -106,6 +106,8 @@ If you are familiar with Github you can clone the repository right into your Wor ## FAQ ### How do I find my account ID? +Please feel free to use [this handy lookup tool](https://wolfgang.lol/code/include-mastodon-feed-wordpress-plugin/) + As an instance admin you can easily read your user ID in the admin backend. As regular user you can try an API v2 search to find your ID Use the following URL to get your ID: diff --git a/plugin.php b/plugin.php index 9083cc5..a94b70d 100644 --- a/plugin.php +++ b/plugin.php @@ -3,9 +3,11 @@ Plugin Name: Include Mastodon Feed Plugin URI: https://wolfgang.lol/code/include-mastodon-feed-wordpress-plugin Description: Plugin providing [include-mastodon-feed] shortcode - Version: 1.9.7 + Version: 1.9.8 Author: wolfgang.lol Author URI: https://wolfgang.lol + License: MIT + License URI: https://directory.fsf.org/wiki/License:Expat */ namespace IncludeMastodonFeedPlugin; @@ -157,7 +159,6 @@ function error($msg) { function init_styles() { - ob_start(); ?> window.addEventListener("load", () => { mastodonFeedLoad( - "", + "", "", { - linkTarget: "", + linkTarget: "", showPreviewCards: , excludeConversationStarters: , content: { @@ -740,18 +738,18 @@ function display_feed($atts) { link: "", }, text: { - boosted: "", + boosted: "", noStatuses: "", viewOnInstance: "", - showContent: "", - permalinkPre: "", - permalinkPost: "", - edited: "", + showContent: "", + permalinkPre: "", + permalinkPost: "", + edited: "", }, localization: { date: { - locale: "", - options: , + locale: "", + options: , } } } diff --git a/readme.txt b/readme.txt index cfab858..653bbaa 100644 --- a/readme.txt +++ b/readme.txt @@ -5,8 +5,8 @@ Tags: mastodon, status, feed Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 7.4 -Stable tag: 1.9.7 -License: Expat License +Stable tag: 1.9.8 +License: MIT License URI: https://directory.fsf.org/wiki/License:Expat Plugin that provides a shortcode to easily integrate mastodon feeds into wordpress pages. @@ -26,15 +26,15 @@ The plugin is written in PHP and generates native JavaScript to fetch and render `[include-mastodon-feed instance="YOUR-INSTANCE" account="YOUR-ACCOUNT-ID"]` = Shortcode attributes = +* **instance** (required) +Domain name of the instance without https:// (e.g. example.org) + * **account** (required) The account ID (a long number - see FAQ on how to get it) * **tag** Use **tag** instead of **account** if you want to embed a tag feed instead of a personal feed -* **instance** (required) -Domain name of the instance without https:// (e.g. example.org) - * **limit** Maximum number of statuses (Default: 20) @@ -154,6 +154,12 @@ Use the following URL to get your ID: == Changelog == += 1.9.8 = +* fix broken date-locale and date-options parameters +* improved string excaping for text parameters and added url escaping +* removed unnecessary output buffering +* fix license SPDX Identifier + = 1.9.7 = * fix option to either display smaller image media attachment previews (default) or large image versions (thank you @beach@illo.social)