| @@ -254,38 +254,8 @@ | ||
| 254 | 254 | return \apply_filters( 'activitypub_post_type_description', $description, $post_type->name, $post_type ); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |
| 258 | - * Get the maximum number of media attachments a post may federate. | |
| 259 | - * | |
| 260 | - * A per-post limit wins over the site-wide setting, and the filter has the final say. | |
| 261 | - * | |
| 262 | - * @since 9.3.0 | |
| 263 | - * | |
| 264 | - * @param int $post_id The post ID. | |
| 265 | - * | |
| 266 | - * @return int The maximum number of media attachments. | |
| 267 | - */ | |
| 268 | -function get_max_attachments( $post_id ) { | |
| 269 | - $max_media = \get_post_meta( $post_id, 'activitypub_max_image_attachments', true ); | |
| 270 | - | |
| 271 | - if ( ! \is_numeric( $max_media ) ) { | |
| 272 | - $max_media = \get_option( 'activitypub_max_image_attachments', ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS ); | |
| 273 | - } | |
| 274 | - | |
| 275 | - /** | |
| 276 | - * Filters the maximum number of media attachments allowed in a post. | |
| 277 | - * | |
| 278 | - * Despite the name suggesting only images, this filter controls the maximum number | |
| 279 | - * of all media attachments (images, audio, and video) that can be included in an | |
| 280 | - * ActivityPub post. The name is maintained for backwards compatibility. | |
| 281 | - * | |
| 282 | - * @param int $max_media Maximum number of media attachments. Default ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS. | |
| 283 | - */ | |
| 284 | - return (int) \apply_filters( 'activitypub_max_image_attachments', $max_media ); | |
| 285 | -} | |
| 286 | - | |
| 287 | -/** | |
| 288 | 258 | * Get the enclosures of a post. |
| 289 | 259 | * |
| 290 | 260 | * @param int $post_id The post ID. |
| 291 | 261 | * |