• Resolved elusive2k

    (@elusive2k)


    First of all I think you’ve created a wonderfull theme.

    I’ve created a child-theme from it, but then I wanted to change the excerpt > read more [text] I came to the point that I noticed that you’ve created a function for that specificly.
    When I wanted to change this using my child-theme I got a HTTP500 error, this was because you’re bunny theme wanted to call the same function again.

    The solution for my problem was to make your function plugable, but on next update of your theme I have to change it again.
    That’s why I suggest that you would update your theme and make your functions plugable using the following if statement around every function:

    //Replace ‘bunny_continue_reading’ with the name of your function inside the if-statement
    if ( ! function_exists ( ‘bunny_continue_reading’ ) ) {
    // Youre original function comes here i.e.:

    // function bunny_continue_reading( $id ) {
    // return ‘‘ . __( ‘<br/>>> Lees meer over: ‘, ‘bunny’ ) . get_the_title( $id ) . ‘‘;
    // }
    }

    • This topic was modified 7 years, 7 months ago by elusive2k.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Carolina Nymark

    (@poena)

    Hi!
    Thank you -the theme is old and really needs a complete rewrite, but it is difficult to do such updates without breaking things.

    The reason why these functions are not pluggable is because they are already filterable.
    You can remove the filters in the child theme and add your own.

    function prefix_remove_filters() {
    	remove_filter( 'get_the_excerpt', 'bunny_custom_excerpt_more',100 );
    	remove_filter( 'excerpt_more', 'bunny_excerpt_more',100 );
    	remove_filter( 'the_content_more_link', 'bunny_content_more', 100 );
    }
    add_action( 'after_setup_theme', 'prefix_remove_filters' );
    Thread Starter elusive2k

    (@elusive2k)

    Oh I see, but thanks for explaining, I didn’t know about that, I will add those codes to my child theme’s functions.php so it’s safe for a future update, wich I hope you will do at some point. Again thank you very much for your fast response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please make your functions plugable’ is closed to new replies.