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
@props([ | |
'percentage' => 0, | |
'failed' => false | |
]) | |
@php | |
$done = $failed || $percentage == 100; | |
@endphp | |
<div {{ $attributes->merge(['class' => ' space-y-1'])->whereDoesntStartWith('wire:poll') }} |
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 | |
/** | |
* Plugin With Checks Bootstrap | |
* | |
* @package Plugin With Checks | |
* @subpackage Core | |
* @copyright Copyright (c) 2021, Sandhills Development, LLC | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @since 1.0.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 | |
// Just require() this class via your theme's functions.php file. | |
/* Then instantiate this at the top of your 404.php file with: | |
if ( class_exists( 'Clean_404_Email' ) ) | |
new Clean_404_Email; | |
*/ | |
class Clean_404_Email { | |
var $time, $request, $blog, $email, $theme, $theme_data, $site, $referer, $string, $address, $remote, $agent, $message; |
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> | |
/** | |
* Checks if all first-level items in the array are of the given type. | |
* | |
* Example: | |
* | |
* function test_get_posts_with_no_fields_arg_should_return_array_of_WP_Post_objects() { | |
* $this-assertContainsOnlyType( 'WP_Post', get_posts() ); | |
* } | |
* |
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 | |
/** | |
* Attempts to log a referral when a new vendor is registered via an affiliate in FES. | |
* | |
* @see The 'edd_post_insert_' . $type hook, where $type is 'vendor'. | |
* | |
* @param int. $vendor_id Newly-created vendor ID. | |
* @param array $data Vendor data. | |
*/ | |
function affwp_edd_fes_vendor_registration_referral( $vendor_id, $data ) { |
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/sh | |
# A script that leverages Trac XML-RPC (I know, I know) to upload patches. | |
# | |
# This script is written specifically for the Mac, in that it reads from | |
# your keychain to derive your SVN password. You can change the SVN_PASS | |
# line below if you wanted to pull from ~/.svn/ or what not. | |
# | |
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345, | |
# using the name 12345.diff. If there exists a 12345.diff, the patch is |
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 | |
/** | |
* Automatically locates and loads files based on their namespaces and their | |
* file names whenever they are instantiated. | |
* | |
* @package WerdsWords | |
*/ | |
spl_autoload_register(function( $filename ) { | |
// First, separate the components of the incoming file. |
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 | |
/** | |
* Core class used to implement affiliate meta. | |
* | |
* @since 1.6 | |
* | |
* @see Affiliate_WP_DB | |
*/ | |
class Affiliate_WP_Affiliate_Meta_DB extends Affiliate_WP_DB { |
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
$( '#store-name' ).on( 'keyup', function( event ) { | |
var toConvert = $( this ).val(), | |
converted = toConvert.replace( /\s+/g, '-' ).toLowerCase(), | |
description = $( this ).next( '.form-text' ); | |
description.text( 'e.g. ' + converted + '.sellbird.com' ); | |
} ); |
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
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOUR="\[\033[0m\]" | |
PS1="$GREEN\u@machine$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ " |
NewerOlder