[wp-trac] Re: [WordPress Trac] #4280: Allow to constrain widgets
being displayed on certain page types only
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 4 10:30:50 GMT 2008
#4280: Allow to constrain widgets being displayed on certain page types only
----------------------------+-----------------------------------------------
Reporter: torbens | Owner: mufasa
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.6
Component: Administration | Version: 2.2
Severity: normal | Resolution:
Keywords: needs-patch |
----------------------------+-----------------------------------------------
Comment (by sharebrain):
hey mufasa,
i fixed it roughly: just adding (array) in front of the variables so the
function assumes data to be an array and won't drop an error. fixing
needed on lines 251 and 255 - file attached.
Starting Line 249
{{{
<?php
$widget_display_options=get_option('widget_display_option');
$widget_dipslay_array=array_keys((array)
$widget_display_options);
foreach($widget_dipslay_array as
$widget_display) {
$display_checked[$widget_display]="checked='checked'";
}
foreach ((array) $widget_display_options
as $widget_display_key=>$widget_display_on) {
if
(!is_array($widget_display_options[$id_format.'-display'])) {
$all_checked='1';
}else{
}}}
Ending Line 258
--
Ticket URL: <http://trac.wordpress.org/ticket/4280#comment:24>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list