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.

learn more… | top users | synonyms (1)

6
votes
1answer
646 views

What is the difference between esc_html and wp_filter_nohtml_kses?

What is the exact difference between esc_html and wp_filter_nohtml_kses. Everywhere I look says that both strip all the html, the only difference I can see is to do with exactly how they do this. Does ...
6
votes
1answer
130 views

Rewriting every url

I have a question regarding permalinks and rewriting url's. I am writing a translation plugin and I would like to add the language shortcode in my url (Something like ...
6
votes
4answers
153 views

Is it necessary to bump a plug-in's version if you're just updating the “Tested up to” attribute?

I've got a number of plug-in's hosted on the wordpress.org svn server ... with the immenent release of 3.1, I would like to update the "Tested up to" meta data. There will be no functional changes to ...
6
votes
3answers
879 views

Replace audio/video enclosure with player?

Current state: I'm parsing XML feeds into the front end and/or the back end (Admin UI), but not into the DB. Inside those feeds i place mp3- and video content, currently only as plain text (no link, ...
6
votes
1answer
788 views

Mini-Site Strategy

I'm working on a project to allow a number of mini-sites within a WordPress multisite installation. Here's how it's supposed to function: The client has a large number of individual locations, each ...
5
votes
2answers
5k views

How to change a user's password programatically

I am trying to create a totally different profile page (not the one provided by Wordpress), since the layout and feel of the default profile page is too "Wordpress" for the users. Now I am successful ...
5
votes
3answers
741 views

How do I log plugin (cron) actions?

Is there a recommended way to log (failed) cron actions from your plugin? For example, I have a plugin that synchronizes with an external service every hour. I want to log how much was changed, but ...
5
votes
1answer
509 views

Why does WordPress add 0 (zero) to an Ajax response?

Unless I end Ajax processing function by exit() or die(), the Ajax function receives desired and correct output but following by 0. Any idea why is that happening? Is that meant to be like that or ...
5
votes
2answers
900 views

Test to see if jQuery or Prototype is queued by another plugin?

In my plugin, I want to test to see if jQuery or Prototype (or both) are going to be loaded by another plugin. So, have wp_enqueue_script('jquery') or wp_enqueue_script('prototype') has already been ...
5
votes
4answers
2k views

How to create and link to administration page for a plugin?

OK Full Code: <?php //check to see whether the user is an admin or not. if (is_admin()) { function wpsc_display_products_seo(){ global $wpdb; $productList = $wpdb->get_results("SELECT * FROM ...
5
votes
3answers
445 views

Is it a good idea to edit an already existing plugin to add more functionality?

I need to add a relatively small bit of functionality to a Wordpress plugin and I have the option to either edit the plugin directly, or scrap the plugin completely and repurpose PHP code from another ...
5
votes
4answers
8k views

What is the wordpress wp-includes folder for?

What is the wordpress wp-includes folder for? That is, whats the fundamental architectural purpose of it, for example why isn't it all in themes or an admin folder? Can a plugin developer rely in ...
5
votes
2answers
395 views

How to redirect to settings page once the plugin is activated?

I created the Plugin of my own. Everything seems OK but one thing I want to do in that plugin is redirect to the corresponding plugin settings page when the plugin is activate. For example: ...
5
votes
2answers
2k views

How Do I Use jQuery UI In My Plugin

It's a sad day in the world when I Google something and it returns nothing. I am trying to use the default datepicker (or ANY datepicker at this point) and am unable to because of my lack of ...
5
votes
2answers
2k views

How to implement bulk actions in my plugin?

I am developing a WordPress plugin. This plugin displays a list of courses. Now I want to implement the bulk actions just like in other plugins. From where I can apply the delete and edit actions to ...
5
votes
4answers
6k views

What is difference between get_bloginfo('url') and get_site_url()?

I am developing a plugin. I want to know difference between get_bloginfo('url'); and get_site_url(); I got same output, then what's the difference?
5
votes
2answers
917 views

