Use copypasta to add to a sub-dir of mu-plugins or use Composer:
"require": {
"shelob9/css-inliner" : "*"
sectio.nav | |
h1 DEMATOS | |
h3.span.loader | |
span.m D | |
span.m E | |
span.m S | |
span.m E | |
span.m N | |
span.m V | |
span.m O |
<?php | |
//Bloqueia as notificações de atualização do plugin no WordPress | |
function disable_plugin_updates( $value ) { | |
unset( $value->response[ plugin_basename(__FILE__) ]); | |
return $value; | |
} | |
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' ); |
//renomear imagens no upload com base na data/hora | |
function image_name_with_date($filename) { | |
$info = pathinfo($filename); | |
$ext = empty($info['extension']) ? '' : '.' . $info['extension']; | |
/* check image is file or not */ | |
if ($info['extension']== 'jpg' || $info['extension'] == 'jpeg' || | |
$info['extension'] == 'gif' || $info['extension'] == 'png' || | |
$info['extension'] == 'svg' || $info['extension'] == 'webp') { | |
$name = basename($filename, $ext); | |
date_default_timezone_set('America/Sao_Paulo'); |
(function($){ | |
'use strict'; | |
/* | |
* jQuery htmlDoc "fixer" - v0.2pre - 8/8/2011 | |
* http://benalman.com/projects/jquery-misc-plugins/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. |
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
/** | |
* Plugin Name: Login por CPF | |
* Description: Permite o usuário se logar utilizando o CPF. | |
* Author: Felipe Marcos | |
* Author URI: https://felipemarcos.com | |
* License: GNU General Public License v3 or later |
// add a custom Coming Soon page | |
add_action( 'template_redirect', 'my_custom_coming_soon' ); | |
function my_custom_coming_soon() { | |
if( !is_user_logged_in() && !is_page( 'coming-soon' ) ){ | |
wp_redirect( site_url( 'coming-soon' ) ); | |
exit(); | |
} | |
} |
<?php | |
// Display variations dropdowns on shop page for variable products | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
function woo_display_variation_dropdown_on_shop_page() { | |
global $product; | |
if( $product->is_type( 'variable' )) { | |
<?php | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $product; |