A Pen by LC43WebStudio on CodePen.
A Pen by LC43WebStudio on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2019-07-20T19:25:54.246Z","extensionVersion":"v3.4.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add custom validation for CF7 form fields | |
function custom_text_validation_filter($result,$tag){ | |
$type = $tag['type']; | |
$name = $tag['name']; | |
$the_value = $_POST[$name]; | |
if($name == 'firstname'){ | |
if( empty($the_value) ) { | |
$result['valid'] = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add any custom tables that this plugin creates for an individual site to the list | |
* of tables that get deleted when a site is deleted. | |
* @see https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-admin/includes/ms.php#L116 | |
*/ | |
add_filter( 'wpmu_drop_tables', 'delete_my_plugin_tables', 10, 2 ); | |
function delete_my_plugin_tables( $tables=array(), $blog_id=null ) { | |
/** | |
* Make sure the blog ID parameter was sent, so we don't |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./Gruntfile.js | |
module.exports = function(grunt) { | |
grunt.loadTasks('hoge'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fix network admin URL to include the "/wp/" base | |
* | |
* @see https://core.trac.wordpress.org/ticket/23221 | |
*/ | |
add_filter( 'network_site_url', function( $url, $path, $scheme ){ | |
$urls_to_fix = array( | |
'/wp-admin/network/', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
remote=origin ; for brname in `git branch -r | grep $remote | grep -v /master | grep -v /HEAD | awk '{gsub(/^[^\/]+\//,"",$1); print $1}'`; do git branch --track $brname $remote/$brname || true; done 2>/dev/null |
OlderNewer