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)

1
vote
1answer
34 views

How to use is_multisite() in a must-use-plugin?

I want this code to be executed in a plugin in the mu-plugins folder. When executing in functions.php everything works fine, but when I try it as a plugin in mu-plugins this creates a blank page. if ...
1
vote
1answer
2k views

How to Use Checkbox in Custom Option Page Using The Setting API

Can you please let me know how I can add a checkbox to Setting API in creating Custom Options Page? I am using the following code to add a txt box which is working perfectly but I am totally confused ...
1
vote
1answer
279 views

When is it too late to call the action wp_enqueue_scripts?

I'm creating a plugin that always enqueues a script in the footer. I also have a function that if called would enqueue an additional script that depends on the other one. Here is the basic format of ...
1
vote
1answer
187 views

Are shortcodes case-sensitive?

If I write a plugin and register a shortcode using this code: add_shortcode('footag', 'footag_func'); and a user uses this in their post: [FOOTAG] Is it supposed to work?
1
vote
1answer
136 views

Why are two functions over-riding each other?

I have function in my plugin that is: add_filter('comment_text', 'commentimage_comment_text'); function commentimage_comment_text($comment = '') { $options = get_option('commentimage'); $id = ...
1
vote
2answers
949 views

How do I only load js on the post-new.php and post.php pages in admin?

I have some script that is loading in the admin. I only need it to load on the new post and edit posts screens. What is the best way to do this?
1
vote
1answer
153 views

Using ob_get_content to get_search_form puts into infinite loop

I am trying to change the look of my searchform. It basically needs to have two text fields. I want this to be in form of a plugin, which anyone can activate. SO obviously I do not have any control ...
1
vote
1answer
552 views

Check spam in custom form - akismet

I have a plugin that has input form, I have decided to check submitted data with akismet. I do have API key, WP comments are filtered correctly... here is, what I found: ...
1
vote
2answers
553 views

How to check if current static page is frontpage from admin plugin

I set static page as front page. I need to know if user currently on homepage in my custom plugin. Functions is_home() and is_front_page() doesn't works, since homepage is static page. I can get an ...
1
vote
1answer
66 views

Adding Second Plugin Author

Background: I have a few plugins in the WordPress directory and have recently made the decision to team up with another individual to grow one plugin faster. I'm planning on adding him as a plugin ...
1
vote
2answers
569 views

Saving metabox repeatable fields

This is a code that I'm adapting from https://gist.github.com/2057532. The problem is that I'm not being able to save the content from the new fields that I created. I had checked the other questions ...
1
vote
2answers
580 views

remove custom taxonomy metabox form custom post type

I have created a custom post type 'hotel' and custom 'taxonomy' so when administrator creates a new hotel and saves it it related custom taxonomy automatically get created but I don't want to show ...
1
vote
2answers
110 views

Failed to invoke other hook from the init hook

Related to this question (Use wp init hook to call other hooks?) but not the same. Sometimes, I found that the hook will failed to run when I place inside the init hook, e.g. Not Work: ...
1
vote
2answers
326 views

Script won't load via plugin class

I'm not sure why this script is not loading or producing any load errors via Firebug. Here is my plugin script: class AV_Slideshow{ function __construct(){ $this->hooks(); } function ...
1
vote
1answer
310 views

Plugin Settings not Saving on Ajax re-ordered table

This is an extension of Update Option Stored in Multi-Dimensional Array which was help getting draggable plugin options to save via ajax (which works), but unfortunately this is specific to the actual ...
1
vote
1answer
215 views

How to post form in ajax mode and handle it in wordpress

currently I can only do it in a normal non-wordpress way. So, does wordpress provide a solution for this circumstance?
1
vote
2answers
887 views

Using Ajax call in jQuery doesn't work in widget

So I'm in the midst of creating a new conversion widget and I'm having some trouble getting the Ajax call to work in my widget. (works perfectly outside of WordPress). The problem at the moment is ...
1
vote
1answer
154 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 ...
1
vote
2answers
911 views

Upload to a remote server using wp_remote_post

I'am developing a plugin that will push files to a remote server via http upload. Currently I got it to work with CURL doing something like this: $post = array("post_file"=>"@/path/FILE.EXT"); ...
1
vote
3answers
4k views

Add post thumbnail from external image with plugin

I'm currently writing a plugin modifying the post content with the wp_insert_post_data filter. While doing that I would also like to add a post thumbnail using an external image url. It doesn't really ...
1
vote
1answer
157 views

Force plugin to fail activation

I'm writing a plugin that will be using custom fields added by a theme. Because of this, it would be ideal if my plugin not be able to activate should these fields not exist. How do I go about ...
1
vote
5answers
272 views

Problems with removing admin bar

I am trying to remove the admin bar from a theme front end of a theme. I found the following code block: add_filter( 'show_admin_bar', '__return_false' ); remove_action( 'personal_options', ...
1
vote
1answer
3k views

wp_mail not recognizing cc and bcc headers

I am using WordPress 3.1.3 I am getting following notices when I use wp_mail with cc and bcc headers. Notice: Undefined variable: cc in ...
1
vote
1answer
1k views

How to use WP default post list tables in a plugin?

I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same ...
1
vote
3answers
2k views

Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types

Post save functions are conflicting with each other when adding them to the save_post action hook. 2 different custom post types with 2 different (one for each post type) custom meta boxes. I'm ...
1
vote
2answers
1k views

Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page

(Moderator's note: Original title was "Getting error: You do not have sufficient permissions to access this page. Trying to build custom plugin") I'm trying to write my own custom WordPress plugin, ...
1
vote
2answers
1k views

How do I determine if a category exists by ID?

I know I can get a categories ID by calling get_cat_ID('category-slug'), however, what is the method to call to determine if a category exists by ID when you don't know the slug? In other words, I ...
1
vote
2answers
302 views

How can I view all WP generated thumbnails in Media Manager?

When WP creates thumbnails from the original uploaded image, they are hidden from view inside the Media Manager listing. Can they be made visible, via some filter or action so that you can selectively ...
1
vote
1answer
370 views

Ad rotator script for Adsense/CPA rotations. Ideas? Existing Solutions?

My theme handles Adsense inclusion automatically for the end user. I'm looking to add a feature that allows them to rotate in CPA ads in place of the adsense ads (on a set frequency by percentage). ...
1
vote
2answers
185 views

Is it possible to use add_filter from a theme to alter a plugin's function?

Can add_filter() be used to intercept a plugin function? I'm not having any success, so I'm thinking perhaps I'm doing this wrong. The plugin is "All in One SEO" and the function I'm trying to ...
1
vote
1answer
291 views

How can I limit the amount of characters used for description in the manage categories grid?

My category descriptions consist of whole pages of content. When I view the manage categories screen, the grid does not truncate the text but rather, shows all of it. I realize I could turn off the ...
1
vote
3answers
452 views

Plugin options table,is the data serialized

I am planning on building a plugin and i need to know if the data stored in the options table i will create for the plugin will be serialized or it will be in the ordinary sql format.
1
vote
1answer
686 views

Converting theme widgets to plugins?

i need a help, i have a theme, where in i have a twitter widget, i just want to separate it, and keep it in different file, as if it is a plugin, here are is the complete code, what i have to do? ...
1
vote
2answers
232 views

How can I call “preview post” from wp_remote_get with authentication?

I've got a plugin that needs to interogate the post preview (the contents of the rendered page that's presented when the user clicks "Preview Post". To attempt to obtain this input stream into a code ...
1
vote
1answer
493 views

What URL do you pass to wp_remote_get to load the body of the current post's preview?

In the code below, I'm attempting to get a reference to the body content of the current post's fully rendered preview... $response = ...
1
vote
2answers
226 views

How to determine, from plugin script, if active theme has <h1>The Post Title</h1>

My plugin needs to know if the currently active theme places the post title in H1 heading tags? I'm looking for suggestions on approaches to create script that could discern this. UPDATE: The plugin ...
1
vote
5answers
2k views

The plugin generated 80 characters of unexpected output!

I'm getting this message each time I activate my plugin: The plugin generated 80 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with ...
0
votes
0answers
78 views

Issue on Counting CPT's Under Taxonomy Term

I am using this code to count number of Custom Post Type $tax_terms = get_terms($tax, $args); foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . ...
0
votes
2answers
136 views

Add category slug as class attribute in a link array

This incredible website and the genius developers here have helped me significantly in the course of my WP Dev over the years, firstly THANK YOU. I am now faced with a problem that I have been trying ...
0
votes
1answer
182 views

Mediaelement.js feature doesn't work

I am trying to add new feature to mediaelement.js. Here's one example http://mediaelementjs.com/examples/?name=loop Another example which I am trying to implement now is this- ...
0
votes
1answer
175 views

Second select list values are not saved after clicking update

I have a select list in a metabox which value is saved successfully after clicking "Update" when editing post. Of course, the values are custom taxonomies. But i don't know how to add another select ...
0
votes
0answers
558 views

Add async script

I am working on a plugin that has to inject a script on pages (something like RefTagger), which would be easy using wp_enqueue_script, but there are two reasons I cannot do that: the script tag has to ...
0
votes
1answer
29 views

A question about add_action()

I was following this ( http://codex.wordpress.org/Plugin_API ) tut on codex. The part where a class is created and is called in add_action. No argument was passed to emailer::send ? Why? It was ...
0
votes
1answer
62 views

Why won't register_setting() create a setting?

I'm stumped. I've been researching this like crazy, but I can't seem to figure out why register_setting() isn't working for me. I'm new to WP plugin development (obviously), so it's probably just ...
0
votes
1answer
79 views

Odd behaviour with submenu link creation

I'm trying to develop a plugin that needs to add two pages to the dashboard side-bar menu. One of these being a main category. Everything is fine, except for the second submenu item for the settings ...
0
votes
0answers
181 views

How to properly modify get_userdata in plugin to get roles to update in database

I wasn't sure if starting a new question was appropriate, but the questions are completely different from my original ones and code has changed since originally asking for help. This is still the same ...
0
votes
1answer
54 views

Why is print_r returning $classObj->userObj in several places on site

I'm trying to learn how to interpret results from print_r for a bridge plugin I'm developing. Background My first issue was setting editor capabilities receiving administrator capabilities. While ...
0
votes
1answer
366 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
0
votes
2answers
74 views

Is there any way to hide page from dashboard (all pages list) OR navbar from plugin function?

I am trying to include a template from plugin which required to display some of my custom information's. I wrote function to insert a page and included the template. It's working for me but once i ...
0
votes
2answers
55 views

DIR vs URI when defining a path to a file

When including files in a plugin, I've seen people do WP_PLUGIN_DIR.'/'.dirname(plugin_basename(__FILE__)).'/somefile.css' and yet WordPress wp_enqueue_script/style uses URI for the file path (such ...