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
317 views

Trouble with Transient API when W3TC is activated [closed]

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 ...
4
votes
1answer
333 views

Writing a plugin that notify my friends of new post that mentions(@) them

For example, I write a new post with content "Today I'm happy, because I finally met the girl that @David told me about bla blah..." Once the post is published, there should be an email notification ...
4
votes
1answer
92 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
189 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
724 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
712 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
41 views

Check the Version of an Enqueue'd External Library

I want to use an external font library in my plugin, but I want to do a version check first to determine if I should bother enqueue'ing my version or not. I know I can see if a library is already ...
4
votes
1answer
85 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
484 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
490 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
605 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
165 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
1answer
377 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
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 ...
3
votes
2answers
3k views

Making a plugin file accessible via url rewrite?

In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file: ...
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
813 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
1answer
519 views

Where the Nickname is being used in WordPress

I see most of the place is using the "Display name", so why I need to set a Nickname? Where it is being used?
3
votes
1answer
230 views

Nonces can be reused multiple times? Bug / Security issue?

I've read that nonces are meant to be for one time use only, and after an ajax request, you should issue a new nonce so with the next ajax request, a new nonce would be sent to the server. However, I ...
3
votes
2answers
11k 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: ...
3
votes
3answers
8k 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 ...
3
votes
2answers
4k views

Get post ID from the Create post/page admin interface?

I am adding a meta box in the create post/page interface and I want to get the ID of the post being edited/created so I can dynamically display the value of the input field. From the wordpress codex ...
3
votes
3answers
2k views

Is there a hook for when you switch themes?

I created a plugin but I just came across a bug that I don't really know how to solve. When you activate my plugin, it creates a file in the active theme directory and when you deactivate it, it ...
3
votes
2answers
1k views

Is There A Hook To Process The Content Of The Text Widget?

Is there any filter which can be used in a plugin to process the content of the text widget before it is rendered?
3
votes
2answers
296 views

Best practices for using the transients API

I've recently come across the Transients API in Wordpress in hopes of improving the performance of the plugin that I'm trying to write. Basically the plugin is storing product details from the amazon ...
3
votes
1answer
183 views

Which action for triggering cron “wp”or “init”?

Which one do you recommend using within a plugin and why? add_action( 'wp', 'trigger_me' ); function trigger_me() { if ( !wp_next_scheduled( 'my_plugin_cron' ) ) { ...
3
votes
2answers
203 views

Load visual editor without custom styling

I have a plugin that uses the wp_editor() function to load an instance of the TinyMCE editor. However, the editor is affected by custom styling to make it look similar to the theme through the ...
3
votes
2answers
620 views

jQuery in header or footer

From my reading it seems there is a good case for loading scripts like jquery and dependencies into the footer as a preference if possible; however 2 things confuse me which. Firstly the default for ...
3
votes
2answers
3k 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
406 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
2answers
436 views

Error getting correct blog_id on MU from functions.php

I have script in my functions.php that seeks to locate the media directory of the site in which the theme is installed. This is pretty simple unless the site is an MU site. In that case, the media ...
3
votes
2answers
86 views

How do I make specific plugin functionality apply to different sites in a network?

I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the ...
3
votes
2answers
2k views

How-to implement admin Ajax inside an admin WP_List_Table?

I am new to WordPress if someone will help me I will be very appreciate. There is parameter ajax "true" but in docs. wasn't said how to implement Ajax using WP_List_Table Class? parent::__construct( ...
3
votes
2answers
258 views

Need a function for changing saved post_date or post_date_gmt to relative time in wordpress

I am working on a plugin and want to change the default post date to something like 'posted one min ago' OR 'posted 1 hour ago', OR 'posted on month ago'.
3
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 ...
3
votes
2answers
392 views

Sync my svn repositories

I use my own svn repositories for all my development. I am looking for an easy way to keep the svn repository wordpress provides for my plugin synced up with my own internal repository. The desired ...
3
votes
2answers
3k views

Dashboard like meta boxes in my plugin - how to save their position and open/closed state?

I am trying to mimic the dashboard meta boxes UI in my WP plugin - the small metaboxes. I have already styled them and also the drag & drop feature works as I loaded the following script and ...
3
votes
1answer
6k views

Any examples of adding custom fields to the category editor?

I think I'm pretty close to cracking this nut :) I'm trying to add a set of custom fields to the Category editor. Since I'm not dealing with post meta, I believe I'll be writing my custom category ...
3
votes
2answers
891 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 ...
3
votes
2answers
3k views

How to filter $post->post_content prior to save

I have a function inside my plugin that attaches to save_post, and inside that function, I'm seeking to filter the post_content prior to it being saved. However, the content never actually gets ...
3
votes
1answer
91 views

Finding WordPress sites using my plugins

I've now developed two WordPress plugins and would like to see some sites that use it. I'm looking for a way to find sites that use a WordPress plugin I built. However, the official guidelines, don't ...
3
votes
1answer
3k views

wp_mail is undefined

I am writing a plugin that opens up a form to invite people to a website by email and want to use wp_mail(). Whenever I use the wp_mail() function in any file in my plugin folder I always end up ...
3
votes
2answers
579 views

Redirect to settings page after install

I can't find any info on this anywhere but i'm sure iv'e seen it done before. I would like to have a user taken to the settings page for my plugin after install, so either auto-redirected or change ...
3
votes
3answers
1k views

Plugin Architecture/Design Pattern - is better to use a private Observer/Mediator Pattern for plugin subclasses or WP add_action?

I'm coding a very complex plugin which it's organized as a parent "container" class and several subclasses, where each subclass is an optional/mandatory element which usually (but not always) maps to ...
3
votes
1answer
476 views

PHPUnit testing WordPress Plugin

Using answers on this site and from other resources, I have started writing my next plugin using PHPUnit tests and the WordPress test environment. Distilling down what I have in my plugin's ...
3
votes
2answers
79 views

WordPress Terminology Options Vs. Settings

What term should be used when defining a page in the admin menu that allows you to change a plugins options?
3
votes
2answers
100 views

When is it appropriate to put functions on page template vs. functions.php?

I'd like to improve my code and on a current theme, I've extended Wordpress with custom post types, metadata, customized user authentication, and a number of other items. Some of these functions ...
3
votes
2answers
2k views

Pass PHP variable to javascript

Is there any possibility to pass some PHP variables in javascript so I can use them later? Only in single.php. I heard about wp_enqueue_scripts but with that it is neccesary to declare a path to a JS ...