Modificare le opzioni del plugin per specificare l'URL dell'installazione di produzione (based on fcc_oldpost: fullo.net/blog/2007/05/07/oldposts-plugin-per-wordpress). Version: 0.2 Author: Giovanni Francesco Solone Author URI: http://gioxx.org */ function environment_notice() { global $post; $defaults = array('sitoweb'=> 'http://gioxx.org'); $options = (array) get_option('environment_notice'); $options = array_merge($defaults,$options); extract($options); echo '
'; echo '

ATTENZIONE
'; echo ' Stai utilizzando l\'ambiente di test di '; echo bloginfo('name'); echo '. '; echo ' Se stai per scrivere un articolo di produzione passa su '.stripslashes($sitoweb).' ;-)

'; echo '
'; } function environment_notice_admin() { global $enotice_nonce,$wpdb; if ( isset($_POST['submit']) ) { if ( function_exists('current_user_can') && !current_user_can('manage_options') ) die(__('Cheatin’ uh?')); check_admin_referer($enotice_nonce); update_option('environment_notice', array( 'sitoweb' => htmlentities(strip_tags($_POST['sitoweb'])) ) ); } $environment_notice_config = get_option('environment_notice'); ?>

Environment Notice

Specifica l'URL dell'installazione di produzione
alla quale rimandare, completa di http:// iniziale (es. http://gioxx.org)

Environment Notice