This file contains hidden or 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 | |
| // Disable auto password generation on register page | |
| add_action( 'bp_before_register_page', 'mtc_hlr_register_disable_random_password' ); | |
| function mtc_hlr_register_disable_random_password() { | |
| add_filter( 'random_password', '__return_empty_string' ); | |
| } |
This file contains hidden or 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
| <script> | |
| jQuery(document).on('click', '.wpcf7-submit', function(e){ | |
| if( jQuery('.ajax-loader').hasClass( 'is-active' ) ) { | |
| e.preventDefault(); | |
| return false; | |
| } | |
| }); | |
| </script> |
This file contains hidden or 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 | |
| // Is the current page a part of Blog system in WordPress - Returns boolean | |
| function mtc_is_blog () { | |
| return ( is_archive() || is_author() || is_category() || is_single() || is_tag() ) && 'post' == get_post_type(); | |
| } |
This file contains hidden or 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 gravity forms from home page */ | |
| add_action( 'wp_enqueue_scripts', 'mtc_dequeue_gravity_frontpage', 9999 ); | |
| add_action( 'wp_head', 'mtc_dequeue_gravity_frontpage', 9999 ); | |
| function mtc_dequeue_gravity_frontpage() { | |
| // Leave gravity form styles and scripts included if we're not on home page |