Home › Forums › Backend Issues (wp-admin) › Set Textarea to Uneditable › Reply To: Set Textarea to Uneditable
This is using the plugin bootstrap, something I’ve never used. I find that it just over-complicates things (over abstraction, my opinion only) for simple plugins, especially for someone that’s new to WP or dev in general.
But yes, ACF hooks will work in a plugin if they are added when they need to be added.
What you need to know is, when during the course of the loading of WP is the line of code that adds your filter run. When I talk about “When” this may not have anything to do with when a file is loaded (unless that line does not depend on anything else, see below.) WordPress’s action/filter hook system means that you need to know when during the operation in terms of the hooks order does something actually happen.
The only way that that your add_filter() will be run automatically when the file is loaded is if it’s just on a line in the file outside of any functions or classes. If it is in a function or in a method of a class then it more than likely depends on when the hook fires to run the function or when the class is instantiated or when the hook that runs the method in the class is fired.
Sorry for the long winded answer that didn’t really answer anything.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.