:root {
/* Base color using HSL */
--hue: 207;
--saturation: 64%;
--light: 44%;
/* Base color in variable */
--primary-color: hsl(var(--hue), var(--saturation), var(--light));
/* Base color lighten using calc */
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 | |
// this snippet requires PHP 5.3+ | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_register_style( 'atomic-blocks/ab-cta', '/path/to/atomic-blocks/css/ab-cta.css', array(), 1.0.0 ); | |
} ); | |
add_filter( 'render_block', function( $block_content, $block ) { | |
if ( 'atomic-blocks/ab-cta' === $block['blockName'] ) { | |
ob_start(); | |
wp_print_styles( $block['blockName'] ); |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
/** | |
* Recent_Posts widget w/ category exclude class | |
* This allows specific Category IDs to be removed from the Sidebar Recent Posts list | |
* | |
*/ | |
class WP_Widget_Recent_Posts_Exclude extends WP_Widget { | |
function __construct() { | |
$widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "The most recent posts on your site") ); | |
parent::__construct('recent-posts', __('Recent Posts with Exclude'), $widget_ops); |
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 | |
// functions.php | |
if ( function_exists(wpmarkdown_markdown_to_html) && function_exists(wpmarkdown_html_to_markdown) ) { | |
function markdown_to_html_func($content) { | |
if ( function_exists('wpmarkdown_markdown_to_html') ) { | |
return wpmarkdown_markdown_to_html($content); | |
} | |
return $content; | |
} | |
add_filter('markdown_to_html','markdown_to_html_func'); |
This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.
- Set
-moz-appearance
tonone
. This will "reset" the styling of the element; - Set
text-indent
to0.01px
. This will "push" the text a tiny bit[1] to the right;
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 | |
/** | |
* Lightweight, frontend version of admin-ajax.php. | |
* | |
* Only loads wp-load.php and sets up the headers and AJAX actions. | |
*/ | |
// Setup 'DOING_AJAX' constant to be compatible with native WP functionality | |
define( 'DOING_AJAX', true ); |
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
# LESS compiler | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} ^(.*)\.css | |
RewriteCond %1.less -f | |
RewriteRule ^(.*)\.css lessphp/less.php?f=$1.less |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Fuxia Scholz | |
* License: GPL | |
* Text Domain: plugin_unique_name | |
* Domain Path: /languages |