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
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
459 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
156 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
220 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
1k 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
470 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
4answers
1k 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
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. ...
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
211 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
610 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
1answer
132 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
98 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
47 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
58 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
428 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 ...
4
votes
1answer
80 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
490 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
980 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
3answers
1k views

How should one implement add_settings_error on custom menu pages?

The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
4
votes
1answer
636 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
1answer
396 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 ...
4
votes
1answer
212 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
609 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
978 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
3answers
436 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
989 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
555 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
2answers
1k 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 ...
4
votes
1answer
463 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
349 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
2answers
651 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
91 views

Update exisiting site to 3.5 release candidate

I have an existing site that I want to update to 3.5 now, because I want to see if my plugins and themes work in it. I don't want to wait for the full release (when I'll be able to automatically ...
4
votes
1answer
182 views

Which method is best to enqueue scripts

I'm currently authoring the development of a plugin for wordpress, and I'm having trouble figuring out which would be the best way to add scripts to the plugin. I'm in the process of adding more ...
4
votes
2answers
586 views

Make Categories and Tags required in admin

Hello i started from Bainternet solution in this post: don't publish custom post type post if a meta data field isn't valid I made a plugin to make categories and tags required. The ...
4
votes
2answers
649 views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
4
votes
1answer
83 views

Cron firing my function everytime wp-admin is visited

This is a MU-plugin I'm developing, and I want it to run hourly. Unfortunately, it's running every time I visit any site's wp-admin page. I've used the Debug Bar plugin with the Cron plugin, and it ...
4
votes
1answer
423 views

How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS

In WP 3.4.x and earlier, it was possible to add a button to the media manager by messing around in an attachment_fields_to_edit filter. For example, a plugin could, when it figured out that an item ...
4
votes
2answers
1k views

custom XMLRPC method plus authentication of user & WooCommerce order

I'm working with a custom XML-RPC method to capture some information for a plugin I am building. When activated the user has to authenticate themselves by entering there user/password given to them ...
4
votes
3answers
1k views

Has anyone managed to integrate the wp_editor inside a widget?

Adding this in the widget form method: wp_editor($text, $this->get_field_id('text')); seems to work. But after you press the "Save" button the widget goes funky... Adding ...
4
votes
2answers
433 views

use Wordpress theme / plugin editor in my plugin

Is there a way to use the wordpress theme / plugin editor inside my plugin to give the user the ability to edit the css file of my plugin ? Im building a plugin that gives the user an option to add ...
4
votes
1answer
582 views

Custom attachments uploader code. Almost there!

The code below resides in my theme's functions.php and creates a custom upload icon on top of the WordPress content editor, alongside the default upload icon. Images uploaded via this icon get a ...
4
votes
1answer
308 views

Nav Menu meta failing to import

I'm the author of the Nav Menu Roles plugin that lets you display/hide menu items based on the user's role. It has come to my attention that the menu item meta does not import when using the regular ...
3
votes
3answers
1k views

Creating two database tables via plugin

I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips. In Codex it suggests to use an if statement to see if the table has ...
3
votes
4answers
771 views

Using a Theme inside a Plugin directory

I am building a mobile friendly plugin and put the theme directory inside the plugin directory. If it's a mobile browser, how can I redirect to the theme in the plugin directory? ...
3
votes
2answers
9k views

How to include wp-load.php from any location?

I have a plugin which calls a stand-alone php script (myAjax.php) via a jQuery.ajax() script inside the plugin. I need to place the following code into the myAjax.php file: ...