if ( ! current_user_can( 'manage_links' ) ) {
wp_die(
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
- '<p>' . __( 'You do not have sufficient permissions to edit the links for this site.' ) . '</p>',
+ '<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>',
403
);
}
*
* @since 2.0.0
*
- * @param int $link_id ID of link to retrieve.
+ * @param int|stdClass $link Link ID or object to retrieve.
* @return object Link object for editing.
*/
-function get_link_to_edit( $link_id ) {
- return get_bookmark( $link_id, OBJECT, 'edit' );
+function get_link_to_edit( $link ) {
+ return get_bookmark( $link, OBJECT, 'edit' );
}
/**
wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );
}
- wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
+ wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
}