Tagged Questions

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
26 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 ...
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
61 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 ...
0
votes
1answer
20 views

Filter seems to be run before another filter although priority is set correct [on hold]

First of all I want to mention that these are my very first experiences with wordpress plugin development. In the following I describe what I want to do and then describe my problem. I wanna use ...
0
votes
0answers
13 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.
2
votes
2answers
79 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 ...
0
votes
0answers
52 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
16 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
51 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: ...
1
vote
0answers
39 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 ...
1
vote
0answers
110 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 ...
2
votes
0answers
80 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
30 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 ...
0
votes
1answer
101 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
25 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
30 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
92 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
1answer
26 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
25 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
19 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
22 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
23 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
22 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
47 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
32 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 ...
1
vote
1answer
52 views

Best practice for creating a custom archive template for a custom taxonomy which works on all themes?

I'm making a plugin which includes a custom post type with custom taxonomies. I have a custom template - taxonomy-coupon-category.php - but these template files are specific to a single theme. What ...
0
votes
0answers
20 views

template redirect is not working from within a shortcode

I am new to WordPress. I want to show a custom template of a plugin using a shortcode. This template has my own login form with my own header and footer. I am using the following code: add_filter( ...
0
votes
0answers
31 views

Wordpress plugin, create page for API

I'm just starting with creating WordPress plugins. What i need to do is to create the page where I'll be able to display JSON/JSONP response. I would like to get some advices how to do it correctly. ...
0
votes
1answer
20 views

Best place to keep files that are called by cron jobs?

I am interesting in setting up a Wordpress Website which needs to keep updating certain custom database tables after fetching data from RESTful Web Services, lets say once in a day. I can achieve ...
0
votes
1answer
58 views

How to send email in wordpress with more than one attachments

In my plugin, there is a contact us form through which users can upload multiple files and it will be uploaded into wp-contents/uploads/2014/10 folder. Uploading is working, but now I need to send ...
0
votes
0answers
28 views

Populating a list of IDs for a widget to use in WordPress

I am trying to create a widget that takes a list of user-given IDs for items and then displays them at random wherever the Widget is placed. So far I have the following set up: User enters an ID in ...
0
votes
1answer
27 views

I can install my plugin in localhost but not in my server

Well, I finished my first plugin in WordPress but I have a little problem. My plugin have the next code add_action('my-plugin/my-plugin.php','rating_install'); ...
0
votes
2answers
42 views

dbDelta SQL Query Not Working

I know the specifics of using dbDelta and I've read the documentation (http://codex.wordpress.org/Creating_Tables_with_Plugins), read other answers to the question I'm asking, but I'm just not seeing ...
0
votes
0answers
22 views

My Ajax Query is returning the contents of the page itself

I am attempting to execute the submission of a form in AJAX. function rapid_form_callback() { global $wpdb; $table_name = $wpdb->prefix . "my_client_here"; require_once( ...
0
votes
1answer
16 views

Unexpected T_FUNCTION

I have release my first plugin (mz mindbody api - which relies on SOAP and PEAR), and a user in Germany is getting syntax error unexpected T_FUNCTION when they try to install it on a clean install ...
0
votes
2answers
27 views

How to make auto installer Plugin?

I made my first Wordpress plugin and I would get that crease a datatable in worpress databases. I tried the next code buy I get nothing: register_activation_hook(__FILE__, 'rating_install'); ...
0
votes
0answers
11 views

saving and retrieving data

I been following some tutorials on how to create wordpress plugin, but i did not understand how to save data into a table, from admin e.g asking some questions and then on the front end displaying it ...
0
votes
1answer
34 views

How to add img into a plugin?

I started constructing my first Wordpress plugin but got an issue... I've a folder-file structure like that: PluginFolder/ TemplateFolder/ img/ my files php How can I use the /img/ folder in ...
4
votes
1answer
126 views

How to Change the Entire WordPress Admin panel Look and Feel?

I am trying to change the WordPress Admin panel look and feel for depending upon the different role types that are in WordPress. How can create/assign different themes for each role i.e. Editor > ...
1
vote
2answers
45 views

Admin auto-refresh is interfering with Firebug — how to prevent it?

I'm developing a plugin that adds a metabox to the post editing page. When I try to debug it with Firebug, about every 15 seconds the Firebug display refreshes as though the page has reloaded. This ...
2
votes
2answers
265 views

Custom pages with plugin

I'm developing some plugin where I would like to enable custom pages. In my case some custom page would contain a form like contact form (not literally). When user will fill out this form and send it, ...
0
votes
0answers
55 views

Custom sub menu is not showing in admin dashboard

Here I am making one small plugin for learning purpose.I have made one admin menu called Feature Slider and it has three sub menu Feature Slider, Add New Feature Slider and Add new movie. 1st two menu ...
0
votes
1answer
40 views

Bind a function with its own argument to show something dynamically after every content

I have a function that is grabbing something from database using a user-defined ID. I need to show the content after every post/page content. So I followed @s_ha_dum's solution from WPSE, like below: ...
0
votes
0answers
20 views

Allow to user select template only once

i want to give the user option to select template one time in multisites. way that can help me is to allow the user select the template once the user first login to the system. if you know how can i ...
0
votes
0answers
30 views

Limit how many times a user reads articles and prompt user to subscribe

I have a Wordpress site on which I would like to limit the number of articles read by each unique visitor. I would like to prompt them to subscribe to my website after an X number of articles have ...
0
votes
1answer
24 views

Plugin README.txt isn't updating in the Directory (stable tag is correct)

I'm fairly certain I've tagged (and updated) everything properly according to the official FAQ. My previous version was 1.0.0 My new (current) version is 1.0.1 I've updated README.txt in trunk with ...
0
votes
1answer
21 views

Sub Menu content is being duplicated

In the plugin I am developing I am using the following code to build my menu - add_menu_page('BCRM Plugin Settings', 'BCRM', 'administrator', __FILE__, 'bcrm_settings_page', BOOGIE__PLUGIN_URL . ...
0
votes
1answer
29 views

How to avoid conflicts with db.php / $wpdb and other plugins that decide to use them?

Our plugin (VersionPress) needs to track database changes so that it can version-control them. We currently do this by creating db.php and overriding the $wpdb instance in it but it has an issue that ...
0
votes
1answer
33 views

Plugin settings are saving but the fields

I'm following @Otto's tutorial on Settings API. I managed to save the plugin settings into the options table, but by any means can't save any fields. <?php /** * Add Settings SubMenu * Thanks ...
0
votes
0answers
30 views

Make a select field directly beside a text input field with the Settings API

I'm building a plugin that needs a very simple options page. I'm asking the user to enter the default width and the default height that they want the plugin to use for their embed. I also want to give ...