fix #620
This commit is contained in:
parent
a8078ce72b
commit
e915b7af8b
4 changed files with 29 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
# ActivityPub #
|
# 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/)
|
**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
|
**Tags:** OStatus, fediverse, activitypub, activitystream
|
||||||
**Requires at least:** 4.7
|
**Requires at least:** 5.5
|
||||||
**Tested up to:** 6.4
|
**Tested up to:** 6.4
|
||||||
**Stable tag:** 1.3.0
|
**Stable tag:** 1.3.0
|
||||||
**Requires PHP:** 5.6
|
**Requires PHP:** 5.6
|
||||||
|
|
|
@ -389,7 +389,7 @@ class Activitypub {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private static function register_post_types() {
|
private static function register_post_types() {
|
||||||
register_post_type(
|
\register_post_type(
|
||||||
Followers::POST_TYPE,
|
Followers::POST_TYPE,
|
||||||
array(
|
array(
|
||||||
'labels' => array(
|
'labels' => array(
|
||||||
|
@ -406,7 +406,7 @@ class Activitypub {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
register_post_meta(
|
\register_post_meta(
|
||||||
Followers::POST_TYPE,
|
Followers::POST_TYPE,
|
||||||
'activitypub_inbox',
|
'activitypub_inbox',
|
||||||
array(
|
array(
|
||||||
|
@ -416,7 +416,7 @@ class Activitypub {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
register_post_meta(
|
\register_post_meta(
|
||||||
Followers::POST_TYPE,
|
Followers::POST_TYPE,
|
||||||
'activitypub_errors',
|
'activitypub_errors',
|
||||||
array(
|
array(
|
||||||
|
@ -432,7 +432,7 @@ class Activitypub {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
register_post_meta(
|
\register_post_meta(
|
||||||
Followers::POST_TYPE,
|
Followers::POST_TYPE,
|
||||||
'activitypub_user_id',
|
'activitypub_user_id',
|
||||||
array(
|
array(
|
||||||
|
@ -444,7 +444,7 @@ class Activitypub {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
register_post_meta(
|
\register_post_meta(
|
||||||
Followers::POST_TYPE,
|
Followers::POST_TYPE,
|
||||||
'activitypub_actor_json',
|
'activitypub_actor_json',
|
||||||
array(
|
array(
|
||||||
|
@ -456,7 +456,7 @@ class Activitypub {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
do_action( 'activitypub_after_register_post_type' );
|
\do_action( 'activitypub_after_register_post_type' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -76,3 +76,24 @@ if ( ! function_exists( 'array_is_list' ) ) {
|
||||||
return true;
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
=== ActivityPub ===
|
=== ActivityPub ===
|
||||||
Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife
|
Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife
|
||||||
Tags: OStatus, fediverse, activitypub, activitystream
|
Tags: OStatus, fediverse, activitypub, activitystream
|
||||||
Requires at least: 4.7
|
Requires at least: 5.5
|
||||||
Tested up to: 6.4
|
Tested up to: 6.4
|
||||||
Stable tag: 1.3.0
|
Stable tag: 1.3.0
|
||||||
Requires PHP: 5.6
|
Requires PHP: 5.6
|
||||||
|
|
Loading…
Reference in a new issue