Add Shortcode Support Please!
-
Consider dropping this quick function in your main php file so that people without much coding experience can use the plugin with a bit less trouble:
function jquery_file_upload_shortcode() { jquery_html5_file_upload_hook(); } add_shortcode ('jquery_file_upload', 'jquery_file_upload_shortcode');As for other users having issues with not being able to properly implement this, you can drop the above code in the plugin file named “jquery-html5-file-upload.php” and use the shortcode [jquery_file_upload] to display the file uploader in your content.
You can even drop this in your theme files (most likely function.php) but you must do the following to ensure that there are no conflicts when the plugin is deactivated:
//Includes required plugin.php file include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Checks if plugin is active, and if it is, it creates the shortcode if (is_plugin_active(plugins_url.'/jquery-html5-file-upload.php')) { function jquery_file_upload_shortcode() { jquery_html5_file_upload_hook(); } add_shortcode ('jquery_file_upload', 'jquery_file_upload_shortcode'); }To the author: Please make this change when you get a chance! Thanks for the awesome WordPress edition of a great Jquery plugin!
To other users: If you have any questions about the code offered above or how to implement it, I’m notified on follow-up so I’m happy to help make clarifications!
http://ww.wp.xz.cn/extend/plugins/jquery-html5-file-upload/
The topic ‘Add Shortcode Support Please!’ is closed to new replies.