In what order does WordPress load plugin files?

Answer to the First question: In wp-settings.php, WordPress first checks for any must-use plugins (plugins in the optional mu-plugins folder) and loads those. Then, if you’re running a multisite installation, it checks for plugins that are network-activated and loads those. Then it checks for all other active plugins by looking at the active_plugins entry of … Read more

Should all plugins be encapsulated in a Class?

When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts? Yes, but that’s only one of the minor arguments. In-fact that’s not the “true” nature of a class in OOAD. Does using classes create performance overheads for PHP? No, not notably. Bad design and/or bad written code or … Read more

How can I force a file download in the WordPress backend?

If I understand you correctly you want to have a URL something like the following whose response to the browser will be the content you generate, i.e. your .CSV file and no generated content from WordPress? http://example.com/download/data.csv I think you are looking for the ‘template_redirect’ hook. You can find ‘template_redirect’ in /wp-includes/template-loader.php which is a … Read more

Get a list of all registered actions

Filters and actions are both assigned to hooks. Functions assigned to hooks are stored in global $wp_filter variable. So all you have to do is to print_r it. print_r($GLOBALS[‘wp_filter’]); PS. add_action function makes a add_filter call. And the latter does $wp_filter[$tag][$priority][$idx]. NOTE: you can directly add this code in functions.php, and you will see a … Read more

Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]

Welcome to WordPress stack exchange! Just yesterday I created WP-Markdown, which enables Markdown on your posts. It also provides the same interface as this website (the toolbar, and live preview) – however, currently only for comments and bbPress forums (if enabled). That said, (since it would be straightforward to do), I am planning on adding … Read more