This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Remove toolbar from frontend and remove CSS that bumps content down | |
add_filter( 'show_admin_bar', 'bhl_hide_admin_bar_from_front_end' ); | |
function bhl_hide_admin_bar_from_front_end(){ | |
if ( ! current_user_can('manage_options') ) { | |
return false; | |
// Remove CSS | |
remove_action( 'wp_head', '_admin_bar_bump_cb' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use Gravity Forms Conditional Logic with Dates | |
* http://gravitywiz.com/use-gravity-forms-conditional-logic-with-dates/ | |
*/ | |
add_filter("gform_field_value_timestamp", "gwiz_populate_timestamp"); | |
function gwiz_populate_timestamp( $value ){ | |
return time(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disables comments, Add below to existing function.php file. | |
*/ | |
/** Disable support for comments and trackbacks in post types. */ | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ( $post_types as $post_type ) { | |
if ( post_type_supports( $post_type, 'comments' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage (on the HTML tab, not the visual editor) | |
[email address="[email protected]"] | |
*/ | |
function emailbot_ssc($attr) { | |
extract( shortcode_atts( array( | |
'address' => '', | |
), $attr ) ); |