adding a button to the media uploader

When i needed to do something similar i used the admin_print_scripts-media-upload-popup hook to add my own js/Jquery code to insert a button and handled it’s click event with ajax. something like this: add_action(‘admin_print_scripts-media-upload-popup’,’add_my_media_button’); function add_my_media_button(){ ?> <script> jQuery(document).ready(function() { //loop over all attachments jQuery(“.savesend”).each(function(i,v){ if (jQuery(this).next().attr(‘id’) != “”){ //get attachment id var att_id = jQuery(this).next().attr(‘id’); … Read more

Fetch Data from other website in wordpress (screen scraping)

You’ll need to dig into the WordPress Http API. Within PHP, there are many possible ways to send an HTTP request. For simplicity, these methods will be referred to collectively as ‘transports’ for this article. The purpose for the HTTP API is to support as many of them as possible with an API that is … Read more

How to Include File from Plugins into Template?

plugins_url( ‘file_location/relative_to.plugin’, ‘plugin/file/location’ );, or something along those lines at least, should do it for you. Alternatively, you could work from the top down and say something like include( ‘/wp-content/plugins/you-plugin-name/file.php’ ) to get it, whichever is easier.