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
0answers
24 views

Deleting taxonomy terms and relationships on a custom post_type when a user is deleted

First off, I have a custom plugin that registers a custom post_type. When a user signs up on the site, a post is created using the custom post_type. The post is populated by the user's company name ...
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?
1
vote
0answers
48 views

tinymce.get() returns error after ajax request

In the backend, after an event I make an ajax request which populates certain fields. The problematic field is the textarea, for which I use wp_editor like so: <?php $settings = array( ...
0
votes
2answers
47 views

Adding Image in readme.txt file of wordpress plugin

It is possible to add a gif file in the readme.txt file of wordpress plugin in the wordpress.org plugin repository? My plugin url is https://wordpress.org/plugins/wp-toggle-comments-form-fields/ I ...
0
votes
0answers
29 views

Auto Create Page and Menu

I'm trying to create a membership plugin, I want it to be able to work with any theme, such that there are some pages that will be automatically added to the theme and the links to them automatically ...
0
votes
0answers
42 views

Show error, when selecting image in WordPress media uploader if params mismatch

Good day ! My question is following: I know how to show errors while uploading image from WordPress media uploader by using WordPress filter hook: But how to show same error box when user select ...
2
votes
1answer
469 views

PHP logging framework to be used with WordPress

There are different PHP logging frameworks out there e.g. Log4php, KLogger. I want to choose one based on its experience with WordPress. Please suggest me one.
1
vote
1answer
252 views

How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?

I'm trying to write a class that would allow for easy removal of all plugin-related data when the plugin is uninstalled. Specifically, I want it to remove plugin options, custom post type entries, and ...
2
votes
2answers
408 views

How is the data stored in the database?

I have years of experience with PHP and MySQL, but just starting to develop plugins for WordPress and need some help. Currently, I am working on a plugin that will add extra functionality to another ...
2
votes
2answers
95 views

Is there an equivalent to Drupal's Batch API in WordPress?

I'm wondering if there is some sort of equivalent to Drupal's Batch API in WordPress? Basically, the API allows you to register a batch request and Drupal will call your function over and over again ...
4
votes
1answer
136 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', ...
0
votes
3answers
292 views

WP Cron doesn't save <iframe> or <object> in post body

I am using wp_cron to auto grab posts from a remote website and save them in my wp db. NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
31
votes
4answers
5k views

Best way to initiate a class in a WP plugin?

I've created a plugin, and of course being me, I wanted to go with a nice OO approach. Now what I've been doing is to create this class and then just below create an instance of this class: class ...
0
votes
2answers
53 views

Proper way to replace the_content only for pages created by custom plugin

I'm creating a plugin that needs to replace the_content of only two specific pages that it created upon activation. Here is my code: add_filter('the_content', 'emd_content'); function ...
0
votes
0answers
26 views

Install and Activate WordPress Plugin from Repository with PHP

I want to install a plugin from the WordPress repository and then activate this using PHP code in my own plugin. I know I can activate a plugin using activate_plugin($plugin); but how ...
0
votes
1answer
35 views

Brainstorm - Slow Query from Plugin Need to Speed It Up

We use WP as the backend for a business directory. I have a plugin that queries based upon location coordinates looking for the closest 10 locations to a given "listing". This query is really slow ...
0
votes
0answers
12 views

Forcing ALL plugin Admin menus into a separate menu

I'd like to move ALL of the menu's generated by various plugins such as ACF, Layerslider, WPMU Dev etc, into a separate menu structure. In short, I'd prefer an item called "Plugin menu's" and below ...
0
votes
4answers
92 views

Why cant the WP Filesystem API read googlefonts.json?

I've inherited a site built with a theme by Highgrade (southcentral) which is built using the Redux framework. I'm seeing the following error in the frontend and admin panel: Warning: Invalid ...
0
votes
0answers
27 views

Dynamically creating classes for Widget API

So let's say I want to make new Classes for the Widgets API using some variables that the user can configure. The only way I have figured it out is to use the eval() function. This is due to how ...
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="' . ...
1
vote
1answer
834 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'); ...
8
votes
1answer
65 views

Add a new tab to Wordpress Plugin install Listing

When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a new tab(with a link to a page) next to the current tabs. The location where I want the link is marked in the ...
0
votes
0answers
63 views

Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update

am using this code to create a Metabox for CPT. Now I am able to view the updateded / saved Text input on post but the Checkbox and selected options return null after save or update. Can you please ...
0
votes
1answer
28 views

How can I save a password securely as a settings field

I have a plugin that requires the user to enter a password (to access an external site) into a form field on the plugin settings page. Right now this is just saved as plain text, but I need to make it ...
0
votes
0answers
29 views

Remove plugin page menu items but keep plugin active

I am in the process of creating my first plugin for WordPress. However, I have one small issue, I had to add a plugins page (5 of them to be exact): add_plugins_page('Apollidon Kalendar', 'Edit ...
52
votes
27answers
8k views

Software for WordPress Theme and Plugin Development? [closed]

What software do you use for your WordPress related needs? Please state your OS. On windows XP I use: filezilla (FTP) notepad++ (for reading of PHP / CSS files) firebug (a firefox extension to ...
3
votes
1answer
47 views

How to add a link to Wordpress Plugin install Listing

When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a link/button to every plugin's listing area. Which hook should I use? The location where I want the link is ...
2
votes
2answers
65 views

Unable to get content from $post on first publish

I'm trying to get the title and content from the global $post variable when a user publishes a new post (to submit to an external web service, which in turn needs to pass back additional data to add ...
1
vote
0answers
118 views

WordPress Liveblog plugin: How to associate uploaded images with comments? [closed]

I'm using Automattic's Liveblog plugin which is also available on GitHub. Background When a user uploads an image, the following happens: a new post of post_type 'attachment' is created. a new ...
0
votes
0answers
14 views

Support for new language packs in WordPress 4.0

WordPress 4.0 added a new language pack system. Is there a guide or api documentation or an article about this that you are suggesting to read? I only found translations_api in codex.
0
votes
1answer
106 views

Using a multiple <select> element in widget form

I am trying to save all of the options in a <select> element in a widget. So far I have the following PHP code for the form: public function form( $instance ) { // Code for editing/adding ...
0
votes
0answers
22 views

Using Settings API to manage plugin data stored in custom table

I'm working on a plugin which needs: to store settings in wp_options table to store other data in several custom tables For the first point, I used the Settings API and everything works just fine, ...
0
votes
0answers
74 views

Social Media button function using jquery

I've wrote a fairly small function that I'm trying to get working. At the moment the jquery doesn't seem to have any effect on the html selected. I've checked the "inspect element" all file's are been ...
0
votes
0answers
70 views

Autoloading a PHP class – working outside, but not inside WordPress plugin

I am thinking about using autoloading in a plugin. Outside of WordPress (as a test) it works as expected, but inside the plugin there are some problems. The directory structure I used for testing: ...
0
votes
1answer
39 views

Script work on non logged in user but not work for logged in user?

I am currently working with jquery and wordpress plugin. jQuery(document).ready(function($) { $('.btn').click(function(){ alert("hello world"); }); }); This code working very well ...
1
vote
0answers
54 views

Modify how gallery.js builds the shortcode [gallery …] in tinyMCE?

The post editor helpfully removes default arguments like columns="3" from the [gallery] shortcode. How do you tell it to remove a custom attribute that has a default value? The answer at Enhance ...
14
votes
1answer
4k views

Settings API with arrays example

I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
1
vote
2answers
680 views

How to bulk send emails

I should send thousands of email in reaction to a specific event, so the email sending is not manual but it's automatic. The server where is hosted my website has an hourly limit for email sending ...
2
votes
0answers
97 views

Saving data-URI to media library

I have a TinyMCE plugin that generates PNG images using HTMLCanvasElement.toDataURL() (MDN). Currently, I'm just displaying them on the backend by putting the data-URI in an image tag, but I'd really ...
0
votes
1answer
275 views

Empty POST data on server on AJAX request using Angular $http

I use AngularJS to build an AJAX form which is then processed on a server running Wordpress. Server-side handler is simple: function rnr_contact_callback() { $name = $_POST['firstName'] . ' ' . ...
0
votes
0answers
30 views

theme_mod and option type in WP_Customize_Manager's add setting API

The WP_Customize_Manager's add setting API support the type argument: type Optional. Specifies the TYPE of setting this is. Options are 'option' or 'theme_mod' (defaults to 'theme_mod') What is the ...
0
votes
1answer
34 views

Apply function to update_option Variable

I found some instructions on encrypting an options field for a plugin here, using: encrypt($input_string, $key){ $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = ...
0
votes
1answer
31 views

wp_create_nonce function doesn't work inside a plugin?

I am writing a WordPress plugin which is creating a form in one of its functions. It looks like this (very simplyfied): class MyPlugin { public function createForm() { $nonce = ...
0
votes
2answers
30 views

What is necessary to secure a WP plugin against direct file access attempts?

When developing a WordPress plugin, what are the best practices for securing the plugin against attempts to directly access the file? I've seen WordPress plugins use a range of options, from .htaccess ...
0
votes
1answer
23 views

How To Prevent Certain Folder To Be Overwritten During Plugin Update?

I have a WordPress plugin that helps you create call to action boxes. You just select a template from the templates provided by plugin, customize the box using the settings given and publish the box ...
0
votes
0answers
32 views

How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”

I have a custom post type for a plugin I'm creating and the label for the "add an item" type of button (at the top of the list page) needs a partner-button that says "import" and one that says ...
0
votes
0answers
27 views

Custom wp_editor content format missing

I am using this code to render wordpress editor like page body editor. $content = ''; $editor_id = 'mymail_html_template'; wp_editor( $content, $editor_id, $settings = ...
0
votes
0answers
23 views

Group multiple widgets in one

Is that possible to group some widget into one. I am creating some similar widgets and I want to group them altogether. Like I want to name it "Widget Group" and when I activate "Widget Group" plugin, ...
0
votes
1answer
63 views

Run function on plugin activation before plugin is loaded

I have two versions of the same plugin - one is a free version on WordPress.org and the other is a paid upgrade. Both versions use the same function names and so can't be activated at the same time. ...
0
votes
0answers
52 views

Import SQL tables from SQL file on plugin install

I'm building a plugin, on installation of the plugin it needs to create several tables. Now I found out that I can do that in the plugin code sorta like this.. // Function to create new database ...