WP_Query leaking absurd amounts of memory

Every time I call WP_Query() in the function below, Wordpress leaks 8 megs of memory. And since I call this function a lot, things get hairy pretty quickly... :( I've tried unsetting the resulting ...
5
votes
1answer
1k views

Load js/css files only on specific admin UI pages

How do I adapt this solution to work with my plugin? (Please see the link). I enqueue my css and js script as follows: function my_plugin_init() { wp_enqueue_script('my_plugin_script', ...
5
votes
2answers
4k views

Using add_theme_support inside a plugin

I've created a custom post type as a plugin and released it into the repository. One of the core features involves using a featured image. I've added thumbnail to $supports in register_post_type(), so ...
5
votes
1answer
581 views

How does Wordpress handle MySQL row lock errors?

If there is a WordPress plugin which updates rows in a custom table, but that update encounters a row lock, what happens? E.g. two users simultaneously fire an update on TABLE1, one setting AGE=1 and ...
5
votes
4answers
2k views

Update plugin from personal API

I'm developing a wordpress plugin at the moment which I do not want in the Wordpress plugin repository. However I still want to be able to push updates to my costumers from my own API repository. ...
5
votes
2answers
371 views

How would I create a plugin for my shortcodes?

All tutorials I have found say to add your shortcodes to functions.php in your theme. I would like to break that away from my theme and put that in a plugin so I can share these shortcodes between my ...
5
votes
1answer
750 views

How can I find plugins' slug?

I'm wondering how can I find plugins' slug (slug = internal name used by WordPress to do plugin updates and to determine which plugins are currently active)? It is usually plugin's folder name but if ...
5
votes
2answers
208 views

What is wrong with using add_option with Multisite instead of add_blog_option in a plugin

I'm working on a new plugin but it's my first to save which will save an option to the database. Currently I'm using add_option and I assumed that - activation would fail or - the wrong value would ...
5
votes
3answers
1k views

How to create a Wordpress plugin for another wordpress plugin?

I always do changes on the Wordpress plugins for clients. But these changes are always in danger to be lost if the plugin is updated. Is there is a way to make a plugin for another plugin in ...
5
votes
2answers
1k views

How to provide translations for a WordPress TinyMCE plugin?

I know that I can get my translations into JavaScript doing: $MyTranslations = array( 'translation1' => __("Some String 1", "MyTranslations"), 'translation2' => __("Some ...
5
votes
3answers
2k views

Changing Plugin Load Order

I'm writing a plugin, bar, which is dependent on another plugin, foo, being activated, and I need the functions from foo to be available when bar loads. Normally plugins are loaded in alphabetical ...
5
votes
1answer
201 views

Completely remove WP_Admin_Bar for specific user roles

How do I hide/remove the admin bar that is displayed when a user with specific role is logged in? I figured I have to do something with remove_menu(), but not exactly what and how. Codex
5
votes
1answer
198 views

Do plugin files have to follow a specific convention to be “picked up” by WordPress?

I developed a plugin using the normal convention of naming the main plugin file after the plugin folder (i.e. prefix-someplugin for the folder and prefix-someplugin.php for the file). However, I saw ...
5
votes
1answer
838 views

dbDelta not creating tables

I went through a lot of threads, codex page and tried messing with a lot of things but my code doesn't seem to be creating the tables. And I am not able to figure out where I am going wrong. I checked ...
5
votes
3answers
343 views

Prevent network activation of plugin

I have a plugin that currently doesn't support network activation. The best fix for this of course is to fix it :) which I plan to do. However I wonder if there is a temporary solution I can use to ...
5
votes
1answer
964 views

Inserting Taxonomy Terms During a Plugin Activation?

I've been trying various ways of doing this. Basically, I've been trying to make it so that a plugin of mine populates the terms of a taxonomy only once during the plugin's activation. The term ...
5
votes
2answers
5k views

Quick edit screen customization

Possible Duplicate: How to show custom meta box on "Quick Edit" screen? I'm trying to edit the quick edit screen on my custom post type "visitor" so that I can add some options for my end-users. My ...
5
votes
1answer
452 views

Modifying the way WP sets cookies

I'm trying to create a custom plugin that will change the way that wordpress names its cookings. Specifically, I want to write my own version of wp_user_settings(). I know I probably shouldn't hack ...
5
votes
2answers
272 views

Best practice for including plugins as part of a theme?

I'm working on a theme that includes some functionality I've developed as separate plugins (as I'm hoping to release them independently). I'd like to include these plugins as part of the theme core ...
5
votes
1answer
214 views

Using a database view = evil incarnate?

I'm at a point in doing some WordPress plugin development where from what I can tell I either have to create an entirely new plugin or I can create a database view. The client wants some simple logs ...
5
votes
1answer
343 views

Strategies to implement selective loading of plugins

I'm trying to figure out some kind of mechanism to load plugins on demand, depending on the page url, to improve performance. My primary concern is that I have some admin-ajax.php calls that are ...
5
votes
1answer
121 views

What is the etiquette on extending a plug-in

I recently played with a plugin which I liked a lot, but felt it was missing something. So as first stage I went and wrote a tiny plugin (my first), that just added the needed feature - meaning, that ...
5
votes
3answers
529 views

WordPress Plugin Development from Scratch. How?

I would like to learn how to create a plugin from scratch, there are tons of tutorials out there on the internet, but they are either premium or not a reliable resource. would like to know which are ...
5
votes
2answers
3k views

Send user activation email when programmatically creating user

I wondered if someone here might be able to help. Basically, I've created a custom registration form that when validated, inserts a user to the user table. function _new_user($data) { // ...
5
votes
3answers
2k views

Query Posts by Custom Field 'Price'

I'd like to display all posts within a given price range. For example: When a user inputs 100 and 1000 (in two separate form fields) - my site will display all posts that have a custom field called ...
5
votes
1answer
552 views

How do you create an archive for a custom post type from a plugin?

So I'm creating a plugin to create buildings that list condos for sale. The simplest way to do this was to just create a custom post type for the buildings and then the listings but I'm now stuck on ...
5
votes
1answer
140 views

Listen to Post action

I am writing a plugin that adds a custom metabox to the post page. I would like to trigger an event when the user navigates away from the edit post page or when a user stops editing a specific post. ...
5
votes
2answers
200 views

What is the difference between using global $current_screen and get_current_screen()?

I have been looking at get_current_screen();. I have seen there is also a global $current_screen; that I could use. Here are two examples: // Using function function wpse_post_notice() { ...
5
votes
1answer
1k views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
5
votes
1answer
359 views

Uninstall script for a plugin in Multisite

I've just realized that the traditional uninstall.php file along a plugin is not working in Multisite. if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit(); delete_option( 'plugin_option_name' ); ...
5
votes
4answers
536 views

How to control output of custom post type without modifying theme?

I have a custom post type 'properties' that I'd like to control the HTML output for. For simplicity, let's focus on the archive view. As a basic example, here is what a loop looks like in an ...
5
votes
2answers
397 views

Passing current cookies in wp_remote_get to get Draft Post Preview

I want pass current user cookies in wp_remote_get function to get a Draft Post Preview page content. I check already the questions: What URL do you pass to wp_remote_get to load the body of the ...
5
votes
1answer
478 views

Wordpress URL Rewrite not working

I'm trying to create a custom url rewrite for my wordpress plugin. function insert_plugin_rewrite_rule($rules) { global $wp, $wp_rewrite; $wp->add_query_var('update_slug'); $ret = ...
5
votes
2answers
2k views

Get List of Registered Meta Boxes and Removing Them

Is there a function for getting a list of registered Meta Boxes and removing them? I see there is a method for adding, and removing. http://codex.wordpress.org/Function_Reference/remove_meta_box ...