PluginProbe
ManageWP Worker / 3.9.1
ManageWP Worker v3.9.1
4.9.38 4.9.37 4.9.36 4.9.35 4.9.34 3.8.7 3.8.8 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.18 3.9.19 3.9.2 3.9.20 3.9.21 3.9.22 3.9.23 3.9.24 All 73 releases
worker / link.class.php

link.class.php in ManageWP Worker 3.9.1, at link.class.php

39 lines 869 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*************************************************************
3 *
4 * user.class.php
5 *
6 * Add Users
7 *
8 *
9 * Copyright (c) 2011 Prelovac Media
10 * www.prelovac.com
11 **************************************************************/
12
13 class MMB_Link extends MMB_Core
14 {
15 function __construct()
16 {
17 parent::__construct();
18 }
19
20 function add_link($args)
21 {
22 extract($args);
23
24 $params['link_url'] = esc_html($url);
25 $params['link_url'] = esc_url($params['link_url']);
26 $params['link_name'] = esc_html($name);
27 $params['link_id'] = '';
28 $params['link_description'] = $description;
29
30 if(!function_exists(wp_insert_link))
31 include_once (ABSPATH . 'wp-admin/includes/bookmark.php');
32
33 $is_success = wp_insert_link($params);
34
35 return $is_success ? true : array('error' => 'Failed to add link');
36 }
37
38 }
39 ?>