';
return $content;
}
// Custom Header API
// Check to see if it exists first
if (function_exists('add_custom_image_header')) {
define('HEADER_TEXTCOLOR', 'b9b9b9');
define('HEADER_IMAGE', '%s/img/logo.gif'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 125);
define('HEADER_IMAGE_HEIGHT', 185);
function header_style() {
?>
guid;
?>
'
', 'title_after'=>'
', 'show_images'=>true));
} else {
// Queries db for links, gets stuff to display
global $wpdb;
// Results are for 2.0-style links
$cats = $wpdb->get_results("
SELECT DISTINCT link_category, cat_name, show_images,
show_description, show_rating, show_updated, sort_order,
sort_desc, list_limit
FROM `$wpdb->links`
LEFT JOIN `$wpdb->linkcategories` ON (link_category = cat_id)
WHERE link_visible = 'Y'
AND list_limit <> 0
ORDER BY cat_name ASC", ARRAY_A);
if ($cats) {
foreach ($cats as $cat) {
$orderby = $cat['sort_order'];
$orderby = (bool_from_yn($cat['sort_desc'])?'_':'') . $orderby;
// Display the category name
echo '
' . $cat['cat_name'] . "
\n\t
\n";
// Call get_links() with all the appropriate params
get_links($cat['link_category'],
'
',"
","\n",
bool_from_yn($cat['show_images']),
$orderby,
bool_from_yn($cat['show_description']),
bool_from_yn($cat['show_rating']),
$cat['list_limit'],
bool_from_yn($cat['show_updated']));
// Close the last category
echo "\n\t
\n
\n";
}
}
}
}
// Sandbox widgets: initializes Widgets for the Sandbox
function sandbox_widgets_init() {
if ( !function_exists('register_sidebars') )
return;
// Overrides the Widgets default and uses
's for sidebar headings
$p = array(
'before_title' => "
",
'after_title' => "
\n",
);
// How many? Two?! That's it?
register_sidebars(2, $p);
// Registers the widgets specific to the Sandbox, as set earlier
unregister_widget_control('search');
register_sidebar_widget(__('Links', 'iodiir'), 'widget_sandbox_links', null, 'links');
unregister_widget_control('links');
}
// Check for updates, if selected
$iodiir_updater = get_option('iodiir_check_update');
if ($iodiir_updater == "Dashboard") {
add_action('activity_box_end', 'iodiir_version');
} else if ($iodiir_updater == "Options Page") {
add_action('iodiir_opts', 'iodiir_version');
}
// Custom header
add_custom_image_header('header_style', 'iodiir_admin_header_style');
// Runs our code at the end to check that everything needed has loaded
add_action('init', 'sandbox_widgets_init');
add_action('admin_menu', 'iodiir_add_admin');
add_action('the_content', 'iodiir_sig');
add_action('the_content_rss', 'iodiir_sig');
// Adds filters for greater compliance
add_filter('archive_meta', 'wptexturize');
add_filter('archive_meta', 'convert_smilies');
add_filter('archive_meta', 'convert_chars');
add_filter('archive_meta', 'wpautop');
?>