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)

4
votes
3answers
3k views

Which hook should be used to add an action containing a redirect?

I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I'm following the excellent the Professional WordPress Plugin Development ...
4
votes
3answers
11k views

Get page content using slug

I'm trying to get page content when I only know the slug string. Is there a function for this, or an easy way to do this or is this a case of doing it via SQL? Thanks very much
4
votes
2answers
165 views

Where do I start from

I'm student web developer and I'd like to know the things I should know before venturing into WordPress. Where do I start?
4
votes
3answers
430 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 ...
4
votes
2answers
1k views

WP 3.3 Tooltips API?

Does anyone have a tutorial on how to implement the new Tooltips API into a theme or plugin? I'm eager to tap into this to help first time users of my theme and plugins. From mashable'e excellent ...
4
votes
4answers
349 views

Where is it better to start learning how to develop for Wordpress?

I have already read this question and answer to it ( Where do I start from ). So I have slightly different question. If I basicaly have no knowledge of how the WordPress code is structured and I have ...
4
votes
2answers
987 views

Where can I find a schema of wordpress plugin core architecture?

There are plenty of articles which explain how to create a wordpress plugin. I'm not looking for that, I'm looking for a schema of the core architecture of a wordpress plugin (an UML class diagram and ...
4
votes
1answer
2k views

How can I add columns to the post edit listing to show my custom post data?

When you click on "Posts" or "Pages", you get a paged listing of your posts or pages with the following columns: Title | Author | Categories | Tags | Date I have a plugin which gives an SEO score ...
4
votes
2answers
2k views

Redesigning Custom Post Type “Add New” page

I've been browsing all over google for a solution to this. I'm writing a custom post types plugin for work to log-in visitors that we get. I initially wrote a mock-up without custom post types, then I ...
4
votes
3answers
519 views

Is there a way for a plug-in to get it's own version number?

Is there an API I can call, inside my plug-in, to determine the plug-in's version? I just want to have my plug-in emit a html comment with it's own version number ... for diagnostic purposes.
4
votes
3answers
182 views

Custom Post Type Link from Plugin

I'm currently working on a plugin that creates a custom post type. The issue I'm strugging with at the moment is that the custom post type is created fine, but when I go to add a new post I receive ...
4
votes
4answers
228 views

Can i do plugin commits directly from a plugin folder inside an installation using the Trunk SVN

I have several virtual hosts setup, three of them pull files via SVN when needed(though only the trunk folder actually needs this), using SVN for other versions make for easy patch creation, or easy ...
4
votes
3answers
2k views

Creating a default Custom Post Template that a Theme can override

I'm in the midst of building a Wordpress Plugin that adds a custom post type, for which I'd like to include a default template to display. Essentially, this is an event management plugin, and the ...
4
votes
4answers
2k views

How to Get a List of Sub Blogs without Using get_blog_list()?

The get_blog_list() function has been deprecated from v3.0. How does one get a list of blogs in a multisite blog?
4
votes
2answers
3k views

What is the difference between the “wp_footer” and “get_footer” actions?

I am working on developing a plugin, and I am trying to add a line of text to the bottom of the page, I see there are two actions that seems reasonable, wp_footer() and get_footer(). wp_footer sounds ...
4
votes
3answers
480 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
4
votes
1answer
50 views

Does a plugin's “main” file need to be named the same as the folder containing it?

I remember - many moons ago - debugging a plugin that I was building for a very, very, long time. The only thing that fixed my issue (which I can't remember for the life of me), was to name the ...
4
votes
1answer
804 views

Plugin - create a page without it appearing in the side menu

I am currently using add_submenu_page to add pages for my plugin. However, I wish to create a page that don't appear in the admin menu, is that possible?
4
votes
2answers
3k views

How to validate custom fields in custom post type?

I wrote a plugin that creates a custom post type with custom fields. To prevent users from entering incorrect information, how can I validate the data? I assumed that the save_post hook function ...
4
votes
3answers
1k views

How do I change the author of a custom post type?

I have made a custom post type and need to be able to create posts and assign them to authors. It is easy to do this with posts as you can go to the bulk edit screen and immediately change the author. ...
4
votes
4answers
2k views

Where to put third party PHP library?

I'm developing a couple of open-source plugins and a theme (all part of a "suite") that all use the same third party PHP library. I'm wondering what is the best way to include it in Wordpress. Here ...
4
votes
1answer
1k views

function deactivate_plugins does not exist

I am getting function deactivate_plugins does not exist error when calling this function function deactivateSelf(){ deactivate_plugins(RSD_PLUGIN, true); //gives error: function ...
4
votes
2answers
1k views

Custom Post Type Plugin: Where Do I Put The Template?

I'm writing a custom post type plugin. Part of it I'm outputting to the template via shortcodes. But other parts need a custom post template, and I figured out how to use the template hierarchy for ...
4
votes
2answers
248 views

How to read configuration file in wordpress or PHP

I am not sure how relevant this is,i am working with Java based web-application, so in some cases we need to define some properties which can be used in entire web application like Google API Key ...
4
votes
1answer
138 views

Does WordPress have an Browser Agent?

I want to block a directory to everyone but WordPress's internal upgrade feature (I am trying to get WordPress to do auto-updates of my premium plugin). I have it updating, but I really would like to ...
4
votes
1answer
105 views

How Do I Load My Action Earlier Enough?

With add_action, I want to intercept as early as I can in my plugin and send a 304 Not Modified header per some rules. Does anyone know what the order is of events? When I view this page, it seems to ...
4
votes
2answers
48 views

What is the correct way for a theme to support plugin UIs?

For instance if my plugin is creating a form on a page, what can I do to make it as easy as possible for theme developers to skin the form too?
4
votes
3answers
59 views

How to sync with plugins update after I have done manual optimizations?

I have several WordPress running plugins on my site and as per suggestions of wordpress performance optimizations I am planning to do the optimizations on plugins myself. However, that will mean ...
4
votes
1answer
90 views

Output in XHTML or HTML 5 for plugins?

I'm currently writing a plugin that displays some images - possibly with captions. So, I was wondering whether to use XHTML (<div>s and <span>s) or HTML 5 (<figure> and ...
4
votes
1answer
604 views

How do I “replace a function via plugins” in WordPress?

I'm new to WordPress and am not understanding their docs. What I'd like to do is to replace the wp_hash_password (and a few other password related functions) with my own. I've already written the ...
4
votes
1answer
1k views

How to output message during plugin activation

I am developing a plugin, but during the activation phrase I am constantly facing bugs. However there is no easy way to display error messages, since echoing stuff would result in 'unexpacted output' ...
4
votes
1answer
676 views

Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?

I am making a plugin and I have a bunch of different data types that I am creating edit pages for. I'd rather not have to create a separate function to add each one to the admin menus, since they're ...
4
votes
4answers
1k views

How to auto-upgrade my plugin?

How do I have my plugin pop up with that New version available. Upgrade Automatically dialog to appear when my plugin has a new version? Specifically for plugins not hosted on the WP.org repository.
4
votes
3answers
323 views

How to delete custom taxonomy terms in plugin's uninstall.php?

I am writing my plugin's uninstall.php file and would like it to delete any terms that were created in the plugin's custom taxonomy. In the plugin's uninstall.php file I am using this: // Delete all ...
4
votes
1answer
241 views

How to get vim to autocomplete WordPress API functions?

I guess built-in omnicomplete is a start, but perhaps we're talking some neocomplcache plugin module or something themsuch? Googling "vim wordpress autocomplete" doesn't really give much.
4
votes
2answers
861 views

Get a path to a different plug-in

To get a the path to a plugin you can use plugin_dir_path(__FILE__) - but this obviously has to be called from within the plug-in. How can you reliably get the path to plugin B (pluginb/pluginb.php) ...
4
votes
1answer
87 views

“Donate to this plugin” for WordPress.org Plugin Authors

I recently saw a link titled "Donate to this plugin >" link on a WordPress theme (and then I did!). How is this added to a plugin's page on wordpress.org? Here's a screenshot:
4
votes
1answer
1k views

Admin config screen without menu

I want to create a sub config from some page on admin panel, eg: I've set config menu this way: add_menu_page( 'E+', 'CRE+', 8, 'cr_e_plus_user_config', 'cr_e_plus_user_config'); add_submenu_page( ...
4
votes
1answer
145 views

Must-use plugins autoloader: How to use get_plugins() correctly?

My autoloader class is responsible for loading must-use plugins that do not sit in the root of the mu-plugins folder. To locate them, I need to use the get_plugins() function. According to Codex, the ...
4
votes
1answer
120 views

Is it worth checking if class_exists when developing a plugin and how to do it?

I'm learning WordPress plugin development using OOP approach. In most resources before declaring a class there is usually a check if class exists class_exists(). Is it a good approach to check this ...
4
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) { // ...
4
votes
1answer
944 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 ...
4
votes
3answers
493 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 ...
4
votes
1answer
1k views

Register custom query args parameter for WP_Query()

I have written a plugin which can store a table of technical specifications for each post (product) in an own database table. For the search function of the site I want to add a custom parameter to ...
4
votes
2answers
745 views

Add custom user capabilities before or after the custom user role has been added?

Should custom user capabilities be added before the custom user role has been added, or the other way around? add_role() asks for and array of $capabilities in the third parameter of the function. ...
4
votes
1answer
518 views

Upload file to remote storage

I am looking to overwrite the existing upload functionality to save the file on a remote storage service. The remote storage has an HTTP interface that allow me to post file and return an addressable ...
4
votes
3answers
396 views

Handling jQuery Component Collision

In plugin development, what is the best practice to prevent jQuery component collision on the front end? For instance, let's say I include the jQuery Apprise dialog in a plugin that loads this on the ...
4
votes
3answers
966 views

Widget development - Drop down options won't save

So, i successfully managed to add a drop down option, the problem is when i click save all of the options are removed, however the chosen option is implemented successfully. Here is the relevant ...
4
votes
2answers
747 views

Wordpress as College Application System (Embark)

Anyone knows of any plugin or anyone has been using WordPress to serve as a College Application system similar to those by Embark? If not, I'm looking for idea of using current plugins to accomplish ...
4
votes
1answer
813 views

Prevent notice and warnings in error_reporting?

When turning opn WP_DEBUG and WP_DEBUG_DISPLAY, I get tons of warnings and notices. I have tried to remove the warnings by doing a @ini_set('error_reporting', 1) to only show E_ERROR, but I still get ...