Plugin Directory

Changeset 1231799


Ignore:
Timestamp:
08/27/2015 08:12:30 AM (11 years ago)
Author:
phuisman
Message:

Added possibility to set your own cache dir location with constant FLICKR_FIELD_CACHE_DIR

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

Legend:

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

    r1210231 r1231799  
    177177                        echo '<span style="color:#336600">' . __('The cache folder is writable!', 'acf-flickr') . '</span>';
    178178                    }
     179                    echo ' ' .  __('Alternatively, you can control your own caching folder by setting the constant <strong>FLICKR_FIELD_CACHE_DIR</strong>.', 'acf-flickr');
    179180                    ?>
    180181                </p>
     
    298299        // Caching
    299300        $cache_dir = dirname(__FILE__) . '/cache';
     301        if(defined('FLICKR_FIELD_CACHE_DIR')) {
     302            $cache_dir = FLICKR_FIELD_CACHE_DIR;
     303        }
    300304        if (is_writeable($cache_dir) && $field['flickr_cache_enabled'] == 1) {
    301305            $duration = $field['flickr_cache_duration'] * 60 * 60;
     
    596600            // enable phpFlickr caching if possible
    597601            $cache_dir = dirname(__FILE__) . '/cache';
     602            if(defined('FLICKR_FIELD_CACHE_DIR')) {
     603                $cache_dir = FLICKR_FIELD_CACHE_DIR;
     604            }
    598605            if (is_writeable($cache_dir) && $field['flickr_cache_enabled'] == 1) {
    599606                $duration = $field['flickr_cache_duration'] * 60;
  • flickr-field-for-advanced-custom-fields/trunk/acf-flickr-v5.php

    r1210231 r1231799  
    136136            $instructions = '<span style="color:#336600">' . __('The cache folder is writable!', 'acf-flickr') . '</span>';
    137137        }
     138    $instructions .= ' ' . __('Alternatively, you can control your own caching folder by setting the constant <strong>FLICKR_FIELD_CACHE_DIR</strong>.', 'acf-flickr');
    138139
    139140        acf_render_field_setting( $field, array(
     
    220221        // Caching
    221222        $cache_dir = dirname(__FILE__) . '/cache';
     223        if(defined('FLICKR_FIELD_CACHE_DIR')) {
     224            $cache_dir = FLICKR_FIELD_CACHE_DIR;
     225        }
    222226        if (is_writeable($cache_dir) && $field['flickr_cache_enabled'] == 1) {
    223227            $duration = $field['flickr_cache_duration'] * 60 * 60;
     
    603607            // enable phpFlickr caching if possible
    604608            $cache_dir = dirname(__FILE__) . '/cache';
     609            if(defined('FLICKR_FIELD_CACHE_DIR')) {
     610                $cache_dir = FLICKR_FIELD_CACHE_DIR;
     611            }
    605612            if (is_writeable($cache_dir) && $field['flickr_cache_enabled'] == 1) {
    606613                $duration = $field['flickr_cache_duration'] * 60;
  • flickr-field-for-advanced-custom-fields/trunk/readme.txt

    r1210232 r1231799  
    33Tags: flickr, acf, custom, fields, photostream, photosets
    44Requires at least: 3.0.1
    5 Tested up to: 4.1.1
     5Tested up to: 4.3
    66Stable tag: 1.0.7
    77License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.