' . __('That position name already exists!') . '

'; $ok = false; } } if ($ok) { $positions[$name]['position'] = stripslashes($name); $positions[$name]['description'] = stripslashes($_POST['description']); $positions[$name]['before'] = stripslashes($_POST['before']); $positions[$name]['after'] = stripslashes($_POST['after']); if (!$positions[$name]['type']) $positions[$name]['type'] = 'widget'; if (!update_post_meta(get_option('administer_post_id'), 'administer_positions', $positions)) add_post_meta(get_option('administer_post_id'), 'administer_positions', $positions); } } } if ($_GET['action'] == 'confirm_delete') { if ($key = $_GET['key']) { $positions = get_post_meta(get_option('administer_post_id'), 'administer_positions', true); if (array_key_exists($key, $positions)) { // Remove the positon unset($positions[$key]); update_post_meta(get_option('administer_post_id'), 'administer_positions', $positions); // Orphane content if required foreach ($content as $con) { if ($con['position'] == $key) { $content[$con['id']]['position'] = ''; } } update_post_meta(get_option('administer_post_id'), 'administer_content', $content); echo '

' . __('Position deleted.') . '

'; } else echo '

' . __('Error! Cannot delete a positon that does not exist.') . '

'; } else echo '

' . __('Error! Position key missing!') . '

'; } $positions = get_post_meta(get_option('administer_post_id'), 'administer_positions', true); if (empty($positions)) echo '

' . __('Before you can add content you need to define some positions. These positions will be where your content appears.') . '

'; $positions_t = array(); $positions_w = array(); if (is_array($positions)) { foreach ($positions as $position) { if ($position['type'] == 'widget') $positions_w[$position['position']] = $position; if ($position['type'] == 'template') $positions_t[$position['position']] = $position; } } ksort($positions_t); ksort($positions_w); ?>

<div class="ads"> before, and </div> after.', 'ad-minister'); ?>

' . __('Warning!', 'ad-minister') . ' '; _e('You are editing a template position. If the description and wrapper code is also set in the template, then these values will reset when the template is reloaded.', 'ad-minister'); echo '

'; } ?>

:

' . __('Warning!', 'ad-minister') . ' '; _e('You are about to delete a template position. If the positions is still declared within the template, then this position will re-appear when the template is re-loaded.', 'ad-minister'); echo '

'; } ?>
' onclick="self.location='/wp-admin/tools.php?page=ad-minister&tab=positions'" /> ' />

Template Positions

', $string); $string = str_replace('%b%', '', $string); ?>
Wrapper
.

Widget Positions

placed your blog (On the widget page the positions below starts with \'Ad: \' on as to identify them).', 'ad-minister'); ?>

'; ?>
' . __('There are currently no widget positions', 'ad-minister') . '.

*/ ?>

Add new widget position