get_string( 'common.support' ); $matches = null; if ( $support != '' && preg_match( '~^link_category_(\d+)$~', $support, $matches ) ) { require_once ABSPATH . 'wp-admin/includes/bookmark.php'; wp_insert_link( array( 'link_url' => W3TC_LINK_URL, 'link_name' => W3TC_LINK_NAME, 'link_category' => array( (int) $matches[1] ), 'link_rel' => 'nofollow' ) ); } } /** * Deletes plugin link from Blogroll * * @return void */ static public function link_delete() { require_once ABSPATH . 'wp-admin/includes/bookmark.php'; $bookmarks = get_bookmarks(); $link_id = 0; foreach ( $bookmarks as $bookmark ) { if ( $bookmark->link_url == W3TC_LINK_URL ) { wp_delete_link( $bookmark->link_id ); } } } }