[wp-hackers] Prevent display of dynamic sidebar in widgets.php

Andy Charrington-Wilden andycharrington at gmail.com
Sun May 15 16:17:08 UTC 2011


Just thinking out loud now. Another way of doing it would be to assign user levels to the editing of dynamic sidebars. For example- 

If user role < administrator
     Allow editing/dashboard viewing of sidebars with ids in ('mysidebar1', 'mysidebar2')
Elseif role == administrator
     Allow editing/dashboard viewing of sidebars with ids of ('mysidebar3')

That way I can just put a non existent role in there so no one will ever see the particular sidebars in widgets.php. 

I guess the only possible sticking point there is that the above logic may affect the way I am pulling the sidebars in to the plugin. Although I suppose that could be overcome by adding logic to detect the page the sidebars are being rendered on. 

Hhhmmmm. 

Ps. Dan, didn't mean to seem abrupt with my comment! Reading it back it seems quite rude! Sorry! I tend to forget not to work on weekends! :-) 

Sent from my iPhone

On 15 May 2011, at 16:24, Dan Milward <dan at instinct.co.nz> wrote:

> You do realize its the weekend ;)
> 
> On 15/05/11 11:23 PM, Andy Charrington-Wilden wrote:
>> Wow! I've never known a question go unanswered! I realize it's a strange question and probably not something anyone has ever done before. I guess I'm just seeing if anyone has any bright ideas?
>> 
>> Thanks a lot
>> 
>> Andy
>> 
>> Sent from my iPhone
>> 
>> On 14 May 2011, at 22:24, Andy Charrington-Wilden<andycharrington at gmail.com>  wrote:
>> 
>>> Hi all
>>> 
>>> I am trying to find a way to exclude a dynamic sidebar from the default widgets page (widgets.php) in wp-admin. I know it sounds crazy but I am using dynamic sidebars as part of a plugin and as such don't want the user to be able to assign widgets to the sidebars my plugin creates.
>>> 
>>> Does that makes sense? I hope so!
>>> 
>>> I haven't found any hooks I can use, so am wondering if the only option is to use CSS to hide the sidebar in widgets.php. Not the ideal solution to be honest so was hoping someone here had some bright ideas!
>>> 
>>> Thanks a lot
>>> 
>>> Andy
>>> 
>>> Sent from my iPhone
>>> 
>>> On 11 Apr 2011, at 22:40, Brian Layman<wp-hackers at thecodecave.com>  wrote:
>>> 
>>>> On 4/11/2011 2:58 PM, Andy Charrington wrote:
>>>>> I am trying to set up a test environment for a multisite install and figured
>>>>> that the most realistic tests would be when done with actual data from from
>>>>> the target site. So...
>>>>> Would somebody mind explaining and/or pointing me in the right direction??
>>>> Leaving port 3306 wide open is generally a bad idea.  You'll eventually be hacked or have a slow mysql server due to all the servers out there continuously trying passwords.
>>>> 
>>>> What you are trying to do will work. IF you really want to do this test, figure out your hostgator IP address and then contact wired tree and then can setup a iptables rule to open 3306 for only that server on your vps.  Additionally you'll need to make sure that you are able to make the out bound connection from the hostgator side.  It is likely blocked by default.  If you have ssh access on your host gator account, I would use mysql from the command line to make sure that part is working before trying to diagnose more wide ranging issues.
>>>> 
>>>> Beyond that you'll need to post to the support forums for help with a better definition of what you mean by an infinite loop...
>>>> 
>>>> Hope that helped.
>>>> -- 
>>>> 
>>>> Brian Layman
>>>> 
>>>> _______________________________________________
>>>> wp-hackers mailing list
>>>> wp-hackers at lists.automattic.com
>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list