This commit is contained in:
Matthias Pfefferle 2023-12-23 20:31:36 +01:00
parent a8078ce72b
commit e915b7af8b
4 changed files with 29 additions and 8 deletions

View file

@ -1,7 +1,7 @@
# ActivityPub #
**Contributors:** [automattic](https://profiles.wordpress.org/automattic/), [pfefferle](https://profiles.wordpress.org/pfefferle/), [mediaformat](https://profiles.wordpress.org/mediaformat/), [mattwiebe](https://profiles.wordpress.org/mattwiebe/), [akirk](https://profiles.wordpress.org/akirk/), [jeherve](https://profiles.wordpress.org/jeherve/), [nuriapena](https://profiles.wordpress.org/nuriapena/), [cavalierlife](https://profiles.wordpress.org/cavalierlife/)
**Tags:** OStatus, fediverse, activitypub, activitystream
**Requires at least:** 4.7
**Requires at least:** 5.5
**Tested up to:** 6.4
**Stable tag:** 1.3.0
**Requires PHP:** 5.6

View file

@ -389,7 +389,7 @@ class Activitypub {
* @return void
*/
private static function register_post_types() {
register_post_type(
\register_post_type(
Followers::POST_TYPE,
array(
'labels' => array(
@ -406,7 +406,7 @@ class Activitypub {
)
);
register_post_meta(
\register_post_meta(
Followers::POST_TYPE,
'activitypub_inbox',
array(
@ -416,7 +416,7 @@ class Activitypub {
)
);
register_post_meta(
\register_post_meta(
Followers::POST_TYPE,
'activitypub_errors',
array(
@ -432,7 +432,7 @@ class Activitypub {
)
);
register_post_meta(
\register_post_meta(
Followers::POST_TYPE,
'activitypub_user_id',
array(
@ -444,7 +444,7 @@ class Activitypub {
)
);
register_post_meta(
\register_post_meta(
Followers::POST_TYPE,
'activitypub_actor_json',
array(
@ -456,7 +456,7 @@ class Activitypub {
)
);
do_action( 'activitypub_after_register_post_type' );
\do_action( 'activitypub_after_register_post_type' );
}
/**

View file

@ -76,3 +76,24 @@ if ( ! function_exists( 'array_is_list' ) ) {
return true;
}
}
if ( ! function_exists( 'str_contains' ) ) {
/**
* Polyfill for `str_contains()` function added in PHP 8.0.
*
* Performs a case-sensitive check indicating if needle is
* contained in haystack.
*
* @param string $haystack The string to search in.
* @param string $needle The substring to search for in the `$haystack`.
*
* @return bool True if `$needle` is in `$haystack`, otherwise false.
*/
function str_contains( $haystack, $needle ) {
if ( '' === $needle ) {
return true;
}
return false !== strpos( $haystack, $needle );
}
}

View file

@ -1,7 +1,7 @@
=== ActivityPub ===
Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife
Tags: OStatus, fediverse, activitypub, activitystream
Requires at least: 4.7
Requires at least: 5.5
Tested up to: 6.4
Stable tag: 1.3.0
Requires PHP: 5.6