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
add_action( 'save_post', 'custom_featured_image_size', 10, 2 ); | |
function custom_featured_image_size( $post_id, $post ) { | |
$image_size_name = 'my-custom-image-size'; | |
$cpt = 'my-cpt'; | |
$width = 1600; | |
$height = 1600; | |
$crop = false; | |
// Only for my CPT. |
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
/* | |
Made by Elly Loel - https://ellyloel.com/ | |
With inspiration from: | |
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/ | |
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/ | |
- Adam Argyle - https://unpkg.com/[email protected]/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE | |
Notes: | |
- `:where()` is used to lower specificity for easy overriding. | |
*/ |
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
#!/bin/bash | |
# This script backs up files using restic and sends emails on success or errors. | |
# | |
# Files that the script expects: | |
# /usr/local/etc/restic/repo.env: shell variables that define the restic repository | |
# /usr/local/etc/restic/include.txt: paths to back up | |
# /usr/local/etc/restic/exclude.txt: paths to not include in the backup, even if they are in include.txt | |
# | |
# Inspired by https://gist.github.com/perfecto25/18abbd6cfbaa4e9eb30251470e9b7504 |
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 | |
define( 'STAGING_URL', 'https://staging.mysiteurl.com'); | |
define( 'PRODUCTION_URL', 'https://www.mysiteurl.com'); | |
add_filter( 'wp_get_attachment_url', 'yanco_staging_wp_get_attachment_url', 1000000, 2 ); | |
function yanco_staging_wp_get_attachment_url( $url, $attachment ) | |
{ | |
if( strpos( $url, STAGING_URL ) !== false ) { | |
$url = str_replace( STAGING_URL, PRODUCTION_URL, $url ); |
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 | |
/** | |
* @snippet Show Custom Filter and Admin Column for Catalog Visibility @ WooCommerce Products Admin | |
* @sourcecode https://gist.github.com/statickidz/6a539550d8e0d13d2c3d12318672e816 | |
* @author Adrián Barrio Andrés (statickidz.com) | |
*/ | |
add_filter('woocommerce_product_filters', 'skidz_filter_by_catalog_visibility_dashboard_products'); |
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 YourPlugin\Blocks; | |
abstract class Block{ | |
/** | |
* Block title | |
* | |
* @var string |
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
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
# Modified by Per Søderlind | |
WP_PATH="/path/to/wp" | |
MAIN_SITE="http://www.domain.tld" # --url="$MAIN_SITE" below, prevents the Undefined index: HTTP_HOST error. |
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: User Switching Notice for WooCommerce | |
* Plugin URI: https://gist.github.com/bekarice/7785293fb60d7d5297a245b1c1271272 | |
* Description: Adds a frontend notice to switch back to your user on WooCommerce sites with User Switching. | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com/ | |
* Version: 1.0.0 | |
* Text Domain: user-switching-notice-for-woocommerce | |
* |
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 | |
/** | |
* Custom functions that deal with various plugin integrations of WP Job Manager. | |
* | |
* @package Listable | |
*/ | |
/** | |
* ====== FacetWP - https://facetwp.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
<?php | |
/** | |
* Plugin Name: Neuter Community Events | |
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/4a8e177f837ebe26c59a9766d626769f | |
* Description: Strips information from the WordPress community events request | |
* Version: 0.2 | |
* Author: Alice Wonder Miscreations | |
* Author URI: https://notrackers.com | |
* License: MIT | |
*/ |
NewerOlder