Articles of plugin development

Is Dreamweaver CS5 a serious choice for theme/plugin development?

I’ve heard that Dreamweaver has been improved significantly in latest versions. Does anyone have experience in developing a theme or plugin using Dreamweaver? What are the pros/cons? Thanks in advance

Mixing Regular Javascript With jQuery in a Plugin

Sorry for a simple question. I’m learning about plugins. I’ve got some javascript that I want to put in a jQuery file in my plugin. (I’ve got jQuery and the scripts enqueued, and working fine). Is it okay if I just prepend the javasvript to the jQuery? So, the file would look like this: //regular […]

Is there a way to alter the order in which the plugins appear in the page?

I currently have the following plugins activated in my wordpress installation: row 1: Outbrain row 2: Subscribe via feedburner RSS/email row 3: Topsy tweet widget, FB like widget, WP-Email a friend widget I want to change the order in which they appear. I want widgets in row 3 to appear first, outbrain widget to appear […]

How to put placeholder text in the main post input area?

I’m making a course plugin for a university in England. I’m looking to put some default placeholder text in the main post content area, on the admin side. Its the rich text editor I want it to go behind. I might just be typing the wrong words, but can’t find it here… preferably a non […]

Prevent Plugin from loading on 'wp-admin / wp-login'

I am creating plugin that redirects users UNLESS they are visiting from a specific IP. Originally I had this code sat in index.php so it would never load on wp-admin, wp-login pages. However since I have moved this code to a plugin it is. Does anyone know how I can stop the plugin from running […]

How can plugins have their own pages?

My plugin needs to introduce a number of interfaces to WordPress for the public traffic. What is the best way of introducing new interfaces?

Why doesn't flush_rewrite_rules run on plugin activation?

I’m trying to flush rewrite rules in a plugin and it isn’t working. I have to go to permalinks -> save in the admin panel for the rewrites to flush. Can anyone see why? class SpektrixPlugin { public function __construct(){ add_filter(‘query_vars’, array($this, ‘add_query_vars’)); add_action(‘init’, array($this, ‘add_rewrite_rules’)); } public function activate() { flush_rewrite_rules(); } public function […]

wp_count_posts on all post types?

I have 5 different custom post types, Is there any way to count all the publish posts regardless of post_type through any inbuilt functions Like wp_count_posts(array(‘post’,’books’,’video’)) any ideas

working Custom Post Type and Widget code no longer works when moved from functions.php to plugin

I’ve developed some functionality for a company website around job postings. There is a custom post type, with specialized fields, and a widget that displays a summary of current job postings. It’s 5 functions and a widget class that was hobbled together from various websites etc and dumped into functions.php. It works. Now I would […]

How to i18n text coming from the db or from an external source

I’m writing a plugin and i wanted to i18n correctly text which i’m storing in the db or in an external file. How should i do that?As of now we are generating pot files with wordpress and so all the Translatable text is in calls __( ‘text’, ‘plugin_name’); But there is some text i would […]