Removing graphene_developer action hook with child theme's functions.php

  • JD

    #4865

    Hi, I have been using the Graphene theme for a while on my site which is still under development, and I really like it. But there are a few modifications which I would like to make using a child theme. I have got my child theme set up, and have created a functions.php file in its directory (in addition to the style.css file, of course). Now what I would like to do is disable the graphene_developer action hook in that file. Here is what I have so far:

    <?php
    //Unhook credit
    function unhook_credit() {
    remove_action('graphene_footer','graphene_developer');
    }
    add_action('init','unhook_credit');
    ?>

    That does not seem to work. I can’t find where the graphene_developer action is added, so I don’t know which phase (or whatever it’s called) it is supposed to be under, but apparently it isn’t graphene_footer (if that is even a phase). And I don’t know if it has a priority either. Does anyone know what the phase and priority should be??? I have scoured the web but haven’t found anything that helps.

    By the way, the reason that I want to hide the “Powered by WordPress and the Graphene Theme” text is that I have heard that it is one way to help protect WordPress sites from hackers. I don’t want to just use CSS because I am pretty sure that search engines will still pick it up if I do it that way, and so hackers would still know that it was a WordPress site.

    Mod

    Kenneth John Odle

    #29563

    I have heard that it is one way to help protect WordPress sites from hackers.

    Where did you hear this from? Just because it’s on the internet doesn’t mean it’s true.

    Maybe you are thinking of the WP version, which is in the <head>. That can open the door to vulnerabilities. Check Prasanna’s post about this:

    If just identifying a site as a WordPress site (or as a Blogger site, or as a Drupal site, Joomla site, whatever) led to security issues, we would all be in big trouble. But to be honest, we put ourselves more at risk by using questionable plugins.

    Of course, there is always this thought: https://twitter.com/iswpw/status/215960269740965888 (I originally saw that on Facebook, so, you know…)

    😉

    JD

    #29564

    Thank you for the reply, Kenneth. Yes, I know you can’t believe everything that you read on the internet, but what the person said made sense, although I will admit that they don’t give any references to back up their claims (but many people don’t).

    Here is the link: http://semlabs.co.uk/journal/how-to-stop-your-wordpress-blog-getting-hacked

    Perhaps they are wrong, but nonetheless, I would still like to know how to do this.

    Admin

    Syahir Hakim

    #29565

    To remove the credit link from the footer, add this to your child theme’s

    Code:
    functions.php

    file:

    function graphene_remove_credit(){
    global $graphene_settings;
    $graphene_settings['disable_credit'] = true;
    }
    add_action( 'template_redirect', 'graphene_remove_credit' );

    By the way, if a hacker is intent on hacking your site, the credit link is the least of your worries. There’s so many other ways to determine if a website is running on WordPress, though this in itself isn’t really that big an issue. You should be concerned more with what plugins you use, and how secure the server setup is.

    Mod

    Kenneth John Odle

    #29566

    Some of what that article said made sense and some of it seemed pretty wacky.

    JD

    #29567

    Thank you so much for your help, that code works great.

    Quote:
    By the way, if a hacker is intent on hacking your site, the credit link is the least of your worries. There’s so many other ways to determine if a website is running on WordPress, though this in itself isn’t really that big an issue. You should be concerned more with what plugins you use, and how secure the server setup is.

    Thank you and yes I know that this is really not a big deal. I have already taken care of a lot of other things (like removing the WP version from the head), and am just getting around to figuring this out.

Viewing 6 posts - 1 through 6 (of 6 total)

  • You must be logged in to reply to this topic.