Wordpress question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iwantchixx
    Too lazy to set a custom title
    • Oct 2002
    • 12860

    #1

    Wordpress question

    How does one give access to a certain plugin to only a specific user on wordpress while blocking other users from being able to use it?

    Running Wp 3.1.x
  • iwantchixx
    Too lazy to set a custom title
    • Oct 2002
    • 12860

    #2
    .. or ..
    How does one only allow certain users to be able to embed an iframe code? Tips on either question will solve the dilema.

    Thanks.

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      i would create a role and do it based on that, and filter out iframe codes via the editor using a filter.
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • iwantchixx
        Too lazy to set a custom title
        • Oct 2002
        • 12860

        #4
        After much plugin database searching I actually just found, activated and configured a plugin that works great. Funny how one finds the answer right after asking for help lol

        A plugin called "multisite-plugin-manager" did the trick and allowed me to just activate an iframe loader on a trusted user's site manually.

        Comment

        • fris
          Too lazy to set a custom title
          • Aug 2002
          • 55679

          #5
          ahh ok, didnt know you were doing multisite.

          Code:
          <?php 
          
          // only admins will be allowed to post iframes or else it will strip them.
          // have a peek at http://codex.wordpress.org/Roles_and_Capabilities
          // set it to whatever level you want to be able to iframe 
          
          if ( !current_user_can('manage_options') ) { 
          
          function remove_iframe($content) {
              $content = get_the_content();
              $content = apply_filters('the_content', $content);
              $pattern = '/(<iframe.+?>)/';
              $content = preg_replace($pattern, '', $content);
              return $content;
          }
          
          add_filter('the_content','remove_iframe');
          
          }
          probably something like this without a plugin.
          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

          Comment

          Working...