Changeset 640408
- Timestamp:
- 12/17/2012 09:30:14 AM (13 years ago)
- Location:
- prettyphot-single-image-zoom/trunk
- Files:
-
- 71 added
- 2 edited
-
ab_prettyphoto.php (modified) (6 diffs)
-
prettyPhoto_3.1.4 (added)
-
prettyPhoto_3.1.4/css (added)
-
prettyPhoto_3.1.4/css/prettyPhoto.css (added)
-
prettyPhoto_3.1.4/images (added)
-
prettyPhoto_3.1.4/images/fullscreen (added)
-
prettyPhoto_3.1.4/images/fullscreen/1.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/2.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/3.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/4.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/5.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/6.jpg (added)
-
prettyPhoto_3.1.4/images/fullscreen/high.gif (added)
-
prettyPhoto_3.1.4/images/fullscreen/huge.gif (added)
-
prettyPhoto_3.1.4/images/fullscreen/wide.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/btnNext.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/btnPrevious.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/contentPattern.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/default_thumbnail.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_rounded/sprite.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/btnNext.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/btnPrevious.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/contentPattern.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/default_thumbnail.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/dark_square/sprite.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/default_thumb.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/sprite.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/sprite_next.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/sprite_prev.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/sprite_x.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/default/sprite_y.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/btnNext.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/btnPrevious.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/contentPatternBottom.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/contentPatternLeft.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/contentPatternRight.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/contentPatternTop.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/default_thumbnail.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/facebook/sprite.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded/btnNext.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded/btnPrevious.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded/default_thumbnail.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_rounded/sprite.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square/btnNext.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square/btnPrevious.png (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square/default_thumbnail.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square/loader.gif (added)
-
prettyPhoto_3.1.4/images/prettyPhoto/light_square/sprite.png (added)
-
prettyPhoto_3.1.4/images/thumbnails (added)
-
prettyPhoto_3.1.4/images/thumbnails/flash-logo.png (added)
-
prettyPhoto_3.1.4/images/thumbnails/quicktime-logo.gif (added)
-
prettyPhoto_3.1.4/images/thumbnails/t_1.jpg (added)
-
prettyPhoto_3.1.4/images/thumbnails/t_2.jpg (added)
-
prettyPhoto_3.1.4/images/thumbnails/t_3.jpg (added)
-
prettyPhoto_3.1.4/images/thumbnails/t_4.jpg (added)
-
prettyPhoto_3.1.4/images/thumbnails/t_5.jpg (added)
-
prettyPhoto_3.1.4/index.html (added)
-
prettyPhoto_3.1.4/js (added)
-
prettyPhoto_3.1.4/js/jquery.prettyPhoto.js (added)
-
prettyPhoto_3.1.4/js/launch.js (added)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
prettyphot-single-image-zoom/trunk/ab_prettyphoto.php
r483102 r640408 5 5 Description: Add a checkbox to media window for showing large image with prettyphoto javascript 6 6 Author: Andrea Bersi 7 Version: 1.07 Version: 2.0 8 8 Author URI: http://www.andreabersi.com/ 9 9 */ … … 11 11 12 12 // constants for adding ab_prettyphoto to ADD MEDIA WINDOW 13 define ('ab_prettyphotoZOOM_JS', plugin_dir_url(__FILE__)."prettyPhoto_3.1.3 2"); 13 define ('ab_prettyphotoZOOM_JS', plugin_dir_url(__FILE__)."prettyPhoto_3.1.4"); 14 $wp_version=get_bloginfo('version'); 14 15 15 16 /* Load localization */ … … 17 18 18 19 20 /* FOR Wordpress 3.5 new logic: thank you to ungestalatbar 21 //http://wordpress.stackexchange.com/questions/76219/wordpress-3-5-attachment-fields-to-edit-and-media-send-to-editor 22 */ 23 // add highslide option to media dialog 24 function ab_prettyphoto_attachment_fields_to_edit_35( $form_fields, $post ) { 25 if(get_option('ab_prettyphoto_enabledForDefault') == 1) $ab_prettyphoto = 'checked="checked" '; 26 $my_form_fields = array( 27 'ab_prettyphoto' => array( 28 'label' => __('Automatic Zoom on click', 'ab_prettyphoto'), 29 'input' => 'html', 30 'html' => " 31 <input type='checkbox' name='attachments[{$post->ID}][ab_prettyphoto]' id='ab_prettyphoto-{$post->ID}' value='1' $ab_prettyphoto/> 32 33 34 <label for='ab_prettyphoto-{$post->ID}'>" . __('Enable zoom', 'ab_prettyphoto') . "</label>" ) 35 ); 36 if( $post->post_mime_type == 'image/jpeg' OR $post->post_mime_type == 'image/gif' OR $post->post_mime_type == 'image/png' OR $post->post_mime_type == 'image/tiff') 37 return array_merge( $form_fields, $my_form_fields ); 38 else 39 return $form_fields; 40 } 41 42 function ab_prettyphoto_add_meta_35($post, $attachment_data){ 43 // use this filter to add post meta if key exists or delete it if not 44 if ( !empty($attachment_data['ab_prettyphoto']) && $attachment_data['ab_prettyphoto'] == '1' ) 45 update_post_meta($post['ID'], 'ab_prettyphoto', true); 46 else 47 delete_post_meta($post['ID'], 'ab_prettyphoto'); 48 return $post; 49 } 50 51 52 53 function ab_prettyphoto_send_to_editor_35( $html, $id, $att ) { 54 $is_set = get_post_meta($id,'ab_prettyphoto', true); 55 if ($is_set and $is_set == '1'){ 56 $title=get_the_title($id); 57 return str_replace('<a', '<a rel="prettyPhoto-img" title="'.$title.'"', $html); 58 } 59 else 60 return $html; 61 } 62 63 64 65 if(version_compare( $wp_version, '3.5', '>=' )){ 66 add_filter('attachment_fields_to_save', 'ab_prettyphoto_add_meta_35',10,2); 67 } 68 69 if(version_compare( $wp_version, '3.5', '>=' )){ 70 add_filter( 'attachment_fields_to_edit', 'ab_prettyphoto_attachment_fields_to_edit_35', 100, 2 ); 71 }else{ 72 add_filter( 'attachment_fields_to_edit', 'ab_prettyphoto_attachment_fields_to_edit', 100, 2 ); 73 } 74 75 if(version_compare( $wp_version, '3.5', '>=' )){ 76 add_filter( 'media_send_to_editor', 'ab_prettyphoto_send_to_editor_35', 66, 3 ); 77 }else{ 78 add_filter( 'media_send_to_editor', 'ab_prettyphoto_send_to_editor', 66, 3 ); 79 } 80 81 82 ####### OLD WP VERSION < 3.5 ######### 19 83 // add highslide option to media dialog 20 84 function ab_prettyphoto_attachment_fields_to_edit( $form_fields, $post ) { … … 34 98 return $form_fields; 35 99 } 36 add_filter( 'attachment_fields_to_edit', 'ab_prettyphoto_attachment_fields_to_edit', 100, 2 ); 100 37 101 38 102 // filter and modify html code send to editor … … 40 104 function ab_prettyphoto_send_to_editor( $html, $send_id, $attachment ) { 41 105 if( isset($_POST["ab_prettyphoto-$send_id"]) ){ 42 43 $title=($_POST['attachments'][$send_id]['post_title']); 44 return str_replace('<a', '<a rel="prettyPhoto-img" title="'.$title.'"', $html); 106 $title=($_POST['attachments'][$send_id]['post_title']); 107 return str_replace('<a', '<a rel="prettyPhoto-img" title="'.$title.'"', $html); 45 108 } 46 109 else … … 48 111 } 49 112 50 add_filter( 'media_send_to_editor', 'ab_prettyphoto_send_to_editor', 66, 3 );51 113 52 114 // activating the plugin -
prettyphot-single-image-zoom/trunk/readme.txt
r483116 r640408 4 4 Tags: prettyPhoto, zoom, image zoom, images, 5 5 Requires at least: 3.0.3 6 Tested up to: 3. 3.16 Tested up to: 3.5 7 7 Stable tag: trunk 8 8 … … 30 30 31 31 = If i want to change the theme? = 32 The plugin come with a theme dark; into the prettyPhoto_3.1. 32/js folder the launch.js file set the theme as32 The plugin come with a theme dark; into the prettyPhoto_3.1.4/js folder the launch.js file set the theme as 33 33 34 34 […] … … 42 42 theme: 'facebook' 43 43 44 The themes are in prettyPhoto_3.1. 32/images/prettyPhoto: you can use a theme you want.44 The themes are in prettyPhoto_3.1.4/images/prettyPhoto: you can use a theme you want. 45 45 46 46 = More info 47 See at http://www.delianet.eu/servizi/sviluppo-word-press for simple demo andscreenshot47 See the screenshot 48 48 49 49 == Screenshots == … … 54 54 55 55 == Changelog == 56 56 = 2.0 = 57 * New code for the new Image Media 58 * Upgraded Pretthy Photo to 3.1.4 57 59 = 1.0 = 58 60 * First public release. 59 61 60 62 == Upgrade Notice == 61 Upgrade notice 63 Deactivate the old version, delete it and reinstall. If you want to manualy upgrade, simple copy into 64 plugin direcory the new folder prettyPhoto_3.1.4 and replace the ab_pretthyphoto.php file.
Note: See TracChangeset
for help on using the changeset viewer.