Skip to content

Instantly share code, notes, and snippets.

View a-zhary's full-sized avatar
💻
Happy Coding

Anton Zhary a-zhary

💻
Happy Coding
View GitHub Profile
<?php
// disable for posts
add_filter('use_block_editor_for_post', '__return_false', 10);
// disable for post types
add_filter('use_block_editor_for_post_type', '__return_false', 10);
@a-zhary
a-zhary / wp-config.php
Created December 26, 2018 15:18
valet share
define('WP_HOME', 'http://{temporary-id}.ngrok.io/');
define('WP_SITEURL', 'http://{temporary-id}.ngrok.io/');
@a-zhary
a-zhary / Pulse animation
Created August 8, 2018 14:13
Pulsу Animation
@keyframes radial-pulse {
0% {
box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.5);
}
100% {
box-shadow: 0 0 0 30px rgba(0, 0, 0, 0);
}
}
@a-zhary
a-zhary / Media SASS
Created August 8, 2018 08:43
Media SASS
@import "vars"
/*========== Desktop First ==========*/
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px)
/**/
/* Medium Devices, Desktops */
@a-zhary
a-zhary / bubbleSort.js
Created June 17, 2018 10:16
Buble Sort
var numbers = [12, 3, 7, 9, 10, 5];
for (var i = 0; i <= numbers.length - 2; i++) {
var minValue = numbers[i];
for (var j = i + 1; j <= numbers.length - 1; j++) {
if (numbers[j] < minValue) {
minValue = numbers[j];
var swap = numbers[i];
numbers[i] = minValue;
@a-zhary
a-zhary / cleanup.php
Created May 5, 2018 01:08
REMOVE GENERATOR VERSION NUMBER
REMOVE GENERATOR VERSION NUMBER
@a-zhary
a-zhary / preload image
Created April 3, 2018 18:35
preload image
body:after {
content:
url('https://www.atlex.ru/wp-content/uploads/2018/04/who-are-you-in-the-world-of-hosting-inactive.png')
url('https://www.atlex.ru/wp-content/uploads/2018/04/who-are-you-in-the-world-of-hosting-active-lady.png')
url('https://www.atlex.ru/wp-content/uploads/2018/04/who-are-you-in-the-world-of-hosting-active-gentlemen.png');
display: none;
}
@a-zhary
a-zhary / overlay sass
Created February 9, 2018 08:04
overlay
.overlay
position: relative
&::after
content: ""
position: absolute
top: 0
bottom: 0
left: 0
right: 0
background: rgba(0, 0, 0, .5)
@a-zhary
a-zhary / debug
Created November 24, 2017 20:27
debug
function debug($arr) {
echo '<pre>' . print_r($arr, true) . '</pre>';
}
@a-zhary
a-zhary / mass_update_posts
Created November 15, 2017 16:32
mass_update_posts
<?php
function mass_update_posts() {
$args = array( //whatever post type you need to update
'posts_per_page' => -1);
$my_posts = get_posts($args);
foreach($my_posts as $key => $my_post){
$meta_values = get_post_meta( $my_post->ID);