Skip to content

Instantly share code, notes, and snippets.

remove_action('wpcf7_init', 'wpcf7_recaptcha_add_form_tag_recaptcha');
add_action('wpcf7_init', 'wpcf7_recaptcha_add_form_tag_recaptcha_scroller');
function wpcf7_recaptcha_add_form_tag_recaptcha_scroller() {
$recaptcha = WPCF7_RECAPTCHA::get_instance();
if ( $recaptcha->is_active() ) {
wpcf7_add_form_tag( 'recaptcha', 'wpcf7_recaptcha_form_tag_handler_scroller',
array( 'display-block' => true ) );
@taohuh
taohuh / style.less
Created March 27, 2018 09:19
Change placeholder color all browser
&::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: @color-white !important;
opacity: 0.3;
}
&::-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: @color-white;
opacity: 0.3;
}
@taohuh
taohuh / functions.php
Created April 1, 2020 12:50
function for include component with variables
/**
* Pass variable to include
*/
function mqInclude($filePath, $variables = array(), $print = true)
{
$output = NULL;
$filePath = get_template_directory() . '/' . $filePath;
if (file_exists($filePath)) {
// Extract the variables to a local namespace
@taohuh
taohuh / BaseButton.vue
Created May 12, 2021 08:53 — forked from Jamiewarb/BaseButton.vue
Vue BaseButton component
<template>
<component
:is="tag"
:class="buttonClasses"
:type="nativeType"
v-bind="$attrs"
@click="$emit('click', $event)"
>
<span class="v-btn__slot"><slot /></span>
</component>