Make a magic tag work with Custom Post Types

[Comment reposted as answer at request of OP author:]

Rather than deleting them, why don’t you add your post_type to the if() statement:

//Don't process anything but POSTS and PAGES (i.e. no revisions)
if( $data['post_type'] != 'post' && $data['post_type'] != 'page' && $data['post_type'] != 'foto' )
    return $data;

As that comment in the code makes quite clear, without that statement, you’ll be processing all the revisions as well which probably isn’t what you want (considering that the plugin author disabled it).

(Also, “hacking” a plugin like this will only work until you need to update the plugin. Make sure to contact the plugin author and talk to them about supporting custom post types.)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)