admin_header( false, 'wpseo_ms' ); } else { $action_url = admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); } if ( isset( $msg ) && ! empty( $msg ) ) { echo '

', esc_html( $msg ), '

'; } // N.B.: "robots.txt" is a fixed file name and should not be translatable. echo '

robots.txt

'; if ( ! file_exists( $robots_file ) ) { if ( is_writable( $home_path ) ) { echo '
'; wp_nonce_field( 'wpseo_create_robots', '_wpnonce', true, true ); echo '

'; printf( /* translators: %s expands to robots.txt. */ esc_html__( 'You don\'t have a %s file, create one here:', 'wordpress-seo' ), 'robots.txt' ); echo '

'; printf( '', sprintf( /* translators: %s expands to robots.txt. */ esc_attr__( 'Create %s file', 'wordpress-seo' ), 'robots.txt' ) ); echo '
'; } else { echo '

'; printf( /* translators: %s expands to robots.txt. */ esc_html__( 'If you had a %s file and it was editable, you could edit it from here.', 'wordpress-seo' ), 'robots.txt' ); echo '

'; } } else { $f = fopen( $robots_file, 'r' ); $content = ''; if ( filesize( $robots_file ) > 0 ) { $content = fread( $f, filesize( $robots_file ) ); } if ( ! is_writable( $robots_file ) ) { echo '

'; printf( /* translators: %s expands to robots.txt. */ esc_html__( 'If your %s were writable, you could edit it from here.', 'wordpress-seo' ), 'robots.txt' ); echo '

'; echo '
'; } else { echo '
'; wp_nonce_field( 'wpseo-robotstxt', '_wpnonce', true, true ); echo ''; echo '
'; printf( '
', sprintf( /* translators: %s expands to robots.txt. */ esc_attr__( 'Save changes to %s', 'wordpress-seo' ), 'robots.txt' ) ); echo '
'; } } if ( ! WPSEO_Utils::is_nginx() ) { echo '

'; printf( /* translators: %s expands to ".htaccess". */ esc_html__( '%s file', 'wordpress-seo' ), '.htaccess' ); echo '

'; if ( file_exists( $ht_access_file ) ) { $f = fopen( $ht_access_file, 'r' ); $contentht = ''; if ( filesize( $ht_access_file ) > 0 ) { $contentht = fread( $f, filesize( $ht_access_file ) ); } if ( ! is_writable( $ht_access_file ) ) { echo '

'; printf( /* translators: %s expands to ".htaccess". */ esc_html__( 'If your %s were writable, you could edit it from here.', 'wordpress-seo' ), '.htaccess' ); echo '

'; echo '
'; } else { echo '
'; wp_nonce_field( 'wpseo-htaccess', '_wpnonce', true, true ); echo ''; echo '
'; printf( '
', sprintf( /* translators: %s expands to ".htaccess". */ esc_attr__( 'Save changes to %s', 'wordpress-seo' ), '.htaccess' ) ); echo '
'; } } else { echo '

'; printf( /* translators: %s expands to ".htaccess". */ esc_html__( 'If you had a %s file and it was editable, you could edit it from here.', 'wordpress-seo' ), '.htaccess' ); echo '

'; } } if ( is_multisite() ) { $yform->admin_footer( false ); }