Essentiële onderdelen voor je digitale motor.
“Een roadtrip is pas geslaagd als elk onderdeel van de machine perfect samenwerkt. Mijn ‘Particles’ zijn de componenten die jouw applicaties, apps en websites laten draaien. Van Laravel-packages die complexe logica versimpelen tot specifieke WordPress-plugins die precies doen wat ze beloven. Ik ben deze deeltjes al sinds 2006 aan het verzamelen en verfijnen. Duik in mijn collectie bouwstenen en vind precies dat ene deeltje dat jouw project nog miste om op topsnelheid te komen.”
Nieuwste Particles
# BEGIN GZIP COMPRESSION mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* # END GZIP COMPRESSION
/** * Disables WordPress Rest API for external requests * Change whitelist plugins when plugins need to use the REST API */ function restrict_rest_api_to_localhost() { $whitelist = array(‘127.0.0.1’, “::1”); $whitelistplugins = array(‘contact-form-7’, ‘redirection’); $request = $_SERVER[‘REQUEST_URI’]; $die = true; if ($request) { foreach ($whitelistplugins as $plugin) { if (!empty(strpos($request, $plugin))) { $die = false; } […]
function load_style(){ if ( WP_LOCAL_SERVER || WP_STAGING_SERVER ) { wp_register_style( ‘client-stylesheet’, WP_CONTENT_URL .’/build/css/style.css’, array(), substr(chunk_split((substr(filemtime(get_stylesheet_directory() . ‘/../../build/css/style.css’), -3)), 1, ‘.’), 0, -1), ‘all’ ); } else { wp_register_style( ‘client-stylesheet’, WP_CONTENT_URL .’/build/css/style.min.css’, array(), substr(chunk_split((substr(filemtime(get_stylesheet_directory() . ‘/../../build/css/style.min.css’), -3)), 1, ‘.’), 0, -1), ‘all’ ); } wp_enqueue_style( ‘client-stylesheet’ ); } add_action( ‘wp_enqueue_scripts’, ‘load_style’ );
// Make pagespeed happy //——————— function remove_style_id($link){ return preg_replace(“/ id=’.*-css’/”, “”, $link); } add_filter(‘style_loader_tag’, ‘remove_style_id’);
// Load Google fonts add_action( ‘wp_head’, ’themeprefix_load_fonts’ ); function themeprefix_load_fonts() { ?>