![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
|
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
|
.. 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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
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. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
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'); }
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |