Skip to content

Instantly share code, notes, and snippets.

View flabernardez's full-sized avatar

Flavia Bernárdez Rodríguez flabernardez

View GitHub Profile
@flabernardez
flabernardez / operations.sql
Last active May 12, 2021 20:37 — forked from carlalexander/update_db_utf8mb4.php
#wordpress #database change charset to utf8mb4
SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA, '.', TABLE_NAME,' COLLATE utf8mb4_general_ci;')
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='local' AND TABLE_TYPE = 'BASE TABLE';
@flabernardez
flabernardez / bookings_calendar_default_to_first_available.php
Last active August 2, 2018 08:07 — forked from jessepearson/bookings_calendar_default_to_first_available.php
#woocommerce #bookings Calendario de WooCommerce Bookings en mes primera reserva
<?php // do not copy this line
/*
Will make the Bookings calender default to the month with the first available booking.
By default the current month will be shown on the WooCommerce Bookings calendar for performance reasons.
This will default it to the month with the first available block.
*/
add_filter( 'wc_bookings_calendar_default_to_current_date', 'your_prefix_wc_bookings_calendar_default_to_current_date', 99 );
function your_prefix_wc_bookings_calendar_default_to_current_date(){
@flabernardez
flabernardez / functions.php
Last active May 22, 2018 10:33 — forked from craigcooperxyz/gist:f7cf758dc395252b9356
#woocommerce Eliminar cross-sells del carrito
<?php
/*
* Remove Cross-Sells from the shopping cart page
*
* Copy and paste this code into functions.php to
* remove cross-sells from the cart in WooCommerce.
*
* You may need to remove the opening <?php tag
* before you add it to your functions file.
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:35 — forked from PCianes/admin_notice.php
#wordpress Añadir avisos en el dashboard
<?php
/**
* Some example snippets for the control of notices in WordPress admin panel
*
* @package PCianes\AdminUtilities
* @since 1.0.0
* @author PCianes
* @license GNU General Public License 2.0+
*/
namespace PCianes\AdminUtilities;
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:41 — forked from OscarAbadFolgueira/dinapyme-woocommerce-modificar-texto-oferta.php
#woocommerce Cambiar el texto de "oferta" en los productos rebajados
<?php
function dinapyme_wc_modificar_texto_oferta( $texto ) {
return str_replace( __( 'Sale!', 'woocommerce' ), __( '¡Promoción!', 'woocommerce' ), $texto );
}
add_filter( 'woocommerce_sale_flash', 'dinapyme_wc_modificar_texto_oferta' );
@flabernardez
flabernardez / genesis-custom-loop-pagination.php
Last active April 17, 2018 11:39 — forked from billerickson/genesis-custom-loop-pagination.php
#genesis Cambiar loop con paginación
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@flabernardez
flabernardez / gradient-shadow.md
Last active April 17, 2018 11:40 — forked from tunguskha/Gradient shadow in pure CSS.md
#css Tutorial sombra en gradiente

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@flabernardez
flabernardez / wp-query-ref.php
Last active April 17, 2018 11:36 — forked from luetkemj/wp-query-ref.php
#wordpress Referencia Query
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:42 — forked from tanmay27vats/function.php
#woocommerce Eliminar tipos de productos en el selector de opciones
<?php
function fla_remove_product_types( $types ){
unset( $types['grouped'] );
unset( $types['external'] );
unset( $types['variable'] );
unset( $types['simple'] );
unset( $types['downloads'] );
return $types;