Comments (5)
Hi @hbi99
Thanks for the question, but I don't understand.
Please review the Select2 examples here:
http://ivaynberg.github.io/select2/
from acf-field-type-template.
Yeah...but it seems that you are using an old version in ACF and it can be updated without breaking ACF. Ah well...I'll solve it anyway
from acf-field-type-template.
Hi @hbi99
You can register your own select2 library if you wish.
ACF will use any library that is registered before the enqueue_scripts action
from acf-field-type-template.
@elliotcondon,
Are we talking about the same thing? When javascript is getting evaluated, your old-version registers itself as plugin to jQuery. When my new version is loaded, it is not registered or extends the old version.
Please do not guess or suggest if you are not sure that your suggestion actually works.
Why don't you update this repo with the new version of Select2 instead?
from acf-field-type-template.
Hi @hbi99
ACF PRO will register the select2 library during an action called ''acf/input/admin_enqueue_scripts". This is a custom action that is run during the WP action "admin_enqueue_scripts" with a priority of 20.
If you hook into the "init" or "admin_enqueue_scripts" actions with a priority less than 20 (10 would be safe), you can use the wp_register_script() and wp_enqueue_script() functions.
You can see how ACF PRO registers the select2 library in the acf/fields/select.php file.
ACF uses select2 v3 due to limitations in select2 v4.
I have added compatibility with v4, but I am not adding it to my plugin until Select2 address the issues with sort-ability.
Please do not insinuate that I am 'guessing' or not attempting to help.
I am helping you for free and would appreciate your co-operation in solving your issue, not complaining.
from acf-field-type-template.
Related Issues (20)
- Paths to JS & CSS files are incorrect HOT 4
- v4: Include failed HOT 4
- adding support default value HOT 1
- Conditional Logic available for custom field HOT 7
- Functions not hooking in v4.x HOT 17
- ACF V5 Template - input_admin_enqueue_scripts not being called.
- Field not displaying HOT 2
- Readme files show EXTENDED_DESCRIPTION HOT 1
- 2nd parameter should be the callback function, not the string of the callback function
- 2nd parameter should be the callback function, not the string of the callback function HOT 1
- Wrong placeholder DESCRIPTION HOT 2
- JS field extend error after version 5.6.5 HOT 2
- acf version HOT 3
- Ajax call HOT 3
- Warning: Use of undefined constant load_plugin_acf HOT 2
- wrong echo output HOT 1
- an example to render multi select box
- support to namespaces/classes ? HOT 1
- Template Repo
- Syntax Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-field-type-template.