Skip to content

Instantly share code, notes, and snippets.

View jeffersonmatos's full-sized avatar
💭
I may be slow to respond.

Jefferson Matos jeffersonmatos

💭
I may be slow to respond.
View GitHub Profile
@jeffersonmatos
jeffersonmatos / index.pug
Created February 19, 2023 21:05
Navigation PageDesign/Lesson
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
@jeffersonmatos
jeffersonmatos / add2plugin.php
Last active April 29, 2022 21:54
Bloqueia as notificações de atualização do plugin no WordPress
<?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' );
@jeffersonmatos
jeffersonmatos / functions.php
Created April 28, 2022 01:36
WordPress - renomear imagens automaticamente no upload com base na data/hora
//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');
@jeffersonmatos
jeffersonmatos / wp-smootstate.js
Created July 3, 2021 18:35 — forked from pingram3541/wp-smootstate.js
WordPress smoothstate implementation
(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.
@jeffersonmatos
jeffersonmatos / wp-cpf-login.php
Created February 8, 2019 15:11 — forked from felipemarcos/wp-cpf-login.php
Permitir login por CPF - WordPress
<?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
@jeffersonmatos
jeffersonmatos / functions.php
Created May 28, 2018 07:39 — forked from grantambrose/functions.php
Create a custom Coming Soon page with Beaver Builder
// 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();
}
}
@jeffersonmatos
jeffersonmatos / README.MD
Created May 10, 2017 06:14 — forked from Shelob9/README.MD
Combine, Minify and Inline CSS In WordPress, in the correct order

Combine, Minify and Inline CSS In WordPress, in the correct order

Installation

Use copypasta to add to a sub-dir of mu-plugins or use Composer:

  "require": {
 "shelob9/css-inliner" : "*"
@jeffersonmatos
jeffersonmatos / functions.php
Last active October 21, 2023 05:56 — forked from corsonr/functions.php
Display WooCommerce product variations dropdown select on the shop page
<?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' )) {
@jeffersonmatos
jeffersonmatos / add-to-cart.php
Created December 24, 2016 01:35 — forked from lukecav/add-to-cart.php
Display Product Variations in the Shop Loop - With Conditional Apply Filter Logic
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;
@jeffersonmatos
jeffersonmatos / wc-align-cart-buttons.css
Created August 2, 2016 15:55 — forked from bekarice/wc-align-cart-buttons.css
Align WooCommerce Add to Cart Buttons (MAY CHANGE WITH THEME)
a.added_to_cart.wc-forward {
bottom: 0;
position: absolute;
display: block;
bottom: 0px;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
min-height: 295px !important;