Info
- 10 posts
- 3 voices
- Started 3 years ago by meitershaker
- Latest reply from Sam Bauers
Design the bb_post_admin
-
- Posted 3 years ago #
Hi,
i would like to add icons at the function bb_post_admin in post;php
i see that is template-functions. but how to add this within edit the core files?
example, add icon at:
1401 function bb_get_post_edit_link( $post_id = 0 ) {
1402 $bb_post = bb_get_post( get_post_id( $post_id ) );
1403 if ( bb_current_user_can( 'edit_post', $bb_post->post_id ) ) {
1404 $uri = bb_get_uri('edit.php', array('id' => $bb_post->post_id));
1405 $r = "post_id ) ) . "'>". __('Edit') ."";
1406 return apply_filters('bb_get_post_edit_link', $r, get_post_id( $post_id ) );
1407 }
1408 }
in $r
thanks,
bye! -
- Posted 3 years ago #
You'd need to add a filter, something like this (untested)
function edit_link_icon($r,$post_id) {return "<img src='/images/edit_link_icon.png'>".$r;} add_filter('bb_get_post_edit_link', 'edit_link_icon',10,2); -
- Posted 3 years ago #
it works! :p
but, what is "10,2" ??
-
- Posted 3 years ago #
up
-
- Posted 3 years ago #
hi ck! i try to do that for the delete_link: http://pastebin.com/m1152200f
but nothing happens :( why?
-
- Posted 3 years ago #
little help , please :p
-
- Posted 3 years ago #
help :'(
-
- Posted 3 years ago #
please, i would like to understand my error in the code :(
-
- Posted 3 years ago #
up :(
-
- Posted 3 years ago #
You have too much code. You have duplicated the function by the looks of things. Filters don't work that way.
Try this documentation on the plugin API for more info:
-
You must log in to post.