' . __('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.') . '
' . __('Error! Cannot delete a positon that does not exist.') . '
' . __('Error! Position key missing!') . '
' . __('Before you can add content you need to define some positions. These positions will be where your content appears.') . '
<div class="ads"> before, and </div> after.', 'ad-minister'); ?>
:
' . __('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 ''; } ?>