Text To Speech

⌘K
  1. Home
  2. Docs
  3. Text To Speech
  4. Filters & Actions
  5. Apply Backend Filters and Actions ( Free Version )

Apply Backend Filters and Actions ( Free Version )

add_filter('tta__content_title', 'tta__content_title_callback', 10, 2);
function tta__content_title_callback($title, $post) {
	return $title;
}



add_filter('tta__content_description', 'tta__content_description_callback', 10, 4);
function tta__content_description_callback($description_sanitized, $description, $post_id, $post) {
	return $description_sanitized;
}



add_filter('tta__button_text_arr', 'tta__button_text_arr_callback', 10, 3);
function tta__button_text_arr_callback($text_arr, $atts, $content_read_time) {
	return [
		'listen_text' => 'Listen1',
		'pause_text'  => 'Pause1',
		'resume_text' => 'Resume2',
		'replay_text' => 'Replay2',
		'listen_hover_title' => 'listen title2',
		'pause_hover_title' => 'pause title2',
		'resume_hover_title' => 'resume title2',
		'replay_hover_title' => 'replay title2',
	];
}



add_filter('tts_player_customizations', 'tts_player_customizations_callback');

function tts_player_customizations_callback() {
	return [
	            '1' => [
                    'play' => "",// svg image
                    'pause' => "", // svg image
                    'replay' => "",
                    'resume' => "",
	            ]
            ];
}

How can we help?