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

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


Here's something. The inactive widgets section on widgets.php is actually a dynamic sidebar. See here- 

  50  register_sidebar(array(
  51      'name' => __('Inactive Widgets'),
  52      'id' => 'wp_inactive_widgets',
  53      'description' => '',
  54      'before_widget' => '',
  55      'after_widget' => '',
  56      'before_title' => '',
  57      'after_title' => '',
  58  ));

This is in wp-admin/widgets.php. And the sidebar "Inactive Widgets" does no display as a standard sidebar. Hhhmmmm.... So there is obviously already some logic that tells widgets.php to not render the inactive widgets sidebar as a standard dynamic sidebar. I will look in to that one. 

Also does anyone know if the 

sidebar_admin_setup
action may be of any use here?

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