document.addEventListener( 'jet-smart-filters/inited', function( initEvent ) {
console.log( 'filters init' );
} );
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 exportCSV() | |
{ | |
header('Content-type: text/csv'); | |
header('Content-Disposition: attachment; filename=products.csv'); | |
header('Pragma: no-cache'); | |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | |
header('Expires: 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
## Switch php version php-cli and in apache | |
echo | |
echo -e "\033[1;31m PHP Version changer Switcher\e[0m" | |
echo | |
echo -e "\033[0;33m PHP version currently active in your '/cli': \033[0;35m`sudo php -v | head -n 1 | cut -c 1-10` \e[0m" # Checking running php version | |
sudo sudo service apache2 stop &>- # Stopping lampp stack if running | |
echo | |
echo -e "\033[0;31m versions that you have installed:\e[0m" | |
ls -ldt /etc/php/* | awk '{print $9}' | |
echo |
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
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org/", | |
"@type": "Service", | |
"serviceType": "{{SERVICE TYPE}}", | |
"provider": { | |
"@type": "LocalBusiness", | |
"name": "{{BUSINESS NAME}}" | |
}, | |
"areaServed": { |
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
.spinner { | |
border: 4px solid #f3f3f3; | |
border-top: 4px solid #3498db; | |
border-radius: 50%; | |
width: 50px; | |
height: 50px; | |
animation: spin 0.8s linear infinite; | |
} | |
@keyframes spin { |
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
<div class="card"> | |
<?php if ($args['link']) : ?> | |
<a href="<?php echo esc_url($args['link']); ?>" class="global-link"> | |
</a> | |
<?php endif; ?> | |
<div class="card-image"> | |
<?php wp_get_attachment_image($args['image']); ?> | |
</div> |
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 | |
/** | |
* Proptotype | |
*/ | |
namespace DoggieRescue\Notices; | |
class AdminNotice { | |
public static function process_messages() { | |
$notice = self::get_admin_message(); | |
if ( ! empty( $notice ) && is_array( $notice ) ) { |
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
<a href="https://wa.me/40123456789?text=hi" style=" | |
position: fixed; | |
width: 60px; | |
height: 60px; | |
bottom: 32px; | |
right: 33px; | |
background-color: #25d366; | |
color: #FFF; | |
border-radius: 50px; | |
text-align: center; |
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 | |
/* | |
* Input: files matching src/pages/*.html | |
* Output: public/*.html | |
* | |
* Pages can extend a template by calling: | |
* | |
* extend(string $relativeTemplatePath, array $variables) | |
* | |
* at the start and: |
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
// Save the current language in post_meta when checkout is processed (used to identify correct Email language) | |
add_action('woocommerce_checkout_update_order_meta', 'dartrax_save_language_on_checkout', 10, 2 ); | |
function dartrax_save_language_on_checkout( $order_id, $posted ) { | |
if( ! class_exists('TRP_Translate_Press') ) return ''; | |
global $TRP_LANGUAGE; | |
update_post_meta( $order_id, 'order_language', $TRP_LANGUAGE ); | |
} | |
// Woocommerce Shipment Mails | |
add_action( 'woocommerce_order_status_processing_to_cancelled_notification','dartrax_prepare_locale_for_Mail_with_order_id', 5, 1 ); |
NewerOlder