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

Andy Charrington-Wilden andycharrington at gmail.com
Sun May 15 18:21:13 UTC 2011


Yes I had considered unregistering them there and then reregistering them everytime someone hit the plugin page. But as you say, I believe the order of widgets would be lost. No dice. 

I'm currently looking at this

  20  $widgets_access = get_user_setting( 'widgets_access' );

and wondering if there's something there. I don't know anything about the widgets_access settings but maybe I could hook in to that and utilise it for entire sidebars. Don't know. Haven't really looked in to that one in any depth. 

Thank you though!

Sent from my iPhone

On 16 May 2011, at 19:02, Justin Tadlock <justin at justintadlock.com> wrote:

> You could use something like this:
> 
> add_action( 'load-widgets.php', 'my_unregister_sidebars' );
> 
> function my_unregister_sidebars() {
>    unregister_sidebar( 'your-sidebar-id' );
> }
> 
> I'm thinking that will remove all the widgets from the sidebar too, so it might not produce the desired functionality.
> 
> On 5/14/2011 4:24 PM, Andy Charrington-Wilden 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