Plugin Directory

Changeset 1584671


Ignore:
Timestamp:
01/29/2017 09:06:08 PM (9 years ago)
Author:
funkjedi
Message:

Syncing with Github

Location:
acf-qtranslate/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • acf-qtranslate/trunk/acf-qtranslate.php

    r1584666 r1584671  
    44Plugin URI: http://github.com/funkjedi/acf-qtranslate
    55Description: Provides multilingual versions of the text, text area, and wysiwyg fields.
    6 Version: 1.7.20
     6Version: 1.7.21
    77Author: funkjedi
    88Author URI: http://funkjedi.com
  • acf-qtranslate/trunk/readme.txt

    r1584666 r1584671  
    44Requires at least: 3.5.0
    55Tested up to: 4.7.2
    6 Version: 1.7.20
    7 Stable tag: 1.7.20
     6Version: 1.7.21
     7Stable tag: 1.7.21
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5454
    5555== Changelog ==
     56
     57= 1.7.21 =
     58* Bug Fix: Make compatible with older versions of ACF5 by checking for `acf_connect_attachment_to_post`
    5659
    5760= 1.7.20 =
  • acf-qtranslate/trunk/src/acf_5/fields/file.php

    r1584640 r1584671  
    206206        if ( !is_array($values) ) return false;
    207207
    208         foreach ($values as $value) {
    209 
    210             // bail early if not attachment ID
    211             if( !$value || !is_numeric($value) ) continue;
    212 
    213             // maybe connect attacments to post
    214             acf_connect_attachment_to_post( (int) $value, $post_id );
    215 
     208        if (function_exists('acf_connect_attachment_to_post')) {
     209            foreach ($values as $value) {
     210
     211                // bail early if not attachment ID
     212                if( !$value || !is_numeric($value) ) continue;
     213
     214                // maybe connect attacments to post
     215                acf_connect_attachment_to_post( (int) $value, $post_id );
     216
     217            }
    216218        }
    217219
Note: See TracChangeset for help on using the changeset viewer.