summaryrefslogtreecommitdiffstats
path: root/wp-admin/link-add.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
commita415c29efee45520ae252d2aa28f1083a521cd7b (patch)
treef4ade4b6668ecc0765de7e1424f7c1427ad433ff /wp-admin/link-add.php
parentInitial commit. (diff)
downloadwordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.tar.xz
wordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.zip
Adding upstream version 6.4.3+dfsg1.upstream/6.4.3+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/link-add.php')
-rw-r--r--wp-admin/link-add.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php
new file mode 100644
index 0000000..d8c98bb
--- /dev/null
+++ b/wp-admin/link-add.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Add Link Administration Screen.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/** Load WordPress Administration Bootstrap */
+require_once __DIR__ . '/admin.php';
+
+if ( ! current_user_can( 'manage_links' ) ) {
+ wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) );
+}
+
+// Used in the HTML title tag.
+$title = __( 'Add New Link' );
+$parent_file = 'link-manager.php';
+
+wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
+
+wp_enqueue_script( 'link' );
+wp_enqueue_script( 'xfn' );
+
+if ( wp_is_mobile() ) {
+ wp_enqueue_script( 'jquery-touch-punch' );
+}
+
+$link = get_default_link_to_edit();
+require ABSPATH . 'wp-admin/edit-link-form.php';
+
+require_once ABSPATH . 'wp-admin/admin-footer.php';