Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#20706 new enhancement

Adding a link without a name or web address yields no (error) feedback

Reported by: AVReidy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: General Keywords: has-patch dev-feedback
Focuses: Cc:


If a user successfully creates a link (on link-add.php), the user receives the message "Link added." However, there are no measures taken to notify the user if the link was not successfully added.

Links are not added when the link name and web address fields are left blank, so I have included a little patch to let the user know when this occurs.

This could be done with some JavaScript form validation that makes an alert box pop up, but half the (PHP/HTML) code was already present for this, and I think it looks better this way, personally. This is my first attempt at submitting a patch to any open source project, so I appreciate your feedback. Thanks!

Attachments (3)

edit-link-form.php.patch (864 bytes) - added by AVReidy 3 years ago.
link.php.patch (399 bytes) - added by AVReidy 3 years ago.
20706.patch (1.1 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 follow-up: @kawauso3 years ago

edit-link-form.php.patch needs to retain i18n support with _e() or __()

Also both patches should be generated with paths given relative to root.

comment:2 in reply to: ↑ 1 @AVReidy3 years ago

Thanks for the feedback, kawauso. I replaced the echo functions with _e(), and I regenerated the patches from the root directory (uploaded them again, as well).

Last edited 3 years ago by AVReidy (previous) (diff)

@AVReidy3 years ago

@SergeyBiryukov3 years ago

comment:3 @AVReidy3 years ago

Thanks Sergey. Still getting used to the coding standards.

Note: See TracTickets for help on using tickets.