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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
@media(min-width:768px) { | |
#wpadminbar { | |
opacity: 0; | |
transition: all 0.5s ease; | |
} | |
#wpadminbar:hover { | |
opacity: 1; | |
} | |
body.admin-bar { |
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
.fl-row-full-height .fl-row-content-wrap { | |
min-height: calc(100vh - 282px); | |
} |
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
function replace_text_wsv($text){ | |
$replace = array( | |
// 'WORD TO REPLACE' => 'REPLACE WORD WITH THIS' | |
'Find This' => 'Replace With This', | |
'Find This' => 'Replace With This', | |
'Find This' => 'Replace With This' | |
); | |
$text = str_replace(array_keys($replace), $replace, $text); | |
return $text; | |
} |
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
function wsv_filter_query($query, $error = true) | |
{ | |
if ( is_search() ) { | |
$query->is_search = false; | |
$query->query_vars[s] = false; | |
$query->query[s] = false; | |
if ( $error == true ) | |
$query->is_404 = true; | |
} | |
} |
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
add_filter( 'wp_handle_upload_prefilter', function ( $file ) { | |
$uploads = wp_upload_dir(); | |
$use_yearmonth = get_option( 'uploads_use_yearmonth_folders' ); | |
if ( boolval( $use_yearmonth ) ) { | |
// if upload to year month based folders is enabled check current target | |
$year = date( 'Y' ); | |
$month = date( 'm' ); | |
$target = $uploads['path'] . DIRECTORY_SEPARATOR . $year . DIRECTORY_SEPARATOR . $month . DIRECTORY_SEPARATOR . $file['name']; | |
} else { | |
// uploads dir |
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
add_filter( 'gettext', 'change_featuredimage_txt' ); | |
add_filter( 'ngettext', 'change_featuredimage_txt' ); | |
function change_featuredimage_txt( $translated ) { | |
global $post; | |
if ( get_post_type($post) == 'post' ) { | |
$translated = str_ireplace( 'Featured Image', 'Featured Image (1200w x 630h)', $translated ); | |
} |
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
04-11-20 | |
a.button { | |
background-color: transparent; | |
} | |
.woocommerce a.button { | |
background-color: transparent; | |
color: #FF984F; | |
border: 1px solid #FF984F; | |
border-radius: 10px; |
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
add_action('wp_logout','auto_redirect_after_logout'); | |
function auto_redirect_after_logout(){ | |
wp_redirect( home_url() ); | |
exit(); | |
} |
OlderNewer