Skip to content
Tareq Hasan

CategoryProgramming & Web

Blocking user registration by country level domain in WordPress

Spammers are everywhere and in weDevs, every single day a lot of spammers are registering. Among them ".pl" domains are mostly used. Enough is enough, so why not block them? That's why I wrote a function that will check the user's email address and will find the country level domain (only the last part of …

Contribute code for WP Project Manager

I've released WP Project Manager plugin a few months back. It's an awesome piece of plugin IMHO. Working single in a project like this along with client project and other personal project is hard. It takes time to improve it a lot by working alone. There are many areas where it can be improved. So, are …

WP User Frontend PRO released

A long awaited plugin!! Today I've released the PRO version of my plugin WP User Frontend. It comes with a bunch of really cool features. Unlimited post type form creation Drag-n-drop form builder Custom taxonomy support 13 variations of custom fields Guest post support Custom Redirection Image upload on post content area Post status selection …

A file based logging utility

We all do debugging. I frequently use a file based logging function that I wrote, it was very basic. Thought it could be more improved, so here's the improved version. It has a small dependency, WordPress's WP_CONTENT_DIR constant, because I do WordPress a lot. But you can change the logging file path as you want. …

Get attachment ID from "Insert into Post|Page" button

We always use this nifty "Insert into Post" button when uploading an image in any type of field, including uploading an image for some meta field or anything else. Then we attach a JavaScript listener on window.send_to_editor and insert the attachment/image URL to the input field. Today I needed a way to get the attachment ID …

IMDB like post rating plugin for WordPress

I was looking for a plugin that will work like IMDB movie rating does, but didn't find like what I wanted. And they were bloated with features like GD Star Rating. So spend some hours and wrote one myself. Features Creates a table {wpprefix}_imdb_rating Using IMDB_Post_Ratings::init()->rating_input(); inside a post, provides a 10 star rating. Change …

Frontend for WP Project Manager released

From the first day of WP Project Manager plugin release, frontend functionality was the first demand. Today, I've released an extra plugin to add the frontend functionality. Managing both the backend and frontend is a daunting task, so I separated the frontend functionality to another plugin. However, this is a premium one. It needs …

Sticky posts in custom post type archives

WordPress has post sticky option only for posts post type. So if you are going to create a new custom post type, there is no native way for adding support for sticky posts. This feature was considered to bring to the core, but didn't happen sadly. In my case, I'm using a plugin Sticky Custom …

Force JavaScript/CSS reload in WordPress themes

If you are developing with WordPress, especially creating theme, browser needs to load your latest changes. Here is a trick to force your browser to reload the script or style: A helper function: Here, we are getting the last file modification time of a file (js|css) from your current theme directory and returning the value. …