Software for WordPress Theme and Plugin Development? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

WPSE Plugin Repository: The plugins that came out of WP-

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 wrote something like “I wonder how many plugins will come out of WA”. “Rules” Write a short – … Read more

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 . ‘/wordpress-group-buying/ipn/paypal-ipn.php’); // or require(WP_PLUGIN_URL . ‘/wordpress-group-buying/ipn/paypal-ipn.php’); // or require_once(WP_PLUGIN_URL . ‘/wordpress-group-buying/ipn/paypal-ipn.php’); and on that file I have a call to a WordPress function like: add_action(‘hook’, ‘callback’); and I get: Fatal Error: … Read more

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 you’ll be dealing with servers that you know have PHP 5.3 or greater. Okay, I’ve had two big projects where I’ve been in … Read more

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 some misconceptions about the inner workings of WordPress. I am asking for an answer based on facts, not on opinions. … Read more

Uninstall, Activate, Deactivate a plugin: typical features & how-to

I’m making a WordPress plugin. What are typical things I should include in the uninstall feature? For example, should I delete any tables I created in the install function? Do I clean up my option entries? Anything else? There are three different hooks. They trigger in the following cases: Uninstall Deactivation Activation How-to trigger functions … Read more

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 becomes the first entry in the submenu: However, I want the first item in the list to have a different name (but still point to the same … Read more

Objective Best Practices for Plugin Development? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more