Skip to content

Instantly share code, notes, and snippets.

View carolinan's full-sized avatar
๐Ÿ’ญ
I may be slow to respond.

Carolina Nymark carolinan

๐Ÿ’ญ
I may be slow to respond.
View GitHub Profile
@kasparsd
kasparsd / 000-redirect-logger.php
Last active March 28, 2025 02:02
A must-use plugin to log and find the source of redirects in WordPress
<?php
/**
* Plugin Name: Redirect Logger
* Description: Find the source of all redirects.
*
* Place this in the mu-plugins directory and check the
* redirects-1234567.json file in the uploads directory for the logs.
*/
namespace WPElevator\Redirect_Logger;
@justintadlock
justintadlock / plugin.php
Last active January 10, 2025 03:58
Virtual page templates with block support
<?php
// This filter specifically checks whether a theme has a `changelog` template.
// If not, it looks for a fallback template in the plugin.
add_filter( 'template_include', function( $template ) {
// I'm just testing a query string here for demonstration/testing
// purposes, but you'll want to add a check for your registered query
// var with WordPress. For now, you can test with `?changelog=anything`.
if ( ! isset( $_GET['changelog'] ) ) {
<!-- wp:heading {"level":3} -->
<h3>Site blocks:</h3>
<!-- /wp:heading -->
<!-- wp:list -->
<ul><li>Site title</li><li>Site tagline</li><li>Site logo</li></ul>
<!-- /wp:list -->
<!-- wp:heading {"level":3} -->
<h3>Post blocks:</h3>
@jrfnl
jrfnl / reservednames.txt
Last active May 5, 2022 10:19
Reserved names used as parameter names in WordPress - Trac ticket: #55650 https://core.trac.wordpress.org/ticket/55650 - Last updated: 2022-05-05
Command used: `phpcs -ps . --sniffs=Universal.NamingConventions.NoReservedKeywordParameterNames --report=full,summary,source --extensions=php` (will not work by default)
FILE: src\wp-admin\includes\template.php
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
907 | WARNING | It is recommended not to use reserved keywords as function parameter names. Found:
| | $parent
| | (Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound)
----------------------------------------------------------------------------------------------------
@ryelle
ryelle / readme.md
Last active October 15, 2020 21:50
About Page documentation

Building the About Page(s)

Color Variables

Until we have something like postcss-custom-properties to create the fallback hex codes for IE, these will need to be manually updated in the about.css file.

  • --text: Used for the text color.
  • --background: This is the base background for section blocks.
  • --subtle-background: Used for section backgrounds if given the class has-subtle-background-color.
  • --nav-background: The nav banner background
@felixarntz
felixarntz / wp-alignment-classes.css
Created November 24, 2017 15:52
New WordPress alignment classes introduced by Gutenberg
/* -------------------------------------------------------------
# Variables
------------------------------------------------------------- */
$site_maxwidth: 72rem; // Maximum width the entire site should not exceed
$site_maxwidth-text: 40rem; // Maximum width the main content text should not exceed
$spacing_horizontal: 1rem; // General horizontal padding
/* -------------------------------------------------------------
# General Styles
@ohiosveryown
ohiosveryown / change-class-on-scroll.html
Last active December 1, 2024 20:58
Vanilla JS โ€“ย change/add class based on scroll position.
// https://codepen.io/cmykw/pen/gemxJm
// layout
<nav/>
// style
<style>
body { min-height: 200vh; }
nav {
@stereokai
stereokai / gist:36dc0095b9d24ce93b045e2ddc60d7a0
Last active January 6, 2025 16:03
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
@lopspower
lopspower / README.md
Last active April 19, 2025 04:48
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@rxaviers
rxaviers / gist:7360908
Last active April 18, 2025 20:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue: