author | Anthony Ly <anthonyly.com@gmail.com> |
Tue, 12 Mar 2013 18:21:39 +0100 | |
changeset 206 | 919b4ddb13fa |
parent 204 | 09a1c134465b |
permissions | -rw-r--r-- |
136 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress Bookmark Administration API |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
||
9 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
10 |
* Add a link to using values provided in $_POST. |
136 | 11 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
12 |
* @since 2.0.0 |
136 | 13 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
14 |
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. |
136 | 15 |
*/ |
16 |
function add_link() { |
|
17 |
return edit_link(); |
|
18 |
} |
|
19 |
||
20 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
21 |
* Update or insert a link using values provided in $_POST. |
136 | 22 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
23 |
* @since 2.0.0 |
136 | 24 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
25 |
* @param int $link_id Optional. ID of the link to edit. |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
26 |
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. |
136 | 27 |
*/ |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
28 |
function edit_link( $link_id = 0 ) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
29 |
if ( !current_user_can( 'manage_links' ) ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
30 |
wp_die( __( 'Cheatin’ uh?' ) ); |
136 | 31 |
|
32 |
$_POST['link_url'] = esc_html( $_POST['link_url'] ); |
|
33 |
$_POST['link_url'] = esc_url($_POST['link_url']); |
|
34 |
$_POST['link_name'] = esc_html( $_POST['link_name'] ); |
|
35 |
$_POST['link_image'] = esc_html( $_POST['link_image'] ); |
|
36 |
$_POST['link_rss'] = esc_url($_POST['link_rss']); |
|
37 |
if ( !isset($_POST['link_visible']) || 'N' != $_POST['link_visible'] ) |
|
38 |
$_POST['link_visible'] = 'Y'; |
|
39 |
||
40 |
if ( !empty( $link_id ) ) { |
|
41 |
$_POST['link_id'] = $link_id; |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
42 |
return wp_update_link( $_POST ); |
136 | 43 |
} else { |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
44 |
return wp_insert_link( $_POST ); |
136 | 45 |
} |
46 |
} |
|
47 |
||
48 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
49 |
* Retrieve the default link for editing. |
136 | 50 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
51 |
* @since 2.0.0 |
136 | 52 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
53 |
* @return object Default link |
136 | 54 |
*/ |
55 |
function get_default_link_to_edit() { |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
56 |
$link = new stdClass; |
136 | 57 |
if ( isset( $_GET['linkurl'] ) ) |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
58 |
$link->link_url = esc_url( $_GET['linkurl'] ); |
136 | 59 |
else |
60 |
$link->link_url = ''; |
|
61 |
||
62 |
if ( isset( $_GET['name'] ) ) |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
63 |
$link->link_name = esc_attr( $_GET['name'] ); |
136 | 64 |
else |
65 |
$link->link_name = ''; |
|
66 |
||
67 |
$link->link_visible = 'Y'; |
|
68 |
||
69 |
return $link; |
|
70 |
} |
|
71 |
||
72 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
73 |
* Delete link specified from database |
136 | 74 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
75 |
* @since 2.0.0 |
136 | 76 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
77 |
* @param int $link_id ID of the link to delete |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
78 |
* @return bool True |
136 | 79 |
*/ |
80 |
function wp_delete_link( $link_id ) { |
|
81 |
global $wpdb; |
|
82 |
||
83 |
do_action( 'delete_link', $link_id ); |
|
84 |
||
85 |
wp_delete_object_term_relationships( $link_id, 'link_category' ); |
|
86 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
87 |
$wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); |
136 | 88 |
|
89 |
do_action( 'deleted_link', $link_id ); |
|
90 |
||
91 |
clean_bookmark_cache( $link_id ); |
|
92 |
||
93 |
return true; |
|
94 |
} |
|
95 |
||
96 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
97 |
* Retrieves the link categories associated with the link specified. |
136 | 98 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
99 |
* @since 2.1.0 |
136 | 100 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
101 |
* @param int $link_id Link ID to look up |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
102 |
* @return array The requested link's categories |
136 | 103 |
*/ |
104 |
function wp_get_link_cats( $link_id = 0 ) { |
|
105 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
106 |
$cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') ); |
136 | 107 |
|
108 |
return array_unique( $cats ); |
|
109 |
} |
|
110 |
||
111 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
112 |
* Retrieve link data based on ID. |
136 | 113 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
114 |
* @since 2.0.0 |
136 | 115 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
116 |
* @param int $link_id ID of link to retrieve |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
117 |
* @return object Link for editing |
136 | 118 |
*/ |
119 |
function get_link_to_edit( $link_id ) { |
|
120 |
return get_bookmark( $link_id, OBJECT, 'edit' ); |
|
121 |
} |
|
122 |
||
123 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
124 |
* This function inserts/updates links into/in the database. |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
125 |
* |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
126 |
* @since 2.0.0 |
136 | 127 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
128 |
* @param array $linkdata Elements that make up the link to insert. |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
129 |
* @param bool $wp_error Optional. If true return WP_Error object on failure. |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
130 |
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. |
136 | 131 |
*/ |
132 |
function wp_insert_link( $linkdata, $wp_error = false ) { |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
133 |
global $wpdb; |
136 | 134 |
|
135 |
$defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 ); |
|
136 |
||
137 |
$linkdata = wp_parse_args( $linkdata, $defaults ); |
|
138 |
$linkdata = sanitize_bookmark( $linkdata, 'db' ); |
|
139 |
||
140 |
extract( stripslashes_deep( $linkdata ), EXTR_SKIP ); |
|
141 |
||
142 |
$update = false; |
|
143 |
||
144 |
if ( !empty( $link_id ) ) |
|
145 |
$update = true; |
|
146 |
||
147 |
if ( trim( $link_name ) == '' ) { |
|
148 |
if ( trim( $link_url ) != '' ) { |
|
149 |
$link_name = $link_url; |
|
150 |
} else { |
|
151 |
return 0; |
|
152 |
} |
|
153 |
} |
|
154 |
||
155 |
if ( trim( $link_url ) == '' ) |
|
156 |
return 0; |
|
157 |
||
158 |
if ( empty( $link_rating ) ) |
|
159 |
$link_rating = 0; |
|
160 |
||
161 |
if ( empty( $link_image ) ) |
|
162 |
$link_image = ''; |
|
163 |
||
164 |
if ( empty( $link_target ) ) |
|
165 |
$link_target = ''; |
|
166 |
||
167 |
if ( empty( $link_visible ) ) |
|
168 |
$link_visible = 'Y'; |
|
169 |
||
170 |
if ( empty( $link_owner ) ) |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
171 |
$link_owner = get_current_user_id(); |
136 | 172 |
|
173 |
if ( empty( $link_notes ) ) |
|
174 |
$link_notes = ''; |
|
175 |
||
176 |
if ( empty( $link_description ) ) |
|
177 |
$link_description = ''; |
|
178 |
||
179 |
if ( empty( $link_rss ) ) |
|
180 |
$link_rss = ''; |
|
181 |
||
182 |
if ( empty( $link_rel ) ) |
|
183 |
$link_rel = ''; |
|
184 |
||
185 |
// Make sure we set a valid category |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
186 |
if ( ! isset( $link_category ) || 0 == count( $link_category ) || !is_array( $link_category ) ) { |
136 | 187 |
$link_category = array( get_option( 'default_link_category' ) ); |
188 |
} |
|
189 |
||
190 |
if ( $update ) { |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
191 |
if ( false === $wpdb->update( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_rating', 'link_rel', 'link_notes', 'link_rss'), compact('link_id') ) ) { |
136 | 192 |
if ( $wp_error ) |
193 |
return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error ); |
|
194 |
else |
|
195 |
return 0; |
|
196 |
} |
|
197 |
} else { |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
198 |
if ( false === $wpdb->insert( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss') ) ) { |
136 | 199 |
if ( $wp_error ) |
200 |
return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error ); |
|
201 |
else |
|
202 |
return 0; |
|
203 |
} |
|
204 |
$link_id = (int) $wpdb->insert_id; |
|
205 |
} |
|
206 |
||
207 |
wp_set_link_cats( $link_id, $link_category ); |
|
208 |
||
209 |
if ( $update ) |
|
210 |
do_action( 'edit_link', $link_id ); |
|
211 |
else |
|
212 |
do_action( 'add_link', $link_id ); |
|
213 |
||
214 |
clean_bookmark_cache( $link_id ); |
|
215 |
||
216 |
return $link_id; |
|
217 |
} |
|
218 |
||
219 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
220 |
* Update link with the specified link categories. |
136 | 221 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
222 |
* @since 2.1.0 |
136 | 223 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
224 |
* @param int $link_id ID of link to update |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
225 |
* @param array $link_categories Array of categories to |
136 | 226 |
*/ |
227 |
function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { |
|
228 |
// If $link_categories isn't already an array, make it one: |
|
229 |
if ( !is_array( $link_categories ) || 0 == count( $link_categories ) ) |
|
230 |
$link_categories = array( get_option( 'default_link_category' ) ); |
|
231 |
||
232 |
$link_categories = array_map( 'intval', $link_categories ); |
|
233 |
$link_categories = array_unique( $link_categories ); |
|
234 |
||
235 |
wp_set_object_terms( $link_id, $link_categories, 'link_category' ); |
|
236 |
||
237 |
clean_bookmark_cache( $link_id ); |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
238 |
} |
136 | 239 |
|
240 |
/** |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
241 |
* Update a link in the database. |
136 | 242 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
243 |
* @since 2.0.0 |
136 | 244 |
* |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
245 |
* @param array $linkdata Link data to update. |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
246 |
* @return int|WP_Error Value 0 or WP_Error on failure. The updated link ID on success. |
136 | 247 |
*/ |
248 |
function wp_update_link( $linkdata ) { |
|
249 |
$link_id = (int) $linkdata['link_id']; |
|
250 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
251 |
$link = get_bookmark( $link_id, ARRAY_A ); |
136 | 252 |
|
253 |
// Escape data pulled from DB. |
|
254 |
$link = add_magic_quotes( $link ); |
|
255 |
||
256 |
// Passed link category list overwrites existing category list if not empty. |
|
257 |
if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) |
|
258 |
&& 0 != count( $linkdata['link_category'] ) ) |
|
259 |
$link_cats = $linkdata['link_category']; |
|
260 |
else |
|
261 |
$link_cats = $link['link_category']; |
|
262 |
||
263 |
// Merge old and new fields with new fields overwriting old ones. |
|
264 |
$linkdata = array_merge( $link, $linkdata ); |
|
265 |
$linkdata['link_category'] = $link_cats; |
|
266 |
||
267 |
return wp_insert_link( $linkdata ); |
|
268 |
} |
|
204
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
269 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
270 |
/** |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
271 |
* @since 3.5.0 |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
272 |
* @access private |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
273 |
*/ |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
274 |
function wp_link_manager_disabled_message() { |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
275 |
global $pagenow; |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
276 |
if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow ) |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
277 |
return; |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
278 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
279 |
add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
280 |
$really_can_manage_links = current_user_can( 'manage_links' ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
281 |
remove_filter( 'pre_option_link_manager_enabled', '__return_true', 100 ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
282 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
283 |
if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) { |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
284 |
$link = network_admin_url( 'plugin-install.php?tab=search&s=Link+Manager' ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
285 |
wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
286 |
} |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
287 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
288 |
wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) ); |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
289 |
} |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
194
diff
changeset
|
290 |
add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' ); |