AtlasVoice Text To Speech

⌘K
  1. Home
  2. Docs
  3. AtlasVoice 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('tts__button_text_arr', 'tts__button_text_arr_callback', 10, 3);
function tts__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',
	];
}



(function () {
    if (typeof wp === 'undefined' || !wp.hooks || typeof wp.hooks.addFilter !== 'function') {
        return;
    }

    wp.hooks.addFilter('ttsProPlayerDesign', 'textToSpeech', function (obj) {
        return Object.assign({}, obj, {
            controls: [
                'play',
                'progress',
                'volume',
            ]
        });
    });
})();

How can we help?