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 | |
// Add Current Users Admin Color Scheme | |
// 1. Create helper function to grab individual colors easily | |
// 2. Add individual colors to document root as CSS variables | |
function wpptpcv_return_admin_colors() { | |
global $_wp_admin_css_colors; | |
// Get the user's selected color scheme name |
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 | |
/** | |
* Adds a menu item to the admin menu for managing patterns | |
*/ | |
function s9_add_manage_patterns_menu() { | |
// Check if the current user has the capability to edit pages | |
if (!current_user_can('edit_pages')) { | |
return; | |
} |
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 | |
/** | |
* Render the schema graph for the acf/gb-faq block. | |
* | |
* @param array $graph Schema data for the current page. | |
* @param WP_Block_Parser_Block $block The block data array. | |
* @param Meta_Tags_Context $context A value object with context variables. | |
* | |
* @return array Our Schema graph. | |
*/ |
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 | |
/** | |
* Add has-\d-columns class to columns blocks after 5.3 update. | |
* | |
* @param string $block_content The block content about to be appended. | |
* @param array $block The full block, including name and attributes. | |
* | |
* @return string | |
*/ | |
add_filter( 'render_block', function( $block_content, $block ) { |
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 | |
/* | |
Use YouTube privacy-enhanced mode. More info: https://support.google.com/youtube/answer/171780?visit_id=637419781721286051-946666784&rd=1 | |
*/ | |
add_filter( | |
'embed_oembed_html', | |
function( $cache, $url, $attr, $post_ID ) { | |
if ( preg_match('#^https?://(www\.)?youtu\.?be(\.com)?/#i', $url) ) { | |
return str_replace( | |
' src="https://www.youtube.com/embed/', |
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 | |
//Inspiration: https://gist.github.com/florianbrinkmann/a879099f3d28c5e1d64f2aeea042becf | |
add_action( 'do_faviconico', function() { | |
//Check for icon with no default value | |
if ( $icon = get_site_icon_url( 32 ) ) { | |
//Show the icon | |
wp_redirect( $icon ); | |
} else { | |
//Show nothing | |
header( 'Content-Type: image/vnd.microsoft.icon' ); |
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
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder |
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 | |
/* | |
* Enqueue parent and child theme style.css | |
*/ | |
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles', 20 ); | |
function my_theme_enqueue_styles() { | |
// Get the theme data | |
$my_theme = wp_get_theme(); |
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 | |
/** | |
* Capitalize ẞ Dangit | |
* | |
* @package CapitalizeẞDangit | |
* @author Bernhard Kau | |
* @license GPLv3 | |
* | |
* @wordpress-plugin | |
* Plugin Name: Capitalize ẞ Dangit |
NewerOlder