Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author TV productions

    (@tv-productions)

    Hi Phil,

    The point is that users other than Super Admin aren’t allowed to post unfiltered html. This means that the required tags that make the album work, are removed by WordPress.

    What you may try is this:

    /**
     * Makes sure the html content of an album doesn't get filtered
     * Unfiltered html is thus allowed when it is an album.
     */
    function epa_fix_albums_html_on_wp_ms($caps, $cap, $user_id, $args) {
        // Is the requested cap unfiltered_html?
        if ($cap !== 'unfiltered_html')
            return $caps;
    
        // Get the current post
        $post = get_post($args[1]);
        if ($post->post_type === 'easy-photo-album') {
            // No caps required
            return array();
        }
        // It is not an easy photo album
        return $caps;
    }
    add_filter('map_meta_cap', 'epa_fix_albums_html_on_wp_ms', 10, 4);

    I did’t had the chance to test it, but it should allow all users to post unfiltered html with photo albums. You have to put the code in a plugin for that is network activated. I recommend to create a plugin and put this code in it.

    I hope it will work.

    Thread Starter philhal

    (@philhal)

    Hi TV Productions Member (?)
    I’d like to thank you for the answer. I spent some times to learn how to make a plugin… then stopped because you gave the solution : finding a plugin that could disable unfiltered html for a certain category of users.
    I ignored the notion of “unfiltered html” even if I sometimes was victim of it.
    I found the “Remove KSES plugin”
    => Disables KSES for the WordPress Editor Role. Compatible with MU.
    The editor role for multisites member is correct to allow an album creation and publishing.

    Many thanks again
    Phil

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite Lightbox problem’ is closed to new replies.