A html helper to open image library and select an image for options. It requires WP 3.5+. You have a helper function alo_mh_insert_from_media_lib that you can use in your plugin. After activation, you can visit Settings -> ALO Media Helper Sample in your dashboard to see a live sample (the code is in "sample.php" file included).
- Create a alo-media-helper folder in wp-content/plugins/
- Put these files there.
- Activate the plugin as usual.
- Visit Settings -> ALO Media Helper Sample to see a live sample of helper and open the file "sample.php" to see the php code.
- Use
alo_mh_insert_from_media_lib
function in your plugin development, enjoy!
- In this plugin sample the javascript is loaded on every admin screen. Customize the script enqueue in
alo_mh_head_scripts
function as you need.