mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
Add edit and delete links to the Content->Links rows. Add get_edit_bookmark_link(). Add caching for individual bookmarks. see #7552
git-svn-id: https://develop.svn.wordpress.org/trunk@8758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -547,6 +547,29 @@ function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) {
|
||||
echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;
|
||||
}
|
||||
|
||||
function get_edit_bookmark_link( $link = 0 ) {
|
||||
$link = &get_bookmark( $link );
|
||||
|
||||
if ( !current_user_can('manage_links') )
|
||||
return;
|
||||
|
||||
$location = admin_url('link.php?action=edit&link_id=') . $link->link_id;
|
||||
return apply_filters( 'get_edit_bookmark_link', $location, $link->link_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( $link ) . '" title="' . __( 'Edit link' ) . '">' . $link . '</a>';
|
||||
echo $before . apply_filters( 'edit_bookmark_link', $link, $bookmark->link_id ) . $after;
|
||||
}
|
||||
|
||||
// Navigation links
|
||||
|
||||
function get_previous_post($in_same_cat = false, $excluded_categories = '') {
|
||||
|
||||
Reference in New Issue
Block a user