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
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.
2
votes
1answer
2k views

Update Option Stored in Multi-Dimensional Array

I have data in the wp_options table currently stored as a multi-dimensional array (profile_element_order): ...
1
vote
2answers
359 views

Is get_option function cached?

In my plugin, I use the following code to retrieve an option from the database: $options = get_option('my_plugin_options'); If I use this 10 times in various functions of my plugin, does WordPress ...
1
vote
1answer
170 views

One time username change from frontend?

I'm using facebook connect plugin. Usernames generated by that plugin look like firstname_lastname. I mean it looks ugly. I would like to give the privilege to my users to change the username BUT ...
1
vote
3answers
492 views

Two-step login process - Is it possible?

Is it possible to do the following with Wordpress (without hacking too much code - I would like to make this a general plugin using simple hooks)? Log in with the username/password. If ...
1
vote
3answers
1k views

anything like add_meta_box for categories?

I want to add few custom fields to categories. So I am looking for something like add_meta_box but for categories. Is there any WP function like that for categories?
0
votes
1answer
2k views

add_meta_box() to Category Edit Screen?

I've got a plugin that attaches itself to both the post and page editors to read and write to the post_content object. I'd like to also attach my plugin to the category manager edit screen. In the ...
15
votes
2answers
4k views

add_menu_page() with different name for first submenu item

The add_menu_page documentation says to pass the menu title as the second parameter: add_menu_page('Page Title', 'Menu Title', ...); When adding more pages later via add_submenu_page, the main page ...
5
votes
2answers
156 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
465 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
3answers
276 views

Releasing new plugin version, how to rename old options keys?

I have everything ready for publishing a new version of my plugin but one last issue stands... The old version had no naming convention for its key option names. The options grew and I renamed all ...
5
votes
10answers
5k views

Wordpress Plugin Development - Headers Already Sent Message

I'm developing Wordpress plugins. When i activate my plugin, i'm getting a message The plugin generated 293 characters of unexpected output during activation. If you notice “headers already ...
5
votes
4answers
4k 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?
4
votes
1answer
607 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

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
2answers
162 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?
3
votes
2answers
815 views

Overwriting Core Wordpress Functions with Plugins

Is there a way to overwrite a core function is the Wordpress core using a plugin? I don't need to inject code, I need to replace the function entirely with a re-written version. The specific function ...
2
votes
1answer
173 views

Add Admin Menu Inside Construct or Init

I thought I was making headway in my WordPress Development education until I ran across the Boilerplate for WordPress plugins and it uses a class object. I'm fine with that and understand those ...
2
votes
1answer
203 views

Do I need to call do_action in my plugin?

Do I need to call do_action function every time I add_action something?
2
votes
1answer
542 views

How to set a fall back template for a custom post type in a plugin?

My custom plugin creates a custom post type, and I want to theme my own "single-my_custom_cpt.php" file. However, I want to store it in my plugin folder, and allow that it be over-written in the ...
2
votes
4answers
720 views

How to debug WordPress correctly?

I'm using a few plugins and UpThemes framework on my new website and if I turn on Wp Debug I can see that there are a few errors related to Deprecated functions (but website is working). What I would ...
2
votes
1answer
978 views

What action is called when drafts are saved?

I would like to add a metadata field to the current post based on a checkbox in a custom meta box to be able to toggle my custom plugin on a post by post basis. For this I coded the following things ...
2
votes
2answers
659 views

Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?

My plugin code is below. In the myPlugin_cleanup() function, I'm creating some categories and assigning term id 1 as the parent. Due to the known bug with creating categories via script (the ...
2
votes
1answer
848 views

How to show custom message once on plugin activation?

I know by watching the akismet plugin source how to show a custom message on the plugins page, but I want my message to appear only once after my plugin is activated. How could i do this?
1
vote
1answer
114 views

which action to hook to in order to perform post-publish action

I have some functionality I've written in order to post the title and link for the post to twitter whenever a post is published. I'm wondering which wp function to hook this to? save_post has no real ...
1
vote
1answer
889 views

How to bundle a plugin with a theme, or vice versa

First off, I'm all about separating design and function. In fact, I want to remove some of the functionality from a webcomics management theme I'm developing into a plugin. I expect a person's ...
1
vote
1answer
547 views

Call to undefined function get_blog_option()

In the functions.php of my plugin I've added the following code: function relativePathForUploads( $fileinfo ) { global $blog_id; $path = get_blog_option($blog_id,'siteurl'); ...
0
votes
0answers
21 views

Activate Plugin which is in subfolder?

I try to activate the plugin inside the plugin folder is possible ? I am adding the absolute path of the plugin as something like I have a folder as main file and subfolder contain another plugin ...
0
votes
1answer
63 views

