This file contains hidden or 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 | |
$comments = get_comments( array( | |
'type' => 'pings', | |
'fields' => 'ids', | |
) ); | |
foreach ( $comments as $no => $comment_id ) { | |
wp_delete_comment( $comment_id, true ); | |
} |
This file contains hidden or 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 | |
/* | |
If you are using BP 2.1+, this will insert a State selectbox. | |
Add the function to bp-custom.php and then visit .../wp-admin/users.php?page=bp-profile-setup | |
Remove this function after the field is created. | |
*/ | |
function bp_add_custom_state_list() { | |
This file contains hidden or 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
import { registerPlugin } from '@wordpress/plugins'; | |
import { select, dispatch } from '@wordpress/data'; | |
registerPlugin( 'disable-welcome-guide', { | |
render: function () { | |
return select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) && | |
dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' ); | |
}, | |
} ); |
This file contains hidden or 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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using \ and - (need to escape \) | |
bind \ split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
This file contains hidden or 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 | |
/* | |
Plugin Name: FD Clear Elementor Cache After WP Migrate DB Migration | |
Plugin URI: https://gist.github.com/heyfletch/769c64ad1fab8679032b076433afafd1 | |
Description: Deletes CSS in uploads/elementor/css, which auto-regenerates on pageload. This clears the cache locally and remotely. Must-use plugin (mu-plugin). | |
Author: Fletcher Digital | |
Version: 0.1.1 | |
Author URI: https://fletcherdigital.com | |
*/ |
This file contains hidden or 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
SRC := $(wildcard *.md) | |
OUTPUT=\ | |
$(SRC:.md=.html) \ | |
$(SRC:.md=.pdf) \ | |
$(SRC:.md=.docx) \ | |
$(SRC:.md=.rtf) \ | |
PDFOUT=\ | |
$(SRC:.md=.pdf)\ |
This file contains hidden or 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
setTimeout( function() { | |
jQuery('section#metar').trigger('click'); | |
}, 1000); |
This file contains hidden or 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 | |
namespace Chouinard\Logo; | |
/** | |
* Class MCLoginLogo | |
* @package Chouinard\Logo | |
*/ | |
class MCLoginLogo { |
This file contains hidden or 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 | |
# =============================================================================== | |
# 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. |
NewerOlder