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
| add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' ); | |
| add_filter( 'use_widgets_block_editor', '__return_false' ); |
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
| add_action( 'phpmailer_init', 'set_mailer_smtp_from_address' ); | |
| function set_mailer_smtp_from_address($phpmailer) | |
| { | |
| $urlparts = parse_url(home_url()); | |
| $domain = $urlparts['host']; | |
| $domain = str_replace('www.', '', $domain); | |
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
| add_action( 'init', 'maybe_add_noindex_meta' ); | |
| function maybe_add_noindex_meta() | |
| { | |
| // If maintenance page is shown by Maintenance plugin | |
| if(!is_user_logged_in()) { | |
| if (get_option( 'blog_public' ) === '0') { | |
| add_action('add_gg_analytics_code', function(){ | |
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
| add_action('plugins_loaded', function(){ | |
| add_filter( 'robots_txt', 'maybe_modify_robots_txt', 20, 2 ); | |
| }, 999); | |
| /** | |
| * Modify the robots.txt, if not present | |
| * | |
| * @param string $output The robots.txt output | |
| * @param boolean Whether the site is considered "public". | |
| * |
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
| add_filter( 'auto_core_update_send_email', 'disable_auto_core_updates', 10, 4); | |
| add_filter( 'admin_email_check_interval', '__return_false' ); | |
| add_action( 'init', 'dev_disable_new_user_notifications' ); | |
| //Disable the updated feature notification emails | |
| function disable_auto_core_updates( $send, $type, $core_update, $result ) { | |
| if ( ! empty( $type ) && $type == 'success' ) { | |
| return false; | |
| } |
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
| function wpdev_login_logo() { ?> | |
| <style type="text/css"> | |
| #login h1 a, .login h1 a { | |
| background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg); | |
| height:85px; | |
| width:150px; | |
| background-size: 150px 85px; | |
| background-repeat: no-repeat; | |
| padding-bottom: 0px; | |
| } |
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 | |
| /* Register template redirect action callback 24-05-2019 */ | |
| add_action('template_redirect', 'code_remove_wp_archives'); | |
| /* Remove archives */ | |
| function code_remove_wp_archives(){ | |
| //If we are on category or tag (data and autheur is done via YoastSEO) | |
| if( is_category() || is_tag() ) { | |
| wp_redirect( home_url()); | |
| } |
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
| add_filter( 'upload_mimes', 'allow_upload_new_mimes' ); | |
| function allow_upload_new_mimes( $mimes = array() ) { | |
| $mimes['svg'] = 'image/svg+xml'; | |
| return $mimes; | |
| } |