<?php /** * dynwid_admin_edit.php - Options settings * * @version $Id: dynwid_admin_edit.php 532982 2012-04-18 17:35:12Z qurl $ * @copyright 2011 Jacco Drabbe */ // Plugins support DW_BP::detect(); DW_QT::detect(); DW_WPSC::detect(); DW_WPML::detect(); // Sanitizing some stuff $widget_id = isset($_GET['id']) && !empty($_GET['id']) ? esc_attr($_GET['id']) : ''; $return_url = isset($_GET['returnurl']) && !empty($_GET['returnurl']) ? esc_url($_GET['returnurl']) : ''; if (!array_key_exists($widget_id, $DW->registered_widgets)) { wp_die('WidgetID is not valid'); } ?> <style type="text/css"> label { cursor : default; } .condition-select { width : 300px; -moz-border-radius-topleft : 6px; -moz-border-radius-topright : 6px; -moz-border-radius-bottomleft : 6px;
$post = $GLOBALS['post']; $DW->message('post_id = ' . $post->ID); $post_type = get_post_type($post); $DW->message('Post Type = ' . $post_type); if ($post_type != 'post') { $DW->custom_post_type = TRUE; $DW->whereami = $post_type; $DW->message('Custom Post Type detected, page changed to ' . $DW->whereami); } } if ($DW->whereami == 'page') { // WPSC/WPEC Plugin Support include_once DW_MODULES . 'wpec_module.php'; include_once DW_MODULES . 'bp_module.php'; if (DW_WPSC::detect(FALSE)) { DW_WPSC::detectCategory(); } else { if (DW_BP::detect(FALSE)) { // BuddyPress Plugin Support -- else if needed, otherwise WPEC pages are detected as BP DW_BP::detectComponent(); } } } if ($DW->whereami == 'tax_archive') { $wp_query = $GLOBALS['wp_query']; $taxonomy = $wp_query->get('taxonomy'); $DW->custom_taxonomy = TRUE; $DW->whereami = 'tax_' . $taxonomy; $DW->message('Page changed to tax_' . $taxonomy . ' (term: ' . $wp_query->get_queried_object_id() . ')'); } $DW->dwList($DW->whereami);