WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unfiltered MU and Multisite WordPress 3.3.1? (3 posts)

  1. nadaoneal
    Member
    Posted 2 years ago #

    Has anyone been able to get the Unfiltered MU plugin or code like jroakes' here to work on Multisite 3.3.1?

    These code examples have only definitely been tested with 3.1 Multisite, so I'm wondering if something changed between 3.1 and 3.3 to make lines like:

    $wp_roles->role_objects['administrator']->add_cap( 'unfiltered_html' );
    	$wp_roles->role_objects['administrator']->add_cap( 'edit_theme_options' );
    	$wp_roles->role_objects['administrator']->add_cap( 'edit_themes' );
    	$wp_roles->role_objects['editor']->add_cap( 'unfiltered_html' );

    have no effect.

    I've tried a variety of variations on these plugins, in both the mu-plugins folder and the plugins folder, and they seem to simply have no effect. I'm not getting any errors whatsoever, either in WordPress or the Apache log.

    I'm interested in blanket granting the unfiltered_html, edit_theme_options, and edit_themes capabilities to all blog admins, plus unfiltered_html to blog editors. We have a closed registration multisite instance in a professional context, so we understand the risks involved but would like to take them anyway. :)

    Thanks to anyone for any advice or guidance. I'm by no means married to these plugins so if you have a completely different suggestion, I'll be happy to try it.

  2. Grab this file from the dev version: http://svn.wp-plugins.org/unfiltered-mu/trunk/unfiltered-mu.php

    Add it to your install. See if it works.

    (The rest of you, don't use this plugin ;) )

  3. nadaoneal
    Member
    Posted 2 years ago #

    Thanks! Embarrassingly, it looks like that's v1.3.1, identical to the currently available version, AND that it works just fine for me in 3.3.1 now, all of the sudden. So I may have had a brain meltdown of some kind causing it to appear to not be working.

    In case anyone else is reading this and is curious.... To also add the the edit_themes/theme_options capabilities for administrators, I did two things.

    (1) To um_unfilter_roles() I added:

    $wp_roles->role_objects['administrator']->add_cap( 'edit_themes' );
    $wp_roles->role_objects['administrator']->add_cap( 'edit_theme_options' );

    (2) To um_unfilter_multisite() I changed the condition to:
    ( $cap == 'unfiltered_html' OR $cap == 'edit_themes' OR $cap == 'edit_theme_options' )

Topic Closed

This topic has been closed to new replies.

About this Topic