WordPress.org

Forums

Inserting links/bookmarks programmatically via function? (2 posts)

  1. lesteph
    Member
    Posted 4 years ago #

    I'm trying to code a script to set up programmatically various features of a new site including widgets, posts, pages and links. Most of this is working fine using add_option() and wp_insert_post() etc but I can't find anything in the Function reference like wp_insert_post() to enable programmatic creation or updating of bookmarks?

    Is there a way to programmatically:

    1. Insert a new bookmark, specifying name, URL, description etc
    2. Manage link categories, i.e. rename, delete or create new categories?

    thanks v much
    Steph

  2. lesteph
    Member
    Posted 4 years ago #

    Ah, it looks like you can access the internal admin functions for link manipulation including wp_insert_link() by including wp-admin/includes/bookmark.php in the script.

    Odd that there isn't a public function to do this, as there is for posts/pages?

Topic Closed

This topic has been closed to new replies.

About this Topic