Support » Plugin: Advanced Custom Fields: Font Awesome Field » Conflict between wp media folder and your plugin with select2

Viewing 3 replies - 1 through 3 (of 3 total)
  • +1 on this ticket.

    It has something to do with the following code in input-v5.js. If I remove the code for setting the drodownCssClass and containerCssClass the problem is gone.

    acf.add_filter( 'select2_args', function( args, $select, settings, $field ) {
    	if ( $select.hasClass('select2-fontawesome') ) {
    		args.dropdownCssClass = 'fa-select2-drop fa' + ACFFA.major_version;
    		args.containerCssClass = 'fa-select2 fa' + ACFFA.major_version;
    		args.escapeMarkup = function( markup ) {
    			if (typeof markup !== 'string') {
    				return markup;
    			return acf.escHtml( markup );
    	return args;
    • This reply was modified 3 months, 1 week ago by henjak. Reason: add reason for problem
    Plugin Author Matt Keys


    I have seen this issue come up before. This plugin uses an argument in Select2 called dropdownCssClass. It uses this to add some additional identifiers to the Select2 fields so the plugin can be sure which fields are FontAwesome ACF related and which version of FontAwesome is being used on the fields. This is important to the functionality of this plugin.

    This feature is available in the ‘full’ build of select2 v4.x and high I believe. My assumption is that WP Media Folder is either using an older version of Select2, or a non full feature version of 4.x which is causing this incompatibility.

    @signelazer @mattkeys

    It was a bug in WP Media Folder (latest version 5.4.1). They will add a fix into the next release asap.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.