View test-css-string.php
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 | |
function confirm_css_unit( $string ) { | |
// First check for a null or allowed strings. | |
if ( empty( $string ) || null === $string || in_array( $string, [ 'auto', 'fit-content', 'inherit' ] ) ) { | |
return $string; | |
} | |
// Pull out the numerical portion. | |
$value = preg_replace( '~\D~', '', $string ); |
View WooUpgradeTestSuiteCest.php
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 | |
/** | |
* WooCommerce Upgrade Test Suite | |
* | |
* A set of acceptance tests for a standard WooCommerce store. | |
* | |
* https://gist.github.com/norcross/4d45f1902bfb2f1f4cf79997a47d9d03 | |
*/ | |
// It'll error out sometimes without this ¯\_(ツ)_/¯ . |
View admin-notice-class.php
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 | |
/** | |
* Helper to work with Wordpress admin notices | |
* | |
* @example | |
* Notice::success('All is good!'); | |
* | |
* @example | |
* Notice::warning('Do something please.', true); |
View admin-bar-debug-display.php
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 | |
/** | |
* If we requested the log file, grabit and spit it out. | |
* | |
* @return HTML | |
*/ | |
function rkv_adminbar_display_debug_log() { | |
// Bail without the query string or not on admin. | |
if ( ! is_admin() || empty( $_GET['viewlog'] ) ) { |
View dpp-add-nunito.php
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 | |
add_filter( 'gppro_webfont_stacks', 'dpp_add_nunito_font', 50 ); | |
/** | |
* Add the Nunito font to the webfont data stack. | |
* | |
* @param array $webfonts The existing data array. | |
* | |
* @return array $webfonts The modified data array. | |
*/ |
View disable-username-login.php
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 | |
add_filter( 'authenticate', 'rkv_disable_username_logins', 20, 3 ); | |
/** | |
* Disable admin username and redirect to Google (or another site). | |
* | |
* @param object $user The WP_User object. | |
* @param string $username The entered username. | |
* @param string $password The entered password. | |
* |
View remove-avatar-user-table.php
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 | |
add_filter( 'pre_get_avatar', 'rkv_remove_avatar_from_list', 10, 3 ); | |
/** | |
* Remove the avatars from just the admin user list table. | |
* | |
* @param string $avatar HTML for the user's avatar. Default null. | |
* @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, | |
* user email, WP_User object, WP_Post object, or WP_Comment object. | |
* @param array $args Arguments passed to get_avatar_url(), after processing. | |
* |
View rkv-admin-links.php
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 | |
/** | |
* set up some quick links for the admin bar | |
* | |
* @param WP_Admin_Bar $wp_admin_bar [description] | |
* @return [type] [description] | |
*/ | |
function rkv_admin_bar_static( WP_Admin_Bar $wp_admin_bar ) { |
View csv-export-example.php
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 | |
/** | |
* Devin CSV Export | |
* | |
* Contains our export processing | |
*/ | |
/* | |
Copyright 2015 Reaktiv Studios | |
This program is free software; you can redistribute it and/or modify |
NewerOlder