Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



edit_bookmark_link ›

Seit2.7.0
Veraltetn/v
edit_bookmark_link ( $link = '', $before = '', $after = '', $bookmark = null )
Parameter: (4)
  • (string) $link Optional. Anchor text. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (string) $before Optional. Display before edit link. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (string) $after Optional. Display after edit link. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (int) $bookmark Optional. Bookmark ID. Default is the current bookmark.
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:

Displays the edit bookmark link anchor content.



Quellcode

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;
}