Support » Plugin: Safe Report Comments » Link shown twice – no_autostart_safe_report_comments not being defined

  • Resolved flemmo



    I’m trying to do a custom insert using the comments callback but the link is being shown twice. It seems the auto embed is still active even though ‘no_autostart_safe_report_comments’ is defined in functions .php.

    So this line in safe-report-comments.php

    if ( !defined( 'no_autostart_safe_report_comments' ) )
    	$safe_report_comments = new Safe_Report_Comments;

    Is always returning as true i.e. ‘no_autostart_safe_report_comments’ not defined.

    I have added this to my functions.php in the root of the theme.

    //flag comments plugin included in themes' functions.php - disable plugin.
    define( 'no_autostart_safe_report_comments', true );
    include_once( '../../plugins/safe-report-comments/safe-report-comments.php');
    // make sure not to auto-attach to comment reply link
    $safe_report_comments = new Safe_Report_Comments(false);
    // change link layout to have a pipe prepended
    add_filter( 'safe_report_comments_flagging_link', 'adjust_flagging_link' );
    function adjust_flagging_link( $link ) {
        return ' | ' . $link;
    // adjust the text to "Report abuse" rather than "Report comment"
    add_filter( 'safe_report_comments_flagging_link_text', 'adjust_flagging_text' );
    function adjust_flagging_text( $text ) {
        return 'Report abuse';

    Where am I going wrong?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Daniel Bachhuber


    Hand Built

    Your theme is being loaded after the plugin is loaded. You’ll want to instead create an MU plugin with the constant definition. Apologies if it seems a little backwards.

Viewing 1 replies (of 1 total)
  • The topic ‘Link shown twice – no_autostart_safe_report_comments not being defined’ is closed to new replies.