Skip to content

mastodon_api_default_post_type

Alex Kirk edited this page Feb 8, 2025 · 2 revisions

The default post type for posting from Mastodon apps when the configured to do so.

This only applies if the user unchekcks: Make posts through Mastodon apps appear on this WordPress

Example

add_filter( 'mastodon_api_default_post_type', function( $post_type ) {
   return 'my-own-custom-post-type';
} );

Parameters

  • string $post_type The default post type.

Files

apply_filters( 'mastodon_api_default_post_type', \Enable_Mastodon_Apps\Mastodon_API::POST_CPT )
apply_filters( 'mastodon_api_default_post_type', \Enable_Mastodon_Apps\Mastodon_API::POST_CPT )
apply_filters( 'mastodon_api_default_post_type', \Enable_Mastodon_Apps\Mastodon_API::POST_CPT )
apply_filters( 'mastodon_api_default_post_type', \Enable_Mastodon_Apps\Mastodon_API::POST_CPT )

Hooks

Clone this wiki locally