Skip to content

Instantly share code, notes, and snippets.

View deavy's full-sized avatar
🇺🇦
Keep Calm and Support Ukraine

Deavy deavy

🇺🇦
Keep Calm and Support Ukraine
View GitHub Profile
@deavy
deavy / effect.css
Created August 22, 2016 07:13 — forked from AllThingsSmitty/effect.css
iOS-like transparency effect in CSS with backdrop-filter
.modal {
padding: 1rem 2rem;
max-width: 50%;
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.95);
color: #333;
font-family: sans-serif;
line-height: 1.5;
}
.modal a { color: #bf0222; }
@deavy
deavy / hide_personal_options.php
Created May 6, 2018 10:44
Hide Personal Options section from Wordpress Profile screen with CSS only
function hide_personal_options() {
$screen = get_current_screen()->id;
if ($screen === 'user-edit') {
echo "<style type='text/css'>
#your-profile h2:first-of-type,
#your-profile h2:first-of-type + table {
display: none;
}
</style>";
}
@deavy
deavy / functions.php
Created October 31, 2019 19:13
Replace old jQuery in Wordpress with the latest version from node_modules
$vendor_version = '%jquery_version%';
$replace_jquery = ! is_admin() && ! is_customize_preview();
$header_scripts_handler = 'vendor-header-scripts';
if ( $replace_jquery ) {
wp_deregister_script( 'jquery' ); // Deregister WP core jQuery
wp_deregister_script( 'jquery-core' ); // Deregister WP jQuery
wp_deregister_script( 'jquery-migrate' ); // Deregister WP jQuery Migrate
// Replace built-in jQuery with the latest version from node_modules
$header_scripts_handler = 'jquery';