Remove 'Powered Graphene powered by …' the correct way …..

  • ezgoen

    #9040

    creating a css rule #

    developer {
    display: none;
    }

    is a hack! – Plus it leaves a trollable breadcrumb within your sites code – google will still find it.

    Anyone viewing source will still see it .

    To get rid of it properly you need to first provide a mechanism for disabling it and then actually turn it off.

    step one – edit options-general.php – look for :

    <td><input type="checkbox" name="graphene_settings[hide_copyright]" .......

    after the next</tr> add the following code:

    tr>
    <th scope="row"><label for="disable_credit"><?php _e( 'Do not show credit info', 'graphene' ); ?></label></th>
    <td><input type="checkbox" name="graphene_settings[disable_credit]" id="disable_credit" <?php checked( $graphene_settings['disable_credit'] ); ?> value="true" /></td>
    </tr>

    save and open options-validator.php for editing

    look for

    // Hide "Return to top" link switch
    $input['hide_return_top'] = (isset( $input['hide_return_top'] ) ) ? true : false;

    on the next line add :

    // Hide "disable_credit " link switch
    $input['disable_credit'] = (isset( $input['disable_credit'] ) ) ? true : false;

    save and close.

    Now go to Appearance -> Graphene Options -> Footer Options

    and tick “Do Not Show Credit Info”

    save !

    reload you page

    If you want it back again – uncheck the option and save.

    Cheers everyone

    ezgoen


    Mechanism NOT Policy!

    Mod

    Kenneth John Odle

    #42654
    Quote:
    step one – edit options-general.php – look for :

    Yeah, well, editing core files is a hack. (How many times, people? Do NOT edit core files!)

    Besides, there’s not really any point in hiding the fact that you’re running on WordPress, unless your client doesn’t like it. But from a security standpoint, it’s pretty pointless. Read this:

    http://kovshenin.com/2013/dont-hide-the-fact-that-youre-using-wordpress/

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard.

    ezgoen

    #42655

    A theme is an optional item therefore NOT a core file.

    Dont get me wrong – I dont advocate messing with core files.

    I may do it – but then I dont scream for support when I break something, so on that point I agree.

    The point is hiding is not removing – design interfaces with mechanisms for options not policies that mandate function, appearance ..etc

    Sorry about the lack of backtick characters. 🙁 I fixed up the post )

    I was kinda hoping the graphene creators might consider surfacing the mechanism.

    Anonymous

    #42656

    Sorry, but I really don’t see what’s the point of this.

    The main question is, when in the world will you ever use this custom added option :).

    Only point of this is to show some people how does wp theme options work…

    Anonymous

    #42657

    Or, you could just throw this to child theme functions.php

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

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

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