Plugin Directory

Changeset 1083026


Ignore:
Timestamp:
02/05/2015 11:27:03 AM (11 years ago)
Author:
phuisman
Message:

Added original format to display options

Location:
flickr-field-for-advanced-custom-fields/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • flickr-field-for-advanced-custom-fields/trunk/acf-flickr-v4.php

    r961059 r1083026  
    231231                        'large_1024'   => '1024px',
    232232                        //'large_1600'   => '1600px',
    233                         //'original'     => 'Original',
     233                        'original'     => 'Original',
    234234                    )
    235235                ));
     
    342342            }
    343343            elseif($field['flickr_content_type'] == 'photostream') {
    344                 $flickr_data = $f->people_getPublicPhotos ($field['flickr_user_id'], NULL, NULL, $field['flickr_sets_amount'], '');
     344                $flickr_data = $f->people_getPublicPhotos ($field['flickr_user_id'], NULL, 'url_o', $field['flickr_sets_amount'], '');
    345345           
    346346                if (is_array($flickr_data['photos']) && isset($flickr_data['photos']['photo'][0])):  ?>
     
    364364                                data-flickr-farm="<?php echo $photo['farm']; ?>"
    365365                                data-flickr-title="<?php echo $photo['title']; ?>"
     366                                data-flickr-original-url="<?php echo $photo['url_o']; ?>"
    366367                                >
    367368                                <img title="<?php echo $photo['title'];?>" src="<?php echo $f->buildPhotoURL($photo, 'square'); ?>">
     
    572573                foreach($value['items'] as $id) {
    573574                    if ($value['type'] == 'sets') {
    574                         $photos = $f->photosets_getPhotos($id);
     575                        $photos = $f->photosets_getPhotos($id, 'url_o');
    575576                        $name = 'photoset';
    576577                    }
    577578                    elseif ($value['type'] == 'galleries') {
    578                         $photos = $f->galleries_getPhotos($id);
     579                        $photos = $f->galleries_getPhotos($id, 'url_o');
    579580                        $name = 'photos';
    580581                    }
     
    583584                        $sets[$id][$photo['id']]['title']    = $photo['title'];
    584585                        $sets[$id][$photo['id']]['thumb']    = $f->buildPhotoURL($photo, $value['thumb_size']);
    585                         $sets[$id][$photo['id']]['large']    = $f->buildPhotoURL($photo, $value['large_size']);
     586                        $sets[$id][$photo['id']]['large']    = ($value['large_size'] == 'original') ? $photo['url_o'] : $f->buildPhotoURL($photo, $value['large_size']);
    586587                        $sets[$id][$photo['id']]['photo_id'] = $photo['id'];
    587588                    }   
     
    590591            }
    591592            elseif($value['type'] == 'photostream') {
    592 
     593                $items = array();
     594               
    593595                foreach($value['items'] as $photo) {               
    594596                    $items[] = array(
    595597                        'title'    => $photo->title,
    596598                        'thumb'    => $f->buildPhotoURL($photo, $value['thumb_size']),
    597                         'large'    => $f->buildPhotoURL($photo, $value['large_size']),
     599                        'large'    => ($value['large_size'] == 'original') ? $photo->original_url : $f->buildPhotoURL($photo, $value['large_size']),
    598600                        'photo_id' => $photo->id,
    599601                    );
  • flickr-field-for-advanced-custom-fields/trunk/acf-flickr-v5.php

    r963685 r1083026  
    171171                'large_1024'   => '1024px',
    172172                //'large_1600'   => '1600px',
    173                 //'original'     => 'Original',
     173                'original'     => 'Original',
    174174            ),
    175175        ));
     
    284284            }
    285285            elseif($field['flickr_content_type'] == 'photostream') {
    286                 $flickr_data = $f->people_getPublicPhotos ($field['flickr_user_id'], NULL, NULL, $field['flickr_sets_amount'], '');
    287            
     286                $flickr_data = $f->people_getPublicPhotos ($field['flickr_user_id'], NULL, 'url_o', $field['flickr_sets_amount'], '');
    288287                if (is_array($flickr_data['photos']) && isset($flickr_data['photos']['photo'][0])):  ?>
    289288                    <ul class="field_label photostream">
     
    306305                                data-flickr-farm="<?php echo $photo['farm']; ?>"
    307306                                data-flickr-title="<?php echo $photo['title']; ?>"
     307                                data-flickr-original-url="<?php echo $photo['url_o']; ?>"
    308308                                >
    309309                                <img title="<?php echo $photo['title'];?>" src="<?php echo $f->buildPhotoURL($photo, 'square'); ?>">
     
    600600                foreach($value['items'] as $id) {
    601601                    if ($value['type'] == 'sets') {
    602                         $photos = $f->photosets_getPhotos($id);
     602                        $photos = $f->photosets_getPhotos($id, 'url_o');
    603603                        $name = 'photoset';
    604604                    }
    605605                    elseif ($value['type'] == 'galleries') {
    606                         $photos = $f->galleries_getPhotos($id);
     606                        $photos = $f->galleries_getPhotos($id, 'url_o');
    607607                        $name = 'photos';
    608608                    }
     
    611611                        $sets[$id][$photo['id']]['title']    = $photo['title'];
    612612                        $sets[$id][$photo['id']]['thumb']    = $f->buildPhotoURL($photo, $value['thumb_size']);
    613                         $sets[$id][$photo['id']]['large']    = $f->buildPhotoURL($photo, $value['large_size']);
     613                        $sets[$id][$photo['id']]['large']    = ($value['large_size'] == 'original') ? $photo['url_o'] : $f->buildPhotoURL($photo, $value['large_size']);
    614614                        $sets[$id][$photo['id']]['photo_id'] = $photo['id'];
    615615                    }   
     
    620620                $items = array();
    621621               
    622                 foreach($value['items'] as $photo) {               
     622                foreach($value['items'] as $photo) {       
    623623                    $items[] = array(
    624624                        'title'    => $photo->title,
    625625                        'thumb'    => $f->buildPhotoURL($photo, $value['thumb_size']),
    626                         'large'    => $f->buildPhotoURL($photo, $value['large_size']),
     626                        'large'    => ($value['large_size'] == 'original') ? $photo->original_url : $f->buildPhotoURL($photo, $value['large_size']),
    627627                        'photo_id' => $photo->id,
    628628                    );
  • flickr-field-for-advanced-custom-fields/trunk/js/flickr-acf5.js

    r1020310 r1083026  
    1313                        secret: $(this).attr('data-flickr-secret'),
    1414                        farm: $(this).attr('data-flickr-farm'),
    15                         title: $(this).attr('data-flickr-title')
     15                        title: $(this).attr('data-flickr-title'),   
     16                        original_url: $(this).attr('data-flickr-original-url')
    1617                    });
    1718                }
  • flickr-field-for-advanced-custom-fields/trunk/readme.txt

    r1020310 r1083026  
    44Requires at least: 3.0.1
    55Tested up to: 4.0
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5656== Changelog ==
    5757
     58= 1.0.4 =
     59* Added possibility to display original format of the photo
     60
    5861= 1.0.3 =
    5962* Fixed a bug where you could not deselect the flickr item and save correctly
Note: See TracChangeset for help on using the changeset viewer.