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)

0
votes
1answer
563 views

using admin functions on frontend

I'm updating my plugin to rely on internal functions of WordPress. I'm about to use wp_generate_attachment_metadata, but this function seems to be only available in the admin section. Is there an ...
0
votes
2answers
246 views

Only allow plugin to be activated on root site of multisite

I'm developing the wordpress file monitor plus plugin. Its purpose is to scan for altered files and it works fine for a single installation of WP. But when you look at multi-site it's not something ...
1
vote
1answer
145 views

How to find the origin of a file upload from within wp_handle_upload?

I have a plugin that hooks into "wp_handle_upload" filter. Within that scope I'd like to be able to identify where the upload came from, meaning I want to treat it differently if it was uploaded from ...
1
vote
1answer
372 views

How do I alter the comment form 'allowed tags' text in a plugin?

I'm using the PHP Markdown plugin, and I'd like to modify it so that it adds some text to the bottom of the comment form indicating that Markdown is supported in comments. I've been modifying my ...
0
votes
3answers
7k views

Mapping multiple URLs to same page

I just came across this page with almost similar requirements as mine Multiple endpoints to same page i have to achieve same functionality but i also want to pass some parameters to the page where ...
0
votes
1answer
57 views

Widget internal hooks and functions

I am working on my 1st plugin, of some ideas to re-do the interface to how widget's are manage d and organized. Anyhow. I am struggling to get this information, either that or understand it. Create ...
0
votes
1answer
677 views

Adding a jQuery modal dialog to the admin area

I am writing a plugin for a customer and I need to use lightbox/thickbox/fancybox/etc in my admin piece. No matter what jquery plugin I use, and I'm using wp_enqueue_style and wp_enqueue_script, ...
1
vote
1answer
197 views

How to localize admin.php only once

I am creating a set of plugins that all use AJAX. Now localizing the admin.php in all the plugins seems to be a bit of an overkill. Is there a way to localize the script only once.\ Now I do not know ...
0
votes
1answer
213 views

using wp_cache in plugin

