- Connect to server
Only first connection to create username
and SSH configure:
$ ssh root@domain
Recomended (most secure):
alias wpdebug0='wp config set WP_DEBUG false --raw --type=constant' | |
alias wpdebug1='wp config set WP_DEBUG true --raw --type=constant' | |
alias rmdss='find . -name '.DS_Store' -type f -delete' | |
alias rmnm='find . -name 'node_modules' -type d -delete' | |
alias rmcv='find . -name 'vendor' -type d -delete' | |
alias guiau='git update-index --assume-unchange' | |
alias guinau='git update-index --no-assume-unchange' | |
alias jpdev1='wp config set JETPACK_DEV_DEBUG true --type=constant --raw' | |
alias jpdev0='wp config set JETPACK_DEV_DEBUG false --type=constant --raw' | |
alias wplangupdate='wp language core update && wp language plugin update --all && wp language theme update --all' |
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', | |
]; |
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()){ |
<?php | |
/** | |
* Integration Contact Form 7 with Sales Call. | |
*/ | |
function wpcf7_sales_call_register_service() { | |
$integration = WPCF7_Integration::get_instance(); | |
$integration->add_category( | |
'call_request', |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^old.com$ | |
RewriteRule (.*)$ https://new.com/$1 [R=301,L] | |
</IfModule> |
<?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( |
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, | |
} ) | |
} |
Only first connection to create username
and SSH configure:
$ ssh root@domain
Recomended (most secure):
String.prototype.pad = function (length) { | |
'use strict'; | |
var s = this; | |
while (s.length < length) { | |
s = '0' + s; | |
} | |
return s; | |
}; | |
String.prototype.numbers = function () { | |
'use strict'; |
<?php | |
add_filter( 'sanitize_file_name', 'themename_sanitize_file_name' ); | |
/** | |
* Remove accents, maybe lowercase and underscores to dashes | |
* | |
* @version 1.0.4 | |
* @link https://gist.github.com/camaleaun/d8d12d04ff879a89d833c9eb39362eda | |
* @param string $filename Name of file. | |
* @return string Sanitized file name. |