WordPress at a glance

edit_bookmark_link() WP 1.0

Displays the edit bookmark link anchor content.

Возвращает

Null. Ничего.

Works based on: get_edit_bookmark_link()
Hooks from the function

Usage

edit_bookmark_link( $link, $before, $after, $bookmark );
$link(string)
Anchor text. If empty. Default empty.
Default: 'Edit This'
$before(string)
Display before edit link.
Default: ''
$after(string)
Display after edit link.
Default: ''
$bookmark(int)
Bookmark ID.
Default: current bookmark

Список изменений

С версии 2.7.0 Введена.

Code of edit_bookmark_link() WP 5.5.1

wp-includes/link-template.php
<?php
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;
}

Related Functions

From tag: bookmark

More from tag: edit_

More from tag: permalinks (clean friendly URL)

More from Template Tags: Links (URL)

No comments
    Log In . Register