is_paying_or_trial() && ai_tts_get_option('enable_statistics') ) { // Track view when the post with an audio player is loaded ai_tts_track_view($post_id); } // Get audio player $audio_player = ''; $audio_player = apply_filters('ai_tts_audio_player', $audio_player, $post_id); // Add player label $show_player_label = ai_tts_get_option('show_player_label'); $player_label = ai_tts_get_option('player_label'); if($show_player_label && $player_label) { $audio_player .= '

'.esc_html($player_label).'

'; } else { $audio_player .= '
'; } $content = $audio_player . $content; } return $content; } /* * Create a shortcode for displaying the player in a custom area anywhere */ add_shortcode('ai_tts_player', 'ai_tts_player_shortcode'); function ai_tts_player_shortcode($atts) { remove_filter('the_content', 'ai_tts_add_audio_player'); return ai_tts_create_audio_player(); }