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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/?post_type=snippet&p=527 | |
// Created by: jeffmatson | |
?> | |
<?php | |
if ( ! defined( 'ABSPATH' ) ) { exit; } | |
function example_autoload( $classname ) { | |
$class = str_replace( '\\', DIRECTORY_SEPARATOR, str_replace( '_', '-', strtolower( $classname ) ) ); |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.localhost/snippet/stopping-cart-fragments-from-updating-in-woocommerce/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
add_action( 'wp_print_scripts', 'nuke_cart_fragments', 100 ); | |
function nuke_cart_fragments() { | |
wp_dequeue_script( 'wc-cart-fragments' ); |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/stop-cart-fragments-from-updating-in-woocommerce/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
add_action( 'wp_print_scripts', 'nuke_cart_fragments', 100 ); | |
function nuke_cart_fragments() { | |
wp_dequeue_script( 'wc-cart-fragments' ); |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/list-all-wordpress-actions-fired/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
add_action( 'shutdown', function(){ | |
foreach( $GLOBALS['wp_actions'] as $action => $count ) | |
printf( '%s (%d) <br/>' . PHP_EOL, $action, $count ); | |
}); |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/get-wordpress-admin-color-scheme/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
function build_admin_colors() { | |
global $_wp_admin_css_colors; | |
$current_color_scheme = get_user_meta( get_current_user_id(), 'admin_color', true ); |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/completely-remove-the-wordpress-heartbeat/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
// Fire the action on init. | |
add_action( 'init', 'kill_wp_heartbeat' ); | |
function kill_wp_heartbeat() { | |
// Deregister the script. |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/test-snippet/ | |
// Created by: Liam - TEST Dempsey - TEST | |
?> | |
<?php | |
// Test snippet only |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.localhost/snippet/tdfadsfadsfasdf/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
sfgsdfgsdfgsdfg |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.localhost/snippet/dsffdf/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
asdfsadfsdf |
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 | |
// Download this snippet as a plugin and more at: https://wordbits.localhost/snippet/asdfasdf/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
asdfsafsf |
OlderNewer