Plugin Directory

Changeset 937149


Ignore:
Timestamp:
06/23/2014 01:07:24 PM (12 years ago)
Author:
Eric Lowry
Message:

Version 1.01

Location:
el-gallery
Files:
16 added
6 edited

Legend:

Unmodified
Added
Removed
  • el-gallery/trunk/css/el-gallery.css

    r936581 r937149  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 1.0
     5Version: 1.01
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/css/el-gallery_admin.css

    r936581 r937149  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 1.0
     5Version: 1.01
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/el-gallery-admin.php

    r936581 r937149  
    33Plugin: EL-Gallery
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 1.0
     5Version: 1.01
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/el-gallery.php

    r936581 r937149  
    44Plugin URI: http://wordpress.org/plugins/el-gallery/
    55Description: An extremely simplistic gallery replacement plugin.
    6 Version: 1.0
     6Version: 1.01
    77Author: Eric Lowry
    88Author URI: http://ericlowry.fr/
    99License: GPL2
    10 
    11 
    12 TODO :
    13  -> Add an option to choose quality of link-images
    1410*/
    1511
     
    3026
    3127
    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        };
    7073
    7174    };
     
    8689    }
    8790
    88 
    89     $prepared = prepare_el_gallery_shortcode('',$atts);
     91    $prepared = prepare_el_gallery_shortcode($atts);
    9092    $images = $prepared[0];
    9193    $size = $prepared[1];
     
    130132
    131133
    132     $prepared = prepare_el_gallery_shortcode("thumbnails",$atts);
    133     $image = $prepared[0];
    134     $size = $prepared[1];
     134    $image = $prepared[2];
     135    $size = $prepared[3];
    135136
    136137    if ( wpmd_is_notphone() && sizeof($images) < 8 && $centered == true ) {
  • el-gallery/trunk/js/el-gallery.js

    r936581 r937149  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 1.0
     5Version: 1.01
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/readme.txt

    r936581 r937149  
    99Requires at least: 3.5
    1010Tested up to: 3.9.1
    11 Stable tag: 1.0
    12 Version: 1.0
     11Stable tag: 1.01
     12Version: 1.01
    1313License: GPLv2
    1414License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6060== Changelog ==
    6161
     62= Version 1.01 =
     63* PHP optimisation.
     64
    6265= Version 1.0 =
    6366* Added option to set maximum aspect ratio (to avoid tall images being oversized).
Note: See TracChangeset for help on using the changeset viewer.