I have a results set being returned from the database. How can I use wp_cache to speed this up? function bb_attachments_cache() { global $wp, $bp, $wpdb, $posts, $bb_attachments, ...
2
votes
5answers
803 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
2answers
210 views

Change Wordpress.org hosted plugin readme.txt

is it possible to change the readme.txt of a plugin that is hosted at http://wordpress.org/extend/plugins/plugin-name without tagging a new version? I would like wordpress.org to show the new ...
1
vote
1answer
82 views

How to write a plugin to add users to a mail list

I run a multi-site blog with about 300 sites. I have an idea that I want to write a plugin that in order to add all administrators of blogs to a MailMan mail-list. I just want administrators though, ...
0
votes
1answer
76 views

Javascript Function Called Too Early in PHP Script

I'm working on a Google Maps plugin. My problem is that the function that initializes the map, csf_map_maker_js(), is getting called too early-- before the div is defined (at least that's what I ...
0
votes
1answer
53 views

How to check via conditional tags for a single plugin page?

I am developing a plugin. To embed the stylesheet I used wp_enqueue_style(). I want the CSS file to be only implemented at the plugin's page. I have already seen solutions with conditional tags, but ...
1
vote
1answer
316 views

Mixing Regular Javascript With jQuery in a Plugin

Sorry for a simple question. I'm learning about plugins. I've got some javascript that I want to put in a jQuery file in my plugin. (I've got jQuery and the scripts enqueued, and working fine). ...
0
votes
1answer
1k views

Change the display of Settings API (do_settings_sections)

I am working on a plugin which uses Wordpress Settings API. I notice that the functions do_settings_sections (and do_settings_fields) display the fields using TABLE. How do I change its formatting? (I ...
2
votes
1answer
1k views

Set cookie then immediantly refresh the page

I wrote a small WordPress plugin (mobileesp-for-wordpress) that will redirect mobile users to the mobile site. It's based on mobileesp. The plugin itself works fine the problem is I added an option ...
1
vote
1answer
329 views

How to Debug: My Plugin Interferes With My Theme

I'm learning how to write a plugin. My plugin is a google map that places markers based on the selected criteria. It works fine. The problem is that it interferes with one part of the theme I'm using. ...
1
vote
1answer
839 views

Changing bloginfo description from a plugin

How can I change the site's bloginfo description in runtime from a plugin? I tried these, but none of them work: add_filter('description', 'ab_arq_generate'); add_filter('blogdescription', ...
0
votes
1answer
130 views

Why does this fail: Disabling plugins enqueue_script() in functions.php

I'm trying to use the method presented here: Restricting a Plugin to Only Load its CSS and JS on Selected Pages? In the plugin 'syntax-highlighter-compress' I've got the following code: function ...
0
votes
1answer
126 views

Sharing changes to a post (preview changes) with another user

We would like to be able to share changes to an existing post with other wp users without saving the changes (making them live). A nounce currently makes it impossible to share a previewed post. Is ...
2
votes
1answer
591 views

Plugin Uninstall and Deactivate via Options Menu

I'm creating my first plugin (modifying an existing one for what I need) and although it's working fine i am trying to create a simple options menu to allow either deactivation of the plugin, or ...
4
votes
3answers
16k views

How to add a javascript snippet to the footer that requires jQuery

I know I can add a script file to the footer of wordpress that requires jquery using this code: <?php function my_scripts_method() { // register your script location, dependencies and version ...
-1
votes
1answer
441 views

How to delete all the options in an option group

I have created a few options with with the register_setting function: <?php register_setting( $option_group, $option_name, $sanitize_callback ); ?> Is there a way to clear the whole content ...
0
votes
1answer
56 views

Pause plugin option page until all data manipulation is complete

I have an option on my plugin page where I load content into all the posts in the blog. Now this takes some time, esp when there are a log of posts. Now the way is it set up now, when you press ...
0
votes
1answer
3k views

How to display TinyMCE HTML view?

I'm displaying TinyMCE in my plugin's settings using wp_tiny_mce(): <?php wp_tiny_mce( false , array("editor_selector" => "a_nice_textarea"));?> <textarea class="a_nice_textarea" ...
1
vote
1answer
119 views

How do I include background images in my stylesheets in a plugin?

I'm trying to specify a background image in a style in a plugin I'm making. I was just outputing tags from the php, but realized I should probably be using enqueue_style... But how do I put a line of ...
1
vote
1answer
94 views

maintaing consistent layout wordpress dashboard

I am developing a functionality in WordPress so that once user updated any information admin can approve/reject the information only after which it should get published in the front users,in specific ...
0
votes
1answer
138 views

Wordpress plugin advice: suggestions for writing a plugin the correct way

I will write my first Wordpress plugin for the local animal shelter. The plugin will make a list of the animals in a category page(or a custom loop if that is a better way to do it) and make a little ...
0
votes
1answer
2k views

Wordpress database error: [Query was empty] - using $wpdb->prepare()

I have edited my question, I'm now getting the error about checking my MySQL settings. I changed the $sql_dvalues variable to an array with the values instead of comma spaced values and now it is ...
3
votes
2answers
61 views

How can I limit functionality in one version of a plugin?

I am busy writing a plugin with a free version and a paid, Pro version. For our initial release of both versions, I want to keep things as simple as possible, so I would rather defer using a strategy ...
1
vote
1answer
228 views

Widget translation on my plugin

I am adding i18n to the widget on List Category Posts. I've correctly created the pot file, and po and mo files for Spanish and English. All of the Strings are being displayed with _e() on the form ...
1
vote
2answers
246 views

Applying OO patterns and principles to plugin development

I'm busy writing my first plugin, using PHP 5.3.5. I come from a C# environment, and I must say I'm more than happy with the level of support for good, solid OOP techniques in PHP. However, I'm a ...
0
votes
1answer
62 views

my basic php code producing unexpected results

I am writing a code snippet to display attachments to a post but for each user, he should only be able to see his own attachments and not those of other users $current_user=wp_get_current_user(); ...
1
vote
1answer
4k views

Email verification for new users

I would like to implement a plugin that requires new users to reply to an email, to verify their email address, on registration. I am already doing extensive codex research, but I am very new and ...
1
vote
1answer
83 views

What function can I use consistently to escape possible HTML for editing and display?

I'm very new to WP, and from following books and online examples, I have several different 'esacping' functions in my first plugin. I would like to know if there is one function, or a minimal set of ...
0
votes
1answer
846 views

admin_notices not displaying in plugin

I know I'm probably doing something dumb here but I just can't get this to run. I'm trying to set up a little API for my plugin and to create a class to display admin notices a little easier. Here's ...
-1
votes
1answer
1k views

Worldpay Integration in Wordpress

Hi: I am working on a fast food website project, the theme is configured and all the data has been placed related to fast food, like the Order Menu, The payment method that will be used to order food ...
3
votes
1answer
72 views

why don't I get error messages in admin when developing?

I am curious as to why my screen goes completely blank when an error is present in my code. This only happens to me when it is an admin function. No warnings, no syntax error messages, nothing. Just ...
0
votes
1answer
893 views

WordPress front end AJAX. Return 0 :?

I have create the appropriate code to handle AJAX request on WordPress but I get 0 as responce from the server. My plugin code is here: class my_plugin { function my_plugin() { ...
1
vote
1answer
1k views

Do I have to override the wp_mail() pluggable function with writing a plugin?

If I want to override wp_password_change_notification, do I have to write a plugin to do this? It seems to have no effect in functions.php of my theme. The only thing I need to do is change the ...
1
vote
1answer
335 views

custom permalink's rewrite rule for page id

I am using WP 3.2.1. I try to do permalink like: /en/1/some-string. Structure is: %lang%/%pageID%/%some random string% So I add a rewrite rule: function nw_lang_addRewrite($aRules) { ...
1
vote
1answer
162 views

Master menu item for multiple plugins?

I guess this question is more or less about aesthetics and organization rather than functionality, but I'm curious nonetheless... I know I can add a custom menu item in the dashboard for my plugin ...
5
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 ...
1
vote
2answers
552 views

Comments do not respect display_name setting, how to make plugin to overcome this

When I post something on Wordpress, it's posted with my display name. However if I change my display name, posts posted by me will be updated with the new author. Comments will stay with the old ...
0
votes
1answer
934 views

Hook for page Request?

I want to run a function that looks at the current url params of the page that is requested and sets a cookie based on those params. So, I guess I'm looking for: The Wordpress Hook that allows me ...
2
votes
1answer
245 views

how to activate plugin network-wide, and save setting across sites

I am developing a plugin, which will be used on single site, as well as multi-site. How to make plugin active network-wide, code required. Also, how to save settings network-wide?
0
votes
3answers
9k views

wpdb->prepare and mysql UPDATE - how is it done?

Trying to set a 'removed' date time in a plugin query but I'm not sure how to use UPDATE SET with $wpdb->prepare. Here's my query: $cur_date = date('Y-m-d G:i:s'); $rows_affected = ...
2
votes
1answer
351 views

Where should I store global data for my multi-site WordPress plugin?

I wrote a plugin for WordPress which has a few user-configurable settings that are stored using WordPress's suggested method. I know they are saved in the wp_options table, but that is abstracted by ...
0
votes
1answer
573 views

I want to add post meta for picture thum during submit for revision

I am using this function to get imnages urls from google function getGoogleImg($k) { $url = ...