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
| interface Product { | |
| name: string; | |
| price: number; | |
| inStock: boolean; | |
| } | |
| type DefaultValues = { | |
| string: string; | |
| number: number; | |
| boolean: boolean; | |
| }; |
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
| add_action( 'template_redirect', 'cpt_404_redirect' ); | |
| function cpt_404_redirect() | |
| { | |
| if( is_404()) { | |
| global $wp_query; | |
| if ( isset( $wp_query->query['post_type'] ) && $wp_query->query['post_type'] == 'cpt_slug' ) { | |
| wp_redirect( home_url( '/your-url/' ) ); | |
| exit(); | |
| } | |
| } |
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 gmw_polylang_remove_query_var( $args ) { | |
| foreach( $args->query_vars['tax_query'] as $key => $value ) { | |
| if ( $value['taxonomy'] == 'language' ) { | |
| unset( $args->query_vars['tax_query'][$key] ); | |
| } | |
| } |
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
| # Delete all containers | |
| docker rm $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi $(docker images -q) | |
| # Start all stopped containers | |
| docker start $(docker ps -a -q) |
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
| <!DOCTYPE> | |
| <html> | |
| <head> | |
| <style> | |
| .rollover:hover > img, | |
| * [summary=rollover]:hover > img{ | |
| max-height: 0px !important; | |
| } | |
| .rollover:hover > div img, | |
| * [summary=rollover]:hover > div img{ |
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
| <style> | |
| .rollover:hover > img, | |
| * [summary=rollover]:hover > img { max-height: 0px !important; } | |
| .rollover:hover > div img, | |
| * [summary=rollover]:hover > div img{ max-height: none !important; } | |
| </style> |
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
| <style> | |
| input{ | |
| display: none; | |
| } | |
| @media screen and (max-width:9999px){ | |
| .cboxcheck:checked + * .thumb-carousel, | |
| * [summary=cboxcheck]:checked + * [summary^=thumb-carousel] { | |
| height: auto !important; | |
| max-height: none !important; | |
| line-height: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
| /* Checkbox Hack */ | |
| input[type=checkbox] { | |
| position: absolute; | |
| top: -9999px; | |
| left: -9999px; | |
| } | |
| label { | |
| -webkit-appearance: push-button; | |
| -moz-appearance: button; |
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 post_title_require($title='') { | |
| if ( '' == $title ) | |
| die('Post Title Require'); | |
| return $title; | |
| } | |
| add_filter('title_save_pre', 'post_title_require', 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
| //Find Text and Replace | |
| $("selector").text(function () { | |
| return $(this).text().replace("search", "replace"); | |
| }) |
NewerOlder