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
<?php | |
/** | |
* Snippet 1: Set current CTA always as "not viewed". | |
* Chat Window will show with your Joinchat settings. | |
*/ | |
add_filter( 'joinchat_get_settings', function( $settings, $obj ) { | |
$settings['is_viewed'] = false; | |
return $settings; | |
}, 10, 2 ); |
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
<?php | |
/** | |
* Joinchat use Product category settings on product page | |
* | |
* Use custom Joinchat settings from the first category of the product | |
* with custom Joinchat settings. | |
* | |
* @param array $settings | |
* @return array |
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
<?php | |
/* | |
Plugin Name: Images to WebP | |
Plugin URI: https://www.paypal.me/jakubnovaksl | |
Description: Convert JPG, PNG and GIF images to WEBP, speed up your web | |
Version: 4.2 | |
Author: KubiQ | |
Author URI: https://kubiq.sk | |
Text Domain: images-to-webp | |
Domain Path: /languages |
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
<?php | |
/* | |
Plugin Name: Creame Optimize | |
Plugin URI: https://crea.me/ | |
Description: Optimizaciones de Creame para mejorar tu <em>site</em>. | |
Version: 2.1.5 | |
Author: Creame | |
Author URI: https://crea.me/ | |
License: MIT License | |
*/ |
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
<?php | |
class Wc_updateVariationInCart { | |
public function __construct() { | |
if ( $this->woo_ck_wuvic_is_woocommerce_active() ) { | |
// add js file to cart | |
add_action( 'wp_head', array( $this, 'woo_ck_wuvic_hook_js' ) ); |
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
<?php | |
/** | |
* Shortcode to output Review Structured Data ld+json | |
* | |
* Example: to use in Tesminonial CPT | |
* Usage: [review_json] | |
*/ | |
function review_structured_data_shortcode() { | |
$post_id = get_the_ID(); |
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
<?php | |
add_filter( 'joinchat_format_replacements', function($replaces) { | |
$replaces['/(http:\/\/)/u'] = 'https://'; | |
return $replaces; | |
}, 999); |
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
<?php | |
// Join.chat CTA allow links in format [link text](https://example.com) | |
add_filter( 'joinchat_format_replacements', function($replacements) { | |
$replacements['/\[([^\[\]]+)\]\(([^)]+)\)/u'] = '<a href="$2">$1</a>'; | |
return $replacements; | |
}); | |
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
<?php | |
// Array filter items that field contains $value | |
function array_filter_field_contains( $array, $field, $values ) { | |
return array_filter( | |
$array, | |
function( $item ) use ( $field, $values ) { | |
foreach ( (array) $values as $value ) { | |
if ( false !== stripos( $item[ $field ], $value ) ) { | |
return 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
/** | |
* Contact Form 7 only enqueue scripts when there is a form in the page | |
*/ | |
// Disable contact-form-7 recaptcha enqueue action | |
remove_action( 'wp_enqueue_scripts', 'wpcf7_recaptcha_enqueue_scripts', 20 ); | |
// Dequeue contact-form-7 scripts | |
function contact_form_7_dequeue_scripts() { | |
wp_dequeue_script( 'contact-form-7' ); |
NewerOlder