*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param int $link_id ID of the link to delete
- * @return bool True
+ * @return true
*/
function wp_delete_link( $link_id ) {
global $wpdb;
* @return array The requested link's categories
*/
function wp_get_link_cats( $link_id = 0 ) {
-
$cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') );
-
return array_unique( $cats );
}
*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param array $linkdata Elements that make up the link to insert.
- * @param bool $wp_error Optional. If true return WP_Error object on failure.
+ * @param bool $wp_error Optional. If true return WP_Error object on failure.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
*/
function wp_insert_link( $linkdata, $wp_error = false ) {
/**
* @since 3.5.0
* @access private
+ *
+ * @global string $pagenow
*/
function wp_link_manager_disabled_message() {
global $pagenow;
wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
}
-add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' );