author | Anthony Ly <anthonyly.com@gmail.com> |
Mon, 19 Nov 2012 18:26:13 +0100 | |
changeset 194 | 32102edaa81b |
parent 136 | bde1974c263b |
permissions | -rw-r--r-- |
136 | 1 |
<?php |
2 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
3 |
* Add Link Administration Screen. |
136 | 4 |
* |
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
||
9 |
/** Load WordPress Administration Bootstrap */ |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
10 |
require_once('./admin.php'); |
136 | 11 |
|
12 |
if ( ! current_user_can('manage_links') ) |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
13 |
wp_die(__('You do not have sufficient permissions to add links to this site.')); |
136 | 14 |
|
15 |
$title = __('Add New Link'); |
|
16 |
$parent_file = 'link-manager.php'; |
|
17 |
||
18 |
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', |
|
19 |
'description', 'visible', 'target', 'category', 'link_id', |
|
20 |
'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', |
|
21 |
'notes', 'linkcheck[]')); |
|
22 |
||
23 |
wp_enqueue_script('link'); |
|
24 |
wp_enqueue_script('xfn'); |
|
25 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
26 |
if ( wp_is_mobile() ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
27 |
wp_enqueue_script( 'jquery-touch-punch' ); |
136 | 28 |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
29 |
$link = get_default_link_to_edit(); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
30 |
include('./edit-link-form.php'); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
31 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
32 |
require('./admin-footer.php'); |