get_options(); $protocol = ( ( !empty($_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) || $_SERVER['SERVER_PORT'] == 443 ) ? "https://" : "http://"; $host = $_SERVER['HTTP_HOST']; if ( isset($_POST['update']) ) { // check user is authorised if ( function_exists( 'current_user_can' ) && !current_user_can( 'manage_options' ) ) { die( 'Sorry, not allowed...' ); } check_admin_referer( 'pc_robotstxt_settings' ); $options['user_agents'] = trim( $_POST['user_agents'] ); isset( $_POST['remove_settings'] ) ? $options['remove_settings'] = true : $options['remove_settings'] = false; update_option( 'pc_robotstxt', $options ); echo '
Settings saved.