Skip to content

Instantly share code, notes, and snippets.

View ckanitz's full-sized avatar

Christopher Kanitz ckanitz

View GitHub Profile
@ckanitz
ckanitz / functions.php
Created June 11, 2024 14:34
WordPress: Remove jQuery Migrate Warnings
/**
* Remove jQuery Migrate.
*
* @see https://tenor.com/ovzn.gif
*
* @param \WP_Scripts $scripts The WP_Scripts instance.
*/
public function remove_jquery_migrate( $scripts ) {
if ( ! empty( $scripts->registered['jquery'] ) ) {
$scripts->registered['jquery']->deps = array_diff( $scripts->registered['jquery']->deps, array( 'jquery-migrate' ) );
<?php
/**
* This file houses the class that Extends the Yoast Schema Graph for course events
*
* @package ef/inc
*/
if ( interface_exists( 'WPSEO_Graph_Piece' ) ) {
/**
* The class that extends WPSEO_Graph_Piece to display event schema for courses.
@ckanitz
ckanitz / fontawesome-dictionary.php
Last active May 15, 2017 13:37
FontAwesome 4.7.0 PHP-array ( key=> value === sanitized name => class name )
<?php
$fa_dictionary = array(
'glass' => 'fa-glass',
'music' => 'fa-music',
'search' => 'fa-search',
'envelope-o' => 'fa-envelope-o',
'heart' => 'fa-heart',
'star' => 'fa-star',
'star-o' => 'fa-star-o',
'user' => 'fa-user',