Skip to content

Instantly share code, notes, and snippets.

View alexmoise's full-sized avatar

Alex Moise alexmoise

View GitHub Profile
@alexmoise
alexmoise / allow-usdz-in-wordpress-media-library.php
Last active September 3, 2023 17:02 — forked from kamalahmed/fix-svg-upload-error-in-wordpress.php
A simple plugin that makes it possible to upload USDZ files in WordPress Media Manager
<?php
/**
* Plugin Name: Allow USDZ mime in Wordpress Media Library
* Plugin URI: https://gist.github.com/alexmoise/201a3b1196facb8343e82d0590f9b1ab
* Description: A simple plugin that makes it possible to upload USDZ files in Media Manager. Don't forget to add the MIME type in web server config if necessary! No settings necessary, just activate and upload USDZ files in media library as usually. Tested with WP 5.2.3
* Version: 1.2.81
* Author: Alex Moise
* Author URI: https://moise.pro
*/
@alexmoise
alexmoise / stop-wordpress-user-phishing.php
Last active October 19, 2019 02:40
A single-function plugin to stop usernames enumeration
<?php
/**
* Plugin Name: Stop Username Phishing
* Plugin URI: https://gist.github.com/alexmoise/d5d9073e6165d4e5ac098a184d5405e6
* Description: A single-function plugin to stop usernames enumeration using author ID
* Version: 1.0
* Author: Alex Moise
* Author URI: https://moise.pro
*/
@alexmoise
alexmoise / woocommerce-placing-order-js-popup.css
Created February 18, 2018 13:28
A JS Checkout Popup for WooCommerce, asking user to NOT refresh the page while order completes. Also based on magnificPopup. Only pops up if checkout form is valid.
/* Styling the JS Checkout Popup for WooCommerce, asking user to NOT refresh the page while order completes. */
/* Order waiting popup */
.white-popup h3 {
color: #3cb9f2;
}
.white-popup {
position: relative;
background: #FFF;
padding: 20px;
<?php
/**
* Plugin Name: Noesa DEV environment changes
* Plugin URI: https://gist.github.com/alexmoise/0056c5055c501e343fa22527faf66a71
* GitHub Plugin URI: https://gist.github.com/alexmoise/0056c5055c501e343fa22527faf66a71
* Description: A custom plugin to preserve custom changes against updates, for noesa.com dev environment
* Version: 1.0.0
* Author: Alex Moise
* Author URI: https://moise.pro
*/
@alexmoise
alexmoise / mobile-drop-down-menu-pure-css.css
Created November 20, 2017 14:44
SIMPLEST CSS STYLES TO TURN A REGULAR ul > li MENU INTO A RESPONSIVE DROP DOWN, while keeping the first item displayed as the first option, with a right & down switching triangle indicator after it. Just add #menu-container to the container div or whatever or change the ID selector below to match an existing one.
/* SIMPLEST CSS STYLES TO TURN */
/* A REGULAR ul > li MENU INTO A */
/* RESPONSIVE DROP DOWN, */
/* while keeping the first item */
/* displayed as the first option, */
/* with a right & down switching */
/* triangle indicator after it. */
/* === */
/* Just add #menu-container to */
/* the container div or whatever */
@alexmoise
alexmoise / black-and-red-radio-buttons.css
Last active November 20, 2017 14:49
Radio buttons quick CSS styling in black and red
/* RADIO BUTTONS STYLYNG */
input[type='radio'] {
-webkit-appearance:none;
width:18px;
height:18px;
border:2px solid black;
border-radius:50%;
outline:none;
margin: 0; padding: 0;
}
@alexmoise
alexmoise / expire-headers.htaccess
Created October 16, 2017 20:14
Assets expiration headers for use in .htaccess
# Expire headers
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
@alexmoise
alexmoise / aml-yoast-years-custom-sitemap.php
Last active February 18, 2018 13:30
A custom plugin to output the years sitemap along the Yoast sitemaps, for Andy Myers Lodge
<?php
/**
* Plugin Name: AML Years XML Sitemap
* Plugin URI: https://gist.github.com/alexmoise/66921b63fe6efe541eeb094118d1720a
* GitHub Plugin URI: https://gist.github.com/alexmoise/66921b63fe6efe541eeb094118d1720a
* Description: A custom plugin to output the years sitemap along the Yoast sitemaps, for Andy Myers Lodge
* Version: 1.0.2
* Author: Alex Moise
* Author URI: https://moise.pro
*/
@alexmoise
alexmoise / my_pmpro_mailchimp_listsubscribe_fields.php
Last active October 10, 2017 15:33 — forked from strangerstudios/my_pmpro_mailchimp_listsubscribe_fields.php
Sync name and level to Mailchimp with PMPro and PMPro Mailchimp
<?php
/**
* Plugin Name: Paid Memberships Pro - Sync fields to MailChimp
* Plugin URI: https://gist.github.com/alexmoise/
* Description: A simple plugin to sync fields between MailChimp and Paid Memberships Pro - MailChimp Add On. Only works with Paid Memberships Pro and MailChimp Add On installed and configured. Created as plugin out of https://gist.github.com/strangerstudios/b8f64e713d66583bdc71
* Version: 1.0.0
* Author: Alex Moise
* Author URI: http://moise.pro
*/
@alexmoise
alexmoise / aml-yoast-seo-adjustments.php
Last active January 22, 2019 03:24
Few custom functions to adjust the meta title, meta description and og:url outputed by Yoast for Andy Myers Lodge
<?php
/**
* Plugin Name: AML Yoast Seo Adjustments
* Plugin URI: https://gist.github.com/alexmoise/9fe4bb5014978b59f1dca0f0ef106248
* GitHub Plugin URI: https://gist.github.com/alexmoise/9fe4bb5014978b59f1dca0f0ef106248
* Description: Few custom functions to adjust the meta title, meta description and og:url outputed by Yoast for Andy Myers Lodge
* Version: 1.0.2
* Author: Alex Moise
* Author URI: https://moise.pro
*/