Commit graph

36 commits

Author SHA1 Message Date
c7ff99e77f fix phpcs via phpcbf
Some checks failed
PHP_CodeSniffer / phpcs (push) Has been cancelled
Unit Testing / phpunit (5.6, 6.2) (push) Has been cancelled
Unit Testing / phpunit (7.0) (push) Has been cancelled
Unit Testing / phpunit (7.2) (push) Has been cancelled
Unit Testing / phpunit (7.3) (push) Has been cancelled
Unit Testing / phpunit (7.4) (push) Has been cancelled
Unit Testing / phpunit (8.0) (push) Has been cancelled
Unit Testing / phpunit (8.1) (push) Has been cancelled
Unit Testing / phpunit (8.2) (push) Has been cancelled
Unit Testing / phpunit (latest) (push) Has been cancelled
2023-11-25 10:43:08 +01:00
e5d19f2b6a fix phpdocs and some readability 2023-11-25 10:38:22 +01:00
768d190be0 move transofmrer function get_post_content_template to base class
fix: make in_array comparison strict
2023-11-25 10:37:54 +01:00
ed1b6b7e77 change hook name for registering transformers
follow WordPress coding style and coding style of this plugin
2023-11-22 14:58:06 +01:00
804cb0af1a fix phpcs errors 2023-11-22 14:24:25 +01:00
c857eee616 transformer: move all related code to \Activitypub\Transformer namespace 2023-11-22 13:59:39 +01:00
38be5865c2 initial draft: add/extendable-transformers 2023-11-20 18:15:54 +01:00
Matthias Pfefferle
a81e20a9ba
fix issue when locale is only two chars (#549)
for example  "de" instead of "de_DE"
2023-11-07 08:49:48 +01:00
Matt Wiebe
9ff4d1251a
Attachments: add support for audio 🔈 and video 📼 (#536)
* only in the block editor
* update settings page copy: media, not just images

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-10-27 15:55:44 -05:00
Matt Wiebe
53adfe6b80
PHP 8.1 compatibility (#533)
* PHP 8.1 compatibility

* Update compat.php

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-10-25 08:44:04 +02:00
Matt Wiebe
33b61ca2b9
Shortcodes: only register when needed (#526) 2023-10-19 14:46:31 -05:00
Matt Wiebe
ff58070a5e Revert "Shortcodes: only register when needed"
This reverts commit c4daffe5c6.
2023-10-18 16:21:20 -05:00
Matt Wiebe
c4daffe5c6 Shortcodes: only register when needed 2023-10-18 16:20:06 -05:00
Matthias Pfefferle
12b6750c94
do not overwrite $image_ids (#500)
to include post thumbnail also for block-parser.
2023-10-10 20:48:59 +02:00
Brandon Kraft
b956f5b088
Posts: add pre-fetch hook to allow plugins to hang filters on (#487)
Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-10-05 08:14:32 +02:00
Matthias Pfefferle
336f3e5a62
Fix various encoding issues (#477)
* fix html-entity issue in username

* remove kses

let other platforms decide what to allow and what not

* Remove html_entity_decode to prevent encoding issues (#454)

I've tested this on content which includes MarkDown, HTML, encoded entities, unencoded entities, etc.

Fixes #445

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* remove allowed tags

---------

Co-authored-by: Terence Eden <edent@users.noreply.github.com>
2023-10-02 17:11:56 +02:00
Matthias Pfefferle
444c4b2837
Fixes PHP warnings and remote delete (#468)
* fix #463

* fix delete

/cc #465 @janboddez

* add disclaimer to not use the same name as an author login

see #470

* check if url is cached before trashing it
2023-09-27 11:05:11 +02:00
Aslak Raanes
963b2795a6
Move [ap_hashtags] last in post in Content (#462) 2023-09-23 00:15:10 +02:00
Matt Wiebe
dd29775ae4
Activity: try to parse image IDs using blocks (#460)
This will prevent the issue of attaching images that don't were uploaded to the post but not used in the post

The post needs to be using blocks to get the introspection required.
2023-09-22 09:21:49 +02:00
Jeremy Herve
2568f6651d
Post images: fix a typo in the hook name (#429)
* Post images: fix a typo in the hook name

Follow-up to #309

It should be '_post', not twice '_pre'.

* let grunt create the readme.md

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-09-14 19:50:27 +02:00
Matt Wiebe
c748d12d89
fix lint issues (#406) 2023-08-30 14:23:20 -05:00
Matthias Pfefferle
049046be70
update endpoints (#390)
* add collection endpoint

* show featured posts

* more consistant wording

* backwards compatibility with php7.x

* compatibility with php5.6

* use ACTIVITYPUB_AUTHORIZED_FETCH instead

because the ACTIVITYPUB_SECURE_MODE could be misinterpreted with disabling the security mechanisms completely.

* the blog user follows all authors of a blog

if not in single_user mode

* phpdoc

* adding changes based on feedback from @jeherve

* global namespace

* better hashtag handling

should also fix #373 #239

thanks @jeherve for help and feedback!

* fix workflow
2023-08-09 13:07:30 +02:00
Matthias Pfefferle
b25231a355
Remove obsolete code
https://github.com/Automattic/wordpress-activitypub/pull/370#issuecomment-1652053210
2023-07-26 19:16:36 +02:00
Jeremy Herve
4ed4143d21
Post class: declare $attachments property
This should avoid PHP notices like this one when running PHP 8.2:

PHP Deprecated:  Creation of dynamic property Activitypub\Transformer\Post::$attachments is deprecated in /var/www/html/wp-content/plugins/activitypub/includes/transformer/class-post.php on line 249
2023-07-26 12:02:18 +02:00
Matt Wiebe
3512206d48 phpcbf fixes 2023-07-19 20:39:58 -05:00
Matthias Pfefferle
00fbc296b3 fix #343 2023-07-11 14:48:49 +02:00
Matthias Pfefferle
4a82edcd22 Revert "fix #358"
This reverts commit ad18edbcea.
2023-07-11 14:48:04 +02:00
Matthias Pfefferle
ad18edbcea fix #358 2023-07-11 14:40:31 +02:00
Matthias Pfefferle
8920c60c61 final fixes and more tests 2023-07-10 15:14:37 +02:00
Matthias Pfefferle
64d2d2995b oops 2023-07-10 11:49:43 +02:00
Matthias Pfefferle
69326d027c return blog-user when in single mode 2023-07-10 10:57:06 +02:00
Matthias Pfefferle
1269cc6248 better instancing 2023-07-05 15:33:16 +02:00
Matthias Pfefferle
52e644631a add missing attributed_to 2023-07-03 20:00:47 +02:00
Matthias Pfefferle
7c9258eb1d consistent use of namespaces 2023-07-03 19:25:49 +02:00
Matthias Pfefferle
493b8ffad5 use transformer instead of post-model 2023-07-03 17:59:42 +02:00
Matthias Pfefferle
359eabf671 use collection instead of factory 2023-07-03 11:20:44 +02:00