Changeset 358169
- Timestamp:
- 03/10/2011 11:41:21 AM (15 years ago)
- Location:
- drop-zone/trunk
- Files:
-
- 2 edited
-
drop-zone.class.php (modified) (3 diffs)
-
drop-zone.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
drop-zone/trunk/drop-zone.class.php
r358149 r358169 15 15 $thumbnail_max_height = $instance['thumbnail_max_height']; 16 16 17 $postID = get_option($args[' id']);17 $postID = get_option($args['widget_id']); 18 18 19 19 // check if we have a thumb and the height/width is set … … 29 29 $the_widgets_pos_id = substr($args['widget_id'], strpos($args['widget_id'], "-") + 1); // we need the id 30 30 31 echo "<div class=\"widget-container\" data-url=\"".$link."\" data-index=\"0\" data-removable=\"true\" data-droppable=\"true\" data-position=\"".$args['id'].":".$ the_widgets_pos_id."\">";31 echo "<div class=\"widget-container\" data-url=\"".$link."\" data-index=\"0\" data-removable=\"true\" data-droppable=\"true\" data-position=\"".$args['id'].":".$args['widget_id']."\">"; 32 32 33 33 if($post_thumbnail_id){ … … 44 44 echo "</div>"; 45 45 } else { 46 echo "<div class=\"droppable widget-container\" data-url=\"".$post->guid."\" data-index=\"0\" data-droppable=\"true\" data-position=\"".$args['id'].":".$ the_widgets_pos_id."\">";46 echo "<div class=\"droppable widget-container\" data-url=\"".$post->guid."\" data-index=\"0\" data-droppable=\"true\" data-position=\"".$args['id'].":".$args['widget_id']."\">"; 47 47 echo "</div>"; 48 48 } -
drop-zone/trunk/drop-zone.php
r358149 r358169 5 5 Description: Drag drop frontend widget 6 6 Author: Johannes Fosseus 7 Version: 1.2 7 Version: 1.2.1 8 8 */ 9 9 … … 49 49 } 50 50 51 // split the position string 52 list ($widgetarea, $position) = explode(':', $_GET['infoBlock']['position']); 53 51 54 // find the "widgets id" 52 $widget_id = substr($_GET['infoBlock']['position'], strpos($_GET['infoBlock']['position'], ":") + 1); 53 54 // Find the widgets "position" 55 list ($position, $after) = explode(':', $_GET['infoBlock']['position']); 55 $widget_id = substr($position, strpos($position, "-") + 1); 56 56 57 57 // use it to get the specific widget options … … 79 79 } 80 80 81 echo $wp_registered_sidebars[$ position]['before_title']."<a href=\"".$_GET['infoBlock']['url']."\">".$post->post_title."</a>".$wp_registered_sidebars[$position]['after_title'];81 echo $wp_registered_sidebars[$widgetarea]['before_title']."<a href=\"".$_GET['infoBlock']['url']."\">".$post->post_title."</a>".$wp_registered_sidebars[$widgetarea]['after_title']; 82 82 83 83 if($show_excerpt){ … … 105 105 die(); 106 106 } 107 list ($ position, $after) = explode(':', $_POST['position']);107 list ($widgetarea, $position) = explode(':', $_POST['position']); 108 108 $postID = url_to_postid($_POST['url']); 109 109 $DropZone->remove($position,$postID);
Note: See TracChangeset
for help on using the changeset viewer.