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
add_filter('fluentform_response_render_textarea', function ($value, $field, $formId, $isHtml) { | |
if (false != strpos($value, '<br />')) { | |
$value = str_replace('<br />', '', $value); | |
} | |
return '<span style="white-space: pre-line">' . $value . '</span>'; | |
}, 15, 4); |
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
add_filter('perfmatters_delay_js_exclusions', function($exclusions) { | |
if(is_page(275)) { | |
$exclusions[] = 'underscore.min.js'; | |
$exclusions[] = 'backbone.min.js'; | |
$exclusions[] = 'front-end-deps.js'; | |
$exclusions[] = 'front-end.js'; | |
$exclusions[] = 'nf-'; | |
$exclusions[] = 'jquery.min.js'; | |
$exclusions[] = 'nfForms'; | |
} |
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
add_action('wp_footer', function() { | |
if(!wp_is_mobile()) { | |
echo 'hello world'; | |
} | |
}); |
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
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' ); | |
function tu_excerpt_metabox_more( $excerpt ) { | |
$output = $excerpt; | |
$settings = wp_parse_args( | |
get_option( 'generate_blog_settings', array() ), | |
generate_blog_get_defaults() | |
); | |
if ( has_excerpt() ) { | |
$output = sprintf('%1$s <br /><a class="read-more" href="%2$s">%3$s →</a>', |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.0/fastclick.min.js" integrity="sha512-oljyd1wg75alHReTpDvNIQ4Yj1wZwGxxZhJhId3vr2dKY+26/r/wmMrImwDgin03+7wxyhX+adOQB/2BTvO5tQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | |
<script> | |
if ('addEventListener' in document) { | |
document.addEventListener('DOMContentLoaded', function() { | |
FastClick.attach(document.body); | |
}, false); | |
} | |
</script> |
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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
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
function bis_remove_cpt_slug($args, $post_type) { | |
if(in_array($post_type, array('artist'))) { | |
$args['rewrite'] = array('slug' => '/'); | |
} | |
return $args; | |
} | |
add_filter('register_post_type_args', 'bis_remove_cpt_slug', 10, 2); |
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
//add no-lazy class to primary logo | |
function wpd_generate_logo_output($output, $logo_url, $html_attr) { | |
//add our no-lazy class | |
$html_attr = str_replace('class="', 'class="no-lazy ', $html_attr); | |
//logo output | |
printf( | |
'<div class="site-logo no-lazy"> | |
<a href="%1$s" title="%2$s" rel="home"> |
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
add_filter( 'generate_google_font_display', function() { | |
return 'swap'; | |
} ); |