WordPress allows user to upload various types of files using the media upload functionality. There is no visible way for restricting users from uploading files of one or more file types. However you can do this using filters. So, I decided to create a plugin which will provide user interface for selecting which files the users will be able to upload. WP Upload Restriction is the plugin which allows administrators to choose the files types and restricts users from uploading files other than the selected types. It’s a very simple, easy-to-use, yet powerful plugin.
Currently the file type restriction is applied to all users except administrators. In next release(s) role wise restrictions will be added.
To grab a copy of this plugin visit this link https://wordpress.org/plugins/wp-upload-restriction/.
My WordPress plugin WP Reroute Email has been approved and I have released the first version of it.
This plugin intercepts all outgoing emails from a WordPress site, sent using the wp_mail() function, and reroutes them to a predefined configurable email address. This is useful in case where you do not want email sent from a WordPress site to reach the users. For an example, to resolve an issue you downloaded production database to your development site and you want no email is sent to production users when testing. You may enable this plugin in development server and reroute emails to your given email address.
I have modified the plugin for DOMPDF which is found in CodeIgniter forum. I have added the paper size and orientation parameters. Here is the code to share with you.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename, $stream=true, $papersize = 'letter', $orientation = 'portrait')
$dompdf = new DOMPDF();
$options['Attachment'] = 1;
$options['Accept-Ranges'] = 0;
$options['compress'] = 1;