Matthias Pfefferle
c95e501f98
redirect to canonical URL if it is not an ActivityPub request
2023-06-27 14:26:00 +02:00
Matthias Pfefferle
503353bcd0
Added settings for blog-wide user
2023-06-27 14:26:00 +02:00
Matthias Pfefferle
f8b93760df
fix copy&paste issue
...
thanks @mattwiebe
2023-06-27 14:25:39 +02:00
Matthias Pfefferle
a1791b963c
try new id urls
2023-06-27 14:25:39 +02:00
Matthias Pfefferle
03f2c24892
small improvements
2023-06-27 14:25:39 +02:00
Matthias Pfefferle
09518ea66b
prepare pseudo users like a blog wide user.
...
this allows also other constructs like tag oder category users
fix #1
2023-06-27 14:25:12 +02:00
Matthias Pfefferle
5478be1355
a follower is now a valid ActivityPub Actor
...
this helps with API handling
2023-06-23 14:54:29 +02:00
Matthias Pfefferle
d47a048329
save meta
to post-meta and persist summary in post-content
2023-06-22 10:01:15 +02:00
Matthias Pfefferle
e7bc9706a8
remove url attribute
2023-06-19 11:36:59 +02:00
Matthias Pfefferle
793214cea2
now tests are green again
2023-06-16 11:40:26 +02:00
Matthias Pfefferle
46f376e05e
fix tests
2023-06-15 12:24:13 +02:00
Matthias Pfefferle
fc0fc295bb
fix follower creation
2023-06-15 11:48:09 +02:00
Matt Wiebe
87de87b2a5
Followers: use custom post types and postmeta to store
2023-06-12 11:38:15 -05:00
Matthias Pfefferle
bfe5381d99
Merge pull request #299 from mediaformat/signature_verification
...
Signature verification
2023-06-01 11:21:33 +02:00
Matthias Pfefferle
27dd8217e8
Merge branch 'master' into fix/sanitization
2023-05-23 19:20:23 +02:00
Matthias Pfefferle
2117f78106
fix #321
2023-05-23 12:28:57 +02:00
Matthias Pfefferle
3d1a0af6cb
moved strip style/script
2023-05-23 11:13:17 +02:00
Matthias Pfefferle
677d507fe9
Revorked "sanitize output"
...
This reverts commit 77873d12b3
.
2023-05-23 11:10:05 +02:00
Matthias Pfefferle
cfb162c620
Merge branch 'master' into signature_verification
2023-05-17 09:59:02 +02:00
Matthias Pfefferle
4b294bb8a6
Merge branch 'master' into signature_verification
2023-05-16 08:15:35 +02:00
Matthias Pfefferle
2e537e423c
Merge branch 'master' into add/rest-namespace-constant
2023-05-16 08:10:06 +02:00
Matthias Pfefferle
ec23742b9a
Merge pull request #318 from Automattic/schedule
...
update scheduler for followers
2023-05-16 08:08:42 +02:00
Matthias Pfefferle
8b9026ab5e
fix get_post_content_template function
2023-05-15 10:55:07 +02:00
Matthias Pfefferle
7456d36834
use const instead of -1
2023-05-15 10:48:34 +02:00
Matt Wiebe
3fa5e4f37e
now with more use
2023-05-12 15:31:53 -05:00
Matt Wiebe
314ccf43a6
add a get_rest_url_by_path
helper function, and use it
2023-05-12 15:24:24 -05:00
Matthias Pfefferle
94e5539d75
reset errors if new is set
2023-05-12 10:23:58 +02:00
Matt Wiebe
abfa7c7969
Allow setting the REST namespace with ACTIVITYPUB_REST_NAMESPACE
2023-05-11 13:25:30 -05:00
Matthias Pfefferle
b803914180
removed output formatting
2023-05-11 09:46:26 +02:00
Matthias Pfefferle
26a1dc9be5
use time() instead of strtotime( 'now' )
2023-05-10 18:52:13 +02:00
Matthias Pfefferle
154b0018af
PHPDoc
2023-05-10 15:36:45 +02:00
Matthias Pfefferle
df02d2202e
PHPDoc
2023-05-10 15:02:01 +02:00
Matthias Pfefferle
17b66cb23d
implement cleanup_followers
and update_followers
2023-05-10 14:18:56 +02:00
Matthias Pfefferle
6ba8156e50
fix #320
2023-05-05 14:40:17 +02:00
Jeremy Herve
c7dc55047d
Merge pull request #309 from jeherve/update/jetpack-photon-filter
2023-05-04 18:02:10 +02:00
Matthias Pfefferle
f07869c7d1
be sure to always update date
2023-05-03 15:11:20 +02:00
Matthias Pfefferle
dea5f38561
better error handling
2023-05-02 14:39:25 +02:00
Matthias Pfefferle
22946ec779
change migration script to match plugin version
...
/cc @akirk
2023-05-02 09:27:35 +02:00
Matthias Pfefferle
a673504d36
Merge branch 'master' into rewrite-followers
2023-04-28 17:38:30 +02:00
Matthias Pfefferle
ec822535c9
Follower object should not make any remote calls
2023-04-27 09:57:50 +02:00
Matthias Pfefferle
0ee1266c30
add sanitize callbacks
2023-04-26 17:23:28 +02:00
Jeremy Herve
bd75603fc7
Remove comment about Jetpack's Photon
2023-04-26 10:47:49 +02:00
Jeremy Herve
e16e119e6c
Switch to general actions and filter
...
As a result, we will not modify the images within the ActivityPub plugin, but the hooks will allow third-parties to do it on their end.
See discussion: https://github.com/pfefferle/wordpress-activitypub/pull/309#issuecomment-1521488186
2023-04-26 10:45:35 +02:00
Jeremy Herve
da63763ddc
Compat: only disable Jetpack's image CDN via filter
...
This follows the discussion in #307 .
1. Do not disable Jetpack's image CDN in ActivityPub requests by default.
2. Add a new filter, activitypub_images_use_jetpack_image_cdn, that site owners can use to disable Jetpack's Image CDN if they'd like to.
3. Extract image getting into its own method for improved readability.
2023-04-25 10:54:21 +02:00
Matthias Pfefferle
377fc94161
php doc
2023-04-25 09:09:07 +02:00
Matthias Pfefferle
84a82c2ac4
added follower model
2023-04-24 20:46:51 +02:00
Jeremy Herve
56d2b7e8be
Update to handle both old and new versions of Jetpack
...
See https://github.com/Automattic/jetpack/pull/30050/
2023-04-24 09:51:08 +02:00
Jeremy Herve
3f4c44db05
Compatibility: do not serve images with Jetpack CDN when active
...
When Jetpack's image CDN is active, core calls to retrieve images return an image served by the CDN.
Since Fediverse instances usually fetch and cache the data themselves, we do not need to use the CDN for those images when returned by the ActivityPub plugin. In fact, we really do not want that to happen, as Fediverse instances may get errors when trying to fetch images from the CDN (they may get blocked / rate-limited / ...).
Let's hook into Jetpack's CDN to avoid that.
2023-04-24 09:51:08 +02:00
Matthias Pfefferle
47dc2f72d1
fix "bulk replace" issue
2023-04-24 09:49:06 +02:00
Matthias Pfefferle
28c077e422
Add URL
2023-04-23 22:56:45 +02:00
Matthias Pfefferle
eeb3ba2952
remove unused "use function"
2023-04-20 15:32:38 +02:00
Matthias Pfefferle
c32eec2390
some code cleanup
2023-04-20 15:22:11 +02:00
Matthias Pfefferle
cf426ab8ab
Merge pull request #265 from pfefferle/optimize-publish
...
optimize publishing
2023-04-20 15:04:34 +02:00
Matthias Pfefferle
c99d25b12e
whitelist more html elements
...
fix #285
2023-03-03 08:56:15 +01:00
Matthias Pfefferle
753f964ce9
fix #286
2023-03-03 08:55:23 +01:00
Matthias Pfefferle
08ce46a1a4
Merge branch 'master' into optimize-publish
2023-02-20 18:22:17 +01:00
Matthias Pfefferle
21cff7f24b
version bump
2023-02-20 18:17:02 +01:00
Matthias Pfefferle
73ae7a5d75
fix content creation
...
and added tests
2023-02-20 18:08:10 +01:00
Matthias Pfefferle
92b11a3926
use html version of the link as before
2023-02-08 10:06:22 +01:00
Matthias Pfefferle
70859212d6
fix #196
2023-02-02 08:50:17 +01:00
Matthias Pfefferle
531bdc17b0
fix #266
2023-02-02 08:18:10 +01:00
Matthias Pfefferle
73ae47e377
PHPDoc
2023-02-02 07:24:27 +01:00
Matthias Pfefferle
de32cb7b73
add changes also to the object
2023-02-02 02:36:29 +01:00
Matthias Pfefferle
e52181fd37
fix tests
2023-02-02 02:04:06 +01:00
Matthias Pfefferle
e015da7f8f
optimize publishing
2023-02-02 01:42:15 +01:00
Alex Kirk
0925405430
Fix missing id
2023-01-27 15:48:28 +01:00
Alex Kirk
483e0a85b2
Extract mentions from the unmodified post content.
2023-01-27 15:48:28 +01:00
Alex Kirk
e065880085
Add ActivityPub mentions
2023-01-27 15:48:28 +01:00
Alex Kirk
b5c4f473de
Start adding support for outgoing mentions
2023-01-27 15:48:28 +01:00
Alex Kirk
6b8fb5af0c
Fix accessing post properties
2023-01-27 14:28:56 +01:00
Matthias Pfefferle
dbaddd9189
Simplified and optimized code
...
based on the Shortcode changes
2023-01-27 10:21:51 +01:00
Matthias Pfefferle
281ed2a8c2
remove old shortcode code
2023-01-23 23:51:27 +01:00
Matthias Pfefferle
7be74c1837
fix upgrade call
2023-01-23 21:24:54 +01:00
Matthias Pfefferle
4d75ade22b
strong is not supported
2023-01-23 21:08:59 +01:00
Matthias Pfefferle
c93f02615d
always escape output
2023-01-23 20:59:39 +01:00
Matthias Pfefferle
cb1c26a365
use static method to upgrade post content to shortcodes
2023-01-23 20:31:14 +01:00
Matthias Pfefferle
b458cc6b88
coding standard
2023-01-23 20:13:56 +01:00
Matthias Pfefferle
aec21a489c
coding standards
2023-01-23 19:43:34 +01:00
Greg
71f3a47589
Converted shortcode class to static.
...
And added options for shortlink/permalink type.
2023-01-23 11:59:13 -05:00
Greg
3a82891948
Minor cleanups.
2023-01-22 11:27:13 -05:00
Greg
b5fa16b464
Move the shortcodes to their own class.
2023-01-22 01:13:46 -05:00
Greg Ross
621911d1bf
Merge branch 'pfefferle:master' into switch-to-shortcodes
2023-01-22 00:36:06 -05:00
Greg
bc8e46e121
Fix shortcode output.
2023-01-16 12:51:18 -05:00
Greg
4a17bb4ea7
Separate the shortcode upgrade function and call it in the settings.
2023-01-16 10:27:27 -05:00
Greg
caea1ecbed
Make sure we have a post before using it to set class variables with.
2023-01-16 10:26:38 -05:00
Matthias Pfefferle
2f0dbde2a4
fix phpcs issues
2023-01-16 15:28:10 +01:00
Matthias Pfefferle
5118f00a1e
Merge pull request #247 from toolstack/fix-the-excerpt
...
Make the excerpt code actually crop the excerpt at 400 characters.
2023-01-16 15:04:47 +01:00
Greg
bf6cf24b17
Add length to excerpt shortcode.
2023-01-13 16:11:52 -05:00
Greg
e7d3cf9d68
Convert template codes to shortcodes.
...
As well as add new shortcodes for:
[ap_hashcats] - The post's categories as hashtags
[ap_image] - The URL for the post's featured image, full size
[ap_thumbnail] - The URL for the post's featured image thumbnail size
[ap_author] - The author's name
[ap_authorurl] - The URL to the author's profile page
[ap_date] - The post's date
[ap_time] - The post's time
[ap_datetime] - The post's date/time formated as "date @ time"
[ap_blogurl] - The URL to the site
[ap_blogname] - The name of the site
[ap_blogdesc] - The description of the site
2023-01-13 15:47:13 -05:00
Greg
27aeaeb4e4
Fix incorrect setting of target length and spelling mistake.
2023-01-13 11:02:16 -05:00
Matthias Pfefferle
c7044f7ede
Merge pull request #248 from mexon/configure-number-of-images
...
configuration item for number of images to attach
2023-01-13 08:58:45 +01:00
Matthias Pfefferle
c06a7d44cf
re-added max_images check
...
props @mexon
2023-01-12 22:21:48 +01:00
Matthias Pfefferle
6992fbbe22
simplified ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS
2023-01-12 21:55:33 +01:00
Matthew Exon
1e7e6bba28
standardise and improve name of attachment setting
2023-01-12 21:29:21 +01:00
Matthew Exon
d1765b56dd
configuration item for number of images to attach
2023-01-07 17:58:50 +01:00
Greg
43f347bc7c
Make the excerpt code actually crop the excerpt at 400 characters.
...
The existing implementation crops at words and may return very short strings based upon filters, or very long strings based upon user inputted excerpts.
Make sure we never return a excerpt longer than we expect.
2023-01-06 20:04:31 -05:00
Matthias Pfefferle
a548d1fe0f
get_post_meta need the post ID
2022-12-27 16:58:49 +01:00
Matthias Pfefferle
6878b86922
fix test
2022-12-27 15:56:46 +01:00
Matthias Pfefferle
c221daef86
store permalink in post meta for trashed posts
...
this should quick fix #16 without changing the permalink structure
2022-12-27 15:48:14 +01:00
Alex Kirk
5f6cf78da1
Add a parser to the Friends Plugin
2022-11-09 07:08:32 -07:00