Home Forums Theme support Theme Tycoo: Error Messages after Server Shutdown Reply To: Theme Tycoo: Error Messages after Server Shutdown

code to 2./3././5.

if(isset($sidebars))
	{
	for( $i=0; $i<count($sidebars); $i++ )
		{
		$ix=$i+20;
		if(isset($sidebars[$i]))
			{
			if($sidebars[$i]!="")
				{
				$sidebar_names[]=$sidebars[$i];
				$sidebar_ids[]="sidebar-".$ix;
				}
			}
		}
	}

code to 6./7.

$my_sidebars=load_option("sidebars");
if(isset($my_sidebars))
	{
	for( $i=0; $i<count($my_sidebars); $i++ )
		{
		$ix=$i+20;
		if(isset($my_sidebars[$i]))
			{
			if($my_sidebars[$i]!="")
				{
				register_sidebar( array(
					'name' => 'Sidebar '.$my_sidebars[$i],
					'id' => 'sidebar-'.$ix,
					'before_widget' => '<aside id="%1$s" class="'.$my_sidebars[$i].'-sidebar widget %2$s"><div>',
					'after_widget' => "</div></aside>",
					'before_title' => '<h3 class="widget-title">',
					'after_title' => '</h3>',
				) );
				}
			}
		}
	}
?>

code to function error 1./8.

function wr_wp_get_attachment( $attachment_id ) {

	$attachment = get_post( $attachment_id );
	return array(
		'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
		'caption' => $attachment->post_excerpt,
		'description' => $attachment->post_content,
		'href' => get_permalink( $attachment->ID ),
		'src' => $attachment->guid,
		'title' => $attachment->post_title
	);
}