', esc_html( $msg ), '

'; } if ( is_multisite() ) { $action_url = network_admin_url( 'admin.php?page=wpseo_files' ); } else { $action_url = admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); } echo '

'; $helpcenter_tab = new WPSEO_Option_Tab( 'bulk-editor', __( 'Bulk editor', 'wordpress-seo' ), array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-file-editor' ) ) ); $helpcenter = new WPSEO_Help_Center( 'bulk-editor', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() ); $helpcenter->localize_data(); $helpcenter->mount(); // 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( get_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 ( ( isset( $_SERVER['SERVER_SOFTWARE'] ) && stristr( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) === false ) ) { 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 '

'; } }