Changeset 937149
- Timestamp:
- 06/23/2014 01:07:24 PM (12 years ago)
- Location:
- el-gallery
- Files:
-
- 16 added
- 6 edited
-
tags/1.01 (added)
-
tags/1.01/css (added)
-
tags/1.01/css/el-gallery.css (added)
-
tags/1.01/css/el-gallery_admin.css (added)
-
tags/1.01/el-gallery-admin.php (added)
-
tags/1.01/el-gallery.php (added)
-
tags/1.01/images (added)
-
tags/1.01/images/loading.gif (added)
-
tags/1.01/js (added)
-
tags/1.01/js/el-gallery.js (added)
-
tags/1.01/languages (added)
-
tags/1.01/languages/el-gallery-fr_FR.mo (added)
-
tags/1.01/languages/el-gallery-fr_FR.pot (added)
-
tags/1.01/languages/el-gallery.mo (added)
-
tags/1.01/languages/el-gallery.pot (added)
-
tags/1.01/readme.txt (added)
-
trunk/css/el-gallery.css (modified) (1 diff)
-
trunk/css/el-gallery_admin.css (modified) (1 diff)
-
trunk/el-gallery-admin.php (modified) (1 diff)
-
trunk/el-gallery.php (modified) (4 diffs)
-
trunk/js/el-gallery.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
el-gallery/trunk/css/el-gallery.css
r936581 r937149 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 1.0 5 Version: 1.01 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/css/el-gallery_admin.css
r936581 r937149 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 1.0 5 Version: 1.01 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/el-gallery-admin.php
r936581 r937149 3 3 Plugin: EL-Gallery 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 1.0 5 Version: 1.01 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/el-gallery.php
r936581 r937149 4 4 Plugin URI: http://wordpress.org/plugins/el-gallery/ 5 5 Description: An extremely simplistic gallery replacement plugin. 6 Version: 1.0 6 Version: 1.01 7 7 Author: Eric Lowry 8 8 Author URI: http://ericlowry.fr/ 9 9 License: GPL2 10 11 12 TODO :13 -> Add an option to choose quality of link-images14 10 */ 15 11 … … 30 26 31 27 32 function prepare_el_gallery_shortcode($type,$atts){ 33 extract(shortcode_atts(array( 34 'orderby' => 'menu_order ASC, ID ASC', 35 'include' => '', 36 'id' => $post->ID, 37 'itemtag' => 'dl', 38 'icontag' => 'dt', 39 'captiontag' => 'dd', 40 'columns' => 3, 41 'size' => 'full', 42 'link' => 'file' 43 ), $atts)); 44 45 if ( wpmd_is_phone() && get_option('el_gallery_mobile_detect') ) { 46 $size = 'medium'; 47 } 48 49 if ($type == "thumbnails") { 50 $size = 'thumbnail'; 51 } 52 53 $args = array( 54 'post_type' => 'attachment', 55 'post_status' => 'inherit', 56 'post_mime_type' => 'image', 57 'orderby' => $orderby 58 ); 59 60 if ( !empty($include) ) 61 $args['include'] = $include; 62 else { 63 $args['post_parent'] = $id; 64 $args['numberposts'] = -1; 65 } 66 67 $images = get_posts($args); 68 69 return array($images, $size); 28 function prepare_el_gallery_shortcode($atts){ 29 for($i = 0; $i < 3; $i++) { 30 extract(shortcode_atts(array( 31 'orderby' => 'menu_order ASC, ID ASC', 32 'include' => '', 33 'id' => $post->ID, 34 'itemtag' => 'dl', 35 'icontag' => 'dt', 36 'captiontag' => 'dd', 37 'columns' => 3, 38 'size' => 'full', 39 'link' => 'file' 40 ), $atts)); 41 42 if ( wpmd_is_phone() && get_option('el_gallery_mobile_detect') ) { 43 $size = 'medium'; 44 } 45 $size_full = $size; 46 47 if ($i == 1) { 48 $size = 'thumbnail'; 49 $size_thumb = $size; 50 } 51 52 $args = array( 53 'post_type' => 'attachment', 54 'post_status' => 'inherit', 55 'post_mime_type' => 'image', 56 'orderby' => $orderby 57 ); 58 59 if ( !empty($include) ) { 60 $args['include'] = $include; 61 } else { 62 $args['post_parent'] = $id; 63 $args['numberposts'] = -1; 64 } 65 66 if ($i == 0) { 67 $images_full = get_posts($args); 68 } else { 69 $images_thumb = get_posts($args); 70 return array($images_full, $size_full, $images_thumb, $size_thumb); 71 } 72 }; 70 73 71 74 }; … … 86 89 } 87 90 88 89 $prepared = prepare_el_gallery_shortcode('',$atts); 91 $prepared = prepare_el_gallery_shortcode($atts); 90 92 $images = $prepared[0]; 91 93 $size = $prepared[1]; … … 130 132 131 133 132 $prepared = prepare_el_gallery_shortcode("thumbnails",$atts); 133 $image = $prepared[0]; 134 $size = $prepared[1]; 134 $image = $prepared[2]; 135 $size = $prepared[3]; 135 136 136 137 if ( wpmd_is_notphone() && sizeof($images) < 8 && $centered == true ) { -
el-gallery/trunk/js/el-gallery.js
r936581 r937149 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 1.0 5 Version: 1.01 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/readme.txt
r936581 r937149 9 9 Requires at least: 3.5 10 10 Tested up to: 3.9.1 11 Stable tag: 1.0 12 Version: 1.0 11 Stable tag: 1.01 12 Version: 1.01 13 13 License: GPLv2 14 14 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 60 60 == Changelog == 61 61 62 = Version 1.01 = 63 * PHP optimisation. 64 62 65 = Version 1.0 = 63 66 * Added option to set maximum aspect ratio (to avoid tall images being oversized).
Note: See TracChangeset
for help on using the changeset viewer.