Validating Custom Meta Box Values & Required Fields
Something which I have never seen covered is the best way to validate that specific form fields are filled out correctly for custom post type meta boxes.
Something which I have never seen covered is the best way to validate that specific form fields are filled out correctly for custom post type meta boxes.
I’ve added a custom field into my media attachments:
I am trying to dynamically load a ton of controls based on the value of a dropdown and I do not want to load them in via PHP because the initial page load takes well over 15 seconds. I have a lot of controls.
I have a plugin that, among other things, has a javascript file that requires a few user specific settings. What would be the best way to get those settings into javascript from the plugin’s settings parameters?
I know it’s easy stuff, but I’m new to this and I can’t understand which is the best approach.
WP has a nice javascript loader included in wp-admin:
http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php
So I have a metabox which I want to trigger some Javascript when a post is saved (to refresh the page in this use case.)
I am working on a plugin that has to inject a script on pages (something like RefTagger), which would be easy using wp_enqueue_script, but there are two reasons I cannot do that: the script tag has to have an ID and it should be executed asynchronously.
Suppose to have this shortcode: