Changeset 391166
- Timestamp:
- 05/31/2011 09:47:56 AM (15 years ago)
- Location:
- related-images
- Files:
-
- 7 added
- 2 edited
-
tags/1.2.2 (added)
-
tags/1.2.2/readme.txt (added)
-
tags/1.2.2/related-images.class.php (added)
-
tags/1.2.2/related-images.js (added)
-
tags/1.2.2/related-images.php (added)
-
tags/1.2.2/screenshot-1.png (added)
-
tags/1.2.2/style.css (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/related-images.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
related-images/trunk/readme.txt
r389312 r391166 15 15 Version 1.0 only have 4 positions (top_firstpage,right_firstpage,left_firstpage,top_article), this will be moved to a config in the future for better use. 16 16 17 Update: fron version 1.2 you can create your positions yourself 18 17 19 == Installation == 18 20 … … 24 26 25 27 == Changelog == 28 29 = 1.2.2 = 30 * bugfix, wrong post version number used 26 31 27 32 = 1.2.1 = -
related-images/trunk/related-images.class.php
r389263 r391166 87 87 global $wpdb; 88 88 89 // save to the correct post_id 90 $post_id = get_post($post_id)->post_parent; 91 89 92 // get saved positions 90 93 if($_POST['saved_img_position']){ … … 105 108 } 106 109 107 // check if we have any positions at all 108 $len = sizeof($cleaned); 109 110 // if we do, save or not 111 if($len > 0){ 112 update_option($post_id."_related_images", $cleaned); 113 } else { 114 delete_option($post_id."_related_images"); 110 // do not save if arr not exits, for example in the Quick "Edit" 111 if($cleaned){ 112 113 // check if we have any positions at all 114 $len = sizeof($cleaned); 115 116 // if we do, save or not 117 if($len > 0){ 118 update_option($post_id."_related_images", $cleaned); 119 } else { 120 delete_option($post_id."_related_images"); 121 } 122 115 123 } 116 124
Note: See TracChangeset
for help on using the changeset viewer.