Results for tag: plugin

WordPress provides a lot of different hooks that allow you to expand on user management capabilities. You can easily add a new field or attribute for any user and make it editable in the user profile. You can restrict the edit mode to only Administrators and you can visualize any of these new user data points in the main Admin Users table.
So, today, I will write a quick WP Plugin that adds a new user field called credits to all users, which can be updated by Admins in the user profile. The WordPress plugin will also display that field in the Users table along with a new read only field that captures users last login date and time.
Read more

WordPress Plugins are often used to run a large process in the background like importing, exporting, bringing data from other APIs, pushing data out, and other tasks that should run asynchronously. How do you do that? TechCrunch came out with wp-async-task and WP Background Processing extended that by adding the ability to queue tasks. The author already included a good sample plugin and article but I wanted to see if I can write a more basic example. So, today, I will create a WordPress plugin that uses WP Background Process to queue and run PHP tasks in the background.
Read more

Last year I wrote an article on Gravity Forms and now I want to follow up with something on Formidable Forms. Instead of doing a comparison between these two WordPress plugins, I will write about two problems that I have encountered with FormidableForms and explain how I have resolved them. The first one is based on the backend, PHP code that will create repeatable fields inside a form and the second one goes into the front end, JavaScript code that helps hooking into “in-place” edit.
Read more

If you are using WordPress and the Gravity Forms plugin, you might want to allow users to edit their posts or entries on the front-end. This is not supported by the plugin but there are other plugins or addons like Gravity Forms Edit Entries, Gravity Forms Sticky List, Gravity Forms: Post Updates, and GravityView that provide such functionality. But, they also come with other features that you might not want or need and installing more and more plugins can certainly impact performance. Moreover, a few of the plugins that I have tried would create and delete entries in GravityFroms causing missing Entry IDs which isn’t ideal and it is additional work on the system. Today, I will show you how to edit Gravity Forms entries on a page by simply using GF actions, hooks, and the API.
Read more

How do you upload files to WordPress with Ajax? Maybe you want fileupload functionality on the front end or enable file uploads in your WordPress plugin. There are a lot of good tutorials on this subject but I couldn’t find any simple example that works with native WP files.
This tutorial on multiple file uploads on the front-end does work but it requires using a server side file for the back end and custom functions in functions.php that use media_handle_upload without Ajax. Tutorials on WordPress file uploads with ajax leverage special jQuery plugins, queuing wordpress scripts, and server side functions to process the Ajax request. This might be needed if you need a lot of control but if you just need to easily upload and delete files, I will show you how to do it in a few lines of simple vanilla JavaScript.
Read more

I wanted to follow up from my last post on building a WordPress Plugin Admin Page and write about using Ajax calls with WordPress plugins. It is very common nowadays to use XMLHttpRequest to move data from the front-end to the back-end and WordPress supports this very well. Consider a contact form on your blog, when someone hits submit you could initiate an Ajax request to your plugin and process the data. Today, I will show how to use Ajax with a WordPress plugin and I will build a complete Quick Contact WordPress plugin that stores a form submission to a new database table which is displayed for quick viewing on a new admin page.
Read more

If you are building a WordPress plugin, there is a high chance that you want to create a backend page, perhaps a place for Admin settings or options. This post will cover how to do that and I will also build a WP Plugin which has an Admin page that interacts with the WordPress database. The plugin will render a mySQL table in a HTML table with dynamic JavaScript features like sorting, searching, etc. I will show how to include specific JavaScript and CSS files for the plugin Admin page and how to interact with WordPress mySQL tables. The cool think about a plugin admin page is that you can use it test all kinds of WordPress Database queries.
Read more

Update: Here is my current favorite jQuery Plugin Dev Template
Since I wrote about HTML5 boilerplates and WordPress starter frameworks in the past, I also wanted to mention some jQuery plugin development templates and boilerplates. Most people out there point to the revisted jquery plugin boilerplate from Stefan Gabos but below I will show some other options for starting on your plugin development.
Read more

Recently, I needed to create a tag cloud using JavaScript and I really liked the simplicity of Adam Groves’s Simple Tag Cloud Plugin for JQuery. The problem with this approach is that I did not have a list of tags with numbers for rel (defining how big a tag should be in the cloud). Most jQuery tag cloud plugins out there expect you to already have a generated list of tags with a numerical representation of their importance, and the jQuery code uses these numbers to style the tags with colors and sizes. My code, however, only had a list of tags, where many tags would repeat.
Read more

I plan on building more WordPress plugins in the future, so this is a quick plugin I put together to get comfortable with developing for WordPress. This is my first journey into the WP world and I will start by creating a simple WP suggestion plugin. I am referring to search suggestions, the auto suggestion terms that search engines give you as you type into the search box. This autocomplete functionality tries to predict what you mean by displaying search queries based on search term popularity (among other factors) so this data has some value.
Read more