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)

5
votes
2answers
428 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
494 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 ...
5
votes
3answers
4k views

Passing arguments to a admin menu page callback?

Situation: I'm working on a plugin and I'm developing it as a class, everything worked fine until I run into this situation. I wanted to make things a bit cleaner and tried this.. class MyPlugin { ...
5
votes
3answers
690 views

Plugin directory “Last Updated” not changed after initial commit?

I released the first version of my Rewrite analyzer plugin with a commit on 2010-05-12. The WordPress.org plugin directory however still displays 2010-11-27 as the "Last Updated" date - this is the ...
5
votes
3answers
764 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 ...
5
votes
1answer
353 views

Adding more options to the instance of an image. (Attachment Display Settings)

I'm trying to build a simple reusable plugin for image presentation in Wordpress 3.9, and it seems I've hit a brick wall. I would like to be able to add a couple of options to the instance of the ...
4
votes
2answers
4k views

how to create child WordPress plugin

I like to create child plugin.. Explanation :- I have one parent plugin named X. This will work independently (like other existing plugins). Now I decided to add some extra features to that plugin ...
4
votes
7answers
3k views

is_plugin_active function doesn't exist

I'm using WordPress 3.0.5 and have tested with 3.1rc4. In the main PHP file of my plugin, when I try to call is_plugin_active I get Call to undefined function is_plugin_active(). I can call add_action ...
4
votes
3answers
6k views

add_action hook for completely new post?

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post ...
4
votes
3answers
13k 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
171 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
4k 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
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
365 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
1k 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
13k 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: ...
4
votes
2answers
3k 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
570 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
198 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
233 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
3k 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
839 views

Edit or Remove Plugin .htaccess Using The Admin Panel

I am looking for a way to edit or reset the .htaccess file for a wordpress site without access to the filesystem, working only with the wp-admin web interface and/or plugins* (see below for the back ...
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
493 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
51 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
2k views

Custom Filter in Wordpress to modify footer information via plugin?

Basically, I've got a plugin that searches for certain tokens in the entire page and replaces the tokens with images. The problem is, I've got one of those tokens in the footer and, as far as I can ...
4
votes
2answers
2k 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
1answer
1k 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
4k 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
2k 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
2k 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
277 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
143 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
111 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
1answer
137 views

How Can I Add a Filter to Class Instance Only?

I have a custom class which I use for several cases extending it, for example class A { public function show_things() { print_r( apply_filter( 'yet_another_filter', array( 'coffee', ...
4
votes
3answers
60 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
95 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
692 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
727 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
471 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
276 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
1k 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
2answers
885 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. ...