Skip to content

Instantly share code, notes, and snippets.

Txema León txemaleon

Block or report user

Report or block txemaleon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
txemaleon / functions.php
Last active Jun 25, 2018
Allow HTML Tags in WordPress Excerpts
View functions.php
* Allow HTML Tags in Wordpress Excerpt
* @link
if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) :
function wpse_custom_wp_trim_excerpt( $wpse_excerpt ) {
txemaleon / class.className.php
Created Jun 9, 2016
A Basic Class Template for Wordpress Plugins
View class.className.php
class className {
function __construct() {}
function className() {
new className;
txemaleon / pre.php
Created Apr 24, 2016
pre() es una pequeña función que muestra el contenido de una variable
View pre.php
* Muestra el contenido de una variable
* @param mixed $texto Variable a Mostrar
* @return n/a
function pre( $texto ) {
echo '<pre>';
print_r( $texto );
echo '</pre>';
View pre.sublime-snippet
pre( \$${1:var} );${2}
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
txemaleon / woocommerce_myorders_sc.php
Created Mar 23, 2016
Shortcode to display "My Orders" in a custom page, instead of in the "My Account" Page in WooCommerce
View woocommerce_myorders_sc.php
function txl_my_orders_sc( $atts ) {
$atts = shortcode_atts( array(
'order_count' => -1,
), $atts ));
wc_get_template( 'myaccount/my-orders.php', array(
'order_count' => $atts[ 'order_count' ],
You can’t perform that action at this time.