--- a/wp/wp-admin/edit-link-form.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-admin/edit-link-form.php Fri Sep 05 18:40:08 2025 +0200
@@ -74,7 +74,7 @@
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen">Documentation on Creating Links</a>' ) . '</p>' .
- '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
+ '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
require_once ABSPATH . 'wp-admin/admin-header.php';
@@ -87,13 +87,22 @@
?>
</h1>
-<a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
+<a href="link-add.php" class="page-title-action"><?php echo esc_html__( 'Add New Link' ); ?></a>
<hr class="wp-header-end">
-<?php if ( isset( $_GET['added'] ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Link added.' ); ?></p></div>
-<?php endif; ?>
+<?php
+if ( isset( $_GET['added'] ) ) {
+ wp_admin_notice(
+ __( 'Link added.' ),
+ array(
+ 'id' => 'message',
+ 'additional_classes' => array( 'updated' ),
+ 'dismissible' => true,
+ )
+ );
+}
+?>
<form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
<?php
@@ -121,7 +130,7 @@
<div id="addressdiv" class="postbox">
<h2 class="postbox-header"><label for="link_url"><?php _e( 'Web Address' ); ?></label></h2>
<div class="inside">
- <input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr( $link->link_url ); ?>" id="link_url" />
+ <input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_url( $link->link_url ); ?>" id="link_url" />
<p><?php _e( 'Example: <code>https://wordpress.org/</code> — do not forget the <code>https://</code>' ); ?></p>
</div>
</div>