Skip to content

Commit 7fa4155

Browse files
authored
Merge pull request #695 from 10up/fix/666
FE fixes for the Text to Speech controls
2 parents 3b7262a + 9f13923 commit 7fa4155

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

includes/Classifai/Features/TextToSpeech.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public function __construct() {
6666
public function setup() {
6767
parent::setup();
6868
add_action( 'rest_api_init', [ $this, 'register_endpoints' ] );
69+
70+
if ( $this->is_enabled() ) {
71+
add_filter( 'the_content', [ $this, 'render_post_audio_controls' ] );
72+
}
6973
}
7074

7175
/**
@@ -81,10 +85,6 @@ public function feature_setup() {
8185

8286
add_action( 'add_meta_boxes', [ $this, 'add_meta_box' ] );
8387
add_action( 'save_post', [ $this, 'save_post_metadata' ], 5 );
84-
85-
if ( $this->is_enabled() ) {
86-
add_filter( 'the_content', [ $this, 'render_post_audio_controls' ] );
87-
}
8888
}
8989

9090
/**
@@ -621,7 +621,7 @@ public function render_post_audio_controls( string $content ): string {
621621
wp_enqueue_style(
622622
'classifai-post-audio-player-css',
623623
CLASSIFAI_PLUGIN_URL . 'dist/post-audio-controls.css',
624-
array(),
624+
array( 'dashicons' ),
625625
get_asset_info( 'post-audio-controls', 'version' ),
626626
'all'
627627
);

0 commit comments

Comments
 (0)