Account Settings

Winkelwagen

De winkelwagen is nog leeg

Website Settings

Dondere modus
Hoog contrast
Font grootte
Lees pagina-inhoud
Afdrukken
Realtime
  • Datum: 19-02-2026
  • Week: 08
  • Weer:
  • Seizoen: Winter

Load styles css

particle

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’ );

Disable rest api function

particle

/** * 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; } […]

GZIP htacces WordPress

particle

# 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

Defer Javascript loading

particle

// Defer Javascript loading function js_async_attr($tag){ # Do not add defer or async attribute to these scripts // $scripts_to_exclude = array(‘script1.js’, ‘script2.js’, ‘script3.js’); // foreach($scripts_to_exclude as $exclude_script){ // if(true == strpos($tag, $exclude_script ) ) // return $tag; // } # Defer or async all remaining scripts not excluded above return str_replace( ‘ src’, ‘ defer=”defer” […]

Home