Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author webbistro

    (@webbistro)

    Hi Stian,

    Thanks for reporting the issue! Testing EML with the latest ACF version is the next item in my TODO list. I will have a solution today or tomorrow and, of course, I will inform you.

    Nadia

    Thread Starter Stian Andreassen

    (@stiand)

    Excellent.

    I’m using:

    • WordPress 4.0
    • Advanced Custom Fields Pro 5.0.8
    • Enhanced Media Library 1.1.2
    Plugin Author webbistro

    (@webbistro)

    It’s fixed in the new version – 2.0, but it’s still not available (on testing), so please in the plugin’s root folder find a file /js/eml-media-models.js and replace its content with the code below. With the next upgrade it will be fixed automatically. Sorry for inconvenience.

    window.wp = window.wp || {};
    
    ( function( $, _ ) {
    
    	var media = wp.media,
            Query = media.model.Query;
    
        _.extend( Query, {
    
            queries: [],
    
            cleanQueries: function(){
    
                this.queries = [];
            },
    
            get: (function(){
    
                return function( props, options ) {
    
                    var args       = {},
                        orderby    = Query.orderby,
                        defaults   = Query.defaultProps,
                        query,
                        cache      = !! props.cache || _.isUndefined( props.cache );
    
                    delete props.query;
                    delete props.cache;
    
                    _.defaults( props, defaults );
    
                    props.order = props.order.toUpperCase();
                    if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
                        props.order = defaults.order.toUpperCase();
                    }
    
                    if ( ! _.contains( orderby.allowed, props.orderby ) ) {
                        props.orderby = defaults.orderby;
                    }
    
                    _.each( props, function( value, prop ) {
                        if ( _.isNull( value ) ) {
                            return;
                        }
    
                        args[ Query.propmap[ prop ] || prop ] = value;
                    });
    
                    _.defaults( args, Query.defaultArgs );
    
                    args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
    
                    if ( cache ) {
                        query = _.find( this.queries, function( query ) {
                            return _.isEqual( query.args, args );
                        });
                    } else {
                        this.queries = [];
                    }
    
                    if ( ! query ) {
                        query = new Query( [], _.extend( options || {}, {
                            props: props,
                            args:  args
                        } ) );
                        this.queries.push( query );
                    }
    
                    return query;
                };
            }())
        });
    
    })( jQuery, _ );
    Thread Starter Stian Andreassen

    (@stiand)

    Thank you, that solved it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ACF: File field conflict with EML’ is closed to new replies.