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.

'; }// end if echo '
' .'

Virtual Robots.txt Settings

' .'
'; if ( function_exists( 'wp_nonce_field' ) ) wp_nonce_field( 'pc_robotstxt_settings' ); echo '

User Agents and Directives for this site

' .'

The default rules that are set when the plugin is first activated are appropriate for WordPress.

' .'

You can preview your robots.txt file here (opens a new window). If your robots.txt file doesn\'t match what is shown below, you may have a physical file that is being displayed instead.

' .'' .'' .'' .'' .'' .'' .'' .'' .'
Delete settings when deactivating this plugin: When you tick this box all saved settings will be deleted when you deactivate this plugin.
' .'

' .'
' .'
'; }// end function }// end class $pc_robotstxt_admin = new pc_robotstxt_admin;