mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 14:23:31 +00:00
Fix Extra-Fields handling (#886)
This commit is contained in:
parent
15cff15bc1
commit
c180644ccc
6 changed files with 42 additions and 5 deletions
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [3.2.2] - 2024-09-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed: Extra-Fields check
|
||||
|
||||
## [3.2.1] - 2024-09-09
|
||||
|
||||
### Fixed
|
||||
|
@ -891,6 +897,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
* initial
|
||||
|
||||
[3.2.2]: https://github.com/Automattic/wordpress-activitypub/compare/3.2.1...3.2.2
|
||||
[3.2.1]: https://github.com/Automattic/wordpress-activitypub/compare/3.2.0...3.2.1
|
||||
[3.2.0]: https://github.com/Automattic/wordpress-activitypub/compare/3.1.0...3.2.0
|
||||
[3.1.0]: https://github.com/Automattic/wordpress-activitypub/compare/3.0.0...3.1.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**Tags:** OStatus, fediverse, activitypub, activitystream
|
||||
**Requires at least:** 5.5
|
||||
**Tested up to:** 6.6
|
||||
**Stable tag:** 3.2.1
|
||||
**Stable tag:** 3.2.2
|
||||
**Requires PHP:** 7.0
|
||||
**License:** MIT
|
||||
**License URI:** http://opensource.org/licenses/MIT
|
||||
|
@ -134,6 +134,10 @@ For reasons of data protection, it is not possible to see the followers of other
|
|||
|
||||
## Changelog ##
|
||||
|
||||
### 3.2.2 ###
|
||||
|
||||
* Fixed: Extra-Fields check
|
||||
|
||||
### 3.2.1 ###
|
||||
|
||||
* Fixed: Use `Excerpt` for Podcast Episodes
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: ActivityPub
|
||||
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
|
||||
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
|
||||
* Version: 3.2.1
|
||||
* Version: 3.2.2
|
||||
* Author: Matthias Pfefferle & Automattic
|
||||
* Author URI: https://automattic.com/
|
||||
* License: MIT
|
||||
|
@ -21,7 +21,7 @@ use function Activitypub\site_supports_blocks;
|
|||
require_once __DIR__ . '/includes/compat.php';
|
||||
require_once __DIR__ . '/includes/functions.php';
|
||||
|
||||
\define( 'ACTIVITYPUB_PLUGIN_VERSION', '3.2.1' );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_VERSION', '3.2.2' );
|
||||
|
||||
/**
|
||||
* Initialize the plugin constants.
|
||||
|
|
|
@ -498,7 +498,7 @@ class Admin {
|
|||
|
||||
$post = get_post( $arg[2] );
|
||||
|
||||
if ( Extra_Fields::is_extra_fields_post_type( $post->post_type ) ) {
|
||||
if ( ! Extra_Fields::is_extra_field_post_type( $post->post_type ) ) {
|
||||
return $allcaps;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,28 @@ class Extra_Fields {
|
|||
return \in_array( $post_type, array( self::USER_POST_TYPE, self::BLOG_POST_TYPE ), true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a post type is the `ap_extrafield` post type.
|
||||
*
|
||||
* @param string $post_type The post type.
|
||||
*
|
||||
* @return bool True if the post type is `ap_extrafield`, otherwise false.
|
||||
*/
|
||||
public static function is_extra_field_post_type( $post_type ) {
|
||||
return self::USER_POST_TYPE === $post_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a post type is the `ap_extrafield_blog` post type.
|
||||
*
|
||||
* @param string $post_type The post type.
|
||||
*
|
||||
* @return bool True if the post type is `ap_extrafield_blog`, otherwise false.
|
||||
*/
|
||||
public static function is_extra_field_blog_post_type( $post_type ) {
|
||||
return self::BLOG_POST_TYPE === $post_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add default extra fields to an actor.
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@ Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nur
|
|||
Tags: OStatus, fediverse, activitypub, activitystream
|
||||
Requires at least: 5.5
|
||||
Tested up to: 6.6
|
||||
Stable tag: 3.2.1
|
||||
Stable tag: 3.2.2
|
||||
Requires PHP: 7.0
|
||||
License: MIT
|
||||
License URI: http://opensource.org/licenses/MIT
|
||||
|
@ -134,6 +134,10 @@ For reasons of data protection, it is not possible to see the followers of other
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 3.2.2 =
|
||||
|
||||
* Fixed: Extra-Fields check
|
||||
|
||||
= 3.2.1 =
|
||||
|
||||
* Fixed: Use `Excerpt` for Podcast Episodes
|
||||
|
|
Loading…
Reference in a new issue