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 | |
/** | |
* Filters whether the current taxonomy should be shown in the Quick Edit panel. | |
* | |
* @since 4.2.0 | |
* | |
* @param bool $show_in_quick_edit Whether to show the current taxonomy in Quick Edit. | |
* @param string $taxonomy_name Taxonomy name. |
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
/** | |
* My markup for video is generated with PHP and it looks like this: | |
* | |
* foreach ( $videoURLs as $video_url ) : | |
* | |
* Need to get only video_id param from URL, something like: dEy6mu0UarM | |
* | |
* $video_id = explode('=', $video_url); | |
* | |
* |
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 | |
/** | |
* Change submit form <input> element to <button> element for AJAX enabled forms | |
* | |
* @link https://docs.gravityforms.com/gform_submit_button/ | |
*/ | |
add_filter( 'gform_submit_button', function ( $button, $form ) { | |
$dom = new DOMDocument(); |
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
/** | |
* HTML Markup to place in your <head> tag | |
* <link rel="icon" type="image/png" href="/favicon.png" data-dark="/favicon-dark.png" /> | |
*/ | |
// Attach listener to DOM Loaded | |
window.addEventListener( 'DOMContentLoaded', setFavicon ); | |
// Set specific favicon if browser is in dark mode | |
function setFavicon() { |
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 | |
/** | |
* Setup query | |
*/ | |
// Move this on top | |
$args = [ | |
'paged' => $page, | |
'post_type' => 'post', |
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_filter( 'woocommerce_coupon_is_valid', function( $is_valid, $coupon ) { | |
/** | |
* Selected coupons allowed for logged in users only | |
*/ | |
if ( in_array( $coupon->get_code() , ['loggedinonly', 'anothercoupontitle']) && ! is_user_logged_in() ) | |
{ | |
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
.forms-report-service { | |
.span-4, | |
.span-12 { | |
margin-top: 20px; | |
padding-left: 10px; | |
padding-right: 10px; | |
} | |
.span-buttons { | |
text-align: right; |
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
.forms-report-service { | |
.span-4, | |
.span-12 { | |
margin-top: 20px; | |
padding-left: 10px; | |
padding-right: 10px; | |
} | |
.span-buttons { | |
text-align: right; |
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
.forms-report-service { | |
&.loading { | |
opacity: 0.6; | |
pointer-events: none; | |
} | |
/** | |
* Grid |
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
.forms-report-service { | |
&.loading { | |
opacity: 0.6; | |
pointer-events: none; | |
} | |
/** | |
* Grid |