0
|
1 |
<?php |
|
2 |
/** |
|
3 |
* Add Link Administration Screen. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
|
|
9 |
/** Load WordPress Administration Bootstrap */ |
16
|
10 |
require_once __DIR__ . '/admin.php'; |
0
|
11 |
|
9
|
12 |
if ( ! current_user_can( 'manage_links' ) ) { |
|
13 |
wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) ); |
|
14 |
} |
0
|
15 |
|
9
|
16 |
$title = __( 'Add New Link' ); |
0
|
17 |
$parent_file = 'link-manager.php'; |
|
18 |
|
9
|
19 |
wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) ); |
0
|
20 |
|
9
|
21 |
wp_enqueue_script( 'link' ); |
|
22 |
wp_enqueue_script( 'xfn' ); |
0
|
23 |
|
9
|
24 |
if ( wp_is_mobile() ) { |
0
|
25 |
wp_enqueue_script( 'jquery-touch-punch' ); |
9
|
26 |
} |
0
|
27 |
|
|
28 |
$link = get_default_link_to_edit(); |
16
|
29 |
require ABSPATH . 'wp-admin/edit-link-form.php'; |
0
|
30 |
|
16
|
31 |
require_once ABSPATH . 'wp-admin/admin-footer.php'; |