我有a plugin user bookmarks - see here - 我正在尝试为它添加一个书签,这样书签帖子就不会疯狂地堆积起来。我该怎么做?这是显示书签帖子的功能。
function upb_list_bookmarks( $delete_link = true, $delete_text = \'Delete\' ) {
if(is_user_logged_in()) {
$display = \'<ul class="upb-bookmarks-list" style="margin-left:0px;">\';
$bookmarks = upb_get_user_meta(upb_get_user_id());
if($bookmarks) {
foreach( $bookmarks as $bookmark) {
$display .= \'<li class="upb_bookmark bookmark-\' . $bookmark . \'" style="float: left; width: 200px; list-style-type: none; margin-top: 0px; margin-bottom:22px; margin-right: 25px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 35px; padding-left: 0px; background-repeat: no-repeat;" >\';
$display .= \'<div class="sjena" style="display:inline-block; width:200px; height:200px; clear:both; margin-right:25px; margin-bottom:-33px;">\';
$display .= \'<div class="item_lists_thumbnail" >\';
$display .= \'<span class="thumbs for-image" >\';
$display .= \'<a href="\' . get_permalink($bookmark) . \'">\';
$display .= \'<img style="width:200px; height:150px;" src="\' . get_post_meta($bookmark, \'_post_thumbnail\', true) . \'" alt="" />\';
$display .= \'<span class="title">\';
$display .= \'<p>\';
$display .= limit_text(get_the_title($bookmark), 25);
$display .= \'</p>\';
$display .= \'</span>\';
$display .= \'</a>\';
$display .= \'</span>\';
$display .= \'<div class="item_lists_meta" style="background:#FFF; height:190px;"></div>\';
$display .= \'<div id="bookmark_minus"></div>\';
if($delete_link) {
$display .= \'<a style="position:absolute; margin-top:-27px; margin-left:24px; font-family: Terminal Dosis; font-weight: 500; text-transform:uppercase; font-size:10px;" href="#" class="upb_del_bookmark upb_del_bookmark_\' . $bookmark . \'" rel="\' . $bookmark . \'" title="\' . __(\'Remove this Bookmark\') . \'">\' . \'remove\' . \'</a>\' ;
}
$display .= \'</div>\';
$display .= \'</div>\';
$display .= \'</li>\';
}
} else {
$display .= \'<li class="bookmark-link no-bookmarks">You do not have any favorited looks :(</li>\';
}
$display .= \'</ul>\';
}
else {
$display .= \'You must be logged in to view your bookmarks.\';
}
return $display;
}