edit_bookmark_link

The timeline below displays how wordpress function edit_bookmark_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.3

/**
 * Displays the edit bookmark link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link     Optional. Anchor text. If empty, default is 'Edit This'. Default empty.
 * @param string $before   Optional. Display before edit link. Default empty.
 * @param string $after    Optional. Display after edit link. Default empty.
 * @param int    $bookmark Optional. Bookmark ID. Default is the current bookmark.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . esc_url(get_edit_bookmark_link($bookmark)) . '">' . $link . '</a>';
    /**
     * Filters the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 4.6

/**
 * Displays the edit bookmark link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link     Optional. Anchor text. Default empty.
 * @param string $before   Optional. Display before edit link. Default empty.
 * @param string $after    Optional. Display after edit link. Default empty.
 * @param int    $bookmark Optional. Bookmark ID. Default is the current bookmark.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . esc_url(get_edit_bookmark_link($bookmark)) . '">' . $link . '</a>';
    /**
     * Filters the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 4.5

/**
 * Display edit bookmark link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link     Optional. Anchor text.
 * @param string $before   Optional. Display before edit link.
 * @param string $after    Optional. Display after edit link.
 * @param int    $bookmark Optional. Bookmark ID.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . esc_url(get_edit_bookmark_link($bookmark)) . '">' . $link . '</a>';
    /**
     * Filter the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 4.4

/**
 * Display edit bookmark (literally a URL external to blog) link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link     Optional. Anchor text.
 * @param string $before   Optional. Display before edit link.
 * @param string $after    Optional. Display after edit link.
 * @param int    $bookmark Optional. Bookmark ID.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . esc_url(get_edit_bookmark_link($bookmark)) . '">' . $link . '</a>';
    /**
     * Filter the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 4.3

/**
 * Display edit bookmark (literally a URL external to blog) link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link     Optional. Anchor text.
 * @param string $before   Optional. Display before edit link.
 * @param string $after    Optional. Display after edit link.
 * @param int    $bookmark Optional. Bookmark ID.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . get_edit_bookmark_link($bookmark) . '">' . $link . '</a>';
    /**
     * Filter the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 3.9

/**
 * Display edit bookmark (literally a URL external to blog) link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link Optional. Anchor text.
 * @param string $before Optional. Display before edit link.
 * @param string $after Optional. Display after edit link.
 * @param int $bookmark Optional. Bookmark ID.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . get_edit_bookmark_link($bookmark) . '">' . $link . '</a>';
    /**
     * Filter the bookmark edit link anchor tag.
     *
     * @since 2.7.0
     *
     * @param string $link    Anchor tag for the edit link.
     * @param int    $link_id Bookmark ID.
     */
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}

WordPress Version: 3.7

/**
 * Display edit bookmark (literally a URL external to blog) link anchor content.
 *
 * @since 2.7.0
 *
 * @param string $link Optional. Anchor text.
 * @param string $before Optional. Display before edit link.
 * @param string $after Optional. Display after edit link.
 * @param int $bookmark Optional. Bookmark ID.
 */
function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = null)
{
    $bookmark = get_bookmark($bookmark);
    if (!current_user_can('manage_links')) {
        return;
    }
    if (empty($link)) {
        $link = __('Edit This');
    }
    $link = '<a href="' . get_edit_bookmark_link($bookmark) . '">' . $link . '</a>';
    echo $before . apply_filters('edit_bookmark_link', $link, $bookmark->link_id) . $after;
}