Skip to content

Instantly share code, notes, and snippets.


Jeroen Schmit slimndap

View GitHub Profile
keesiemeijer /
Last active May 22, 2022 03:57
Setup PHPUnit for use in the Local by Flywheel app
#!/usr/bin/env bash
# ===============================================================================
# Script to install PHPUnit in the Local by Flywheel Mac app
# These packages are installed
# PHPUnit, curl wget, rsync, git, subversion and composer.
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit.
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory.
Clorith / plugin.php
Created December 11, 2015 15:22
Encourage your users to submit translations for your WordPress plugin
View plugin.php
function language_detector_admin_notices() {
// Get the current language locale
$language = get_locale();
// Check if the nag screen has been disabled for this language
if ( false === get_option( 'plugin_slug_language_detector_' . $language, false ) ) {
// Check if a translation file already exists for this language
if ( $loaded = load_plugin_textdomain( 'text_domain', false, plugin_dir_path( __FILE__ ) . '/languages/' ) ) {
mohandere / yoast-seo-sitemap.php
Last active February 11, 2023 19:06
Wordpress yoast seo plugin, generate custom sitemap for custom URLS
View yoast-seo-sitemap.php
* Create a new custom yoast seo sitemap
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' );
add_action( 'init', 'init_wpseo_do_sitemap_actions' );
// Add custom index
bappi-d-great / How to use custom post type archive as front page.php
Last active July 30, 2019 22:49
How to use custom post type archive as front page
View How to use custom post type archive as front page.php
* 1. Go to Settings > Permalinks and select any page as home page
* Then use the following code
* You can add those codes in your functions.php in the theme, if you think your theme won’t be changed.
* Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'.
* If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that,
* give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins,
* so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.
malarkey / Contract Killer
Last active March 27, 2023 23:12
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008