[mp2wp]worldname,width,height[/mp2wp], for example [mp2wp]ComicEmporium,400,300[/mp2wp].
Version: 1.0 - Initial release
Author: Dara Roesner
Author URI: http://mp.tikitronics.com/mp2wp/
-----------------------------------------------------
Copyright 2009 DARA ROESNER (email : mikis.mailbox@gmail.com)
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 2 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, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-----------------------------------------------------
*/
function widget_mp2wp_init() {
if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') ){
return;
}
function widget_mp2wp_control() {
$options = $newoptions = get_option('widget_mp2wp');
if ( $_POST['mp2wp-submit'] ) {
$newoptions['title'] = $_POST['mp2wp-title'];
$newoptions['width'] = (int) $_POST['mp2wp-width'];
$newoptions['height'] = (int) $_POST['mp2wp-height'];
$newoptions['world'] = $_POST['mp2wp-world'];
}
if ( $options != $newoptions ) {
$options = $newoptions;
update_option('widget_mp2wp', $options);
}
?>