Support » Plugin: Media Vault » Fix for downloads in latest WP version

  • Just add this code to functions.php to make the plugin work for new WP versions:

    function fix_protected_downloads($content)
    {
    	global $post;
    	if (!empty($post->post_password))
    	{
    		$content = str_replace('/wp-content/uploads', '/wp-content/uploads/_mediavault', $content);
    	}
    	return $content;
    }
    add_filter( 'the_content', 'fix_protected_downloads' );

    https://wordpress.org/plugins/media-vault/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fix for downloads in latest WP version’ is closed to new replies.