Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1070302

    On your demos,
    you show a player on top of the image, it shows up on “blog Grid view”, the blog post itself, and so on.
    The way enfold detects audio doesn’t work with Gutenberg,
    it only works if the audio is inserted using the “classic editor”, or inside a “classic” block in Gutenberg
    Can this be updated/fixed

    Any chance we could also make it work with podcasts managed with plugins such as Seriously Simple Podcasting

    Regards

    #1071263

    I edited includes/helper-post-format.php with this (there might be a more elegant way to do it but it works)

    if(!function_exists('avia_audio_content_filter'))
    {
    	function avia_audio_content_filter($current_post)
    	{
    		preg_match("![\[<]audio[^>]+?[src|source|mp3]=[\"\'](.+?)[\"\'][\]>][\[<]\/audio[\]>]!", $current_post['content'], $match_audio);
    
    		if(!empty($match_audio))
    		{
    			$current_post['before_content'] = do_shortcode('[audio src="'.$match_audio[1].'"][/audio]');
    			$current_post['content'] = str_replace($match_audio[0], "", $current_post['content']);
    		}
    
    		return avia_default_title_filter($current_post);
    	}
    }
    

    How would I go about defining this is my child theme, without editing enfold’s theme files,
    so that it would survive theme update.
    Any chance this will be implemented/fixed in a future release of enfold ?

    #1071375

    trying to get it to work with Seriously Simple Podcasting, but no success
    all my post with post-format “audio” now show a player, when only one of those posts actually has an audio podcast url in it’s meta field “audio_file”

    the code I used :

    
    if(!function_exists('avia_audio_content_filter'))
    {
    	function avia_audio_content_filter($current_post)
    	{
    		$match_audio = get_post_meta(get_the_ID(), 'audio_file', false);
    		if (!empty($match_audio))
    		{
    			$current_post['before_content'] = do_shortcode('[audio src="'.$match_audio[0].'"][/audio]');
    			$current_post['content'] = str_replace($match_audio[0], "", $current_post['content']);
    		}
    
    		return avia_default_title_filter($current_post);
    		
    	}
    }
    
    #1071407

    Hi pharefm,

    Enfold does not work with Gutenberg, you can use one or the other.

    Best regards,
    Victoria

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