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
| add_filter( 'robots_txt', function( $output, $public ) { | |
| $add = "# 0. Un robot no puede perjudicar a la Humanidad ni, por omisi贸n, permitir que la Humanidad sufra da帽o.\n"; | |
| $add .= "# 1. Un robot no debe perjudicar a un ser humano ni, por omisi贸n, permitir que un ser humano sufra da帽o, salvo cuando esto vulnere la Ley Cero.\n"; | |
| $add .= "# 2. Un robot debe obedecer las 贸rdenes que le son dadas por un ser humano, excepto si estas 贸rdenes entran en conflicto con la Primera Ley.\n"; | |
| $add .= "# 3. Un robot debe proteger su propia existencia, hasta donde esta protecci贸n no entre en conflicto con la Primera o la Segunda Ley.\n"; | |
| return $add . $output; | |
| }, 99, 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
| RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
| RewriteRule ^(.*)$ https://sitioproduccion.com/$1 [QSA,L] | |
| # Para entornos NGINX me ha funcionado poner lo siguiente en la configuraci贸n | |
| location ~* ^.+\.(svg|svgz|jpg|jpeg|gif|png|ico|bmp|pdf)$ { | |
| try_files $uri @image_fallback; | |
| } | |
| location @image_fallback { |
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 | |
| /** | |
| * SOAP Test for Redsys. | |
| * | |
| * @package WooCommerce Redsys Gateway (https://woocommerce.com/es-es/products/redsys-gateway/) | |
| * @copyright Jos茅 Conti | |
| */ | |
| if ( ! class_exists( 'SoapClient' ) ) { | |
| echo 'ATENCI脫N, SOAP NO ACTIVO'; |
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 | |
| spl_autoload_register(function($required_file) { | |
| # Transform file name from class based to file based | |
| $fixed_name = strtolower( str_ireplace( '_', '-', $required_file ) ); | |
| $file_path = explode( '\\', $fixed_name ); | |
| $last_index = count( $file_path ) - 1; | |
| $file_name = "class-{$file_path[$last_index]}.php"; | |
| # Get fully qualified path |