Skip to content

Instantly share code, notes, and snippets.

View celticwebdesign's full-sized avatar

Darren Stevens celticwebdesign

View GitHub Profile
@mattradford
mattradford / gravity_spinner_css
Created June 17, 2016 13:54
Gravity Forms replacement spinner
.gform_ajax_spinner {
margin-left: 20px; /* give it some space from the Submit button */
border: 4px solid rgba(255, 255, 255, 0.3); /* match with border-left */
border-left: 4px solid gold;
animation: spinner 1.1s infinite linear;
border-radius: 50%;
width: 30px; /* match with height for a circle */
height: 30px;
}
@keyframes spinner {
@mattradford
mattradford / gravity_forms_filter_spinner.php
Created June 17, 2016 12:54
Filters the Gravity Forms spinner and replaces it with a base64-encoded blank image
function gf_spinner_replace( $image_src, $form ) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder
}
add_filter( 'gform_ajax_spinner_url', 'gf_spinner_replace', 10, 2 );
@ahmadawais
ahmadawais / page-login.php
Last active July 20, 2019 09:18
WordPress Frontend Login Page [UPDATED]
<?php
/**
* Template Name: Login Page AA
*
* Login Page Template.
*
* @author Ahmad Awais
* @since 1.0.0
*/
@16am
16am / Remove original size image.txt
Last active November 27, 2020 00:27
Remove original size image from WordPress Upload Directory after upload
add_filter( 'wp_generate_attachment_metadata', 'delete_fullsize_image' );
function delete_fullsize_image( $metadata )
{
$upload_dir = wp_upload_dir();
$full_image_path = trailingslashit( $upload_dir['basedir'] ) . $metadata['file'];
$deleted = unlink( $full_image_path );
return $metadata;
}