This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Script para migrar los Token creado por el plugin Redsys PRO de modulosdepago.es a la forma correcta de guardarlos | |
* utilizando la API para Tokens de WooCommerce, y de esta forma poder utilizar el plugin oficial de WooCommerce.com para Redsys | |
* sin problemas y guardar los datos tal y como se debe hacer en WooCommerce. | |
* Solo necesitas tener activado WooCommerce, no hace falta que esté activo ningún otro plugin ya que este script solo utiliza | |
* la API de WordPress y de WooCommerce. | |
* Plugin oficial de WooCommerce.com para Redsys: https://woo.com/products/redsys-gateway/ | |
*/ | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'redsys_modify_data_to_send', 'datos_modificados_pasarela_pago_en_redsys' ); // Filtro para «Redsys redirección (por Jose Conti)» | |
add_filter( 'bizum_modify_data_to_send', 'datos_modificados_pasarela_pago_en_redsys' ); // Filtro para «Bizum (por Jose Conti)» | |
function datos_modificados_pasarela_pago_en_redsys( $redsys_data_send ) { | |
$order_total_sign = $redsys_data_send['order_total_sign']; // Precio total | |
$terminal = $redsys_data_send['DSMerchantTerminal']; // Número de terminal | |
$currency = $redsys_data_send['currency']; // Moneda (código internacional numérico) | |
$transaction_id2 = $redsys_data_send['transaction_id2']; // Número de pedido |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// filtro para añadir las acciones al listado de entradas (post) | |
add_filter( 'bulk_actions-edit-post', 'prefijo_anadimos_acciones_bulk' ); | |
function prefijo_anadimos_acciones_bulk( $bulk_actions ) { | |
$bulk_actions['accion_primera_anadida'] = __( 'Esta es la acción primera', 'dominio_traduccion'); | |
$bulk_actions['accion_segunda_anadida'] = __( 'Esta es la acción segunda', 'dominio_traduccion'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_embed_register_handler( 'gist', '/https?:\/\/gist\.github\.com\/([a-z0-9]+)\/([a-z0-9]+)?/i', 'joseconti_embed_gist' ); | |
function joseconti_embed_gist( $matches, $attr, $url, $rawattr ) { | |
$embed = sprintf( | |
'<script src="https://gist.github.com/%1$s/%2$s.js"></script>', | |
esc_attr( $matches[1] ), | |
esc_attr( $matches[2] ) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# QTRANSLATE CLEANUP QUERIES | |
# create temp column to separate post content on <!--more--> tag to simplify queries | |
ALTER TABLE `wp_posts` ADD `tmp_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; | |
ALTER TABLE `wp_4_posts` ADD `tmp_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; | |
ALTER TABLE `wp_3_posts` ADD `tmp_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; | |
# split content |
NewerOlder