Support » Plugin: Seriously Simple Podcasting » How can i change the text?

  • I’d like to add some tex before player. And i’d like to delete some standart text (download) and link below player. I’d like to change CSS-style of player block.

    How can i do it?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support itsjusteileen

    (@itsjusteileen)

    Hello @vegashost

    We have snippets and instructions available here in our help docks https://support.castos.com/article/54-customising-the-audio-player-and-episode-details This should get you started customizing those itmes.

    Cheers!
    Eileen

    Plugin Support Eileen Violini

    (@iviolini)

    Hello @vegashost

    We have snippets and instructions available here in our help docks https://support.castos.com/article/54-customising-the-audio-player-and-episode-details This should get you started customizing those itmes.

    Cheers!
    Eileen

    Thank you! It’s really helped me to delete some links. But i didn’t find how to add some text before player like “Don’t want to read? Listen it!”. How can i do it?

    That would be nice if in plugin settings i can edit the template of player. I really need this option for full freedom of developing and customising.

    Plugin Support itsjusteileen

    (@itsjusteileen)

    Hello @vegashost,

    Some options are available to edit from within the plugin like the colors and what subscription links you would like to display. The player itself can be changed under Podcast > Settings > General and you can add additional links under Podcast > Options. We don’t however have any text areas that can be added before or after the player, although this can be done within the WordPress editor itself. But thank you for the recommendation and we can certainly look at adding that feature request to our list.

    Cheers!

    How about this way?

    
    function add_my_text_before_player () {
      echo "Don't want to read? Listen it!";
      show_player ();
    }
    add_filter( 'show_player', 'add_my_text_before_player', 10, 3 );
    

    How called the function in your plugin which show all player?

    Plugin Author Jonathan Bossenger

    (@psykro)

    Hi @vegashost

    The filter you’ll need to use has been added to the filter reference here – https://secure.helpscout.net/docs/5bc72c7e2c7d3a04dd5bc7e2/article/5bc7531b042863158cc78ac1/

    The specific filter you can use would be the ssp_media_player filter. You can use this to add any specific HTML content before or after the player HTML

    eg

    
    add_filter( 'ssp_media_player', 'add_my_text_before_player', 10, 3 );
    function add_my_text_before_player( $player, $src_file, $episode_id ) {
    	/**
    	 * Create your custom HTML content and store it in a variable
    	 */
    	$my_content = '<p>Don\'t want to read? Listen it!</p>';
    	/**
    	 * Concatenate your custom content to the beginning of the $player HTML content
    	 */
    	$player = $my_content . $player;
    
    	/**
    	 * Return the updated $player HTML content
    	 */
    	return $player;
    }
    

    A few additional comments:

    1. It’s always better to register the action/filter hook first, and then the hooked function below it
    2. You can append any html content before or after the $player variable
    3. You must always return the updated $player content, or the media player won’t display
    4. If you don’t need/use the $src_file and $episode_id variables, you can update the number of parameters passed (when you add the filter) from 3 to 1, and it will only pass the first parameter ($player)

    Thank you @psykro for detailed explanation! It works well. My goal has reached.

    I don’t know why but when i changed the number of parameters passed from 3 to 1 my site was crushed. I returned quantity of parameters till 3 again because it’s not important now for me.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.