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
window.onload = function () { | |
const variation1 = document.getElementById( 'variation_1' ); | |
const variation2 = document.getElementById( 'variation_2' ); | |
const variation3 = document.getElementById( 'variation_3' ); | |
const withColor = [ | |
'Impressão Vinil', | |
'Placa Decorativa', | |
'Impressão Canvas', | |
'Borda Infinita', | |
]; |
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 isMobileWA() | |
{ | |
return (/Android|webOS|iPhone|iPad|iPod|Windows Phone|IEMobile|Mobile|BlackBerry/i.test(navigator.userAgent) ); | |
} | |
var elm = jQuery('a[href*="whatsapp.com"]'); | |
jQuery.each(elm, function(index, value){ | |
var item = jQuery(value).attr('href'); | |
if(item.indexOf('chat') != -1){ | |
//nothing | |
} else if (item.indexOf('web.whatsapp') != -1 && isMobileWA()){ |
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 | |
/** | |
* Integration Contact Form 7 with Sales Call. | |
*/ | |
function wpcf7_sales_call_register_service() { | |
$integration = WPCF7_Integration::get_instance(); | |
$integration->add_category( | |
'call_request', |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^old.com$ | |
RewriteRule (.*)$ https://new.com/$1 [R=301,L] | |
</IfModule> |
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
window.addEventListener( 'load', () => { | |
document.querySelectorAll( '.sharing-anchor' ).forEach( ( anchor ) => { | |
anchor.addEventListener( 'click', () => { | |
if ( undefined !== navigator.share ) { | |
navigator.share( { | |
title: document.querySelector( 'meta[property="og:title"]' ).content, | |
text: document.querySelector( 'meta[property="og:description"]' ).content, | |
url: document.querySelector( 'meta[property="og:url"]' ).content, | |
} ) | |
} |
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 | |
/** | |
* Allow fonts upload | |
* | |
* @param array $mime_types Current allowed mime types. | |
* @return array $mime_types Modified mime types. | |
*/ | |
function allow_upload_fonts_mimes_types( $mime_types ) { | |
$mime_types = array_merge( |
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
{ | |
"require": { | |
"composer/installers": "^1.6" | |
}, | |
"require-dev": { | |
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", | |
"wp-coding-standards/wpcs": "^2.0" | |
}, | |
"scripts": { | |
"php:lint": "composer install && vendor/bin/phpcs -p" |
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
CREATE TABLE images ( | |
meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
post_id bigint(20) unsigned NOT NULL DEFAULT '0', | |
image longtext, | |
PRIMARY KEY (meta_id), | |
KEY post_id (post_id) | |
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; | |
INSERT INTO images (post_id, image) VALUES (2,'image1.jpg'),(2,'image2.jpg'); |
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 | |
/** | |
* Uploads tests. | |
*/ | |
if ( $_POST && isset( $_POST['upload'] ) && ! empty( $_FILES ) ) { | |
/** Define ABSPATH as this file's directory */ | |
if ( ! defined( 'ABSPATH' ) ) { | |
define( 'ABSPATH', dirname( __FILE__ ) . '/' ); | |
} |
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( 'themename_twbs_bootstrap_defaults', 'themename_twbs_bootstrap_defaults' ); | |
function themename_twbs_bootstrap_defaults( $defaults ) { | |
$defaults['version'] = '3.3.7'; | |
$defaults['files'] = 'both'; | |
$defaults['cdn'] = 'maxcdn'; | |
$defaults['css_path'] = get_theme_file_uri( 'assets/css' ); | |
$defaults['js_path'] = get_theme_file_uri( 'assets/js' ); | |
return $defaults; |
NewerOlder