bbPress

Simple, Fast, Elegant

bbPress support forums » Requests and Feedback

Design the bb_post_admin

(10 posts)
  • Started 2 months ago by meitershaker
  • Latest reply from sambauers

Tags:

  1. meitershaker
    Member

    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 2 months ago #
  2. 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 2 months ago #
  3. meitershaker
    Member

    it works! :p

    but, what is "10,2" ??

    Posted 2 months ago #
  4. meitershaker
    Member

    up

    Posted 2 months ago #
  5. meitershaker
    Member

    hi ck! i try to do that for the delete_link: http://pastebin.com/m1152200f

    but nothing happens :( why?

    Posted 2 months ago #
  6. meitershaker
    Member

    little help , please :p

    Posted 2 months ago #
  7. meitershaker
    Member

    help :'(

    Posted 2 months ago #
  8. meitershaker
    Member

    please, i would like to understand my error in the code :(

    Posted 2 months ago #
  9. meitershaker
    Member

    up :(

    Posted 1 month ago #
  10. 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:

    http://codex.wordpress.org/Plugin_API

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.