Wordpress
ACL : https://wordpress.org/support/article/roles-and-capabilities/
[Try to remove jQuery when possible — everywhere]
https://youmightnotneedjquery.com/
[WP Rocket - Delay/Defer per plugin]
Smart post show pro (lazyload image) :
deferred : /wp-content/plugins/smart-post-show-pro/(.*).js
delay : smart-post-show-pro
[Allow WP search to include certain metaquery (acf) fields]
functions.php
function search_by_meta_join( $join ) {
global $wpdb;
$meta_key = 'acf_field';
if ( is_search() ) {
$join .= " LEFT JOIN {$wpdb->postmeta} pm ON {$wpdb->posts}.ID = pm.post_id AND (pm.meta_key LIKE '%" . $acf_field . "%') ";
}
return $join;
}
add_filter('posts_join', 'search_by_meta_join' );
function search_by_meta_where( $where ) {
global $wpdb;
if ( is_search() ) {
$where = preg_replace(
"/\(\s*{$wpdb->posts}.post_title\s+LIKE\s*(\'[^\']+\')\s*\)/",
"({$wpdb->posts}.post_title LIKE $1) OR (pm.meta_value LIKE $1) ", $where );
}
return $where;
}
add_filter( 'posts_where', 'search_by_meta_where' );