WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins
73
votes
37answers
7k views
Objective Best Practices for Plugin Development? [closed]
Starting a community wiki to collect up objective best practices for plugin development. This question was inspired by @EAMann's comments on wp-hackers.
The idea is to collaborate on what objective ...
44
votes
27answers
6k views
Software for WordPress Theme and Plugin Development? [closed]
What software do you use for your WordPress related needs?
Please state your OS.
On windows XP I use:
filezilla (FTP)
notepad++ (for reading of PHP / CSS files)
firebug (a firefox extension to ...
37
votes
17answers
2k views
WPSE Plugin Repository: The plugins that came out of WP-Answers
Link your WPSE-Plugins
If you answered a question and made a plugin out of your code, than this is your place to share it.
The Idea:
An old comment from @MikeSchinkel during the beta phase where he ...
32
votes
6answers
4k views
framework for plugin/theme options panel? [closed]
I found that the longest part of a plugin or theme development is creating the options panel, at least in my case.
So i like to know what's your take on that.
Do you use a ready made framework or ...
26
votes
8answers
4k views
What process do you use for WordPress development?
I'm interested in how other people develop themes and plugins for WordPress. To me, the in-browser editor in the admin panel just doesn't cut it. Currently, I'm just using an IDE with a PHP plugin ...
25
votes
13answers
982 views
How do you debug plugins?
I am pretty new to plugin authoring and was having a hard time debuging.
I used lots of echo and it is sloppy and ugly.
I am sure there is a better way to do this, maybe an IDE with a debugger that ...
25
votes
1answer
2k views
What's the preferred method of writing AJAX-enabled plugins?
I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer?
22
votes
3answers
757 views
Best way to initiate a class in a WP plugin?
I've created a plugin, and of course being me, I wanted to go with a nice OO approach. Now what I've been doing is to create this class and then just below create an instance of this class:
class ...
20
votes
1answer
5k views
A tool to analyze rewrite rules? [closed]
Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements.
I have created something myself and will post it here so others can use it, ...
20
votes
7answers
1k views
What Plugins Demonstrate Great WP Plugin Development?
I'm going to be tackling my first plugin soon and I'm looking for plugins which you feel are of very high quality, under the hood. Stuff I can use as an example while I design the framework for my ...
18
votes
5answers
5k views
Creating a table in the admin-style?
What is the recommended way of creating a page with a table, in the style of the tables showing posts or users in the admin area?
I am expanding the Cache Images plugin, and it contains a table with ...
17
votes
1answer
837 views
Add multiple plugin directories
The task
You can register add additional Themes directories using register_theme_directory() for your WP installation. Sadly core doesn't deliver with the same functionality for plugins. We already ...
16
votes
4answers
562 views
Who are the most trusted plugin developers? [closed]
Note: Please vote on the question, and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer.
There are so many plugins out there. Whose plugins can ...
16
votes
3answers
849 views
Where to put my code: plugin or functions.php?
Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php?
There are many cases and many debates about that topic, mostly because there are ...
14
votes
8answers
1k views
How to structure a plugin
This isn't a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin.
Some other programming languages ...
13
votes
2answers
269 views
Is it ever okay to include inline CSS in plugins?
Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...
13
votes
3answers
525 views
Methods of Integrating Plugin Data with Themes
I would like to get some opinions regarding the best practices for developing WordPress plugins that provide theme integration.
In order to make sense as I ask this question, let me start with an ...
13
votes
1answer
255 views
Is it possible to reuse wp.media.editor Modal for dialogs other than media
To expand: I'd like to utilize the same Modal code/appearance ( as used in wp.media.Modal, wp.media.FocusManager ) to open a modal of my own custom dialog, not the Media Editor. In the past, I've ...
12
votes
4answers
5k views
How do I add CSS options to my plugin without using inline styles?
I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
12
votes
1answer
973 views
add_menu_page() with different name for first submenu item
The add_menu_page documentation says to pass the menu title as the second parameter:
add_menu_page('Page Title', 'Menu Title', ...);
When adding more pages later via add_submenu_page, the main page ...
12
votes
2answers
335 views
In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
I want to make sure all of the data in my plugins/themes is handled securely before entering the database and before being output to the browser. My problem is that there are situations where the API ...
12
votes
4answers
232 views
Automatically determine minimum WordPress version required for a plugin?
When developing a plugin, is there a way to automatically determine the minimum version of WordPress that's required to run it? I want to make sure that the Requires header is accurate, but manually ...
11
votes
3answers
311 views
What are the common security flaws I need to look for? [closed]
As a wannabe WP plugin developper, what are the main security flaws/holes I should look for?
I'm about to create a new plugin with a configuration panel (ie input fields and stuff). What should I be ...
10
votes
4answers
175 views
What do you think about custom designed plugin/theme options UIs?
You probably noticed the trend of making custom designed plugin/theme options UIs, especially in the commercial ones (on CodeCanyon for example - custom boxes, tabs, accordions etc).
I personally ...
10
votes
2answers
429 views
Enhance Media Manager for Gallery
I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view.
I want to add a new select field on the right side and send the selected values to the gallery shortcode.
I ...
10
votes
4answers
1k views
Plugins in symlinked directories?
When I develop plugins I test them on multiple versions of WordPress by symlinking my plugin directory in the different wp-content directories. This is great since I only have to edit the files once, ...
10
votes
1answer
344 views
Plugin API for easy admin list table generation, handling & exporting of MySQL tables?
I'm aware of the WP_List_Table class (which has helped tremendously as it stands).
However, I'm hunting for something even more capable - some form of API whereby you could simply 'register' a MySQL ...
9
votes
4answers
748 views
Unit testing for plugin development
I need to apply unit testing for one of my plugins. I recently re designed it into classes, so unit testing should be easier to apply now.
What are some effective strategies to unit test my plugin? I ...
9
votes
4answers
3k views
Post meta vs Seperate database tables
When developing plugins that requires data storage, what's the pros and cons of using one method or another ?
The explication given in the codex is not detailed.
Before jumping in with a whole ...
9
votes
2answers
508 views
Strategy On Building Plugin Using Eclipse
Anyone who has experience in building wordpress plugin using eclipse PDT?
My situation is:
I need to build plugin that extend another plugin (look at it as premium version from another plugin)
I ...
9
votes
1answer
701 views
Symbolic Links on dev box with plugins and stylesheets
I'm using mac os x 10.6 with xampp.
http://wp3.1/ is the url to where I have WordPress installed.
The physical path is /Users/myUserName/Sites/wp3.1/
I do not install plugins or themes in the ...
8
votes
2answers
999 views
Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
Has anyone used autoloading and/or PHP namespaces within a plugin or theme?
Thoughts on using them? Any harm? Pitfalls?
Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know ...
8
votes
2answers
296 views
Conditionally enqueue a widget's script/stylesheet in HEAD (only when present on page!)
I've been trying to load scripts and styles for a WordPress widget with the following conditions...
The scripts MUST load in the HEAD (else they break).
The scripts must ONLY load when the widget ...
8
votes
1answer
1k views
WP 3.3 How to Add Menu Items to the Admin Bar?
I've just installed the Yoast SEO plugin and noticed that a new flyout menu was added to the admin bar once the plugin was activated.
Anyone know is there is a tutorial or example on how this is ...
8
votes
1answer
2k views
Difference Between Filter and Action Hooks?
I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a ...
8
votes
1answer
1k views
Custom Widget function in Plugin not working?
I took a code straight out of one of my themes I created, and it's a list of all 50 states in an unordered list packed into a widget you can just drag and drop on the sidebar.
The problem is, when I ...
8
votes
1answer
100 views
How come `wp_options` table does not have an index on `autoload`?
In the beginning of each page served by WordPress, there is a MySQL call to fetch options:
SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';
Because there's no index on ...
8
votes
2answers
293 views
Delete Wordpress plugin Repository
I wanted to create a WP plugin. So I requested and my request was approved by Wordpress.org But I don't want to develop that plugin anymore. How can I delete the repository forever or request its ...
8
votes
1answer
98 views
Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
I'm wondering how the number of downloads displayed in the plugin-directory correlates to the number of actual websites using the plug-in.
I realise some people will download and never install and ...
8
votes
2answers
195 views
Is There a Plugin Life Cycle Documentation?
Is there some documentation somewhere that explains what is the life cycle of the plugins?
I'm starting a new plugin with OOP style, and I just found out that my main class is being instanciated a ...
8
votes
4answers
1k views
How to debug a plugin with Xdebug?
I was able to install and setup quite easily NetBeans 6.9.1 and Xdebug on my local environment, based on PHP 5.3.0 (XAMPP).
My problem now is the following: if I put a breakpoint on Wordpress's ...
7
votes
3answers
1k views
Is the new WordPress 3.1 admin bar pluggable and how can I extend it?
How can I extend the functions of the WordPress 3.1 admin bar in my plugins?
I am looking for specific hooks and filters to use in adding links or other features to the admin bar.
A good example ...
7
votes
6answers
12k views
How to include PHP files in plugins the correct way
My problem is when on the main plugin file i include a php file
something like this:
include(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php');
//or
include_once(WP_PLUGIN_URL . ...
7
votes
5answers
249 views
Can a developer adopt a plugin marked as “not updated in over 2 years”?
I have come across a few WordPress plugins on http://wordpress.org/extend/plugins/ with this warning:
This plugin hasn't been updated in over 2 years. It may no longer be
maintained or supported ...
7
votes
1answer
1k views
Should I use custom post types or a custom database tables for plugin development?
I'm fairly new to writing wordpress plugins, but I've jumped in the deep end already and I want to make sure I'm doing it "right" on my upcoming big project.
I'm going to be heavily extending ...
7
votes
2answers
3k views
How do i best handle custom plugin page actions?
I'm constantly running into the same annoyance, so i thought i'd see if there's any ideas or experience out there...
I've created a plugin that uses it's own admin page. It has to. Now that i sorted ...
7
votes
2answers
702 views
How to fork a plugin?
I want to start giving back to the community, but writing a plugin from scratch is currently slightly beyond my skill level and creativity level (meaning, I don't know what kind of problem I can solve ...
7
votes
1answer
2k views
How are bulk actions handled in custom list table classes?
I'm working on a custom data table to display in the WordPress dashboard. The table populates from a database table I built in a plugin.
I've been using the provided WordPress Custom List Table ...
7
votes
3answers
215 views
Getting a peer review for my new plugin?
What is the best way to get an experienced WordPress developer take a look at my plugin and give constructive criticisms? I have written code to solve some of my questions on this site, and I think ...
6
votes
17answers
384 views
The Great Plugin Nomenclature Contest of 2011
It's been a while since I've done a bounty challenge, so here's another. Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will ...