CoreFiles by mySites.guru
link-add.php34 lines, 938 bytes, from wordpress-6.7.zip
Raw History Compare with 6.6.11
md5
b81db6d1d5a91a5d3a15db1aa676db9d
sha1
d3e65488f6b3860ccbfc36f7be164383dc7673a0
sha256
2dcd1eee6947ca316c26e04b4873d913cf6274d5a413eaa9e695bc31b08f2540
<?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';

$action  = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
$cat_id  = ! empty( $_REQUEST['cat_id'] ) ? absint( $_REQUEST['cat_id'] ) : 0;
$link_id = ! empty( $_REQUEST['link_id'] ) ? absint( $_REQUEST['link_id'] ) : 0;

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';

The same content is in 46 releases, WordPress 6.6-beta1 to 6.7.11. See them all, or every version of this file.