Skip to main content

Filter: classifai_pre_render_post_audio_controls

Filters the audio player markup before display.

Returning a non-false value from this filter will short-circuit building the block markup and instead will return your custom markup prepended to the post_content. Note that by using this filter, the custom CSS and JS files will no longer be enqueued, so you'll be responsible for either loading them yourself or loading custom ones.

Parameters

NameTypeDescription
$markupbool|stringAudio markup to use. Defaults to false.
$contentstringContent of the current post.
$_post\WP_PostThe Post object.
$audio_attachment_idintThe audio attachment ID.
$audio_attachment_urlstringThe URL to the audio attachment file.

Since

  • 2.2.3

Source

Defined in includes/Classifai/Features/TextToSpeech.php at line 743

Returns

Custom audio block markup. Will be prepended to the post content.

Ready to Get Started?

ClassifAI is a Free WordPress plugin that connects to your choice of AI platforms.