wp/wp-admin/link.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
--- a/wp/wp-admin/link.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/link.php	Tue Dec 15 13:49:49 2020 +0100
@@ -10,7 +10,7 @@
  */
 
 /** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
+require_once __DIR__ . '/admin.php';
 
 wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
 
@@ -35,7 +35,7 @@
 		check_admin_referer( 'bulk-bookmarks' );
 
 		// For each link id (in $linkcheck[]) change category to selected value.
-		if ( count( $linkcheck ) == 0 ) {
+		if ( count( $linkcheck ) === 0 ) {
 			wp_redirect( $this_file );
 			exit;
 		}
@@ -56,7 +56,7 @@
 		check_admin_referer( 'bulk-bookmarks' );
 
 		// For each link id (in $linkcheck[]) change category to selected value.
-		if ( count( $linkcheck ) == 0 ) {
+		if ( count( $linkcheck ) === 0 ) {
 			wp_redirect( $this_file );
 			exit;
 		}
@@ -112,12 +112,13 @@
 
 		$link_id = (int) $_GET['link_id'];
 
-		if ( ! $link = get_link_to_edit( $link_id ) ) {
+		$link = get_link_to_edit( $link_id );
+		if ( ! $link ) {
 			wp_die( __( 'Link not found.' ) );
 		}
 
-		include( ABSPATH . 'wp-admin/edit-link-form.php' );
-		include( ABSPATH . 'wp-admin/admin-footer.php' );
+		require ABSPATH . 'wp-admin/edit-link-form.php';
+		require_once ABSPATH . 'wp-admin/admin-footer.php';
 		break;
 
 	default: