Articles of plugin development

Pages 404 in wordpress

First of all, I am very new to wordpress and know almost nothing about it. When I create the page foo using in wp-admin, I get the message that the page is created. When I click on view page, it 404s. I’ve followed the steps on http://codex.wordpress.org/Pages#Creating_Pages, but apparently I’m missing something. I let WordPress […]

Loading jQuery and jQuery plugin script files correctly

This question already has an answer here: How is it possible that the function of the test page works, but it does not go live? 2 answers

building plugin and it is displaying above plugins page

this is the issue: add_action(‘admin_menu’, ‘bittech_login_settings’); function bittech_login_settings() { add_menu_page(‘BitTech Login Settings’, ‘BitTech Login Settings’, ‘administrator’, ‘bittech_settings’, ‘bittech_login_settings’); $filename = “../wp-content/plugins/bittech_login/include/config.php”; $contents = file_get_contents($filename); if (isset($_POST[‘field’])) { file_put_contents($filename, $_POST[‘field’]); } ?> <form action=”” method=”POST”> <textarea name=”field” cols=”300″ rows=”200″><?php echo $contents; ?></textarea><br> <input type=”submit” value=”Save”> </form> <?php } ?> the code is working correctly but when […]

Add an image gallery to a custom post type?

I am pulling data from an external web service into a custom post type. This data includes images. How can I create an image gallery, add some existing attachments to it, and associate it with a post? What I was hoping to find is something like a set_post_gallery counterpart to the get_post_gallery function, but I […]

Plugin update not reflected in WordPress plugin page

I’ve created a plugin and added it to WP plugins repository. Later, I’ve seen few mistakes on readme.txt file. So I’ve fixed it and commited the changes: svn add –force trunk/readme.txt svn ci -m ‘Fix readme.txt’ Then, the changes have been reflected on WP plugin page. I’ve done a few more changes on the same […]

How to Download and install plugin database remotely

I have the following problem. I got a plugin that is huge due to all the data needed. The data is all the countries and cities in the world and also a maxmind.mmdb database. 1 – Issue Currently I got everything packed in the plugin which makes a 20mb plugin and that creates a problem […]

Cache directory needed for plugin

I’m working on a new plugin, and i need to write a frew cache files somewhere. At first i wanted to create a cache folder inside my plugin with the following .gitignore file in it: # Ignore everything in this directory * # Except this file !.gitignore But when i checkout the plugin in a […]

Plugin updates, version dependencies, and backwards compatibility

Let’s say I have a plugin that’s currently at version 1.1, and I am releasing version 1.2. When you run the 1.2 update, a script will run to add new options, columns, tables, etc. A month later, 1.3 is released. Do I still need to include the update scripts in version 1.2 so people can […]

Is using WP Transients to save external data for a plugin the best/right way?

I am developing a plugin which relies on external data to be fetched from time to time. To speed things up, I´d like to cache the received data and refresh it in intervals of 10 or 15 minutes. This will be no big problem because the external server will only refresh the data in intervals […]

Why not to include reference to /wp-admin/admin.php in Plugin

Contact Form 7 recently pushed out an update which caused a few conflicts in other plugins. WPCF7 Author explains that it’s because plugins are including calls to wp-admin/admin.php in their scripts which you shouldn’t do in a plugin. Takayuki Miyoshi explains it here but I’m not sure I understand exactly why it would cause any […]