• Hello All,

    I am having trouble getting a plugin to hook into the twenty-eleven themes sidebar-footer.php which displays at the bottom of the page.

    For example these are some the attempts I have made:
    add_filter (‘the_content’, ‘anti_email_spam’, 100);
    //add_filter (‘dynamic_sidebar’, ‘anti_email_spam’, 100);
    add_filter (‘sidebars_widgets’, ‘anti_email_spam’, 100);
    add_action( ‘wp_register_sidebar_widget’, ‘anti_email_spam’, 100 );
    add_action( ‘wp_register_sidebar’, ‘anti_email_spam’, 100 );
    //add_action(‘wp_footer’, ‘anti_email_spam’,100);
    //add_action( ‘wp_register_footer_widget’, ‘anti_email_spam’, 100 );
    //add_action(‘wp_footer’, ‘anti_email_spam’,100);
    //add_action(‘dynamic_sidebar’, ‘anti_email_spam’,100);

    None of these seem to run the function I want to run in the footer area. There is a apply_filter(‘sidebars_widgets’,) in the widgets.php file but I’m not sure if that’s the name of the hook I should use.

    I was able to get it working using a hammer but there must be a more
    elegant way. This is the code I’m using until I find a better solution.

    if (function_exists('anti_email_spam'))
    {
      ob_start();
      dynamic_sidebar( 'sidebar-3' );
      $so = ob_get_clean();
      echo anti_email_spam($so);
    }
    else
    {
      dynamic_sidebar( 'sidebar-3' );
    }

    Thanks,
    Craig

  • The topic ‘Plugin to hook into sidebar-footer’ is closed to new replies.