Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: DP Gzip Compression
- Plugin URI: http://www.designpalatset.se/
- Description: Speed up your site with gzip compression. There are no settings for this plugin, just activate it and you're good to go.
- Version: 1.0
- Author: Kenth 'keha76' Hagström <info@designpalatset.se>
- Author URI: http://www.designpalatset.se
- License: GPL
- Text Domain: dp-gzip
- Domain Path: /languages/
- */
- /*
- Copyright 2012 Kenth Hagström (email : info@designpalatset.se)
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- /**
- * Enable GZIP Compression
- *
- * @link http://php.net/ob_gzhandler
- * @return void
- * @author keha76
- **/
- function dp_enable_gzip_compression()
- {
- ob_start( 'ob_gzhandler' );
- }
- add_action( 'init', 'dp_enable_gzip_compression' );
- /**
- * Load the textdomain used for localization
- *
- * @return void
- * @author keha76
- **/
- function dp_load_textdomain()
- {
- load_plugin_textdomain( 'dp-gzip', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
- }
- add_action( 'plugins_loaded', 'dp_load_textdomain' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement