May 1, 2014 at 12:54 am #9040ezgoenMember
creating a css rule #
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:
<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>
save and open options-validator.php for editing
// 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”
reload you page
If you want it back again – uncheck the option and save.
Mechanism NOT Policy!May 1, 2014 at 1:27 am #42654Kenneth John OdleModeratorQuote: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:
Put code in between backtick (Code:`
) characters. It’s usually located above the Tab key on your keyboard.May 1, 2014 at 1:42 am #42655ezgoenMember
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.May 6, 2014 at 1:01 pm #42656LukoMember
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…May 14, 2014 at 4:04 am #42657Prasanna SPMember
Or, you could just throw this to child theme functions.php
$graphene_settings['disable_credit'] = true;
add_action( 'template_redirect', 'graphene_remove_credit' );
You must be logged in to reply to this topic.