admin_header( 'Files', false ); if ( isset( $msg ) && !empty( $msg ) ) { echo '

' . $msg . '

'; } if ( file_exists( get_home_path() . "robots.txt" ) ) { $robots_file = get_home_path() . "robots.txt"; $f = fopen( $robots_file, 'r' ); if ( filesize( $robots_file ) > 0 ) $content = fread( $f, filesize( $robots_file ) ); else $content = ''; $robotstxtcontent = htmlspecialchars( $content ); if ( !is_writable( $robots_file ) ) { $content = "

" . __( "If your robots.txt were writable, you could edit it from here.", 'wordpress-seo' ) . "

"; $content .= '
'; } else { $content = '
'; $content .= wp_nonce_field( 'wpseo-robotstxt', '_wpnonce', true, false ); $content .= "

" . __( "Edit the content of your robots.txt:", 'wordpress-seo' ) . "

"; $content .= '
'; $content .= '
'; $content .= '
'; } $wpseo_admin_pages->postbox( 'robotstxt', __( 'Robots.txt', 'wordpress-seo' ), $content ); } if ( file_exists( get_home_path() . ".htaccess" ) ) { $htaccess_file = get_home_path() . "/.htaccess"; $f = fopen( $htaccess_file, 'r' ); $contentht = fread( $f, filesize( $htaccess_file ) ); $contentht = htmlspecialchars( $contentht ); if ( !is_writable( $htaccess_file ) ) { $content = "

" . __( "If your .htaccess were writable, you could edit it from here.", 'wordpress-seo' ) . "

"; $content .= '
'; } else { $content = '
'; $content .= wp_nonce_field( 'wpseo-htaccess', '_wpnonce', true, false ); $content .= "

" . __( 'Edit the content of your .htaccess:', 'wordpress-seo' ) . "

"; $content .= '
'; $content .= '
'; $content .= '
'; } $wpseo_admin_pages->postbox( 'htaccess', __( '.htaccess file', 'wordpress-seo' ), $content ); } $wpseo_admin_pages->admin_footer( false );