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
.carousel { | |
position: relative; | |
} | |
.carousel-item { | |
position: absolute; | |
visibility: hidden; | |
background: #fec901; | |
width: 400px; | |
height: 300px; |
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
.accordion-item.collapsed { | |
display: none; | |
} | |
.accordion-item.expanded { | |
display: block; | |
} | |
.accordion-button { | |
display: block; |
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
const RGBtoHex = (r, g, b) => | |
((r << 16) + (g << 8) + b).toString(16).padStart(6, '0'); | |
console.log( RGBtoHex(255, 165, 1) ); |
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 | |
// Константа | |
define( 'WP_AUTO_UPDATE_CORE', false ); | |
// Или фильтр | |
add_filter( 'allow_major_auto_core_updates', '_return_false' ); |
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 | |
function lazy_loaded_iframes( $code ) { | |
return str_replace ( '<iframe ' , '<iframe loading="lazy"' , $code ); | |
} | |
add_filter( 'embed_oembed_html', 'lazy_loaded_iframes' ); |
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
function wordCount(str) { | |
var m = str.match(/[^\s]+/g); | |
return m ? m.length : 0; | |
} |
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
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
allow from 192.168.0.1 | |
</Files> |
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
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
</Files> |
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 | |
add_action( 'category_row_actions', 'zl_actions_rows' , 10 ,2 ); | |
public function 'zl_actions_rows' ( $actions, $category ) { | |
$new_actions = array(); | |
$new_actions['edit'] = $actions['edit']; | |
$new_actions['template'] = '<a href="#" aria-label="' . __( ‘Custom Link', zl) . '">' . __( ‘Custom Link', zl) . '</a>'; | |
$new_actions['view'] = $actions['view']; | |
$new_actions['inline hide-if-no-js'] = $actions['inline hide-if-no-js']; | |
return $new_actions; |
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
var d = new Date("2020-02-15 00:00:00"); | |
console.log(d.getDate() + '. ' + d.getMonth() + ' ' + d.getFullYear(); | |
// IOS Результат | |
// NaN. NaN NaN | |
// Решение | |
var date_string = "2020-02-15 00:00:00"; | |
var result = new Date(date_string.replace(' ', 'T')); |
NewerOlder