Skip to content

Instantly share code, notes, and snippets.

View tester-at-bmi's full-sized avatar

Patrick tester-at-bmi

View GitHub Profile
@igorbenic
igorbenic / plugin-2.php
Last active January 1, 2023 23:00
How to create a Simple WordPress Language Switcher | https://www.ibenic.com/how-to-create-a-simple-wordpress-language-switcher/
<?php
// ... previous code
class SimpleWordPressLanguageSwitcher {
// ... previous code
/**
* Return the correct locale based on the $_GET parameter.
@bcnzer
bcnzer / postman-pre-request.js
Last active April 30, 2024 21:20
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',