', 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 '
';
$tab_video_url = 'https://yoa.st/screencast-tools-file-editor';
include WPSEO_PATH . 'admin/views/partial-settings-tab-video.php';
echo '', __( 'Robots.txt', 'wordpress-seo' ), '
';
if ( ! file_exists( $robots_file ) ) {
if ( is_writable( get_home_path() ) ) {
echo '';
}
else {
echo '', __( 'If you had a robots.txt file and it was editable, you could edit it from here.', 'wordpress-seo' ), '
';
}
}
else {
$f = fopen( $robots_file, 'r' );
$content = '';
if ( filesize( $robots_file ) > 0 ) {
$content = fread( $f, filesize( $robots_file ) );
}
$robots_txt_content = esc_textarea( $content );
if ( ! is_writable( $robots_file ) ) {
echo '', __( 'If your robots.txt were writable, you could edit it from here.', 'wordpress-seo' ), '
';
echo '
';
}
else {
echo '';
}
}
if ( ( isset( $_SERVER['SERVER_SOFTWARE'] ) && stristr( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) === false ) ) {
echo '', __( '.htaccess file', 'wordpress-seo' ), '
';
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 ) );
}
$contentht = esc_textarea( $contentht );
if ( ! is_writable( $ht_access_file ) ) {
echo '', __( 'If your .htaccess were writable, you could edit it from here.', 'wordpress-seo' ), '
';
echo '
';
}
else {
echo '';
}
}
else {
echo '', __( 'If you had a .htaccess file and it was editable, you could edit it from here.', 'wordpress-seo' ), '
';
}
}