0 ) { if ( ! is_null( $_GET['edit-ad'] ) && $existing_ads[ $_GET['edit-ad'] ] ) { $_SESSION['advertise-world-wp-plugin-editing-ad-id'] = $_GET['edit-ad']; } elseif ( $_SESSION['advertise-world-wp-plugin-editing-ad-id'] != null ) { return $_SESSION['advertise-world-wp-plugin-editing-ad-id']; } else { end( $existing_ads ); $last_id = (int) key( $existing_ads ); $_SESSION['advertise-world-wp-plugin-editing-ad-id'] = $last_id + 1; } } else { $_SESSION['advertise-world-wp-plugin-editing-ad-id'] = 0; } return $_SESSION['advertise-world-wp-plugin-editing-ad-id']; } /** * Displays dropdown box of available ad spaces. * * @since 1.0.0 */ function advertise_world_wp_options_new_ad_title() { ?>
| Ad Placement Area |
|---|
| '; advertise_world_wp_options_display_placements( $options, $chosen_type ); echo ' |
| Theme Specific Areas: |
| '; $options = Array(); foreach ( $theme_sidebars as $theme_sidebar ) { array_push( $options, array( $theme_sidebar['name'], $theme_sidebar['id'] ) ); } advertise_world_wp_options_display_placements( $options, $chosen_type ); echo ' |
| Position within specified area | ' . '
|---|
| ';
echo ' ';
global $wp_registered_widgets, $wp_registered_widget_controls;
$sort = $wp_registered_widgets;
usort( $sort, '_sort_name_callback' );
$done = array();
echo '';
foreach ( $options as $option ) {
call_user_func( $option[1], $option[0] );
}
echo ' ';
echo ' |