How to add more than 1 user role to sub-menu pages

I create a plugin with 6 submenu pages. I need 4 of them to be accessible by administrator and a custom user role i created say 'coach' user. Then the 2 of them to be accessible by administrator and ...
0
votes
1answer
1k views

Using the 'draft_to_publish' hook (post status transition)

I am trying to use the draft_to_publish hook (http://codex.wordpress.org/Post_Status_Transitions) to run a function when a post that is a draft becomes published. This hook does not appear to be ...
0
votes
3answers
1k views

When do I need to use esc_attr when using WordPress internal functions

When I am putting a WordPress value inside the attribute tag, for example, the following method does not need esc_attr e.g. // JS code alert('<?php echo get_bloginfo('name');?>'); the ...
0
votes
2answers
420 views

How can I track active users of my plugin? and why doesn't WordPress.Org offer this?

It seems every major app platform from Android to iOS has great stats for developers. However, if you publish a plugin via WordPress.org you are not allowed to include any 3rd Party tracking code (for ...
0
votes
2answers
763 views

How to add pages to custom menus on the fly [duplicate]

Possible Duplicate: Can I add pages to my custom menu via script? My theme has a custom menu called "Custom Header Menu" and i've got a plugin that sets up site defaults and creates my ...
0
votes
3answers
390 views

Adding admin menus to wordpress

I am trying to add a menu box to Pages > Pages or Pages > Add New, basically whenever they access a page, be it to edit an existing page or add a new one, I would like to add a menu box under ...
0
votes
2answers
576 views

Possible to preset a widget's contents via a plugin script?

This plugin is a simple demo test to see if I can dynamically populate a pre-existing widget area with text. In this case, my theme has created the widget area "home-header-widget" and I'm trying to ...
0
votes
1answer
574 views

How to preset a sidebar widget with default content via script?

I'd like to add some code to my plugin populate a specific sidebar (if it exists) with a text widget containing preset content. Assuming that the sidebar I'm trying to preset is referenced by ID as ...
6
votes
3answers
4k views

Getting Path To Uploaded Attachment Image After Upload

After you have uploaded an attachment in Wordpress using the media upload screen, is there a hook or filter I can run after the image has been uploaded where I can get the path to the uploaded image ...
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 ...
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 ...
3
votes
1answer
650 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 ...
3
votes
2answers
346 views

Re use authenticated HTTP connection or cUrl handle

We have a bespoke Wordpress plugin, which adds a meta box to the edit post page. The plugin accesses data from a semi-private HTTP REST API. The connection is authenticated (DIGEST) and accessed ...
3
votes
1answer
385 views

WordPress adding <br> tags into plugin content

We've written a plugin that shows reviews upon usage of a shortcode. On some sites, Wordpress is adding <br> tags throughout the shortcode content, and others it does not. The shortcode works ...
3
votes
2answers
2k views

Add a jQuery function to admin pages

I need to add a bit of document ready jQuery to post/page editors in admin. I'm hacking an old plugin that adds a text box to the editor page and handles inserting that text in a template file, but ...
3
votes
1answer
431 views

Build path for a custom portfolio plugin

I'm finishing up a personal site that I've spent many weekends on. I've left one of the (potentially) most complicated parts to the end of production. I'm looking for some advice on how to proceed ...
3
votes
1answer
390 views

How Does Wordpress Uninclude/Deactivate A Plugin?

Wordpress uses the Observer Pattern for its plugin system and operates on the premise of checking if a plugin is activated, scanning the plugins directory and storing everything in an array in the ...
3
votes
3answers
7k views

Wordpress Vote Plugin - Vote Once and Track User

I've been looking through voting plugins and cannot seem to find one that works for me. I'm hoping you can help me out before I have to build my own as I'm tight on time. I have a page that will be ...
2
votes
1answer
319 views

Using wp_filesystem in Plugins

I wrote a plugin (https://github.com/bassjobsen/custom-bootstrap-editor) this plugin writes a stylesheet to wp-content/uploads/cbe. I will use something like the code below to do this: $upload_dir = ...
2
votes
2answers
202 views

Trouble with Transient API when W3TC is activated

I'm using W3 Total Cache 0.9.2.11 on Wordpress 3.5.2. I've got a problem with transient API and w3tc's object cache setting. When I activate 'object cache' with memcached (other settings are ...
2
votes
3answers
546 views

Shortcode adding p and br tags

I apologize as I realize this has been asked before and I believe the issue is with wpautop function adding closing p or br tags but every solution I've found has not worked so I'm at a loss for ...
2
votes
1answer
191 views

Save HTML formatted data to post meta using add_post_meta()

Array ( [post] => Array ( [jw_objective] => Exposure to e<b>nd to end development</b> of various applications; right from requirement analysis to system ...