WordPress.org

Ready to get started?Download WordPress

Forums

Security Breach in Footer? (5 posts)

  1. mimlay
    Member
    Posted 6 years ago #

    I've been using WP about a year with minimal knowledge of CSS/HTML. The theme is "Apple," which I got through some template site.

    Today I went to try my hand at modifying my templates and found this code at the end of the footer stylesheet:

    <?php do_action('wp_footer'); ?>

    After that there was a massive list of urls and links to all sorts of pharmaceutical and porn sites. This list, of course, was totally invisible on my blog. I'm assuming the php code above had something to do with creating the list. I have no idea what the purpose of the list was -- it did not appear in the templates when I first set up my blog a year ago.

    I removed the php code and the list. The blog seems to be working fine without the code. Can anyone advise me on what I discovered, whether I fixed it by removing the code, and any other steps I should take from here to deal with this? Thanks! Mike

  2. haochi
    Member
    Posted 6 years ago #

    It's one of your plugins. Disable them one by one to see which one is the culprit. Add <?php do_action('wp_footer'); ?> back to the footer.php first though.

    Public service announcement: upgrade your blog to the latest version

  3. mimlay
    Member
    Posted 6 years ago #

    Thanks haochi -- I'll check into the plugins and replace the php code. Forgive me being clueless, but what's that particular string of code for?

  4. 4k
    Member
    Posted 6 years ago #

    It helps plugins work

    wp_footer
    Goes in the "footer" of a theme; footer.php template. Example plugin use: insert PHP code that needs to run after everything else, at the bottom of the footer.

    Usage: <?php do_action('wp_footer'); ?>
    -or- <?php wp_footer(); ?>

    from codex
    http://codex.wordpress.org/Theme_Development#Plugin_API_Hooks

  5. mimlay
    Member
    Posted 6 years ago #

    Got it. Thanks, everyone, for putting up with a code newbie. I'll remember to search the codex next time. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic